diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md index 4a1d0e506066..180d03f914f4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md @@ -1,5 +1,845 @@ # Release History +## 3.0.0-beta.1 (2022-11-16) +### Breaking Changes + +- Type of `ComputeInstance.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `SASAuthTypeWorkspaceConnectionProperties.Category` has been changed from `*ConnectionCategory` to `*string` +- Type of `SynapseSpark.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `PATAuthTypeWorkspaceConnectionProperties.Category` has been changed from `*ConnectionCategory` to `*string` +- Type of `CommandJob.Resources` has been changed from `*ResourceConfiguration` to `*JobResourceConfiguration` +- Type of `HDInsight.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `AmlCompute.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `WorkspaceProperties.ProvisioningState` has been changed from `*ProvisioningState` to `*WorkspaceProvisioningState` +- Type of `UsernamePasswordAuthTypeWorkspaceConnectionProperties.Category` has been changed from `*ConnectionCategory` to `*string` +- Type of `NoneAuthTypeWorkspaceConnectionProperties.Category` has been changed from `*ConnectionCategory` to `*string` +- Type of `AKS.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `Kubernetes.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `BatchDeploymentProperties.Resources` has been changed from `*ResourceConfiguration` to `*DeploymentResourceConfiguration` +- Type of `Databricks.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `TrialComponent.Resources` has been changed from `*ResourceConfiguration` to `*JobResourceConfiguration` +- Type of `DataFactory.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `ManagedIdentityAuthTypeWorkspaceConnectionProperties.Category` has been changed from `*ConnectionCategory` to `*string` +- Type of `DataLakeAnalytics.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `VirtualMachine.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `WorkspaceConnectionPropertiesV2.Category` has been changed from `*ConnectionCategory` to `*string` +- Type of `Compute.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Const `ConnectionCategoryPythonFeed` has been removed +- Const `ProvisioningStateUnknown` has been removed +- Const `ConnectionCategoryGit` has been removed +- Const `ProvisioningStateUpdating` has been removed +- Const `ProvisioningStateDeleting` has been removed +- Const `ProvisioningStateSucceeded` has been removed +- Const `ProvisioningStateCreating` has been removed +- Const `ProvisioningStateCanceled` has been removed +- Const `ConnectionCategoryContainerRegistry` has been removed +- Const `ProvisioningStateFailed` has been removed +- Type alias `ProvisioningState` has been removed +- Type alias `ConnectionCategory` has been removed +- Function `PossibleProvisioningStateValues` has been removed +- Function `PossibleConnectionCategoryValues` has been removed + +### Features Added + +- New const `ClassificationModelsExtremeRandomTrees` +- New const `BlockedTransformersWordEmbedding` +- New const `LearningRateSchedulerWarmupCosine` +- New const `EgressPublicNetworkAccessTypeDisabled` +- New const `StackMetaLearnerTypeLightGBMRegressor` +- New const `ClassificationModelsRandomForest` +- New const `StatusMessageLevelInformation` +- New const `ClassificationModelsSVM` +- New const `ComputeProvisioningStateFailed` +- New const `TriggerTypeRecurrence` +- New const `NlpLearningRateSchedulerConstantWithWarmup` +- New const `TextAnnotationTypeClassification` +- New const `InstanceSegmentationPrimaryMetricsMeanAveragePrecision` +- New const `StackMetaLearnerTypeNone` +- New const `ClassificationModelsMultinomialNaiveBayes` +- New const `FeaturizationModeAuto` +- New const `ForecastingPrimaryMetricsNormalizedMeanAbsoluteError` +- New const `ScheduleActionTypeInvokeBatchEndpoint` +- New const `BlockedTransformersHashOneHotEncoder` +- New const `RegressionPrimaryMetricsSpearmanCorrelation` +- New const `TextAnnotationTypeNamedEntityRecognition` +- New const `StackMetaLearnerTypeElasticNet` +- New const `ClassificationPrimaryMetricsAveragePrecisionScoreWeighted` +- New const `UseStlSeason` +- New const `TaskTypeImageObjectDetection` +- New const `StatusMessageLevelWarning` +- New const `VolumeDefinitionTypeVolume` +- New const `WorkspaceProvisioningStateCanceled` +- New const `MediaTypeText` +- New const `AssetProvisioningStateSucceeded` +- New const `BlockedTransformersTfIdf` +- New const `ObjectDetectionPrimaryMetricsMeanAveragePrecision` +- New const `StochasticOptimizerAdamw` +- New const `MLFlowAutologgerStateDisabled` +- New const `ForecastingModelsSeasonalNaive` +- New const `ForecastingModelsProphet` +- New const `MultiSelectDisabled` +- New const `BlockedTransformersTextTargetEncoder` +- New const `ForecastingModelsExponentialSmoothing` +- New const `StochasticOptimizerSgd` +- New const `NlpLearningRateSchedulerConstant` +- New const `RecurrenceFrequencyMonth` +- New const `ImageAnnotationTypeInstanceSegmentation` +- New const `ContainerTypeModelDataCollector` +- New const `RegressionModelsRandomForest` +- New const `ForecastHorizonModeAuto` +- New const `WorkspaceProvisioningStateFailed` +- New const `ClassificationPrimaryMetricsPrecisionScoreWeighted` +- New const `ClassificationMultilabelPrimaryMetricsAccuracy` +- New const `ScheduleProvisioningStatusFailed` +- New const `ForecastingModelsArimax` +- New const `ImageTypeDocker` +- New const `ComputeProvisioningStateDeleting` +- New const `ClassificationModelsXGBoostClassifier` +- New const `ScheduleProvisioningStatusCanceled` +- New const `WeekDayMonday` +- New const `ForecastingModelsTCNForecaster` +- New const `RegressionModelsLightGBM` +- New const `RegressionModelsLassoLars` +- New const `NlpLearningRateSchedulerLinear` +- New const `TargetLagsModeCustom` +- New const `AssetProvisioningStateUpdating` +- New const `MultiSelectEnabled` +- New const `TaskTypeClassification` +- New const `ScheduleListViewTypeAll` +- New const `TargetAggregationFunctionMax` +- New const `BlockedTransformersLabelEncoder` +- New const `ExportFormatTypeDataset` +- New const `ClassificationMultilabelPrimaryMetricsIOU` +- New const `ScheduleActionTypeCreateJob` +- New const `MLAssistConfigurationTypeEnabled` +- New const `ShortSeriesHandlingConfigurationAuto` +- New const `MLAssistConfigurationTypeDisabled` +- New const `LogVerbosityInfo` +- New const `AssetProvisioningStateCreating` +- New const `ClassificationModelsLogisticRegression` +- New const `LogVerbosityCritical` +- New const `NlpLearningRateSchedulerCosine` +- New const `TaskTypeTextClassificationMultilabel` +- New const `ForecastingPrimaryMetricsNormalizedRootMeanSquaredError` +- New const `RegressionModelsExtremeRandomTrees` +- New const `RegressionModelsKNN` +- New const `EgressPublicNetworkAccessTypeEnabled` +- New const `IncrementalDataRefreshDisabled` +- New const `StackMetaLearnerTypeLogisticRegressionCV` +- New const `ProtocolTCP` +- New const `ScheduleListViewTypeDisabledOnly` +- New const `ClassificationModelsLinearSVM` +- New const `ProtocolHTTP` +- New const `TrainingModeAuto` +- New const `ScheduleListViewTypeEnabledOnly` +- New const `WeekDayTuesday` +- New const `BlockedTransformersWoETargetEncoder` +- New const `IncrementalDataRefreshEnabled` +- New const `EnvironmentVariableTypeLocal` +- New const `TaskTypeTextNER` +- New const `LearningRateSchedulerNone` +- New const `TargetRollingWindowSizeModeAuto` +- New const `ForecastingModelsLightGBM` +- New const `ValidationMetricTypeVoc` +- New const `ShortSeriesHandlingConfigurationDrop` +- New const `ConnectionAuthTypeAccessKey` +- New const `ClassificationModelsDecisionTree` +- New const `RegressionModelsSGD` +- New const `CredentialsTypeKerberosPassword` +- New const `ShortSeriesHandlingConfigurationNone` +- New const `CredentialsTypeKerberosKeytab` +- New const `BlockedTransformersOneHotEncoder` +- New const `StackMetaLearnerTypeLightGBMClassifier` +- New const `ClassificationPrimaryMetricsNormMacroRecall` +- New const `JobProvisioningStateSucceeded` +- New const `ComputeProvisioningStateSucceeded` +- New const `ModelSizeNone` +- New const `WeekDaySaturday` +- New const `ComputeProvisioningStateCreating` +- New const `AutoRebuildSettingDisabled` +- New const `LogVerbosityWarning` +- New const `ForecastingModelsNaive` +- New const `ForecastingModelsGradientBoosting` +- New const `RecurrenceFrequencyWeek` +- New const `FeatureLagsNone` +- New const `TargetAggregationFunctionMin` +- New const `ForecastingModelsSGD` +- New const `UseStlNone` +- New const `ConnectionAuthTypeServicePrincipal` +- New const `JobTypeAutoML` +- New const `RegressionPrimaryMetricsNormalizedRootMeanSquaredError` +- New const `ClassificationPrimaryMetricsAccuracy` +- New const `FeaturizationModeOff` +- New const `ForecastHorizonModeCustom` +- New const `VolumeDefinitionTypeBind` +- New const `MlflowAutologgerDisabled` +- New const `ClassificationModelsSGD` +- New const `ValidationMetricTypeCoco` +- New const `ShortSeriesHandlingConfigurationPad` +- New const `ClassificationPrimaryMetricsAUCWeighted` +- New const `NodesValueTypeAll` +- New const `ImageAnnotationTypeClassification` +- New const `ForecastingModelsRandomForest` +- New const `ClassificationModelsLightGBM` +- New const `JobProvisioningStateCanceled` +- New const `RegressionPrimaryMetricsNormalizedMeanAbsoluteError` +- New const `TargetAggregationFunctionSum` +- New const `ForecastingModelsExtremeRandomTrees` +- New const `WeekDaySunday` +- New const `WeekDayFriday` +- New const `ClassificationModelsGradientBoosting` +- New const `WorkspaceProvisioningStateUpdating` +- New const `UseStlSeasonTrend` +- New const `VolumeDefinitionTypeTmpfs` +- New const `MLFlowAutologgerStateEnabled` +- New const `RegressionModelsElasticNet` +- New const `StackMetaLearnerTypeElasticNetCV` +- New const `NCrossValidationsModeAuto` +- New const `StackMetaLearnerTypeLogisticRegression` +- New const `ClassificationMultilabelPrimaryMetricsPrecisionScoreWeighted` +- New const `StatusMessageLevelError` +- New const `NlpLearningRateSchedulerNone` +- New const `ImageTypeAzureml` +- New const `RegressionModelsDecisionTree` +- New const `SecretsTypeKerberosKeytab` +- New const `StochasticOptimizerAdam` +- New const `WorkspaceProvisioningStateCreating` +- New const `ValidationMetricTypeNone` +- New const `WorkspaceProvisioningStateSucceeded` +- New const `MediaTypeImage` +- New const `StackMetaLearnerTypeLinearRegression` +- New const `ForecastingModelsXGBoostRegressor` +- New const `JobStatusScheduled` +- New const `TaskTypeImageClassificationMultilabel` +- New const `TaskTypeImageClassification` +- New const `ModelSizeLarge` +- New const `ImageAnnotationTypeBoundingBox` +- New const `RecurrenceFrequencyHour` +- New const `AssetProvisioningStateCanceled` +- New const `MlflowAutologgerEnabled` +- New const `ValidationMetricTypeCocoVoc` +- New const `WorkspaceProvisioningStateUnknown` +- New const `SeasonalityModeCustom` +- New const `ProtocolUDP` +- New const `JobProvisioningStateInProgress` +- New const `ForecastingPrimaryMetricsR2Score` +- New const `NlpLearningRateSchedulerPolynomial` +- New const `TaskTypeImageInstanceSegmentation` +- New const `BlockedTransformersCatTargetEncoder` +- New const `ClassificationMultilabelPrimaryMetricsAveragePrecisionScoreWeighted` +- New const `ScheduleProvisioningStatusCreating` +- New const `SecretsTypeKerberosPassword` +- New const `RegressionPrimaryMetricsR2Score` +- New const `JobTypeLabeling` +- New const `ForecastingModelsAverage` +- New const `RecurrenceFrequencyMinute` +- New const `LearningRateSchedulerStep` +- New const `FeaturizationModeCustom` +- New const `ModelSizeExtraLarge` +- New const `ModelSizeSmall` +- New const `AutoRebuildSettingOnBaseImageUpdate` +- New const `AssetProvisioningStateDeleting` +- New const `WeekDayWednesday` +- New const `PublicNetworkAccessTypeEnabled` +- New const `LogVerbosityError` +- New const `ForecastingModelsAutoArima` +- New const `AssetProvisioningStateFailed` +- New const `TrainingModeNonDistributed` +- New const `OutputDeliveryModeDirect` +- New const `TrainingModeDistributed` +- New const `TriggerTypeCron` +- New const `ForecastingModelsDecisionTree` +- New const `NlpLearningRateSchedulerCosineWithRestarts` +- New const `ClassificationModelsBernoulliNaiveBayes` +- New const `TaskTypeTextClassification` +- New const `ComputeProvisioningStateCanceled` +- New const `NCrossValidationsModeCustom` +- New const `SeasonalityModeAuto` +- New const `JobTypeSpark` +- New const `TaskTypeForecasting` +- New const `ForecastingModelsKNN` +- New const `TargetAggregationFunctionMean` +- New const `ComputeProvisioningStateUnknown` +- New const `VolumeDefinitionTypeNpipe` +- New const `ExportFormatTypeCoco` +- New const `LogVerbosityDebug` +- New const `ScheduleProvisioningStatusDeleting` +- New const `ClassificationMultilabelPrimaryMetricsAUCWeighted` +- New const `PublicNetworkAccessTypeDisabled` +- New const `ClassificationModelsKNN` +- New const `FeatureLagsAuto` +- New const `WorkspaceProvisioningStateSoftDeleted` +- New const `WorkspaceProvisioningStateDeleting` +- New const `WeekDayThursday` +- New const `ComputeProvisioningStateUpdating` +- New const `ForecastingPrimaryMetricsSpearmanCorrelation` +- New const `StochasticOptimizerNone` +- New const `TaskTypeRegression` +- New const `RegressionModelsXGBoostRegressor` +- New const `TargetLagsModeAuto` +- New const `ForecastingModelsElasticNet` +- New const `RegressionModelsGradientBoosting` +- New const `ModelSizeMedium` +- New const `ForecastingModelsLassoLars` +- New const `NodesValueTypeCustom` +- New const `DatastoreTypeHdfs` +- New const `JobProvisioningStateFailed` +- New const `ScheduleProvisioningStatusSucceeded` +- New const `ScheduleProvisioningStatusUpdating` +- New const `BlockedTransformersCountVectorizer` +- New const `SparkJobEntryTypeSparkJobPythonEntry` +- New const `ClassificationMultilabelPrimaryMetricsNormMacroRecall` +- New const `ExportFormatTypeCSV` +- New const `LogVerbosityNotSet` +- New const `RecurrenceFrequencyDay` +- New const `SparkJobEntryTypeSparkJobScalaEntry` +- New const `TargetRollingWindowSizeModeCustom` +- New const `TargetAggregationFunctionNone` +- New const `ForecastingModelsSeasonalAverage` +- New const `BlockedTransformersNaiveBayes` +- New type alias `ShortSeriesHandlingConfiguration` +- New type alias `TargetAggregationFunction` +- New type alias `ModelSize` +- New type alias `TaskType` +- New type alias `FeatureLags` +- New type alias `LearningRateScheduler` +- New type alias `ClassificationPrimaryMetrics` +- New type alias `NodesValueType` +- New type alias `TargetRollingWindowSizeMode` +- New type alias `ImageAnnotationType` +- New type alias `RegressionModels` +- New type alias `RecurrenceFrequency` +- New type alias `ClassificationMultilabelPrimaryMetrics` +- New type alias `PublicNetworkAccessType` +- New type alias `VolumeDefinitionType` +- New type alias `SeasonalityMode` +- New type alias `TrainingMode` +- New type alias `TextAnnotationType` +- New type alias `SparkJobEntryType` +- New type alias `LogVerbosity` +- New type alias `MLFlowAutologgerState` +- New type alias `BlockedTransformers` +- New type alias `TriggerType` +- New type alias `WeekDay` +- New type alias `AutoRebuildSetting` +- New type alias `FeaturizationMode` +- New type alias `ImageType` +- New type alias `TargetLagsMode` +- New type alias `MultiSelect` +- New type alias `InstanceSegmentationPrimaryMetrics` +- New type alias `ObjectDetectionPrimaryMetrics` +- New type alias `ClassificationModels` +- New type alias `RegressionPrimaryMetrics` +- New type alias `NlpLearningRateScheduler` +- New type alias `StochasticOptimizer` +- New type alias `WorkspaceProvisioningState` +- New type alias `ValidationMetricType` +- New type alias `ComputeProvisioningState` +- New type alias `MediaType` +- New type alias `NCrossValidationsMode` +- New type alias `AssetProvisioningState` +- New type alias `Protocol` +- New type alias `ScheduleProvisioningStatus` +- New type alias `JobProvisioningState` +- New type alias `MLAssistConfigurationType` +- New type alias `EgressPublicNetworkAccessType` +- New type alias `ForecastingModels` +- New type alias `StackMetaLearnerType` +- New type alias `ScheduleActionType` +- New type alias `ScheduleListViewType` +- New type alias `StatusMessageLevel` +- New type alias `UseStl` +- New type alias `IncrementalDataRefresh` +- New type alias `MlflowAutologger` +- New type alias `EnvironmentVariableType` +- New type alias `ForecastingPrimaryMetrics` +- New type alias `ExportFormatType` +- New type alias `ForecastHorizonMode` +- New function `*Regression.GetAutoMLVertical() *AutoMLVertical` +- New function `PossibleWorkspaceProvisioningStateValues() []WorkspaceProvisioningState` +- New function `*LabelingJobsClient.Get(context.Context, string, string, string, *LabelingJobsClientGetOptions) (LabelingJobsClientGetResponse, error)` +- New function `NewRegistryComponentContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryComponentContainersClient, error)` +- New function `*AutoMLVertical.GetAutoMLVertical() *AutoMLVertical` +- New function `NewRegistriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistriesClient, error)` +- New function `*RegistryCodeVersionsClient.NewListPager(string, string, string, *RegistryCodeVersionsClientListOptions) *runtime.Pager[RegistryCodeVersionsClientListResponse]` +- New function `PossibleEnvironmentVariableTypeValues() []EnvironmentVariableType` +- New function `*AutoForecastHorizon.GetForecastHorizon() *ForecastHorizon` +- New function `*RegistryModelVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, ModelVersion, *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelVersionsClientCreateOrUpdateResponse], error)` +- New function `PossibleNCrossValidationsModeValues() []NCrossValidationsMode` +- New function `PossibleForecastingModelsValues() []ForecastingModels` +- New function `PossibleValidationMetricTypeValues() []ValidationMetricType` +- New function `NewRegistryCodeContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryCodeContainersClient, error)` +- New function `*CustomNCrossValidations.GetNCrossValidations() *NCrossValidations` +- New function `PossibleAssetProvisioningStateValues() []AssetProvisioningState` +- New function `*MLAssistConfigurationDisabled.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `*AutoSeasonality.GetSeasonality() *Seasonality` +- New function `*RegistryCodeVersionsClient.Get(context.Context, string, string, string, string, *RegistryCodeVersionsClientGetOptions) (RegistryCodeVersionsClientGetResponse, error)` +- New function `*AutoMLJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*RegistryCodeVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, CodeVersion, *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeVersionsClientCreateOrUpdateResponse], error)` +- New function `NewRegistryModelContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryModelContainersClient, error)` +- New function `*LabelingJobImageProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `PossibleMLFlowAutologgerStateValues() []MLFlowAutologgerState` +- New function `*SparkJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*RegistryComponentVersionsClient.NewListPager(string, string, string, *RegistryComponentVersionsClientListOptions) *runtime.Pager[RegistryComponentVersionsClientListResponse]` +- New function `PossibleMultiSelectValues() []MultiSelect` +- New function `PossibleImageTypeValues() []ImageType` +- New function `PossibleRegressionModelsValues() []RegressionModels` +- New function `*SchedulesClient.Get(context.Context, string, string, string, *SchedulesClientGetOptions) (SchedulesClientGetResponse, error)` +- New function `*ImageClassification.GetAutoMLVertical() *AutoMLVertical` +- New function `*RegistriesClient.BeginDelete(context.Context, string, string, *RegistriesClientBeginDeleteOptions) (*runtime.Poller[RegistriesClientDeleteResponse], error)` +- New function `PossibleBlockedTransformersValues() []BlockedTransformers` +- New function `PossibleForecastingPrimaryMetricsValues() []ForecastingPrimaryMetrics` +- New function `*AutoTargetRollingWindowSize.GetTargetRollingWindowSize() *TargetRollingWindowSize` +- New function `*ForecastHorizon.GetForecastHorizon() *ForecastHorizon` +- New function `PossibleShortSeriesHandlingConfigurationValues() []ShortSeriesHandlingConfiguration` +- New function `PossibleScheduleListViewTypeValues() []ScheduleListViewType` +- New function `PossibleClassificationMultilabelPrimaryMetricsValues() []ClassificationMultilabelPrimaryMetrics` +- New function `*TargetLags.GetTargetLags() *TargetLags` +- New function `PossibleTargetRollingWindowSizeModeValues() []TargetRollingWindowSizeMode` +- New function `*SchedulesClient.BeginCreateOrUpdate(context.Context, string, string, string, Schedule, *SchedulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SchedulesClientCreateOrUpdateResponse], error)` +- New function `PossibleUseStlValues() []UseStl` +- New function `*ComputeClient.UpdateIdleShutdownSetting(context.Context, string, string, string, IdleShutdownSetting, *ComputeClientUpdateIdleShutdownSettingOptions) (ComputeClientUpdateIdleShutdownSettingResponse, error)` +- New function `*RegistriesClient.Update(context.Context, string, string, PartialRegistryPartialTrackedResource, *RegistriesClientUpdateOptions) (RegistriesClientUpdateResponse, error)` +- New function `PossibleMLAssistConfigurationTypeValues() []MLAssistConfigurationType` +- New function `PossibleClassificationPrimaryMetricsValues() []ClassificationPrimaryMetrics` +- New function `*RegistryModelContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, ModelContainer, *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelContainersClientCreateOrUpdateResponse], error)` +- New function `NewRegistryEnvironmentContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryEnvironmentContainersClient, error)` +- New function `PossiblePublicNetworkAccessTypeValues() []PublicNetworkAccessType` +- New function `PossibleStatusMessageLevelValues() []StatusMessageLevel` +- New function `*KerberosPasswordSecrets.GetDatastoreSecrets() *DatastoreSecrets` +- New function `PossibleMediaTypeValues() []MediaType` +- New function `*KerberosKeytabSecrets.GetDatastoreSecrets() *DatastoreSecrets` +- New function `PossibleAutoRebuildSettingValues() []AutoRebuildSetting` +- New function `*LabelingJobProperties.GetJobBaseProperties() *JobBaseProperties` +- New function `PossibleVolumeDefinitionTypeValues() []VolumeDefinitionType` +- New function `*RegistryEnvironmentContainersClient.NewListPager(string, string, *RegistryEnvironmentContainersClientListOptions) *runtime.Pager[RegistryEnvironmentContainersClientListResponse]` +- New function `*RegistryModelContainersClient.BeginDelete(context.Context, string, string, string, *RegistryModelContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryModelContainersClientDeleteResponse], error)` +- New function `*RegistryEnvironmentContainersClient.BeginDelete(context.Context, string, string, string, *RegistryEnvironmentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentContainersClientDeleteResponse], error)` +- New function `PossibleJobProvisioningStateValues() []JobProvisioningState` +- New function `*AllNodes.GetNodes() *Nodes` +- New function `PossibleNlpLearningRateSchedulerValues() []NlpLearningRateScheduler` +- New function `PossibleClassificationModelsValues() []ClassificationModels` +- New function `*LabelingJobMediaProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `*RegistryCodeContainersClient.BeginDelete(context.Context, string, string, string, *RegistryCodeContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeContainersClientDeleteResponse], error)` +- New function `*SchedulesClient.NewListPager(string, string, *SchedulesClientListOptions) *runtime.Pager[SchedulesClientListResponse]` +- New function `PossibleComputeProvisioningStateValues() []ComputeProvisioningState` +- New function `*TextClassification.GetAutoMLVertical() *AutoMLVertical` +- New function `*LabelingJobsClient.BeginExportLabels(context.Context, string, string, string, ExportSummaryClassification, *LabelingJobsClientBeginExportLabelsOptions) (*runtime.Poller[LabelingJobsClientExportLabelsResponse], error)` +- New function `PossibleSeasonalityModeValues() []SeasonalityMode` +- New function `PossibleTargetAggregationFunctionValues() []TargetAggregationFunction` +- New function `PossibleInstanceSegmentationPrimaryMetricsValues() []InstanceSegmentationPrimaryMetrics` +- New function `PossibleImageAnnotationTypeValues() []ImageAnnotationType` +- New function `*RegistryEnvironmentContainersClient.Get(context.Context, string, string, string, *RegistryEnvironmentContainersClientGetOptions) (RegistryEnvironmentContainersClientGetResponse, error)` +- New function `*JobScheduleAction.GetScheduleActionBase() *ScheduleActionBase` +- New function `PossibleLearningRateSchedulerValues() []LearningRateScheduler` +- New function `*LabelingJobsClient.Pause(context.Context, string, string, string, *LabelingJobsClientPauseOptions) (LabelingJobsClientPauseResponse, error)` +- New function `*CustomForecastHorizon.GetForecastHorizon() *ForecastHorizon` +- New function `*RegistriesClient.NewListPager(string, *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse]` +- New function `*KerberosKeytabCredentials.GetDatastoreCredentials() *DatastoreCredentials` +- New function `*Nodes.GetNodes() *Nodes` +- New function `PossibleObjectDetectionPrimaryMetricsValues() []ObjectDetectionPrimaryMetrics` +- New function `*RegistryComponentVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, ComponentVersion, *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentVersionsClientCreateOrUpdateResponse], error)` +- New function `PossibleModelSizeValues() []ModelSize` +- New function `PossibleForecastHorizonModeValues() []ForecastHorizonMode` +- New function `*CustomTargetLags.GetTargetLags() *TargetLags` +- New function `PossibleMlflowAutologgerValues() []MlflowAutologger` +- New function `PossibleEgressPublicNetworkAccessTypeValues() []EgressPublicNetworkAccessType` +- New function `*ServicePrincipalAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `PossibleIncrementalDataRefreshValues() []IncrementalDataRefresh` +- New function `*Classification.GetAutoMLVertical() *AutoMLVertical` +- New function `*KerberosPasswordCredentials.GetDatastoreCredentials() *DatastoreCredentials` +- New function `*RecurrenceTrigger.GetTriggerBase() *TriggerBase` +- New function `*SchedulesClient.BeginDelete(context.Context, string, string, string, *SchedulesClientBeginDeleteOptions) (*runtime.Poller[SchedulesClientDeleteResponse], error)` +- New function `NewRegistryCodeVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryCodeVersionsClient, error)` +- New function `*RegistryComponentVersionsClient.Get(context.Context, string, string, string, string, *RegistryComponentVersionsClientGetOptions) (RegistryComponentVersionsClientGetResponse, error)` +- New function `*RegistryComponentVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryComponentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentVersionsClientDeleteResponse], error)` +- New function `*ExportSummary.GetExportSummary() *ExportSummary` +- New function `PossibleTargetLagsModeValues() []TargetLagsMode` +- New function `*LabelingJobsClient.NewListPager(string, string, *LabelingJobsClientListOptions) *runtime.Pager[LabelingJobsClientListResponse]` +- New function `*RegistryEnvironmentVersionsClient.Get(context.Context, string, string, string, string, *RegistryEnvironmentVersionsClientGetOptions) (RegistryEnvironmentVersionsClientGetResponse, error)` +- New function `*ComputeClient.UpdateCustomServices(context.Context, string, string, string, []*CustomService, *ComputeClientUpdateCustomServicesOptions) (ComputeClientUpdateCustomServicesResponse, error)` +- New function `*CronTrigger.GetTriggerBase() *TriggerBase` +- New function `PossibleTrainingModeValues() []TrainingMode` +- New function `*RegistryEnvironmentVersionsClient.NewListPager(string, string, string, *RegistryEnvironmentVersionsClientListOptions) *runtime.Pager[RegistryEnvironmentVersionsClientListResponse]` +- New function `*RegistryComponentContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, ComponentContainer, *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentContainersClientCreateOrUpdateResponse], error)` +- New function `*MLAssistConfigurationEnabled.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `PossibleExportFormatTypeValues() []ExportFormatType` +- New function `PossibleScheduleActionTypeValues() []ScheduleActionType` +- New function `*RegistryEnvironmentContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, EnvironmentContainer, *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentContainersClientCreateOrUpdateResponse], error)` +- New function `PossibleLogVerbosityValues() []LogVerbosity` +- New function `*CocoExportSummary.GetExportSummary() *ExportSummary` +- New function `NewSchedulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SchedulesClient, error)` +- New function `*HdfsDatastore.GetDatastoreProperties() *DatastoreProperties` +- New function `*TextClassificationMultilabel.GetAutoMLVertical() *AutoMLVertical` +- New function `*RegistryEnvironmentVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, EnvironmentVersion, *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryModelVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryModelVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryModelVersionsClientDeleteResponse], error)` +- New function `*RegistryComponentContainersClient.NewListPager(string, string, *RegistryComponentContainersClientListOptions) *runtime.Pager[RegistryComponentContainersClientListResponse]` +- New function `PossibleNodesValueTypeValues() []NodesValueType` +- New function `*Forecasting.GetAutoMLVertical() *AutoMLVertical` +- New function `*RegistryModelVersionsClient.NewListPager(string, string, string, *RegistryModelVersionsClientListOptions) *runtime.Pager[RegistryModelVersionsClientListResponse]` +- New function `*LabelingJobTextProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `*RegistriesClient.NewListBySubscriptionPager(*RegistriesClientListBySubscriptionOptions) *runtime.Pager[RegistriesClientListBySubscriptionResponse]` +- New function `*Seasonality.GetSeasonality() *Seasonality` +- New function `*ImageClassificationMultilabel.GetAutoMLVertical() *AutoMLVertical` +- New function `PossibleSparkJobEntryTypeValues() []SparkJobEntryType` +- New function `*NCrossValidations.GetNCrossValidations() *NCrossValidations` +- New function `*RegistriesClient.BeginCreateOrUpdate(context.Context, string, string, Registry, *RegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistriesClientCreateOrUpdateResponse], error)` +- New function `*RegistryCodeContainersClient.NewListPager(string, string, *RegistryCodeContainersClientListOptions) *runtime.Pager[RegistryCodeContainersClientListResponse]` +- New function `PossibleTriggerTypeValues() []TriggerType` +- New function `PossibleStackMetaLearnerTypeValues() []StackMetaLearnerType` +- New function `*RegistryCodeContainersClient.Get(context.Context, string, string, string, *RegistryCodeContainersClientGetOptions) (RegistryCodeContainersClientGetResponse, error)` +- New function `*TextNer.GetAutoMLVertical() *AutoMLVertical` +- New function `*ImageObjectDetection.GetAutoMLVertical() *AutoMLVertical` +- New function `*RegistriesClient.Get(context.Context, string, string, *RegistriesClientGetOptions) (RegistriesClientGetResponse, error)` +- New function `*ScheduleActionBase.GetScheduleActionBase() *ScheduleActionBase` +- New function `PossibleFeaturizationModeValues() []FeaturizationMode` +- New function `PossibleProtocolValues() []Protocol` +- New function `*TriggerBase.GetTriggerBase() *TriggerBase` +- New function `NewRegistryEnvironmentVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryEnvironmentVersionsClient, error)` +- New function `*EndpointScheduleAction.GetScheduleActionBase() *ScheduleActionBase` +- New function `*RegistryModelContainersClient.Get(context.Context, string, string, string, *RegistryModelContainersClientGetOptions) (RegistryModelContainersClientGetResponse, error)` +- New function `*TargetRollingWindowSize.GetTargetRollingWindowSize() *TargetRollingWindowSize` +- New function `*LabelingJobsClient.BeginResume(context.Context, string, string, string, *LabelingJobsClientBeginResumeOptions) (*runtime.Poller[LabelingJobsClientResumeResponse], error)` +- New function `*RegistryEnvironmentVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientDeleteResponse], error)` +- New function `NewRegistryComponentVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryComponentVersionsClient, error)` +- New function `PossibleScheduleProvisioningStatusValues() []ScheduleProvisioningStatus` +- New function `PossibleWeekDayValues() []WeekDay` +- New function `*MLAssistConfiguration.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `PossibleStochasticOptimizerValues() []StochasticOptimizer` +- New function `NewRegistryModelVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryModelVersionsClient, error)` +- New function `*ImageInstanceSegmentation.GetAutoMLVertical() *AutoMLVertical` +- New function `*AutoTargetLags.GetTargetLags() *TargetLags` +- New function `*RegistryComponentContainersClient.Get(context.Context, string, string, string, *RegistryComponentContainersClientGetOptions) (RegistryComponentContainersClientGetResponse, error)` +- New function `*SparkJobScalaEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*SparkJobPythonEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*RegistryModelContainersClient.NewListPager(string, string, *RegistryModelContainersClientListOptions) *runtime.Pager[RegistryModelContainersClientListResponse]` +- New function `PossibleRecurrenceFrequencyValues() []RecurrenceFrequency` +- New function `*RegistryComponentContainersClient.BeginDelete(context.Context, string, string, string, *RegistryComponentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentContainersClientDeleteResponse], error)` +- New function `*AccessKeyAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `PossibleRegressionPrimaryMetricsValues() []RegressionPrimaryMetrics` +- New function `*SparkJobEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*DatasetExportSummary.GetExportSummary() *ExportSummary` +- New function `*LabelingJobsClient.BeginCreateOrUpdate(context.Context, string, string, string, LabelingJob, *LabelingJobsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LabelingJobsClientCreateOrUpdateResponse], error)` +- New function `NewLabelingJobsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*LabelingJobsClient, error)` +- New function `*RegistryCodeContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, CodeContainer, *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeContainersClientCreateOrUpdateResponse], error)` +- New function `*CSVExportSummary.GetExportSummary() *ExportSummary` +- New function `*RegistryCodeVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryCodeVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeVersionsClientDeleteResponse], error)` +- New function `*LabelingJobsClient.Delete(context.Context, string, string, string, *LabelingJobsClientDeleteOptions) (LabelingJobsClientDeleteResponse, error)` +- New function `*RegistryModelVersionsClient.Get(context.Context, string, string, string, string, *RegistryModelVersionsClientGetOptions) (RegistryModelVersionsClientGetResponse, error)` +- New function `PossibleFeatureLagsValues() []FeatureLags` +- New function `PossibleTaskTypeValues() []TaskType` +- New function `*AutoNCrossValidations.GetNCrossValidations() *NCrossValidations` +- New function `PossibleTextAnnotationTypeValues() []TextAnnotationType` +- New function `*CustomTargetRollingWindowSize.GetTargetRollingWindowSize() *TargetRollingWindowSize` +- New function `*CustomSeasonality.GetSeasonality() *Seasonality` +- New struct `AccessKeyAuthTypeWorkspaceConnectionProperties` +- New struct `AcrDetails` +- New struct `AllNodes` +- New struct `ArmResourceID` +- New struct `AutoForecastHorizon` +- New struct `AutoMLJob` +- New struct `AutoMLVertical` +- New struct `AutoNCrossValidations` +- New struct `AutoSeasonality` +- New struct `AutoTargetLags` +- New struct `AutoTargetRollingWindowSize` +- New struct `AutologgerSettings` +- New struct `AzureDatastore` +- New struct `BindOptions` +- New struct `CSVExportSummary` +- New struct `Classification` +- New struct `ClassificationTrainingSettings` +- New struct `CocoExportSummary` +- New struct `ColumnTransformer` +- New struct `ComputeClientUpdateCustomServicesOptions` +- New struct `ComputeClientUpdateCustomServicesResponse` +- New struct `ComputeClientUpdateIdleShutdownSettingOptions` +- New struct `ComputeClientUpdateIdleShutdownSettingResponse` +- New struct `ComputeInstanceAutologgerSettings` +- New struct `Cron` +- New struct `CronTrigger` +- New struct `CustomForecastHorizon` +- New struct `CustomNCrossValidations` +- New struct `CustomSeasonality` +- New struct `CustomService` +- New struct `CustomTargetLags` +- New struct `CustomTargetRollingWindowSize` +- New struct `DatasetExportSummary` +- New struct `DeploymentResourceConfiguration` +- New struct `Docker` +- New struct `EncryptionKeyVaultUpdateProperties` +- New struct `EncryptionUpdateProperties` +- New struct `Endpoint` +- New struct `EndpointScheduleAction` +- New struct `EnvironmentVariable` +- New struct `ExportSummary` +- New struct `FeaturizationSettings` +- New struct `ForecastHorizon` +- New struct `Forecasting` +- New struct `ForecastingSettings` +- New struct `ForecastingTrainingSettings` +- New struct `HdfsDatastore` +- New struct `IdleShutdownSetting` +- New struct `Image` +- New struct `ImageClassification` +- New struct `ImageClassificationBase` +- New struct `ImageClassificationMultilabel` +- New struct `ImageInstanceSegmentation` +- New struct `ImageLimitSettings` +- New struct `ImageMetadata` +- New struct `ImageModelDistributionSettings` +- New struct `ImageModelDistributionSettingsClassification` +- New struct `ImageModelDistributionSettingsObjectDetection` +- New struct `ImageModelSettings` +- New struct `ImageModelSettingsClassification` +- New struct `ImageModelSettingsObjectDetection` +- New struct `ImageObjectDetection` +- New struct `ImageObjectDetectionBase` +- New struct `ImageSweepSettings` +- New struct `ImageVertical` +- New struct `JobResourceConfiguration` +- New struct `JobScheduleAction` +- New struct `KerberosCredentials` +- New struct `KerberosKeytabCredentials` +- New struct `KerberosKeytabSecrets` +- New struct `KerberosPasswordCredentials` +- New struct `KerberosPasswordSecrets` +- New struct `LabelCategory` +- New struct `LabelClass` +- New struct `LabelingDataConfiguration` +- New struct `LabelingJob` +- New struct `LabelingJobImageProperties` +- New struct `LabelingJobInstructions` +- New struct `LabelingJobMediaProperties` +- New struct `LabelingJobProperties` +- New struct `LabelingJobResourceArmPaginatedResult` +- New struct `LabelingJobTextProperties` +- New struct `LabelingJobsClient` +- New struct `LabelingJobsClientBeginCreateOrUpdateOptions` +- New struct `LabelingJobsClientBeginExportLabelsOptions` +- New struct `LabelingJobsClientBeginResumeOptions` +- New struct `LabelingJobsClientCreateOrUpdateResponse` +- New struct `LabelingJobsClientDeleteOptions` +- New struct `LabelingJobsClientDeleteResponse` +- New struct `LabelingJobsClientExportLabelsResponse` +- New struct `LabelingJobsClientGetOptions` +- New struct `LabelingJobsClientGetResponse` +- New struct `LabelingJobsClientListOptions` +- New struct `LabelingJobsClientListResponse` +- New struct `LabelingJobsClientPauseOptions` +- New struct `LabelingJobsClientPauseResponse` +- New struct `LabelingJobsClientResumeResponse` +- New struct `MLAssistConfiguration` +- New struct `MLAssistConfigurationDisabled` +- New struct `MLAssistConfigurationEnabled` +- New struct `NCrossValidations` +- New struct `NlpFixedParameters` +- New struct `NlpParameterSubspace` +- New struct `NlpSweepSettings` +- New struct `NlpVertical` +- New struct `NlpVerticalFeaturizationSettings` +- New struct `NlpVerticalLimitSettings` +- New struct `Nodes` +- New struct `PartialRegistryPartialTrackedResource` +- New struct `ProgressMetrics` +- New struct `Recurrence` +- New struct `RecurrenceSchedule` +- New struct `RecurrenceTrigger` +- New struct `RegistriesClient` +- New struct `RegistriesClientBeginCreateOrUpdateOptions` +- New struct `RegistriesClientBeginDeleteOptions` +- New struct `RegistriesClientCreateOrUpdateResponse` +- New struct `RegistriesClientDeleteResponse` +- New struct `RegistriesClientGetOptions` +- New struct `RegistriesClientGetResponse` +- New struct `RegistriesClientListBySubscriptionOptions` +- New struct `RegistriesClientListBySubscriptionResponse` +- New struct `RegistriesClientListOptions` +- New struct `RegistriesClientListResponse` +- New struct `RegistriesClientUpdateOptions` +- New struct `RegistriesClientUpdateResponse` +- New struct `Registry` +- New struct `RegistryCodeContainersClient` +- New struct `RegistryCodeContainersClientBeginCreateOrUpdateOptions` +- New struct `RegistryCodeContainersClientBeginDeleteOptions` +- New struct `RegistryCodeContainersClientCreateOrUpdateResponse` +- New struct `RegistryCodeContainersClientDeleteResponse` +- New struct `RegistryCodeContainersClientGetOptions` +- New struct `RegistryCodeContainersClientGetResponse` +- New struct `RegistryCodeContainersClientListOptions` +- New struct `RegistryCodeContainersClientListResponse` +- New struct `RegistryCodeVersionsClient` +- New struct `RegistryCodeVersionsClientBeginCreateOrUpdateOptions` +- New struct `RegistryCodeVersionsClientBeginDeleteOptions` +- New struct `RegistryCodeVersionsClientCreateOrUpdateResponse` +- New struct `RegistryCodeVersionsClientDeleteResponse` +- New struct `RegistryCodeVersionsClientGetOptions` +- New struct `RegistryCodeVersionsClientGetResponse` +- New struct `RegistryCodeVersionsClientListOptions` +- New struct `RegistryCodeVersionsClientListResponse` +- New struct `RegistryComponentContainersClient` +- New struct `RegistryComponentContainersClientBeginCreateOrUpdateOptions` +- New struct `RegistryComponentContainersClientBeginDeleteOptions` +- New struct `RegistryComponentContainersClientCreateOrUpdateResponse` +- New struct `RegistryComponentContainersClientDeleteResponse` +- New struct `RegistryComponentContainersClientGetOptions` +- New struct `RegistryComponentContainersClientGetResponse` +- New struct `RegistryComponentContainersClientListOptions` +- New struct `RegistryComponentContainersClientListResponse` +- New struct `RegistryComponentVersionsClient` +- New struct `RegistryComponentVersionsClientBeginCreateOrUpdateOptions` +- New struct `RegistryComponentVersionsClientBeginDeleteOptions` +- New struct `RegistryComponentVersionsClientCreateOrUpdateResponse` +- New struct `RegistryComponentVersionsClientDeleteResponse` +- New struct `RegistryComponentVersionsClientGetOptions` +- New struct `RegistryComponentVersionsClientGetResponse` +- New struct `RegistryComponentVersionsClientListOptions` +- New struct `RegistryComponentVersionsClientListResponse` +- New struct `RegistryEnvironmentContainersClient` +- New struct `RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions` +- New struct `RegistryEnvironmentContainersClientBeginDeleteOptions` +- New struct `RegistryEnvironmentContainersClientCreateOrUpdateResponse` +- New struct `RegistryEnvironmentContainersClientDeleteResponse` +- New struct `RegistryEnvironmentContainersClientGetOptions` +- New struct `RegistryEnvironmentContainersClientGetResponse` +- New struct `RegistryEnvironmentContainersClientListOptions` +- New struct `RegistryEnvironmentContainersClientListResponse` +- New struct `RegistryEnvironmentVersionsClient` +- New struct `RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions` +- New struct `RegistryEnvironmentVersionsClientBeginDeleteOptions` +- New struct `RegistryEnvironmentVersionsClientCreateOrUpdateResponse` +- New struct `RegistryEnvironmentVersionsClientDeleteResponse` +- New struct `RegistryEnvironmentVersionsClientGetOptions` +- New struct `RegistryEnvironmentVersionsClientGetResponse` +- New struct `RegistryEnvironmentVersionsClientListOptions` +- New struct `RegistryEnvironmentVersionsClientListResponse` +- New struct `RegistryModelContainersClient` +- New struct `RegistryModelContainersClientBeginCreateOrUpdateOptions` +- New struct `RegistryModelContainersClientBeginDeleteOptions` +- New struct `RegistryModelContainersClientCreateOrUpdateResponse` +- New struct `RegistryModelContainersClientDeleteResponse` +- New struct `RegistryModelContainersClientGetOptions` +- New struct `RegistryModelContainersClientGetResponse` +- New struct `RegistryModelContainersClientListOptions` +- New struct `RegistryModelContainersClientListResponse` +- New struct `RegistryModelVersionsClient` +- New struct `RegistryModelVersionsClientBeginCreateOrUpdateOptions` +- New struct `RegistryModelVersionsClientBeginDeleteOptions` +- New struct `RegistryModelVersionsClientCreateOrUpdateResponse` +- New struct `RegistryModelVersionsClientDeleteResponse` +- New struct `RegistryModelVersionsClientGetOptions` +- New struct `RegistryModelVersionsClientGetResponse` +- New struct `RegistryModelVersionsClientListOptions` +- New struct `RegistryModelVersionsClientListResponse` +- New struct `RegistryProperties` +- New struct `RegistryRegionArmDetails` +- New struct `RegistryTrackedResourceArmPaginatedResult` +- New struct `Regression` +- New struct `RegressionTrainingSettings` +- New struct `Schedule` +- New struct `ScheduleActionBase` +- New struct `ScheduleProperties` +- New struct `ScheduleResourceArmPaginatedResult` +- New struct `SchedulesClient` +- New struct `SchedulesClientBeginCreateOrUpdateOptions` +- New struct `SchedulesClientBeginDeleteOptions` +- New struct `SchedulesClientCreateOrUpdateResponse` +- New struct `SchedulesClientDeleteResponse` +- New struct `SchedulesClientGetOptions` +- New struct `SchedulesClientGetResponse` +- New struct `SchedulesClientListOptions` +- New struct `SchedulesClientListResponse` +- New struct `Seasonality` +- New struct `ServicePrincipalAuthTypeWorkspaceConnectionProperties` +- New struct `SparkJob` +- New struct `SparkJobEntry` +- New struct `SparkJobPythonEntry` +- New struct `SparkJobScalaEntry` +- New struct `SparkResourceConfiguration` +- New struct `StackEnsembleSettings` +- New struct `StatusMessage` +- New struct `StorageAccountDetails` +- New struct `SystemCreatedAcrAccount` +- New struct `SystemCreatedStorageAccount` +- New struct `TableFixedParameters` +- New struct `TableParameterSubspace` +- New struct `TableSweepSettings` +- New struct `TableVertical` +- New struct `TableVerticalFeaturizationSettings` +- New struct `TableVerticalLimitSettings` +- New struct `TargetLags` +- New struct `TargetRollingWindowSize` +- New struct `TextClassification` +- New struct `TextClassificationMultilabel` +- New struct `TextNer` +- New struct `TmpfsOptions` +- New struct `TrainingSettings` +- New struct `TriggerBase` +- New struct `UserCreatedAcrAccount` +- New struct `UserCreatedStorageAccount` +- New struct `VolumeDefinition` +- New struct `VolumeOptions` +- New struct `WorkspaceConnectionAccessKey` +- New struct `WorkspaceConnectionServicePrincipal` +- New field `ComponentID` in struct `JobBaseProperties` +- New field `ProvisioningState` in struct `ModelVersionProperties` +- New field `ProvisioningState` in struct `ComponentVersionProperties` +- New field `ProvisioningState` in struct `ModelContainerProperties` +- New field `ComponentID` in struct `SweepJob` +- New field `AssetVersion` in struct `TritonModelJobOutput` +- New field `AssetName` in struct `TritonModelJobOutput` +- New field `ResourceGroup` in struct `AzureDataLakeGen1Datastore` +- New field `SubscriptionID` in struct `AzureDataLakeGen1Datastore` +- New field `AssetName` in struct `AssetJobOutput` +- New field `AssetVersion` in struct `AssetJobOutput` +- New field `ProvisioningState` in struct `EnvironmentVersionProperties` +- New field `AutoRebuild` in struct `EnvironmentVersionProperties` +- New field `SubscriptionID` in struct `AzureFileDatastore` +- New field `ResourceGroup` in struct `AzureFileDatastore` +- New field `ProvisioningState` in struct `EnvironmentContainerProperties` +- New field `Logbase` in struct `RandomSamplingAlgorithm` +- New field `PublicNetworkAccess` in struct `OnlineEndpointProperties` +- New field `MirrorTraffic` in struct `OnlineEndpointProperties` +- New field `EgressPublicNetworkAccess` in struct `OnlineDeploymentProperties` +- New field `AssetName` in struct `URIFolderJobOutput` +- New field `AssetVersion` in struct `URIFolderJobOutput` +- New field `AssetVersion` in struct `URIFileJobOutput` +- New field `AssetName` in struct `URIFileJobOutput` +- New field `ComponentID` in struct `PipelineJob` +- New field `SourceJobID` in struct `PipelineJob` +- New field `ProvisioningState` in struct `CodeContainerProperties` +- New field `SubscriptionID` in struct `AzureBlobDatastore` +- New field `ResourceGroup` in struct `AzureBlobDatastore` +- New field `Encryption` in struct `WorkspacePropertiesUpdateParameters` +- New field `Status` in struct `ComputeStartStopSchedule` +- New field `TriggerType` in struct `ComputeStartStopSchedule` +- New field `Cron` in struct `ComputeStartStopSchedule` +- New field `Recurrence` in struct `ComputeStartStopSchedule` +- New field `Nodes` in struct `JobService` +- New field `SoftDeletedAt` in struct `WorkspaceProperties` +- New field `ScheduledPurgeDate` in struct `WorkspaceProperties` +- New field `ProvisioningState` in struct `ComponentContainerProperties` +- New field `EgressPublicNetworkAccess` in struct `KubernetesOnlineDeployment` +- New field `AssetName` in struct `CustomModelJobOutput` +- New field `AssetVersion` in struct `CustomModelJobOutput` +- New field `ResourceGroup` in struct `AzureDataLakeGen2Datastore` +- New field `SubscriptionID` in struct `AzureDataLakeGen2Datastore` +- New field `ScheduleID` in struct `JobsClientListOptions` +- New field `Scheduled` in struct `JobsClientListOptions` +- New field `AssetVersion` in struct `MLTableJobOutput` +- New field `AssetName` in struct `MLTableJobOutput` +- New field `EgressPublicNetworkAccess` in struct `ManagedOnlineDeployment` +- New field `ProvisioningState` in struct `CodeVersionProperties` +- New field `AssetVersion` in struct `MLFlowModelJobOutput` +- New field `AssetName` in struct `MLFlowModelJobOutput` +- New field `AutologgerSettings` in struct `ComputeInstanceProperties` +- New field `CustomServices` in struct `ComputeInstanceProperties` +- New field `IdleTimeBeforeShutdown` in struct `ComputeInstanceProperties` +- New field `OSImageMetadata` in struct `ComputeInstanceProperties` +- New field `ComponentID` in struct `CommandJob` +- New field `AutologgerSettings` in struct `CommandJob` + + ## 2.0.0 (2022-06-09) ### Breaking Changes diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md b/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md index 13148ad1f365..85dc09d36bd1 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/669c27936542af9b2d308581d618e5a744125c21/specification/machinelearningservices/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/669c27936542af9b2d308581d618e5a744125c21/specification/machinelearningservices/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/machinelearningservices/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/machinelearningservices/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 2.0.0 +module-version: 3.0.0-beta.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_batchdeployments_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go similarity index 96% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_batchdeployments_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go index 0c730a3dac34..4dd597022549 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_batchdeployments_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewBatchDeploymentsClient(subscriptionID string, credential azcore.TokenCre // BeginCreateOrUpdate - Creates/updates a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name @@ -79,7 +80,7 @@ func (client *BatchDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, r // CreateOrUpdate - Creates/updates a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *BatchDeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body BatchDeployment, options *BatchDeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) if err != nil { @@ -123,7 +124,7 @@ func (client *BatchDeploymentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -131,7 +132,7 @@ func (client *BatchDeploymentsClient) createOrUpdateCreateRequest(ctx context.Co // BeginDelete - Delete Batch Inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Endpoint name @@ -152,7 +153,7 @@ func (client *BatchDeploymentsClient) BeginDelete(ctx context.Context, resourceG // Delete - Delete Batch Inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *BatchDeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *BatchDeploymentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, options) if err != nil { @@ -196,7 +197,7 @@ func (client *BatchDeploymentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +205,7 @@ func (client *BatchDeploymentsClient) deleteCreateRequest(ctx context.Context, r // Get - Gets a batch inference deployment by id. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Endpoint name @@ -253,7 +254,7 @@ func (client *BatchDeploymentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -269,8 +270,7 @@ func (client *BatchDeploymentsClient) getHandleResponse(resp *http.Response) (Ba } // NewListPager - Lists Batch inference deployments in the workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Endpoint name @@ -327,7 +327,7 @@ func (client *BatchDeploymentsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } @@ -353,7 +353,7 @@ func (client *BatchDeploymentsClient) listHandleResponse(resp *http.Response) (B // BeginUpdate - Update a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name @@ -375,7 +375,7 @@ func (client *BatchDeploymentsClient) BeginUpdate(ctx context.Context, resourceG // Update - Update a batch inference deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *BatchDeploymentsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties, options *BatchDeploymentsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) if err != nil { @@ -419,7 +419,7 @@ func (client *BatchDeploymentsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_batchendpoints_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go similarity index 96% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_batchendpoints_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go index c80276b7bcab..bbcb59fc21b7 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_batchendpoints_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewBatchEndpointsClient(subscriptionID string, credential azcore.TokenCrede // BeginCreateOrUpdate - Creates a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Name for the Batch inference endpoint. @@ -78,7 +79,7 @@ func (client *BatchEndpointsClient) BeginCreateOrUpdate(ctx context.Context, res // CreateOrUpdate - Creates a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *BatchEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body BatchEndpoint, options *BatchEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, body, options) if err != nil { @@ -118,7 +119,7 @@ func (client *BatchEndpointsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,7 +127,7 @@ func (client *BatchEndpointsClient) createOrUpdateCreateRequest(ctx context.Cont // BeginDelete - Delete Batch Inference Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference Endpoint name. @@ -146,7 +147,7 @@ func (client *BatchEndpointsClient) BeginDelete(ctx context.Context, resourceGro // Delete - Delete Batch Inference Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *BatchEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *BatchEndpointsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { @@ -186,7 +187,7 @@ func (client *BatchEndpointsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +195,7 @@ func (client *BatchEndpointsClient) deleteCreateRequest(ctx context.Context, res // Get - Gets a batch inference endpoint by name. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Name for the Batch Endpoint. @@ -238,7 +239,7 @@ func (client *BatchEndpointsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,8 +255,7 @@ func (client *BatchEndpointsClient) getHandleResponse(resp *http.Response) (Batc } // NewListPager - Lists Batch inference endpoint in the workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - BatchEndpointsClientListOptions contains the optional parameters for the BatchEndpointsClient.List method. @@ -307,7 +307,7 @@ func (client *BatchEndpointsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -330,7 +330,7 @@ func (client *BatchEndpointsClient) listHandleResponse(resp *http.Response) (Bat // ListKeys - Lists batch Inference Endpoint keys. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference Endpoint name. @@ -374,7 +374,7 @@ func (client *BatchEndpointsClient) listKeysCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -391,7 +391,7 @@ func (client *BatchEndpointsClient) listKeysHandleResponse(resp *http.Response) // BeginUpdate - Update a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Name for the Batch inference endpoint. @@ -412,7 +412,7 @@ func (client *BatchEndpointsClient) BeginUpdate(ctx context.Context, resourceGro // Update - Update a batch inference endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *BatchEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *BatchEndpointsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, body, options) if err != nil { @@ -452,7 +452,7 @@ func (client *BatchEndpointsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_codecontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_codecontainers_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go index 3e4b88f73a5d..56cc8bec6b29 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_codecontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewCodeContainersClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -102,7 +103,7 @@ func (client *CodeContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -119,7 +120,7 @@ func (client *CodeContainersClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -163,7 +164,7 @@ func (client *CodeContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +172,7 @@ func (client *CodeContainersClient) deleteCreateRequest(ctx context.Context, res // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -215,7 +216,7 @@ func (client *CodeContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,8 +232,7 @@ func (client *CodeContainersClient) getHandleResponse(resp *http.Response) (Code } // NewListPager - List containers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - CodeContainersClientListOptions contains the optional parameters for the CodeContainersClient.List method. @@ -284,7 +284,7 @@ func (client *CodeContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_codeversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_codeversions_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go index e06a3619a594..f3e7cd40191f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_codeversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewCodeVersionsClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -108,7 +109,7 @@ func (client *CodeVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -125,7 +126,7 @@ func (client *CodeVersionsClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -174,7 +175,7 @@ func (client *CodeVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +183,7 @@ func (client *CodeVersionsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -231,7 +232,7 @@ func (client *CodeVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,8 +248,7 @@ func (client *CodeVersionsClient) getHandleResponse(resp *http.Response) (CodeVe } // NewListPager - List versions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -305,7 +305,7 @@ func (client *CodeVersionsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_componentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_componentcontainers_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go index 694ff37550eb..614ae166f47c 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_componentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewComponentContainersClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -102,7 +103,7 @@ func (client *ComponentContainersClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -119,7 +120,7 @@ func (client *ComponentContainersClient) createOrUpdateHandleResponse(resp *http // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -164,7 +165,7 @@ func (client *ComponentContainersClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +173,7 @@ func (client *ComponentContainersClient) deleteCreateRequest(ctx context.Context // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -216,7 +217,7 @@ func (client *ComponentContainersClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,8 +233,7 @@ func (client *ComponentContainersClient) getHandleResponse(resp *http.Response) } // NewListPager - List component containers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - ComponentContainersClientListOptions contains the optional parameters for the ComponentContainersClient.List @@ -286,7 +286,7 @@ func (client *ComponentContainersClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_componentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_componentversions_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go index 89df52ad7e2c..e8ea5011ddf3 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_componentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewComponentVersionsClient(subscriptionID string, credential azcore.TokenCr // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -108,7 +109,7 @@ func (client *ComponentVersionsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -125,7 +126,7 @@ func (client *ComponentVersionsClient) createOrUpdateHandleResponse(resp *http.R // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -175,7 +176,7 @@ func (client *ComponentVersionsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +184,7 @@ func (client *ComponentVersionsClient) deleteCreateRequest(ctx context.Context, // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -232,7 +233,7 @@ func (client *ComponentVersionsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,8 +249,7 @@ func (client *ComponentVersionsClient) getHandleResponse(resp *http.Response) (C } // NewListPager - List component versions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Component name. @@ -306,7 +306,7 @@ func (client *ComponentVersionsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_compute_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go similarity index 82% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_compute_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go index 1165e96ea011..14a628f63e64 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_compute_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -58,7 +59,7 @@ func NewComputeClient(subscriptionID string, credential azcore.TokenCredential, // operation. If your intent is to create a new compute, do a GET first to verify that it does not // exist yet. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -81,7 +82,7 @@ func (client *ComputeClient) BeginCreateOrUpdate(ctx context.Context, resourceGr // operation. If your intent is to create a new compute, do a GET first to verify that it does not // exist yet. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *ComputeClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource, options *ComputeClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, computeName, parameters, options) if err != nil { @@ -121,7 +122,7 @@ func (client *ComputeClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -129,7 +130,7 @@ func (client *ComputeClient) createOrUpdateCreateRequest(ctx context.Context, re // BeginDelete - Deletes specified Machine Learning compute. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -150,7 +151,7 @@ func (client *ComputeClient) BeginDelete(ctx context.Context, resourceGroupName // Delete - Deletes specified Machine Learning compute. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *ComputeClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction, options *ComputeClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, computeName, underlyingResourceAction, options) if err != nil { @@ -190,7 +191,7 @@ func (client *ComputeClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") reqQP.Set("underlyingResourceAction", string(underlyingResourceAction)) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -200,7 +201,7 @@ func (client *ComputeClient) deleteCreateRequest(ctx context.Context, resourceGr // Get - Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use // 'keys' nested resource to get them. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -244,7 +245,7 @@ func (client *ComputeClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,8 +261,7 @@ func (client *ComputeClient) getHandleResponse(resp *http.Response) (ComputeClie } // NewListPager - Gets computes in specified workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - ComputeClientListOptions contains the optional parameters for the ComputeClient.List method. @@ -313,7 +313,7 @@ func (client *ComputeClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -333,7 +333,7 @@ func (client *ComputeClient) listHandleResponse(resp *http.Response) (ComputeCli // ListKeys - Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -377,7 +377,7 @@ func (client *ComputeClient) listKeysCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -393,8 +393,7 @@ func (client *ComputeClient) listKeysHandleResponse(resp *http.Response) (Comput } // NewListNodesPager - Get the details (e.g IP address, port etc) of all the compute nodes in the compute. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -451,7 +450,7 @@ func (client *ComputeClient) listNodesCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -468,7 +467,7 @@ func (client *ComputeClient) listNodesHandleResponse(resp *http.Response) (Compu // BeginRestart - Posts a restart action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -487,7 +486,7 @@ func (client *ComputeClient) BeginRestart(ctx context.Context, resourceGroupName // Restart - Posts a restart action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *ComputeClient) restart(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginRestartOptions) (*http.Response, error) { req, err := client.restartCreateRequest(ctx, resourceGroupName, workspaceName, computeName, options) if err != nil { @@ -527,7 +526,7 @@ func (client *ComputeClient) restartCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -535,7 +534,7 @@ func (client *ComputeClient) restartCreateRequest(ctx context.Context, resourceG // BeginStart - Posts a start action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -554,7 +553,7 @@ func (client *ComputeClient) BeginStart(ctx context.Context, resourceGroupName s // Start - Posts a start action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *ComputeClient) start(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStartOptions) (*http.Response, error) { req, err := client.startCreateRequest(ctx, resourceGroupName, workspaceName, computeName, options) if err != nil { @@ -594,7 +593,7 @@ func (client *ComputeClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -602,7 +601,7 @@ func (client *ComputeClient) startCreateRequest(ctx context.Context, resourceGro // BeginStop - Posts a stop action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -621,7 +620,7 @@ func (client *ComputeClient) BeginStop(ctx context.Context, resourceGroupName st // Stop - Posts a stop action to a compute instance // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *ComputeClient) stop(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStopOptions) (*http.Response, error) { req, err := client.stopCreateRequest(ctx, resourceGroupName, workspaceName, computeName, options) if err != nil { @@ -661,7 +660,7 @@ func (client *ComputeClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -670,7 +669,7 @@ func (client *ComputeClient) stopCreateRequest(ctx context.Context, resourceGrou // BeginUpdate - Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable // operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // computeName - Name of the Azure Machine Learning compute. @@ -690,7 +689,7 @@ func (client *ComputeClient) BeginUpdate(ctx context.Context, resourceGroupName // Update - Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *ComputeClient) update(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters, options *ComputeClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, computeName, parameters, options) if err != nil { @@ -730,7 +729,115 @@ func (client *ComputeClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, parameters) +} + +// UpdateCustomServices - Updates the custom services list. The list of custom services provided shall be overwritten +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// computeName - Name of the Azure Machine Learning compute. +// customServices - New list of Custom Services. +// options - ComputeClientUpdateCustomServicesOptions contains the optional parameters for the ComputeClient.UpdateCustomServices +// method. +func (client *ComputeClient) UpdateCustomServices(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, customServices []*CustomService, options *ComputeClientUpdateCustomServicesOptions) (ComputeClientUpdateCustomServicesResponse, error) { + req, err := client.updateCustomServicesCreateRequest(ctx, resourceGroupName, workspaceName, computeName, customServices, options) + if err != nil { + return ComputeClientUpdateCustomServicesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ComputeClientUpdateCustomServicesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ComputeClientUpdateCustomServicesResponse{}, runtime.NewResponseError(resp) + } + return ComputeClientUpdateCustomServicesResponse{}, nil +} + +// updateCustomServicesCreateRequest creates the UpdateCustomServices request. +func (client *ComputeClient) updateCustomServicesCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, customServices []*CustomService, options *ComputeClientUpdateCustomServicesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if computeName == "" { + return nil, errors.New("parameter computeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{computeName}", url.PathEscape(computeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, customServices) +} + +// UpdateIdleShutdownSetting - Updates the idle shutdown setting of a compute instance. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// computeName - Name of the Azure Machine Learning compute. +// parameters - The object for updating idle shutdown setting of specified ComputeInstance. +// options - ComputeClientUpdateIdleShutdownSettingOptions contains the optional parameters for the ComputeClient.UpdateIdleShutdownSetting +// method. +func (client *ComputeClient) UpdateIdleShutdownSetting(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters IdleShutdownSetting, options *ComputeClientUpdateIdleShutdownSettingOptions) (ComputeClientUpdateIdleShutdownSettingResponse, error) { + req, err := client.updateIdleShutdownSettingCreateRequest(ctx, resourceGroupName, workspaceName, computeName, parameters, options) + if err != nil { + return ComputeClientUpdateIdleShutdownSettingResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ComputeClientUpdateIdleShutdownSettingResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ComputeClientUpdateIdleShutdownSettingResponse{}, runtime.NewResponseError(resp) + } + return ComputeClientUpdateIdleShutdownSettingResponse{}, nil +} + +// updateIdleShutdownSettingCreateRequest creates the UpdateIdleShutdownSetting request. +func (client *ComputeClient) updateIdleShutdownSettingCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters IdleShutdownSetting, options *ComputeClientUpdateIdleShutdownSettingOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if computeName == "" { + return nil, errors.New("parameter computeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{computeName}", url.PathEscape(computeName)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go b/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go new file mode 100644 index 000000000000..6f5b01a77324 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go @@ -0,0 +1,3014 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +const ( + moduleName = "armmachinelearning" + moduleVersion = "v3.0.0-beta.1" +) + +// AllocationState - Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. +// There are no changes to the number of compute nodes in the compute in progress. A compute +// enters this state when it is created and when no operations are being performed on the compute to change the number of +// compute nodes. resizing - Indicates that the compute is resizing; that is, +// compute nodes are being added to or removed from the compute. +type AllocationState string + +const ( + AllocationStateResizing AllocationState = "Resizing" + AllocationStateSteady AllocationState = "Steady" +) + +// PossibleAllocationStateValues returns the possible values for the AllocationState const type. +func PossibleAllocationStateValues() []AllocationState { + return []AllocationState{ + AllocationStateResizing, + AllocationStateSteady, + } +} + +// ApplicationSharingPolicy - 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. +type ApplicationSharingPolicy string + +const ( + ApplicationSharingPolicyPersonal ApplicationSharingPolicy = "Personal" + ApplicationSharingPolicyShared ApplicationSharingPolicy = "Shared" +) + +// PossibleApplicationSharingPolicyValues returns the possible values for the ApplicationSharingPolicy const type. +func PossibleApplicationSharingPolicyValues() []ApplicationSharingPolicy { + return []ApplicationSharingPolicy{ + ApplicationSharingPolicyPersonal, + ApplicationSharingPolicyShared, + } +} + +// AssetProvisioningState - Provisioning state of registry asset. +type AssetProvisioningState string + +const ( + AssetProvisioningStateCanceled AssetProvisioningState = "Canceled" + AssetProvisioningStateCreating AssetProvisioningState = "Creating" + AssetProvisioningStateDeleting AssetProvisioningState = "Deleting" + AssetProvisioningStateFailed AssetProvisioningState = "Failed" + AssetProvisioningStateSucceeded AssetProvisioningState = "Succeeded" + AssetProvisioningStateUpdating AssetProvisioningState = "Updating" +) + +// PossibleAssetProvisioningStateValues returns the possible values for the AssetProvisioningState const type. +func PossibleAssetProvisioningStateValues() []AssetProvisioningState { + return []AssetProvisioningState{ + AssetProvisioningStateCanceled, + AssetProvisioningStateCreating, + AssetProvisioningStateDeleting, + AssetProvisioningStateFailed, + AssetProvisioningStateSucceeded, + AssetProvisioningStateUpdating, + } +} + +// AutoRebuildSetting - AutoRebuild setting for the derived image +type AutoRebuildSetting string + +const ( + AutoRebuildSettingDisabled AutoRebuildSetting = "Disabled" + AutoRebuildSettingOnBaseImageUpdate AutoRebuildSetting = "OnBaseImageUpdate" +) + +// PossibleAutoRebuildSettingValues returns the possible values for the AutoRebuildSetting const type. +func PossibleAutoRebuildSettingValues() []AutoRebuildSetting { + return []AutoRebuildSetting{ + AutoRebuildSettingDisabled, + AutoRebuildSettingOnBaseImageUpdate, + } +} + +// Autosave - Auto save settings. +type Autosave string + +const ( + AutosaveLocal Autosave = "Local" + AutosaveNone Autosave = "None" + AutosaveRemote Autosave = "Remote" +) + +// PossibleAutosaveValues returns the possible values for the Autosave const type. +func PossibleAutosaveValues() []Autosave { + return []Autosave{ + AutosaveLocal, + AutosaveNone, + AutosaveRemote, + } +} + +// BatchLoggingLevel - Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and +// Debug. The default value is Info. +type BatchLoggingLevel string + +const ( + BatchLoggingLevelDebug BatchLoggingLevel = "Debug" + BatchLoggingLevelInfo BatchLoggingLevel = "Info" + BatchLoggingLevelWarning BatchLoggingLevel = "Warning" +) + +// PossibleBatchLoggingLevelValues returns the possible values for the BatchLoggingLevel const type. +func PossibleBatchLoggingLevelValues() []BatchLoggingLevel { + return []BatchLoggingLevel{ + BatchLoggingLevelDebug, + BatchLoggingLevelInfo, + BatchLoggingLevelWarning, + } +} + +// BatchOutputAction - Enum to determine how batch inferencing will handle output +type BatchOutputAction string + +const ( + BatchOutputActionAppendRow BatchOutputAction = "AppendRow" + BatchOutputActionSummaryOnly BatchOutputAction = "SummaryOnly" +) + +// PossibleBatchOutputActionValues returns the possible values for the BatchOutputAction const type. +func PossibleBatchOutputActionValues() []BatchOutputAction { + return []BatchOutputAction{ + BatchOutputActionAppendRow, + BatchOutputActionSummaryOnly, + } +} + +// BillingCurrency - Three lettered code specifying the currency of the VM price. Example: USD +type BillingCurrency string + +const ( + BillingCurrencyUSD BillingCurrency = "USD" +) + +// PossibleBillingCurrencyValues returns the possible values for the BillingCurrency const type. +func PossibleBillingCurrencyValues() []BillingCurrency { + return []BillingCurrency{ + BillingCurrencyUSD, + } +} + +// BlockedTransformers - Enum for all classification models supported by AutoML. +type BlockedTransformers string + +const ( + // BlockedTransformersCatTargetEncoder - Target encoding for categorical data. + BlockedTransformersCatTargetEncoder BlockedTransformers = "CatTargetEncoder" + // BlockedTransformersCountVectorizer - Count Vectorizer converts a collection of text documents to a matrix of token counts. + BlockedTransformersCountVectorizer BlockedTransformers = "CountVectorizer" + // BlockedTransformersHashOneHotEncoder - Hashing One Hot Encoder can turn categorical variables into a limited number of + // new features. This is often used for high-cardinality categorical features. + BlockedTransformersHashOneHotEncoder BlockedTransformers = "HashOneHotEncoder" + // BlockedTransformersLabelEncoder - Label encoder converts labels/categorical variables in a numerical form. + BlockedTransformersLabelEncoder BlockedTransformers = "LabelEncoder" + // BlockedTransformersNaiveBayes - Naive Bayes is a classified that is used for classification of discrete features that are + // categorically distributed. + BlockedTransformersNaiveBayes BlockedTransformers = "NaiveBayes" + // BlockedTransformersOneHotEncoder - Ohe hot encoding creates a binary feature transformation. + BlockedTransformersOneHotEncoder BlockedTransformers = "OneHotEncoder" + // BlockedTransformersTextTargetEncoder - Target encoding for text data. + BlockedTransformersTextTargetEncoder BlockedTransformers = "TextTargetEncoder" + // BlockedTransformersTfIdf - Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting + // scheme for identifying information from documents. + BlockedTransformersTfIdf BlockedTransformers = "TfIdf" + // BlockedTransformersWoETargetEncoder - Weight of Evidence encoding is a technique used to encode categorical variables. + // It uses the natural log of the P(1)/P(0) to create weights. + BlockedTransformersWoETargetEncoder BlockedTransformers = "WoETargetEncoder" + // BlockedTransformersWordEmbedding - Word embedding helps represents words or phrases as a vector, or a series of numbers. + BlockedTransformersWordEmbedding BlockedTransformers = "WordEmbedding" +) + +// PossibleBlockedTransformersValues returns the possible values for the BlockedTransformers const type. +func PossibleBlockedTransformersValues() []BlockedTransformers { + return []BlockedTransformers{ + BlockedTransformersCatTargetEncoder, + BlockedTransformersCountVectorizer, + BlockedTransformersHashOneHotEncoder, + BlockedTransformersLabelEncoder, + BlockedTransformersNaiveBayes, + BlockedTransformersOneHotEncoder, + BlockedTransformersTextTargetEncoder, + BlockedTransformersTfIdf, + BlockedTransformersWoETargetEncoder, + BlockedTransformersWordEmbedding, + } +} + +// Caching - Caching type of Data Disk. +type Caching string + +const ( + CachingNone Caching = "None" + CachingReadOnly Caching = "ReadOnly" + CachingReadWrite Caching = "ReadWrite" +) + +// PossibleCachingValues returns the possible values for the Caching const type. +func PossibleCachingValues() []Caching { + return []Caching{ + CachingNone, + CachingReadOnly, + CachingReadWrite, + } +} + +// ClassificationModels - Enum for all classification models supported by AutoML. +type ClassificationModels string + +const ( + // ClassificationModelsBernoulliNaiveBayes - Naive Bayes classifier for multivariate Bernoulli models. + ClassificationModelsBernoulliNaiveBayes ClassificationModels = "BernoulliNaiveBayes" + // ClassificationModelsDecisionTree - Decision Trees are a non-parametric supervised learning method used for both classification + // and regression tasks. + // The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from + // the data features. + ClassificationModelsDecisionTree ClassificationModels = "DecisionTree" + // ClassificationModelsExtremeRandomTrees - Extreme Trees is an ensemble machine learning algorithm that combines the predictions + // from many decision trees. It is related to the widely used random forest algorithm. + ClassificationModelsExtremeRandomTrees ClassificationModels = "ExtremeRandomTrees" + // ClassificationModelsGradientBoosting - The technique of transiting week learners into a strong learner is called Boosting. + // The gradient boosting algorithm process works on this theory of execution. + ClassificationModelsGradientBoosting ClassificationModels = "GradientBoosting" + // ClassificationModelsKNN - K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + // which further means that the new data point will be assigned a value based on how closely it matches the points in the + // training set. + ClassificationModelsKNN ClassificationModels = "KNN" + // ClassificationModelsLightGBM - LightGBM is a gradient boosting framework that uses tree based learning algorithms. + ClassificationModelsLightGBM ClassificationModels = "LightGBM" + // ClassificationModelsLinearSVM - A support vector machine (SVM) is a supervised machine learning model that uses classification + // algorithms for two-group classification problems. + // After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. + // Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between + // classified values on a plotted graph. + ClassificationModelsLinearSVM ClassificationModels = "LinearSVM" + // ClassificationModelsLogisticRegression - Logistic regression is a fundamental classification technique. + // It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. + // Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. + // Although it's essentially a method for binary classification, it can also be applied to multiclass problems. + ClassificationModelsLogisticRegression ClassificationModels = "LogisticRegression" + // ClassificationModelsMultinomialNaiveBayes - The multinomial Naive Bayes classifier is suitable for classification with + // discrete features (e.g., word counts for text classification). + // The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as + // tf-idf may also work. + ClassificationModelsMultinomialNaiveBayes ClassificationModels = "MultinomialNaiveBayes" + // ClassificationModelsRandomForest - Random forest is a supervised learning algorithm. + // 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. + ClassificationModelsRandomForest ClassificationModels = "RandomForest" + // ClassificationModelsSGD - SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning + // applications + // to find the model parameters that correspond to the best fit between predicted and actual outputs. + ClassificationModelsSGD ClassificationModels = "SGD" + // ClassificationModelsSVM - A support vector machine (SVM) is a supervised machine learning model that uses classification + // algorithms for two-group classification problems. + // After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. + ClassificationModelsSVM ClassificationModels = "SVM" + // ClassificationModelsXGBoostClassifier - XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured + // data where target column values can be divided into distinct class values. + ClassificationModelsXGBoostClassifier ClassificationModels = "XGBoostClassifier" +) + +// PossibleClassificationModelsValues returns the possible values for the ClassificationModels const type. +func PossibleClassificationModelsValues() []ClassificationModels { + return []ClassificationModels{ + ClassificationModelsBernoulliNaiveBayes, + ClassificationModelsDecisionTree, + ClassificationModelsExtremeRandomTrees, + ClassificationModelsGradientBoosting, + ClassificationModelsKNN, + ClassificationModelsLightGBM, + ClassificationModelsLinearSVM, + ClassificationModelsLogisticRegression, + ClassificationModelsMultinomialNaiveBayes, + ClassificationModelsRandomForest, + ClassificationModelsSGD, + ClassificationModelsSVM, + ClassificationModelsXGBoostClassifier, + } +} + +// ClassificationMultilabelPrimaryMetrics - Primary metrics for classification multilabel tasks. +type ClassificationMultilabelPrimaryMetrics string + +const ( + // ClassificationMultilabelPrimaryMetricsAUCWeighted - AUC is the Area under the curve. + // This metric represents arithmetic mean of the score for each class, + // weighted by the number of true instances in each class. + ClassificationMultilabelPrimaryMetricsAUCWeighted ClassificationMultilabelPrimaryMetrics = "AUCWeighted" + // ClassificationMultilabelPrimaryMetricsAccuracy - Accuracy is the ratio of predictions that exactly match the true class + // labels. + ClassificationMultilabelPrimaryMetricsAccuracy ClassificationMultilabelPrimaryMetrics = "Accuracy" + // ClassificationMultilabelPrimaryMetricsAveragePrecisionScoreWeighted - The arithmetic mean of the average precision score + // for each class, weighted by + // the number of true instances in each class. + ClassificationMultilabelPrimaryMetricsAveragePrecisionScoreWeighted ClassificationMultilabelPrimaryMetrics = "AveragePrecisionScoreWeighted" + // ClassificationMultilabelPrimaryMetricsIOU - Intersection Over Union. Intersection of predictions divided by union of predictions. + ClassificationMultilabelPrimaryMetricsIOU ClassificationMultilabelPrimaryMetrics = "IOU" + // ClassificationMultilabelPrimaryMetricsNormMacroRecall - Normalized macro recall is recall macro-averaged and normalized, + // so that random + // performance has a score of 0, and perfect performance has a score of 1. + ClassificationMultilabelPrimaryMetricsNormMacroRecall ClassificationMultilabelPrimaryMetrics = "NormMacroRecall" + // ClassificationMultilabelPrimaryMetricsPrecisionScoreWeighted - The arithmetic mean of precision for each class, weighted + // by number of true instances in each class. + ClassificationMultilabelPrimaryMetricsPrecisionScoreWeighted ClassificationMultilabelPrimaryMetrics = "PrecisionScoreWeighted" +) + +// PossibleClassificationMultilabelPrimaryMetricsValues returns the possible values for the ClassificationMultilabelPrimaryMetrics const type. +func PossibleClassificationMultilabelPrimaryMetricsValues() []ClassificationMultilabelPrimaryMetrics { + return []ClassificationMultilabelPrimaryMetrics{ + ClassificationMultilabelPrimaryMetricsAUCWeighted, + ClassificationMultilabelPrimaryMetricsAccuracy, + ClassificationMultilabelPrimaryMetricsAveragePrecisionScoreWeighted, + ClassificationMultilabelPrimaryMetricsIOU, + ClassificationMultilabelPrimaryMetricsNormMacroRecall, + ClassificationMultilabelPrimaryMetricsPrecisionScoreWeighted, + } +} + +// ClassificationPrimaryMetrics - Primary metrics for classification tasks. +type ClassificationPrimaryMetrics string + +const ( + // ClassificationPrimaryMetricsAUCWeighted - AUC is the Area under the curve. + // This metric represents arithmetic mean of the score for each class, + // weighted by the number of true instances in each class. + ClassificationPrimaryMetricsAUCWeighted ClassificationPrimaryMetrics = "AUCWeighted" + // ClassificationPrimaryMetricsAccuracy - Accuracy is the ratio of predictions that exactly match the true class labels. + ClassificationPrimaryMetricsAccuracy ClassificationPrimaryMetrics = "Accuracy" + // ClassificationPrimaryMetricsAveragePrecisionScoreWeighted - The arithmetic mean of the average precision score for each + // class, weighted by + // the number of true instances in each class. + ClassificationPrimaryMetricsAveragePrecisionScoreWeighted ClassificationPrimaryMetrics = "AveragePrecisionScoreWeighted" + // ClassificationPrimaryMetricsNormMacroRecall - Normalized macro recall is recall macro-averaged and normalized, so that + // random + // performance has a score of 0, and perfect performance has a score of 1. + ClassificationPrimaryMetricsNormMacroRecall ClassificationPrimaryMetrics = "NormMacroRecall" + // ClassificationPrimaryMetricsPrecisionScoreWeighted - The arithmetic mean of precision for each class, weighted by number + // of true instances in each class. + ClassificationPrimaryMetricsPrecisionScoreWeighted ClassificationPrimaryMetrics = "PrecisionScoreWeighted" +) + +// PossibleClassificationPrimaryMetricsValues returns the possible values for the ClassificationPrimaryMetrics const type. +func PossibleClassificationPrimaryMetricsValues() []ClassificationPrimaryMetrics { + return []ClassificationPrimaryMetrics{ + ClassificationPrimaryMetricsAUCWeighted, + ClassificationPrimaryMetricsAccuracy, + ClassificationPrimaryMetricsAveragePrecisionScoreWeighted, + ClassificationPrimaryMetricsNormMacroRecall, + ClassificationPrimaryMetricsPrecisionScoreWeighted, + } +} + +// ClusterPurpose - Intended usage of the cluster +type ClusterPurpose string + +const ( + ClusterPurposeDenseProd ClusterPurpose = "DenseProd" + ClusterPurposeDevTest ClusterPurpose = "DevTest" + ClusterPurposeFastProd ClusterPurpose = "FastProd" +) + +// PossibleClusterPurposeValues returns the possible values for the ClusterPurpose const type. +func PossibleClusterPurposeValues() []ClusterPurpose { + return []ClusterPurpose{ + ClusterPurposeDenseProd, + ClusterPurposeDevTest, + ClusterPurposeFastProd, + } +} + +// ComputeInstanceAuthorizationType - The Compute Instance Authorization type. Available values are personal (default). +type ComputeInstanceAuthorizationType string + +const ( + ComputeInstanceAuthorizationTypePersonal ComputeInstanceAuthorizationType = "personal" +) + +// PossibleComputeInstanceAuthorizationTypeValues returns the possible values for the ComputeInstanceAuthorizationType const type. +func PossibleComputeInstanceAuthorizationTypeValues() []ComputeInstanceAuthorizationType { + return []ComputeInstanceAuthorizationType{ + ComputeInstanceAuthorizationTypePersonal, + } +} + +// ComputeInstanceState - Current state of an ComputeInstance. +type ComputeInstanceState string + +const ( + ComputeInstanceStateCreateFailed ComputeInstanceState = "CreateFailed" + ComputeInstanceStateCreating ComputeInstanceState = "Creating" + ComputeInstanceStateDeleting ComputeInstanceState = "Deleting" + ComputeInstanceStateJobRunning ComputeInstanceState = "JobRunning" + ComputeInstanceStateRestarting ComputeInstanceState = "Restarting" + ComputeInstanceStateRunning ComputeInstanceState = "Running" + ComputeInstanceStateSettingUp ComputeInstanceState = "SettingUp" + ComputeInstanceStateSetupFailed ComputeInstanceState = "SetupFailed" + ComputeInstanceStateStarting ComputeInstanceState = "Starting" + ComputeInstanceStateStopped ComputeInstanceState = "Stopped" + ComputeInstanceStateStopping ComputeInstanceState = "Stopping" + ComputeInstanceStateUnknown ComputeInstanceState = "Unknown" + ComputeInstanceStateUnusable ComputeInstanceState = "Unusable" + ComputeInstanceStateUserSettingUp ComputeInstanceState = "UserSettingUp" + ComputeInstanceStateUserSetupFailed ComputeInstanceState = "UserSetupFailed" +) + +// PossibleComputeInstanceStateValues returns the possible values for the ComputeInstanceState const type. +func PossibleComputeInstanceStateValues() []ComputeInstanceState { + return []ComputeInstanceState{ + ComputeInstanceStateCreateFailed, + ComputeInstanceStateCreating, + ComputeInstanceStateDeleting, + ComputeInstanceStateJobRunning, + ComputeInstanceStateRestarting, + ComputeInstanceStateRunning, + ComputeInstanceStateSettingUp, + ComputeInstanceStateSetupFailed, + ComputeInstanceStateStarting, + ComputeInstanceStateStopped, + ComputeInstanceStateStopping, + ComputeInstanceStateUnknown, + ComputeInstanceStateUnusable, + ComputeInstanceStateUserSettingUp, + ComputeInstanceStateUserSetupFailed, + } +} + +// ComputePowerAction - [Required] The compute power action. +type ComputePowerAction string + +const ( + ComputePowerActionStart ComputePowerAction = "Start" + ComputePowerActionStop ComputePowerAction = "Stop" +) + +// PossibleComputePowerActionValues returns the possible values for the ComputePowerAction const type. +func PossibleComputePowerActionValues() []ComputePowerAction { + return []ComputePowerAction{ + ComputePowerActionStart, + ComputePowerActionStop, + } +} + +// ComputeProvisioningState - The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, +// and Failed. +type ComputeProvisioningState string + +const ( + ComputeProvisioningStateCanceled ComputeProvisioningState = "Canceled" + ComputeProvisioningStateCreating ComputeProvisioningState = "Creating" + ComputeProvisioningStateDeleting ComputeProvisioningState = "Deleting" + ComputeProvisioningStateFailed ComputeProvisioningState = "Failed" + ComputeProvisioningStateSucceeded ComputeProvisioningState = "Succeeded" + ComputeProvisioningStateUnknown ComputeProvisioningState = "Unknown" + ComputeProvisioningStateUpdating ComputeProvisioningState = "Updating" +) + +// PossibleComputeProvisioningStateValues returns the possible values for the ComputeProvisioningState const type. +func PossibleComputeProvisioningStateValues() []ComputeProvisioningState { + return []ComputeProvisioningState{ + ComputeProvisioningStateCanceled, + ComputeProvisioningStateCreating, + ComputeProvisioningStateDeleting, + ComputeProvisioningStateFailed, + ComputeProvisioningStateSucceeded, + ComputeProvisioningStateUnknown, + ComputeProvisioningStateUpdating, + } +} + +// ComputeType - The type of compute +type ComputeType string + +const ( + ComputeTypeAKS ComputeType = "AKS" + ComputeTypeAmlCompute ComputeType = "AmlCompute" + ComputeTypeComputeInstance ComputeType = "ComputeInstance" + ComputeTypeDataFactory ComputeType = "DataFactory" + ComputeTypeDataLakeAnalytics ComputeType = "DataLakeAnalytics" + ComputeTypeDatabricks ComputeType = "Databricks" + ComputeTypeHDInsight ComputeType = "HDInsight" + ComputeTypeKubernetes ComputeType = "Kubernetes" + ComputeTypeSynapseSpark ComputeType = "SynapseSpark" + ComputeTypeVirtualMachine ComputeType = "VirtualMachine" +) + +// PossibleComputeTypeValues returns the possible values for the ComputeType const type. +func PossibleComputeTypeValues() []ComputeType { + return []ComputeType{ + ComputeTypeAKS, + ComputeTypeAmlCompute, + ComputeTypeComputeInstance, + ComputeTypeDataFactory, + ComputeTypeDataLakeAnalytics, + ComputeTypeDatabricks, + ComputeTypeHDInsight, + ComputeTypeKubernetes, + ComputeTypeSynapseSpark, + ComputeTypeVirtualMachine, + } +} + +// ConnectionAuthType - Authentication type of the connection target +type ConnectionAuthType string + +const ( + ConnectionAuthTypeAccessKey ConnectionAuthType = "AccessKey" + ConnectionAuthTypeManagedIdentity ConnectionAuthType = "ManagedIdentity" + ConnectionAuthTypeNone ConnectionAuthType = "None" + ConnectionAuthTypePAT ConnectionAuthType = "PAT" + ConnectionAuthTypeSAS ConnectionAuthType = "SAS" + ConnectionAuthTypeServicePrincipal ConnectionAuthType = "ServicePrincipal" + ConnectionAuthTypeUsernamePassword ConnectionAuthType = "UsernamePassword" +) + +// PossibleConnectionAuthTypeValues returns the possible values for the ConnectionAuthType const type. +func PossibleConnectionAuthTypeValues() []ConnectionAuthType { + return []ConnectionAuthType{ + ConnectionAuthTypeAccessKey, + ConnectionAuthTypeManagedIdentity, + ConnectionAuthTypeNone, + ConnectionAuthTypePAT, + ConnectionAuthTypeSAS, + ConnectionAuthTypeServicePrincipal, + ConnectionAuthTypeUsernamePassword, + } +} + +// ContainerType - The type of container to retrieve logs from. +type ContainerType string + +const ( + // ContainerTypeInferenceServer - The container used to serve user's request. + ContainerTypeInferenceServer ContainerType = "InferenceServer" + // ContainerTypeModelDataCollector - The container used to collect payload and custom logging when mdc is enabled. + ContainerTypeModelDataCollector ContainerType = "ModelDataCollector" + // ContainerTypeStorageInitializer - The container used to download models and score script. + ContainerTypeStorageInitializer ContainerType = "StorageInitializer" +) + +// PossibleContainerTypeValues returns the possible values for the ContainerType const type. +func PossibleContainerTypeValues() []ContainerType { + return []ContainerType{ + ContainerTypeInferenceServer, + ContainerTypeModelDataCollector, + ContainerTypeStorageInitializer, + } +} + +// CreatedByType - The type of identity that created the resource. +type CreatedByType string + +const ( + CreatedByTypeApplication CreatedByType = "Application" + CreatedByTypeKey CreatedByType = "Key" + CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" + CreatedByTypeUser CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{ + CreatedByTypeApplication, + CreatedByTypeKey, + CreatedByTypeManagedIdentity, + CreatedByTypeUser, + } +} + +// CredentialsType - Enum to determine the datastore credentials type. +type CredentialsType string + +const ( + CredentialsTypeAccountKey CredentialsType = "AccountKey" + CredentialsTypeCertificate CredentialsType = "Certificate" + CredentialsTypeKerberosKeytab CredentialsType = "KerberosKeytab" + CredentialsTypeKerberosPassword CredentialsType = "KerberosPassword" + CredentialsTypeNone CredentialsType = "None" + CredentialsTypeSas CredentialsType = "Sas" + CredentialsTypeServicePrincipal CredentialsType = "ServicePrincipal" +) + +// PossibleCredentialsTypeValues returns the possible values for the CredentialsType const type. +func PossibleCredentialsTypeValues() []CredentialsType { + return []CredentialsType{ + CredentialsTypeAccountKey, + CredentialsTypeCertificate, + CredentialsTypeKerberosKeytab, + CredentialsTypeKerberosPassword, + CredentialsTypeNone, + CredentialsTypeSas, + CredentialsTypeServicePrincipal, + } +} + +// DataType - Enum to determine the type of data. +type DataType string + +const ( + DataTypeMltable DataType = "mltable" + DataTypeURIFile DataType = "uri_file" + DataTypeURIFolder DataType = "uri_folder" +) + +// PossibleDataTypeValues returns the possible values for the DataType const type. +func PossibleDataTypeValues() []DataType { + return []DataType{ + DataTypeMltable, + DataTypeURIFile, + DataTypeURIFolder, + } +} + +// DatastoreType - Enum to determine the datastore contents type. +type DatastoreType string + +const ( + DatastoreTypeAzureBlob DatastoreType = "AzureBlob" + DatastoreTypeAzureDataLakeGen1 DatastoreType = "AzureDataLakeGen1" + DatastoreTypeAzureDataLakeGen2 DatastoreType = "AzureDataLakeGen2" + DatastoreTypeAzureFile DatastoreType = "AzureFile" + DatastoreTypeHdfs DatastoreType = "Hdfs" +) + +// PossibleDatastoreTypeValues returns the possible values for the DatastoreType const type. +func PossibleDatastoreTypeValues() []DatastoreType { + return []DatastoreType{ + DatastoreTypeAzureBlob, + DatastoreTypeAzureDataLakeGen1, + DatastoreTypeAzureDataLakeGen2, + DatastoreTypeAzureFile, + DatastoreTypeHdfs, + } +} + +// DeploymentProvisioningState - Possible values for DeploymentProvisioningState. +type DeploymentProvisioningState string + +const ( + DeploymentProvisioningStateCanceled DeploymentProvisioningState = "Canceled" + DeploymentProvisioningStateCreating DeploymentProvisioningState = "Creating" + DeploymentProvisioningStateDeleting DeploymentProvisioningState = "Deleting" + DeploymentProvisioningStateFailed DeploymentProvisioningState = "Failed" + DeploymentProvisioningStateScaling DeploymentProvisioningState = "Scaling" + DeploymentProvisioningStateSucceeded DeploymentProvisioningState = "Succeeded" + DeploymentProvisioningStateUpdating DeploymentProvisioningState = "Updating" +) + +// PossibleDeploymentProvisioningStateValues returns the possible values for the DeploymentProvisioningState const type. +func PossibleDeploymentProvisioningStateValues() []DeploymentProvisioningState { + return []DeploymentProvisioningState{ + DeploymentProvisioningStateCanceled, + DeploymentProvisioningStateCreating, + DeploymentProvisioningStateDeleting, + DeploymentProvisioningStateFailed, + DeploymentProvisioningStateScaling, + DeploymentProvisioningStateSucceeded, + DeploymentProvisioningStateUpdating, + } +} + +// DiagnoseResultLevel - Level of workspace setup error +type DiagnoseResultLevel string + +const ( + DiagnoseResultLevelError DiagnoseResultLevel = "Error" + DiagnoseResultLevelInformation DiagnoseResultLevel = "Information" + DiagnoseResultLevelWarning DiagnoseResultLevel = "Warning" +) + +// PossibleDiagnoseResultLevelValues returns the possible values for the DiagnoseResultLevel const type. +func PossibleDiagnoseResultLevelValues() []DiagnoseResultLevel { + return []DiagnoseResultLevel{ + DiagnoseResultLevelError, + DiagnoseResultLevelInformation, + DiagnoseResultLevelWarning, + } +} + +// DistributionType - Enum to determine the job distribution type. +type DistributionType string + +const ( + DistributionTypeMpi DistributionType = "Mpi" + DistributionTypePyTorch DistributionType = "PyTorch" + DistributionTypeTensorFlow DistributionType = "TensorFlow" +) + +// PossibleDistributionTypeValues returns the possible values for the DistributionType const type. +func PossibleDistributionTypeValues() []DistributionType { + return []DistributionType{ + DistributionTypeMpi, + DistributionTypePyTorch, + DistributionTypeTensorFlow, + } +} + +type EarlyTerminationPolicyType string + +const ( + EarlyTerminationPolicyTypeBandit EarlyTerminationPolicyType = "Bandit" + EarlyTerminationPolicyTypeMedianStopping EarlyTerminationPolicyType = "MedianStopping" + EarlyTerminationPolicyTypeTruncationSelection EarlyTerminationPolicyType = "TruncationSelection" +) + +// PossibleEarlyTerminationPolicyTypeValues returns the possible values for the EarlyTerminationPolicyType const type. +func PossibleEarlyTerminationPolicyTypeValues() []EarlyTerminationPolicyType { + return []EarlyTerminationPolicyType{ + EarlyTerminationPolicyTypeBandit, + EarlyTerminationPolicyTypeMedianStopping, + EarlyTerminationPolicyTypeTruncationSelection, + } +} + +// EgressPublicNetworkAccessType - Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. +type EgressPublicNetworkAccessType string + +const ( + EgressPublicNetworkAccessTypeDisabled EgressPublicNetworkAccessType = "Disabled" + EgressPublicNetworkAccessTypeEnabled EgressPublicNetworkAccessType = "Enabled" +) + +// PossibleEgressPublicNetworkAccessTypeValues returns the possible values for the EgressPublicNetworkAccessType const type. +func PossibleEgressPublicNetworkAccessTypeValues() []EgressPublicNetworkAccessType { + return []EgressPublicNetworkAccessType{ + EgressPublicNetworkAccessTypeDisabled, + EgressPublicNetworkAccessTypeEnabled, + } +} + +// EncryptionStatus - Indicates whether or not the encryption is enabled for the workspace. +type EncryptionStatus string + +const ( + EncryptionStatusDisabled EncryptionStatus = "Disabled" + EncryptionStatusEnabled EncryptionStatus = "Enabled" +) + +// PossibleEncryptionStatusValues returns the possible values for the EncryptionStatus const type. +func PossibleEncryptionStatusValues() []EncryptionStatus { + return []EncryptionStatus{ + EncryptionStatusDisabled, + EncryptionStatusEnabled, + } +} + +// EndpointAuthMode - Enum to determine endpoint authentication mode. +type EndpointAuthMode string + +const ( + EndpointAuthModeAADToken EndpointAuthMode = "AADToken" + EndpointAuthModeAMLToken EndpointAuthMode = "AMLToken" + EndpointAuthModeKey EndpointAuthMode = "Key" +) + +// PossibleEndpointAuthModeValues returns the possible values for the EndpointAuthMode const type. +func PossibleEndpointAuthModeValues() []EndpointAuthMode { + return []EndpointAuthMode{ + EndpointAuthModeAADToken, + EndpointAuthModeAMLToken, + EndpointAuthModeKey, + } +} + +// EndpointComputeType - Enum to determine endpoint compute type. +type EndpointComputeType string + +const ( + EndpointComputeTypeAzureMLCompute EndpointComputeType = "AzureMLCompute" + EndpointComputeTypeKubernetes EndpointComputeType = "Kubernetes" + EndpointComputeTypeManaged EndpointComputeType = "Managed" +) + +// PossibleEndpointComputeTypeValues returns the possible values for the EndpointComputeType const type. +func PossibleEndpointComputeTypeValues() []EndpointComputeType { + return []EndpointComputeType{ + EndpointComputeTypeAzureMLCompute, + EndpointComputeTypeKubernetes, + EndpointComputeTypeManaged, + } +} + +// EndpointProvisioningState - State of endpoint provisioning. +type EndpointProvisioningState string + +const ( + EndpointProvisioningStateCanceled EndpointProvisioningState = "Canceled" + EndpointProvisioningStateCreating EndpointProvisioningState = "Creating" + EndpointProvisioningStateDeleting EndpointProvisioningState = "Deleting" + EndpointProvisioningStateFailed EndpointProvisioningState = "Failed" + EndpointProvisioningStateSucceeded EndpointProvisioningState = "Succeeded" + EndpointProvisioningStateUpdating EndpointProvisioningState = "Updating" +) + +// PossibleEndpointProvisioningStateValues returns the possible values for the EndpointProvisioningState const type. +func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState { + return []EndpointProvisioningState{ + EndpointProvisioningStateCanceled, + EndpointProvisioningStateCreating, + EndpointProvisioningStateDeleting, + EndpointProvisioningStateFailed, + EndpointProvisioningStateSucceeded, + EndpointProvisioningStateUpdating, + } +} + +// EnvironmentType - Environment type is either user created or curated by Azure ML service +type EnvironmentType string + +const ( + EnvironmentTypeCurated EnvironmentType = "Curated" + EnvironmentTypeUserCreated EnvironmentType = "UserCreated" +) + +// PossibleEnvironmentTypeValues returns the possible values for the EnvironmentType const type. +func PossibleEnvironmentTypeValues() []EnvironmentType { + return []EnvironmentType{ + EnvironmentTypeCurated, + EnvironmentTypeUserCreated, + } +} + +// EnvironmentVariableType - Type of the Environment Variable. Possible values are: local - For local variable +type EnvironmentVariableType string + +const ( + EnvironmentVariableTypeLocal EnvironmentVariableType = "local" +) + +// PossibleEnvironmentVariableTypeValues returns the possible values for the EnvironmentVariableType const type. +func PossibleEnvironmentVariableTypeValues() []EnvironmentVariableType { + return []EnvironmentVariableType{ + EnvironmentVariableTypeLocal, + } +} + +// ExportFormatType - The format of exported labels. +type ExportFormatType string + +const ( + ExportFormatTypeCSV ExportFormatType = "CSV" + ExportFormatTypeCoco ExportFormatType = "Coco" + ExportFormatTypeDataset ExportFormatType = "Dataset" +) + +// PossibleExportFormatTypeValues returns the possible values for the ExportFormatType const type. +func PossibleExportFormatTypeValues() []ExportFormatType { + return []ExportFormatType{ + ExportFormatTypeCSV, + ExportFormatTypeCoco, + ExportFormatTypeDataset, + } +} + +// FeatureLags - Flag for generating lags for the numeric features. +type FeatureLags string + +const ( + // FeatureLagsAuto - System auto-generates feature lags. + FeatureLagsAuto FeatureLags = "Auto" + // FeatureLagsNone - No feature lags generated. + FeatureLagsNone FeatureLags = "None" +) + +// PossibleFeatureLagsValues returns the possible values for the FeatureLags const type. +func PossibleFeatureLagsValues() []FeatureLags { + return []FeatureLags{ + FeatureLagsAuto, + FeatureLagsNone, + } +} + +// FeaturizationMode - Featurization mode - determines data featurization mode. +type FeaturizationMode string + +const ( + // FeaturizationModeAuto - Auto mode, system performs featurization without any custom featurization inputs. + FeaturizationModeAuto FeaturizationMode = "Auto" + // FeaturizationModeCustom - Custom featurization. + FeaturizationModeCustom FeaturizationMode = "Custom" + // FeaturizationModeOff - Featurization off. 'Forecasting' task cannot use this value. + FeaturizationModeOff FeaturizationMode = "Off" +) + +// PossibleFeaturizationModeValues returns the possible values for the FeaturizationMode const type. +func PossibleFeaturizationModeValues() []FeaturizationMode { + return []FeaturizationMode{ + FeaturizationModeAuto, + FeaturizationModeCustom, + FeaturizationModeOff, + } +} + +// ForecastHorizonMode - Enum to determine forecast horizon selection mode. +type ForecastHorizonMode string + +const ( + // ForecastHorizonModeAuto - Forecast horizon to be determined automatically. + ForecastHorizonModeAuto ForecastHorizonMode = "Auto" + // ForecastHorizonModeCustom - Use the custom forecast horizon. + ForecastHorizonModeCustom ForecastHorizonMode = "Custom" +) + +// PossibleForecastHorizonModeValues returns the possible values for the ForecastHorizonMode const type. +func PossibleForecastHorizonModeValues() []ForecastHorizonMode { + return []ForecastHorizonMode{ + ForecastHorizonModeAuto, + ForecastHorizonModeCustom, + } +} + +// ForecastingModels - Enum for all forecasting models supported by AutoML. +type ForecastingModels string + +const ( + // ForecastingModelsArimax - An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed + // as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. + // This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data + // pattern, i.e., level/trend /seasonality/cyclicity. + ForecastingModelsArimax ForecastingModels = "Arimax" + // ForecastingModelsAutoArima - Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical + // analysis to interpret the data and make future predictions. + // This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. + ForecastingModelsAutoArima ForecastingModels = "AutoArima" + // ForecastingModelsAverage - The Average forecasting model makes predictions by carrying forward the average of the target + // values for each time-series in the training data. + ForecastingModelsAverage ForecastingModels = "Average" + // ForecastingModelsDecisionTree - Decision Trees are a non-parametric supervised learning method used for both classification + // and regression tasks. + // The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from + // the data features. + ForecastingModelsDecisionTree ForecastingModels = "DecisionTree" + // ForecastingModelsElasticNet - Elastic net is a popular type of regularized linear regression that combines two popular + // penalties, specifically the L1 and L2 penalty functions. + ForecastingModelsElasticNet ForecastingModels = "ElasticNet" + // ForecastingModelsExponentialSmoothing - Exponential smoothing is a time series forecasting method for univariate data that + // can be extended to support data with a systematic trend or seasonal component. + ForecastingModelsExponentialSmoothing ForecastingModels = "ExponentialSmoothing" + // ForecastingModelsExtremeRandomTrees - Extreme Trees is an ensemble machine learning algorithm that combines the predictions + // from many decision trees. It is related to the widely used random forest algorithm. + ForecastingModelsExtremeRandomTrees ForecastingModels = "ExtremeRandomTrees" + // ForecastingModelsGradientBoosting - The technique of transiting week learners into a strong learner is called Boosting. + // The gradient boosting algorithm process works on this theory of execution. + ForecastingModelsGradientBoosting ForecastingModels = "GradientBoosting" + // ForecastingModelsKNN - K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + // which further means that the new data point will be assigned a value based on how closely it matches the points in the + // training set. + ForecastingModelsKNN ForecastingModels = "KNN" + // ForecastingModelsLassoLars - Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with + // an L1 prior as regularizer. + ForecastingModelsLassoLars ForecastingModels = "LassoLars" + // ForecastingModelsLightGBM - LightGBM is a gradient boosting framework that uses tree based learning algorithms. + ForecastingModelsLightGBM ForecastingModels = "LightGBM" + // ForecastingModelsNaive - The Naive forecasting model makes predictions by carrying forward the latest target value for + // each time-series in the training data. + ForecastingModelsNaive ForecastingModels = "Naive" + // ForecastingModelsProphet - Prophet is a procedure for forecasting time series data based on an additive model where non-linear + // trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. + // It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust + // to missing data and shifts in the trend, and typically handles outliers well. + ForecastingModelsProphet ForecastingModels = "Prophet" + // ForecastingModelsRandomForest - Random forest is a supervised learning algorithm. + // 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. + ForecastingModelsRandomForest ForecastingModels = "RandomForest" + // ForecastingModelsSGD - SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + // to find the model parameters that correspond to the best fit between predicted and actual outputs. + // It's an inexact but powerful technique. + ForecastingModelsSGD ForecastingModels = "SGD" + // ForecastingModelsSeasonalAverage - The Seasonal Average forecasting model makes predictions by carrying forward the average + // value of the latest season of data for each time-series in the training data. + ForecastingModelsSeasonalAverage ForecastingModels = "SeasonalAverage" + // ForecastingModelsSeasonalNaive - The Seasonal Naive forecasting model makes predictions by carrying forward the latest + // season of target values for each time-series in the training data. + ForecastingModelsSeasonalNaive ForecastingModels = "SeasonalNaive" + // ForecastingModelsTCNForecaster - TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team + // for brief intro. + ForecastingModelsTCNForecaster ForecastingModels = "TCNForecaster" + // ForecastingModelsXGBoostRegressor - XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning + // model using ensemble of base learners. + ForecastingModelsXGBoostRegressor ForecastingModels = "XGBoostRegressor" +) + +// PossibleForecastingModelsValues returns the possible values for the ForecastingModels const type. +func PossibleForecastingModelsValues() []ForecastingModels { + return []ForecastingModels{ + ForecastingModelsArimax, + ForecastingModelsAutoArima, + ForecastingModelsAverage, + ForecastingModelsDecisionTree, + ForecastingModelsElasticNet, + ForecastingModelsExponentialSmoothing, + ForecastingModelsExtremeRandomTrees, + ForecastingModelsGradientBoosting, + ForecastingModelsKNN, + ForecastingModelsLassoLars, + ForecastingModelsLightGBM, + ForecastingModelsNaive, + ForecastingModelsProphet, + ForecastingModelsRandomForest, + ForecastingModelsSGD, + ForecastingModelsSeasonalAverage, + ForecastingModelsSeasonalNaive, + ForecastingModelsTCNForecaster, + ForecastingModelsXGBoostRegressor, + } +} + +// ForecastingPrimaryMetrics - Primary metrics for Forecasting task. +type ForecastingPrimaryMetrics string + +const ( + // ForecastingPrimaryMetricsNormalizedMeanAbsoluteError - The Normalized Mean Absolute Error (NMAE) is a validation metric + // to compare the Mean Absolute Error (MAE) of (time) series with different scales. + ForecastingPrimaryMetricsNormalizedMeanAbsoluteError ForecastingPrimaryMetrics = "NormalizedMeanAbsoluteError" + // ForecastingPrimaryMetricsNormalizedRootMeanSquaredError - The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates + // the comparison between models with different scales. + ForecastingPrimaryMetricsNormalizedRootMeanSquaredError ForecastingPrimaryMetrics = "NormalizedRootMeanSquaredError" + // ForecastingPrimaryMetricsR2Score - The R2 score is one of the performance evaluation measures for forecasting-based machine + // learning models. + ForecastingPrimaryMetricsR2Score ForecastingPrimaryMetrics = "R2Score" + // ForecastingPrimaryMetricsSpearmanCorrelation - The Spearman's rank coefficient of correlation is a non-parametric measure + // of rank correlation. + ForecastingPrimaryMetricsSpearmanCorrelation ForecastingPrimaryMetrics = "SpearmanCorrelation" +) + +// PossibleForecastingPrimaryMetricsValues returns the possible values for the ForecastingPrimaryMetrics const type. +func PossibleForecastingPrimaryMetricsValues() []ForecastingPrimaryMetrics { + return []ForecastingPrimaryMetrics{ + ForecastingPrimaryMetricsNormalizedMeanAbsoluteError, + ForecastingPrimaryMetricsNormalizedRootMeanSquaredError, + ForecastingPrimaryMetricsR2Score, + ForecastingPrimaryMetricsSpearmanCorrelation, + } +} + +// Goal - Defines supported metric goals for hyperparameter tuning +type Goal string + +const ( + GoalMaximize Goal = "Maximize" + GoalMinimize Goal = "Minimize" +) + +// PossibleGoalValues returns the possible values for the Goal const type. +func PossibleGoalValues() []Goal { + return []Goal{ + GoalMaximize, + GoalMinimize, + } +} + +// IdentityConfigurationType - Enum to determine identity framework. +type IdentityConfigurationType string + +const ( + IdentityConfigurationTypeAMLToken IdentityConfigurationType = "AMLToken" + IdentityConfigurationTypeManaged IdentityConfigurationType = "Managed" + IdentityConfigurationTypeUserIdentity IdentityConfigurationType = "UserIdentity" +) + +// PossibleIdentityConfigurationTypeValues returns the possible values for the IdentityConfigurationType const type. +func PossibleIdentityConfigurationTypeValues() []IdentityConfigurationType { + return []IdentityConfigurationType{ + IdentityConfigurationTypeAMLToken, + IdentityConfigurationTypeManaged, + IdentityConfigurationTypeUserIdentity, + } +} + +// ImageAnnotationType - Annotation type of image data. +type ImageAnnotationType string + +const ( + ImageAnnotationTypeBoundingBox ImageAnnotationType = "BoundingBox" + ImageAnnotationTypeClassification ImageAnnotationType = "Classification" + ImageAnnotationTypeInstanceSegmentation ImageAnnotationType = "InstanceSegmentation" +) + +// PossibleImageAnnotationTypeValues returns the possible values for the ImageAnnotationType const type. +func PossibleImageAnnotationTypeValues() []ImageAnnotationType { + return []ImageAnnotationType{ + ImageAnnotationTypeBoundingBox, + ImageAnnotationTypeClassification, + ImageAnnotationTypeInstanceSegmentation, + } +} + +// ImageType - Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images +type ImageType string + +const ( + ImageTypeAzureml ImageType = "azureml" + ImageTypeDocker ImageType = "docker" +) + +// PossibleImageTypeValues returns the possible values for the ImageType const type. +func PossibleImageTypeValues() []ImageType { + return []ImageType{ + ImageTypeAzureml, + ImageTypeDocker, + } +} + +// IncrementalDataRefresh - Whether IncrementalDataRefresh is enabled +type IncrementalDataRefresh string + +const ( + IncrementalDataRefreshDisabled IncrementalDataRefresh = "Disabled" + IncrementalDataRefreshEnabled IncrementalDataRefresh = "Enabled" +) + +// PossibleIncrementalDataRefreshValues returns the possible values for the IncrementalDataRefresh const type. +func PossibleIncrementalDataRefreshValues() []IncrementalDataRefresh { + return []IncrementalDataRefresh{ + IncrementalDataRefreshDisabled, + IncrementalDataRefreshEnabled, + } +} + +// InputDeliveryMode - Enum to determine the input data delivery mode. +type InputDeliveryMode string + +const ( + InputDeliveryModeDirect InputDeliveryMode = "Direct" + InputDeliveryModeDownload InputDeliveryMode = "Download" + InputDeliveryModeEvalDownload InputDeliveryMode = "EvalDownload" + InputDeliveryModeEvalMount InputDeliveryMode = "EvalMount" + InputDeliveryModeReadOnlyMount InputDeliveryMode = "ReadOnlyMount" + InputDeliveryModeReadWriteMount InputDeliveryMode = "ReadWriteMount" +) + +// PossibleInputDeliveryModeValues returns the possible values for the InputDeliveryMode const type. +func PossibleInputDeliveryModeValues() []InputDeliveryMode { + return []InputDeliveryMode{ + InputDeliveryModeDirect, + InputDeliveryModeDownload, + InputDeliveryModeEvalDownload, + InputDeliveryModeEvalMount, + InputDeliveryModeReadOnlyMount, + InputDeliveryModeReadWriteMount, + } +} + +// InstanceSegmentationPrimaryMetrics - Primary metrics for InstanceSegmentation tasks. +type InstanceSegmentationPrimaryMetrics string + +const ( + // InstanceSegmentationPrimaryMetricsMeanAveragePrecision - Mean Average Precision (MAP) is the average of AP (Average Precision). + // AP is calculated for each class and averaged to get the MAP. + InstanceSegmentationPrimaryMetricsMeanAveragePrecision InstanceSegmentationPrimaryMetrics = "MeanAveragePrecision" +) + +// PossibleInstanceSegmentationPrimaryMetricsValues returns the possible values for the InstanceSegmentationPrimaryMetrics const type. +func PossibleInstanceSegmentationPrimaryMetricsValues() []InstanceSegmentationPrimaryMetrics { + return []InstanceSegmentationPrimaryMetrics{ + InstanceSegmentationPrimaryMetricsMeanAveragePrecision, + } +} + +// JobInputType - Enum to determine the Job Input Type. +type JobInputType string + +const ( + JobInputTypeCustomModel JobInputType = "custom_model" + JobInputTypeLiteral JobInputType = "literal" + JobInputTypeMlflowModel JobInputType = "mlflow_model" + JobInputTypeMltable JobInputType = "mltable" + JobInputTypeTritonModel JobInputType = "triton_model" + JobInputTypeURIFile JobInputType = "uri_file" + JobInputTypeURIFolder JobInputType = "uri_folder" +) + +// PossibleJobInputTypeValues returns the possible values for the JobInputType const type. +func PossibleJobInputTypeValues() []JobInputType { + return []JobInputType{ + JobInputTypeCustomModel, + JobInputTypeLiteral, + JobInputTypeMlflowModel, + JobInputTypeMltable, + JobInputTypeTritonModel, + JobInputTypeURIFile, + JobInputTypeURIFolder, + } +} + +type JobLimitsType string + +const ( + JobLimitsTypeCommand JobLimitsType = "Command" + JobLimitsTypeSweep JobLimitsType = "Sweep" +) + +// PossibleJobLimitsTypeValues returns the possible values for the JobLimitsType const type. +func PossibleJobLimitsTypeValues() []JobLimitsType { + return []JobLimitsType{ + JobLimitsTypeCommand, + JobLimitsTypeSweep, + } +} + +// JobOutputType - Enum to determine the Job Output Type. +type JobOutputType string + +const ( + JobOutputTypeCustomModel JobOutputType = "custom_model" + JobOutputTypeMlflowModel JobOutputType = "mlflow_model" + JobOutputTypeMltable JobOutputType = "mltable" + JobOutputTypeTritonModel JobOutputType = "triton_model" + JobOutputTypeURIFile JobOutputType = "uri_file" + JobOutputTypeURIFolder JobOutputType = "uri_folder" +) + +// PossibleJobOutputTypeValues returns the possible values for the JobOutputType const type. +func PossibleJobOutputTypeValues() []JobOutputType { + return []JobOutputType{ + JobOutputTypeCustomModel, + JobOutputTypeMlflowModel, + JobOutputTypeMltable, + JobOutputTypeTritonModel, + JobOutputTypeURIFile, + JobOutputTypeURIFolder, + } +} + +// JobProvisioningState - Enum to determine the job provisioning state. +type JobProvisioningState string + +const ( + JobProvisioningStateCanceled JobProvisioningState = "Canceled" + JobProvisioningStateFailed JobProvisioningState = "Failed" + JobProvisioningStateInProgress JobProvisioningState = "InProgress" + JobProvisioningStateSucceeded JobProvisioningState = "Succeeded" +) + +// PossibleJobProvisioningStateValues returns the possible values for the JobProvisioningState const type. +func PossibleJobProvisioningStateValues() []JobProvisioningState { + return []JobProvisioningState{ + JobProvisioningStateCanceled, + JobProvisioningStateFailed, + JobProvisioningStateInProgress, + JobProvisioningStateSucceeded, + } +} + +// JobStatus - The status of a job. +type JobStatus string + +const ( + // JobStatusCancelRequested - Cancellation has been requested for the job. + JobStatusCancelRequested JobStatus = "CancelRequested" + // JobStatusCanceled - Following cancellation request, the job is now successfully canceled. + JobStatusCanceled JobStatus = "Canceled" + // JobStatusCompleted - Job completed successfully. This reflects that both the job itself and output collection states completed + // successfully + JobStatusCompleted JobStatus = "Completed" + // JobStatusFailed - Job failed. + JobStatusFailed JobStatus = "Failed" + // JobStatusFinalizing - Job is completed in the target. It is in output collection state now. + JobStatusFinalizing JobStatus = "Finalizing" + // JobStatusNotResponding - When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run + // goes to NotResponding state. + // NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of + // the previous states. + JobStatusNotResponding JobStatus = "NotResponding" + // JobStatusNotStarted - Run hasn't started yet. + JobStatusNotStarted JobStatus = "NotStarted" + // JobStatusPaused - The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. + JobStatusPaused JobStatus = "Paused" + // JobStatusPreparing - The run environment is being prepared. + JobStatusPreparing JobStatus = "Preparing" + // JobStatusProvisioning - (Not used currently) It will be used if ES is creating the compute target. + JobStatusProvisioning JobStatus = "Provisioning" + // JobStatusQueued - The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting + // for all required nodes to be ready. + JobStatusQueued JobStatus = "Queued" + // JobStatusRunning - The job started to run in the compute target. + JobStatusRunning JobStatus = "Running" + // JobStatusScheduled - The job is in a scheduled state. Job is not in any active state. + JobStatusScheduled JobStatus = "Scheduled" + // JobStatusStarting - Run has started. The user has a run ID. + JobStatusStarting JobStatus = "Starting" + // JobStatusUnknown - Default job status if not mapped to all other statuses + JobStatusUnknown JobStatus = "Unknown" +) + +// PossibleJobStatusValues returns the possible values for the JobStatus const type. +func PossibleJobStatusValues() []JobStatus { + return []JobStatus{ + JobStatusCancelRequested, + JobStatusCanceled, + JobStatusCompleted, + JobStatusFailed, + JobStatusFinalizing, + JobStatusNotResponding, + JobStatusNotStarted, + JobStatusPaused, + JobStatusPreparing, + JobStatusProvisioning, + JobStatusQueued, + JobStatusRunning, + JobStatusScheduled, + JobStatusStarting, + JobStatusUnknown, + } +} + +// JobType - Enum to determine the type of job. +type JobType string + +const ( + JobTypeAutoML JobType = "AutoML" + JobTypeCommand JobType = "Command" + JobTypeLabeling JobType = "Labeling" + JobTypePipeline JobType = "Pipeline" + JobTypeSpark JobType = "Spark" + JobTypeSweep JobType = "Sweep" +) + +// PossibleJobTypeValues returns the possible values for the JobType const type. +func PossibleJobTypeValues() []JobType { + return []JobType{ + JobTypeAutoML, + JobTypeCommand, + JobTypeLabeling, + JobTypePipeline, + JobTypeSpark, + JobTypeSweep, + } +} + +type KeyType string + +const ( + KeyTypePrimary KeyType = "Primary" + KeyTypeSecondary KeyType = "Secondary" +) + +// PossibleKeyTypeValues returns the possible values for the KeyType const type. +func PossibleKeyTypeValues() []KeyType { + return []KeyType{ + KeyTypePrimary, + KeyTypeSecondary, + } +} + +// LearningRateScheduler - Learning rate scheduler enum. +type LearningRateScheduler string + +const ( + // LearningRateSchedulerNone - No learning rate scheduler selected. + LearningRateSchedulerNone LearningRateScheduler = "None" + // LearningRateSchedulerStep - Step learning rate scheduler. + LearningRateSchedulerStep LearningRateScheduler = "Step" + // LearningRateSchedulerWarmupCosine - Cosine Annealing With Warmup. + LearningRateSchedulerWarmupCosine LearningRateScheduler = "WarmupCosine" +) + +// PossibleLearningRateSchedulerValues returns the possible values for the LearningRateScheduler const type. +func PossibleLearningRateSchedulerValues() []LearningRateScheduler { + return []LearningRateScheduler{ + LearningRateSchedulerNone, + LearningRateSchedulerStep, + LearningRateSchedulerWarmupCosine, + } +} + +type ListViewType string + +const ( + ListViewTypeActiveOnly ListViewType = "ActiveOnly" + ListViewTypeAll ListViewType = "All" + ListViewTypeArchivedOnly ListViewType = "ArchivedOnly" +) + +// PossibleListViewTypeValues returns the possible values for the ListViewType const type. +func PossibleListViewTypeValues() []ListViewType { + return []ListViewType{ + ListViewTypeActiveOnly, + ListViewTypeAll, + ListViewTypeArchivedOnly, + } +} + +// LoadBalancerType - Load Balancer Type +type LoadBalancerType string + +const ( + LoadBalancerTypeInternalLoadBalancer LoadBalancerType = "InternalLoadBalancer" + LoadBalancerTypePublicIP LoadBalancerType = "PublicIp" +) + +// PossibleLoadBalancerTypeValues returns the possible values for the LoadBalancerType const type. +func PossibleLoadBalancerTypeValues() []LoadBalancerType { + return []LoadBalancerType{ + LoadBalancerTypeInternalLoadBalancer, + LoadBalancerTypePublicIP, + } +} + +// LogVerbosity - Enum for setting log verbosity. +type LogVerbosity string + +const ( + // LogVerbosityCritical - Only critical statements logged. + LogVerbosityCritical LogVerbosity = "Critical" + // LogVerbosityDebug - Debug and above log statements logged. + LogVerbosityDebug LogVerbosity = "Debug" + // LogVerbosityError - Error and above log statements logged. + LogVerbosityError LogVerbosity = "Error" + // LogVerbosityInfo - Info and above log statements logged. + LogVerbosityInfo LogVerbosity = "Info" + // LogVerbosityNotSet - No logs emitted. + LogVerbosityNotSet LogVerbosity = "NotSet" + // LogVerbosityWarning - Warning and above log statements logged. + LogVerbosityWarning LogVerbosity = "Warning" +) + +// PossibleLogVerbosityValues returns the possible values for the LogVerbosity const type. +func PossibleLogVerbosityValues() []LogVerbosity { + return []LogVerbosity{ + LogVerbosityCritical, + LogVerbosityDebug, + LogVerbosityError, + LogVerbosityInfo, + LogVerbosityNotSet, + LogVerbosityWarning, + } +} + +type MLAssistConfigurationType string + +const ( + MLAssistConfigurationTypeDisabled MLAssistConfigurationType = "Disabled" + MLAssistConfigurationTypeEnabled MLAssistConfigurationType = "Enabled" +) + +// PossibleMLAssistConfigurationTypeValues returns the possible values for the MLAssistConfigurationType const type. +func PossibleMLAssistConfigurationTypeValues() []MLAssistConfigurationType { + return []MLAssistConfigurationType{ + MLAssistConfigurationTypeDisabled, + MLAssistConfigurationTypeEnabled, + } +} + +// MLFlowAutologgerState - Enum to determine the state of mlflow autologger. +type MLFlowAutologgerState string + +const ( + MLFlowAutologgerStateDisabled MLFlowAutologgerState = "Disabled" + MLFlowAutologgerStateEnabled MLFlowAutologgerState = "Enabled" +) + +// PossibleMLFlowAutologgerStateValues returns the possible values for the MLFlowAutologgerState const type. +func PossibleMLFlowAutologgerStateValues() []MLFlowAutologgerState { + return []MLFlowAutologgerState{ + MLFlowAutologgerStateDisabled, + MLFlowAutologgerStateEnabled, + } +} + +// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +type ManagedServiceIdentityType string + +const ( + ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" + ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" + ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" + ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" +) + +// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. +func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { + return []ManagedServiceIdentityType{ + ManagedServiceIdentityTypeNone, + ManagedServiceIdentityTypeSystemAssigned, + ManagedServiceIdentityTypeSystemAssignedUserAssigned, + ManagedServiceIdentityTypeUserAssigned, + } +} + +// MediaType - Media type of data asset. +type MediaType string + +const ( + MediaTypeImage MediaType = "Image" + MediaTypeText MediaType = "Text" +) + +// PossibleMediaTypeValues returns the possible values for the MediaType const type. +func PossibleMediaTypeValues() []MediaType { + return []MediaType{ + MediaTypeImage, + MediaTypeText, + } +} + +// MlflowAutologger - Indicates whether mlflow autologger is enabled for notebooks. +type MlflowAutologger string + +const ( + MlflowAutologgerDisabled MlflowAutologger = "Disabled" + MlflowAutologgerEnabled MlflowAutologger = "Enabled" +) + +// PossibleMlflowAutologgerValues returns the possible values for the MlflowAutologger const type. +func PossibleMlflowAutologgerValues() []MlflowAutologger { + return []MlflowAutologger{ + MlflowAutologgerDisabled, + MlflowAutologgerEnabled, + } +} + +// ModelSize - Image model size. +type ModelSize string + +const ( + // ModelSizeExtraLarge - Extra large size. + ModelSizeExtraLarge ModelSize = "ExtraLarge" + // ModelSizeLarge - Large size. + ModelSizeLarge ModelSize = "Large" + // ModelSizeMedium - Medium size. + ModelSizeMedium ModelSize = "Medium" + // ModelSizeNone - No value selected. + ModelSizeNone ModelSize = "None" + // ModelSizeSmall - Small size. + ModelSizeSmall ModelSize = "Small" +) + +// PossibleModelSizeValues returns the possible values for the ModelSize const type. +func PossibleModelSizeValues() []ModelSize { + return []ModelSize{ + ModelSizeExtraLarge, + ModelSizeLarge, + ModelSizeMedium, + ModelSizeNone, + ModelSizeSmall, + } +} + +// MountAction - Mount Action. +type MountAction string + +const ( + MountActionMount MountAction = "Mount" + MountActionUnmount MountAction = "Unmount" +) + +// PossibleMountActionValues returns the possible values for the MountAction const type. +func PossibleMountActionValues() []MountAction { + return []MountAction{ + MountActionMount, + MountActionUnmount, + } +} + +// MountState - Mount state. +type MountState string + +const ( + MountStateMountFailed MountState = "MountFailed" + MountStateMountRequested MountState = "MountRequested" + MountStateMounted MountState = "Mounted" + MountStateUnmountFailed MountState = "UnmountFailed" + MountStateUnmountRequested MountState = "UnmountRequested" + MountStateUnmounted MountState = "Unmounted" +) + +// PossibleMountStateValues returns the possible values for the MountState const type. +func PossibleMountStateValues() []MountState { + return []MountState{ + MountStateMountFailed, + MountStateMountRequested, + MountStateMounted, + MountStateUnmountFailed, + MountStateUnmountRequested, + MountStateUnmounted, + } +} + +// MultiSelect - Whether multiSelect is enabled +type MultiSelect string + +const ( + MultiSelectDisabled MultiSelect = "Disabled" + MultiSelectEnabled MultiSelect = "Enabled" +) + +// PossibleMultiSelectValues returns the possible values for the MultiSelect const type. +func PossibleMultiSelectValues() []MultiSelect { + return []MultiSelect{ + MultiSelectDisabled, + MultiSelectEnabled, + } +} + +// NCrossValidationsMode - Determines how N-Cross validations value is determined. +type NCrossValidationsMode string + +const ( + // NCrossValidationsModeAuto - Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML + // task. + NCrossValidationsModeAuto NCrossValidationsMode = "Auto" + // NCrossValidationsModeCustom - Use custom N-Cross validations value. + NCrossValidationsModeCustom NCrossValidationsMode = "Custom" +) + +// PossibleNCrossValidationsModeValues returns the possible values for the NCrossValidationsMode const type. +func PossibleNCrossValidationsModeValues() []NCrossValidationsMode { + return []NCrossValidationsMode{ + NCrossValidationsModeAuto, + NCrossValidationsModeCustom, + } +} + +// Network - network of this container. +type Network string + +const ( + NetworkBridge Network = "Bridge" + NetworkHost Network = "Host" +) + +// PossibleNetworkValues returns the possible values for the Network const type. +func PossibleNetworkValues() []Network { + return []Network{ + NetworkBridge, + NetworkHost, + } +} + +// NlpLearningRateScheduler - Enum of learning rate schedulers that aligns with those supported by HF +type NlpLearningRateScheduler string + +const ( + // NlpLearningRateSchedulerConstant - Constant learning rate. + NlpLearningRateSchedulerConstant NlpLearningRateScheduler = "Constant" + // NlpLearningRateSchedulerConstantWithWarmup - Linear warmup followed by constant value. + NlpLearningRateSchedulerConstantWithWarmup NlpLearningRateScheduler = "ConstantWithWarmup" + // NlpLearningRateSchedulerCosine - Linear warmup then cosine decay. + NlpLearningRateSchedulerCosine NlpLearningRateScheduler = "Cosine" + // NlpLearningRateSchedulerCosineWithRestarts - Linear warmup, cosine decay, then restart to initial LR. + NlpLearningRateSchedulerCosineWithRestarts NlpLearningRateScheduler = "CosineWithRestarts" + // NlpLearningRateSchedulerLinear - Linear warmup and decay. + NlpLearningRateSchedulerLinear NlpLearningRateScheduler = "Linear" + // NlpLearningRateSchedulerNone - No learning rate schedule. + NlpLearningRateSchedulerNone NlpLearningRateScheduler = "None" + // NlpLearningRateSchedulerPolynomial - Increase linearly then polynomially decay. + NlpLearningRateSchedulerPolynomial NlpLearningRateScheduler = "Polynomial" +) + +// PossibleNlpLearningRateSchedulerValues returns the possible values for the NlpLearningRateScheduler const type. +func PossibleNlpLearningRateSchedulerValues() []NlpLearningRateScheduler { + return []NlpLearningRateScheduler{ + NlpLearningRateSchedulerConstant, + NlpLearningRateSchedulerConstantWithWarmup, + NlpLearningRateSchedulerCosine, + NlpLearningRateSchedulerCosineWithRestarts, + NlpLearningRateSchedulerLinear, + NlpLearningRateSchedulerNone, + NlpLearningRateSchedulerPolynomial, + } +} + +// NodeState - State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. +type NodeState string + +const ( + NodeStateIdle NodeState = "idle" + NodeStateLeaving NodeState = "leaving" + NodeStatePreempted NodeState = "preempted" + NodeStatePreparing NodeState = "preparing" + NodeStateRunning NodeState = "running" + NodeStateUnusable NodeState = "unusable" +) + +// PossibleNodeStateValues returns the possible values for the NodeState const type. +func PossibleNodeStateValues() []NodeState { + return []NodeState{ + NodeStateIdle, + NodeStateLeaving, + NodeStatePreempted, + NodeStatePreparing, + NodeStateRunning, + NodeStateUnusable, + } +} + +// NodesValueType - The enumerated types for the nodes value +type NodesValueType string + +const ( + NodesValueTypeAll NodesValueType = "All" + NodesValueTypeCustom NodesValueType = "Custom" +) + +// PossibleNodesValueTypeValues returns the possible values for the NodesValueType const type. +func PossibleNodesValueTypeValues() []NodesValueType { + return []NodesValueType{ + NodesValueTypeAll, + NodesValueTypeCustom, + } +} + +// ObjectDetectionPrimaryMetrics - Primary metrics for Image ObjectDetection task. +type ObjectDetectionPrimaryMetrics string + +const ( + // ObjectDetectionPrimaryMetricsMeanAveragePrecision - Mean Average Precision (MAP) is the average of AP (Average Precision). + // AP is calculated for each class and averaged to get the MAP. + ObjectDetectionPrimaryMetricsMeanAveragePrecision ObjectDetectionPrimaryMetrics = "MeanAveragePrecision" +) + +// PossibleObjectDetectionPrimaryMetricsValues returns the possible values for the ObjectDetectionPrimaryMetrics const type. +func PossibleObjectDetectionPrimaryMetricsValues() []ObjectDetectionPrimaryMetrics { + return []ObjectDetectionPrimaryMetrics{ + ObjectDetectionPrimaryMetricsMeanAveragePrecision, + } +} + +// OperatingSystemType - The type of operating system. +type OperatingSystemType string + +const ( + OperatingSystemTypeLinux OperatingSystemType = "Linux" + OperatingSystemTypeWindows OperatingSystemType = "Windows" +) + +// PossibleOperatingSystemTypeValues returns the possible values for the OperatingSystemType const type. +func PossibleOperatingSystemTypeValues() []OperatingSystemType { + return []OperatingSystemType{ + OperatingSystemTypeLinux, + OperatingSystemTypeWindows, + } +} + +// OperationName - Name of the last operation. +type OperationName string + +const ( + OperationNameCreate OperationName = "Create" + OperationNameDelete OperationName = "Delete" + OperationNameReimage OperationName = "Reimage" + OperationNameRestart OperationName = "Restart" + OperationNameStart OperationName = "Start" + OperationNameStop OperationName = "Stop" +) + +// PossibleOperationNameValues returns the possible values for the OperationName const type. +func PossibleOperationNameValues() []OperationName { + return []OperationName{ + OperationNameCreate, + OperationNameDelete, + OperationNameReimage, + OperationNameRestart, + OperationNameStart, + OperationNameStop, + } +} + +// OperationStatus - Operation status. +type OperationStatus string + +const ( + OperationStatusCreateFailed OperationStatus = "CreateFailed" + OperationStatusDeleteFailed OperationStatus = "DeleteFailed" + OperationStatusInProgress OperationStatus = "InProgress" + OperationStatusReimageFailed OperationStatus = "ReimageFailed" + OperationStatusRestartFailed OperationStatus = "RestartFailed" + OperationStatusStartFailed OperationStatus = "StartFailed" + OperationStatusStopFailed OperationStatus = "StopFailed" + OperationStatusSucceeded OperationStatus = "Succeeded" +) + +// PossibleOperationStatusValues returns the possible values for the OperationStatus const type. +func PossibleOperationStatusValues() []OperationStatus { + return []OperationStatus{ + OperationStatusCreateFailed, + OperationStatusDeleteFailed, + OperationStatusInProgress, + OperationStatusReimageFailed, + OperationStatusRestartFailed, + OperationStatusStartFailed, + OperationStatusStopFailed, + OperationStatusSucceeded, + } +} + +// OperationTrigger - Trigger of operation. +type OperationTrigger string + +const ( + OperationTriggerIdleShutdown OperationTrigger = "IdleShutdown" + OperationTriggerSchedule OperationTrigger = "Schedule" + OperationTriggerUser OperationTrigger = "User" +) + +// PossibleOperationTriggerValues returns the possible values for the OperationTrigger const type. +func PossibleOperationTriggerValues() []OperationTrigger { + return []OperationTrigger{ + OperationTriggerIdleShutdown, + OperationTriggerSchedule, + OperationTriggerUser, + } +} + +type OrderString string + +const ( + OrderStringCreatedAtAsc OrderString = "CreatedAtAsc" + OrderStringCreatedAtDesc OrderString = "CreatedAtDesc" + OrderStringUpdatedAtAsc OrderString = "UpdatedAtAsc" + OrderStringUpdatedAtDesc OrderString = "UpdatedAtDesc" +) + +// PossibleOrderStringValues returns the possible values for the OrderString const type. +func PossibleOrderStringValues() []OrderString { + return []OrderString{ + OrderStringCreatedAtAsc, + OrderStringCreatedAtDesc, + OrderStringUpdatedAtAsc, + OrderStringUpdatedAtDesc, + } +} + +// OsType - Compute OS Type +type OsType string + +const ( + OsTypeLinux OsType = "Linux" + OsTypeWindows OsType = "Windows" +) + +// PossibleOsTypeValues returns the possible values for the OsType const type. +func PossibleOsTypeValues() []OsType { + return []OsType{ + OsTypeLinux, + OsTypeWindows, + } +} + +// OutputDeliveryMode - Output data delivery mode enums. +type OutputDeliveryMode string + +const ( + OutputDeliveryModeDirect OutputDeliveryMode = "Direct" + OutputDeliveryModeReadWriteMount OutputDeliveryMode = "ReadWriteMount" + OutputDeliveryModeUpload OutputDeliveryMode = "Upload" +) + +// PossibleOutputDeliveryModeValues returns the possible values for the OutputDeliveryMode const type. +func PossibleOutputDeliveryModeValues() []OutputDeliveryMode { + return []OutputDeliveryMode{ + OutputDeliveryModeDirect, + OutputDeliveryModeReadWriteMount, + OutputDeliveryModeUpload, + } +} + +// PrivateEndpointConnectionProvisioningState - The current provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" + PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" + PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" + PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{ + PrivateEndpointConnectionProvisioningStateCreating, + PrivateEndpointConnectionProvisioningStateDeleting, + PrivateEndpointConnectionProvisioningStateFailed, + PrivateEndpointConnectionProvisioningStateSucceeded, + } +} + +// PrivateEndpointServiceConnectionStatus - The private endpoint connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" + PrivateEndpointServiceConnectionStatusDisconnected PrivateEndpointServiceConnectionStatus = "Disconnected" + PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" + PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" + PrivateEndpointServiceConnectionStatusTimeout PrivateEndpointServiceConnectionStatus = "Timeout" +) + +// PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type. +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return []PrivateEndpointServiceConnectionStatus{ + PrivateEndpointServiceConnectionStatusApproved, + PrivateEndpointServiceConnectionStatusDisconnected, + PrivateEndpointServiceConnectionStatusPending, + PrivateEndpointServiceConnectionStatusRejected, + PrivateEndpointServiceConnectionStatusTimeout, + } +} + +// Protocol - Protocol over which communication will happen over this endpoint +type Protocol string + +const ( + ProtocolHTTP Protocol = "http" + ProtocolTCP Protocol = "tcp" + ProtocolUDP Protocol = "udp" +) + +// PossibleProtocolValues returns the possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{ + ProtocolHTTP, + ProtocolTCP, + ProtocolUDP, + } +} + +// ProvisioningStatus - The current deployment state of schedule. +type ProvisioningStatus string + +const ( + ProvisioningStatusCompleted ProvisioningStatus = "Completed" + ProvisioningStatusFailed ProvisioningStatus = "Failed" + ProvisioningStatusProvisioning ProvisioningStatus = "Provisioning" +) + +// PossibleProvisioningStatusValues returns the possible values for the ProvisioningStatus const type. +func PossibleProvisioningStatusValues() []ProvisioningStatus { + return []ProvisioningStatus{ + ProvisioningStatusCompleted, + ProvisioningStatusFailed, + ProvisioningStatusProvisioning, + } +} + +// PublicNetworkAccess - Whether requests from Public Network are allowed. +type PublicNetworkAccess string + +const ( + PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" +) + +// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. +func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { + return []PublicNetworkAccess{ + PublicNetworkAccessDisabled, + PublicNetworkAccessEnabled, + } +} + +// PublicNetworkAccessType - Enum to determine whether PublicNetworkAccess is Enabled or Disabled. +type PublicNetworkAccessType string + +const ( + PublicNetworkAccessTypeDisabled PublicNetworkAccessType = "Disabled" + PublicNetworkAccessTypeEnabled PublicNetworkAccessType = "Enabled" +) + +// PossiblePublicNetworkAccessTypeValues returns the possible values for the PublicNetworkAccessType const type. +func PossiblePublicNetworkAccessTypeValues() []PublicNetworkAccessType { + return []PublicNetworkAccessType{ + PublicNetworkAccessTypeDisabled, + PublicNetworkAccessTypeEnabled, + } +} + +// QuotaUnit - An enum describing the unit of quota measurement. +type QuotaUnit string + +const ( + QuotaUnitCount QuotaUnit = "Count" +) + +// PossibleQuotaUnitValues returns the possible values for the QuotaUnit const type. +func PossibleQuotaUnitValues() []QuotaUnit { + return []QuotaUnit{ + QuotaUnitCount, + } +} + +// RandomSamplingAlgorithmRule - The specific type of random algorithm +type RandomSamplingAlgorithmRule string + +const ( + RandomSamplingAlgorithmRuleRandom RandomSamplingAlgorithmRule = "Random" + RandomSamplingAlgorithmRuleSobol RandomSamplingAlgorithmRule = "Sobol" +) + +// PossibleRandomSamplingAlgorithmRuleValues returns the possible values for the RandomSamplingAlgorithmRule const type. +func PossibleRandomSamplingAlgorithmRuleValues() []RandomSamplingAlgorithmRule { + return []RandomSamplingAlgorithmRule{ + RandomSamplingAlgorithmRuleRandom, + RandomSamplingAlgorithmRuleSobol, + } +} + +// RecurrenceFrequency - Enum to describe the frequency of a recurrence schedule +type RecurrenceFrequency string + +const ( + // RecurrenceFrequencyDay - Day frequency + RecurrenceFrequencyDay RecurrenceFrequency = "Day" + // RecurrenceFrequencyHour - Hour frequency + RecurrenceFrequencyHour RecurrenceFrequency = "Hour" + // RecurrenceFrequencyMinute - Minute frequency + RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" + // RecurrenceFrequencyMonth - Month frequency + RecurrenceFrequencyMonth RecurrenceFrequency = "Month" + // RecurrenceFrequencyWeek - Week frequency + RecurrenceFrequencyWeek RecurrenceFrequency = "Week" +) + +// PossibleRecurrenceFrequencyValues returns the possible values for the RecurrenceFrequency const type. +func PossibleRecurrenceFrequencyValues() []RecurrenceFrequency { + return []RecurrenceFrequency{ + RecurrenceFrequencyDay, + RecurrenceFrequencyHour, + RecurrenceFrequencyMinute, + RecurrenceFrequencyMonth, + RecurrenceFrequencyWeek, + } +} + +// ReferenceType - Enum to determine which reference method to use for an asset. +type ReferenceType string + +const ( + ReferenceTypeDataPath ReferenceType = "DataPath" + ReferenceTypeID ReferenceType = "Id" + ReferenceTypeOutputPath ReferenceType = "OutputPath" +) + +// PossibleReferenceTypeValues returns the possible values for the ReferenceType const type. +func PossibleReferenceTypeValues() []ReferenceType { + return []ReferenceType{ + ReferenceTypeDataPath, + ReferenceTypeID, + ReferenceTypeOutputPath, + } +} + +// RegressionModels - Enum for all Regression models supported by AutoML. +type RegressionModels string + +const ( + // RegressionModelsDecisionTree - Decision Trees are a non-parametric supervised learning method used for both classification + // and regression tasks. + // The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from + // the data features. + RegressionModelsDecisionTree RegressionModels = "DecisionTree" + // RegressionModelsElasticNet - Elastic net is a popular type of regularized linear regression that combines two popular penalties, + // specifically the L1 and L2 penalty functions. + RegressionModelsElasticNet RegressionModels = "ElasticNet" + // RegressionModelsExtremeRandomTrees - Extreme Trees is an ensemble machine learning algorithm that combines the predictions + // from many decision trees. It is related to the widely used random forest algorithm. + RegressionModelsExtremeRandomTrees RegressionModels = "ExtremeRandomTrees" + // RegressionModelsGradientBoosting - The technique of transiting week learners into a strong learner is called Boosting. + // The gradient boosting algorithm process works on this theory of execution. + RegressionModelsGradientBoosting RegressionModels = "GradientBoosting" + // RegressionModelsKNN - K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + // which further means that the new data point will be assigned a value based on how closely it matches the points in the + // training set. + RegressionModelsKNN RegressionModels = "KNN" + // RegressionModelsLassoLars - Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with + // an L1 prior as regularizer. + RegressionModelsLassoLars RegressionModels = "LassoLars" + // RegressionModelsLightGBM - LightGBM is a gradient boosting framework that uses tree based learning algorithms. + RegressionModelsLightGBM RegressionModels = "LightGBM" + // RegressionModelsRandomForest - Random forest is a supervised learning algorithm. + // 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. + RegressionModelsRandomForest RegressionModels = "RandomForest" + // RegressionModelsSGD - SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + // to find the model parameters that correspond to the best fit between predicted and actual outputs. + // It's an inexact but powerful technique. + RegressionModelsSGD RegressionModels = "SGD" + // RegressionModelsXGBoostRegressor - XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning + // model using ensemble of base learners. + RegressionModelsXGBoostRegressor RegressionModels = "XGBoostRegressor" +) + +// PossibleRegressionModelsValues returns the possible values for the RegressionModels const type. +func PossibleRegressionModelsValues() []RegressionModels { + return []RegressionModels{ + RegressionModelsDecisionTree, + RegressionModelsElasticNet, + RegressionModelsExtremeRandomTrees, + RegressionModelsGradientBoosting, + RegressionModelsKNN, + RegressionModelsLassoLars, + RegressionModelsLightGBM, + RegressionModelsRandomForest, + RegressionModelsSGD, + RegressionModelsXGBoostRegressor, + } +} + +// RegressionPrimaryMetrics - Primary metrics for Regression task. +type RegressionPrimaryMetrics string + +const ( + // RegressionPrimaryMetricsNormalizedMeanAbsoluteError - The Normalized Mean Absolute Error (NMAE) is a validation metric + // to compare the Mean Absolute Error (MAE) of (time) series with different scales. + RegressionPrimaryMetricsNormalizedMeanAbsoluteError RegressionPrimaryMetrics = "NormalizedMeanAbsoluteError" + // RegressionPrimaryMetricsNormalizedRootMeanSquaredError - The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates + // the comparison between models with different scales. + RegressionPrimaryMetricsNormalizedRootMeanSquaredError RegressionPrimaryMetrics = "NormalizedRootMeanSquaredError" + // RegressionPrimaryMetricsR2Score - The R2 score is one of the performance evaluation measures for forecasting-based machine + // learning models. + RegressionPrimaryMetricsR2Score RegressionPrimaryMetrics = "R2Score" + // RegressionPrimaryMetricsSpearmanCorrelation - The Spearman's rank coefficient of correlation is a nonparametric measure + // of rank correlation. + RegressionPrimaryMetricsSpearmanCorrelation RegressionPrimaryMetrics = "SpearmanCorrelation" +) + +// PossibleRegressionPrimaryMetricsValues returns the possible values for the RegressionPrimaryMetrics const type. +func PossibleRegressionPrimaryMetricsValues() []RegressionPrimaryMetrics { + return []RegressionPrimaryMetrics{ + RegressionPrimaryMetricsNormalizedMeanAbsoluteError, + RegressionPrimaryMetricsNormalizedRootMeanSquaredError, + RegressionPrimaryMetricsR2Score, + RegressionPrimaryMetricsSpearmanCorrelation, + } +} + +// RemoteLoginPortPublicAccess - State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh +// port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all +// nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is +// defined, else is open all public nodes. It can be default only during cluster +// creation time, after creation it will be either enabled or disabled. +type RemoteLoginPortPublicAccess string + +const ( + RemoteLoginPortPublicAccessDisabled RemoteLoginPortPublicAccess = "Disabled" + RemoteLoginPortPublicAccessEnabled RemoteLoginPortPublicAccess = "Enabled" + RemoteLoginPortPublicAccessNotSpecified RemoteLoginPortPublicAccess = "NotSpecified" +) + +// PossibleRemoteLoginPortPublicAccessValues returns the possible values for the RemoteLoginPortPublicAccess const type. +func PossibleRemoteLoginPortPublicAccessValues() []RemoteLoginPortPublicAccess { + return []RemoteLoginPortPublicAccess{ + RemoteLoginPortPublicAccessDisabled, + RemoteLoginPortPublicAccessEnabled, + RemoteLoginPortPublicAccessNotSpecified, + } +} + +// SKUScaleType - Node scaling setting for the compute sku. +type SKUScaleType string + +const ( + // SKUScaleTypeAutomatic - Automatically scales node count. + SKUScaleTypeAutomatic SKUScaleType = "Automatic" + // SKUScaleTypeManual - Node count scaled upon user request. + SKUScaleTypeManual SKUScaleType = "Manual" + // SKUScaleTypeNone - Fixed set of nodes. + SKUScaleTypeNone SKUScaleType = "None" +) + +// PossibleSKUScaleTypeValues returns the possible values for the SKUScaleType const type. +func PossibleSKUScaleTypeValues() []SKUScaleType { + return []SKUScaleType{ + SKUScaleTypeAutomatic, + SKUScaleTypeManual, + SKUScaleTypeNone, + } +} + +// SKUTier - 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. +type SKUTier string + +const ( + SKUTierFree SKUTier = "Free" + SKUTierBasic SKUTier = "Basic" + SKUTierStandard SKUTier = "Standard" + SKUTierPremium SKUTier = "Premium" +) + +// PossibleSKUTierValues returns the possible values for the SKUTier const type. +func PossibleSKUTierValues() []SKUTier { + return []SKUTier{ + SKUTierFree, + SKUTierBasic, + SKUTierStandard, + SKUTierPremium, + } +} + +// SSHPublicAccess - 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. +type SSHPublicAccess string + +const ( + SSHPublicAccessDisabled SSHPublicAccess = "Disabled" + SSHPublicAccessEnabled SSHPublicAccess = "Enabled" +) + +// PossibleSSHPublicAccessValues returns the possible values for the SSHPublicAccess const type. +func PossibleSSHPublicAccessValues() []SSHPublicAccess { + return []SSHPublicAccess{ + SSHPublicAccessDisabled, + SSHPublicAccessEnabled, + } +} + +// SSLConfigStatus - Enable or disable ssl for scoring +type SSLConfigStatus string + +const ( + SSLConfigStatusAuto SSLConfigStatus = "Auto" + SSLConfigStatusDisabled SSLConfigStatus = "Disabled" + SSLConfigStatusEnabled SSLConfigStatus = "Enabled" +) + +// PossibleSSLConfigStatusValues returns the possible values for the SSLConfigStatus const type. +func PossibleSSLConfigStatusValues() []SSLConfigStatus { + return []SSLConfigStatus{ + SSLConfigStatusAuto, + SSLConfigStatusDisabled, + SSLConfigStatusEnabled, + } +} + +type SamplingAlgorithmType string + +const ( + SamplingAlgorithmTypeBayesian SamplingAlgorithmType = "Bayesian" + SamplingAlgorithmTypeGrid SamplingAlgorithmType = "Grid" + SamplingAlgorithmTypeRandom SamplingAlgorithmType = "Random" +) + +// PossibleSamplingAlgorithmTypeValues returns the possible values for the SamplingAlgorithmType const type. +func PossibleSamplingAlgorithmTypeValues() []SamplingAlgorithmType { + return []SamplingAlgorithmType{ + SamplingAlgorithmTypeBayesian, + SamplingAlgorithmTypeGrid, + SamplingAlgorithmTypeRandom, + } +} + +type ScaleType string + +const ( + ScaleTypeDefault ScaleType = "Default" + ScaleTypeTargetUtilization ScaleType = "TargetUtilization" +) + +// PossibleScaleTypeValues returns the possible values for the ScaleType const type. +func PossibleScaleTypeValues() []ScaleType { + return []ScaleType{ + ScaleTypeDefault, + ScaleTypeTargetUtilization, + } +} + +type ScheduleActionType string + +const ( + ScheduleActionTypeCreateJob ScheduleActionType = "CreateJob" + ScheduleActionTypeInvokeBatchEndpoint ScheduleActionType = "InvokeBatchEndpoint" +) + +// PossibleScheduleActionTypeValues returns the possible values for the ScheduleActionType const type. +func PossibleScheduleActionTypeValues() []ScheduleActionType { + return []ScheduleActionType{ + ScheduleActionTypeCreateJob, + ScheduleActionTypeInvokeBatchEndpoint, + } +} + +type ScheduleListViewType string + +const ( + ScheduleListViewTypeAll ScheduleListViewType = "All" + ScheduleListViewTypeDisabledOnly ScheduleListViewType = "DisabledOnly" + ScheduleListViewTypeEnabledOnly ScheduleListViewType = "EnabledOnly" +) + +// PossibleScheduleListViewTypeValues returns the possible values for the ScheduleListViewType const type. +func PossibleScheduleListViewTypeValues() []ScheduleListViewType { + return []ScheduleListViewType{ + ScheduleListViewTypeAll, + ScheduleListViewTypeDisabledOnly, + ScheduleListViewTypeEnabledOnly, + } +} + +// ScheduleProvisioningState - The current deployment state of schedule. +type ScheduleProvisioningState string + +const ( + ScheduleProvisioningStateCompleted ScheduleProvisioningState = "Completed" + ScheduleProvisioningStateFailed ScheduleProvisioningState = "Failed" + ScheduleProvisioningStateProvisioning ScheduleProvisioningState = "Provisioning" +) + +// PossibleScheduleProvisioningStateValues returns the possible values for the ScheduleProvisioningState const type. +func PossibleScheduleProvisioningStateValues() []ScheduleProvisioningState { + return []ScheduleProvisioningState{ + ScheduleProvisioningStateCompleted, + ScheduleProvisioningStateFailed, + ScheduleProvisioningStateProvisioning, + } +} + +type ScheduleProvisioningStatus string + +const ( + ScheduleProvisioningStatusCanceled ScheduleProvisioningStatus = "Canceled" + ScheduleProvisioningStatusCreating ScheduleProvisioningStatus = "Creating" + ScheduleProvisioningStatusDeleting ScheduleProvisioningStatus = "Deleting" + ScheduleProvisioningStatusFailed ScheduleProvisioningStatus = "Failed" + ScheduleProvisioningStatusSucceeded ScheduleProvisioningStatus = "Succeeded" + ScheduleProvisioningStatusUpdating ScheduleProvisioningStatus = "Updating" +) + +// PossibleScheduleProvisioningStatusValues returns the possible values for the ScheduleProvisioningStatus const type. +func PossibleScheduleProvisioningStatusValues() []ScheduleProvisioningStatus { + return []ScheduleProvisioningStatus{ + ScheduleProvisioningStatusCanceled, + ScheduleProvisioningStatusCreating, + ScheduleProvisioningStatusDeleting, + ScheduleProvisioningStatusFailed, + ScheduleProvisioningStatusSucceeded, + ScheduleProvisioningStatusUpdating, + } +} + +// ScheduleStatus - Is the schedule enabled or disabled? +type ScheduleStatus string + +const ( + ScheduleStatusDisabled ScheduleStatus = "Disabled" + ScheduleStatusEnabled ScheduleStatus = "Enabled" +) + +// PossibleScheduleStatusValues returns the possible values for the ScheduleStatus const type. +func PossibleScheduleStatusValues() []ScheduleStatus { + return []ScheduleStatus{ + ScheduleStatusDisabled, + ScheduleStatusEnabled, + } +} + +// SeasonalityMode - Forecasting seasonality mode. +type SeasonalityMode string + +const ( + // SeasonalityModeAuto - Seasonality to be determined automatically. + SeasonalityModeAuto SeasonalityMode = "Auto" + // SeasonalityModeCustom - Use the custom seasonality value. + SeasonalityModeCustom SeasonalityMode = "Custom" +) + +// PossibleSeasonalityModeValues returns the possible values for the SeasonalityMode const type. +func PossibleSeasonalityModeValues() []SeasonalityMode { + return []SeasonalityMode{ + SeasonalityModeAuto, + SeasonalityModeCustom, + } +} + +// SecretsType - Enum to determine the datastore secrets type. +type SecretsType string + +const ( + SecretsTypeAccountKey SecretsType = "AccountKey" + SecretsTypeCertificate SecretsType = "Certificate" + SecretsTypeKerberosKeytab SecretsType = "KerberosKeytab" + SecretsTypeKerberosPassword SecretsType = "KerberosPassword" + SecretsTypeSas SecretsType = "Sas" + SecretsTypeServicePrincipal SecretsType = "ServicePrincipal" +) + +// PossibleSecretsTypeValues returns the possible values for the SecretsType const type. +func PossibleSecretsTypeValues() []SecretsType { + return []SecretsType{ + SecretsTypeAccountKey, + SecretsTypeCertificate, + SecretsTypeKerberosKeytab, + SecretsTypeKerberosPassword, + SecretsTypeSas, + SecretsTypeServicePrincipal, + } +} + +type ServiceDataAccessAuthIdentity string + +const ( + // ServiceDataAccessAuthIdentityNone - Do not use any identity for service data access. + ServiceDataAccessAuthIdentityNone ServiceDataAccessAuthIdentity = "None" + // ServiceDataAccessAuthIdentityWorkspaceSystemAssignedIdentity - Use the system assigned managed identity of the Workspace + // to authenticate service data access. + ServiceDataAccessAuthIdentityWorkspaceSystemAssignedIdentity ServiceDataAccessAuthIdentity = "WorkspaceSystemAssignedIdentity" + // ServiceDataAccessAuthIdentityWorkspaceUserAssignedIdentity - Use the user assigned managed identity of the Workspace to + // authenticate service data access. + ServiceDataAccessAuthIdentityWorkspaceUserAssignedIdentity ServiceDataAccessAuthIdentity = "WorkspaceUserAssignedIdentity" +) + +// PossibleServiceDataAccessAuthIdentityValues returns the possible values for the ServiceDataAccessAuthIdentity const type. +func PossibleServiceDataAccessAuthIdentityValues() []ServiceDataAccessAuthIdentity { + return []ServiceDataAccessAuthIdentity{ + ServiceDataAccessAuthIdentityNone, + ServiceDataAccessAuthIdentityWorkspaceSystemAssignedIdentity, + ServiceDataAccessAuthIdentityWorkspaceUserAssignedIdentity, + } +} + +// ShortSeriesHandlingConfiguration - The parameter defining how if AutoML should handle short time series. +type ShortSeriesHandlingConfiguration string + +const ( + // ShortSeriesHandlingConfigurationAuto - Short series will be padded if there are no long series, otherwise short series + // will be dropped. + ShortSeriesHandlingConfigurationAuto ShortSeriesHandlingConfiguration = "Auto" + // ShortSeriesHandlingConfigurationDrop - All the short series will be dropped. + ShortSeriesHandlingConfigurationDrop ShortSeriesHandlingConfiguration = "Drop" + // ShortSeriesHandlingConfigurationNone - Represents no/null value. + ShortSeriesHandlingConfigurationNone ShortSeriesHandlingConfiguration = "None" + // ShortSeriesHandlingConfigurationPad - All the short series will be padded. + ShortSeriesHandlingConfigurationPad ShortSeriesHandlingConfiguration = "Pad" +) + +// PossibleShortSeriesHandlingConfigurationValues returns the possible values for the ShortSeriesHandlingConfiguration const type. +func PossibleShortSeriesHandlingConfigurationValues() []ShortSeriesHandlingConfiguration { + return []ShortSeriesHandlingConfiguration{ + ShortSeriesHandlingConfigurationAuto, + ShortSeriesHandlingConfigurationDrop, + ShortSeriesHandlingConfigurationNone, + ShortSeriesHandlingConfigurationPad, + } +} + +// SourceType - Data source type. +type SourceType string + +const ( + SourceTypeDataset SourceType = "Dataset" + SourceTypeDatastore SourceType = "Datastore" + SourceTypeURI SourceType = "URI" +) + +// PossibleSourceTypeValues returns the possible values for the SourceType const type. +func PossibleSourceTypeValues() []SourceType { + return []SourceType{ + SourceTypeDataset, + SourceTypeDatastore, + SourceTypeURI, + } +} + +type SparkJobEntryType string + +const ( + SparkJobEntryTypeSparkJobPythonEntry SparkJobEntryType = "SparkJobPythonEntry" + SparkJobEntryTypeSparkJobScalaEntry SparkJobEntryType = "SparkJobScalaEntry" +) + +// PossibleSparkJobEntryTypeValues returns the possible values for the SparkJobEntryType const type. +func PossibleSparkJobEntryTypeValues() []SparkJobEntryType { + return []SparkJobEntryType{ + SparkJobEntryTypeSparkJobPythonEntry, + SparkJobEntryTypeSparkJobScalaEntry, + } +} + +// StackMetaLearnerType - The meta-learner is a model trained on the output of the individual heterogeneous models. Default +// meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if +// cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). +// This parameter can be one of the following strings: LogisticRegression, +// LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression +type StackMetaLearnerType string + +const ( + // StackMetaLearnerTypeElasticNet - Default meta-learners are LogisticRegression for regression task. + StackMetaLearnerTypeElasticNet StackMetaLearnerType = "ElasticNet" + // StackMetaLearnerTypeElasticNetCV - Default meta-learners are LogisticRegression for regression task when CV is on. + StackMetaLearnerTypeElasticNetCV StackMetaLearnerType = "ElasticNetCV" + StackMetaLearnerTypeLightGBMClassifier StackMetaLearnerType = "LightGBMClassifier" + StackMetaLearnerTypeLightGBMRegressor StackMetaLearnerType = "LightGBMRegressor" + StackMetaLearnerTypeLinearRegression StackMetaLearnerType = "LinearRegression" + // StackMetaLearnerTypeLogisticRegression - Default meta-learners are LogisticRegression for classification tasks. + StackMetaLearnerTypeLogisticRegression StackMetaLearnerType = "LogisticRegression" + // StackMetaLearnerTypeLogisticRegressionCV - Default meta-learners are LogisticRegression for classification task when CV + // is on. + StackMetaLearnerTypeLogisticRegressionCV StackMetaLearnerType = "LogisticRegressionCV" + StackMetaLearnerTypeNone StackMetaLearnerType = "None" +) + +// PossibleStackMetaLearnerTypeValues returns the possible values for the StackMetaLearnerType const type. +func PossibleStackMetaLearnerTypeValues() []StackMetaLearnerType { + return []StackMetaLearnerType{ + StackMetaLearnerTypeElasticNet, + StackMetaLearnerTypeElasticNetCV, + StackMetaLearnerTypeLightGBMClassifier, + StackMetaLearnerTypeLightGBMRegressor, + StackMetaLearnerTypeLinearRegression, + StackMetaLearnerTypeLogisticRegression, + StackMetaLearnerTypeLogisticRegressionCV, + StackMetaLearnerTypeNone, + } +} + +// Status - Status of update workspace quota. +type Status string + +const ( + StatusFailure Status = "Failure" + StatusInvalidQuotaBelowClusterMinimum Status = "InvalidQuotaBelowClusterMinimum" + StatusInvalidQuotaExceedsSubscriptionLimit Status = "InvalidQuotaExceedsSubscriptionLimit" + StatusInvalidVMFamilyName Status = "InvalidVMFamilyName" + StatusOperationNotEnabledForRegion Status = "OperationNotEnabledForRegion" + StatusOperationNotSupportedForSKU Status = "OperationNotSupportedForSku" + StatusSuccess Status = "Success" + StatusUndefined Status = "Undefined" +) + +// PossibleStatusValues returns the possible values for the Status const type. +func PossibleStatusValues() []Status { + return []Status{ + StatusFailure, + StatusInvalidQuotaBelowClusterMinimum, + StatusInvalidQuotaExceedsSubscriptionLimit, + StatusInvalidVMFamilyName, + StatusOperationNotEnabledForRegion, + StatusOperationNotSupportedForSKU, + StatusSuccess, + StatusUndefined, + } +} + +type StatusMessageLevel string + +const ( + StatusMessageLevelError StatusMessageLevel = "Error" + StatusMessageLevelInformation StatusMessageLevel = "Information" + StatusMessageLevelWarning StatusMessageLevel = "Warning" +) + +// PossibleStatusMessageLevelValues returns the possible values for the StatusMessageLevel const type. +func PossibleStatusMessageLevelValues() []StatusMessageLevel { + return []StatusMessageLevel{ + StatusMessageLevelError, + StatusMessageLevelInformation, + StatusMessageLevelWarning, + } +} + +// StochasticOptimizer - Stochastic optimizer for image models. +type StochasticOptimizer string + +const ( + // StochasticOptimizerAdam - Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of + // moments + StochasticOptimizerAdam StochasticOptimizer = "Adam" + // StochasticOptimizerAdamw - AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay. + StochasticOptimizerAdamw StochasticOptimizer = "Adamw" + // StochasticOptimizerNone - No optimizer selected. + StochasticOptimizerNone StochasticOptimizer = "None" + // StochasticOptimizerSgd - Stochastic Gradient Descent optimizer. + StochasticOptimizerSgd StochasticOptimizer = "Sgd" +) + +// PossibleStochasticOptimizerValues returns the possible values for the StochasticOptimizer const type. +func PossibleStochasticOptimizerValues() []StochasticOptimizer { + return []StochasticOptimizer{ + StochasticOptimizerAdam, + StochasticOptimizerAdamw, + StochasticOptimizerNone, + StochasticOptimizerSgd, + } +} + +// StorageAccountType - type of this storage account. +type StorageAccountType string + +const ( + StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" + StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" +) + +// PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type. +func PossibleStorageAccountTypeValues() []StorageAccountType { + return []StorageAccountType{ + StorageAccountTypePremiumLRS, + StorageAccountTypeStandardLRS, + } +} + +// TargetAggregationFunction - Target aggregate function. +type TargetAggregationFunction string + +const ( + TargetAggregationFunctionMax TargetAggregationFunction = "Max" + TargetAggregationFunctionMean TargetAggregationFunction = "Mean" + TargetAggregationFunctionMin TargetAggregationFunction = "Min" + // TargetAggregationFunctionNone - Represent no value set. + TargetAggregationFunctionNone TargetAggregationFunction = "None" + TargetAggregationFunctionSum TargetAggregationFunction = "Sum" +) + +// PossibleTargetAggregationFunctionValues returns the possible values for the TargetAggregationFunction const type. +func PossibleTargetAggregationFunctionValues() []TargetAggregationFunction { + return []TargetAggregationFunction{ + TargetAggregationFunctionMax, + TargetAggregationFunctionMean, + TargetAggregationFunctionMin, + TargetAggregationFunctionNone, + TargetAggregationFunctionSum, + } +} + +// TargetLagsMode - Target lags selection modes. +type TargetLagsMode string + +const ( + // TargetLagsModeAuto - Target lags to be determined automatically. + TargetLagsModeAuto TargetLagsMode = "Auto" + // TargetLagsModeCustom - Use the custom target lags. + TargetLagsModeCustom TargetLagsMode = "Custom" +) + +// PossibleTargetLagsModeValues returns the possible values for the TargetLagsMode const type. +func PossibleTargetLagsModeValues() []TargetLagsMode { + return []TargetLagsMode{ + TargetLagsModeAuto, + TargetLagsModeCustom, + } +} + +// TargetRollingWindowSizeMode - Target rolling windows size mode. +type TargetRollingWindowSizeMode string + +const ( + // TargetRollingWindowSizeModeAuto - Determine rolling windows size automatically. + TargetRollingWindowSizeModeAuto TargetRollingWindowSizeMode = "Auto" + // TargetRollingWindowSizeModeCustom - Use the specified rolling window size. + TargetRollingWindowSizeModeCustom TargetRollingWindowSizeMode = "Custom" +) + +// PossibleTargetRollingWindowSizeModeValues returns the possible values for the TargetRollingWindowSizeMode const type. +func PossibleTargetRollingWindowSizeModeValues() []TargetRollingWindowSizeMode { + return []TargetRollingWindowSizeMode{ + TargetRollingWindowSizeModeAuto, + TargetRollingWindowSizeModeCustom, + } +} + +// TaskType - AutoMLJob Task type. +type TaskType string + +const ( + // TaskTypeClassification - Classification in machine learning and statistics is a supervised learning approach in which + // the computer program learns from the data given to it and make new observations or classifications. + TaskTypeClassification TaskType = "Classification" + // TaskTypeForecasting - Forecasting is a special kind of regression task that deals with time-series data and creates forecasting + // model + // that can be used to predict the near future values based on the inputs. + TaskTypeForecasting TaskType = "Forecasting" + // TaskTypeImageClassification - Image Classification. Multi-class image classification is used when an image is classified + // with only a single label + // from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. + TaskTypeImageClassification TaskType = "ImageClassification" + // TaskTypeImageClassificationMultilabel - Image Classification Multilabel. Multi-label image classification is used when + // an image could have one or more labels + // from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. + TaskTypeImageClassificationMultilabel TaskType = "ImageClassificationMultilabel" + // TaskTypeImageInstanceSegmentation - Image Instance Segmentation. Instance segmentation is used to identify objects in an + // image at the pixel level, + // drawing a polygon around each object in the image. + TaskTypeImageInstanceSegmentation TaskType = "ImageInstanceSegmentation" + // TaskTypeImageObjectDetection - Image Object Detection. Object detection is used to identify objects in an image and locate + // each object with a + // bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. + TaskTypeImageObjectDetection TaskType = "ImageObjectDetection" + // TaskTypeRegression - Regression means to predict the value using the input data. Regression models are used to predict + // a continuous value. + TaskTypeRegression TaskType = "Regression" + // TaskTypeTextClassification - Text classification (also known as text tagging or text categorization) is the process of + // sorting texts into categories. + // Categories are mutually exclusive. + TaskTypeTextClassification TaskType = "TextClassification" + // TaskTypeTextClassificationMultilabel - Multilabel classification task assigns each sample to a group (zero or more) of + // target labels. + TaskTypeTextClassificationMultilabel TaskType = "TextClassificationMultilabel" + // TaskTypeTextNER - Text Named Entity Recognition a.k.a. TextNER. + // Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, + // locations, organizations, and more. + TaskTypeTextNER TaskType = "TextNER" +) + +// PossibleTaskTypeValues returns the possible values for the TaskType const type. +func PossibleTaskTypeValues() []TaskType { + return []TaskType{ + TaskTypeClassification, + TaskTypeForecasting, + TaskTypeImageClassification, + TaskTypeImageClassificationMultilabel, + TaskTypeImageInstanceSegmentation, + TaskTypeImageObjectDetection, + TaskTypeRegression, + TaskTypeTextClassification, + TaskTypeTextClassificationMultilabel, + TaskTypeTextNER, + } +} + +// TextAnnotationType - Annotation type of text data. +type TextAnnotationType string + +const ( + TextAnnotationTypeClassification TextAnnotationType = "Classification" + TextAnnotationTypeNamedEntityRecognition TextAnnotationType = "NamedEntityRecognition" +) + +// PossibleTextAnnotationTypeValues returns the possible values for the TextAnnotationType const type. +func PossibleTextAnnotationTypeValues() []TextAnnotationType { + return []TextAnnotationType{ + TextAnnotationTypeClassification, + TextAnnotationTypeNamedEntityRecognition, + } +} + +// TrainingMode - Training mode dictates whether to use distributed training or not +type TrainingMode string + +const ( + // TrainingModeAuto - Auto mode + TrainingModeAuto TrainingMode = "Auto" + // TrainingModeDistributed - Distributed training mode + TrainingModeDistributed TrainingMode = "Distributed" + // TrainingModeNonDistributed - Non distributed training mode + TrainingModeNonDistributed TrainingMode = "NonDistributed" +) + +// PossibleTrainingModeValues returns the possible values for the TrainingMode const type. +func PossibleTrainingModeValues() []TrainingMode { + return []TrainingMode{ + TrainingModeAuto, + TrainingModeDistributed, + TrainingModeNonDistributed, + } +} + +type TriggerType string + +const ( + TriggerTypeCron TriggerType = "Cron" + TriggerTypeRecurrence TriggerType = "Recurrence" +) + +// PossibleTriggerTypeValues returns the possible values for the TriggerType const type. +func PossibleTriggerTypeValues() []TriggerType { + return []TriggerType{ + TriggerTypeCron, + TriggerTypeRecurrence, + } +} + +type UnderlyingResourceAction string + +const ( + UnderlyingResourceActionDelete UnderlyingResourceAction = "Delete" + UnderlyingResourceActionDetach UnderlyingResourceAction = "Detach" +) + +// PossibleUnderlyingResourceActionValues returns the possible values for the UnderlyingResourceAction const type. +func PossibleUnderlyingResourceActionValues() []UnderlyingResourceAction { + return []UnderlyingResourceAction{ + UnderlyingResourceActionDelete, + UnderlyingResourceActionDetach, + } +} + +// UnitOfMeasure - The unit of time measurement for the specified VM price. Example: OneHour +type UnitOfMeasure string + +const ( + UnitOfMeasureOneHour UnitOfMeasure = "OneHour" +) + +// PossibleUnitOfMeasureValues returns the possible values for the UnitOfMeasure const type. +func PossibleUnitOfMeasureValues() []UnitOfMeasure { + return []UnitOfMeasure{ + UnitOfMeasureOneHour, + } +} + +// UsageUnit - An enum describing the unit of usage measurement. +type UsageUnit string + +const ( + UsageUnitCount UsageUnit = "Count" +) + +// PossibleUsageUnitValues returns the possible values for the UsageUnit const type. +func PossibleUsageUnitValues() []UsageUnit { + return []UsageUnit{ + UsageUnitCount, + } +} + +// UseStl - Configure STL Decomposition of the time-series target column. +type UseStl string + +const ( + // UseStlNone - No stl decomposition. + UseStlNone UseStl = "None" + UseStlSeason UseStl = "Season" + UseStlSeasonTrend UseStl = "SeasonTrend" +) + +// PossibleUseStlValues returns the possible values for the UseStl const type. +func PossibleUseStlValues() []UseStl { + return []UseStl{ + UseStlNone, + UseStlSeason, + UseStlSeasonTrend, + } +} + +// VMPriceOSType - Operating system type used by the VM. +type VMPriceOSType string + +const ( + VMPriceOSTypeLinux VMPriceOSType = "Linux" + VMPriceOSTypeWindows VMPriceOSType = "Windows" +) + +// PossibleVMPriceOSTypeValues returns the possible values for the VMPriceOSType const type. +func PossibleVMPriceOSTypeValues() []VMPriceOSType { + return []VMPriceOSType{ + VMPriceOSTypeLinux, + VMPriceOSTypeWindows, + } +} + +// VMPriority - Virtual Machine priority +type VMPriority string + +const ( + VMPriorityDedicated VMPriority = "Dedicated" + VMPriorityLowPriority VMPriority = "LowPriority" +) + +// PossibleVMPriorityValues returns the possible values for the VMPriority const type. +func PossibleVMPriorityValues() []VMPriority { + return []VMPriority{ + VMPriorityDedicated, + VMPriorityLowPriority, + } +} + +// VMTier - The type of the VM. +type VMTier string + +const ( + VMTierLowPriority VMTier = "LowPriority" + VMTierSpot VMTier = "Spot" + VMTierStandard VMTier = "Standard" +) + +// PossibleVMTierValues returns the possible values for the VMTier const type. +func PossibleVMTierValues() []VMTier { + return []VMTier{ + VMTierLowPriority, + VMTierSpot, + VMTierStandard, + } +} + +// ValidationMetricType - Metric computation method to use for validation metrics in image tasks. +type ValidationMetricType string + +const ( + // ValidationMetricTypeCoco - Coco metric. + ValidationMetricTypeCoco ValidationMetricType = "Coco" + // ValidationMetricTypeCocoVoc - CocoVoc metric. + ValidationMetricTypeCocoVoc ValidationMetricType = "CocoVoc" + // ValidationMetricTypeNone - No metric. + ValidationMetricTypeNone ValidationMetricType = "None" + // ValidationMetricTypeVoc - Voc metric. + ValidationMetricTypeVoc ValidationMetricType = "Voc" +) + +// PossibleValidationMetricTypeValues returns the possible values for the ValidationMetricType const type. +func PossibleValidationMetricTypeValues() []ValidationMetricType { + return []ValidationMetricType{ + ValidationMetricTypeCoco, + ValidationMetricTypeCocoVoc, + ValidationMetricTypeNone, + ValidationMetricTypeVoc, + } +} + +// ValueFormat - format for the workspace connection value +type ValueFormat string + +const ( + ValueFormatJSON ValueFormat = "JSON" +) + +// PossibleValueFormatValues returns the possible values for the ValueFormat const type. +func PossibleValueFormatValues() []ValueFormat { + return []ValueFormat{ + ValueFormatJSON, + } +} + +// VolumeDefinitionType - Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe +type VolumeDefinitionType string + +const ( + VolumeDefinitionTypeBind VolumeDefinitionType = "bind" + VolumeDefinitionTypeNpipe VolumeDefinitionType = "npipe" + VolumeDefinitionTypeTmpfs VolumeDefinitionType = "tmpfs" + VolumeDefinitionTypeVolume VolumeDefinitionType = "volume" +) + +// PossibleVolumeDefinitionTypeValues returns the possible values for the VolumeDefinitionType const type. +func PossibleVolumeDefinitionTypeValues() []VolumeDefinitionType { + return []VolumeDefinitionType{ + VolumeDefinitionTypeBind, + VolumeDefinitionTypeNpipe, + VolumeDefinitionTypeTmpfs, + VolumeDefinitionTypeVolume, + } +} + +// WeekDay - Enum of weekday +type WeekDay string + +const ( + // WeekDayFriday - Friday weekday + WeekDayFriday WeekDay = "Friday" + // WeekDayMonday - Monday weekday + WeekDayMonday WeekDay = "Monday" + // WeekDaySaturday - Saturday weekday + WeekDaySaturday WeekDay = "Saturday" + // WeekDaySunday - Sunday weekday + WeekDaySunday WeekDay = "Sunday" + // WeekDayThursday - Thursday weekday + WeekDayThursday WeekDay = "Thursday" + // WeekDayTuesday - Tuesday weekday + WeekDayTuesday WeekDay = "Tuesday" + // WeekDayWednesday - Wednesday weekday + WeekDayWednesday WeekDay = "Wednesday" +) + +// PossibleWeekDayValues returns the possible values for the WeekDay const type. +func PossibleWeekDayValues() []WeekDay { + return []WeekDay{ + WeekDayFriday, + WeekDayMonday, + WeekDaySaturday, + WeekDaySunday, + WeekDayThursday, + WeekDayTuesday, + WeekDayWednesday, + } +} + +// WorkspaceProvisioningState - The current deployment state of workspace resource. The provisioningState is to indicate states +// for resource provisioning. +type WorkspaceProvisioningState string + +const ( + WorkspaceProvisioningStateCanceled WorkspaceProvisioningState = "Canceled" + WorkspaceProvisioningStateCreating WorkspaceProvisioningState = "Creating" + WorkspaceProvisioningStateDeleting WorkspaceProvisioningState = "Deleting" + WorkspaceProvisioningStateFailed WorkspaceProvisioningState = "Failed" + WorkspaceProvisioningStateSoftDeleted WorkspaceProvisioningState = "SoftDeleted" + WorkspaceProvisioningStateSucceeded WorkspaceProvisioningState = "Succeeded" + WorkspaceProvisioningStateUnknown WorkspaceProvisioningState = "Unknown" + WorkspaceProvisioningStateUpdating WorkspaceProvisioningState = "Updating" +) + +// PossibleWorkspaceProvisioningStateValues returns the possible values for the WorkspaceProvisioningState const type. +func PossibleWorkspaceProvisioningStateValues() []WorkspaceProvisioningState { + return []WorkspaceProvisioningState{ + WorkspaceProvisioningStateCanceled, + WorkspaceProvisioningStateCreating, + WorkspaceProvisioningStateDeleting, + WorkspaceProvisioningStateFailed, + WorkspaceProvisioningStateSoftDeleted, + WorkspaceProvisioningStateSucceeded, + WorkspaceProvisioningStateUnknown, + WorkspaceProvisioningStateUpdating, + } +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_datacontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_datacontainers_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go index 47ad6af8ebad..737953cbbf37 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_datacontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewDataContainersClient(subscriptionID string, credential azcore.TokenCrede // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -102,7 +103,7 @@ func (client *DataContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -119,7 +120,7 @@ func (client *DataContainersClient) createOrUpdateHandleResponse(resp *http.Resp // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -163,7 +164,7 @@ func (client *DataContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -171,7 +172,7 @@ func (client *DataContainersClient) deleteCreateRequest(ctx context.Context, res // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -215,7 +216,7 @@ func (client *DataContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -231,8 +232,7 @@ func (client *DataContainersClient) getHandleResponse(resp *http.Response) (Data } // NewListPager - List data containers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - DataContainersClientListOptions contains the optional parameters for the DataContainersClient.List method. @@ -284,7 +284,7 @@ func (client *DataContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_datastores_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_datastores_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go index 0a6ae716793c..28ba4a5d06fb 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_datastores_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewDatastoresClient(subscriptionID string, credential azcore.TokenCredentia // CreateOrUpdate - Create or update datastore. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Datastore name. @@ -103,7 +104,7 @@ func (client *DatastoresClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.SkipValidation != nil { reqQP.Set("skipValidation", strconv.FormatBool(*options.SkipValidation)) } @@ -123,7 +124,7 @@ func (client *DatastoresClient) createOrUpdateHandleResponse(resp *http.Response // Delete - Delete datastore. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Datastore name. @@ -167,7 +168,7 @@ func (client *DatastoresClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -175,7 +176,7 @@ func (client *DatastoresClient) deleteCreateRequest(ctx context.Context, resourc // Get - Get datastore. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Datastore name. @@ -219,7 +220,7 @@ func (client *DatastoresClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -235,8 +236,7 @@ func (client *DatastoresClient) getHandleResponse(resp *http.Response) (Datastor } // NewListPager - List datastores. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - DatastoresClientListOptions contains the optional parameters for the DatastoresClient.List method. @@ -288,7 +288,7 @@ func (client *DatastoresClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -326,7 +326,7 @@ func (client *DatastoresClient) listHandleResponse(resp *http.Response) (Datasto // ListSecrets - Get datastore secrets. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Datastore name. @@ -370,7 +370,7 @@ func (client *DatastoresClient) listSecretsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_dataversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_dataversions_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go index de206ed0be8e..ef53a215d13e 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_dataversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewDataVersionsClient(subscriptionID string, credential azcore.TokenCredent // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -108,7 +109,7 @@ func (client *DataVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -125,7 +126,7 @@ func (client *DataVersionsClient) createOrUpdateHandleResponse(resp *http.Respon // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -174,7 +175,7 @@ func (client *DataVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +183,7 @@ func (client *DataVersionsClient) deleteCreateRequest(ctx context.Context, resou // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. @@ -231,7 +232,7 @@ func (client *DataVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,8 +248,7 @@ func (client *DataVersionsClient) getHandleResponse(resp *http.Response) (DataVe } // NewListPager - List data versions in the data container -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Data container's name @@ -305,7 +305,7 @@ func (client *DataVersionsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_environmentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_environmentcontainers_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go index babe01d06c2a..ba6b0d25c0f8 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_environmentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewEnvironmentContainersClient(subscriptionID string, credential azcore.Tok // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -102,7 +103,7 @@ func (client *EnvironmentContainersClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -119,7 +120,7 @@ func (client *EnvironmentContainersClient) createOrUpdateHandleResponse(resp *ht // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -164,7 +165,7 @@ func (client *EnvironmentContainersClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +173,7 @@ func (client *EnvironmentContainersClient) deleteCreateRequest(ctx context.Conte // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -217,7 +218,7 @@ func (client *EnvironmentContainersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,8 +234,7 @@ func (client *EnvironmentContainersClient) getHandleResponse(resp *http.Response } // NewListPager - List environment containers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - EnvironmentContainersClientListOptions contains the optional parameters for the EnvironmentContainersClient.List @@ -287,7 +287,7 @@ func (client *EnvironmentContainersClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_environmentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_environmentversions_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go index 1874154d6d67..6d36bd60cf2d 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_environmentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewEnvironmentVersionsClient(subscriptionID string, credential azcore.Token // CreateOrUpdate - Creates or updates an EnvironmentVersion. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Name of EnvironmentVersion. This is case-sensitive. @@ -108,7 +109,7 @@ func (client *EnvironmentVersionsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -125,7 +126,7 @@ func (client *EnvironmentVersionsClient) createOrUpdateHandleResponse(resp *http // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -175,7 +176,7 @@ func (client *EnvironmentVersionsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,7 +184,7 @@ func (client *EnvironmentVersionsClient) deleteCreateRequest(ctx context.Context // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -232,7 +233,7 @@ func (client *EnvironmentVersionsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,8 +249,7 @@ func (client *EnvironmentVersionsClient) getHandleResponse(resp *http.Response) } // NewListPager - List versions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -307,7 +307,7 @@ func (client *EnvironmentVersionsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod b/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod index b2ebb6999b74..a5ae2d99ca4a 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod @@ -1,21 +1,13 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2 +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v3 go 1.18 -require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 -) +require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 require ( github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // indirect - github.com/golang-jwt/jwt v3.2.1+incompatible // indirect - github.com/google/uuid v1.1.1 // indirect - github.com/kylelemons/godebug v1.1.0 // indirect - github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect - golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum b/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum index 8828b17b1853..3afb578030a5 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/go.sum @@ -1,33 +1,15 @@ github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0 h1:sVPhtT2qjO86rTUaWMr4WoES4TkjGnzcioXcnHV9s5k= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE= -github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= -github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_jobs_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go similarity index 95% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_jobs_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go index 836d0b560a82..0868d8f09816 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_jobs_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -19,6 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -56,7 +58,7 @@ func NewJobsClient(subscriptionID string, credential azcore.TokenCredential, opt // BeginCancel - Cancels a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // id - The name and identifier for the Job. This is case-sensitive. @@ -77,7 +79,7 @@ func (client *JobsClient) BeginCancel(ctx context.Context, resourceGroupName str // Cancel - Cancels a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *JobsClient) cancel(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginCancelOptions) (*http.Response, error) { req, err := client.cancelCreateRequest(ctx, resourceGroupName, workspaceName, id, options) if err != nil { @@ -117,7 +119,7 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,7 +127,7 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup // CreateOrUpdate - Creates and executes a Job. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // id - The name and identifier for the Job. This is case-sensitive. @@ -170,7 +172,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -187,7 +189,7 @@ func (client *JobsClient) createOrUpdateHandleResponse(resp *http.Response) (Job // BeginDelete - Deletes a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // id - The name and identifier for the Job. This is case-sensitive. @@ -206,7 +208,7 @@ func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName str // Delete - Deletes a Job (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *JobsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, id, options) if err != nil { @@ -246,7 +248,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -254,7 +256,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup // Get - Gets a Job by name/id. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // id - The name and identifier for the Job. This is case-sensitive. @@ -298,7 +300,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -314,8 +316,7 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR } // NewListPager - Lists Jobs in the workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - JobsClientListOptions contains the optional parameters for the JobsClient.List method. @@ -367,7 +368,7 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -380,6 +381,12 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupNa if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } + if options != nil && options.Scheduled != nil { + reqQP.Set("scheduled", strconv.FormatBool(*options.Scheduled)) + } + if options != nil && options.ScheduleID != nil { + reqQP.Set("scheduleId", *options.ScheduleID) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/labelingjobs_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/labelingjobs_client.go new file mode 100644 index 000000000000..92e43c71eeef --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/labelingjobs_client.go @@ -0,0 +1,512 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// LabelingJobsClient contains the methods for the LabelingJobs group. +// Don't use this type directly, use NewLabelingJobsClient() instead. +type LabelingJobsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewLabelingJobsClient creates a new instance of LabelingJobsClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewLabelingJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LabelingJobsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &LabelingJobsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Creates or updates a labeling job (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// id - The name and identifier for the LabelingJob. +// body - LabelingJob definition object. +// options - LabelingJobsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabelingJobsClient.BeginCreateOrUpdate +// method. +func (client *LabelingJobsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, id string, body LabelingJob, options *LabelingJobsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LabelingJobsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, id, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[LabelingJobsClientCreateOrUpdateResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[LabelingJobsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Creates or updates a labeling job (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *LabelingJobsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, id string, body LabelingJob, options *LabelingJobsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, id, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *LabelingJobsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, id string, body LabelingJob, options *LabelingJobsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// Delete - Delete a labeling job. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// id - The name and identifier for the LabelingJob. +// options - LabelingJobsClientDeleteOptions contains the optional parameters for the LabelingJobsClient.Delete method. +func (client *LabelingJobsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientDeleteOptions) (LabelingJobsClientDeleteResponse, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, id, options) + if err != nil { + return LabelingJobsClientDeleteResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LabelingJobsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusNoContent) { + return LabelingJobsClientDeleteResponse{}, runtime.NewResponseError(resp) + } + return LabelingJobsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *LabelingJobsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginExportLabels - Export labels from a labeling job (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// id - The name and identifier for the LabelingJob. +// body - The export summary. +// options - LabelingJobsClientBeginExportLabelsOptions contains the optional parameters for the LabelingJobsClient.BeginExportLabels +// method. +func (client *LabelingJobsClient) BeginExportLabels(ctx context.Context, resourceGroupName string, workspaceName string, id string, body ExportSummaryClassification, options *LabelingJobsClientBeginExportLabelsOptions) (*runtime.Poller[LabelingJobsClientExportLabelsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.exportLabels(ctx, resourceGroupName, workspaceName, id, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LabelingJobsClientExportLabelsResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[LabelingJobsClientExportLabelsResponse](options.ResumeToken, client.pl, nil) + } +} + +// ExportLabels - Export labels from a labeling job (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *LabelingJobsClient) exportLabels(ctx context.Context, resourceGroupName string, workspaceName string, id string, body ExportSummaryClassification, options *LabelingJobsClientBeginExportLabelsOptions) (*http.Response, error) { + req, err := client.exportLabelsCreateRequest(ctx, resourceGroupName, workspaceName, id, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// exportLabelsCreateRequest creates the ExportLabels request. +func (client *LabelingJobsClient) exportLabelsCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, id string, body ExportSummaryClassification, options *LabelingJobsClientBeginExportLabelsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// Get - Gets a labeling job by name/id. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// id - The name and identifier for the LabelingJob. +// options - LabelingJobsClientGetOptions contains the optional parameters for the LabelingJobsClient.Get method. +func (client *LabelingJobsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientGetOptions) (LabelingJobsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, id, options) + if err != nil { + return LabelingJobsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LabelingJobsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LabelingJobsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *LabelingJobsClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.IncludeJobInstructions != nil { + reqQP.Set("includeJobInstructions", strconv.FormatBool(*options.IncludeJobInstructions)) + } + if options != nil && options.IncludeLabelCategories != nil { + reqQP.Set("includeLabelCategories", strconv.FormatBool(*options.IncludeLabelCategories)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LabelingJobsClient) getHandleResponse(resp *http.Response) (LabelingJobsClientGetResponse, error) { + result := LabelingJobsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LabelingJob); err != nil { + return LabelingJobsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists labeling jobs in the workspace. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// options - LabelingJobsClientListOptions contains the optional parameters for the LabelingJobsClient.List method. +func (client *LabelingJobsClient) NewListPager(resourceGroupName string, workspaceName string, options *LabelingJobsClientListOptions) *runtime.Pager[LabelingJobsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[LabelingJobsClientListResponse]{ + More: func(page LabelingJobsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *LabelingJobsClientListResponse) (LabelingJobsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LabelingJobsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LabelingJobsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LabelingJobsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *LabelingJobsClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *LabelingJobsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LabelingJobsClient) listHandleResponse(resp *http.Response) (LabelingJobsClientListResponse, error) { + result := LabelingJobsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LabelingJobResourceArmPaginatedResult); err != nil { + return LabelingJobsClientListResponse{}, err + } + return result, nil +} + +// Pause - Pause a labeling job. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// id - The name and identifier for the LabelingJob. +// options - LabelingJobsClientPauseOptions contains the optional parameters for the LabelingJobsClient.Pause method. +func (client *LabelingJobsClient) Pause(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientPauseOptions) (LabelingJobsClientPauseResponse, error) { + req, err := client.pauseCreateRequest(ctx, resourceGroupName, workspaceName, id, options) + if err != nil { + return LabelingJobsClientPauseResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LabelingJobsClientPauseResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LabelingJobsClientPauseResponse{}, runtime.NewResponseError(resp) + } + return LabelingJobsClientPauseResponse{}, nil +} + +// pauseCreateRequest creates the Pause request. +func (client *LabelingJobsClient) pauseCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientPauseOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// BeginResume - Resume a labeling job (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// id - The name and identifier for the LabelingJob. +// options - LabelingJobsClientBeginResumeOptions contains the optional parameters for the LabelingJobsClient.BeginResume +// method. +func (client *LabelingJobsClient) BeginResume(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientBeginResumeOptions) (*runtime.Poller[LabelingJobsClientResumeResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resume(ctx, resourceGroupName, workspaceName, id, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[LabelingJobsClientResumeResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[LabelingJobsClientResumeResponse](options.ResumeToken, client.pl, nil) + } +} + +// Resume - Resume a labeling job (asynchronous). +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *LabelingJobsClient) resume(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientBeginResumeOptions) (*http.Response, error) { + req, err := client.resumeCreateRequest(ctx, resourceGroupName, workspaceName, id, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// resumeCreateRequest creates the Resume request. +func (client *LabelingJobsClient) resumeCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *LabelingJobsClientBeginResumeOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/resume" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if id == "" { + return nil, errors.New("parameter id cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{id}", url.PathEscape(id)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_modelcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_modelcontainers_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go index e7bf36c9a230..e61d6cda50f9 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_modelcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewModelContainersClient(subscriptionID string, credential azcore.TokenCred // CreateOrUpdate - Create or update container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -103,7 +104,7 @@ func (client *ModelContainersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -120,7 +121,7 @@ func (client *ModelContainersClient) createOrUpdateHandleResponse(resp *http.Res // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -164,7 +165,7 @@ func (client *ModelContainersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +173,7 @@ func (client *ModelContainersClient) deleteCreateRequest(ctx context.Context, re // Get - Get container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -216,7 +217,7 @@ func (client *ModelContainersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,8 +233,7 @@ func (client *ModelContainersClient) getHandleResponse(resp *http.Response) (Mod } // NewListPager - List model containers. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - ModelContainersClientListOptions contains the optional parameters for the ModelContainersClient.List method. @@ -285,7 +285,7 @@ func (client *ModelContainersClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models.go b/sdk/resourcemanager/machinelearning/armmachinelearning/models.go similarity index 57% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/models.go index 003a9881315b..86e3c936a178 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/models.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -18,9 +19,6 @@ type AKS struct { // The description of the Machine Learning compute. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // AKS properties Properties *AKSSchemaProperties `json:"properties,omitempty"` @@ -33,6 +31,9 @@ type AKS struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -44,7 +45,7 @@ type AKS struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type AKS. @@ -98,6 +99,33 @@ type AKSSchemaProperties struct { SystemServices []*SystemService `json:"systemServices,omitempty" azure:"ro"` } +type AccessKeyAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` + + // Category of the connection + Category *string `json:"category,omitempty"` + Credentials *WorkspaceConnectionAccessKey `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccessKeyAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: a.AuthType, + Category: a.Category, + Target: a.Target, + Value: a.Value, + ValueFormat: a.ValueFormat, + } +} + // AccountKeyDatastoreCredentials - Account key datastore credentials configuration. type AccountKeyDatastoreCredentials struct { // REQUIRED; [Required] Credential type used to authentication with storage. @@ -130,6 +158,12 @@ func (a *AccountKeyDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { } } +// AcrDetails - Details of ACR account to be used for the Registry +type AcrDetails struct { + SystemCreatedAcrAccount *SystemCreatedAcrAccount `json:"systemCreatedAcrAccount,omitempty"` + UserCreatedAcrAccount *UserCreatedAcrAccount `json:"userCreatedAcrAccount,omitempty"` +} + // AksComputeSecrets - Secrets related to a Machine Learning compute based on AKS. type AksComputeSecrets struct { // REQUIRED; The type of compute @@ -181,6 +215,19 @@ type AksNetworkingConfiguration struct { SubnetID *string `json:"subnetId,omitempty"` } +// AllNodes - All nodes means the service will be running on all of the nodes of the job +type AllNodes struct { + // REQUIRED; [Required] Type of the Nodes value + NodesValueType *NodesValueType `json:"nodesValueType,omitempty"` +} + +// GetNodes implements the NodesClassification interface for type AllNodes. +func (a *AllNodes) GetNodes() *Nodes { + return &Nodes{ + NodesValueType: a.NodesValueType, + } +} + // AmlCompute - An Azure Machine Learning compute. type AmlCompute struct { // REQUIRED; The type of compute @@ -189,9 +236,6 @@ type AmlCompute struct { // The description of the Machine Learning compute. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // Properties of AmlCompute Properties *AmlComputeProperties `json:"properties,omitempty"` @@ -204,6 +248,9 @@ type AmlCompute struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -215,7 +262,7 @@ type AmlCompute struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type AmlCompute. @@ -336,7 +383,7 @@ type AmlComputeSchema struct { Properties *AmlComputeProperties `json:"properties,omitempty"` } -// AmlOperation - Azure Machine Learning workspace REST API operation +// AmlOperation - Azure Machine Learning REST API operation type AmlOperation struct { // Display name of operation Display *AmlOperationDisplay `json:"display,omitempty"` @@ -365,7 +412,7 @@ type AmlOperationDisplay struct { // AmlOperationListResult - An array of operations supported by the resource provider. type AmlOperationListResult struct { - // List of AML workspace operations supported by the AML workspace resource provider. + // List of AML operations supported by the AML resource provider. Value []*AmlOperation `json:"value,omitempty"` } @@ -394,6 +441,14 @@ type AmlUserFeature struct { ID *string `json:"id,omitempty"` } +// ArmResourceID - ARM ResourceId of a resource +type ArmResourceID struct { + // 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}" + ResourceID *string `json:"resourceId,omitempty"` +} + type AssetBase struct { // The asset description text. Description *string `json:"description,omitempty"` @@ -442,6 +497,12 @@ type AssetJobInput struct { // AssetJobOutput - Asset output type. type AssetJobOutput struct { + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Output Asset Delivery Mode. Mode *OutputDeliveryMode `json:"mode,omitempty"` @@ -476,6 +537,136 @@ type AssignedUser struct { TenantID *string `json:"tenantId,omitempty"` } +// AutoForecastHorizon - Forecast horizon determined automatically by system. +type AutoForecastHorizon struct { + // REQUIRED; [Required] Set forecast horizon value selection mode. + Mode *ForecastHorizonMode `json:"mode,omitempty"` +} + +// GetForecastHorizon implements the ForecastHorizonClassification interface for type AutoForecastHorizon. +func (a *AutoForecastHorizon) GetForecastHorizon() *ForecastHorizon { + return &ForecastHorizon{ + Mode: a.Mode, + } +} + +// AutoMLJob class. Use this class for executing AutoML tasks like Classification/Regression etc. See TaskType enum for all +// the tasks supported. +type AutoMLJob struct { + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` + + // REQUIRED; [Required] This represents scenario which can be one of Tables/NLP/Image + TaskDetails AutoMLVerticalClassification `json:"taskDetails,omitempty"` + + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` + + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,omitempty"` + + // The asset description text. + Description *string `json:"description,omitempty"` + + // Display name of job. + DisplayName *string `json:"displayName,omitempty"` + + // The ARM resource ID of the Environment specification for the job. This is optional value to provide, if not provided, AutoML + // will default this to Production AutoML curated environment version when + // running the job. + EnvironmentID *string `json:"environmentId,omitempty"` + + // Environment variables included in the job. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + + // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + ExperimentName *string `json:"experimentName,omitempty"` + + // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken + // if null. + Identity IdentityConfigurationClassification `json:"identity,omitempty"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` + + // Mapping of output data bindings used in the job. + Outputs map[string]JobOutputClassification `json:"outputs,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // Compute Resource configuration for the job. + Resources *JobResourceConfiguration `json:"resources,omitempty"` + + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` +} + +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type AutoMLJob. +func (a *AutoMLJob) GetJobBaseProperties() *JobBaseProperties { + return &JobBaseProperties{ + ComponentID: a.ComponentID, + ComputeID: a.ComputeID, + DisplayName: a.DisplayName, + ExperimentName: a.ExperimentName, + Identity: a.Identity, + IsArchived: a.IsArchived, + JobType: a.JobType, + Services: a.Services, + Status: a.Status, + Description: a.Description, + Properties: a.Properties, + Tags: a.Tags, + } +} + +// AutoMLVerticalClassification provides polymorphic access to related types. +// Call the interface's GetAutoMLVertical() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoMLVertical, *Classification, *Forecasting, *ImageClassification, *ImageClassificationMultilabel, *ImageInstanceSegmentation, +// - *ImageObjectDetection, *Regression, *TextClassification, *TextClassificationMultilabel, *TextNer +type AutoMLVerticalClassification interface { + // GetAutoMLVertical returns the AutoMLVertical content of the underlying type. + GetAutoMLVertical() *AutoMLVertical +} + +// AutoMLVertical - AutoML vertical class. Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical +type AutoMLVertical struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` + + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` +} + +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type AutoMLVertical. +func (a *AutoMLVertical) GetAutoMLVertical() *AutoMLVertical { return a } + +// AutoNCrossValidations - N-Cross validations determined automatically. +type AutoNCrossValidations struct { + // REQUIRED; [Required] Mode for determining N-Cross validations. + Mode *NCrossValidationsMode `json:"mode,omitempty"` +} + +// GetNCrossValidations implements the NCrossValidationsClassification interface for type AutoNCrossValidations. +func (a *AutoNCrossValidations) GetNCrossValidations() *NCrossValidations { + return &NCrossValidations{ + Mode: a.Mode, + } +} + // AutoPauseProperties - Auto pause properties type AutoPauseProperties struct { DelayInMinutes *int32 `json:"delayInMinutes,omitempty"` @@ -489,6 +680,49 @@ type AutoScaleProperties struct { MinNodeCount *int32 `json:"minNodeCount,omitempty"` } +type AutoSeasonality struct { + // REQUIRED; [Required] Seasonality mode. + Mode *SeasonalityMode `json:"mode,omitempty"` +} + +// GetSeasonality implements the SeasonalityClassification interface for type AutoSeasonality. +func (a *AutoSeasonality) GetSeasonality() *Seasonality { + return &Seasonality{ + Mode: a.Mode, + } +} + +type AutoTargetLags struct { + // REQUIRED; [Required] Set target lags mode - Auto/Custom + Mode *TargetLagsMode `json:"mode,omitempty"` +} + +// GetTargetLags implements the TargetLagsClassification interface for type AutoTargetLags. +func (a *AutoTargetLags) GetTargetLags() *TargetLags { + return &TargetLags{ + Mode: a.Mode, + } +} + +// AutoTargetRollingWindowSize - Target lags rolling window determined automatically. +type AutoTargetRollingWindowSize struct { + // REQUIRED; [Required] TargetRollingWindowSiz detection mode. + Mode *TargetRollingWindowSizeMode `json:"mode,omitempty"` +} + +// GetTargetRollingWindowSize implements the TargetRollingWindowSizeClassification interface for type AutoTargetRollingWindowSize. +func (a *AutoTargetRollingWindowSize) GetTargetRollingWindowSize() *TargetRollingWindowSize { + return &TargetRollingWindowSize{ + Mode: a.Mode, + } +} + +// AutologgerSettings - Settings for Autologger. +type AutologgerSettings struct { + // REQUIRED; [Required] Indicates whether mlflow autologger is enabled. + MlflowAutologger *MLFlowAutologgerState `json:"mlflowAutologger,omitempty"` +} + // AzureBlobDatastore - Azure Blob datastore configuration. type AzureBlobDatastore struct { // REQUIRED; [Required] Account credentials. @@ -515,9 +749,15 @@ type AzureBlobDatastore struct { // Protocol used to communicate with the storage account. Protocol *string `json:"protocol,omitempty"` + // Azure Resource Group name + ResourceGroup *string `json:"resourceGroup,omitempty"` + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"` + // Azure Subscription Id + SubscriptionID *string `json:"subscriptionId,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` @@ -554,9 +794,15 @@ type AzureDataLakeGen1Datastore struct { // The asset property dictionary. Properties map[string]*string `json:"properties,omitempty"` + // Azure Resource Group name + ResourceGroup *string `json:"resourceGroup,omitempty"` + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"` + // Azure Subscription Id + SubscriptionID *string `json:"subscriptionId,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` @@ -602,9 +848,15 @@ type AzureDataLakeGen2Datastore struct { // Protocol used to communicate with the storage account. Protocol *string `json:"protocol,omitempty"` + // Azure Resource Group name + ResourceGroup *string `json:"resourceGroup,omitempty"` + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"` + // Azure Subscription Id + SubscriptionID *string `json:"subscriptionId,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` @@ -624,6 +876,15 @@ func (a *AzureDataLakeGen2Datastore) GetDatastoreProperties() *DatastoreProperti } } +// AzureDatastore - Base definition for Azure datastore contents configuration. +type AzureDatastore struct { + // Azure Resource Group name + ResourceGroup *string `json:"resourceGroup,omitempty"` + + // Azure Subscription Id + SubscriptionID *string `json:"subscriptionId,omitempty"` +} + // AzureFileDatastore - Azure File datastore configuration. type AzureFileDatastore struct { // REQUIRED; [Required] Storage account name. @@ -650,9 +911,15 @@ type AzureFileDatastore struct { // Protocol used to communicate with the storage account. Protocol *string `json:"protocol,omitempty"` + // Azure Resource Group name + ResourceGroup *string `json:"resourceGroup,omitempty"` + // Indicates which identity to use to authenticate service data access to customer's storage. ServiceDataAccessAuthIdentity *ServiceDataAccessAuthIdentity `json:"serviceDataAccessAuthIdentity,omitempty"` + // Azure Subscription Id + SubscriptionID *string `json:"subscriptionId,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` @@ -742,7 +1009,7 @@ type BatchDeploymentProperties struct { // Description of the endpoint deployment. Description *string `json:"description,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. + // ARM resource ID of the environment specification for the endpoint deployment. EnvironmentID *string `json:"environmentId,omitempty"` // Environment variables configuration for the deployment. @@ -777,7 +1044,7 @@ type BatchDeploymentProperties struct { Properties map[string]*string `json:"properties,omitempty"` // Indicates compute configuration for the job. If not provided, will default to the defaults defined in ResourceConfiguration. - Resources *ResourceConfiguration `json:"resources,omitempty"` + Resources *DeploymentResourceConfiguration `json:"resources,omitempty"` // Retry Settings for the batch inference operation. If not provided, will default to the defaults defined in BatchRetrySettings. RetrySettings *BatchRetrySettings `json:"retrySettings,omitempty"` @@ -965,6 +1232,17 @@ func (b *BayesianSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { } } +type BindOptions struct { + // Indicate whether to create host path. + CreateHostPath *bool `json:"createHostPath,omitempty"` + + // Type of Bind Option + Propagation *string `json:"propagation,omitempty"` + + // Mention the selinux options. + Selinux *string `json:"selinux,omitempty"` +} + // BuildContext - Configuration settings for Docker build context type BuildContext struct { // REQUIRED; [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation @@ -975,6 +1253,40 @@ type BuildContext struct { DockerfilePath *string `json:"dockerfilePath,omitempty"` } +type CSVExportSummary struct { + // REQUIRED; [Required] The format of exported labels, also as the discriminator. + Format *ExportFormatType `json:"format,omitempty"` + + // READ-ONLY; The container name to which the labels will be exported. + ContainerName *string `json:"containerName,omitempty" azure:"ro"` + + // READ-ONLY; The time when the export was completed. + EndDateTime *time.Time `json:"endDateTime,omitempty" azure:"ro"` + + // READ-ONLY; The total number of labeled datapoints exported. + ExportedRowCount *int64 `json:"exportedRowCount,omitempty" azure:"ro"` + + // READ-ONLY; Name and identifier of the job containing exported labels. + LabelingJobID *string `json:"labelingJobId,omitempty" azure:"ro"` + + // READ-ONLY; The output path where the labels will be exported. + SnapshotPath *string `json:"snapshotPath,omitempty" azure:"ro"` + + // READ-ONLY; The time when the export was requested. + StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` +} + +// GetExportSummary implements the ExportSummaryClassification interface for type CSVExportSummary. +func (c *CSVExportSummary) GetExportSummary() *ExportSummary { + return &ExportSummary{ + EndDateTime: c.EndDateTime, + ExportedRowCount: c.ExportedRowCount, + Format: c.Format, + LabelingJobID: c.LabelingJobID, + StartDateTime: c.StartDateTime, + } +} + // CertificateDatastoreCredentials - Certificate datastore credentials configuration. type CertificateDatastoreCredentials struct { // REQUIRED; [Required] Service principal client ID. @@ -1022,6 +1334,117 @@ func (c *CertificateDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { } } +// Classification task in AutoML Table vertical. +type Classification struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` + + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + + // Columns to use for CVSplit data. + CvSplitColumnNames []*string `json:"cvSplitColumnNames,omitempty"` + + // Featurization inputs needed for AutoML job. + FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` + + // Execution constraints for AutoMLJob. + LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` + + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. + NCrossValidations NCrossValidationsClassification `json:"nCrossValidations,omitempty"` + + // Positive label for binary metrics calculation. + PositiveLabel *string `json:"positiveLabel,omitempty"` + + // Primary metric for the task. + PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Test data input. + TestData *MLTableJobInput `json:"testData,omitempty"` + + // The fraction of test dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when + // validation dataset is not provided. + TestDataSize *float64 `json:"testDataSize,omitempty"` + + // Inputs for training phase for an AutoML Job. + TrainingSettings *ClassificationTrainingSettings `json:"trainingSettings,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` + + // 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. + WeightColumnName *string `json:"weightColumnName,omitempty"` +} + +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type Classification. +func (c *Classification) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: c.LogVerbosity, + TargetColumnName: c.TargetColumnName, + TaskType: c.TaskType, + TrainingData: c.TrainingData, + } +} + +// ClassificationTrainingSettings - Classification Training related configuration. +type ClassificationTrainingSettings struct { + // Allowed models for classification task. + AllowedTrainingAlgorithms []*ClassificationModels `json:"allowedTrainingAlgorithms,omitempty"` + + // Blocked models for classification task. + BlockedTrainingAlgorithms []*ClassificationModels `json:"blockedTrainingAlgorithms,omitempty"` + + // Enable recommendation of DNN models. + EnableDnnTraining *bool `json:"enableDnnTraining,omitempty"` + + // Flag to turn on explainability on best model. + EnableModelExplainability *bool `json:"enableModelExplainability,omitempty"` + + // Flag for enabling onnx compatible models. + EnableOnnxCompatibleModels *bool `json:"enableOnnxCompatibleModels,omitempty"` + + // Enable stack ensemble run. + EnableStackEnsemble *bool `json:"enableStackEnsemble,omitempty"` + + // Enable voting ensemble run. + EnableVoteEnsemble *bool `json:"enableVoteEnsemble,omitempty"` + + // During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. + // Configure this parameter with a higher value than 300 secs, if more time + // is needed. + EnsembleModelDownloadTimeout *string `json:"ensembleModelDownloadTimeout,omitempty"` + + // Stack ensemble settings for stack ensemble run. + StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` + + // 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. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` +} + // ClusterUpdateParameters - AmlCompute update parameters. type ClusterUpdateParameters struct { // The properties of the amlCompute. @@ -1034,6 +1457,40 @@ type ClusterUpdateProperties struct { Properties *ScaleSettingsInformation `json:"properties,omitempty"` } +type CocoExportSummary struct { + // REQUIRED; [Required] The format of exported labels, also as the discriminator. + Format *ExportFormatType `json:"format,omitempty"` + + // READ-ONLY; The container name to which the labels will be exported. + ContainerName *string `json:"containerName,omitempty" azure:"ro"` + + // READ-ONLY; The time when the export was completed. + EndDateTime *time.Time `json:"endDateTime,omitempty" azure:"ro"` + + // READ-ONLY; The total number of labeled datapoints exported. + ExportedRowCount *int64 `json:"exportedRowCount,omitempty" azure:"ro"` + + // READ-ONLY; Name and identifier of the job containing exported labels. + LabelingJobID *string `json:"labelingJobId,omitempty" azure:"ro"` + + // READ-ONLY; The output path where the labels will be exported. + SnapshotPath *string `json:"snapshotPath,omitempty" azure:"ro"` + + // READ-ONLY; The time when the export was requested. + StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` +} + +// GetExportSummary implements the ExportSummaryClassification interface for type CocoExportSummary. +func (c *CocoExportSummary) GetExportSummary() *ExportSummary { + return &ExportSummary{ + EndDateTime: c.EndDateTime, + ExportedRowCount: c.ExportedRowCount, + Format: c.Format, + LabelingJobID: c.LabelingJobID, + StartDateTime: c.StartDateTime, + } +} + // CodeConfiguration - Configuration for a scoring code asset. type CodeConfiguration struct { // REQUIRED; [Required] The script to execute on startup. eg. "score.py" @@ -1080,6 +1537,9 @@ type CodeContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the code container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // CodeContainerResourceArmPaginatedResult - A paginated list of CodeContainer entities. @@ -1150,6 +1610,9 @@ type CodeVersionProperties struct { // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Provisioning state for the code version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // CodeVersionResourceArmPaginatedResult - A paginated list of CodeVersion entities. @@ -1186,6 +1649,15 @@ type CodeVersionsClientListOptions struct { Top *int32 } +// ColumnTransformer - Column transformer parameters. +type ColumnTransformer struct { + // Fields to apply transformer logic on. + Fields []*string `json:"fields,omitempty"` + + // Different properties to be passed to transformer. Input expected is dictionary of key,value pairs in JSON format. + Parameters interface{} `json:"parameters,omitempty"` +} + // CommandJob - Command job definition. type CommandJob struct { // REQUIRED; [Required] The command to execute on startup of the job. eg. "python train.py" @@ -1197,9 +1669,15 @@ type CommandJob struct { // REQUIRED; [Required] Specifies the type of job. JobType *JobType `json:"jobType,omitempty"` + // Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + AutologgerSettings *AutologgerSettings `json:"autologgerSettings,omitempty"` + // ARM resource ID of the code asset. CodeID *string `json:"codeId,omitempty"` + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` + // ARM resource ID of the compute resource. ComputeID *string `json:"computeId,omitempty"` @@ -1238,7 +1716,7 @@ type CommandJob struct { Properties map[string]*string `json:"properties,omitempty"` // Compute Resource configuration for the job. - Resources *ResourceConfiguration `json:"resources,omitempty"` + Resources *JobResourceConfiguration `json:"resources,omitempty"` // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. Services map[string]*JobService `json:"services,omitempty"` @@ -1256,6 +1734,7 @@ type CommandJob struct { // GetJobBaseProperties implements the JobBasePropertiesClassification interface for type CommandJob. func (c *CommandJob) GetJobBaseProperties() *JobBaseProperties { return &JobBaseProperties{ + ComponentID: c.ComponentID, ComputeID: c.ComputeID, DisplayName: c.DisplayName, ExperimentName: c.ExperimentName, @@ -1325,6 +1804,9 @@ type ComponentContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the component container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // ComponentContainerResourceArmPaginatedResult - A paginated list of ComponentContainer entities. @@ -1397,6 +1879,9 @@ type ComponentVersionProperties struct { // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Provisioning state for the component version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // ComponentVersionResourceArmPaginatedResult - A paginated list of ComponentVersion entities. @@ -1454,9 +1939,6 @@ type Compute struct { // The description of the Machine Learning compute. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // ARM resource id of the underlying compute ResourceID *string `json:"resourceId,omitempty"` @@ -1466,6 +1948,9 @@ type Compute struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -1477,7 +1962,7 @@ type Compute struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type Compute. @@ -1540,6 +2025,17 @@ type ComputeClientListOptions struct { Skip *string } +// ComputeClientUpdateCustomServicesOptions contains the optional parameters for the ComputeClient.UpdateCustomServices method. +type ComputeClientUpdateCustomServicesOptions struct { + // placeholder for future optional parameters +} + +// ComputeClientUpdateIdleShutdownSettingOptions contains the optional parameters for the ComputeClient.UpdateIdleShutdownSetting +// method. +type ComputeClientUpdateIdleShutdownSettingOptions struct { + // placeholder for future optional parameters +} + // ComputeInstance - An Azure Machine Learning compute instance. type ComputeInstance struct { // REQUIRED; The type of compute @@ -1548,9 +2044,6 @@ type ComputeInstance struct { // The description of the Machine Learning compute. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // Properties of ComputeInstance Properties *ComputeInstanceProperties `json:"properties,omitempty"` @@ -1563,6 +2056,9 @@ type ComputeInstance struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -1574,7 +2070,7 @@ type ComputeInstance struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type ComputeInstance. @@ -1602,6 +2098,12 @@ type ComputeInstanceApplication struct { EndpointURI *string `json:"endpointUri,omitempty"` } +// ComputeInstanceAutologgerSettings - Specifies settings for autologger. +type ComputeInstanceAutologgerSettings struct { + // Indicates whether mlflow autologger is enabled for notebooks. + MlflowAutologger *MlflowAutologger `json:"mlflowAutologger,omitempty"` +} + // ComputeInstanceConnectivityEndpoints - Defines all connectivity endpoints and properties for an ComputeInstance. type ComputeInstanceConnectivityEndpoints struct { // READ-ONLY; Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). @@ -1720,14 +2222,24 @@ type ComputeInstanceProperties struct { // user can access applications on this instance depending on his/her assigned role. ApplicationSharingPolicy *ApplicationSharingPolicy `json:"applicationSharingPolicy,omitempty"` + // Specifies settings for autologger. + AutologgerSettings *ComputeInstanceAutologgerSettings `json:"autologgerSettings,omitempty"` + // The Compute Instance Authorization type. Available values are personal (default). ComputeInstanceAuthorizationType *ComputeInstanceAuthorizationType `json:"computeInstanceAuthorizationType,omitempty"` + // List of Custom Services added to the compute. + CustomServices []*CustomService `json:"customServices,omitempty"` + // 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. EnableNodePublicIP *bool `json:"enableNodePublicIp,omitempty"` + // Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum + // is 3 days. + IdleTimeBeforeShutdown *string `json:"idleTimeBeforeShutdown,omitempty"` + // Settings for a personal compute instance. PersonalComputeInstanceSettings *PersonalComputeInstanceSettings `json:"personalComputeInstanceSettings,omitempty"` @@ -1767,6 +2279,9 @@ type ComputeInstanceProperties struct { // READ-ONLY; The last operation on ComputeInstance. LastOperation *ComputeInstanceLastOperation `json:"lastOperation,omitempty" azure:"ro"` + // READ-ONLY; Returns metadata about the operating system image for this compute instance. + OSImageMetadata *ImageMetadata `json:"osImageMetadata,omitempty" azure:"ro"` + // READ-ONLY; The list of schedules to be applied on the computes. Schedules *ComputeSchedules `json:"schedules,omitempty" azure:"ro"` @@ -1867,11 +2382,23 @@ func (c *ComputeSecrets) GetComputeSecrets() *ComputeSecrets { return c } // ComputeStartStopSchedule - Compute start stop schedule properties type ComputeStartStopSchedule struct { - // The compute power action. - Action *ComputePowerAction `json:"action,omitempty"` - Schedule *ScheduleBase `json:"schedule,omitempty"` + // [Required] The compute power action. + Action *ComputePowerAction `json:"action,omitempty"` + + // The workflow trigger cron for ComputeStartStop schedule type. + Cron *Cron `json:"cron,omitempty"` - // READ-ONLY; Schedule id. + // The workflow trigger recurrence for ComputeStartStop schedule type. + Recurrence *Recurrence `json:"recurrence,omitempty"` + + // [Deprecated] Not used any more. + Schedule *ScheduleBase `json:"schedule,omitempty"` + + // Is the schedule enabled or disabled? + Status *ScheduleStatus `json:"status,omitempty"` + TriggerType *TriggerType `json:"triggerType,omitempty"` + + // READ-ONLY; A system assigned id for the schedule. ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The current deployment state of schedule. @@ -1903,6 +2430,65 @@ type CosmosDbSettings struct { CollectionsThroughput *int32 `json:"collectionsThroughput,omitempty"` } +// Cron - The workflow trigger cron for ComputeStartStop schedule type. +type Cron struct { + // [Required] Specifies cron expression of schedule. The expression should follow NCronTab format. + Expression *string `json:"expression,omitempty"` + + // The start time in yyyy-MM-ddTHH:mm:ss format. + StartTime *string `json:"startTime,omitempty"` + + // 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 + TimeZone *string `json:"timeZone,omitempty"` +} + +type CronTrigger struct { + // REQUIRED; [Required] Specifies cron expression of schedule. The expression should follow NCronTab format. + Expression *string `json:"expression,omitempty"` + + // REQUIRED; [Required] + TriggerType *TriggerType `json:"triggerType,omitempty"` + + // Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. Recommented + // format would be "2022-06-01T00:00:01" If not present, the schedule will + // run indefinitely + EndTime *string `json:"endTime,omitempty"` + + // Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + StartTime *string `json:"startTime,omitempty"` + + // 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 + TimeZone *string `json:"timeZone,omitempty"` +} + +// GetTriggerBase implements the TriggerBaseClassification interface for type CronTrigger. +func (c *CronTrigger) GetTriggerBase() *TriggerBase { + return &TriggerBase{ + EndTime: c.EndTime, + StartTime: c.StartTime, + TimeZone: c.TimeZone, + TriggerType: c.TriggerType, + } +} + +// CustomForecastHorizon - The desired maximum forecast horizon in units of time-series frequency. +type CustomForecastHorizon struct { + // REQUIRED; [Required] Set forecast horizon value selection mode. + Mode *ForecastHorizonMode `json:"mode,omitempty"` + + // REQUIRED; [Required] Forecast horizon value. + Value *int32 `json:"value,omitempty"` +} + +// GetForecastHorizon implements the ForecastHorizonClassification interface for type CustomForecastHorizon. +func (c *CustomForecastHorizon) GetForecastHorizon() *ForecastHorizon { + return &ForecastHorizon{ + Mode: c.Mode, + } +} + type CustomModelJobInput struct { // REQUIRED; [Required] Specifies the type of job. JobInputType *JobInputType `json:"jobInputType,omitempty"` @@ -1929,6 +2515,12 @@ type CustomModelJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -1947,10 +2539,95 @@ func (c *CustomModelJobOutput) GetJobOutput() *JobOutput { } } -// DataContainer - Azure Resource Manager resource envelope. -type DataContainer struct { - // REQUIRED; [Required] Additional attributes of the entity. - Properties *DataContainerProperties `json:"properties,omitempty"` +// CustomNCrossValidations - N-Cross validations are specified by user. +type CustomNCrossValidations struct { + // REQUIRED; [Required] Mode for determining N-Cross validations. + Mode *NCrossValidationsMode `json:"mode,omitempty"` + + // REQUIRED; [Required] N-Cross validations value. + Value *int32 `json:"value,omitempty"` +} + +// GetNCrossValidations implements the NCrossValidationsClassification interface for type CustomNCrossValidations. +func (c *CustomNCrossValidations) GetNCrossValidations() *NCrossValidations { + return &NCrossValidations{ + Mode: c.Mode, + } +} + +type CustomSeasonality struct { + // REQUIRED; [Required] Seasonality mode. + Mode *SeasonalityMode `json:"mode,omitempty"` + + // REQUIRED; [Required] Seasonality value. + Value *int32 `json:"value,omitempty"` +} + +// GetSeasonality implements the SeasonalityClassification interface for type CustomSeasonality. +func (c *CustomSeasonality) GetSeasonality() *Seasonality { + return &Seasonality{ + Mode: c.Mode, + } +} + +// CustomService - Specifies the custom service configuration +type CustomService struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]interface{} + + // Describes the docker settings for the image + Docker *Docker `json:"docker,omitempty"` + + // Configuring the endpoints for the container + Endpoints []*Endpoint `json:"endpoints,omitempty"` + + // Environment Variable for the container + EnvironmentVariables map[string]*EnvironmentVariable `json:"environmentVariables,omitempty"` + + // Describes the Image Specifications + Image *Image `json:"image,omitempty"` + + // Name of the Custom Service + Name *string `json:"name,omitempty"` + + // Configuring the volumes for the container + Volumes []*VolumeDefinition `json:"volumes,omitempty"` +} + +type CustomTargetLags struct { + // REQUIRED; [Required] Set target lags mode - Auto/Custom + Mode *TargetLagsMode `json:"mode,omitempty"` + + // REQUIRED; [Required] Set target lags values. + Values []*int32 `json:"values,omitempty"` +} + +// GetTargetLags implements the TargetLagsClassification interface for type CustomTargetLags. +func (c *CustomTargetLags) GetTargetLags() *TargetLags { + return &TargetLags{ + Mode: c.Mode, + } +} + +type CustomTargetRollingWindowSize struct { + // REQUIRED; [Required] TargetRollingWindowSiz detection mode. + Mode *TargetRollingWindowSizeMode `json:"mode,omitempty"` + + // REQUIRED; [Required] TargetRollingWindowSize value. + Value *int32 `json:"value,omitempty"` +} + +// GetTargetRollingWindowSize implements the TargetRollingWindowSizeClassification interface for type CustomTargetRollingWindowSize. +func (c *CustomTargetRollingWindowSize) GetTargetRollingWindowSize() *TargetRollingWindowSize { + return &TargetRollingWindowSize{ + Mode: c.Mode, + } +} + +// DataContainer - Azure Resource Manager resource envelope. +type DataContainer struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *DataContainerProperties `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` @@ -2030,9 +2707,6 @@ type DataFactory struct { // The description of the Machine Learning compute. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // ARM resource id of the underlying compute ResourceID *string `json:"resourceId,omitempty"` @@ -2042,6 +2716,9 @@ type DataFactory struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -2053,7 +2730,7 @@ type DataFactory struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type DataFactory. @@ -2078,11 +2755,8 @@ type DataLakeAnalytics struct { ComputeType *ComputeType `json:"computeType,omitempty"` // The description of the Machine Learning compute. - Description *string `json:"description,omitempty"` - - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - Properties *DataLakeAnalyticsSchemaProperties `json:"properties,omitempty"` + Description *string `json:"description,omitempty"` + Properties *DataLakeAnalyticsSchemaProperties `json:"properties,omitempty"` // ARM resource id of the underlying compute ResourceID *string `json:"resourceId,omitempty"` @@ -2093,6 +2767,9 @@ type DataLakeAnalytics struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -2104,7 +2781,7 @@ type DataLakeAnalytics struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type DataLakeAnalytics. @@ -2183,7 +2860,7 @@ type DataVersionBaseProperties struct { // REQUIRED; [Required] Specifies the type of data. DataType *DataType `json:"dataType,omitempty"` - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -2255,9 +2932,6 @@ type Databricks struct { // The description of the Machine Learning compute. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // Properties of Databricks Properties *DatabricksProperties `json:"properties,omitempty"` @@ -2270,6 +2944,9 @@ type Databricks struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -2281,7 +2958,7 @@ type Databricks struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type Databricks. @@ -2336,6 +3013,37 @@ type DatabricksSchema struct { Properties *DatabricksProperties `json:"properties,omitempty"` } +type DatasetExportSummary struct { + // REQUIRED; [Required] The format of exported labels, also as the discriminator. + Format *ExportFormatType `json:"format,omitempty"` + + // READ-ONLY; The time when the export was completed. + EndDateTime *time.Time `json:"endDateTime,omitempty" azure:"ro"` + + // READ-ONLY; The total number of labeled datapoints exported. + ExportedRowCount *int64 `json:"exportedRowCount,omitempty" azure:"ro"` + + // READ-ONLY; The unique name of the labeled data asset. + LabeledAssetName *string `json:"labeledAssetName,omitempty" azure:"ro"` + + // READ-ONLY; Name and identifier of the job containing exported labels. + LabelingJobID *string `json:"labelingJobId,omitempty" azure:"ro"` + + // READ-ONLY; The time when the export was requested. + StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` +} + +// GetExportSummary implements the ExportSummaryClassification interface for type DatasetExportSummary. +func (d *DatasetExportSummary) GetExportSummary() *ExportSummary { + return &ExportSummary{ + EndDateTime: d.EndDateTime, + ExportedRowCount: d.ExportedRowCount, + Format: d.Format, + LabelingJobID: d.LabelingJobID, + StartDateTime: d.StartDateTime, + } +} + // Datastore - Azure Resource Manager resource envelope. type Datastore struct { // REQUIRED; [Required] Additional attributes of the entity. @@ -2357,8 +3065,8 @@ type Datastore struct { // DatastoreCredentialsClassification provides polymorphic access to related types. // Call the interface's GetDatastoreCredentials() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *AccountKeyDatastoreCredentials, *CertificateDatastoreCredentials, *DatastoreCredentials, *NoneDatastoreCredentials, -// - *SasDatastoreCredentials, *ServicePrincipalDatastoreCredentials +// - *AccountKeyDatastoreCredentials, *CertificateDatastoreCredentials, *DatastoreCredentials, *KerberosKeytabCredentials, +// - *KerberosPasswordCredentials, *NoneDatastoreCredentials, *SasDatastoreCredentials, *ServicePrincipalDatastoreCredentials type DatastoreCredentialsClassification interface { // GetDatastoreCredentials returns the DatastoreCredentials content of the underlying type. GetDatastoreCredentials() *DatastoreCredentials @@ -2376,7 +3084,8 @@ func (d *DatastoreCredentials) GetDatastoreCredentials() *DatastoreCredentials { // DatastorePropertiesClassification provides polymorphic access to related types. // Call the interface's GetDatastoreProperties() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *AzureBlobDatastore, *AzureDataLakeGen1Datastore, *AzureDataLakeGen2Datastore, *AzureFileDatastore, *DatastoreProperties +// - *AzureBlobDatastore, *AzureDataLakeGen1Datastore, *AzureDataLakeGen2Datastore, *AzureFileDatastore, *DatastoreProperties, +// - *HdfsDatastore type DatastorePropertiesClassification interface { // GetDatastoreProperties returns the DatastoreProperties content of the underlying type. GetDatastoreProperties() *DatastoreProperties @@ -2418,7 +3127,8 @@ type DatastoreResourceArmPaginatedResult struct { // DatastoreSecretsClassification provides polymorphic access to related types. // Call the interface's GetDatastoreSecrets() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *AccountKeyDatastoreSecrets, *CertificateDatastoreSecrets, *DatastoreSecrets, *SasDatastoreSecrets, *ServicePrincipalDatastoreSecrets +// - *AccountKeyDatastoreSecrets, *CertificateDatastoreSecrets, *DatastoreSecrets, *KerberosKeytabSecrets, *KerberosPasswordSecrets, +// - *SasDatastoreSecrets, *ServicePrincipalDatastoreSecrets type DatastoreSecretsClassification interface { // GetDatastoreSecrets returns the DatastoreSecrets content of the underlying type. GetDatastoreSecrets() *DatastoreSecrets @@ -2497,6 +3207,17 @@ type DeploymentLogsRequest struct { Tail *int32 `json:"tail,omitempty"` } +type DeploymentResourceConfiguration struct { + // Optional number of instances or nodes used by the compute target. + InstanceCount *int32 `json:"instanceCount,omitempty"` + + // Optional type of VM used as supported by the compute target. + InstanceType *string `json:"instanceType,omitempty"` + + // Additional properties bag. + Properties map[string]interface{} `json:"properties,omitempty"` +} + type DiagnoseRequestProperties struct { // Setting for diagnosing dependent application insights ApplicationInsights map[string]interface{} `json:"applicationInsights,omitempty"` @@ -2580,6 +3301,14 @@ func (d *DistributionConfiguration) GetDistributionConfiguration() *Distribution return d } +type Docker struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]interface{} + + // Indicate whether container shall run in privileged or non-privileged mode. + Privileged *bool `json:"privileged,omitempty"` +} + // EarlyTerminationPolicyClassification provides polymorphic access to related types. // Call the interface's GetEarlyTerminationPolicy() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: @@ -2615,6 +3344,11 @@ type EncryptionKeyVaultProperties struct { IdentityClientID *string `json:"identityClientId,omitempty"` } +type EncryptionKeyVaultUpdateProperties struct { + // REQUIRED; Key Vault uri to access the encryption key. + KeyIdentifier *string `json:"keyIdentifier,omitempty"` +} + type EncryptionProperty struct { // REQUIRED; Customer Key vault properties. KeyVaultProperties *EncryptionKeyVaultProperties `json:"keyVaultProperties,omitempty"` @@ -2626,6 +3360,28 @@ type EncryptionProperty struct { Identity *IdentityForCmk `json:"identity,omitempty"` } +type EncryptionUpdateProperties struct { + // REQUIRED; Customer Key vault properties. + KeyVaultProperties *EncryptionKeyVaultUpdateProperties `json:"keyVaultProperties,omitempty"` +} + +type Endpoint struct { + // Host IP over which the application is exposed from the container + HostIP *string `json:"hostIp,omitempty"` + + // Name of the Endpoint + Name *string `json:"name,omitempty"` + + // Protocol over which communication will happen over this endpoint + Protocol *Protocol `json:"protocol,omitempty"` + + // Port over which the application is exposed from container. + Published *int32 `json:"published,omitempty"` + + // Application port inside the container. + Target *int32 `json:"target,omitempty"` +} + // EndpointAuthKeys - Keys for endpoint authentication. type EndpointAuthKeys struct { // The primary key. @@ -2658,7 +3414,7 @@ type EndpointDeploymentPropertiesBase struct { // Description of the endpoint deployment. Description *string `json:"description,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. + // ARM resource ID of the environment specification for the endpoint deployment. EnvironmentID *string `json:"environmentId,omitempty"` // Environment variables configuration for the deployment. @@ -2691,6 +3447,21 @@ type EndpointPropertiesBase struct { SwaggerURI *string `json:"swaggerUri,omitempty" azure:"ro"` } +type EndpointScheduleAction struct { + // REQUIRED; [Required] Specifies the action type of the schedule + ActionType *ScheduleActionType `json:"actionType,omitempty"` + + // REQUIRED; [Required] Defines Schedule action definition details. + EndpointInvocationDefinition interface{} `json:"endpointInvocationDefinition,omitempty"` +} + +// GetScheduleActionBase implements the ScheduleActionBaseClassification interface for type EndpointScheduleAction. +func (e *EndpointScheduleAction) GetScheduleActionBase() *ScheduleActionBase { + return &ScheduleActionBase{ + ActionType: e.ActionType, + } +} + // EnvironmentContainer - Azure Resource Manager resource envelope. type EnvironmentContainer struct { // REQUIRED; [Required] Additional attributes of the entity. @@ -2728,6 +3499,9 @@ type EnvironmentContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the environment container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // EnvironmentContainerResourceArmPaginatedResult - A paginated list of EnvironmentContainer entities. @@ -2763,6 +3537,17 @@ type EnvironmentContainersClientListOptions struct { Skip *string } +type EnvironmentVariable struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]interface{} + + // Type of the Environment Variable. Possible values are: local - For local variable + Type *EnvironmentVariableType `json:"type,omitempty"` + + // Value of the Environment variable + Value *string `json:"value,omitempty"` +} + // EnvironmentVersion - Azure Resource Manager resource envelope. type EnvironmentVersion struct { // REQUIRED; [Required] Additional attributes of the entity. @@ -2783,6 +3568,9 @@ type EnvironmentVersion struct { // EnvironmentVersionProperties - Environment version details. type EnvironmentVersionProperties struct { + // Defines if image needs to be rebuilt based on base image changes. + AutoRebuild *AutoRebuildSetting `json:"autoRebuild,omitempty"` + // Configuration settings for Docker build context. Build *BuildContext `json:"build,omitempty"` @@ -2815,6 +3603,9 @@ type EnvironmentVersionProperties struct { // READ-ONLY; Environment type is either user managed or curated by the Azure ML service EnvironmentType *EnvironmentType `json:"environmentType,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the environment version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // EnvironmentVersionResourceArmPaginatedResult - A paginated list of EnvironmentVersion entities. @@ -2912,6 +3703,35 @@ type EstimatedVMPrices struct { Values []*EstimatedVMPrice `json:"values,omitempty"` } +// ExportSummaryClassification provides polymorphic access to related types. +// Call the interface's GetExportSummary() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CSVExportSummary, *CocoExportSummary, *DatasetExportSummary, *ExportSummary +type ExportSummaryClassification interface { + // GetExportSummary returns the ExportSummary content of the underlying type. + GetExportSummary() *ExportSummary +} + +type ExportSummary struct { + // REQUIRED; [Required] The format of exported labels, also as the discriminator. + Format *ExportFormatType `json:"format,omitempty"` + + // READ-ONLY; The time when the export was completed. + EndDateTime *time.Time `json:"endDateTime,omitempty" azure:"ro"` + + // READ-ONLY; The total number of labeled datapoints exported. + ExportedRowCount *int64 `json:"exportedRowCount,omitempty" azure:"ro"` + + // READ-ONLY; Name and identifier of the job containing exported labels. + LabelingJobID *string `json:"labelingJobId,omitempty" azure:"ro"` + + // READ-ONLY; The time when the export was requested. + StartDateTime *time.Time `json:"startDateTime,omitempty" azure:"ro"` +} + +// GetExportSummary implements the ExportSummaryClassification interface for type ExportSummary. +func (e *ExportSummary) GetExportSummary() *ExportSummary { return e } + type ExternalFQDNResponse struct { Value []*FQDNEndpoints `json:"value,omitempty"` } @@ -2934,11 +3754,197 @@ type FQDNEndpointsProperties struct { Endpoints []*FQDNEndpoint `json:"endpoints,omitempty"` } +// FeaturizationSettings - Featurization Configuration. +type FeaturizationSettings struct { + // Dataset language, useful for the text data. + DatasetLanguage *string `json:"datasetLanguage,omitempty"` +} + type FlavorData struct { // Model flavor-specific data. Data map[string]*string `json:"data,omitempty"` } +// ForecastHorizonClassification provides polymorphic access to related types. +// Call the interface's GetForecastHorizon() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoForecastHorizon, *CustomForecastHorizon, *ForecastHorizon +type ForecastHorizonClassification interface { + // GetForecastHorizon returns the ForecastHorizon content of the underlying type. + GetForecastHorizon() *ForecastHorizon +} + +// ForecastHorizon - The desired maximum forecast horizon in units of time-series frequency. +type ForecastHorizon struct { + // REQUIRED; [Required] Set forecast horizon value selection mode. + Mode *ForecastHorizonMode `json:"mode,omitempty"` +} + +// GetForecastHorizon implements the ForecastHorizonClassification interface for type ForecastHorizon. +func (f *ForecastHorizon) GetForecastHorizon() *ForecastHorizon { return f } + +// Forecasting task in AutoML Table vertical. +type Forecasting struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` + + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + + // Columns to use for CVSplit data. + CvSplitColumnNames []*string `json:"cvSplitColumnNames,omitempty"` + + // Featurization inputs needed for AutoML job. + FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` + + // Forecasting task specific inputs. + ForecastingSettings *ForecastingSettings `json:"forecastingSettings,omitempty"` + + // Execution constraints for AutoMLJob. + LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` + + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. + NCrossValidations NCrossValidationsClassification `json:"nCrossValidations,omitempty"` + + // Primary metric for forecasting task. + PrimaryMetric *ForecastingPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Test data input. + TestData *MLTableJobInput `json:"testData,omitempty"` + + // The fraction of test dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when + // validation dataset is not provided. + TestDataSize *float64 `json:"testDataSize,omitempty"` + + // Inputs for training phase for an AutoML Job. + TrainingSettings *ForecastingTrainingSettings `json:"trainingSettings,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` + + // 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. + WeightColumnName *string `json:"weightColumnName,omitempty"` +} + +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type Forecasting. +func (f *Forecasting) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: f.LogVerbosity, + TargetColumnName: f.TargetColumnName, + TaskType: f.TaskType, + TrainingData: f.TrainingData, + } +} + +// ForecastingSettings - Forecasting specific parameters. +type ForecastingSettings struct { + // Country or region for holidays for forecasting tasks. These should be ISO 3166 two-letter country/region codes, for example + // 'US' or 'GB'. + CountryOrRegionForHolidays *string `json:"countryOrRegionForHolidays,omitempty"` + + // Number of periods between the origin time of one CV fold and the next fold. For example, if CVStepSize = 3 for daily data, + // the origin time for each fold will be three days apart. + CvStepSize *int32 `json:"cvStepSize,omitempty"` + + // Flag for generating lags for the numeric features with 'auto' or null. + FeatureLags *FeatureLags `json:"featureLags,omitempty"` + + // The desired maximum forecast horizon in units of time-series frequency. + ForecastHorizon ForecastHorizonClassification `json:"forecastHorizon,omitempty"` + + // When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, + // etc. The forecast frequency is dataset frequency by default. + Frequency *string `json:"frequency,omitempty"` + + // Set time series seasonality as an integer multiple of the series frequency. If seasonality is set to 'auto', it will be + // inferred. + Seasonality SeasonalityClassification `json:"seasonality,omitempty"` + + // The parameter defining how if AutoML should handle short time series. + ShortSeriesHandlingConfig *ShortSeriesHandlingConfiguration `json:"shortSeriesHandlingConfig,omitempty"` + + // The function to be used to aggregate the time series target column to conform to a user specified frequency. If the TargetAggregateFunction + // is set i.e. not 'None', but the freq parameter is not set, + // the error is raised. The possible target aggregation functions are: "sum", "max", "min" and "mean". + TargetAggregateFunction *TargetAggregationFunction `json:"targetAggregateFunction,omitempty"` + + // The number of past periods to lag from the target column. + TargetLags TargetLagsClassification `json:"targetLags,omitempty"` + + // The number of past periods used to create a rolling window average of the target column. + TargetRollingWindowSize TargetRollingWindowSizeClassification `json:"targetRollingWindowSize,omitempty"` + + // The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data + // used for building the time series and inferring its frequency. + TimeColumnName *string `json:"timeColumnName,omitempty"` + + // The names of columns used to group a timeseries. It can be used to create multiple series. If grain is not defined, the + // data set is assumed to be one time-series. This parameter is used with task type + // forecasting. + TimeSeriesIDColumnNames []*string `json:"timeSeriesIdColumnNames,omitempty"` + + // Configure STL Decomposition of the time-series target column. + UseStl *UseStl `json:"useStl,omitempty"` +} + +// ForecastingTrainingSettings - Forecasting Training related configuration. +type ForecastingTrainingSettings struct { + // Allowed models for forecasting task. + AllowedTrainingAlgorithms []*ForecastingModels `json:"allowedTrainingAlgorithms,omitempty"` + + // Blocked models for forecasting task. + BlockedTrainingAlgorithms []*ForecastingModels `json:"blockedTrainingAlgorithms,omitempty"` + + // Enable recommendation of DNN models. + EnableDnnTraining *bool `json:"enableDnnTraining,omitempty"` + + // Flag to turn on explainability on best model. + EnableModelExplainability *bool `json:"enableModelExplainability,omitempty"` + + // Flag for enabling onnx compatible models. + EnableOnnxCompatibleModels *bool `json:"enableOnnxCompatibleModels,omitempty"` + + // Enable stack ensemble run. + EnableStackEnsemble *bool `json:"enableStackEnsemble,omitempty"` + + // Enable voting ensemble run. + EnableVoteEnsemble *bool `json:"enableVoteEnsemble,omitempty"` + + // During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. + // Configure this parameter with a higher value than 300 secs, if more time + // is needed. + EnsembleModelDownloadTimeout *string `json:"ensembleModelDownloadTimeout,omitempty"` + + // Stack ensemble settings for stack ensemble run. + StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` + + // 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. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` +} + // GridSamplingAlgorithm - Defines a Sampling Algorithm that exhaustively generates every value combination in the space type GridSamplingAlgorithm struct { // REQUIRED; [Required] The algorithm used for generating hyperparameter values, along with configuration properties @@ -2960,9 +3966,6 @@ type HDInsight struct { // The description of the Machine Learning compute. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // HDInsight compute properties Properties *HDInsightProperties `json:"properties,omitempty"` @@ -2975,6 +3978,9 @@ type HDInsight struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -2986,7 +3992,7 @@ type HDInsight struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type HDInsight. @@ -3022,6 +4028,47 @@ type HDInsightSchema struct { Properties *HDInsightProperties `json:"properties,omitempty"` } +type HdfsDatastore struct { + // REQUIRED; [Required] Account credentials. + Credentials DatastoreCredentialsClassification `json:"credentials,omitempty"` + + // REQUIRED; [Required] Storage type backing the datastore. + DatastoreType *DatastoreType `json:"datastoreType,omitempty"` + + // REQUIRED; [Required] IP Address or DNS HostName. + NameNodeAddress *string `json:"nameNodeAddress,omitempty"` + + // The asset description text. + Description *string `json:"description,omitempty"` + + // The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. + HdfsServerCertificate *string `json:"hdfsServerCertificate,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // Protocol used to communicate with the storage account (Https/Http). + Protocol *string `json:"protocol,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Readonly property to indicate if datastore is the workspace default datastore + IsDefault *bool `json:"isDefault,omitempty" azure:"ro"` +} + +// GetDatastoreProperties implements the DatastorePropertiesClassification interface for type HdfsDatastore. +func (h *HdfsDatastore) GetDatastoreProperties() *DatastoreProperties { + return &DatastoreProperties{ + Credentials: h.Credentials, + DatastoreType: h.DatastoreType, + IsDefault: h.IsDefault, + Description: h.Description, + Properties: h.Properties, + Tags: h.Tags, + } +} + // IDAssetReference - Reference to an asset via its ARM resource ID. type IDAssetReference struct { // REQUIRED; [Required] ARM resource ID of the asset. @@ -3062,1226 +4109,1094 @@ type IdentityForCmk struct { UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` } -type InferenceContainerProperties struct { - // The route to check the liveness of the inference server container. - LivenessRoute *Route `json:"livenessRoute,omitempty"` +// IdleShutdownSetting - Stops compute instance after user defined period of inactivity. +type IdleShutdownSetting struct { + // Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + IdleTimeBeforeShutdown *string `json:"idleTimeBeforeShutdown,omitempty"` +} - // The route to check the readiness of the inference server container. - ReadinessRoute *Route `json:"readinessRoute,omitempty"` +type Image struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]interface{} - // The port to send the scoring requests to, within the inference server container. - ScoringRoute *Route `json:"scoringRoute,omitempty"` + // Image reference URL + Reference *string `json:"reference,omitempty"` + + // Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + Type *ImageType `json:"type,omitempty"` } -// InstanceTypeSchema - Instance type schema. -type InstanceTypeSchema struct { - // Node Selector - NodeSelector map[string]*string `json:"nodeSelector,omitempty"` +// ImageClassification - Image Classification. Multi-class image classification is used when an image is classified with only +// a single label from a set of classes - e.g. each image is classified as either an image of a 'cat' +// or a 'dog' or a 'duck'. +type ImageClassification struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` - // Resource requests/limits for this instance type - Resources *InstanceTypeSchemaResources `json:"resources,omitempty"` -} + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` -// InstanceTypeSchemaResources - Resource requests/limits for this instance type -type InstanceTypeSchemaResources struct { - // Resource limits for this instance type - Limits map[string]*string `json:"limits,omitempty"` + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` - // Resource requests for this instance type - Requests map[string]*string `json:"requests,omitempty"` -} + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` -// JobBase - Azure Resource Manager resource envelope. -type JobBase struct { - // REQUIRED; [Required] Additional attributes of the entity. - Properties JobBasePropertiesClassification `json:"properties,omitempty"` + // Settings used for training the model. + ModelSettings *ImageModelSettingsClassification `json:"modelSettings,omitempty"` - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + // Primary metric to optimize for this task. + PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty"` - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsClassification `json:"searchSpace,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` } -// JobBasePropertiesClassification provides polymorphic access to related types. -// Call the interface's GetJobBaseProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CommandJob, *JobBaseProperties, *PipelineJob, *SweepJob -type JobBasePropertiesClassification interface { - // GetJobBaseProperties returns the JobBaseProperties content of the underlying type. - GetJobBaseProperties() *JobBaseProperties +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type ImageClassification. +func (i *ImageClassification) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: i.LogVerbosity, + TargetColumnName: i.TargetColumnName, + TaskType: i.TaskType, + TrainingData: i.TrainingData, + } } -// JobBaseProperties - Base definition for a job. -type JobBaseProperties struct { - // REQUIRED; [Required] Specifies the type of job. - JobType *JobType `json:"jobType,omitempty"` +type ImageClassificationBase struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` - // ARM resource ID of the compute resource. - ComputeID *string `json:"computeId,omitempty"` + // Settings used for training the model. + ModelSettings *ImageModelSettingsClassification `json:"modelSettings,omitempty"` - // The asset description text. - Description *string `json:"description,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsClassification `json:"searchSpace,omitempty"` - // Display name of job. - DisplayName *string `json:"displayName,omitempty"` + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` - // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - ExperimentName *string `json:"experimentName,omitempty"` + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` - // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken - // if null. - Identity IdentityConfigurationClassification `json:"identity,omitempty"` + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` +} - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` +// ImageClassificationMultilabel - Image Classification Multilabel. Multi-label image classification is used when an image +// could have one or more labels from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. +type ImageClassificationMultilabel struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` - // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - Services map[string]*JobService `json:"services,omitempty"` + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` - // READ-ONLY; Status of the job. - Status *JobStatus `json:"status,omitempty" azure:"ro"` -} + // Settings used for training the model. + ModelSettings *ImageModelSettingsClassification `json:"modelSettings,omitempty"` -// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type JobBaseProperties. -func (j *JobBaseProperties) GetJobBaseProperties() *JobBaseProperties { return j } + // Primary metric to optimize for this task. + PrimaryMetric *ClassificationMultilabelPrimaryMetrics `json:"primaryMetric,omitempty"` -// JobBaseResourceArmPaginatedResult - A paginated list of JobBase entities. -type JobBaseResourceArmPaginatedResult struct { - // The link to the next page of JobBase objects. If null, there are no additional pages. - NextLink *string `json:"nextLink,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsClassification `json:"searchSpace,omitempty"` - // An array of objects of type JobBase. - Value []*JobBase `json:"value,omitempty"` + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` } -// JobInputClassification provides polymorphic access to related types. -// Call the interface's GetJobInput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CustomModelJobInput, *JobInput, *LiteralJobInput, *MLFlowModelJobInput, *MLTableJobInput, *TritonModelJobInput, *URIFileJobInput, -// - *URIFolderJobInput -type JobInputClassification interface { - // GetJobInput returns the JobInput content of the underlying type. - GetJobInput() *JobInput +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type ImageClassificationMultilabel. +func (i *ImageClassificationMultilabel) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: i.LogVerbosity, + TargetColumnName: i.TargetColumnName, + TaskType: i.TaskType, + TrainingData: i.TrainingData, + } } -// JobInput - Command job definition. -type JobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` +// ImageInstanceSegmentation - Image Instance Segmentation. Instance segmentation is used to identify objects in an image +// at the pixel level, drawing a polygon around each object in the image. +type ImageInstanceSegmentation struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` - // Description for the input. - Description *string `json:"description,omitempty"` -} + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` -// GetJobInput implements the JobInputClassification interface for type JobInput. -func (j *JobInput) GetJobInput() *JobInput { return j } + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` -// JobLimitsClassification provides polymorphic access to related types. -// Call the interface's GetJobLimits() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CommandJobLimits, *JobLimits, *SweepJobLimits -type JobLimitsClassification interface { - // GetJobLimits returns the JobLimits content of the underlying type. - GetJobLimits() *JobLimits + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Settings used for training the model. + ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,omitempty"` + + // Primary metric to optimize for this task. + PrimaryMetric *InstanceSegmentationPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsObjectDetection `json:"searchSpace,omitempty"` + + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` } -type JobLimits struct { - // REQUIRED; [Required] JobLimit type. - JobLimitsType *JobLimitsType `json:"jobLimitsType,omitempty"` +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type ImageInstanceSegmentation. +func (i *ImageInstanceSegmentation) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: i.LogVerbosity, + TargetColumnName: i.TargetColumnName, + TaskType: i.TaskType, + TrainingData: i.TrainingData, + } +} - // The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as - // low as Seconds. +// ImageLimitSettings - Limit settings for the AutoML job. +type ImageLimitSettings struct { + // Maximum number of concurrent AutoML iterations. + MaxConcurrentTrials *int32 `json:"maxConcurrentTrials,omitempty"` + + // Maximum number of AutoML iterations. + MaxTrials *int32 `json:"maxTrials,omitempty"` + + // AutoML job timeout. Timeout *string `json:"timeout,omitempty"` } -// GetJobLimits implements the JobLimitsClassification interface for type JobLimits. -func (j *JobLimits) GetJobLimits() *JobLimits { return j } +// ImageMetadata - Returns metadata about the operating system image for this compute instance. +type ImageMetadata struct { + // Specifies the current operating system image version this compute instance is running on. + CurrentImageVersion *string `json:"currentImageVersion,omitempty"` -// JobOutputClassification provides polymorphic access to related types. -// Call the interface's GetJobOutput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CustomModelJobOutput, *JobOutput, *MLFlowModelJobOutput, *MLTableJobOutput, *TritonModelJobOutput, *URIFileJobOutput, -// - *URIFolderJobOutput -type JobOutputClassification interface { - // GetJobOutput returns the JobOutput content of the underlying type. - GetJobOutput() *JobOutput + // Specifies whether this compute instance is running on the latest operating system image. + IsLatestOsImageVersion *bool `json:"isLatestOsImageVersion,omitempty"` + + // Specifies the latest available operating system image version. + LatestImageVersion *string `json:"latestImageVersion,omitempty"` } -// JobOutput - Job output definition container information on where to find job output/logs. -type JobOutput struct { - // REQUIRED; [Required] Specifies the type of job. - JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` +// ImageModelDistributionSettings - Distribution expressions to sweep over values of model settings.Some examples are:ModelName +// = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, +// 2)";All distributions can be specified as distribution_name(min, max) or choice(val1, val2, …, valn) where distribution +// name can be: uniform, quniform, loguniform, etc For more details on how to +// compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +// For more information on the available settings +// please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +type ImageModelDistributionSettings struct { + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *string `json:"amsGradient,omitempty"` - // Description for the output. - Description *string `json:"description,omitempty"` -} + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` -// GetJobOutput implements the JobOutputClassification interface for type JobOutput. -func (j *JobOutput) GetJobOutput() *JobOutput { return j } + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *string `json:"beta1,omitempty"` -// JobService - Job endpoint definition -type JobService struct { - // Url for endpoint. - Endpoint *string `json:"endpoint,omitempty"` + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *string `json:"beta2,omitempty"` - // Endpoint type. - JobServiceType *string `json:"jobServiceType,omitempty"` + // Whether to use distributer training. + Distributed *string `json:"distributed,omitempty"` - // Port for endpoint. - Port *int32 `json:"port,omitempty"` + // Enable early stopping logic during training. + EarlyStopping *string `json:"earlyStopping,omitempty"` - // Additional properties to set on the endpoint. - Properties map[string]*string `json:"properties,omitempty"` + // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. + // Must be a positive integer. + EarlyStoppingDelay *string `json:"earlyStoppingDelay,omitempty"` - // READ-ONLY; Any error in the service. - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` + // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be + // a positive integer. + EarlyStoppingPatience *string `json:"earlyStoppingPatience,omitempty"` - // READ-ONLY; Status of endpoint. - Status *string `json:"status,omitempty" azure:"ro"` -} + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` -// JobsClientBeginCancelOptions contains the optional parameters for the JobsClient.BeginCancel method. -type JobsClientBeginCancelOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` -// JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. -type JobsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights + // while accumulating the gradients of those steps, and then using the + // accumulated gradients to compute the weight updates. Must be a positive integer. + GradientAccumulationStep *string `json:"gradientAccumulationStep,omitempty"` -// JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. -type JobsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} + // Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' + // means freezing layer0 and layer1. For a full list of models supported and details + // on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + LayersToFreeze *string `json:"layersToFreeze,omitempty"` -// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. -type JobsClientGetOptions struct { - // placeholder for future optional parameters -} + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *string `json:"learningRate,omitempty"` -// JobsClientListOptions contains the optional parameters for the JobsClient.List method. -type JobsClientListOptions struct { - // Type of job to be returned. - JobType *string - // View type for including/excluding (for example) archived entities. - ListViewType *ListViewType - // Continuation token for pagination. - Skip *string - // Jobs returned will have this tag key. - Tag *string -} + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *string `json:"learningRateScheduler,omitempty"` -// Kubernetes - A Machine Learning compute based on Kubernetes Compute. -type Kubernetes struct { - // REQUIRED; The type of compute - ComputeType *ComputeType `json:"computeType,omitempty"` + // Name of the model to use for training. For more information on the available models please visit the official documentation: + // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + ModelName *string `json:"modelName,omitempty"` - // The description of the Machine Learning compute. - Description *string `json:"description,omitempty"` + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *string `json:"momentum,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + // Enable nesterov when optimizer is 'sgd'. + Nesterov *string `json:"nesterov,omitempty"` - // Properties of Kubernetes - Properties *KubernetesProperties `json:"properties,omitempty"` + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` - // ARM resource id of the underlying compute - ResourceID *string `json:"resourceId,omitempty"` + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` - // READ-ONLY; Location for the underlying compute - ComputeLocation *string `json:"computeLocation,omitempty" azure:"ro"` + // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + Optimizer *string `json:"optimizer,omitempty"` - // READ-ONLY; The time at which the compute was created. - CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // Random seed to be used when using deterministic training. + RandomSeed *string `json:"randomSeed,omitempty"` - // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - // service provisioned it if false. - IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *string `json:"stepLRGamma,omitempty"` - // READ-ONLY; The time at which the compute was last modified. - ModifiedOn *time.Time `json:"modifiedOn,omitempty" azure:"ro"` + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *string `json:"stepLRStepSize,omitempty"` - // READ-ONLY; Errors during provisioning - ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` + // Training batch size. Must be a positive integer. + TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` - // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // Validation batch size. Must be a positive integer. + ValidationBatchSize *string `json:"validationBatchSize,omitempty"` -// GetCompute implements the ComputeClassification interface for type Kubernetes. -func (k *Kubernetes) GetCompute() *Compute { - return &Compute{ - ComputeType: k.ComputeType, - ComputeLocation: k.ComputeLocation, - ProvisioningState: k.ProvisioningState, - Description: k.Description, - CreatedOn: k.CreatedOn, - ModifiedOn: k.ModifiedOn, - ResourceID: k.ResourceID, - ProvisioningErrors: k.ProvisioningErrors, - IsAttachedCompute: k.IsAttachedCompute, - DisableLocalAuth: k.DisableLocalAuth, - } + // Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + WarmupCosineLRCycles *string `json:"warmupCosineLRCycles,omitempty"` + + // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + WarmupCosineLRWarmupEpochs *string `json:"warmupCosineLRWarmupEpochs,omitempty"` + + // Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + WeightDecay *string `json:"weightDecay,omitempty"` } -// KubernetesOnlineDeployment - Properties specific to a KubernetesOnlineDeployment. -type KubernetesOnlineDeployment struct { - // REQUIRED; [Required] The compute type of the endpoint. - EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` +// ImageModelDistributionSettingsClassification - Distribution expressions to sweep over values of model settings.Some examples +// are:ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, +// 2)";For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +// For more information +// on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +type ImageModelDistributionSettingsClassification struct { + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *string `json:"amsGradient,omitempty"` - // If true, enables Application Insights logging. - AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` - // Code configuration for the endpoint deployment. - CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *string `json:"beta1,omitempty"` - // The resource requirements for the container (cpu and memory). - ContainerResourceRequirements *ContainerResourceRequirements `json:"containerResourceRequirements,omitempty"` + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *string `json:"beta2,omitempty"` - // Description of the endpoint deployment. - Description *string `json:"description,omitempty"` + // Whether to use distributer training. + Distributed *string `json:"distributed,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. - EnvironmentID *string `json:"environmentId,omitempty"` + // Enable early stopping logic during training. + EarlyStopping *string `json:"earlyStopping,omitempty"` - // Environment variables configuration for the deployment. - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. + // Must be a positive integer. + EarlyStoppingDelay *string `json:"earlyStoppingDelay,omitempty"` - // Compute instance type. - InstanceType *string `json:"instanceType,omitempty"` + // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be + // a positive integer. + EarlyStoppingPatience *string `json:"earlyStoppingPatience,omitempty"` - // Liveness probe monitors the health of the container regularly. - LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` - // The URI path to the model. - Model *string `json:"model,omitempty"` + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` - // The path to mount the model in custom container. - ModelMountPath *string `json:"modelMountPath,omitempty"` + // Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights + // while accumulating the gradients of those steps, and then using the + // accumulated gradients to compute the weight updates. Must be a positive integer. + GradientAccumulationStep *string `json:"gradientAccumulationStep,omitempty"` - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` + // Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' + // means freezing layer0 and layer1. For a full list of models supported and details + // on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + LayersToFreeze *string `json:"layersToFreeze,omitempty"` - // Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness - // probe. - ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *string `json:"learningRate,omitempty"` - // Request settings for the deployment. - RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *string `json:"learningRateScheduler,omitempty"` - // Scale settings for the deployment. If it is null or not provided, it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - // and to DefaultScaleSettings for ManagedOnlineDeployment. - ScaleSettings OnlineScaleSettingsClassification `json:"scaleSettings,omitempty"` + // Name of the model to use for training. For more information on the available models please visit the official documentation: + // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + ModelName *string `json:"modelName,omitempty"` - // READ-ONLY; Provisioning state for the endpoint deployment. - ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *string `json:"momentum,omitempty"` -// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type KubernetesOnlineDeployment. -func (k *KubernetesOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { - return &OnlineDeploymentProperties{ - AppInsightsEnabled: k.AppInsightsEnabled, - EndpointComputeType: k.EndpointComputeType, - InstanceType: k.InstanceType, - LivenessProbe: k.LivenessProbe, - Model: k.Model, - ModelMountPath: k.ModelMountPath, - ProvisioningState: k.ProvisioningState, - ReadinessProbe: k.ReadinessProbe, - RequestSettings: k.RequestSettings, - ScaleSettings: k.ScaleSettings, - CodeConfiguration: k.CodeConfiguration, - Description: k.Description, - EnvironmentID: k.EnvironmentID, - EnvironmentVariables: k.EnvironmentVariables, - Properties: k.Properties, - } -} + // Enable nesterov when optimizer is 'sgd'. + Nesterov *string `json:"nesterov,omitempty"` -// KubernetesProperties - Kubernetes properties -type KubernetesProperties struct { - // Default instance type - DefaultInstanceType *string `json:"defaultInstanceType,omitempty"` + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` - // Extension instance release train. - ExtensionInstanceReleaseTrain *string `json:"extensionInstanceReleaseTrain,omitempty"` + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` - // Extension principal-id. - ExtensionPrincipalID *string `json:"extensionPrincipalId,omitempty"` + // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + Optimizer *string `json:"optimizer,omitempty"` - // Instance Type Schema - InstanceTypes map[string]*InstanceTypeSchema `json:"instanceTypes,omitempty"` + // Random seed to be used when using deterministic training. + RandomSeed *string `json:"randomSeed,omitempty"` - // Compute namespace - Namespace *string `json:"namespace,omitempty"` + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *string `json:"stepLRGamma,omitempty"` - // Relay connection string. - RelayConnectionString *string `json:"relayConnectionString,omitempty"` + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *string `json:"stepLRStepSize,omitempty"` - // ServiceBus connection string. - ServiceBusConnectionString *string `json:"serviceBusConnectionString,omitempty"` + // Training batch size. Must be a positive integer. + TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` - // VC name. - VcName *string `json:"vcName,omitempty"` -} + // Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + TrainingCropSize *string `json:"trainingCropSize,omitempty"` -// KubernetesSchema - Kubernetes Compute Schema -type KubernetesSchema struct { - // Properties of Kubernetes - Properties *KubernetesProperties `json:"properties,omitempty"` -} + // Validation batch size. Must be a positive integer. + ValidationBatchSize *string `json:"validationBatchSize,omitempty"` -// ListAmlUserFeatureResult - The List Aml user feature operation response. -type ListAmlUserFeatureResult struct { - // READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next - // page of AML user features information. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + // Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + ValidationCropSize *string `json:"validationCropSize,omitempty"` - // READ-ONLY; The list of AML user facing features. - Value []*AmlUserFeature `json:"value,omitempty" azure:"ro"` -} + // Image size to which to resize before cropping for validation dataset. Must be a positive integer. + ValidationResizeSize *string `json:"validationResizeSize,omitempty"` -type ListNotebookKeysResult struct { - // READ-ONLY - PrimaryAccessKey *string `json:"primaryAccessKey,omitempty" azure:"ro"` + // Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + WarmupCosineLRCycles *string `json:"warmupCosineLRCycles,omitempty"` - // READ-ONLY - SecondaryAccessKey *string `json:"secondaryAccessKey,omitempty" azure:"ro"` -} + // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + WarmupCosineLRWarmupEpochs *string `json:"warmupCosineLRWarmupEpochs,omitempty"` -type ListStorageAccountKeysResult struct { - // READ-ONLY - UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` + // Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + WeightDecay *string `json:"weightDecay,omitempty"` + + // Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss with sqrt.(classweights). 2 for weighted + // loss with classweights. Must be 0 or 1 or 2. + WeightedLoss *string `json:"weightedLoss,omitempty"` } -// ListUsagesResult - The List Usages operation response. -type ListUsagesResult struct { - // READ-ONLY; The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next - // page of AML resource usage information. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` +// ImageModelDistributionSettingsObjectDetection - Distribution expressions to sweep over values of model settings.Some examples +// are:ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, +// 2)";For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +// For more information +// on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +type ImageModelDistributionSettingsObjectDetection struct { + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *string `json:"amsGradient,omitempty"` - // READ-ONLY; The list of AML resource usages. - Value []*Usage `json:"value,omitempty" azure:"ro"` -} + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` -type ListWorkspaceKeysResult struct { - // READ-ONLY - AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty" azure:"ro"` + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *string `json:"beta1,omitempty"` - // READ-ONLY - ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty" azure:"ro"` + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *string `json:"beta2,omitempty"` - // READ-ONLY - NotebookAccessKeys *ListNotebookKeysResult `json:"notebookAccessKeys,omitempty" azure:"ro"` + // Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported + // for the 'yolov5' algorithm. + BoxDetectionsPerImage *string `json:"boxDetectionsPerImage,omitempty"` - // READ-ONLY - UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` + // During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in + // the range[0, 1]. + BoxScoreThreshold *string `json:"boxScoreThreshold,omitempty"` - // READ-ONLY - UserStorageResourceID *string `json:"userStorageResourceId,omitempty" azure:"ro"` -} + // Whether to use distributer training. + Distributed *string `json:"distributed,omitempty"` -// ListWorkspaceQuotas - The List WorkspaceQuotasByVMFamily operation response. -type ListWorkspaceQuotas struct { - // READ-ONLY; The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch - // the next page of Workspace Quota information. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + // Enable early stopping logic during training. + EarlyStopping *string `json:"earlyStopping,omitempty"` - // READ-ONLY; The list of Workspace Quotas by VM Family - Value []*ResourceQuota `json:"value,omitempty" azure:"ro"` -} + // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. + // Must be a positive integer. + EarlyStoppingDelay *string `json:"earlyStoppingDelay,omitempty"` -// LiteralJobInput - Literal input type. -type LiteralJobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` + // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be + // a positive integer. + EarlyStoppingPatience *string `json:"earlyStoppingPatience,omitempty"` - // REQUIRED; [Required] Literal value for the input. - Value *string `json:"value,omitempty"` + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` - // Description for the input. - Description *string `json:"description,omitempty"` -} + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` -// GetJobInput implements the JobInputClassification interface for type LiteralJobInput. -func (l *LiteralJobInput) GetJobInput() *JobInput { - return &JobInput{ - Description: l.Description, - JobInputType: l.JobInputType, - } -} + // Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights + // while accumulating the gradients of those steps, and then using the + // accumulated gradients to compute the weight updates. Must be a positive integer. + GradientAccumulationStep *string `json:"gradientAccumulationStep,omitempty"` -type MLFlowModelJobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` + // Image size for train and validation. Must be a positive integer. Note: The training run may get into CUDA OOM if the size + // is too big. Note: This settings is only supported for the 'yolov5' algorithm. + ImageSize *string `json:"imageSize,omitempty"` - // REQUIRED; [Required] Input Asset URI. - URI *string `json:"uri,omitempty"` + // Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' + // means freezing layer0 and layer1. For a full list of models supported and details + // on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + LayersToFreeze *string `json:"layersToFreeze,omitempty"` - // Description for the input. - Description *string `json:"description,omitempty"` + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *string `json:"learningRate,omitempty"` - // Input Asset Delivery Mode. - Mode *InputDeliveryMode `json:"mode,omitempty"` -} + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *string `json:"learningRateScheduler,omitempty"` -// GetJobInput implements the JobInputClassification interface for type MLFlowModelJobInput. -func (m *MLFlowModelJobInput) GetJobInput() *JobInput { - return &JobInput{ - Description: m.Description, - JobInputType: m.JobInputType, - } -} + // Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training + // run may get into CUDA OOM if the size is too big. Note: This settings is not + // supported for the 'yolov5' algorithm. + MaxSize *string `json:"maxSize,omitempty"` -type MLFlowModelJobOutput struct { - // REQUIRED; [Required] Specifies the type of job. - JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training + // run may get into CUDA OOM if the size is too big. Note: This settings is not + // supported for the 'yolov5' algorithm. + MinSize *string `json:"minSize,omitempty"` - // Description for the output. - Description *string `json:"description,omitempty"` + // Name of the model to use for training. For more information on the available models please visit the official documentation: + // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + ModelName *string `json:"modelName,omitempty"` - // Output Asset Delivery Mode. - Mode *OutputDeliveryMode `json:"mode,omitempty"` + // Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may get into CUDA OOM if the model size + // is too big. Note: This settings is only supported for the 'yolov5' algorithm. + ModelSize *string `json:"modelSize,omitempty"` - // Output Asset URI. - URI *string `json:"uri,omitempty"` -} + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *string `json:"momentum,omitempty"` -// GetJobOutput implements the JobOutputClassification interface for type MLFlowModelJobOutput. -func (m *MLFlowModelJobOutput) GetJobOutput() *JobOutput { - return &JobOutput{ - Description: m.Description, - JobOutputType: m.JobOutputType, - } -} + // Enable multi-scale image by varying image size by +/- 50%. Note: training run may get into CUDA OOM if no sufficient GPU + // memory. Note: This settings is only supported for the 'yolov5' algorithm. + MultiScale *string `json:"multiScale,omitempty"` -// MLTableData - MLTable data definition -type MLTableData struct { - // REQUIRED; [Required] Specifies the type of data. - DataType *DataType `json:"dataType,omitempty"` + // Enable nesterov when optimizer is 'sgd'. + Nesterov *string `json:"nesterov,omitempty"` - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType - DataURI *string `json:"dataUri,omitempty"` + // IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. + NmsIouThreshold *string `json:"nmsIouThreshold,omitempty"` - // The asset description text. - Description *string `json:"description,omitempty"` + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` - // If the name version are system generated (anonymous registration). - IsAnonymous *bool `json:"isAnonymous,omitempty"` + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + Optimizer *string `json:"optimizer,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // Random seed to be used when using deterministic training. + RandomSeed *string `json:"randomSeed,omitempty"` - // Uris referenced in the MLTable definition (required for lineage) - ReferencedUris []*string `json:"referencedUris,omitempty"` + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *string `json:"stepLRGamma,omitempty"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` -} + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *string `json:"stepLRStepSize,omitempty"` -// GetDataVersionBaseProperties implements the DataVersionBasePropertiesClassification interface for type MLTableData. -func (m *MLTableData) GetDataVersionBaseProperties() *DataVersionBaseProperties { - return &DataVersionBaseProperties{ - DataType: m.DataType, - DataURI: m.DataURI, - IsAnonymous: m.IsAnonymous, - IsArchived: m.IsArchived, - Description: m.Description, - Properties: m.Properties, - Tags: m.Tags, - } -} + // The grid size to use for tiling each image. Note: TileGridSize must not be None to enable small object detection logic. + // A string containing two integers in mxn format. Note: This settings is not + // supported for the 'yolov5' algorithm. + TileGridSize *string `json:"tileGridSize,omitempty"` -type MLTableJobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` + // Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). Note: This settings is not supported + // for the 'yolov5' algorithm. + TileOverlapRatio *string `json:"tileOverlapRatio,omitempty"` - // REQUIRED; [Required] Input Asset URI. - URI *string `json:"uri,omitempty"` + // The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. + // Must be float in the range [0, 1]. Note: This settings is not supported for the + // 'yolov5' algorithm. NMS: Non-maximum suppression + TilePredictionsNmsThreshold *string `json:"tilePredictionsNmsThreshold,omitempty"` - // Description for the input. - Description *string `json:"description,omitempty"` + // Training batch size. Must be a positive integer. + TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` - // Input Asset Delivery Mode. - Mode *InputDeliveryMode `json:"mode,omitempty"` -} + // Validation batch size. Must be a positive integer. + ValidationBatchSize *string `json:"validationBatchSize,omitempty"` -// GetJobInput implements the JobInputClassification interface for type MLTableJobInput. -func (m *MLTableJobInput) GetJobInput() *JobInput { - return &JobInput{ - Description: m.Description, - JobInputType: m.JobInputType, - } -} + // IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + ValidationIouThreshold *string `json:"validationIouThreshold,omitempty"` -type MLTableJobOutput struct { - // REQUIRED; [Required] Specifies the type of job. - JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. + ValidationMetricType *string `json:"validationMetricType,omitempty"` - // Description for the output. - Description *string `json:"description,omitempty"` + // Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + WarmupCosineLRCycles *string `json:"warmupCosineLRCycles,omitempty"` - // Output Asset Delivery Mode. - Mode *OutputDeliveryMode `json:"mode,omitempty"` + // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + WarmupCosineLRWarmupEpochs *string `json:"warmupCosineLRWarmupEpochs,omitempty"` - // Output Asset URI. - URI *string `json:"uri,omitempty"` + // Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + WeightDecay *string `json:"weightDecay,omitempty"` } -// GetJobOutput implements the JobOutputClassification interface for type MLTableJobOutput. -func (m *MLTableJobOutput) GetJobOutput() *JobOutput { - return &JobOutput{ - Description: m.Description, - JobOutputType: m.JobOutputType, - } -} +// ImageModelSettings - Settings used for training the model. For more information on the available settings please visit +// the official documentation: +// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +type ImageModelSettings struct { + // Settings for advanced scenarios. + AdvancedSettings *string `json:"advancedSettings,omitempty"` -// ManagedIdentity - Managed identity configuration. -type ManagedIdentity struct { - // REQUIRED; [Required] Specifies the type of identity framework. - IdentityType *IdentityConfigurationType `json:"identityType,omitempty"` + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *bool `json:"amsGradient,omitempty"` - // Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. - ClientID *string `json:"clientId,omitempty"` + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` - // Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. - ObjectID *string `json:"objectId,omitempty"` + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *float32 `json:"beta1,omitempty"` - // Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. - ResourceID *string `json:"resourceId,omitempty"` -} + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *float32 `json:"beta2,omitempty"` -// GetIdentityConfiguration implements the IdentityConfigurationClassification interface for type ManagedIdentity. -func (m *ManagedIdentity) GetIdentityConfiguration() *IdentityConfiguration { - return &IdentityConfiguration{ - IdentityType: m.IdentityType, - } -} + // Frequency to store model checkpoints. Must be a positive integer. + CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` -type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { - // REQUIRED; Authentication type of the connection target - AuthType *ConnectionAuthType `json:"authType,omitempty"` + // The pretrained checkpoint model for incremental training. + CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` - // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` - Credentials *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"` - Target *string `json:"target,omitempty"` + // The id of a previous run that has a pretrained checkpoint for incremental training. + CheckpointRunID *string `json:"checkpointRunId,omitempty"` - // Value details of the workspace connection. - Value *string `json:"value,omitempty"` + // Whether to use distributed training. + Distributed *bool `json:"distributed,omitempty"` - // format for the workspace connection value - ValueFormat *ValueFormat `json:"valueFormat,omitempty"` -} + // Enable early stopping logic during training. + EarlyStopping *bool `json:"earlyStopping,omitempty"` -// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. -func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { - return &WorkspaceConnectionPropertiesV2{ - AuthType: m.AuthType, - Category: m.Category, - Target: m.Target, - Value: m.Value, - ValueFormat: m.ValueFormat, - } -} + // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. + // Must be a positive integer. + EarlyStoppingDelay *int32 `json:"earlyStoppingDelay,omitempty"` -// ManagedOnlineDeployment - Properties specific to a ManagedOnlineDeployment. -type ManagedOnlineDeployment struct { - // REQUIRED; [Required] The compute type of the endpoint. - EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` + // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be + // a positive integer. + EarlyStoppingPatience *int32 `json:"earlyStoppingPatience,omitempty"` - // If true, enables Application Insights logging. - AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` - // Code configuration for the endpoint deployment. - CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *int32 `json:"evaluationFrequency,omitempty"` - // Description of the endpoint deployment. - Description *string `json:"description,omitempty"` + // Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights + // while accumulating the gradients of those steps, and then using the + // accumulated gradients to compute the weight updates. Must be a positive integer. + GradientAccumulationStep *int32 `json:"gradientAccumulationStep,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. - EnvironmentID *string `json:"environmentId,omitempty"` + // Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' + // means freezing layer0 and layer1. For a full list of models supported and details + // on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + LayersToFreeze *int32 `json:"layersToFreeze,omitempty"` - // Environment variables configuration for the deployment. - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *float32 `json:"learningRate,omitempty"` - // Compute instance type. - InstanceType *string `json:"instanceType,omitempty"` + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,omitempty"` - // Liveness probe monitors the health of the container regularly. - LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + // Name of the model to use for training. For more information on the available models please visit the official documentation: + // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + ModelName *string `json:"modelName,omitempty"` - // The URI path to the model. - Model *string `json:"model,omitempty"` + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *float32 `json:"momentum,omitempty"` - // The path to mount the model in custom container. - ModelMountPath *string `json:"modelMountPath,omitempty"` + // Enable nesterov when optimizer is 'sgd'. + Nesterov *bool `json:"nesterov,omitempty"` - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` - // Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness - // probe. - ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` - // Request settings for the deployment. - RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + // Type of optimizer. + Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` - // Scale settings for the deployment. If it is null or not provided, it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - // and to DefaultScaleSettings for ManagedOnlineDeployment. - ScaleSettings OnlineScaleSettingsClassification `json:"scaleSettings,omitempty"` + // Random seed to be used when using deterministic training. + RandomSeed *int32 `json:"randomSeed,omitempty"` - // READ-ONLY; Provisioning state for the endpoint deployment. - ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *float32 `json:"stepLRGamma,omitempty"` -// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type ManagedOnlineDeployment. -func (m *ManagedOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { - return &OnlineDeploymentProperties{ - AppInsightsEnabled: m.AppInsightsEnabled, - EndpointComputeType: m.EndpointComputeType, - InstanceType: m.InstanceType, - LivenessProbe: m.LivenessProbe, - Model: m.Model, - ModelMountPath: m.ModelMountPath, - ProvisioningState: m.ProvisioningState, - ReadinessProbe: m.ReadinessProbe, - RequestSettings: m.RequestSettings, - ScaleSettings: m.ScaleSettings, - CodeConfiguration: m.CodeConfiguration, - Description: m.Description, - EnvironmentID: m.EnvironmentID, - EnvironmentVariables: m.EnvironmentVariables, - Properties: m.Properties, - } -} + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` -// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) -type ManagedServiceIdentity struct { - // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - Type *ManagedServiceIdentityType `json:"type,omitempty"` + // Training batch size. Must be a positive integer. + TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` - // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM - // resource ids in the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - // The dictionary values can be empty objects ({}) in - // requests. - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` + // Validation batch size. Must be a positive integer. + ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` - // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned - // identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + // Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + WarmupCosineLRCycles *float32 `json:"warmupCosineLRCycles,omitempty"` - // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` + // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + WarmupCosineLRWarmupEpochs *int32 `json:"warmupCosineLRWarmupEpochs,omitempty"` + + // Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + WeightDecay *float32 `json:"weightDecay,omitempty"` } -// MedianStoppingPolicy - Defines an early termination policy based on running averages of the primary metric of all runs -type MedianStoppingPolicy struct { - // REQUIRED; [Required] Name of policy configuration - PolicyType *EarlyTerminationPolicyType `json:"policyType,omitempty"` +// ImageModelSettingsClassification - Settings used for training the model. For more information on the available settings +// please visit the official documentation: +// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +type ImageModelSettingsClassification struct { + // Settings for advanced scenarios. + AdvancedSettings *string `json:"advancedSettings,omitempty"` - // Number of intervals by which to delay the first evaluation. - DelayEvaluation *int32 `json:"delayEvaluation,omitempty"` + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *bool `json:"amsGradient,omitempty"` - // Interval (number of runs) between policy evaluations. - EvaluationInterval *int32 `json:"evaluationInterval,omitempty"` -} + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` -// GetEarlyTerminationPolicy implements the EarlyTerminationPolicyClassification interface for type MedianStoppingPolicy. -func (m *MedianStoppingPolicy) GetEarlyTerminationPolicy() *EarlyTerminationPolicy { - return &EarlyTerminationPolicy{ - DelayEvaluation: m.DelayEvaluation, - EvaluationInterval: m.EvaluationInterval, - PolicyType: m.PolicyType, - } -} + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *float32 `json:"beta1,omitempty"` -// ModelContainer - Azure Resource Manager resource envelope. -type ModelContainer struct { - // REQUIRED; [Required] Additional attributes of the entity. - Properties *ModelContainerProperties `json:"properties,omitempty"` + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *float32 `json:"beta2,omitempty"` - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + // Frequency to store model checkpoints. Must be a positive integer. + CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + // The pretrained checkpoint model for incremental training. + CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // The id of a previous run that has a pretrained checkpoint for incremental training. + CheckpointRunID *string `json:"checkpointRunId,omitempty"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} + // Whether to use distributed training. + Distributed *bool `json:"distributed,omitempty"` -type ModelContainerProperties struct { - // The asset description text. - Description *string `json:"description,omitempty"` + // Enable early stopping logic during training. + EarlyStopping *bool `json:"earlyStopping,omitempty"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. + // Must be a positive integer. + EarlyStoppingDelay *int32 `json:"earlyStoppingDelay,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` - - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` + // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be + // a positive integer. + EarlyStoppingPatience *int32 `json:"earlyStoppingPatience,omitempty"` - // READ-ONLY; The latest version inside this container. - LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` - // READ-ONLY; The next auto incremental version - NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` -} + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *int32 `json:"evaluationFrequency,omitempty"` -// ModelContainerResourceArmPaginatedResult - A paginated list of ModelContainer entities. -type ModelContainerResourceArmPaginatedResult struct { - // The link to the next page of ModelContainer objects. If null, there are no additional pages. - NextLink *string `json:"nextLink,omitempty"` + // Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights + // while accumulating the gradients of those steps, and then using the + // accumulated gradients to compute the weight updates. Must be a positive integer. + GradientAccumulationStep *int32 `json:"gradientAccumulationStep,omitempty"` - // An array of objects of type ModelContainer. - Value []*ModelContainer `json:"value,omitempty"` -} + // Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' + // means freezing layer0 and layer1. For a full list of models supported and details + // on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + LayersToFreeze *int32 `json:"layersToFreeze,omitempty"` -// ModelContainersClientCreateOrUpdateOptions contains the optional parameters for the ModelContainersClient.CreateOrUpdate -// method. -type ModelContainersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *float32 `json:"learningRate,omitempty"` -// ModelContainersClientDeleteOptions contains the optional parameters for the ModelContainersClient.Delete method. -type ModelContainersClientDeleteOptions struct { - // placeholder for future optional parameters -} + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,omitempty"` -// ModelContainersClientGetOptions contains the optional parameters for the ModelContainersClient.Get method. -type ModelContainersClientGetOptions struct { - // placeholder for future optional parameters -} + // Name of the model to use for training. For more information on the available models please visit the official documentation: + // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + ModelName *string `json:"modelName,omitempty"` -// ModelContainersClientListOptions contains the optional parameters for the ModelContainersClient.List method. -type ModelContainersClientListOptions struct { - // Maximum number of results to return. - Count *int32 - // View type for including/excluding (for example) archived entities. - ListViewType *ListViewType - // Continuation token for pagination. - Skip *string -} + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *float32 `json:"momentum,omitempty"` -// ModelVersion - Azure Resource Manager resource envelope. -type ModelVersion struct { - // REQUIRED; [Required] Additional attributes of the entity. - Properties *ModelVersionProperties `json:"properties,omitempty"` + // Enable nesterov when optimizer is 'sgd'. + Nesterov *bool `json:"nesterov,omitempty"` - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // Type of optimizer. + Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} + // Random seed to be used when using deterministic training. + RandomSeed *int32 `json:"randomSeed,omitempty"` -// ModelVersionProperties - Model asset version details. -type ModelVersionProperties struct { - // The asset description text. - Description *string `json:"description,omitempty"` + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *float32 `json:"stepLRGamma,omitempty"` - // Mapping of model flavors to their properties. - Flavors map[string]*FlavorData `json:"flavors,omitempty"` + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` - // If the name version are system generated (anonymous registration). - IsAnonymous *bool `json:"isAnonymous,omitempty"` + // Training batch size. Must be a positive integer. + TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + TrainingCropSize *int32 `json:"trainingCropSize,omitempty"` - // Name of the training job which produced this model - JobName *string `json:"jobName,omitempty"` + // Validation batch size. Must be a positive integer. + ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` - // The storage format for this entity. Used for NCD. - ModelType *string `json:"modelType,omitempty"` + // Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + ValidationCropSize *int32 `json:"validationCropSize,omitempty"` - // The URI path to the model contents. - ModelURI *string `json:"modelUri,omitempty"` + // Image size to which to resize before cropping for validation dataset. Must be a positive integer. + ValidationResizeSize *int32 `json:"validationResizeSize,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + WarmupCosineLRCycles *float32 `json:"warmupCosineLRCycles,omitempty"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` -} + // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + WarmupCosineLRWarmupEpochs *int32 `json:"warmupCosineLRWarmupEpochs,omitempty"` -// ModelVersionResourceArmPaginatedResult - A paginated list of ModelVersion entities. -type ModelVersionResourceArmPaginatedResult struct { - // The link to the next page of ModelVersion objects. If null, there are no additional pages. - NextLink *string `json:"nextLink,omitempty"` + // Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + WeightDecay *float32 `json:"weightDecay,omitempty"` - // An array of objects of type ModelVersion. - Value []*ModelVersion `json:"value,omitempty"` + // Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss with sqrt.(classweights). 2 for weighted + // loss with classweights. Must be 0 or 1 or 2. + WeightedLoss *int32 `json:"weightedLoss,omitempty"` } -// ModelVersionsClientCreateOrUpdateOptions contains the optional parameters for the ModelVersionsClient.CreateOrUpdate method. -type ModelVersionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} +// ImageModelSettingsObjectDetection - Settings used for training the model. For more information on the available settings +// please visit the official documentation: +// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +type ImageModelSettingsObjectDetection struct { + // Settings for advanced scenarios. + AdvancedSettings *string `json:"advancedSettings,omitempty"` -// ModelVersionsClientDeleteOptions contains the optional parameters for the ModelVersionsClient.Delete method. -type ModelVersionsClientDeleteOptions struct { - // placeholder for future optional parameters -} + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *bool `json:"amsGradient,omitempty"` -// ModelVersionsClientGetOptions contains the optional parameters for the ModelVersionsClient.Get method. -type ModelVersionsClientGetOptions struct { - // placeholder for future optional parameters -} + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` -// ModelVersionsClientListOptions contains the optional parameters for the ModelVersionsClient.List method. -type ModelVersionsClientListOptions struct { - // Model description. - Description *string - // Name of the feed. - Feed *string - // View type for including/excluding (for example) archived entities. - ListViewType *ListViewType - // Number of initial results to skip. - Offset *int32 - // Ordering of list. - OrderBy *string - // Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 - Properties *string - // Continuation token for pagination. - Skip *string - // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 - Tags *string - // Maximum number of records to return. - Top *int32 - // Model version. - Version *string -} + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *float32 `json:"beta1,omitempty"` -// Mpi - MPI distribution configuration. -type Mpi struct { - // REQUIRED; [Required] Specifies the type of distribution framework. - DistributionType *DistributionType `json:"distributionType,omitempty"` + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *float32 `json:"beta2,omitempty"` - // Number of processes per MPI node. - ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` -} + // Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported + // for the 'yolov5' algorithm. + BoxDetectionsPerImage *int32 `json:"boxDetectionsPerImage,omitempty"` -// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type Mpi. -func (m *Mpi) GetDistributionConfiguration() *DistributionConfiguration { - return &DistributionConfiguration{ - DistributionType: m.DistributionType, - } -} + // During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in + // the range[0, 1]. + BoxScoreThreshold *float32 `json:"boxScoreThreshold,omitempty"` -// NodeStateCounts - Counts of various compute node states on the amlCompute. -type NodeStateCounts struct { - // READ-ONLY; Number of compute nodes in idle state. - IdleNodeCount *int32 `json:"idleNodeCount,omitempty" azure:"ro"` + // Frequency to store model checkpoints. Must be a positive integer. + CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` - // READ-ONLY; Number of compute nodes which are leaving the amlCompute. - LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty" azure:"ro"` + // The pretrained checkpoint model for incremental training. + CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` - // READ-ONLY; Number of compute nodes which are in preempted state. - PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty" azure:"ro"` + // The id of a previous run that has a pretrained checkpoint for incremental training. + CheckpointRunID *string `json:"checkpointRunId,omitempty"` - // READ-ONLY; Number of compute nodes which are being prepared. - PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty" azure:"ro"` + // Whether to use distributed training. + Distributed *bool `json:"distributed,omitempty"` - // READ-ONLY; Number of compute nodes which are running jobs. - RunningNodeCount *int32 `json:"runningNodeCount,omitempty" azure:"ro"` + // Enable early stopping logic during training. + EarlyStopping *bool `json:"earlyStopping,omitempty"` - // READ-ONLY; Number of compute nodes which are in unusable state. - UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty" azure:"ro"` -} + // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. + // Must be a positive integer. + EarlyStoppingDelay *int32 `json:"earlyStoppingDelay,omitempty"` -type NoneAuthTypeWorkspaceConnectionProperties struct { - // REQUIRED; Authentication type of the connection target - AuthType *ConnectionAuthType `json:"authType,omitempty"` + // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be + // a positive integer. + EarlyStoppingPatience *int32 `json:"earlyStoppingPatience,omitempty"` - // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` - Target *string `json:"target,omitempty"` + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` - // Value details of the workspace connection. - Value *string `json:"value,omitempty"` + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *int32 `json:"evaluationFrequency,omitempty"` - // format for the workspace connection value - ValueFormat *ValueFormat `json:"valueFormat,omitempty"` -} + // Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights + // while accumulating the gradients of those steps, and then using the + // accumulated gradients to compute the weight updates. Must be a positive integer. + GradientAccumulationStep *int32 `json:"gradientAccumulationStep,omitempty"` -// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type NoneAuthTypeWorkspaceConnectionProperties. -func (n *NoneAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { - return &WorkspaceConnectionPropertiesV2{ - AuthType: n.AuthType, - Category: n.Category, - Target: n.Target, - Value: n.Value, - ValueFormat: n.ValueFormat, - } -} + // Image size for train and validation. Must be a positive integer. Note: The training run may get into CUDA OOM if the size + // is too big. Note: This settings is only supported for the 'yolov5' algorithm. + ImageSize *int32 `json:"imageSize,omitempty"` -// NoneDatastoreCredentials - Empty/none datastore credentials. -type NoneDatastoreCredentials struct { - // REQUIRED; [Required] Credential type used to authentication with storage. - CredentialsType *CredentialsType `json:"credentialsType,omitempty"` -} + // Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' + // means freezing layer0 and layer1. For a full list of models supported and details + // on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + LayersToFreeze *int32 `json:"layersToFreeze,omitempty"` -// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type NoneDatastoreCredentials. -func (n *NoneDatastoreCredentials) GetDatastoreCredentials() *DatastoreCredentials { - return &DatastoreCredentials{ - CredentialsType: n.CredentialsType, - } -} + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *float32 `json:"learningRate,omitempty"` -type NotebookAccessTokenResult struct { - // READ-ONLY - AccessToken *string `json:"accessToken,omitempty" azure:"ro"` + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,omitempty"` - // READ-ONLY - ExpiresIn *int32 `json:"expiresIn,omitempty" azure:"ro"` + // Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training + // run may get into CUDA OOM if the size is too big. Note: This settings is not + // supported for the 'yolov5' algorithm. + MaxSize *int32 `json:"maxSize,omitempty"` - // READ-ONLY - HostName *string `json:"hostName,omitempty" azure:"ro"` + // Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training + // run may get into CUDA OOM if the size is too big. Note: This settings is not + // supported for the 'yolov5' algorithm. + MinSize *int32 `json:"minSize,omitempty"` - // READ-ONLY - NotebookResourceID *string `json:"notebookResourceId,omitempty" azure:"ro"` + // Name of the model to use for training. For more information on the available models please visit the official documentation: + // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + ModelName *string `json:"modelName,omitempty"` - // READ-ONLY - PublicDNS *string `json:"publicDns,omitempty" azure:"ro"` + // Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may get into CUDA OOM if the model size + // is too big. Note: This settings is only supported for the 'yolov5' algorithm. + ModelSize *ModelSize `json:"modelSize,omitempty"` - // READ-ONLY - RefreshToken *string `json:"refreshToken,omitempty" azure:"ro"` + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *float32 `json:"momentum,omitempty"` - // READ-ONLY - Scope *string `json:"scope,omitempty" azure:"ro"` + // Enable multi-scale image by varying image size by +/- 50%. Note: training run may get into CUDA OOM if no sufficient GPU + // memory. Note: This settings is only supported for the 'yolov5' algorithm. + MultiScale *bool `json:"multiScale,omitempty"` - // READ-ONLY - TokenType *string `json:"tokenType,omitempty" azure:"ro"` -} + // Enable nesterov when optimizer is 'sgd'. + Nesterov *bool `json:"nesterov,omitempty"` -type NotebookPreparationError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` -} + // IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. + NmsIouThreshold *float32 `json:"nmsIouThreshold,omitempty"` -type NotebookResourceInfo struct { - Fqdn *string `json:"fqdn,omitempty"` + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` - // The error that occurs when preparing notebook. - NotebookPreparationError *NotebookPreparationError `json:"notebookPreparationError,omitempty"` + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` - // the data plane resourceId that used to initialize notebook component - ResourceID *string `json:"resourceId,omitempty"` -} + // Type of optimizer. + Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` -// Objective - Optimization objective. -type Objective struct { - // REQUIRED; [Required] Defines supported metric goals for hyperparameter tuning - Goal *Goal `json:"goal,omitempty"` + // Random seed to be used when using deterministic training. + RandomSeed *int32 `json:"randomSeed,omitempty"` - // REQUIRED; [Required] Name of the metric to optimize. - PrimaryMetric *string `json:"primaryMetric,omitempty"` -} + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *float32 `json:"stepLRGamma,omitempty"` -type OnlineDeployment struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` - // REQUIRED; [Required] Additional attributes of the entity. - Properties OnlineDeploymentPropertiesClassification `json:"properties,omitempty"` + // The grid size to use for tiling each image. Note: TileGridSize must not be None to enable small object detection logic. + // A string containing two integers in mxn format. Note: This settings is not + // supported for the 'yolov5' algorithm. + TileGridSize *string `json:"tileGridSize,omitempty"` - // Managed service identity (system assigned and/or user assigned identities) - Identity *ManagedServiceIdentity `json:"identity,omitempty"` + // Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). Note: This settings is not supported + // for the 'yolov5' algorithm. + TileOverlapRatio *float32 `json:"tileOverlapRatio,omitempty"` - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - Kind *string `json:"kind,omitempty"` + // The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. + // Must be float in the range [0, 1]. Note: This settings is not supported for the + // 'yolov5' algorithm. + TilePredictionsNmsThreshold *float32 `json:"tilePredictionsNmsThreshold,omitempty"` - // Sku details required for ARM contract for Autoscaling. - SKU *SKU `json:"sku,omitempty"` + // Training batch size. Must be a positive integer. + TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + // Validation batch size. Must be a positive integer. + ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` + // IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + ValidationIouThreshold *float32 `json:"validationIouThreshold,omitempty"` - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + // Metric computation method to use for validation metrics. + ValidationMetricType *ValidationMetricType `json:"validationMetricType,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + WarmupCosineLRCycles *float32 `json:"warmupCosineLRCycles,omitempty"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} + // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + WarmupCosineLRWarmupEpochs *int32 `json:"warmupCosineLRWarmupEpochs,omitempty"` -// OnlineDeploymentPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetOnlineDeploymentProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *KubernetesOnlineDeployment, *ManagedOnlineDeployment, *OnlineDeploymentProperties -type OnlineDeploymentPropertiesClassification interface { - // GetOnlineDeploymentProperties returns the OnlineDeploymentProperties content of the underlying type. - GetOnlineDeploymentProperties() *OnlineDeploymentProperties + // Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + WeightDecay *float32 `json:"weightDecay,omitempty"` } -type OnlineDeploymentProperties struct { - // REQUIRED; [Required] The compute type of the endpoint. - EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` +// ImageObjectDetection - Image Object Detection. Object detection is used to identify objects in an image and locate each +// object with a bounding box e.g. locate all dogs and cats in an image and draw a bounding box around +// each. +type ImageObjectDetection struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` - // If true, enables Application Insights logging. - AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` - // Code configuration for the endpoint deployment. - CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` - // Description of the endpoint deployment. - Description *string `json:"description,omitempty"` + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. - EnvironmentID *string `json:"environmentId,omitempty"` + // Settings used for training the model. + ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,omitempty"` - // Environment variables configuration for the deployment. - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + // Primary metric to optimize for this task. + PrimaryMetric *ObjectDetectionPrimaryMetrics `json:"primaryMetric,omitempty"` - // Compute instance type. - InstanceType *string `json:"instanceType,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsObjectDetection `json:"searchSpace,omitempty"` - // Liveness probe monitors the health of the container regularly. - LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` - // The URI path to the model. - Model *string `json:"model,omitempty"` + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` - // The path to mount the model in custom container. - ModelMountPath *string `json:"modelMountPath,omitempty"` + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` +} - // Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness - // probe. - ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type ImageObjectDetection. +func (i *ImageObjectDetection) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: i.LogVerbosity, + TargetColumnName: i.TargetColumnName, + TaskType: i.TaskType, + TrainingData: i.TrainingData, + } +} - // Request settings for the deployment. - RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` +type ImageObjectDetectionBase struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` - // Scale settings for the deployment. If it is null or not provided, it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - // and to DefaultScaleSettings for ManagedOnlineDeployment. - ScaleSettings OnlineScaleSettingsClassification `json:"scaleSettings,omitempty"` + // Settings used for training the model. + ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,omitempty"` - // READ-ONLY; Provisioning state for the endpoint deployment. - ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsObjectDetection `json:"searchSpace,omitempty"` -// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type OnlineDeploymentProperties. -func (o *OnlineDeploymentProperties) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { - return o -} + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` -// OnlineDeploymentTrackedResourceArmPaginatedResult - A paginated list of OnlineDeployment entities. -type OnlineDeploymentTrackedResourceArmPaginatedResult struct { - // The link to the next page of OnlineDeployment objects. If null, there are no additional pages. - NextLink *string `json:"nextLink,omitempty"` + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` - // An array of objects of type OnlineDeployment. - Value []*OnlineDeployment `json:"value,omitempty"` + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` } -// OnlineDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginCreateOrUpdate -// method. -type OnlineDeploymentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// ImageSweepSettings - Model sweeping and hyperparameter sweeping related settings. +type ImageSweepSettings struct { + // REQUIRED; [Required] Type of the hyperparameter sampling algorithms. + SamplingAlgorithm *SamplingAlgorithmType `json:"samplingAlgorithm,omitempty"` -// OnlineDeploymentsClientBeginDeleteOptions contains the optional parameters for the OnlineDeploymentsClient.BeginDelete -// method. -type OnlineDeploymentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // Type of early termination policy. + EarlyTermination EarlyTerminationPolicyClassification `json:"earlyTermination,omitempty"` } -// OnlineDeploymentsClientBeginUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginUpdate -// method. -type OnlineDeploymentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// ImageVertical - Abstract class for AutoML tasks that train image (computer vision) models - such as Image Classification +// / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. +type ImageVertical struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` -// OnlineDeploymentsClientGetLogsOptions contains the optional parameters for the OnlineDeploymentsClient.GetLogs method. -type OnlineDeploymentsClientGetLogsOptions struct { - // placeholder for future optional parameters -} + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` -// OnlineDeploymentsClientGetOptions contains the optional parameters for the OnlineDeploymentsClient.Get method. -type OnlineDeploymentsClientGetOptions struct { - // placeholder for future optional parameters -} + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` -// OnlineDeploymentsClientListOptions contains the optional parameters for the OnlineDeploymentsClient.List method. -type OnlineDeploymentsClientListOptions struct { - // Ordering of list. - OrderBy *string - // Continuation token for pagination. - Skip *string - // Top of list. - Top *int32 + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` } -// OnlineDeploymentsClientListSKUsOptions contains the optional parameters for the OnlineDeploymentsClient.ListSKUs method. -type OnlineDeploymentsClientListSKUsOptions struct { - // Number of Skus to be retrieved in a page of results. - Count *int32 - // Continuation token for pagination. - Skip *string -} +type InferenceContainerProperties struct { + // The route to check the liveness of the inference server container. + LivenessRoute *Route `json:"livenessRoute,omitempty"` -type OnlineEndpoint struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` + // The route to check the readiness of the inference server container. + ReadinessRoute *Route `json:"readinessRoute,omitempty"` - // REQUIRED; [Required] Additional attributes of the entity. - Properties *OnlineEndpointProperties `json:"properties,omitempty"` + // The port to send the scoring requests to, within the inference server container. + ScoringRoute *Route `json:"scoringRoute,omitempty"` +} - // Managed service identity (system assigned and/or user assigned identities) - Identity *ManagedServiceIdentity `json:"identity,omitempty"` +// InstanceTypeSchema - Instance type schema. +type InstanceTypeSchema struct { + // Node Selector + NodeSelector map[string]*string `json:"nodeSelector,omitempty"` - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - Kind *string `json:"kind,omitempty"` + // Resource requests/limits for this instance type + Resources *InstanceTypeSchemaResources `json:"resources,omitempty"` +} - // Sku details required for ARM contract for Autoscaling. - SKU *SKU `json:"sku,omitempty"` +// InstanceTypeSchemaResources - Resource requests/limits for this instance type +type InstanceTypeSchemaResources struct { + // Resource limits for this instance type + Limits map[string]*string `json:"limits,omitempty"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + // Resource requests for this instance type + Requests map[string]*string `json:"requests,omitempty"` +} + +// JobBase - Azure Resource Manager resource envelope. +type JobBase struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties JobBasePropertiesClassification `json:"properties,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` @@ -4296,600 +5211,2982 @@ type OnlineEndpoint struct { Type *string `json:"type,omitempty" azure:"ro"` } -// OnlineEndpointProperties - Online endpoint configuration -type OnlineEndpointProperties struct { - // REQUIRED; [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. - // 'Key' doesn't expire but 'AMLToken' does. - AuthMode *EndpointAuthMode `json:"authMode,omitempty"` +// JobBasePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetJobBaseProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoMLJob, *CommandJob, *JobBaseProperties, *LabelingJobProperties, *PipelineJob, *SparkJob, *SweepJob +type JobBasePropertiesClassification interface { + // GetJobBaseProperties returns the JobBaseProperties content of the underlying type. + GetJobBaseProperties() *JobBaseProperties +} - // ARM resource ID of the compute if it exists. optional - Compute *string `json:"compute,omitempty"` +// JobBaseProperties - Base definition for a job. +type JobBaseProperties struct { + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` - // Description of the inference endpoint. + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` + + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,omitempty"` + + // The asset description text. Description *string `json:"description,omitempty"` - // EndpointAuthKeys to set initially on an Endpoint. This property will always be returned as null. AuthKey values must be - // retrieved using the ListKeys API. - Keys *EndpointAuthKeys `json:"keys,omitempty"` + // Display name of job. + DisplayName *string `json:"displayName,omitempty"` - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` + // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + ExperimentName *string `json:"experimentName,omitempty"` - // Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. - Traffic map[string]*int32 `json:"traffic,omitempty"` + // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken + // if null. + Identity IdentityConfigurationClassification `json:"identity,omitempty"` - // READ-ONLY; Provisioning state for the endpoint. - ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // READ-ONLY; Endpoint URI. - ScoringURI *string `json:"scoringUri,omitempty" azure:"ro"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // READ-ONLY; Endpoint Swagger URI. - SwaggerURI *string `json:"swaggerUri,omitempty" azure:"ro"` + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` } -// OnlineEndpointTrackedResourceArmPaginatedResult - A paginated list of OnlineEndpoint entities. -type OnlineEndpointTrackedResourceArmPaginatedResult struct { - // The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type JobBaseProperties. +func (j *JobBaseProperties) GetJobBaseProperties() *JobBaseProperties { return j } + +// JobBaseResourceArmPaginatedResult - A paginated list of JobBase entities. +type JobBaseResourceArmPaginatedResult struct { + // The link to the next page of JobBase objects. If null, there are no additional pages. NextLink *string `json:"nextLink,omitempty"` - // An array of objects of type OnlineEndpoint. - Value []*OnlineEndpoint `json:"value,omitempty"` + // An array of objects of type JobBase. + Value []*JobBase `json:"value,omitempty"` } -// OnlineEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginCreateOrUpdate -// method. -type OnlineEndpointsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string +// JobInputClassification provides polymorphic access to related types. +// Call the interface's GetJobInput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CustomModelJobInput, *JobInput, *LiteralJobInput, *MLFlowModelJobInput, *MLTableJobInput, *TritonModelJobInput, *URIFileJobInput, +// - *URIFolderJobInput +type JobInputClassification interface { + // GetJobInput returns the JobInput content of the underlying type. + GetJobInput() *JobInput } -// OnlineEndpointsClientBeginDeleteOptions contains the optional parameters for the OnlineEndpointsClient.BeginDelete method. -type OnlineEndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// JobInput - Command job definition. +type JobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,omitempty"` -// OnlineEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the OnlineEndpointsClient.BeginRegenerateKeys -// method. -type OnlineEndpointsClientBeginRegenerateKeysOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // Description for the input. + Description *string `json:"description,omitempty"` } -// OnlineEndpointsClientBeginUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginUpdate method. -type OnlineEndpointsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string +// GetJobInput implements the JobInputClassification interface for type JobInput. +func (j *JobInput) GetJobInput() *JobInput { return j } + +// JobLimitsClassification provides polymorphic access to related types. +// Call the interface's GetJobLimits() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CommandJobLimits, *JobLimits, *SweepJobLimits +type JobLimitsClassification interface { + // GetJobLimits returns the JobLimits content of the underlying type. + GetJobLimits() *JobLimits } -// OnlineEndpointsClientGetOptions contains the optional parameters for the OnlineEndpointsClient.Get method. -type OnlineEndpointsClientGetOptions struct { - // placeholder for future optional parameters +type JobLimits struct { + // REQUIRED; [Required] JobLimit type. + JobLimitsType *JobLimitsType `json:"jobLimitsType,omitempty"` + + // The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as + // low as Seconds. + Timeout *string `json:"timeout,omitempty"` } -// OnlineEndpointsClientGetTokenOptions contains the optional parameters for the OnlineEndpointsClient.GetToken method. -type OnlineEndpointsClientGetTokenOptions struct { - // placeholder for future optional parameters +// GetJobLimits implements the JobLimitsClassification interface for type JobLimits. +func (j *JobLimits) GetJobLimits() *JobLimits { return j } + +// JobOutputClassification provides polymorphic access to related types. +// Call the interface's GetJobOutput() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CustomModelJobOutput, *JobOutput, *MLFlowModelJobOutput, *MLTableJobOutput, *TritonModelJobOutput, *URIFileJobOutput, +// - *URIFolderJobOutput +type JobOutputClassification interface { + // GetJobOutput returns the JobOutput content of the underlying type. + GetJobOutput() *JobOutput } -// OnlineEndpointsClientListKeysOptions contains the optional parameters for the OnlineEndpointsClient.ListKeys method. -type OnlineEndpointsClientListKeysOptions struct { - // placeholder for future optional parameters +// JobOutput - Job output definition container information on where to find job output/logs. +type JobOutput struct { + // REQUIRED; [Required] Specifies the type of job. + JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + + // Description for the output. + Description *string `json:"description,omitempty"` } -// OnlineEndpointsClientListOptions contains the optional parameters for the OnlineEndpointsClient.List method. -type OnlineEndpointsClientListOptions struct { - // EndpointComputeType to be filtered by. - ComputeType *EndpointComputeType - // Number of endpoints to be retrieved in a page of results. - Count *int32 - // Name of the endpoint. - Name *string - // The option to order the response. - OrderBy *OrderString - // A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties - // key=value Example: propKey1,propKey2,propKey3=value3 . - Properties *string +// GetJobOutput implements the JobOutputClassification interface for type JobOutput. +func (j *JobOutput) GetJobOutput() *JobOutput { return j } + +type JobResourceConfiguration struct { + // 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. + DockerArgs *string `json:"dockerArgs,omitempty"` + + // Optional number of instances or nodes used by the compute target. + InstanceCount *int32 `json:"instanceCount,omitempty"` + + // Optional type of VM used as supported by the compute target. + InstanceType *string `json:"instanceType,omitempty"` + + // Additional properties bag. + Properties map[string]interface{} `json:"properties,omitempty"` + + // 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). + ShmSize *string `json:"shmSize,omitempty"` +} + +type JobScheduleAction struct { + // REQUIRED; [Required] Specifies the action type of the schedule + ActionType *ScheduleActionType `json:"actionType,omitempty"` + + // REQUIRED; [Required] Defines Schedule action definition details. + JobDefinition JobBasePropertiesClassification `json:"jobDefinition,omitempty"` +} + +// GetScheduleActionBase implements the ScheduleActionBaseClassification interface for type JobScheduleAction. +func (j *JobScheduleAction) GetScheduleActionBase() *ScheduleActionBase { + return &ScheduleActionBase{ + ActionType: j.ActionType, + } +} + +// JobService - Job endpoint definition +type JobService struct { + // Url for endpoint. + Endpoint *string `json:"endpoint,omitempty"` + + // Endpoint type. + JobServiceType *string `json:"jobServiceType,omitempty"` + + // 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. + Nodes NodesClassification `json:"nodes,omitempty"` + + // Port for endpoint set by user. + Port *int32 `json:"port,omitempty"` + + // Additional properties to set on the endpoint. + Properties map[string]*string `json:"properties,omitempty"` + + // READ-ONLY; Any error in the service. + ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` + + // READ-ONLY; Status of endpoint. + Status *string `json:"status,omitempty" azure:"ro"` +} + +// JobsClientBeginCancelOptions contains the optional parameters for the JobsClient.BeginCancel method. +type JobsClientBeginCancelOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. +type JobsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. +type JobsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +type JobsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobsClientListOptions contains the optional parameters for the JobsClient.List method. +type JobsClientListOptions struct { + // Type of job to be returned. + JobType *string + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // The scheduled id for listing the job triggered from + ScheduleID *string + // Indicator whether the job is scheduled job. + Scheduled *bool // Continuation token for pagination. Skip *string - // A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: - // tagKey1,tagKey2,tagKey3=value3 . - Tags *string + // Jobs returned will have this tag key. + Tag *string } -// OnlineRequestSettings - Online deployment scoring requests configuration. -type OnlineRequestSettings struct { - // The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. - MaxConcurrentRequestsPerInstance *int32 `json:"maxConcurrentRequestsPerInstance,omitempty"` +type KerberosCredentials struct { + // REQUIRED; [Required] IP Address or DNS HostName. + KerberosKdcAddress *string `json:"kerberosKdcAddress,omitempty"` - // The maximum amount of time a request will stay in the queue in ISO 8601 format. Defaults to 500ms. - MaxQueueWait *string `json:"maxQueueWait,omitempty"` + // REQUIRED; [Required] Kerberos Username + KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - // The scoring timeout in ISO 8601 format. Defaults to 5000ms. - RequestTimeout *string `json:"requestTimeout,omitempty"` + // REQUIRED; [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host + // or service. + KerberosRealm *string `json:"kerberosRealm,omitempty"` } -// OnlineScaleSettingsClassification provides polymorphic access to related types. -// Call the interface's GetOnlineScaleSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DefaultScaleSettings, *OnlineScaleSettings, *TargetUtilizationScaleSettings -type OnlineScaleSettingsClassification interface { - // GetOnlineScaleSettings returns the OnlineScaleSettings content of the underlying type. - GetOnlineScaleSettings() *OnlineScaleSettings +type KerberosKeytabCredentials struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialsType *CredentialsType `json:"credentialsType,omitempty"` + + // REQUIRED; [Required] IP Address or DNS HostName. + KerberosKdcAddress *string `json:"kerberosKdcAddress,omitempty"` + + // REQUIRED; [Required] Kerberos Username + KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` + + // REQUIRED; [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host + // or service. + KerberosRealm *string `json:"kerberosRealm,omitempty"` + + // REQUIRED; [Required] Keytab secrets. + Secrets *KerberosKeytabSecrets `json:"secrets,omitempty"` } -// OnlineScaleSettings - Online deployment scaling configuration. -type OnlineScaleSettings struct { - // REQUIRED; [Required] Type of deployment scaling algorithm - ScaleType *ScaleType `json:"scaleType,omitempty"` +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type KerberosKeytabCredentials. +func (k *KerberosKeytabCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: k.CredentialsType, + } } -// GetOnlineScaleSettings implements the OnlineScaleSettingsClassification interface for type OnlineScaleSettings. -func (o *OnlineScaleSettings) GetOnlineScaleSettings() *OnlineScaleSettings { return o } +type KerberosKeytabSecrets struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + SecretsType *SecretsType `json:"secretsType,omitempty"` + + // Kerberos keytab secret. + KerberosKeytab *string `json:"kerberosKeytab,omitempty"` +} + +// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type KerberosKeytabSecrets. +func (k *KerberosKeytabSecrets) GetDatastoreSecrets() *DatastoreSecrets { + return &DatastoreSecrets{ + SecretsType: k.SecretsType, + } +} + +type KerberosPasswordCredentials struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialsType *CredentialsType `json:"credentialsType,omitempty"` + + // REQUIRED; [Required] IP Address or DNS HostName. + KerberosKdcAddress *string `json:"kerberosKdcAddress,omitempty"` + + // REQUIRED; [Required] Kerberos Username + KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` + + // REQUIRED; [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host + // or service. + KerberosRealm *string `json:"kerberosRealm,omitempty"` + + // REQUIRED; [Required] Kerberos password secrets. + Secrets *KerberosPasswordSecrets `json:"secrets,omitempty"` +} + +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type KerberosPasswordCredentials. +func (k *KerberosPasswordCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: k.CredentialsType, + } +} + +type KerberosPasswordSecrets struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + SecretsType *SecretsType `json:"secretsType,omitempty"` + + // Kerberos password secret. + KerberosPassword *string `json:"kerberosPassword,omitempty"` +} + +// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type KerberosPasswordSecrets. +func (k *KerberosPasswordSecrets) GetDatastoreSecrets() *DatastoreSecrets { + return &DatastoreSecrets{ + SecretsType: k.SecretsType, + } +} + +// Kubernetes - A Machine Learning compute based on Kubernetes Compute. +type Kubernetes struct { + // REQUIRED; The type of compute + ComputeType *ComputeType `json:"computeType,omitempty"` + + // The description of the Machine Learning compute. + Description *string `json:"description,omitempty"` + + // Properties of Kubernetes + Properties *KubernetesProperties `json:"properties,omitempty"` + + // ARM resource id of the underlying compute + ResourceID *string `json:"resourceId,omitempty"` + + // READ-ONLY; Location for the underlying compute + ComputeLocation *string `json:"computeLocation,omitempty" azure:"ro"` + + // READ-ONLY; The time at which the compute was created. + CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning + // service provisioned it if false. + IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` + + // READ-ONLY; The time at which the compute was last modified. + ModifiedOn *time.Time `json:"modifiedOn,omitempty" azure:"ro"` + + // READ-ONLY; Errors during provisioning + ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` + + // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// GetCompute implements the ComputeClassification interface for type Kubernetes. +func (k *Kubernetes) GetCompute() *Compute { + return &Compute{ + ComputeType: k.ComputeType, + ComputeLocation: k.ComputeLocation, + ProvisioningState: k.ProvisioningState, + Description: k.Description, + CreatedOn: k.CreatedOn, + ModifiedOn: k.ModifiedOn, + ResourceID: k.ResourceID, + ProvisioningErrors: k.ProvisioningErrors, + IsAttachedCompute: k.IsAttachedCompute, + DisableLocalAuth: k.DisableLocalAuth, + } +} + +// KubernetesOnlineDeployment - Properties specific to a KubernetesOnlineDeployment. +type KubernetesOnlineDeployment struct { + // REQUIRED; [Required] The compute type of the endpoint. + EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` + + // If true, enables Application Insights logging. + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + + // Code configuration for the endpoint deployment. + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + + // The resource requirements for the container (cpu and memory). + ContainerResourceRequirements *ContainerResourceRequirements `json:"containerResourceRequirements,omitempty"` + + // Description of the endpoint deployment. + Description *string `json:"description,omitempty"` + + // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + + // ARM resource ID of the environment specification for the endpoint deployment. + EnvironmentID *string `json:"environmentId,omitempty"` + + // Environment variables configuration for the deployment. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + + // Compute instance type. + InstanceType *string `json:"instanceType,omitempty"` + + // Liveness probe monitors the health of the container regularly. + LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + + // The URI path to the model. + Model *string `json:"model,omitempty"` + + // The path to mount the model in custom container. + ModelMountPath *string `json:"modelMountPath,omitempty"` + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string `json:"properties,omitempty"` + + // Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness + // probe. + ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` + + // Request settings for the deployment. + RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + + // Scale settings for the deployment. If it is null or not provided, it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + // and to DefaultScaleSettings for ManagedOnlineDeployment. + ScaleSettings OnlineScaleSettingsClassification `json:"scaleSettings,omitempty"` + + // READ-ONLY; Provisioning state for the endpoint deployment. + ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type KubernetesOnlineDeployment. +func (k *KubernetesOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { + return &OnlineDeploymentProperties{ + AppInsightsEnabled: k.AppInsightsEnabled, + EgressPublicNetworkAccess: k.EgressPublicNetworkAccess, + EndpointComputeType: k.EndpointComputeType, + InstanceType: k.InstanceType, + LivenessProbe: k.LivenessProbe, + Model: k.Model, + ModelMountPath: k.ModelMountPath, + ProvisioningState: k.ProvisioningState, + ReadinessProbe: k.ReadinessProbe, + RequestSettings: k.RequestSettings, + ScaleSettings: k.ScaleSettings, + CodeConfiguration: k.CodeConfiguration, + Description: k.Description, + EnvironmentID: k.EnvironmentID, + EnvironmentVariables: k.EnvironmentVariables, + Properties: k.Properties, + } +} + +// KubernetesProperties - Kubernetes properties +type KubernetesProperties struct { + // Default instance type + DefaultInstanceType *string `json:"defaultInstanceType,omitempty"` + + // Extension instance release train. + ExtensionInstanceReleaseTrain *string `json:"extensionInstanceReleaseTrain,omitempty"` + + // Extension principal-id. + ExtensionPrincipalID *string `json:"extensionPrincipalId,omitempty"` + + // Instance Type Schema + InstanceTypes map[string]*InstanceTypeSchema `json:"instanceTypes,omitempty"` + + // Compute namespace + Namespace *string `json:"namespace,omitempty"` + + // Relay connection string. + RelayConnectionString *string `json:"relayConnectionString,omitempty"` + + // ServiceBus connection string. + ServiceBusConnectionString *string `json:"serviceBusConnectionString,omitempty"` + + // VC name. + VcName *string `json:"vcName,omitempty"` +} + +// KubernetesSchema - Kubernetes Compute Schema +type KubernetesSchema struct { + // Properties of Kubernetes + Properties *KubernetesProperties `json:"properties,omitempty"` +} + +// LabelCategory - Label category definition +type LabelCategory struct { + // Dictionary of label classes in this category. + Classes map[string]*LabelClass `json:"classes,omitempty"` + + // Display name of the label category. + DisplayName *string `json:"displayName,omitempty"` + + // Indicates whether it is allowed to select multiple classes in this category. + MultiSelect *MultiSelect `json:"multiSelect,omitempty"` +} + +// LabelClass - Label class definition +type LabelClass struct { + // Display name of the label class. + DisplayName *string `json:"displayName,omitempty"` + + // Dictionary of subclasses of the label class. + Subclasses map[string]*LabelClass `json:"subclasses,omitempty"` +} + +// LabelingDataConfiguration - Labeling data configuration definition +type LabelingDataConfiguration struct { + // Resource Id of the data asset to perform labeling. + DataID *string `json:"dataId,omitempty"` + + // Indicates whether to enable incremental data refresh. + IncrementalDataRefresh *IncrementalDataRefresh `json:"incrementalDataRefresh,omitempty"` +} + +// LabelingJob - Azure Resource Manager resource envelope. +type LabelingJob struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *LabelingJobProperties `json:"properties,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// LabelingJobImageProperties - Properties of a labeling job for image data +type LabelingJobImageProperties struct { + // REQUIRED; [Required] Media type of the job. + MediaType *MediaType `json:"mediaType,omitempty"` + + // Annotation type of image labeling job. + AnnotationType *ImageAnnotationType `json:"annotationType,omitempty"` +} + +// GetLabelingJobMediaProperties implements the LabelingJobMediaPropertiesClassification interface for type LabelingJobImageProperties. +func (l *LabelingJobImageProperties) GetLabelingJobMediaProperties() *LabelingJobMediaProperties { + return &LabelingJobMediaProperties{ + MediaType: l.MediaType, + } +} + +// LabelingJobInstructions - Instructions for labeling job +type LabelingJobInstructions struct { + // The link to a page with detailed labeling instructions for labelers. + URI *string `json:"uri,omitempty"` +} + +// LabelingJobMediaPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetLabelingJobMediaProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *LabelingJobImageProperties, *LabelingJobMediaProperties, *LabelingJobTextProperties +type LabelingJobMediaPropertiesClassification interface { + // GetLabelingJobMediaProperties returns the LabelingJobMediaProperties content of the underlying type. + GetLabelingJobMediaProperties() *LabelingJobMediaProperties +} + +// LabelingJobMediaProperties - Properties of a labeling job +type LabelingJobMediaProperties struct { + // REQUIRED; [Required] Media type of the job. + MediaType *MediaType `json:"mediaType,omitempty"` +} + +// GetLabelingJobMediaProperties implements the LabelingJobMediaPropertiesClassification interface for type LabelingJobMediaProperties. +func (l *LabelingJobMediaProperties) GetLabelingJobMediaProperties() *LabelingJobMediaProperties { + return l +} + +// LabelingJobProperties - Labeling job definition +type LabelingJobProperties struct { + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` + + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` + + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,omitempty"` + + // Configuration of data used in the job. + DataConfiguration *LabelingDataConfiguration `json:"dataConfiguration,omitempty"` + + // The asset description text. + Description *string `json:"description,omitempty"` + + // Display name of job. + DisplayName *string `json:"displayName,omitempty"` + + // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + ExperimentName *string `json:"experimentName,omitempty"` + + // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken + // if null. + Identity IdentityConfigurationClassification `json:"identity,omitempty"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` + + // Labeling instructions of the job. + JobInstructions *LabelingJobInstructions `json:"jobInstructions,omitempty"` + + // Label categories of the job. + LabelCategories map[string]*LabelCategory `json:"labelCategories,omitempty"` + + // Media type specific properties in the job. + LabelingJobMediaProperties LabelingJobMediaPropertiesClassification `json:"labelingJobMediaProperties,omitempty"` + + // Configuration of MLAssist feature in the job. + MlAssistConfiguration MLAssistConfigurationClassification `json:"mlAssistConfiguration,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Created time of the job in UTC timezone. + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"` + + // READ-ONLY; Progress metrics of the job. + ProgressMetrics *ProgressMetrics `json:"progressMetrics,omitempty" azure:"ro"` + + // READ-ONLY; Internal id of the job(Previously called project). + ProjectID *string `json:"projectId,omitempty" azure:"ro"` + + // READ-ONLY; Specifies the labeling job provisioning state. + ProvisioningState *JobProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` + + // READ-ONLY; Status messages of the job. + StatusMessages []*StatusMessage `json:"statusMessages,omitempty" azure:"ro"` +} + +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type LabelingJobProperties. +func (l *LabelingJobProperties) GetJobBaseProperties() *JobBaseProperties { + return &JobBaseProperties{ + ComponentID: l.ComponentID, + ComputeID: l.ComputeID, + DisplayName: l.DisplayName, + ExperimentName: l.ExperimentName, + Identity: l.Identity, + IsArchived: l.IsArchived, + JobType: l.JobType, + Services: l.Services, + Status: l.Status, + Description: l.Description, + Properties: l.Properties, + Tags: l.Tags, + } +} + +// LabelingJobResourceArmPaginatedResult - A paginated list of LabelingJob entities. +type LabelingJobResourceArmPaginatedResult struct { + // The link to the next page of LabelingJob objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type LabelingJob. + Value []*LabelingJob `json:"value,omitempty"` +} + +// LabelingJobTextProperties - Properties of a labeling job for text data +type LabelingJobTextProperties struct { + // REQUIRED; [Required] Media type of the job. + MediaType *MediaType `json:"mediaType,omitempty"` + + // Annotation type of text labeling job. + AnnotationType *TextAnnotationType `json:"annotationType,omitempty"` +} + +// GetLabelingJobMediaProperties implements the LabelingJobMediaPropertiesClassification interface for type LabelingJobTextProperties. +func (l *LabelingJobTextProperties) GetLabelingJobMediaProperties() *LabelingJobMediaProperties { + return &LabelingJobMediaProperties{ + MediaType: l.MediaType, + } +} + +// LabelingJobsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabelingJobsClient.BeginCreateOrUpdate +// method. +type LabelingJobsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabelingJobsClientBeginExportLabelsOptions contains the optional parameters for the LabelingJobsClient.BeginExportLabels +// method. +type LabelingJobsClientBeginExportLabelsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabelingJobsClientBeginResumeOptions contains the optional parameters for the LabelingJobsClient.BeginResume method. +type LabelingJobsClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LabelingJobsClientDeleteOptions contains the optional parameters for the LabelingJobsClient.Delete method. +type LabelingJobsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// LabelingJobsClientGetOptions contains the optional parameters for the LabelingJobsClient.Get method. +type LabelingJobsClientGetOptions struct { + // Boolean value to indicate whether to include JobInstructions in response. + IncludeJobInstructions *bool + // Boolean value to indicate Whether to include LabelCategories in response. + IncludeLabelCategories *bool +} + +// LabelingJobsClientListOptions contains the optional parameters for the LabelingJobsClient.List method. +type LabelingJobsClientListOptions struct { + // Continuation token for pagination. + Skip *string + // Number of labeling jobs to return. + Top *int32 +} + +// LabelingJobsClientPauseOptions contains the optional parameters for the LabelingJobsClient.Pause method. +type LabelingJobsClientPauseOptions struct { + // placeholder for future optional parameters +} + +// ListAmlUserFeatureResult - The List Aml user feature operation response. +type ListAmlUserFeatureResult struct { + // READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next + // page of AML user features information. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` + + // READ-ONLY; The list of AML user facing features. + Value []*AmlUserFeature `json:"value,omitempty" azure:"ro"` +} + +type ListNotebookKeysResult struct { + // READ-ONLY + PrimaryAccessKey *string `json:"primaryAccessKey,omitempty" azure:"ro"` + + // READ-ONLY + SecondaryAccessKey *string `json:"secondaryAccessKey,omitempty" azure:"ro"` +} + +type ListStorageAccountKeysResult struct { + // READ-ONLY + UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` +} + +// ListUsagesResult - The List Usages operation response. +type ListUsagesResult struct { + // READ-ONLY; The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next + // page of AML resource usage information. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` + + // READ-ONLY; The list of AML resource usages. + Value []*Usage `json:"value,omitempty" azure:"ro"` +} + +type ListWorkspaceKeysResult struct { + // READ-ONLY + AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty" azure:"ro"` + + // READ-ONLY + ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty" azure:"ro"` + + // READ-ONLY + NotebookAccessKeys *ListNotebookKeysResult `json:"notebookAccessKeys,omitempty" azure:"ro"` + + // READ-ONLY + UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` + + // READ-ONLY + UserStorageResourceID *string `json:"userStorageResourceId,omitempty" azure:"ro"` +} + +// ListWorkspaceQuotas - The List WorkspaceQuotasByVMFamily operation response. +type ListWorkspaceQuotas struct { + // READ-ONLY; The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch + // the next page of Workspace Quota information. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` + + // READ-ONLY; The list of Workspace Quotas by VM Family + Value []*ResourceQuota `json:"value,omitempty" azure:"ro"` +} + +// LiteralJobInput - Literal input type. +type LiteralJobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,omitempty"` + + // REQUIRED; [Required] Literal value for the input. + Value *string `json:"value,omitempty"` + + // Description for the input. + Description *string `json:"description,omitempty"` +} + +// GetJobInput implements the JobInputClassification interface for type LiteralJobInput. +func (l *LiteralJobInput) GetJobInput() *JobInput { + return &JobInput{ + Description: l.Description, + JobInputType: l.JobInputType, + } +} + +// MLAssistConfigurationClassification provides polymorphic access to related types. +// Call the interface's GetMLAssistConfiguration() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *MLAssistConfiguration, *MLAssistConfigurationDisabled, *MLAssistConfigurationEnabled +type MLAssistConfigurationClassification interface { + // GetMLAssistConfiguration returns the MLAssistConfiguration content of the underlying type. + GetMLAssistConfiguration() *MLAssistConfiguration +} + +// MLAssistConfiguration - Labeling MLAssist configuration definition +type MLAssistConfiguration struct { + // REQUIRED; [Required] Indicates whether MLAssist feature is enabled. + MlAssist *MLAssistConfigurationType `json:"mlAssist,omitempty"` +} + +// GetMLAssistConfiguration implements the MLAssistConfigurationClassification interface for type MLAssistConfiguration. +func (m *MLAssistConfiguration) GetMLAssistConfiguration() *MLAssistConfiguration { return m } + +// MLAssistConfigurationDisabled - Labeling MLAssist configuration definition when MLAssist is disabled +type MLAssistConfigurationDisabled struct { + // REQUIRED; [Required] Indicates whether MLAssist feature is enabled. + MlAssist *MLAssistConfigurationType `json:"mlAssist,omitempty"` +} + +// GetMLAssistConfiguration implements the MLAssistConfigurationClassification interface for type MLAssistConfigurationDisabled. +func (m *MLAssistConfigurationDisabled) GetMLAssistConfiguration() *MLAssistConfiguration { + return &MLAssistConfiguration{ + MlAssist: m.MlAssist, + } +} + +// MLAssistConfigurationEnabled - Labeling MLAssist configuration definition when MLAssist is enabled +type MLAssistConfigurationEnabled struct { + // REQUIRED; [Required] AML compute binding used in inferencing. + InferencingComputeBinding *string `json:"inferencingComputeBinding,omitempty"` + + // REQUIRED; [Required] Indicates whether MLAssist feature is enabled. + MlAssist *MLAssistConfigurationType `json:"mlAssist,omitempty"` + + // REQUIRED; [Required] AML compute binding used in training. + TrainingComputeBinding *string `json:"trainingComputeBinding,omitempty"` +} + +// GetMLAssistConfiguration implements the MLAssistConfigurationClassification interface for type MLAssistConfigurationEnabled. +func (m *MLAssistConfigurationEnabled) GetMLAssistConfiguration() *MLAssistConfiguration { + return &MLAssistConfiguration{ + MlAssist: m.MlAssist, + } +} + +type MLFlowModelJobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,omitempty"` + + // REQUIRED; [Required] Input Asset URI. + URI *string `json:"uri,omitempty"` + + // Description for the input. + Description *string `json:"description,omitempty"` + + // Input Asset Delivery Mode. + Mode *InputDeliveryMode `json:"mode,omitempty"` +} + +// GetJobInput implements the JobInputClassification interface for type MLFlowModelJobInput. +func (m *MLFlowModelJobInput) GetJobInput() *JobInput { + return &JobInput{ + Description: m.Description, + JobInputType: m.JobInputType, + } +} + +type MLFlowModelJobOutput struct { + // REQUIRED; [Required] Specifies the type of job. + JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + + // Description for the output. + Description *string `json:"description,omitempty"` + + // Output Asset Delivery Mode. + Mode *OutputDeliveryMode `json:"mode,omitempty"` + + // Output Asset URI. + URI *string `json:"uri,omitempty"` +} + +// GetJobOutput implements the JobOutputClassification interface for type MLFlowModelJobOutput. +func (m *MLFlowModelJobOutput) GetJobOutput() *JobOutput { + return &JobOutput{ + Description: m.Description, + JobOutputType: m.JobOutputType, + } +} + +// MLTableData - MLTable data definition +type MLTableData struct { + // REQUIRED; [Required] Specifies the type of data. + DataType *DataType `json:"dataType,omitempty"` + + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 + DataURI *string `json:"dataUri,omitempty"` + + // The asset description text. + Description *string `json:"description,omitempty"` + + // If the name version are system generated (anonymous registration). + IsAnonymous *bool `json:"isAnonymous,omitempty"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // Uris referenced in the MLTable definition (required for lineage) + ReferencedUris []*string `json:"referencedUris,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` +} + +// GetDataVersionBaseProperties implements the DataVersionBasePropertiesClassification interface for type MLTableData. +func (m *MLTableData) GetDataVersionBaseProperties() *DataVersionBaseProperties { + return &DataVersionBaseProperties{ + DataType: m.DataType, + DataURI: m.DataURI, + IsAnonymous: m.IsAnonymous, + IsArchived: m.IsArchived, + Description: m.Description, + Properties: m.Properties, + Tags: m.Tags, + } +} + +type MLTableJobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,omitempty"` + + // REQUIRED; [Required] Input Asset URI. + URI *string `json:"uri,omitempty"` + + // Description for the input. + Description *string `json:"description,omitempty"` + + // Input Asset Delivery Mode. + Mode *InputDeliveryMode `json:"mode,omitempty"` +} + +// GetJobInput implements the JobInputClassification interface for type MLTableJobInput. +func (m *MLTableJobInput) GetJobInput() *JobInput { + return &JobInput{ + Description: m.Description, + JobInputType: m.JobInputType, + } +} + +type MLTableJobOutput struct { + // REQUIRED; [Required] Specifies the type of job. + JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + + // Description for the output. + Description *string `json:"description,omitempty"` + + // Output Asset Delivery Mode. + Mode *OutputDeliveryMode `json:"mode,omitempty"` + + // Output Asset URI. + URI *string `json:"uri,omitempty"` +} + +// GetJobOutput implements the JobOutputClassification interface for type MLTableJobOutput. +func (m *MLTableJobOutput) GetJobOutput() *JobOutput { + return &JobOutput{ + Description: m.Description, + JobOutputType: m.JobOutputType, + } +} + +// ManagedIdentity - Managed identity configuration. +type ManagedIdentity struct { + // REQUIRED; [Required] Specifies the type of identity framework. + IdentityType *IdentityConfigurationType `json:"identityType,omitempty"` + + // Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. + ClientID *string `json:"clientId,omitempty"` + + // Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. + ObjectID *string `json:"objectId,omitempty"` + + // Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. + ResourceID *string `json:"resourceId,omitempty"` +} + +// GetIdentityConfiguration implements the IdentityConfigurationClassification interface for type ManagedIdentity. +func (m *ManagedIdentity) GetIdentityConfiguration() *IdentityConfiguration { + return &IdentityConfiguration{ + IdentityType: m.IdentityType, + } +} + +type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` + + // Category of the connection + Category *string `json:"category,omitempty"` + Credentials *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. +func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: m.AuthType, + Category: m.Category, + Target: m.Target, + Value: m.Value, + ValueFormat: m.ValueFormat, + } +} + +// ManagedOnlineDeployment - Properties specific to a ManagedOnlineDeployment. +type ManagedOnlineDeployment struct { + // REQUIRED; [Required] The compute type of the endpoint. + EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` + + // If true, enables Application Insights logging. + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + + // Code configuration for the endpoint deployment. + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + + // Description of the endpoint deployment. + Description *string `json:"description,omitempty"` + + // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + + // ARM resource ID of the environment specification for the endpoint deployment. + EnvironmentID *string `json:"environmentId,omitempty"` + + // Environment variables configuration for the deployment. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + + // Compute instance type. + InstanceType *string `json:"instanceType,omitempty"` + + // Liveness probe monitors the health of the container regularly. + LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + + // The URI path to the model. + Model *string `json:"model,omitempty"` + + // The path to mount the model in custom container. + ModelMountPath *string `json:"modelMountPath,omitempty"` + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string `json:"properties,omitempty"` + + // Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness + // probe. + ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` + + // Request settings for the deployment. + RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + + // Scale settings for the deployment. If it is null or not provided, it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + // and to DefaultScaleSettings for ManagedOnlineDeployment. + ScaleSettings OnlineScaleSettingsClassification `json:"scaleSettings,omitempty"` + + // READ-ONLY; Provisioning state for the endpoint deployment. + ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type ManagedOnlineDeployment. +func (m *ManagedOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { + return &OnlineDeploymentProperties{ + AppInsightsEnabled: m.AppInsightsEnabled, + EgressPublicNetworkAccess: m.EgressPublicNetworkAccess, + EndpointComputeType: m.EndpointComputeType, + InstanceType: m.InstanceType, + LivenessProbe: m.LivenessProbe, + Model: m.Model, + ModelMountPath: m.ModelMountPath, + ProvisioningState: m.ProvisioningState, + ReadinessProbe: m.ReadinessProbe, + RequestSettings: m.RequestSettings, + ScaleSettings: m.ScaleSettings, + CodeConfiguration: m.CodeConfiguration, + Description: m.Description, + EnvironmentID: m.EnvironmentID, + EnvironmentVariables: m.EnvironmentVariables, + Properties: m.Properties, + } +} + +// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type ManagedServiceIdentity struct { + // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + Type *ManagedServiceIdentityType `json:"type,omitempty"` + + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` + + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string `json:"principalId,omitempty" azure:"ro"` + + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty" azure:"ro"` +} + +// MedianStoppingPolicy - Defines an early termination policy based on running averages of the primary metric of all runs +type MedianStoppingPolicy struct { + // REQUIRED; [Required] Name of policy configuration + PolicyType *EarlyTerminationPolicyType `json:"policyType,omitempty"` + + // Number of intervals by which to delay the first evaluation. + DelayEvaluation *int32 `json:"delayEvaluation,omitempty"` + + // Interval (number of runs) between policy evaluations. + EvaluationInterval *int32 `json:"evaluationInterval,omitempty"` +} + +// GetEarlyTerminationPolicy implements the EarlyTerminationPolicyClassification interface for type MedianStoppingPolicy. +func (m *MedianStoppingPolicy) GetEarlyTerminationPolicy() *EarlyTerminationPolicy { + return &EarlyTerminationPolicy{ + DelayEvaluation: m.DelayEvaluation, + EvaluationInterval: m.EvaluationInterval, + PolicyType: m.PolicyType, + } +} + +// ModelContainer - Azure Resource Manager resource envelope. +type ModelContainer struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *ModelContainerProperties `json:"properties,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +type ModelContainerProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; The latest version inside this container. + LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` + + // READ-ONLY; The next auto incremental version + NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the model container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// ModelContainerResourceArmPaginatedResult - A paginated list of ModelContainer entities. +type ModelContainerResourceArmPaginatedResult struct { + // The link to the next page of ModelContainer objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type ModelContainer. + Value []*ModelContainer `json:"value,omitempty"` +} + +// ModelContainersClientCreateOrUpdateOptions contains the optional parameters for the ModelContainersClient.CreateOrUpdate +// method. +type ModelContainersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ModelContainersClientDeleteOptions contains the optional parameters for the ModelContainersClient.Delete method. +type ModelContainersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ModelContainersClientGetOptions contains the optional parameters for the ModelContainersClient.Get method. +type ModelContainersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ModelContainersClientListOptions contains the optional parameters for the ModelContainersClient.List method. +type ModelContainersClientListOptions struct { + // Maximum number of results to return. + Count *int32 + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string +} + +// ModelVersion - Azure Resource Manager resource envelope. +type ModelVersion struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *ModelVersionProperties `json:"properties,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// ModelVersionProperties - Model asset version details. +type ModelVersionProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` + + // Mapping of model flavors to their properties. + Flavors map[string]*FlavorData `json:"flavors,omitempty"` + + // If the name version are system generated (anonymous registration). + IsAnonymous *bool `json:"isAnonymous,omitempty"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` + + // Name of the training job which produced this model + JobName *string `json:"jobName,omitempty"` + + // The storage format for this entity. Used for NCD. + ModelType *string `json:"modelType,omitempty"` + + // The URI path to the model contents. + ModelURI *string `json:"modelUri,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Provisioning state for the model version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// ModelVersionResourceArmPaginatedResult - A paginated list of ModelVersion entities. +type ModelVersionResourceArmPaginatedResult struct { + // The link to the next page of ModelVersion objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type ModelVersion. + Value []*ModelVersion `json:"value,omitempty"` +} + +// ModelVersionsClientCreateOrUpdateOptions contains the optional parameters for the ModelVersionsClient.CreateOrUpdate method. +type ModelVersionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ModelVersionsClientDeleteOptions contains the optional parameters for the ModelVersionsClient.Delete method. +type ModelVersionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ModelVersionsClientGetOptions contains the optional parameters for the ModelVersionsClient.Get method. +type ModelVersionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ModelVersionsClientListOptions contains the optional parameters for the ModelVersionsClient.List method. +type ModelVersionsClientListOptions struct { + // Model description. + Description *string + // Name of the feed. + Feed *string + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Number of initial results to skip. + Offset *int32 + // Ordering of list. + OrderBy *string + // Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + Properties *string + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + // Maximum number of records to return. + Top *int32 + // Model version. + Version *string +} + +// Mpi - MPI distribution configuration. +type Mpi struct { + // REQUIRED; [Required] Specifies the type of distribution framework. + DistributionType *DistributionType `json:"distributionType,omitempty"` + + // Number of processes per MPI node. + ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` +} + +// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type Mpi. +func (m *Mpi) GetDistributionConfiguration() *DistributionConfiguration { + return &DistributionConfiguration{ + DistributionType: m.DistributionType, + } +} + +// NCrossValidationsClassification provides polymorphic access to related types. +// Call the interface's GetNCrossValidations() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoNCrossValidations, *CustomNCrossValidations, *NCrossValidations +type NCrossValidationsClassification interface { + // GetNCrossValidations returns the NCrossValidations content of the underlying type. + GetNCrossValidations() *NCrossValidations +} + +// NCrossValidations - N-Cross validations value. +type NCrossValidations struct { + // REQUIRED; [Required] Mode for determining N-Cross validations. + Mode *NCrossValidationsMode `json:"mode,omitempty"` +} + +// GetNCrossValidations implements the NCrossValidationsClassification interface for type NCrossValidations. +func (n *NCrossValidations) GetNCrossValidations() *NCrossValidations { return n } + +// NlpFixedParameters - Fixed training parameters that won't be swept over during AutoML NLP training. +type NlpFixedParameters struct { + // Number of steps to accumulate gradients over before running a backward pass. + GradientAccumulationSteps *int32 `json:"gradientAccumulationSteps,omitempty"` + + // The learning rate for the training procedure. + LearningRate *float32 `json:"learningRate,omitempty"` + + // The type of learning rate schedule to use during the training procedure. + LearningRateScheduler *NlpLearningRateScheduler `json:"learningRateScheduler,omitempty"` + + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` + + // Number of training epochs. + NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` + + // The batch size for the training procedure. + TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` + + // The batch size to be used during evaluation. + ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` + + // The warmup ratio, used alongside LrSchedulerType. + WarmupRatio *float32 `json:"warmupRatio,omitempty"` + + // The weight decay for the training procedure. + WeightDecay *float32 `json:"weightDecay,omitempty"` +} + +// NlpParameterSubspace - Stringified search spaces for each parameter. See below examples. +type NlpParameterSubspace struct { + // Number of steps to accumulate gradients over before running a backward pass. + GradientAccumulationSteps *string `json:"gradientAccumulationSteps,omitempty"` + + // The learning rate for the training procedure. + LearningRate *string `json:"learningRate,omitempty"` + + // The type of learning rate schedule to use during the training procedure. + LearningRateScheduler *string `json:"learningRateScheduler,omitempty"` + + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` + + // Number of training epochs. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` + + // The batch size for the training procedure. + TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` + + // The batch size to be used during evaluation. + ValidationBatchSize *string `json:"validationBatchSize,omitempty"` + + // The warmup ratio, used alongside LrSchedulerType. + WarmupRatio *string `json:"warmupRatio,omitempty"` + + // The weight decay for the training procedure. + WeightDecay *string `json:"weightDecay,omitempty"` +} + +// NlpSweepSettings - Model sweeping and hyperparameter tuning related settings. +type NlpSweepSettings struct { + // REQUIRED; [Required] Type of sampling algorithm. + SamplingAlgorithm *SamplingAlgorithmType `json:"samplingAlgorithm,omitempty"` + + // Type of early termination policy for the sweeping job. + EarlyTermination EarlyTerminationPolicyClassification `json:"earlyTermination,omitempty"` +} + +// NlpVertical - Abstract class for NLP related AutoML tasks. NLP - Natural Language Processing. +type NlpVertical struct { + // Featurization inputs needed for AutoML job. + FeaturizationSettings *NlpVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` + + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` +} + +type NlpVerticalFeaturizationSettings struct { + // Dataset language, useful for the text data. + DatasetLanguage *string `json:"datasetLanguage,omitempty"` +} + +// NlpVerticalLimitSettings - Job execution constraints. +type NlpVerticalLimitSettings struct { + // Maximum Concurrent AutoML iterations. + MaxConcurrentTrials *int32 `json:"maxConcurrentTrials,omitempty"` + + // Maximum nodes to use for the experiment. + MaxNodes *int32 `json:"maxNodes,omitempty"` + + // Number of AutoML iterations. + MaxTrials *int32 `json:"maxTrials,omitempty"` + + // AutoML job timeout. + Timeout *string `json:"timeout,omitempty"` + + // Timeout for individual HD trials. + TrialTimeout *string `json:"trialTimeout,omitempty"` +} + +// NodeStateCounts - Counts of various compute node states on the amlCompute. +type NodeStateCounts struct { + // READ-ONLY; Number of compute nodes in idle state. + IdleNodeCount *int32 `json:"idleNodeCount,omitempty" azure:"ro"` + + // READ-ONLY; Number of compute nodes which are leaving the amlCompute. + LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty" azure:"ro"` + + // READ-ONLY; Number of compute nodes which are in preempted state. + PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty" azure:"ro"` + + // READ-ONLY; Number of compute nodes which are being prepared. + PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty" azure:"ro"` + + // READ-ONLY; Number of compute nodes which are running jobs. + RunningNodeCount *int32 `json:"runningNodeCount,omitempty" azure:"ro"` + + // READ-ONLY; Number of compute nodes which are in unusable state. + UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty" azure:"ro"` +} + +// NodesClassification provides polymorphic access to related types. +// Call the interface's GetNodes() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AllNodes, *Nodes +type NodesClassification interface { + // GetNodes returns the Nodes content of the underlying type. + GetNodes() *Nodes +} + +// Nodes - Abstract Nodes definition +type Nodes struct { + // REQUIRED; [Required] Type of the Nodes value + NodesValueType *NodesValueType `json:"nodesValueType,omitempty"` +} + +// GetNodes implements the NodesClassification interface for type Nodes. +func (n *Nodes) GetNodes() *Nodes { return n } + +type NoneAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` + + // Category of the connection + Category *string `json:"category,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type NoneAuthTypeWorkspaceConnectionProperties. +func (n *NoneAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: n.AuthType, + Category: n.Category, + Target: n.Target, + Value: n.Value, + ValueFormat: n.ValueFormat, + } +} + +// NoneDatastoreCredentials - Empty/none datastore credentials. +type NoneDatastoreCredentials struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialsType *CredentialsType `json:"credentialsType,omitempty"` +} + +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type NoneDatastoreCredentials. +func (n *NoneDatastoreCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: n.CredentialsType, + } +} + +type NotebookAccessTokenResult struct { + // READ-ONLY + AccessToken *string `json:"accessToken,omitempty" azure:"ro"` + + // READ-ONLY + ExpiresIn *int32 `json:"expiresIn,omitempty" azure:"ro"` + + // READ-ONLY + HostName *string `json:"hostName,omitempty" azure:"ro"` + + // READ-ONLY + NotebookResourceID *string `json:"notebookResourceId,omitempty" azure:"ro"` + + // READ-ONLY + PublicDNS *string `json:"publicDns,omitempty" azure:"ro"` + + // READ-ONLY + RefreshToken *string `json:"refreshToken,omitempty" azure:"ro"` + + // READ-ONLY + Scope *string `json:"scope,omitempty" azure:"ro"` + + // READ-ONLY + TokenType *string `json:"tokenType,omitempty" azure:"ro"` +} + +type NotebookPreparationError struct { + ErrorMessage *string `json:"errorMessage,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` +} + +type NotebookResourceInfo struct { + Fqdn *string `json:"fqdn,omitempty"` + + // The error that occurs when preparing notebook. + NotebookPreparationError *NotebookPreparationError `json:"notebookPreparationError,omitempty"` + + // the data plane resourceId that used to initialize notebook component + ResourceID *string `json:"resourceId,omitempty"` +} + +// Objective - Optimization objective. +type Objective struct { + // REQUIRED; [Required] Defines supported metric goals for hyperparameter tuning + Goal *Goal `json:"goal,omitempty"` + + // REQUIRED; [Required] Name of the metric to optimize. + PrimaryMetric *string `json:"primaryMetric,omitempty"` +} + +type OnlineDeployment struct { + // REQUIRED; The geo-location where the resource lives + Location *string `json:"location,omitempty"` + + // REQUIRED; [Required] Additional attributes of the entity. + Properties OnlineDeploymentPropertiesClassification `json:"properties,omitempty"` + + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string `json:"kind,omitempty"` + + // Sku details required for ARM contract for Autoscaling. + SKU *SKU `json:"sku,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// OnlineDeploymentPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetOnlineDeploymentProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *KubernetesOnlineDeployment, *ManagedOnlineDeployment, *OnlineDeploymentProperties +type OnlineDeploymentPropertiesClassification interface { + // GetOnlineDeploymentProperties returns the OnlineDeploymentProperties content of the underlying type. + GetOnlineDeploymentProperties() *OnlineDeploymentProperties +} + +type OnlineDeploymentProperties struct { + // REQUIRED; [Required] The compute type of the endpoint. + EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` + + // If true, enables Application Insights logging. + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` + + // Code configuration for the endpoint deployment. + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + + // Description of the endpoint deployment. + Description *string `json:"description,omitempty"` + + // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + + // ARM resource ID of the environment specification for the endpoint deployment. + EnvironmentID *string `json:"environmentId,omitempty"` + + // Environment variables configuration for the deployment. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + + // Compute instance type. + InstanceType *string `json:"instanceType,omitempty"` + + // Liveness probe monitors the health of the container regularly. + LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + + // The URI path to the model. + Model *string `json:"model,omitempty"` + + // The path to mount the model in custom container. + ModelMountPath *string `json:"modelMountPath,omitempty"` + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string `json:"properties,omitempty"` + + // Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness + // probe. + ReadinessProbe *ProbeSettings `json:"readinessProbe,omitempty"` + + // Request settings for the deployment. + RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + + // Scale settings for the deployment. If it is null or not provided, it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + // and to DefaultScaleSettings for ManagedOnlineDeployment. + ScaleSettings OnlineScaleSettingsClassification `json:"scaleSettings,omitempty"` + + // READ-ONLY; Provisioning state for the endpoint deployment. + ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type OnlineDeploymentProperties. +func (o *OnlineDeploymentProperties) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { + return o +} + +// OnlineDeploymentTrackedResourceArmPaginatedResult - A paginated list of OnlineDeployment entities. +type OnlineDeploymentTrackedResourceArmPaginatedResult struct { + // The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type OnlineDeployment. + Value []*OnlineDeployment `json:"value,omitempty"` +} + +// OnlineDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginCreateOrUpdate +// method. +type OnlineDeploymentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineDeploymentsClientBeginDeleteOptions contains the optional parameters for the OnlineDeploymentsClient.BeginDelete +// method. +type OnlineDeploymentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineDeploymentsClientBeginUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginUpdate +// method. +type OnlineDeploymentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineDeploymentsClientGetLogsOptions contains the optional parameters for the OnlineDeploymentsClient.GetLogs method. +type OnlineDeploymentsClientGetLogsOptions struct { + // placeholder for future optional parameters +} + +// OnlineDeploymentsClientGetOptions contains the optional parameters for the OnlineDeploymentsClient.Get method. +type OnlineDeploymentsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OnlineDeploymentsClientListOptions contains the optional parameters for the OnlineDeploymentsClient.List method. +type OnlineDeploymentsClientListOptions struct { + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Top of list. + Top *int32 +} + +// OnlineDeploymentsClientListSKUsOptions contains the optional parameters for the OnlineDeploymentsClient.ListSKUs method. +type OnlineDeploymentsClientListSKUsOptions struct { + // Number of Skus to be retrieved in a page of results. + Count *int32 + // Continuation token for pagination. + Skip *string +} + +type OnlineEndpoint struct { + // REQUIRED; The geo-location where the resource lives + Location *string `json:"location,omitempty"` + + // REQUIRED; [Required] Additional attributes of the entity. + Properties *OnlineEndpointProperties `json:"properties,omitempty"` + + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string `json:"kind,omitempty"` + + // Sku details required for ARM contract for Autoscaling. + SKU *SKU `json:"sku,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// OnlineEndpointProperties - Online endpoint configuration +type OnlineEndpointProperties struct { + // REQUIRED; [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. + // 'Key' doesn't expire but 'AMLToken' does. + AuthMode *EndpointAuthMode `json:"authMode,omitempty"` + + // ARM resource ID of the compute if it exists. optional + Compute *string `json:"compute,omitempty"` + + // Description of the inference endpoint. + Description *string `json:"description,omitempty"` + + // EndpointAuthKeys to set initially on an Endpoint. This property will always be returned as null. AuthKey values must be + // retrieved using the ListKeys API. + Keys *EndpointAuthKeys `json:"keys,omitempty"` + + // Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost + // 50. + MirrorTraffic map[string]*int32 `json:"mirrorTraffic,omitempty"` + + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string `json:"properties,omitempty"` + + // Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"` + + // Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + Traffic map[string]*int32 `json:"traffic,omitempty"` + + // READ-ONLY; Provisioning state for the endpoint. + ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; Endpoint URI. + ScoringURI *string `json:"scoringUri,omitempty" azure:"ro"` + + // READ-ONLY; Endpoint Swagger URI. + SwaggerURI *string `json:"swaggerUri,omitempty" azure:"ro"` +} + +// OnlineEndpointTrackedResourceArmPaginatedResult - A paginated list of OnlineEndpoint entities. +type OnlineEndpointTrackedResourceArmPaginatedResult struct { + // The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type OnlineEndpoint. + Value []*OnlineEndpoint `json:"value,omitempty"` +} + +// OnlineEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginCreateOrUpdate +// method. +type OnlineEndpointsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientBeginDeleteOptions contains the optional parameters for the OnlineEndpointsClient.BeginDelete method. +type OnlineEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the OnlineEndpointsClient.BeginRegenerateKeys +// method. +type OnlineEndpointsClientBeginRegenerateKeysOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientBeginUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginUpdate method. +type OnlineEndpointsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientGetOptions contains the optional parameters for the OnlineEndpointsClient.Get method. +type OnlineEndpointsClientGetOptions struct { + // placeholder for future optional parameters +} + +// OnlineEndpointsClientGetTokenOptions contains the optional parameters for the OnlineEndpointsClient.GetToken method. +type OnlineEndpointsClientGetTokenOptions struct { + // placeholder for future optional parameters +} + +// OnlineEndpointsClientListKeysOptions contains the optional parameters for the OnlineEndpointsClient.ListKeys method. +type OnlineEndpointsClientListKeysOptions struct { + // placeholder for future optional parameters +} + +// OnlineEndpointsClientListOptions contains the optional parameters for the OnlineEndpointsClient.List method. +type OnlineEndpointsClientListOptions struct { + // EndpointComputeType to be filtered by. + ComputeType *EndpointComputeType + // Number of endpoints to be retrieved in a page of results. + Count *int32 + // Name of the endpoint. + Name *string + // The option to order the response. + OrderBy *OrderString + // A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties + // key=value Example: propKey1,propKey2,propKey3=value3 . + Properties *string + // Continuation token for pagination. + Skip *string + // A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: + // tagKey1,tagKey2,tagKey3=value3 . + Tags *string +} + +// OnlineRequestSettings - Online deployment scoring requests configuration. +type OnlineRequestSettings struct { + // The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + MaxConcurrentRequestsPerInstance *int32 `json:"maxConcurrentRequestsPerInstance,omitempty"` + + // The maximum amount of time a request will stay in the queue in ISO 8601 format. Defaults to 500ms. + MaxQueueWait *string `json:"maxQueueWait,omitempty"` + + // The scoring timeout in ISO 8601 format. Defaults to 5000ms. + RequestTimeout *string `json:"requestTimeout,omitempty"` +} + +// OnlineScaleSettingsClassification provides polymorphic access to related types. +// Call the interface's GetOnlineScaleSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DefaultScaleSettings, *OnlineScaleSettings, *TargetUtilizationScaleSettings +type OnlineScaleSettingsClassification interface { + // GetOnlineScaleSettings returns the OnlineScaleSettings content of the underlying type. + GetOnlineScaleSettings() *OnlineScaleSettings +} + +// OnlineScaleSettings - Online deployment scaling configuration. +type OnlineScaleSettings struct { + // REQUIRED; [Required] Type of deployment scaling algorithm + ScaleType *ScaleType `json:"scaleType,omitempty"` +} + +// GetOnlineScaleSettings implements the OnlineScaleSettingsClassification interface for type OnlineScaleSettings. +func (o *OnlineScaleSettings) GetOnlineScaleSettings() *OnlineScaleSettings { return o } + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OutputPathAssetReference - Reference to an asset via its path in a job output. +type OutputPathAssetReference struct { + // REQUIRED; [Required] Specifies the type of asset reference. + ReferenceType *ReferenceType `json:"referenceType,omitempty"` + + // ARM resource ID of the job. + JobID *string `json:"jobId,omitempty"` + + // The path of the file/directory in the job output. + Path *string `json:"path,omitempty"` +} + +// GetAssetReferenceBase implements the AssetReferenceBaseClassification interface for type OutputPathAssetReference. +func (o *OutputPathAssetReference) GetAssetReferenceBase() *AssetReferenceBase { + return &AssetReferenceBase{ + ReferenceType: o.ReferenceType, + } +} + +type PATAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` + + // Category of the connection + Category *string `json:"category,omitempty"` + Credentials *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type PATAuthTypeWorkspaceConnectionProperties. +func (p *PATAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: p.AuthType, + Category: p.Category, + Target: p.Target, + Value: p.Value, + ValueFormat: p.ValueFormat, + } +} + +// PaginatedComputeResourcesList - Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. +type PaginatedComputeResourcesList struct { + // A continuation link (absolute URI) to the next page of results in the list. + NextLink *string `json:"nextLink,omitempty"` + + // An array of Machine Learning compute objects wrapped in ARM resource envelope. + Value []*ComputeResource `json:"value,omitempty"` +} + +// PartialBatchDeployment - Mutable batch inference settings per deployment. +type PartialBatchDeployment struct { + // Description of the endpoint deployment. + Description *string `json:"description,omitempty"` +} + +// PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties - Strictly used in update requests. +type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties struct { + // Additional attributes of the entity. + Properties *PartialBatchDeployment `json:"properties,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` +} + +// PartialManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type PartialManagedServiceIdentity struct { + // Managed service identity (system assigned and/or user assigned identities) + Type *ManagedServiceIdentityType `json:"type,omitempty"` + + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]interface{} `json:"userAssignedIdentities,omitempty"` +} + +// PartialMinimalTrackedResource - Strictly used in update requests. +type PartialMinimalTrackedResource struct { + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` +} + +// PartialMinimalTrackedResourceWithIdentity - Strictly used in update requests. +type PartialMinimalTrackedResourceWithIdentity struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *PartialManagedServiceIdentity `json:"identity,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` +} + +// PartialMinimalTrackedResourceWithSKU - Strictly used in update requests. +type PartialMinimalTrackedResourceWithSKU struct { + // Sku details required for ARM contract for Autoscaling. + SKU *PartialSKU `json:"sku,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` +} + +// PartialRegistryPartialTrackedResource - Strictly used in update requests. +type PartialRegistryPartialTrackedResource struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *PartialManagedServiceIdentity `json:"identity,omitempty"` + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string `json:"kind,omitempty"` + + // Additional attributes of the entity. + Properties interface{} `json:"properties,omitempty"` + + // Sku details required for ARM contract for Autoscaling. + SKU *PartialSKU `json:"sku,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` +} + +// PartialSKU - Common SKU definition. +type PartialSKU struct { + // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + // resource this may be omitted. + Capacity *int32 `json:"capacity,omitempty"` + + // If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string `json:"family,omitempty"` + + // The name of the SKU. Ex - P3. It is typically a letter+number code. + Name *string `json:"name,omitempty"` + + // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + Size *string `json:"size,omitempty"` + + // 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. + Tier *SKUTier `json:"tier,omitempty"` +} + +type Password struct { + // READ-ONLY + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY + Value *string `json:"value,omitempty" azure:"ro"` +} + +// PersonalComputeInstanceSettings - Settings for a personal compute instance. +type PersonalComputeInstanceSettings struct { + // A user explicitly assigned to a personal compute instance. + AssignedUser *AssignedUser `json:"assignedUser,omitempty"` +} + +// PipelineJob - Pipeline Job definition: defines generic to MFE attributes. +type PipelineJob struct { + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` + + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` + + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,omitempty"` + + // The asset description text. + Description *string `json:"description,omitempty"` + + // Display name of job. + DisplayName *string `json:"displayName,omitempty"` + + // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + ExperimentName *string `json:"experimentName,omitempty"` + + // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken + // if null. + Identity IdentityConfigurationClassification `json:"identity,omitempty"` + + // Inputs for the pipeline job. + Inputs map[string]JobInputClassification `json:"inputs,omitempty"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` + + // Jobs construct the Pipeline Job. + Jobs map[string]interface{} `json:"jobs,omitempty"` + + // Outputs for the pipeline job + Outputs map[string]JobOutputClassification `json:"outputs,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` + + // Pipeline settings, for things like ContinueRunOnStepFailure etc. + Settings interface{} `json:"settings,omitempty"` + + // ARM resource ID of source job. + SourceJobID *string `json:"sourceJobId,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` +} + +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type PipelineJob. +func (p *PipelineJob) GetJobBaseProperties() *JobBaseProperties { + return &JobBaseProperties{ + ComponentID: p.ComponentID, + ComputeID: p.ComputeID, + DisplayName: p.DisplayName, + ExperimentName: p.ExperimentName, + Identity: p.Identity, + IsArchived: p.IsArchived, + JobType: p.JobType, + Services: p.Services, + Status: p.Status, + Description: p.Description, + Properties: p.Properties, + Tags: p.Tags, + } +} + +// PrivateEndpoint - The Private Endpoint resource. +type PrivateEndpoint struct { + // READ-ONLY; The ARM identifier for Private Endpoint + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The ARM identifier for Subnet resource that private endpoint links to + SubnetArmID *string `json:"subnetArmId,omitempty" azure:"ro"` +} + +// PrivateEndpointConnection - The Private Endpoint Connection resource. +type PrivateEndpointConnection struct { + // The identity of the resource. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + + // Specifies the location of the resource. + Location *string `json:"location,omitempty"` + + // Resource properties. + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + + // The sku of the workspace. + SKU *SKU `json:"sku,omitempty"` + + // Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified workspace +type PrivateEndpointConnectionListResult struct { + // Array of private endpoint connections + Value []*PrivateEndpointConnection `json:"value,omitempty"` +} + +// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // REQUIRED; A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + + // The resource of private end point. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + + // READ-ONLY; The provisioning state of the private endpoint connection resource. + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} + +// PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate +// method. +type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// method. +type PrivateEndpointConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkResource - A private link resource +type PrivateLinkResource struct { + // The identity of the resource. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + + // Specifies the location of the resource. + Location *string `json:"location,omitempty"` + + // Resource properties. + Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` + + // The sku of the workspace. + SKU *SKU `json:"sku,omitempty"` + + // Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// PrivateLinkResourceListResult - A list of private link resources +type PrivateLinkResourceListResult struct { + // Array of private link resources + Value []*PrivateLinkResource `json:"value,omitempty"` +} + +// PrivateLinkResourceProperties - Properties of a private link resource. +type PrivateLinkResourceProperties struct { + // The private link resource Private link DNS zone name. + RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` + + // READ-ONLY; The private link resource group id. + GroupID *string `json:"groupId,omitempty" azure:"ro"` + + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` +} + +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer +// and provider. +type PrivateLinkServiceConnectionState struct { + // A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string `json:"actionsRequired,omitempty"` + + // The reason for approval/rejection of the connection. + Description *string `json:"description,omitempty"` + + // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} + +// ProbeSettings - Deployment container liveness/readiness probe configuration. +type ProbeSettings struct { + // The number of failures to allow before returning an unhealthy status. + FailureThreshold *int32 `json:"failureThreshold,omitempty"` + + // The delay before the first probe in ISO 8601 format. + InitialDelay *string `json:"initialDelay,omitempty"` + + // The length of time between probes in ISO 8601 format. + Period *string `json:"period,omitempty"` + + // The number of successful probes before returning a healthy status. + SuccessThreshold *int32 `json:"successThreshold,omitempty"` + + // The probe timeout in ISO 8601 format. + Timeout *string `json:"timeout,omitempty"` +} + +// ProgressMetrics - Progress metrics definition +type ProgressMetrics struct { + // READ-ONLY; The completed datapoint count. + CompletedDatapointCount *int64 `json:"completedDatapointCount,omitempty" azure:"ro"` + + // READ-ONLY; The time of last successful incremental data refresh in UTC. + IncrementalDataLastRefreshDateTime *time.Time `json:"incrementalDataLastRefreshDateTime,omitempty" azure:"ro"` + + // READ-ONLY; The skipped datapoint count. + SkippedDatapointCount *int64 `json:"skippedDatapointCount,omitempty" azure:"ro"` + + // READ-ONLY; The total datapoint count. + TotalDatapointCount *int64 `json:"totalDatapointCount,omitempty" azure:"ro"` +} + +// PyTorch distribution configuration. +type PyTorch struct { + // REQUIRED; [Required] Specifies the type of distribution framework. + DistributionType *DistributionType `json:"distributionType,omitempty"` + + // Number of processes per node. + ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` +} + +// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type PyTorch. +func (p *PyTorch) GetDistributionConfiguration() *DistributionConfiguration { + return &DistributionConfiguration{ + DistributionType: p.DistributionType, + } +} + +// QuotaBaseProperties - The properties for Quota update or retrieval. +type QuotaBaseProperties struct { + // Specifies the resource ID. + ID *string `json:"id,omitempty"` + + // The maximum permitted quota of the resource. + Limit *int64 `json:"limit,omitempty"` + + // Specifies the resource type. + Type *string `json:"type,omitempty"` -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters + // An enum describing the unit of quota measurement. + Unit *QuotaUnit `json:"unit,omitempty"` } -// OutputPathAssetReference - Reference to an asset via its path in a job output. -type OutputPathAssetReference struct { - // REQUIRED; [Required] Specifies the type of asset reference. - ReferenceType *ReferenceType `json:"referenceType,omitempty"` +// QuotaUpdateParameters - Quota update parameters. +type QuotaUpdateParameters struct { + // Region of workspace quota to be updated. + Location *string `json:"location,omitempty"` - // ARM resource ID of the job. - JobID *string `json:"jobId,omitempty"` + // The list for update quota. + Value []*QuotaBaseProperties `json:"value,omitempty"` +} - // The path of the file/directory in the job output. - Path *string `json:"path,omitempty"` +// QuotasClientListOptions contains the optional parameters for the QuotasClient.List method. +type QuotasClientListOptions struct { + // placeholder for future optional parameters } -// GetAssetReferenceBase implements the AssetReferenceBaseClassification interface for type OutputPathAssetReference. -func (o *OutputPathAssetReference) GetAssetReferenceBase() *AssetReferenceBase { - return &AssetReferenceBase{ - ReferenceType: o.ReferenceType, - } +// QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. +type QuotasClientUpdateOptions struct { + // placeholder for future optional parameters } -type PATAuthTypeWorkspaceConnectionProperties struct { - // REQUIRED; Authentication type of the connection target - AuthType *ConnectionAuthType `json:"authType,omitempty"` +// RandomSamplingAlgorithm - Defines a Sampling Algorithm that generates values randomly +type RandomSamplingAlgorithm struct { + // REQUIRED; [Required] The algorithm used for generating hyperparameter values, along with configuration properties + SamplingAlgorithmType *SamplingAlgorithmType `json:"samplingAlgorithmType,omitempty"` - // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` - Credentials *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"` - Target *string `json:"target,omitempty"` + // An optional positive number or e in string format to be used as base for log based random sampling + Logbase *string `json:"logbase,omitempty"` - // Value details of the workspace connection. - Value *string `json:"value,omitempty"` + // The specific type of random algorithm + Rule *RandomSamplingAlgorithmRule `json:"rule,omitempty"` - // format for the workspace connection value - ValueFormat *ValueFormat `json:"valueFormat,omitempty"` + // An optional integer to use as the seed for random number generation + Seed *int32 `json:"seed,omitempty"` } -// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type PATAuthTypeWorkspaceConnectionProperties. -func (p *PATAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { - return &WorkspaceConnectionPropertiesV2{ - AuthType: p.AuthType, - Category: p.Category, - Target: p.Target, - Value: p.Value, - ValueFormat: p.ValueFormat, +// GetSamplingAlgorithm implements the SamplingAlgorithmClassification interface for type RandomSamplingAlgorithm. +func (r *RandomSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { + return &SamplingAlgorithm{ + SamplingAlgorithmType: r.SamplingAlgorithmType, } } -// PaginatedComputeResourcesList - Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. -type PaginatedComputeResourcesList struct { - // A continuation link (absolute URI) to the next page of results in the list. - NextLink *string `json:"nextLink,omitempty"` +// Recurrence - The workflow trigger recurrence for ComputeStartStop schedule type. +type Recurrence struct { + // [Required] The frequency to trigger schedule. + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` - // An array of Machine Learning compute objects wrapped in ARM resource envelope. - Value []*ComputeResource `json:"value,omitempty"` -} + // [Required] Specifies schedule interval in conjunction with frequency + Interval *int32 `json:"interval,omitempty"` -// PartialBatchDeployment - Mutable batch inference settings per deployment. -type PartialBatchDeployment struct { - // Description of the endpoint deployment. - Description *string `json:"description,omitempty"` -} + // [Required] The recurrence schedule. + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` -// PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties - Strictly used in update requests. -type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties struct { - // Additional attributes of the entity. - Properties *PartialBatchDeployment `json:"properties,omitempty"` + // The start time in yyyy-MM-ddTHH:mm:ss format. + StartTime *string `json:"startTime,omitempty"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + // 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 + TimeZone *string `json:"timeZone,omitempty"` } -// PartialManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) -type PartialManagedServiceIdentity struct { - // Managed service identity (system assigned and/or user assigned identities) - Type *ManagedServiceIdentityType `json:"type,omitempty"` - - // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM - // resource ids in the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - // The dictionary values can be empty objects ({}) in - // requests. - UserAssignedIdentities map[string]interface{} `json:"userAssignedIdentities,omitempty"` -} +type RecurrenceSchedule struct { + // REQUIRED; [Required] List of hours for the schedule. + Hours []*int32 `json:"hours,omitempty"` -// PartialMinimalTrackedResource - Strictly used in update requests. -type PartialMinimalTrackedResource struct { - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} + // REQUIRED; [Required] List of minutes for the schedule. + Minutes []*int32 `json:"minutes,omitempty"` -// PartialMinimalTrackedResourceWithIdentity - Strictly used in update requests. -type PartialMinimalTrackedResourceWithIdentity struct { - // Managed service identity (system assigned and/or user assigned identities) - Identity *PartialManagedServiceIdentity `json:"identity,omitempty"` + // List of month days for the schedule + MonthDays []*int32 `json:"monthDays,omitempty"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + // List of days for the schedule. + WeekDays []*WeekDay `json:"weekDays,omitempty"` } -// PartialMinimalTrackedResourceWithSKU - Strictly used in update requests. -type PartialMinimalTrackedResourceWithSKU struct { - // Sku details required for ARM contract for Autoscaling. - SKU *PartialSKU `json:"sku,omitempty"` +type RecurrenceTrigger struct { + // REQUIRED; [Required] The frequency to trigger schedule. + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} + // REQUIRED; [Required] Specifies schedule interval in conjunction with frequency + Interval *int32 `json:"interval,omitempty"` -// PartialSKU - Common SKU definition. -type PartialSKU struct { - // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - // resource this may be omitted. - Capacity *int32 `json:"capacity,omitempty"` + // REQUIRED; [Required] + TriggerType *TriggerType `json:"triggerType,omitempty"` - // If the service has different generations of hardware, for the same SKU, then that can be captured here. - Family *string `json:"family,omitempty"` + // Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. Recommented + // format would be "2022-06-01T00:00:01" If not present, the schedule will + // run indefinitely + EndTime *string `json:"endTime,omitempty"` - // The name of the SKU. Ex - P3. It is typically a letter+number code. - Name *string `json:"name,omitempty"` + // The recurrence schedule. + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` - // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - Size *string `json:"size,omitempty"` + // Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + StartTime *string `json:"startTime,omitempty"` - // 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. - Tier *SKUTier `json:"tier,omitempty"` + // 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 + TimeZone *string `json:"timeZone,omitempty"` } -type Password struct { - // READ-ONLY - Name *string `json:"name,omitempty" azure:"ro"` +// GetTriggerBase implements the TriggerBaseClassification interface for type RecurrenceTrigger. +func (r *RecurrenceTrigger) GetTriggerBase() *TriggerBase { + return &TriggerBase{ + EndTime: r.EndTime, + StartTime: r.StartTime, + TimeZone: r.TimeZone, + TriggerType: r.TriggerType, + } +} - // READ-ONLY - Value *string `json:"value,omitempty" azure:"ro"` +type RegenerateEndpointKeysRequest struct { + // REQUIRED; [Required] Specification for which type of key to generate. Primary or Secondary. + KeyType *KeyType `json:"keyType,omitempty"` + + // The value the key is set to. + KeyValue *string `json:"keyValue,omitempty"` } -// PersonalComputeInstanceSettings - Settings for a personal compute instance. -type PersonalComputeInstanceSettings struct { - // A user explicitly assigned to a personal compute instance. - AssignedUser *AssignedUser `json:"assignedUser,omitempty"` +// RegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistriesClient.BeginCreateOrUpdate +// method. +type RegistriesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PipelineJob - Pipeline Job definition: defines generic to MFE attributes. -type PipelineJob struct { - // REQUIRED; [Required] Specifies the type of job. - JobType *JobType `json:"jobType,omitempty"` +// RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method. +type RegistriesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // ARM resource ID of the compute resource. - ComputeID *string `json:"computeId,omitempty"` +// RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method. +type RegistriesClientGetOptions struct { + // placeholder for future optional parameters +} - // The asset description text. - Description *string `json:"description,omitempty"` +// RegistriesClientListBySubscriptionOptions contains the optional parameters for the RegistriesClient.ListBySubscription +// method. +type RegistriesClientListBySubscriptionOptions struct { + // Continuation token for pagination. + Skip *string +} - // Display name of job. - DisplayName *string `json:"displayName,omitempty"` +// RegistriesClientListOptions contains the optional parameters for the RegistriesClient.List method. +type RegistriesClientListOptions struct { + // Continuation token for pagination. + Skip *string +} - // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - ExperimentName *string `json:"experimentName,omitempty"` +// RegistriesClientUpdateOptions contains the optional parameters for the RegistriesClient.Update method. +type RegistriesClientUpdateOptions struct { + // placeholder for future optional parameters +} - // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken - // if null. - Identity IdentityConfigurationClassification `json:"identity,omitempty"` +type Registry struct { + // REQUIRED; The geo-location where the resource lives + Location *string `json:"location,omitempty"` - // Inputs for the pipeline job. - Inputs map[string]JobInputClassification `json:"inputs,omitempty"` + // REQUIRED; [Required] Additional attributes of the entity. + Properties *RegistryProperties `json:"properties,omitempty"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // Jobs construct the Pipeline Job. - Jobs map[string]interface{} `json:"jobs,omitempty"` + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string `json:"kind,omitempty"` - // Outputs for the pipeline job - Outputs map[string]JobOutputClassification `json:"outputs,omitempty"` + // Sku details required for ARM contract for Autoscaling. + SKU *SKU `json:"sku,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` - // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - Services map[string]*JobService `json:"services,omitempty"` + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` - // Pipeline settings, for things like ContinueRunOnStepFailure etc. - Settings interface{} `json:"settings,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // READ-ONLY; Status of the job. - Status *JobStatus `json:"status,omitempty" azure:"ro"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` } -// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type PipelineJob. -func (p *PipelineJob) GetJobBaseProperties() *JobBaseProperties { - return &JobBaseProperties{ - ComputeID: p.ComputeID, - DisplayName: p.DisplayName, - ExperimentName: p.ExperimentName, - Identity: p.Identity, - IsArchived: p.IsArchived, - JobType: p.JobType, - Services: p.Services, - Status: p.Status, - Description: p.Description, - Properties: p.Properties, - Tags: p.Tags, - } +// RegistryCodeContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeContainersClient.BeginCreateOrUpdate +// method. +type RegistryCodeContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpoint - The Private Endpoint resource. -type PrivateEndpoint struct { - // READ-ONLY; The ARM identifier for Private Endpoint - ID *string `json:"id,omitempty" azure:"ro"` - - // READ-ONLY; The ARM identifier for Subnet resource that private endpoint links to - SubnetArmID *string `json:"subnetArmId,omitempty" azure:"ro"` +// RegistryCodeContainersClientBeginDeleteOptions contains the optional parameters for the RegistryCodeContainersClient.BeginDelete +// method. +type RegistryCodeContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpointConnection - The Private Endpoint Connection resource. -type PrivateEndpointConnection struct { - // The identity of the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Specifies the location of the resource. - Location *string `json:"location,omitempty"` +// RegistryCodeContainersClientGetOptions contains the optional parameters for the RegistryCodeContainersClient.Get method. +type RegistryCodeContainersClientGetOptions struct { + // placeholder for future optional parameters +} - // Resource properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` +// RegistryCodeContainersClientListOptions contains the optional parameters for the RegistryCodeContainersClient.List method. +type RegistryCodeContainersClientListOptions struct { + // Continuation token for pagination. + Skip *string +} - // The sku of the workspace. - SKU *SKU `json:"sku,omitempty"` +// RegistryCodeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginCreateOrUpdate +// method. +type RegistryCodeVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Contains resource tags defined as key/value pairs. - Tags map[string]*string `json:"tags,omitempty"` +// RegistryCodeVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginDelete +// method. +type RegistryCodeVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` +// RegistryCodeVersionsClientGetOptions contains the optional parameters for the RegistryCodeVersionsClient.Get method. +type RegistryCodeVersionsClientGetOptions struct { + // placeholder for future optional parameters +} - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` +// RegistryCodeVersionsClientListOptions contains the optional parameters for the RegistryCodeVersionsClient.List method. +type RegistryCodeVersionsClientListOptions struct { + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Maximum number of records to return. + Top *int32 +} - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` +// RegistryComponentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentContainersClient.BeginCreateOrUpdate +// method. +type RegistryComponentContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` +// RegistryComponentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryComponentContainersClient.BeginDelete +// method. +type RegistryComponentContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified workspace -type PrivateEndpointConnectionListResult struct { - // Array of private endpoint connections - Value []*PrivateEndpointConnection `json:"value,omitempty"` +// RegistryComponentContainersClientGetOptions contains the optional parameters for the RegistryComponentContainersClient.Get +// method. +type RegistryComponentContainersClientGetOptions struct { + // placeholder for future optional parameters } -// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. -type PrivateEndpointConnectionProperties struct { - // REQUIRED; A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` +// RegistryComponentContainersClientListOptions contains the optional parameters for the RegistryComponentContainersClient.List +// method. +type RegistryComponentContainersClientListOptions struct { + // Continuation token for pagination. + Skip *string +} - // The resource of private end point. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` +// RegistryComponentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginCreateOrUpdate +// method. +type RegistryComponentVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; The provisioning state of the private endpoint connection resource. - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +// RegistryComponentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginDelete +// method. +type RegistryComponentVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate +// RegistryComponentVersionsClientGetOptions contains the optional parameters for the RegistryComponentVersionsClient.Get // method. -type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct { +type RegistryComponentVersionsClientGetOptions struct { // placeholder for future optional parameters } -// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// RegistryComponentVersionsClientListOptions contains the optional parameters for the RegistryComponentVersionsClient.List // method. -type PrivateEndpointConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters +type RegistryComponentVersionsClientListOptions struct { + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Maximum number of records to return. + Top *int32 } -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginCreateOrUpdate // method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters +type RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List +// RegistryEnvironmentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginDelete // method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters +type RegistryEnvironmentContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateLinkResource - A private link resource -type PrivateLinkResource struct { - // The identity of the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` +// RegistryEnvironmentContainersClientGetOptions contains the optional parameters for the RegistryEnvironmentContainersClient.Get +// method. +type RegistryEnvironmentContainersClientGetOptions struct { + // placeholder for future optional parameters +} - // Specifies the location of the resource. - Location *string `json:"location,omitempty"` +// RegistryEnvironmentContainersClientListOptions contains the optional parameters for the RegistryEnvironmentContainersClient.List +// method. +type RegistryEnvironmentContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string +} - // Resource properties. - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` +// RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginCreateOrUpdate +// method. +type RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // The sku of the workspace. - SKU *SKU `json:"sku,omitempty"` +// RegistryEnvironmentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginDelete +// method. +type RegistryEnvironmentVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Contains resource tags defined as key/value pairs. - Tags map[string]*string `json:"tags,omitempty"` +// RegistryEnvironmentVersionsClientGetOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.Get +// method. +type RegistryEnvironmentVersionsClientGetOptions struct { + // placeholder for future optional parameters +} - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` +// RegistryEnvironmentVersionsClientListOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.List +// method. +type RegistryEnvironmentVersionsClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Maximum number of records to return. + Top *int32 +} - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` +type RegistryListCredentialsResult struct { + Passwords []*Password `json:"passwords,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // READ-ONLY + Location *string `json:"location,omitempty" azure:"ro"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + // READ-ONLY + Username *string `json:"username,omitempty" azure:"ro"` } -// PrivateLinkResourceListResult - A list of private link resources -type PrivateLinkResourceListResult struct { - // Array of private link resources - Value []*PrivateLinkResource `json:"value,omitempty"` +// RegistryModelContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelContainersClient.BeginCreateOrUpdate +// method. +type RegistryModelContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateLinkResourceProperties - Properties of a private link resource. -type PrivateLinkResourceProperties struct { - // The private link resource Private link DNS zone name. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` +// RegistryModelContainersClientBeginDeleteOptions contains the optional parameters for the RegistryModelContainersClient.BeginDelete +// method. +type RegistryModelContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; The private link resource group id. - GroupID *string `json:"groupId,omitempty" azure:"ro"` +// RegistryModelContainersClientGetOptions contains the optional parameters for the RegistryModelContainersClient.Get method. +type RegistryModelContainersClientGetOptions struct { + // placeholder for future optional parameters +} - // READ-ONLY; The private link resource required member names. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` +// RegistryModelContainersClientListOptions contains the optional parameters for the RegistryModelContainersClient.List method. +type RegistryModelContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string } -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. -type PrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters +// RegistryModelVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelVersionsClient.BeginCreateOrUpdate +// method. +type RegistryModelVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer -// and provider. -type PrivateLinkServiceConnectionState struct { - // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *string `json:"actionsRequired,omitempty"` +// RegistryModelVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryModelVersionsClient.BeginDelete +// method. +type RegistryModelVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // The reason for approval/rejection of the connection. - Description *string `json:"description,omitempty"` +// RegistryModelVersionsClientGetOptions contains the optional parameters for the RegistryModelVersionsClient.Get method. +type RegistryModelVersionsClientGetOptions struct { + // placeholder for future optional parameters +} - // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +// RegistryModelVersionsClientListOptions contains the optional parameters for the RegistryModelVersionsClient.List method. +type RegistryModelVersionsClientListOptions struct { + // Model description. + Description *string + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Ordering of list. + OrderBy *string + // Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + Properties *string + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + // Maximum number of records to return. + Top *int32 + // Version identifier. + Version *string } -// ProbeSettings - Deployment container liveness/readiness probe configuration. -type ProbeSettings struct { - // The number of failures to allow before returning an unhealthy status. - FailureThreshold *int32 `json:"failureThreshold,omitempty"` +// RegistryProperties - Details of the Registry +type RegistryProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` + DiscoveryURL *string `json:"discoveryUrl,omitempty"` + IntellectualPropertyPublisher *string `json:"intellectualPropertyPublisher,omitempty"` - // The delay before the first probe in ISO 8601 format. - InitialDelay *string `json:"initialDelay,omitempty"` + // Managed resource group created for the registry + ManagedResourceGroup *ArmResourceID `json:"managedResourceGroup,omitempty"` + MlFlowRegistryURI *string `json:"mlFlowRegistryUri,omitempty"` + PrivateLinkCount *int32 `json:"privateLinkCount,omitempty"` - // The length of time between probes in ISO 8601 format. - Period *string `json:"period,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + PublicNetworkAccess *string `json:"publicNetworkAccess,omitempty"` - // The number of successful probes before returning a healthy status. - SuccessThreshold *int32 `json:"successThreshold,omitempty"` + // Details of each region the registry is in + RegionDetails []*RegistryRegionArmDetails `json:"regionDetails,omitempty"` - // The probe timeout in ISO 8601 format. - Timeout *string `json:"timeout,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` } -// PyTorch distribution configuration. -type PyTorch struct { - // REQUIRED; [Required] Specifies the type of distribution framework. - DistributionType *DistributionType `json:"distributionType,omitempty"` +// RegistryRegionArmDetails - Details for each region the registry is in +type RegistryRegionArmDetails struct { + // List of ACR accounts + AcrDetails []*AcrDetails `json:"acrDetails,omitempty"` - // Number of processes per node. - ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` + // The location where the registry exists + Location *string `json:"location,omitempty"` + + // List of storage accounts + StorageAccountDetails []*StorageAccountDetails `json:"storageAccountDetails,omitempty"` } -// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type PyTorch. -func (p *PyTorch) GetDistributionConfiguration() *DistributionConfiguration { - return &DistributionConfiguration{ - DistributionType: p.DistributionType, - } +// RegistryTrackedResourceArmPaginatedResult - A paginated list of Registry entities. +type RegistryTrackedResourceArmPaginatedResult struct { + // The link to the next page of Registry objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type Registry. + Value []*Registry `json:"value,omitempty"` } -// QuotaBaseProperties - The properties for Quota update or retrieval. -type QuotaBaseProperties struct { - // Specifies the resource ID. - ID *string `json:"id,omitempty"` +// Regression task in AutoML Table vertical. +type Regression struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` - // The maximum permitted quota of the resource. - Limit *int64 `json:"limit,omitempty"` + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` - // Specifies the resource type. - Type *string `json:"type,omitempty"` + // Columns to use for CVSplit data. + CvSplitColumnNames []*string `json:"cvSplitColumnNames,omitempty"` - // An enum describing the unit of quota measurement. - Unit *QuotaUnit `json:"unit,omitempty"` -} + // Featurization inputs needed for AutoML job. + FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` -// QuotaUpdateParameters - Quota update parameters. -type QuotaUpdateParameters struct { - // Region of workspace quota to be updated. - Location *string `json:"location,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` - // The list for update quota. - Value []*QuotaBaseProperties `json:"value,omitempty"` -} + // Execution constraints for AutoMLJob. + LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` -// QuotasClientListOptions contains the optional parameters for the QuotasClient.List method. -type QuotasClientListOptions struct { - // placeholder for future optional parameters -} + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` -// QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. -type QuotasClientUpdateOptions struct { - // placeholder for future optional parameters -} + // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. + NCrossValidations NCrossValidationsClassification `json:"nCrossValidations,omitempty"` + + // Primary metric for regression task. + PrimaryMetric *RegressionPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Test data input. + TestData *MLTableJobInput `json:"testData,omitempty"` -// RandomSamplingAlgorithm - Defines a Sampling Algorithm that generates values randomly -type RandomSamplingAlgorithm struct { - // REQUIRED; [Required] The algorithm used for generating hyperparameter values, along with configuration properties - SamplingAlgorithmType *SamplingAlgorithmType `json:"samplingAlgorithmType,omitempty"` + // The fraction of test dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when + // validation dataset is not provided. + TestDataSize *float64 `json:"testDataSize,omitempty"` - // The specific type of random algorithm - Rule *RandomSamplingAlgorithmRule `json:"rule,omitempty"` + // Inputs for training phase for an AutoML Job. + TrainingSettings *RegressionTrainingSettings `json:"trainingSettings,omitempty"` - // An optional integer to use as the seed for random number generation - Seed *int32 `json:"seed,omitempty"` + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` + + // 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. + WeightColumnName *string `json:"weightColumnName,omitempty"` } -// GetSamplingAlgorithm implements the SamplingAlgorithmClassification interface for type RandomSamplingAlgorithm. -func (r *RandomSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { - return &SamplingAlgorithm{ - SamplingAlgorithmType: r.SamplingAlgorithmType, +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type Regression. +func (r *Regression) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: r.LogVerbosity, + TargetColumnName: r.TargetColumnName, + TaskType: r.TaskType, + TrainingData: r.TrainingData, } } -type RegenerateEndpointKeysRequest struct { - // REQUIRED; [Required] Specification for which type of key to generate. Primary or Secondary. - KeyType *KeyType `json:"keyType,omitempty"` +// RegressionTrainingSettings - Regression Training related configuration. +type RegressionTrainingSettings struct { + // Allowed models for regression task. + AllowedTrainingAlgorithms []*RegressionModels `json:"allowedTrainingAlgorithms,omitempty"` - // The value the key is set to. - KeyValue *string `json:"keyValue,omitempty"` -} + // Blocked models for regression task. + BlockedTrainingAlgorithms []*RegressionModels `json:"blockedTrainingAlgorithms,omitempty"` -type RegistryListCredentialsResult struct { - Passwords []*Password `json:"passwords,omitempty"` + // Enable recommendation of DNN models. + EnableDnnTraining *bool `json:"enableDnnTraining,omitempty"` - // READ-ONLY - Location *string `json:"location,omitempty" azure:"ro"` + // Flag to turn on explainability on best model. + EnableModelExplainability *bool `json:"enableModelExplainability,omitempty"` - // READ-ONLY - Username *string `json:"username,omitempty" azure:"ro"` + // Flag for enabling onnx compatible models. + EnableOnnxCompatibleModels *bool `json:"enableOnnxCompatibleModels,omitempty"` + + // Enable stack ensemble run. + EnableStackEnsemble *bool `json:"enableStackEnsemble,omitempty"` + + // Enable voting ensemble run. + EnableVoteEnsemble *bool `json:"enableVoteEnsemble,omitempty"` + + // During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. + // Configure this parameter with a higher value than 300 secs, if more time + // is needed. + EnsembleModelDownloadTimeout *string `json:"ensembleModelDownloadTimeout,omitempty"` + + // Stack ensemble settings for stack ensemble run. + StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` + + // 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. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources @@ -4978,7 +8275,7 @@ type SASAuthTypeWorkspaceConnectionProperties struct { AuthType *ConnectionAuthType `json:"authType,omitempty"` // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` + Category *string `json:"category,omitempty"` Credentials *WorkspaceConnectionSharedAccessSignature `json:"credentials,omitempty"` Target *string `json:"target,omitempty"` @@ -5156,10 +8453,112 @@ type ScaleSettingsInformation struct { ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"` } +// Schedule - Azure Resource Manager resource envelope. +type Schedule struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *ScheduleProperties `json:"properties,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// ScheduleActionBaseClassification provides polymorphic access to related types. +// Call the interface's GetScheduleActionBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EndpointScheduleAction, *JobScheduleAction, *ScheduleActionBase +type ScheduleActionBaseClassification interface { + // GetScheduleActionBase returns the ScheduleActionBase content of the underlying type. + GetScheduleActionBase() *ScheduleActionBase +} + +type ScheduleActionBase struct { + // REQUIRED; [Required] Specifies the action type of the schedule + ActionType *ScheduleActionType `json:"actionType,omitempty"` +} + +// GetScheduleActionBase implements the ScheduleActionBaseClassification interface for type ScheduleActionBase. +func (s *ScheduleActionBase) GetScheduleActionBase() *ScheduleActionBase { return s } + type ScheduleBase struct { - ID *string `json:"id,omitempty"` + // A system assigned id for the schedule. + ID *string `json:"id,omitempty"` + + // The current deployment state of schedule. ProvisioningStatus *ScheduleProvisioningState `json:"provisioningStatus,omitempty"` - Status *ScheduleStatus `json:"status,omitempty"` + + // Is the schedule enabled or disabled? + Status *ScheduleStatus `json:"status,omitempty"` +} + +// ScheduleProperties - Base definition of a schedule +type ScheduleProperties struct { + // REQUIRED; [Required] Specifies the action of the schedule + Action ScheduleActionBaseClassification `json:"action,omitempty"` + + // REQUIRED; [Required] Specifies the trigger details + Trigger TriggerBaseClassification `json:"trigger,omitempty"` + + // The asset description text. + Description *string `json:"description,omitempty"` + + // Display name of schedule. + DisplayName *string `json:"displayName,omitempty"` + + // Is the schedule enabled? + IsEnabled *bool `json:"isEnabled,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Provisioning state for the schedule. + ProvisioningState *ScheduleProvisioningStatus `json:"provisioningState,omitempty" azure:"ro"` +} + +// ScheduleResourceArmPaginatedResult - A paginated list of Schedule entities. +type ScheduleResourceArmPaginatedResult struct { + // The link to the next page of Schedule objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type Schedule. + Value []*Schedule `json:"value,omitempty"` +} + +// SchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.BeginCreateOrUpdate +// method. +type SchedulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method. +type SchedulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. +type SchedulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.List method. +type SchedulesClientListOptions struct { + // Status filter for schedule. + ListViewType *ScheduleListViewType + // Continuation token for pagination. + Skip *string } // ScriptReference - Script reference @@ -5186,82 +8585,311 @@ type ScriptsToExecute struct { StartupScript *ScriptReference `json:"startupScript,omitempty"` } +// SeasonalityClassification provides polymorphic access to related types. +// Call the interface's GetSeasonality() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoSeasonality, *CustomSeasonality, *Seasonality +type SeasonalityClassification interface { + // GetSeasonality returns the Seasonality content of the underlying type. + GetSeasonality() *Seasonality +} + +// Seasonality - Forecasting seasonality. +type Seasonality struct { + // REQUIRED; [Required] Seasonality mode. + Mode *SeasonalityMode `json:"mode,omitempty"` +} + +// GetSeasonality implements the SeasonalityClassification interface for type Seasonality. +func (s *Seasonality) GetSeasonality() *Seasonality { return s } + type ServiceManagedResourcesSettings struct { // The settings for the service managed cosmosdb account. CosmosDb *CosmosDbSettings `json:"cosmosDb,omitempty"` } +type ServicePrincipalAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` + + // Category of the connection + Category *string `json:"category,omitempty"` + Credentials *WorkspaceConnectionServicePrincipal `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s *ServicePrincipalAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: s.AuthType, + Category: s.Category, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + // ServicePrincipalDatastoreCredentials - Service Principal datastore credentials configuration. type ServicePrincipalDatastoreCredentials struct { // REQUIRED; [Required] Service principal client ID. ClientID *string `json:"clientId,omitempty"` - // REQUIRED; [Required] Credential type used to authentication with storage. - CredentialsType *CredentialsType `json:"credentialsType,omitempty"` + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialsType *CredentialsType `json:"credentialsType,omitempty"` + + // REQUIRED; [Required] Service principal secrets. + Secrets *ServicePrincipalDatastoreSecrets `json:"secrets,omitempty"` + + // REQUIRED; [Required] ID of the tenant to which the service principal belongs. + TenantID *string `json:"tenantId,omitempty"` + + // Authority URL used for authentication. + AuthorityURL *string `json:"authorityUrl,omitempty"` + + // Resource the service principal has access to. + ResourceURL *string `json:"resourceUrl,omitempty"` +} + +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type ServicePrincipalDatastoreCredentials. +func (s *ServicePrincipalDatastoreCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: s.CredentialsType, + } +} + +// ServicePrincipalDatastoreSecrets - Datastore Service Principal secrets. +type ServicePrincipalDatastoreSecrets struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + SecretsType *SecretsType `json:"secretsType,omitempty"` + + // Service principal secret. + ClientSecret *string `json:"clientSecret,omitempty"` +} + +// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type ServicePrincipalDatastoreSecrets. +func (s *ServicePrincipalDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { + return &DatastoreSecrets{ + SecretsType: s.SecretsType, + } +} + +// SetupScripts - Details of customized scripts to execute for setting up the cluster. +type SetupScripts struct { + // Customized setup scripts + Scripts *ScriptsToExecute `json:"scripts,omitempty"` +} + +type SharedPrivateLinkResource struct { + // Unique name of the private link. + Name *string `json:"name,omitempty"` + + // Resource properties. + Properties *SharedPrivateLinkResourceProperty `json:"properties,omitempty"` +} + +// SharedPrivateLinkResourceProperty - Properties of a shared private link resource. +type SharedPrivateLinkResourceProperty struct { + // The private link resource group id. + GroupID *string `json:"groupId,omitempty"` + + // The resource id that private link links to. + PrivateLinkResourceID *string `json:"privateLinkResourceId,omitempty"` + + // Request message. + RequestMessage *string `json:"requestMessage,omitempty"` + + // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +} + +// SparkJob - Spark job definition. +type SparkJob struct { + // REQUIRED; [Required] ARM resource ID of the code asset. + CodeID *string `json:"codeId,omitempty"` + + // REQUIRED; [Required] The entry to execute on startup of the job. + Entry SparkJobEntryClassification `json:"entry,omitempty"` + + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` + + // Archive files used in the job. + Archives []*string `json:"archives,omitempty"` + + // Arguments for the job. + Args *string `json:"args,omitempty"` + + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` + + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,omitempty"` + + // Spark configured properties. + Conf map[string]*string `json:"conf,omitempty"` + + // The asset description text. + Description *string `json:"description,omitempty"` + + // Display name of job. + DisplayName *string `json:"displayName,omitempty"` + + // The ARM resource ID of the Environment specification for the job. + EnvironmentID *string `json:"environmentId,omitempty"` + + // The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + ExperimentName *string `json:"experimentName,omitempty"` + + // Files used in the job. + Files []*string `json:"files,omitempty"` + + // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken + // if null. + Identity IdentityConfigurationClassification `json:"identity,omitempty"` + + // Mapping of input data bindings used in the job. + Inputs map[string]JobInputClassification `json:"inputs,omitempty"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` + + // Jar files used in the job. + Jars []*string `json:"jars,omitempty"` + + // Mapping of output data bindings used in the job. + Outputs map[string]JobOutputClassification `json:"outputs,omitempty"` + + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + + // Python files used in the job. + PyFiles []*string `json:"pyFiles,omitempty"` + + // Compute Resource configuration for the job. + Resources *SparkResourceConfiguration `json:"resources,omitempty"` + + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` +} + +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type SparkJob. +func (s *SparkJob) GetJobBaseProperties() *JobBaseProperties { + return &JobBaseProperties{ + ComponentID: s.ComponentID, + ComputeID: s.ComputeID, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + Services: s.Services, + Status: s.Status, + Description: s.Description, + Properties: s.Properties, + Tags: s.Tags, + } +} + +// SparkJobEntryClassification provides polymorphic access to related types. +// Call the interface's GetSparkJobEntry() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *SparkJobEntry, *SparkJobPythonEntry, *SparkJobScalaEntry +type SparkJobEntryClassification interface { + // GetSparkJobEntry returns the SparkJobEntry content of the underlying type. + GetSparkJobEntry() *SparkJobEntry +} - // REQUIRED; [Required] Service principal secrets. - Secrets *ServicePrincipalDatastoreSecrets `json:"secrets,omitempty"` +// SparkJobEntry - Spark job entry point definition. +type SparkJobEntry struct { + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType `json:"sparkJobEntryType,omitempty"` +} - // REQUIRED; [Required] ID of the tenant to which the service principal belongs. - TenantID *string `json:"tenantId,omitempty"` +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobEntry. +func (s *SparkJobEntry) GetSparkJobEntry() *SparkJobEntry { return s } - // Authority URL used for authentication. - AuthorityURL *string `json:"authorityUrl,omitempty"` +type SparkJobPythonEntry struct { + // REQUIRED; [Required] Relative python file path for job entry point. + File *string `json:"file,omitempty"` - // Resource the service principal has access to. - ResourceURL *string `json:"resourceUrl,omitempty"` + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType `json:"sparkJobEntryType,omitempty"` } -// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type ServicePrincipalDatastoreCredentials. -func (s *ServicePrincipalDatastoreCredentials) GetDatastoreCredentials() *DatastoreCredentials { - return &DatastoreCredentials{ - CredentialsType: s.CredentialsType, +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobPythonEntry. +func (s *SparkJobPythonEntry) GetSparkJobEntry() *SparkJobEntry { + return &SparkJobEntry{ + SparkJobEntryType: s.SparkJobEntryType, } } -// ServicePrincipalDatastoreSecrets - Datastore Service Principal secrets. -type ServicePrincipalDatastoreSecrets struct { - // REQUIRED; [Required] Credential type used to authentication with storage. - SecretsType *SecretsType `json:"secretsType,omitempty"` +type SparkJobScalaEntry struct { + // REQUIRED; [Required] Scala class name used as entry point. + ClassName *string `json:"className,omitempty"` - // Service principal secret. - ClientSecret *string `json:"clientSecret,omitempty"` + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType `json:"sparkJobEntryType,omitempty"` } -// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type ServicePrincipalDatastoreSecrets. -func (s *ServicePrincipalDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { - return &DatastoreSecrets{ - SecretsType: s.SecretsType, +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobScalaEntry. +func (s *SparkJobScalaEntry) GetSparkJobEntry() *SparkJobEntry { + return &SparkJobEntry{ + SparkJobEntryType: s.SparkJobEntryType, } } -// SetupScripts - Details of customized scripts to execute for setting up the cluster. -type SetupScripts struct { - // Customized setup scripts - Scripts *ScriptsToExecute `json:"scripts,omitempty"` +type SparkResourceConfiguration struct { + // Optional type of VM used as supported by the compute target. + InstanceType *string `json:"instanceType,omitempty"` + + // Version of spark runtime used for the job. + RuntimeVersion *string `json:"runtimeVersion,omitempty"` } -type SharedPrivateLinkResource struct { - // Unique name of the private link. - Name *string `json:"name,omitempty"` +// StackEnsembleSettings - Advances setting to customize StackEnsemble run. +type StackEnsembleSettings struct { + // Optional parameters to pass to the initializer of the meta-learner. + StackMetaLearnerKWargs interface{} `json:"stackMetaLearnerKWargs,omitempty"` - // Resource properties. - Properties *SharedPrivateLinkResourceProperty `json:"properties,omitempty"` + // Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training + // the meta-learner. Default value is 0.2. + StackMetaLearnerTrainPercentage *float64 `json:"stackMetaLearnerTrainPercentage,omitempty"` + + // The meta-learner is a model trained on the output of the individual heterogeneous models. + StackMetaLearnerType *StackMetaLearnerType `json:"stackMetaLearnerType,omitempty"` } -// SharedPrivateLinkResourceProperty - Properties of a shared private link resource. -type SharedPrivateLinkResourceProperty struct { - // The private link resource group id. - GroupID *string `json:"groupId,omitempty"` +// StatusMessage - Active message associated with project +type StatusMessage struct { + // READ-ONLY; Service-defined message code. + Code *string `json:"code,omitempty" azure:"ro"` - // The resource id that private link links to. - PrivateLinkResourceID *string `json:"privateLinkResourceId,omitempty"` + // READ-ONLY; Time in UTC at which the message was created. + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"` - // Request message. - RequestMessage *string `json:"requestMessage,omitempty"` + // READ-ONLY; Severity level of message. + Level *StatusMessageLevel `json:"level,omitempty" azure:"ro"` - // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` + // READ-ONLY; A human-readable representation of the message code. + Message *string `json:"message,omitempty" azure:"ro"` +} + +// StorageAccountDetails - Details of storage account to be used for the Registry +type StorageAccountDetails struct { + SystemCreatedStorageAccount *SystemCreatedStorageAccount `json:"systemCreatedStorageAccount,omitempty"` + UserCreatedStorageAccount *UserCreatedStorageAccount `json:"userCreatedStorageAccount,omitempty"` } // SweepJob - Sweep job definition. @@ -5282,6 +8910,9 @@ type SweepJob struct { // REQUIRED; [Required] Trial component definition. Trial *TrialComponent `json:"trial,omitempty"` + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` + // ARM resource ID of the compute resource. ComputeID *string `json:"computeId,omitempty"` @@ -5329,6 +8960,7 @@ type SweepJob struct { // GetJobBaseProperties implements the JobBasePropertiesClassification interface for type SweepJob. func (s *SweepJob) GetJobBaseProperties() *JobBaseProperties { return &JobBaseProperties{ + ComponentID: s.ComponentID, ComputeID: s.ComputeID, DisplayName: s.DisplayName, ExperimentName: s.ExperimentName, @@ -5376,11 +9008,8 @@ type SynapseSpark struct { ComputeType *ComputeType `json:"computeType,omitempty"` // The description of the Machine Learning compute. - Description *string `json:"description,omitempty"` - - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - Properties *SynapseSparkProperties `json:"properties,omitempty"` + Description *string `json:"description,omitempty"` + Properties *SynapseSparkProperties `json:"properties,omitempty"` // ARM resource id of the underlying compute ResourceID *string `json:"resourceId,omitempty"` @@ -5391,6 +9020,9 @@ type SynapseSpark struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -5402,7 +9034,7 @@ type SynapseSpark struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type SynapseSpark. @@ -5453,6 +9085,25 @@ type SynapseSparkProperties struct { WorkspaceName *string `json:"workspaceName,omitempty"` } +type SystemCreatedAcrAccount struct { + AcrAccountSKU *string `json:"acrAccountSku,omitempty"` + + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` +} + +type SystemCreatedStorageAccount struct { + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` + StorageAccountHnsEnabled *bool `json:"storageAccountHnsEnabled,omitempty"` + + // Allowed values: "StandardLRS", "StandardGRS", "StandardRAGRS", "StandardZRS", "StandardGZRS", "StandardRAGZRS", "PremiumLRS", + // "PremiumZRS" + StorageAccountType *string `json:"storageAccountType,omitempty"` +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). @@ -5486,6 +9137,275 @@ type SystemService struct { Version *string `json:"version,omitempty" azure:"ro"` } +// TableFixedParameters - Fixed training parameters that won't be swept over during AutoML Table training. +type TableFixedParameters struct { + // Specify the boosting type, e.g gbdt for XGBoost. + Booster *string `json:"booster,omitempty"` + + // Specify the boosting type, e.g gbdt for LightGBM. + BoostingType *string `json:"boostingType,omitempty"` + + // Specify the grow policy, which controls the way new nodes are added to the tree. + GrowPolicy *string `json:"growPolicy,omitempty"` + + // The learning rate for the training procedure. + LearningRate *float64 `json:"learningRate,omitempty"` + + // Specify the Maximum number of discrete bins to bucket continuous features . + MaxBin *int32 `json:"maxBin,omitempty"` + + // Specify the max depth to limit the tree depth explicitly. + MaxDepth *int32 `json:"maxDepth,omitempty"` + + // Specify the max leaves to limit the tree leaves explicitly. + MaxLeaves *int32 `json:"maxLeaves,omitempty"` + + // The minimum number of data per leaf. + MinDataInLeaf *int32 `json:"minDataInLeaf,omitempty"` + + // Minimum loss reduction required to make a further partition on a leaf node of the tree. + MinSplitGain *float64 `json:"minSplitGain,omitempty"` + + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` + + // Specify the number of trees (or rounds) in an model. + NEstimators *int32 `json:"nEstimators,omitempty"` + + // Specify the number of leaves. + NumLeaves *int32 `json:"numLeaves,omitempty"` + + // The name of the preprocessor to use. + PreprocessorName *string `json:"preprocessorName,omitempty"` + + // L1 regularization term on weights. + RegAlpha *float64 `json:"regAlpha,omitempty"` + + // L2 regularization term on weights. + RegLambda *float64 `json:"regLambda,omitempty"` + + // Subsample ratio of the training instance. + Subsample *float64 `json:"subsample,omitempty"` + + // Frequency of subsample. + SubsampleFreq *float64 `json:"subsampleFreq,omitempty"` + + // Specify the tree method. + TreeMethod *string `json:"treeMethod,omitempty"` + + // If true, center before scaling the data with StandardScalar. + WithMean *bool `json:"withMean,omitempty"` + + // If true, scaling the data with Unit Variance with StandardScalar. + WithStd *bool `json:"withStd,omitempty"` +} + +type TableParameterSubspace struct { + // Specify the boosting type, e.g gbdt for XGBoost. + Booster *string `json:"booster,omitempty"` + + // Specify the boosting type, e.g gbdt for LightGBM. + BoostingType *string `json:"boostingType,omitempty"` + + // Specify the grow policy, which controls the way new nodes are added to the tree. + GrowPolicy *string `json:"growPolicy,omitempty"` + + // The learning rate for the training procedure. + LearningRate *string `json:"learningRate,omitempty"` + + // Specify the Maximum number of discrete bins to bucket continuous features . + MaxBin *string `json:"maxBin,omitempty"` + + // Specify the max depth to limit the tree depth explicitly. + MaxDepth *string `json:"maxDepth,omitempty"` + + // Specify the max leaves to limit the tree leaves explicitly. + MaxLeaves *string `json:"maxLeaves,omitempty"` + + // The minimum number of data per leaf. + MinDataInLeaf *string `json:"minDataInLeaf,omitempty"` + + // Minimum loss reduction required to make a further partition on a leaf node of the tree. + MinSplitGain *string `json:"minSplitGain,omitempty"` + + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` + + // Specify the number of trees (or rounds) in an model. + NEstimators *string `json:"nEstimators,omitempty"` + + // Specify the number of leaves. + NumLeaves *string `json:"numLeaves,omitempty"` + + // The name of the preprocessor to use. + PreprocessorName *string `json:"preprocessorName,omitempty"` + + // L1 regularization term on weights. + RegAlpha *string `json:"regAlpha,omitempty"` + + // L2 regularization term on weights. + RegLambda *string `json:"regLambda,omitempty"` + + // Subsample ratio of the training instance. + Subsample *string `json:"subsample,omitempty"` + + // Frequency of subsample + SubsampleFreq *string `json:"subsampleFreq,omitempty"` + + // Specify the tree method. + TreeMethod *string `json:"treeMethod,omitempty"` + + // If true, center before scaling the data with StandardScalar. + WithMean *string `json:"withMean,omitempty"` + + // If true, scaling the data with Unit Variance with StandardScalar. + WithStd *string `json:"withStd,omitempty"` +} + +type TableSweepSettings struct { + // REQUIRED; [Required] Type of sampling algorithm. + SamplingAlgorithm *SamplingAlgorithmType `json:"samplingAlgorithm,omitempty"` + + // Type of early termination policy for the sweeping job. + EarlyTermination EarlyTerminationPolicyClassification `json:"earlyTermination,omitempty"` +} + +// TableVertical - Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. +type TableVertical struct { + // Columns to use for CVSplit data. + CvSplitColumnNames []*string `json:"cvSplitColumnNames,omitempty"` + + // Featurization inputs needed for AutoML job. + FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` + + // Execution constraints for AutoMLJob. + LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` + + // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. + NCrossValidations NCrossValidationsClassification `json:"nCrossValidations,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + + // Test data input. + TestData *MLTableJobInput `json:"testData,omitempty"` + + // The fraction of test dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when + // validation dataset is not provided. + TestDataSize *float64 `json:"testDataSize,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` + + // 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. + WeightColumnName *string `json:"weightColumnName,omitempty"` +} + +// TableVerticalFeaturizationSettings - Featurization Configuration. +type TableVerticalFeaturizationSettings struct { + // These transformers shall not be used in featurization. + BlockedTransformers []*BlockedTransformers `json:"blockedTransformers,omitempty"` + + // Dictionary of column name and its type (int, float, string, datetime etc). + ColumnNameAndTypes map[string]*string `json:"columnNameAndTypes,omitempty"` + + // Dataset language, useful for the text data. + DatasetLanguage *string `json:"datasetLanguage,omitempty"` + + // Determines whether to use Dnn based featurizers for data featurization. + EnableDnnFeaturization *bool `json:"enableDnnFeaturization,omitempty"` + + // Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the + // data in featurization phase. If 'Off' is selected then no featurization is done. + // If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. + Mode *FeaturizationMode `json:"mode,omitempty"` + + // User can specify additional transformers to be used along with the columns to which it would be applied and parameters + // for the transformer constructor. + TransformerParams map[string][]*ColumnTransformer `json:"transformerParams,omitempty"` +} + +// TableVerticalLimitSettings - Job execution constraints. +type TableVerticalLimitSettings struct { + // Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement + // in last 20 iterations. + EnableEarlyTermination *bool `json:"enableEarlyTermination,omitempty"` + + // Exit score for the AutoML job. + ExitScore *float64 `json:"exitScore,omitempty"` + + // Maximum Concurrent iterations. + MaxConcurrentTrials *int32 `json:"maxConcurrentTrials,omitempty"` + + // Max cores per iteration. + MaxCoresPerTrial *int32 `json:"maxCoresPerTrial,omitempty"` + + // Maximum nodes to use for the experiment. + MaxNodes *int32 `json:"maxNodes,omitempty"` + + // Number of iterations. + MaxTrials *int32 `json:"maxTrials,omitempty"` + + // Number of concurrent sweeping runs that user wants to trigger. + SweepConcurrentTrials *int32 `json:"sweepConcurrentTrials,omitempty"` + + // Number of sweeping runs that user wants to trigger. + SweepTrials *int32 `json:"sweepTrials,omitempty"` + + // AutoML job timeout. + Timeout *string `json:"timeout,omitempty"` + + // Iteration timeout. + TrialTimeout *string `json:"trialTimeout,omitempty"` +} + +// TargetLagsClassification provides polymorphic access to related types. +// Call the interface's GetTargetLags() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoTargetLags, *CustomTargetLags, *TargetLags +type TargetLagsClassification interface { + // GetTargetLags returns the TargetLags content of the underlying type. + GetTargetLags() *TargetLags +} + +// TargetLags - The number of past periods to lag from the target column. +type TargetLags struct { + // REQUIRED; [Required] Set target lags mode - Auto/Custom + Mode *TargetLagsMode `json:"mode,omitempty"` +} + +// GetTargetLags implements the TargetLagsClassification interface for type TargetLags. +func (t *TargetLags) GetTargetLags() *TargetLags { return t } + +// TargetRollingWindowSizeClassification provides polymorphic access to related types. +// Call the interface's GetTargetRollingWindowSize() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoTargetRollingWindowSize, *CustomTargetRollingWindowSize, *TargetRollingWindowSize +type TargetRollingWindowSizeClassification interface { + // GetTargetRollingWindowSize returns the TargetRollingWindowSize content of the underlying type. + GetTargetRollingWindowSize() *TargetRollingWindowSize +} + +// TargetRollingWindowSize - Forecasting target rolling window size. +type TargetRollingWindowSize struct { + // REQUIRED; [Required] TargetRollingWindowSiz detection mode. + Mode *TargetRollingWindowSizeMode `json:"mode,omitempty"` +} + +// GetTargetRollingWindowSize implements the TargetRollingWindowSizeClassification interface for type TargetRollingWindowSize. +func (t *TargetRollingWindowSize) GetTargetRollingWindowSize() *TargetRollingWindowSize { return t } + type TargetUtilizationScaleSettings struct { // REQUIRED; [Required] Type of deployment scaling algorithm ScaleType *ScaleType `json:"scaleType,omitempty"` @@ -5529,6 +9449,150 @@ func (t *TensorFlow) GetDistributionConfiguration() *DistributionConfiguration { } } +// TextClassification - Text Classification task in AutoML NLP vertical. NLP - Natural Language Processing. +type TextClassification struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` + + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + + // Featurization inputs needed for AutoML job. + FeaturizationSettings *NlpVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` + + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` + + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Primary metric for Text-Classification task. + PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` +} + +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type TextClassification. +func (t *TextClassification) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: t.LogVerbosity, + TargetColumnName: t.TargetColumnName, + TaskType: t.TaskType, + TrainingData: t.TrainingData, + } +} + +// TextClassificationMultilabel - Text Classification Multilabel task in AutoML NLP vertical. NLP - Natural Language Processing. +type TextClassificationMultilabel struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` + + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + + // Featurization inputs needed for AutoML job. + FeaturizationSettings *NlpVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` + + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` + + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // READ-ONLY; Primary metric for Text-Classification-Multilabel task. Currently only Accuracy is supported as primary metric, + // hence user need not set it explicitly. + PrimaryMetric *ClassificationMultilabelPrimaryMetrics `json:"primaryMetric,omitempty" azure:"ro"` +} + +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type TextClassificationMultilabel. +func (t *TextClassificationMultilabel) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: t.LogVerbosity, + TargetColumnName: t.TargetColumnName, + TaskType: t.TaskType, + TrainingData: t.TrainingData, + } +} + +// TextNer - Text-NER task in AutoML NLP vertical. NER - Named Entity Recognition. NLP - Natural Language Processing. +type TextNer struct { + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` + + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + + // Featurization inputs needed for AutoML job. + FeaturizationSettings *NlpVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` + + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` + + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // READ-ONLY; Primary metric for Text-NER task. Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty" azure:"ro"` +} + +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type TextNer. +func (t *TextNer) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: t.LogVerbosity, + TargetColumnName: t.TargetColumnName, + TaskType: t.TaskType, + TrainingData: t.TrainingData, + } +} + +type TmpfsOptions struct { + // Mention the Tmpfs size + Size *int32 `json:"size,omitempty"` +} + // TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' // and a 'location' type TrackedResource struct { @@ -5551,6 +9615,38 @@ type TrackedResource struct { Type *string `json:"type,omitempty" azure:"ro"` } +// TrainingSettings - Training related configuration. +type TrainingSettings struct { + // Enable recommendation of DNN models. + EnableDnnTraining *bool `json:"enableDnnTraining,omitempty"` + + // Flag to turn on explainability on best model. + EnableModelExplainability *bool `json:"enableModelExplainability,omitempty"` + + // Flag for enabling onnx compatible models. + EnableOnnxCompatibleModels *bool `json:"enableOnnxCompatibleModels,omitempty"` + + // Enable stack ensemble run. + EnableStackEnsemble *bool `json:"enableStackEnsemble,omitempty"` + + // Enable voting ensemble run. + EnableVoteEnsemble *bool `json:"enableVoteEnsemble,omitempty"` + + // During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. + // Configure this parameter with a higher value than 300 secs, if more time + // is needed. + EnsembleModelDownloadTimeout *string `json:"ensembleModelDownloadTimeout,omitempty"` + + // Stack ensemble settings for stack ensemble run. + StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` + + // 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. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` +} + // TrialComponent - Trial component definition. type TrialComponent struct { // REQUIRED; [Required] The command to execute on startup of the job. eg. "python train.py" @@ -5569,9 +9665,38 @@ type TrialComponent struct { EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` // Compute Resource configuration for the job. - Resources *ResourceConfiguration `json:"resources,omitempty"` + Resources *JobResourceConfiguration `json:"resources,omitempty"` +} + +// TriggerBaseClassification provides polymorphic access to related types. +// Call the interface's GetTriggerBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *CronTrigger, *RecurrenceTrigger, *TriggerBase +type TriggerBaseClassification interface { + // GetTriggerBase returns the TriggerBase content of the underlying type. + GetTriggerBase() *TriggerBase +} + +type TriggerBase struct { + // REQUIRED; [Required] + TriggerType *TriggerType `json:"triggerType,omitempty"` + + // Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. Recommented + // format would be "2022-06-01T00:00:01" If not present, the schedule will + // run indefinitely + EndTime *string `json:"endTime,omitempty"` + + // Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + StartTime *string `json:"startTime,omitempty"` + + // 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 + TimeZone *string `json:"timeZone,omitempty"` } +// GetTriggerBase implements the TriggerBaseClassification interface for type TriggerBase. +func (t *TriggerBase) GetTriggerBase() *TriggerBase { return t } + type TritonModelJobInput struct { // REQUIRED; [Required] Specifies the type of job. JobInputType *JobInputType `json:"jobInputType,omitempty"` @@ -5598,6 +9723,12 @@ type TritonModelJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -5646,7 +9777,7 @@ type URIFileDataVersion struct { // REQUIRED; [Required] Specifies the type of data. DataType *DataType `json:"dataType,omitempty"` - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -5704,6 +9835,12 @@ type URIFileJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -5727,7 +9864,7 @@ type URIFolderDataVersion struct { // REQUIRED; [Required] Specifies the type of data. DataType *DataType `json:"dataType,omitempty"` - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220501.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -5785,6 +9922,12 @@ type URIFolderJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -5890,6 +10033,16 @@ type UserAssignedIdentity struct { PrincipalID *string `json:"principalId,omitempty" azure:"ro"` } +type UserCreatedAcrAccount struct { + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` +} + +type UserCreatedStorageAccount struct { + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` +} + // UserIdentity - User identity configuration. type UserIdentity struct { // REQUIRED; [Required] Specifies the type of identity framework. @@ -5908,7 +10061,7 @@ type UsernamePasswordAuthTypeWorkspaceConnectionProperties struct { AuthType *ConnectionAuthType `json:"authType,omitempty"` // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` + Category *string `json:"category,omitempty"` Credentials *WorkspaceConnectionUsernamePassword `json:"credentials,omitempty"` Target *string `json:"target,omitempty"` @@ -5936,11 +10089,8 @@ type VirtualMachine struct { ComputeType *ComputeType `json:"computeType,omitempty"` // The description of the Machine Learning compute. - Description *string `json:"description,omitempty"` - - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - Properties *VirtualMachineSchemaProperties `json:"properties,omitempty"` + Description *string `json:"description,omitempty"` + Properties *VirtualMachineSchemaProperties `json:"properties,omitempty"` // ARM resource id of the underlying compute ResourceID *string `json:"resourceId,omitempty"` @@ -5951,6 +10101,9 @@ type VirtualMachine struct { // READ-ONLY; The time at which the compute was created. CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // READ-ONLY; Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty" azure:"ro"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning // service provisioned it if false. IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` @@ -5962,7 +10115,7 @@ type VirtualMachine struct { ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *ComputeProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // GetCompute implements the ComputeClassification interface for type VirtualMachine. @@ -6094,6 +10247,37 @@ type VirtualMachineSizesClientListOptions struct { // placeholder for future optional parameters } +type VolumeDefinition struct { + // Bind Options of the mount + Bind *BindOptions `json:"bind,omitempty"` + + // Consistency of the volume + Consistency *string `json:"consistency,omitempty"` + + // Indicate whether to mount volume as readOnly. Default value for this is false. + ReadOnly *bool `json:"readOnly,omitempty"` + + // Source of the mount. For bind mounts this is the host path. + Source *string `json:"source,omitempty"` + + // Target of the mount. For bind mounts this is the path in the container. + Target *string `json:"target,omitempty"` + + // tmpfs option of the mount + Tmpfs *TmpfsOptions `json:"tmpfs,omitempty"` + + // Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe + Type *VolumeDefinitionType `json:"type,omitempty"` + + // Volume Options of the mount + Volume *VolumeOptions `json:"volume,omitempty"` +} + +type VolumeOptions struct { + // Indicate whether volume is nocopy + Nocopy *bool `json:"nocopy,omitempty"` +} + // Workspace - An object that represents a machine learning workspace. type Workspace struct { // The identity of the resource. @@ -6124,6 +10308,11 @@ type Workspace struct { Type *string `json:"type,omitempty" azure:"ro"` } +type WorkspaceConnectionAccessKey struct { + AccessKeyID *string `json:"accessKeyId,omitempty"` + SecretAccessKey *string `json:"secretAccessKey,omitempty"` +} + type WorkspaceConnectionManagedIdentity struct { ClientID *string `json:"clientId,omitempty"` ResourceID *string `json:"resourceId,omitempty"` @@ -6136,8 +10325,9 @@ type WorkspaceConnectionPersonalAccessToken struct { // WorkspaceConnectionPropertiesV2Classification provides polymorphic access to related types. // Call the interface's GetWorkspaceConnectionPropertiesV2() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *ManagedIdentityAuthTypeWorkspaceConnectionProperties, *NoneAuthTypeWorkspaceConnectionProperties, *PATAuthTypeWorkspaceConnectionProperties, -// - *SASAuthTypeWorkspaceConnectionProperties, *UsernamePasswordAuthTypeWorkspaceConnectionProperties, *WorkspaceConnectionPropertiesV2 +// - *AccessKeyAuthTypeWorkspaceConnectionProperties, *ManagedIdentityAuthTypeWorkspaceConnectionProperties, *NoneAuthTypeWorkspaceConnectionProperties, +// - *PATAuthTypeWorkspaceConnectionProperties, *SASAuthTypeWorkspaceConnectionProperties, *ServicePrincipalAuthTypeWorkspaceConnectionProperties, +// - *UsernamePasswordAuthTypeWorkspaceConnectionProperties, *WorkspaceConnectionPropertiesV2 type WorkspaceConnectionPropertiesV2Classification interface { // GetWorkspaceConnectionPropertiesV2 returns the WorkspaceConnectionPropertiesV2 content of the underlying type. GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 @@ -6148,8 +10338,8 @@ type WorkspaceConnectionPropertiesV2 struct { AuthType *ConnectionAuthType `json:"authType,omitempty"` // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` - Target *string `json:"target,omitempty"` + Category *string `json:"category,omitempty"` + Target *string `json:"target,omitempty"` // Value details of the workspace connection. Value *string `json:"value,omitempty"` @@ -6187,6 +10377,12 @@ type WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } +type WorkspaceConnectionServicePrincipal struct { + ClientID *string `json:"clientId,omitempty"` + ClientSecret *string `json:"clientSecret,omitempty"` + TenantID *string `json:"tenantId,omitempty"` +} + type WorkspaceConnectionSharedAccessSignature struct { Sas *string `json:"sas,omitempty"` } @@ -6298,12 +10494,18 @@ type WorkspaceProperties struct { // READ-ONLY; The current deployment state of workspace resource. The provisioningState is to indicate states for resource // provisioning. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + ProvisioningState *WorkspaceProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; The timestamp when the soft deleted workspace is going to be purged + ScheduledPurgeDate *string `json:"scheduledPurgeDate,omitempty" azure:"ro"` // READ-ONLY; The name of the managed resource group created by workspace RP in customer subscription if the workspace is // CMK workspace ServiceProvisionedResourceGroup *string `json:"serviceProvisionedResourceGroup,omitempty" azure:"ro"` + // READ-ONLY; The timestamp when the workspace was soft deleted + SoftDeletedAt *string `json:"softDeletedAt,omitempty" azure:"ro"` + // READ-ONLY; If the storage associated with the workspace has hierarchical namespace(HNS) enabled. StorageHnsEnabled *bool `json:"storageHnsEnabled,omitempty" azure:"ro"` @@ -6325,6 +10527,9 @@ type WorkspacePropertiesUpdateParameters struct { // The description of this workspace. Description *string `json:"description,omitempty"` + // The encryption settings of the workspace. + Encryption *EncryptionUpdateProperties `json:"encryption,omitempty"` + // The friendly name for this workspace. FriendlyName *string `json:"friendlyName,omitempty"` diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go b/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go new file mode 100644 index 000000000000..3e87369e4a79 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go @@ -0,0 +1,19039 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "encoding/json" + "fmt" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AKS. +func (a AKS) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", a.ComputeLocation) + objectMap["computeType"] = ComputeTypeAKS + populateTimeRFC3339(objectMap, "createdOn", a.CreatedOn) + populate(objectMap, "description", a.Description) + populate(objectMap, "disableLocalAuth", a.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", a.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", a.ModifiedOn) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "provisioningErrors", a.ProvisioningErrors) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "resourceId", a.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AKS. +func (a *AKS) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &a.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &a.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &a.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &a.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &a.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &a.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &a.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &a.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AKSSchema. +func (a AKSSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AKSSchema. +func (a *AKSSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AKSSchemaProperties. +func (a AKSSchemaProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "agentCount", a.AgentCount) + populate(objectMap, "agentVmSize", a.AgentVMSize) + populate(objectMap, "aksNetworkingConfiguration", a.AksNetworkingConfiguration) + populate(objectMap, "clusterFqdn", a.ClusterFqdn) + populate(objectMap, "clusterPurpose", a.ClusterPurpose) + populate(objectMap, "loadBalancerSubnet", a.LoadBalancerSubnet) + populate(objectMap, "loadBalancerType", a.LoadBalancerType) + populate(objectMap, "sslConfiguration", a.SSLConfiguration) + populate(objectMap, "systemServices", a.SystemServices) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AKSSchemaProperties. +func (a *AKSSchemaProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "agentCount": + err = unpopulate(val, "AgentCount", &a.AgentCount) + delete(rawMsg, key) + case "agentVmSize": + err = unpopulate(val, "AgentVMSize", &a.AgentVMSize) + delete(rawMsg, key) + case "aksNetworkingConfiguration": + err = unpopulate(val, "AksNetworkingConfiguration", &a.AksNetworkingConfiguration) + delete(rawMsg, key) + case "clusterFqdn": + err = unpopulate(val, "ClusterFqdn", &a.ClusterFqdn) + delete(rawMsg, key) + case "clusterPurpose": + err = unpopulate(val, "ClusterPurpose", &a.ClusterPurpose) + delete(rawMsg, key) + case "loadBalancerSubnet": + err = unpopulate(val, "LoadBalancerSubnet", &a.LoadBalancerSubnet) + delete(rawMsg, key) + case "loadBalancerType": + err = unpopulate(val, "LoadBalancerType", &a.LoadBalancerType) + delete(rawMsg, key) + case "sslConfiguration": + err = unpopulate(val, "SSLConfiguration", &a.SSLConfiguration) + delete(rawMsg, key) + case "systemServices": + err = unpopulate(val, "SystemServices", &a.SystemServices) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a AccessKeyAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = ConnectionAuthTypeAccessKey + populate(objectMap, "category", a.Category) + populate(objectMap, "credentials", a.Credentials) + populate(objectMap, "target", a.Target) + populate(objectMap, "value", a.Value) + populate(objectMap, "valueFormat", a.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccessKeyAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &a.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &a.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &a.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &a.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountKeyDatastoreCredentials. +func (a AccountKeyDatastoreCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["credentialsType"] = CredentialsTypeAccountKey + populate(objectMap, "secrets", a.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeyDatastoreCredentials. +func (a *AccountKeyDatastoreCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialsType": + err = unpopulate(val, "CredentialsType", &a.CredentialsType) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &a.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AccountKeyDatastoreSecrets. +func (a AccountKeyDatastoreSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "key", a.Key) + objectMap["secretsType"] = SecretsTypeAccountKey + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeyDatastoreSecrets. +func (a *AccountKeyDatastoreSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "key": + err = unpopulate(val, "Key", &a.Key) + delete(rawMsg, key) + case "secretsType": + err = unpopulate(val, "SecretsType", &a.SecretsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AcrDetails. +func (a AcrDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "systemCreatedAcrAccount", a.SystemCreatedAcrAccount) + populate(objectMap, "userCreatedAcrAccount", a.UserCreatedAcrAccount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcrDetails. +func (a *AcrDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "systemCreatedAcrAccount": + err = unpopulate(val, "SystemCreatedAcrAccount", &a.SystemCreatedAcrAccount) + delete(rawMsg, key) + case "userCreatedAcrAccount": + err = unpopulate(val, "UserCreatedAcrAccount", &a.UserCreatedAcrAccount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AksComputeSecrets. +func (a AksComputeSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "adminKubeConfig", a.AdminKubeConfig) + objectMap["computeType"] = ComputeTypeAKS + populate(objectMap, "imagePullSecretName", a.ImagePullSecretName) + populate(objectMap, "userKubeConfig", a.UserKubeConfig) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AksComputeSecrets. +func (a *AksComputeSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminKubeConfig": + err = unpopulate(val, "AdminKubeConfig", &a.AdminKubeConfig) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &a.ComputeType) + delete(rawMsg, key) + case "imagePullSecretName": + err = unpopulate(val, "ImagePullSecretName", &a.ImagePullSecretName) + delete(rawMsg, key) + case "userKubeConfig": + err = unpopulate(val, "UserKubeConfig", &a.UserKubeConfig) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AksComputeSecretsProperties. +func (a AksComputeSecretsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "adminKubeConfig", a.AdminKubeConfig) + populate(objectMap, "imagePullSecretName", a.ImagePullSecretName) + populate(objectMap, "userKubeConfig", a.UserKubeConfig) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AksComputeSecretsProperties. +func (a *AksComputeSecretsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminKubeConfig": + err = unpopulate(val, "AdminKubeConfig", &a.AdminKubeConfig) + delete(rawMsg, key) + case "imagePullSecretName": + err = unpopulate(val, "ImagePullSecretName", &a.ImagePullSecretName) + delete(rawMsg, key) + case "userKubeConfig": + err = unpopulate(val, "UserKubeConfig", &a.UserKubeConfig) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AksNetworkingConfiguration. +func (a AksNetworkingConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dnsServiceIP", a.DNSServiceIP) + populate(objectMap, "dockerBridgeCidr", a.DockerBridgeCidr) + populate(objectMap, "serviceCidr", a.ServiceCidr) + populate(objectMap, "subnetId", a.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AksNetworkingConfiguration. +func (a *AksNetworkingConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dnsServiceIP": + err = unpopulate(val, "DNSServiceIP", &a.DNSServiceIP) + delete(rawMsg, key) + case "dockerBridgeCidr": + err = unpopulate(val, "DockerBridgeCidr", &a.DockerBridgeCidr) + delete(rawMsg, key) + case "serviceCidr": + err = unpopulate(val, "ServiceCidr", &a.ServiceCidr) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &a.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AllNodes. +func (a AllNodes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["nodesValueType"] = NodesValueTypeAll + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllNodes. +func (a *AllNodes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodesValueType": + err = unpopulate(val, "NodesValueType", &a.NodesValueType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlCompute. +func (a AmlCompute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", a.ComputeLocation) + objectMap["computeType"] = ComputeTypeAmlCompute + populateTimeRFC3339(objectMap, "createdOn", a.CreatedOn) + populate(objectMap, "description", a.Description) + populate(objectMap, "disableLocalAuth", a.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", a.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", a.ModifiedOn) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "provisioningErrors", a.ProvisioningErrors) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "resourceId", a.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlCompute. +func (a *AmlCompute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &a.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &a.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &a.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &a.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &a.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &a.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &a.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &a.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlComputeNodeInformation. +func (a AmlComputeNodeInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nodeId", a.NodeID) + populate(objectMap, "nodeState", a.NodeState) + populate(objectMap, "port", a.Port) + populate(objectMap, "privateIpAddress", a.PrivateIPAddress) + populate(objectMap, "publicIpAddress", a.PublicIPAddress) + populate(objectMap, "runId", a.RunID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlComputeNodeInformation. +func (a *AmlComputeNodeInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodeId": + err = unpopulate(val, "NodeID", &a.NodeID) + delete(rawMsg, key) + case "nodeState": + err = unpopulate(val, "NodeState", &a.NodeState) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &a.Port) + delete(rawMsg, key) + case "privateIpAddress": + err = unpopulate(val, "PrivateIPAddress", &a.PrivateIPAddress) + delete(rawMsg, key) + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &a.PublicIPAddress) + delete(rawMsg, key) + case "runId": + err = unpopulate(val, "RunID", &a.RunID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlComputeNodesInformation. +func (a AmlComputeNodesInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "nodes", a.Nodes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlComputeNodesInformation. +func (a *AmlComputeNodesInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &a.NextLink) + delete(rawMsg, key) + case "nodes": + err = unpopulate(val, "Nodes", &a.Nodes) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlComputeProperties. +func (a AmlComputeProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allocationState", a.AllocationState) + populateTimeRFC3339(objectMap, "allocationStateTransitionTime", a.AllocationStateTransitionTime) + populate(objectMap, "currentNodeCount", a.CurrentNodeCount) + populate(objectMap, "enableNodePublicIp", a.EnableNodePublicIP) + populate(objectMap, "errors", a.Errors) + populate(objectMap, "isolatedNetwork", a.IsolatedNetwork) + populate(objectMap, "nodeStateCounts", a.NodeStateCounts) + populate(objectMap, "osType", a.OSType) + populate(objectMap, "propertyBag", &a.PropertyBag) + populate(objectMap, "remoteLoginPortPublicAccess", a.RemoteLoginPortPublicAccess) + populate(objectMap, "scaleSettings", a.ScaleSettings) + populate(objectMap, "subnet", a.Subnet) + populate(objectMap, "targetNodeCount", a.TargetNodeCount) + populate(objectMap, "userAccountCredentials", a.UserAccountCredentials) + populate(objectMap, "vmPriority", a.VMPriority) + populate(objectMap, "vmSize", a.VMSize) + populate(objectMap, "virtualMachineImage", a.VirtualMachineImage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlComputeProperties. +func (a *AmlComputeProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocationState": + err = unpopulate(val, "AllocationState", &a.AllocationState) + delete(rawMsg, key) + case "allocationStateTransitionTime": + err = unpopulateTimeRFC3339(val, "AllocationStateTransitionTime", &a.AllocationStateTransitionTime) + delete(rawMsg, key) + case "currentNodeCount": + err = unpopulate(val, "CurrentNodeCount", &a.CurrentNodeCount) + delete(rawMsg, key) + case "enableNodePublicIp": + err = unpopulate(val, "EnableNodePublicIP", &a.EnableNodePublicIP) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &a.Errors) + delete(rawMsg, key) + case "isolatedNetwork": + err = unpopulate(val, "IsolatedNetwork", &a.IsolatedNetwork) + delete(rawMsg, key) + case "nodeStateCounts": + err = unpopulate(val, "NodeStateCounts", &a.NodeStateCounts) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &a.OSType) + delete(rawMsg, key) + case "propertyBag": + err = unpopulate(val, "PropertyBag", &a.PropertyBag) + delete(rawMsg, key) + case "remoteLoginPortPublicAccess": + err = unpopulate(val, "RemoteLoginPortPublicAccess", &a.RemoteLoginPortPublicAccess) + delete(rawMsg, key) + case "scaleSettings": + err = unpopulate(val, "ScaleSettings", &a.ScaleSettings) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &a.Subnet) + delete(rawMsg, key) + case "targetNodeCount": + err = unpopulate(val, "TargetNodeCount", &a.TargetNodeCount) + delete(rawMsg, key) + case "userAccountCredentials": + err = unpopulate(val, "UserAccountCredentials", &a.UserAccountCredentials) + delete(rawMsg, key) + case "vmPriority": + err = unpopulate(val, "VMPriority", &a.VMPriority) + delete(rawMsg, key) + case "vmSize": + err = unpopulate(val, "VMSize", &a.VMSize) + delete(rawMsg, key) + case "virtualMachineImage": + err = unpopulate(val, "VirtualMachineImage", &a.VirtualMachineImage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlComputeSchema. +func (a AmlComputeSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", a.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlComputeSchema. +func (a *AmlComputeSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlOperation. +func (a AmlOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "display", a.Display) + populate(objectMap, "isDataAction", a.IsDataAction) + populate(objectMap, "name", a.Name) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlOperation. +func (a *AmlOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "display": + err = unpopulate(val, "Display", &a.Display) + delete(rawMsg, key) + case "isDataAction": + err = unpopulate(val, "IsDataAction", &a.IsDataAction) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &a.Name) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlOperationDisplay. +func (a AmlOperationDisplay) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "operation", a.Operation) + populate(objectMap, "provider", a.Provider) + populate(objectMap, "resource", a.Resource) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlOperationDisplay. +func (a *AmlOperationDisplay) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "operation": + err = unpopulate(val, "Operation", &a.Operation) + delete(rawMsg, key) + case "provider": + err = unpopulate(val, "Provider", &a.Provider) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &a.Resource) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlOperationListResult. +func (a AmlOperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlOperationListResult. +func (a *AmlOperationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlToken. +func (a AmlToken) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["identityType"] = IdentityConfigurationTypeAMLToken + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlToken. +func (a *AmlToken) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityType": + err = unpopulate(val, "IdentityType", &a.IdentityType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AmlUserFeature. +func (a AmlUserFeature) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "id", a.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AmlUserFeature. +func (a *AmlUserFeature) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &a.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ArmResourceID. +func (a ArmResourceID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "resourceId", a.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmResourceID. +func (a *ArmResourceID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceId": + err = unpopulate(val, "ResourceID", &a.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssetBase. +func (a AssetBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "isAnonymous", a.IsAnonymous) + populate(objectMap, "isArchived", a.IsArchived) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssetBase. +func (a *AssetBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &a.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &a.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssetContainer. +func (a AssetContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "isArchived", a.IsArchived) + populate(objectMap, "latestVersion", a.LatestVersion) + populate(objectMap, "nextVersion", a.NextVersion) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssetContainer. +func (a *AssetContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &a.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &a.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &a.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssetJobInput. +func (a AssetJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "mode", a.Mode) + populate(objectMap, "uri", a.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssetJobInput. +func (a *AssetJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &a.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssetJobOutput. +func (a AssetJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetName", a.AssetName) + populate(objectMap, "assetVersion", a.AssetVersion) + populate(objectMap, "mode", a.Mode) + populate(objectMap, "uri", a.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssetJobOutput. +func (a *AssetJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetName": + err = unpopulate(val, "AssetName", &a.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &a.AssetVersion) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &a.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssetReferenceBase. +func (a AssetReferenceBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["referenceType"] = a.ReferenceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssetReferenceBase. +func (a *AssetReferenceBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "referenceType": + err = unpopulate(val, "ReferenceType", &a.ReferenceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AssignedUser. +func (a AssignedUser) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "objectId", a.ObjectID) + populate(objectMap, "tenantId", a.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AssignedUser. +func (a *AssignedUser) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "objectId": + err = unpopulate(val, "ObjectID", &a.ObjectID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &a.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoForecastHorizon. +func (a AutoForecastHorizon) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = ForecastHorizonModeAuto + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoForecastHorizon. +func (a *AutoForecastHorizon) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoMLJob. +func (a AutoMLJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "componentId", a.ComponentID) + populate(objectMap, "computeId", a.ComputeID) + populate(objectMap, "description", a.Description) + populate(objectMap, "displayName", a.DisplayName) + populate(objectMap, "environmentId", a.EnvironmentID) + populate(objectMap, "environmentVariables", a.EnvironmentVariables) + populate(objectMap, "experimentName", a.ExperimentName) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "isArchived", a.IsArchived) + objectMap["jobType"] = JobTypeAutoML + populate(objectMap, "outputs", a.Outputs) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "resources", a.Resources) + populate(objectMap, "services", a.Services) + populate(objectMap, "status", a.Status) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "taskDetails", a.TaskDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoMLJob. +func (a *AutoMLJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &a.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &a.ComputeID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &a.DisplayName) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &a.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &a.EnvironmentVariables) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &a.ExperimentName) + delete(rawMsg, key) + case "identity": + a.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &a.IsArchived) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &a.JobType) + delete(rawMsg, key) + case "outputs": + a.Outputs, err = unmarshalJobOutputClassificationMap(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &a.Resources) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &a.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &a.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + case "taskDetails": + a.TaskDetails, err = unmarshalAutoMLVerticalClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoMLVertical. +func (a AutoMLVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "logVerbosity", a.LogVerbosity) + populate(objectMap, "targetColumnName", a.TargetColumnName) + objectMap["taskType"] = a.TaskType + populate(objectMap, "trainingData", a.TrainingData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoMLVertical. +func (a *AutoMLVertical) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &a.LogVerbosity) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &a.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &a.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &a.TrainingData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoNCrossValidations. +func (a AutoNCrossValidations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = NCrossValidationsModeAuto + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoNCrossValidations. +func (a *AutoNCrossValidations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoPauseProperties. +func (a AutoPauseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "delayInMinutes", a.DelayInMinutes) + populate(objectMap, "enabled", a.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoPauseProperties. +func (a *AutoPauseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delayInMinutes": + err = unpopulate(val, "DelayInMinutes", &a.DelayInMinutes) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoScaleProperties. +func (a AutoScaleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "maxNodeCount", a.MaxNodeCount) + populate(objectMap, "minNodeCount", a.MinNodeCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleProperties. +func (a *AutoScaleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &a.Enabled) + delete(rawMsg, key) + case "maxNodeCount": + err = unpopulate(val, "MaxNodeCount", &a.MaxNodeCount) + delete(rawMsg, key) + case "minNodeCount": + err = unpopulate(val, "MinNodeCount", &a.MinNodeCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoSeasonality. +func (a AutoSeasonality) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = SeasonalityModeAuto + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoSeasonality. +func (a *AutoSeasonality) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoTargetLags. +func (a AutoTargetLags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = TargetLagsModeAuto + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoTargetLags. +func (a *AutoTargetLags) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutoTargetRollingWindowSize. +func (a AutoTargetRollingWindowSize) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = TargetRollingWindowSizeModeAuto + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutoTargetRollingWindowSize. +func (a *AutoTargetRollingWindowSize) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &a.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AutologgerSettings. +func (a AutologgerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "mlflowAutologger", a.MlflowAutologger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutologgerSettings. +func (a *AutologgerSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mlflowAutologger": + err = unpopulate(val, "MlflowAutologger", &a.MlflowAutologger) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureBlobDatastore. +func (a AzureBlobDatastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accountName", a.AccountName) + populate(objectMap, "containerName", a.ContainerName) + populate(objectMap, "credentials", a.Credentials) + objectMap["datastoreType"] = DatastoreTypeAzureBlob + populate(objectMap, "description", a.Description) + populate(objectMap, "endpoint", a.Endpoint) + populate(objectMap, "isDefault", a.IsDefault) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) + populate(objectMap, "subscriptionId", a.SubscriptionID) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobDatastore. +func (a *AzureBlobDatastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountName": + err = unpopulate(val, "AccountName", &a.AccountName) + delete(rawMsg, key) + case "containerName": + err = unpopulate(val, "ContainerName", &a.ContainerName) + delete(rawMsg, key) + case "credentials": + a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) + delete(rawMsg, key) + case "datastoreType": + err = unpopulate(val, "DatastoreType", &a.DatastoreType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpoint": + err = unpopulate(val, "Endpoint", &a.Endpoint) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &a.IsDefault) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "serviceDataAccessAuthIdentity": + err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureDataLakeGen1Datastore. +func (a AzureDataLakeGen1Datastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "credentials", a.Credentials) + objectMap["datastoreType"] = DatastoreTypeAzureDataLakeGen1 + populate(objectMap, "description", a.Description) + populate(objectMap, "isDefault", a.IsDefault) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) + populate(objectMap, "storeName", a.StoreName) + populate(objectMap, "subscriptionId", a.SubscriptionID) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureDataLakeGen1Datastore. +func (a *AzureDataLakeGen1Datastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) + delete(rawMsg, key) + case "datastoreType": + err = unpopulate(val, "DatastoreType", &a.DatastoreType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &a.IsDefault) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "serviceDataAccessAuthIdentity": + err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) + delete(rawMsg, key) + case "storeName": + err = unpopulate(val, "StoreName", &a.StoreName) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureDataLakeGen2Datastore. +func (a AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accountName", a.AccountName) + populate(objectMap, "credentials", a.Credentials) + objectMap["datastoreType"] = DatastoreTypeAzureDataLakeGen2 + populate(objectMap, "description", a.Description) + populate(objectMap, "endpoint", a.Endpoint) + populate(objectMap, "filesystem", a.Filesystem) + populate(objectMap, "isDefault", a.IsDefault) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) + populate(objectMap, "subscriptionId", a.SubscriptionID) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureDataLakeGen2Datastore. +func (a *AzureDataLakeGen2Datastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountName": + err = unpopulate(val, "AccountName", &a.AccountName) + delete(rawMsg, key) + case "credentials": + a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) + delete(rawMsg, key) + case "datastoreType": + err = unpopulate(val, "DatastoreType", &a.DatastoreType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpoint": + err = unpopulate(val, "Endpoint", &a.Endpoint) + delete(rawMsg, key) + case "filesystem": + err = unpopulate(val, "Filesystem", &a.Filesystem) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &a.IsDefault) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "serviceDataAccessAuthIdentity": + err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureDatastore. +func (a AzureDatastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "subscriptionId", a.SubscriptionID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureDatastore. +func (a *AzureDatastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFileDatastore. +func (a AzureFileDatastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accountName", a.AccountName) + populate(objectMap, "credentials", a.Credentials) + objectMap["datastoreType"] = DatastoreTypeAzureFile + populate(objectMap, "description", a.Description) + populate(objectMap, "endpoint", a.Endpoint) + populate(objectMap, "fileShareName", a.FileShareName) + populate(objectMap, "isDefault", a.IsDefault) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "resourceGroup", a.ResourceGroup) + populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) + populate(objectMap, "subscriptionId", a.SubscriptionID) + populate(objectMap, "tags", a.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileDatastore. +func (a *AzureFileDatastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accountName": + err = unpopulate(val, "AccountName", &a.AccountName) + delete(rawMsg, key) + case "credentials": + a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) + delete(rawMsg, key) + case "datastoreType": + err = unpopulate(val, "DatastoreType", &a.DatastoreType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &a.Description) + delete(rawMsg, key) + case "endpoint": + err = unpopulate(val, "Endpoint", &a.Endpoint) + delete(rawMsg, key) + case "fileShareName": + err = unpopulate(val, "FileShareName", &a.FileShareName) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &a.IsDefault) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &a.Properties) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &a.Protocol) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &a.ResourceGroup) + delete(rawMsg, key) + case "serviceDataAccessAuthIdentity": + err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &a.SubscriptionID) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &a.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BanditPolicy. +func (b BanditPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "delayEvaluation", b.DelayEvaluation) + populate(objectMap, "evaluationInterval", b.EvaluationInterval) + objectMap["policyType"] = EarlyTerminationPolicyTypeBandit + populate(objectMap, "slackAmount", b.SlackAmount) + populate(objectMap, "slackFactor", b.SlackFactor) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BanditPolicy. +func (b *BanditPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delayEvaluation": + err = unpopulate(val, "DelayEvaluation", &b.DelayEvaluation) + delete(rawMsg, key) + case "evaluationInterval": + err = unpopulate(val, "EvaluationInterval", &b.EvaluationInterval) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &b.PolicyType) + delete(rawMsg, key) + case "slackAmount": + err = unpopulate(val, "SlackAmount", &b.SlackAmount) + delete(rawMsg, key) + case "slackFactor": + err = unpopulate(val, "SlackFactor", &b.SlackFactor) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchDeployment. +func (b BatchDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.ID) + populate(objectMap, "identity", b.Identity) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "sku", b.SKU) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchDeployment. +func (b *BatchDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &b.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &b.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchDeploymentProperties. +func (b BatchDeploymentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "codeConfiguration", b.CodeConfiguration) + populate(objectMap, "compute", b.Compute) + populate(objectMap, "description", b.Description) + populate(objectMap, "environmentId", b.EnvironmentID) + populate(objectMap, "environmentVariables", b.EnvironmentVariables) + populate(objectMap, "errorThreshold", b.ErrorThreshold) + populate(objectMap, "loggingLevel", b.LoggingLevel) + populate(objectMap, "maxConcurrencyPerInstance", b.MaxConcurrencyPerInstance) + populate(objectMap, "miniBatchSize", b.MiniBatchSize) + populate(objectMap, "model", b.Model) + populate(objectMap, "outputAction", b.OutputAction) + populate(objectMap, "outputFileName", b.OutputFileName) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "resources", b.Resources) + populate(objectMap, "retrySettings", b.RetrySettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchDeploymentProperties. +func (b *BatchDeploymentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &b.CodeConfiguration) + delete(rawMsg, key) + case "compute": + err = unpopulate(val, "Compute", &b.Compute) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &b.Description) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &b.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &b.EnvironmentVariables) + delete(rawMsg, key) + case "errorThreshold": + err = unpopulate(val, "ErrorThreshold", &b.ErrorThreshold) + delete(rawMsg, key) + case "loggingLevel": + err = unpopulate(val, "LoggingLevel", &b.LoggingLevel) + delete(rawMsg, key) + case "maxConcurrencyPerInstance": + err = unpopulate(val, "MaxConcurrencyPerInstance", &b.MaxConcurrencyPerInstance) + delete(rawMsg, key) + case "miniBatchSize": + err = unpopulate(val, "MiniBatchSize", &b.MiniBatchSize) + delete(rawMsg, key) + case "model": + b.Model, err = unmarshalAssetReferenceBaseClassification(val) + delete(rawMsg, key) + case "outputAction": + err = unpopulate(val, "OutputAction", &b.OutputAction) + delete(rawMsg, key) + case "outputFileName": + err = unpopulate(val, "OutputFileName", &b.OutputFileName) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &b.Resources) + delete(rawMsg, key) + case "retrySettings": + err = unpopulate(val, "RetrySettings", &b.RetrySettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchDeploymentTrackedResourceArmPaginatedResult. +func (b BatchDeploymentTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchDeploymentTrackedResourceArmPaginatedResult. +func (b *BatchDeploymentTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchEndpoint. +func (b BatchEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.ID) + populate(objectMap, "identity", b.Identity) + populate(objectMap, "kind", b.Kind) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "sku", b.SKU) + populate(objectMap, "systemData", b.SystemData) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchEndpoint. +func (b *BatchEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &b.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &b.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &b.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &b.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &b.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &b.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &b.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &b.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchEndpointDefaults. +func (b BatchEndpointDefaults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "deploymentName", b.DeploymentName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchEndpointDefaults. +func (b *BatchEndpointDefaults) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "deploymentName": + err = unpopulate(val, "DeploymentName", &b.DeploymentName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchEndpointProperties. +func (b BatchEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authMode", b.AuthMode) + populate(objectMap, "defaults", b.Defaults) + populate(objectMap, "description", b.Description) + populate(objectMap, "keys", b.Keys) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "scoringUri", b.ScoringURI) + populate(objectMap, "swaggerUri", b.SwaggerURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchEndpointProperties. +func (b *BatchEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authMode": + err = unpopulate(val, "AuthMode", &b.AuthMode) + delete(rawMsg, key) + case "defaults": + err = unpopulate(val, "Defaults", &b.Defaults) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &b.Description) + delete(rawMsg, key) + case "keys": + err = unpopulate(val, "Keys", &b.Keys) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &b.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) + delete(rawMsg, key) + case "scoringUri": + err = unpopulate(val, "ScoringURI", &b.ScoringURI) + delete(rawMsg, key) + case "swaggerUri": + err = unpopulate(val, "SwaggerURI", &b.SwaggerURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchEndpointTrackedResourceArmPaginatedResult. +func (b BatchEndpointTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchEndpointTrackedResourceArmPaginatedResult. +func (b *BatchEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &b.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &b.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BatchRetrySettings. +func (b BatchRetrySettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxRetries", b.MaxRetries) + populate(objectMap, "timeout", b.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchRetrySettings. +func (b *BatchRetrySettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxRetries": + err = unpopulate(val, "MaxRetries", &b.MaxRetries) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &b.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BayesianSamplingAlgorithm. +func (b BayesianSamplingAlgorithm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeBayesian + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BayesianSamplingAlgorithm. +func (b *BayesianSamplingAlgorithm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "samplingAlgorithmType": + err = unpopulate(val, "SamplingAlgorithmType", &b.SamplingAlgorithmType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BindOptions. +func (b BindOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "createHostPath", b.CreateHostPath) + populate(objectMap, "propagation", b.Propagation) + populate(objectMap, "selinux", b.Selinux) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BindOptions. +func (b *BindOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createHostPath": + err = unpopulate(val, "CreateHostPath", &b.CreateHostPath) + delete(rawMsg, key) + case "propagation": + err = unpopulate(val, "Propagation", &b.Propagation) + delete(rawMsg, key) + case "selinux": + err = unpopulate(val, "Selinux", &b.Selinux) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type BuildContext. +func (b BuildContext) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "contextUri", b.ContextURI) + populate(objectMap, "dockerfilePath", b.DockerfilePath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BuildContext. +func (b *BuildContext) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "contextUri": + err = unpopulate(val, "ContextURI", &b.ContextURI) + delete(rawMsg, key) + case "dockerfilePath": + err = unpopulate(val, "DockerfilePath", &b.DockerfilePath) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", b, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CSVExportSummary. +func (c CSVExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containerName", c.ContainerName) + populateTimeRFC3339(objectMap, "endDateTime", c.EndDateTime) + populate(objectMap, "exportedRowCount", c.ExportedRowCount) + objectMap["format"] = ExportFormatTypeCSV + populate(objectMap, "labelingJobId", c.LabelingJobID) + populate(objectMap, "snapshotPath", c.SnapshotPath) + populateTimeRFC3339(objectMap, "startDateTime", c.StartDateTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CSVExportSummary. +func (c *CSVExportSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &c.ContainerName) + delete(rawMsg, key) + case "endDateTime": + err = unpopulateTimeRFC3339(val, "EndDateTime", &c.EndDateTime) + delete(rawMsg, key) + case "exportedRowCount": + err = unpopulate(val, "ExportedRowCount", &c.ExportedRowCount) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &c.Format) + delete(rawMsg, key) + case "labelingJobId": + err = unpopulate(val, "LabelingJobID", &c.LabelingJobID) + delete(rawMsg, key) + case "snapshotPath": + err = unpopulate(val, "SnapshotPath", &c.SnapshotPath) + delete(rawMsg, key) + case "startDateTime": + err = unpopulateTimeRFC3339(val, "StartDateTime", &c.StartDateTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateDatastoreCredentials. +func (c CertificateDatastoreCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authorityUrl", c.AuthorityURL) + populate(objectMap, "clientId", c.ClientID) + objectMap["credentialsType"] = CredentialsTypeCertificate + populate(objectMap, "resourceUrl", c.ResourceURL) + populate(objectMap, "secrets", c.Secrets) + populate(objectMap, "tenantId", c.TenantID) + populate(objectMap, "thumbprint", c.Thumbprint) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDatastoreCredentials. +func (c *CertificateDatastoreCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorityUrl": + err = unpopulate(val, "AuthorityURL", &c.AuthorityURL) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &c.ClientID) + delete(rawMsg, key) + case "credentialsType": + err = unpopulate(val, "CredentialsType", &c.CredentialsType) + delete(rawMsg, key) + case "resourceUrl": + err = unpopulate(val, "ResourceURL", &c.ResourceURL) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &c.Secrets) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &c.TenantID) + delete(rawMsg, key) + case "thumbprint": + err = unpopulate(val, "Thumbprint", &c.Thumbprint) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CertificateDatastoreSecrets. +func (c CertificateDatastoreSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "certificate", c.Certificate) + objectMap["secretsType"] = SecretsTypeCertificate + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDatastoreSecrets. +func (c *CertificateDatastoreSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificate": + err = unpopulate(val, "Certificate", &c.Certificate) + delete(rawMsg, key) + case "secretsType": + err = unpopulate(val, "SecretsType", &c.SecretsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Classification. +func (c Classification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cvSplitColumnNames", c.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", c.FeaturizationSettings) + populate(objectMap, "fixedParameters", c.FixedParameters) + populate(objectMap, "limitSettings", c.LimitSettings) + populate(objectMap, "logVerbosity", c.LogVerbosity) + populate(objectMap, "nCrossValidations", c.NCrossValidations) + populate(objectMap, "positiveLabel", c.PositiveLabel) + populate(objectMap, "primaryMetric", c.PrimaryMetric) + populate(objectMap, "searchSpace", c.SearchSpace) + populate(objectMap, "sweepSettings", c.SweepSettings) + populate(objectMap, "targetColumnName", c.TargetColumnName) + objectMap["taskType"] = TaskTypeClassification + populate(objectMap, "testData", c.TestData) + populate(objectMap, "testDataSize", c.TestDataSize) + populate(objectMap, "trainingData", c.TrainingData) + populate(objectMap, "trainingSettings", c.TrainingSettings) + populate(objectMap, "validationData", c.ValidationData) + populate(objectMap, "validationDataSize", c.ValidationDataSize) + populate(objectMap, "weightColumnName", c.WeightColumnName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Classification. +func (c *Classification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cvSplitColumnNames": + err = unpopulate(val, "CvSplitColumnNames", &c.CvSplitColumnNames) + delete(rawMsg, key) + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &c.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &c.FixedParameters) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &c.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &c.LogVerbosity) + delete(rawMsg, key) + case "nCrossValidations": + c.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) + delete(rawMsg, key) + case "positiveLabel": + err = unpopulate(val, "PositiveLabel", &c.PositiveLabel) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &c.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &c.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &c.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &c.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &c.TaskType) + delete(rawMsg, key) + case "testData": + err = unpopulate(val, "TestData", &c.TestData) + delete(rawMsg, key) + case "testDataSize": + err = unpopulate(val, "TestDataSize", &c.TestDataSize) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &c.TrainingData) + delete(rawMsg, key) + case "trainingSettings": + err = unpopulate(val, "TrainingSettings", &c.TrainingSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &c.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &c.ValidationDataSize) + delete(rawMsg, key) + case "weightColumnName": + err = unpopulate(val, "WeightColumnName", &c.WeightColumnName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClassificationTrainingSettings. +func (c ClassificationTrainingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedTrainingAlgorithms", c.AllowedTrainingAlgorithms) + populate(objectMap, "blockedTrainingAlgorithms", c.BlockedTrainingAlgorithms) + populate(objectMap, "enableDnnTraining", c.EnableDnnTraining) + populate(objectMap, "enableModelExplainability", c.EnableModelExplainability) + populate(objectMap, "enableOnnxCompatibleModels", c.EnableOnnxCompatibleModels) + populate(objectMap, "enableStackEnsemble", c.EnableStackEnsemble) + populate(objectMap, "enableVoteEnsemble", c.EnableVoteEnsemble) + populate(objectMap, "ensembleModelDownloadTimeout", c.EnsembleModelDownloadTimeout) + populate(objectMap, "stackEnsembleSettings", c.StackEnsembleSettings) + populate(objectMap, "trainingMode", c.TrainingMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClassificationTrainingSettings. +func (c *ClassificationTrainingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTrainingAlgorithms": + err = unpopulate(val, "AllowedTrainingAlgorithms", &c.AllowedTrainingAlgorithms) + delete(rawMsg, key) + case "blockedTrainingAlgorithms": + err = unpopulate(val, "BlockedTrainingAlgorithms", &c.BlockedTrainingAlgorithms) + delete(rawMsg, key) + case "enableDnnTraining": + err = unpopulate(val, "EnableDnnTraining", &c.EnableDnnTraining) + delete(rawMsg, key) + case "enableModelExplainability": + err = unpopulate(val, "EnableModelExplainability", &c.EnableModelExplainability) + delete(rawMsg, key) + case "enableOnnxCompatibleModels": + err = unpopulate(val, "EnableOnnxCompatibleModels", &c.EnableOnnxCompatibleModels) + delete(rawMsg, key) + case "enableStackEnsemble": + err = unpopulate(val, "EnableStackEnsemble", &c.EnableStackEnsemble) + delete(rawMsg, key) + case "enableVoteEnsemble": + err = unpopulate(val, "EnableVoteEnsemble", &c.EnableVoteEnsemble) + delete(rawMsg, key) + case "ensembleModelDownloadTimeout": + err = unpopulate(val, "EnsembleModelDownloadTimeout", &c.EnsembleModelDownloadTimeout) + delete(rawMsg, key) + case "stackEnsembleSettings": + err = unpopulate(val, "StackEnsembleSettings", &c.StackEnsembleSettings) + delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &c.TrainingMode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterUpdateParameters. +func (c ClusterUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdateParameters. +func (c *ClusterUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ClusterUpdateProperties. +func (c ClusterUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpdateProperties. +func (c *ClusterUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CocoExportSummary. +func (c CocoExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containerName", c.ContainerName) + populateTimeRFC3339(objectMap, "endDateTime", c.EndDateTime) + populate(objectMap, "exportedRowCount", c.ExportedRowCount) + objectMap["format"] = ExportFormatTypeCoco + populate(objectMap, "labelingJobId", c.LabelingJobID) + populate(objectMap, "snapshotPath", c.SnapshotPath) + populateTimeRFC3339(objectMap, "startDateTime", c.StartDateTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CocoExportSummary. +func (c *CocoExportSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerName": + err = unpopulate(val, "ContainerName", &c.ContainerName) + delete(rawMsg, key) + case "endDateTime": + err = unpopulateTimeRFC3339(val, "EndDateTime", &c.EndDateTime) + delete(rawMsg, key) + case "exportedRowCount": + err = unpopulate(val, "ExportedRowCount", &c.ExportedRowCount) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &c.Format) + delete(rawMsg, key) + case "labelingJobId": + err = unpopulate(val, "LabelingJobID", &c.LabelingJobID) + delete(rawMsg, key) + case "snapshotPath": + err = unpopulate(val, "SnapshotPath", &c.SnapshotPath) + delete(rawMsg, key) + case "startDateTime": + err = unpopulateTimeRFC3339(val, "StartDateTime", &c.StartDateTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CodeConfiguration. +func (c CodeConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "codeId", c.CodeID) + populate(objectMap, "scoringScript", c.ScoringScript) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CodeConfiguration. +func (c *CodeConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "codeId": + err = unpopulate(val, "CodeID", &c.CodeID) + delete(rawMsg, key) + case "scoringScript": + err = unpopulate(val, "ScoringScript", &c.ScoringScript) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CodeContainer. +func (c CodeContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CodeContainer. +func (c *CodeContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CodeContainerProperties. +func (c CodeContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", c.Description) + populate(objectMap, "isArchived", c.IsArchived) + populate(objectMap, "latestVersion", c.LatestVersion) + populate(objectMap, "nextVersion", c.NextVersion) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CodeContainerProperties. +func (c *CodeContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &c.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &c.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &c.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CodeContainerResourceArmPaginatedResult. +func (c CodeContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CodeContainerResourceArmPaginatedResult. +func (c *CodeContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CodeVersion. +func (c CodeVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CodeVersion. +func (c *CodeVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CodeVersionProperties. +func (c CodeVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "codeUri", c.CodeURI) + populate(objectMap, "description", c.Description) + populate(objectMap, "isAnonymous", c.IsAnonymous) + populate(objectMap, "isArchived", c.IsArchived) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CodeVersionProperties. +func (c *CodeVersionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "codeUri": + err = unpopulate(val, "CodeURI", &c.CodeURI) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &c.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &c.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CodeVersionResourceArmPaginatedResult. +func (c CodeVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CodeVersionResourceArmPaginatedResult. +func (c *CodeVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ColumnTransformer. +func (c ColumnTransformer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "fields", c.Fields) + populate(objectMap, "parameters", &c.Parameters) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ColumnTransformer. +func (c *ColumnTransformer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fields": + err = unpopulate(val, "Fields", &c.Fields) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &c.Parameters) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommandJob. +func (c CommandJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "autologgerSettings", c.AutologgerSettings) + populate(objectMap, "codeId", c.CodeID) + populate(objectMap, "command", c.Command) + populate(objectMap, "componentId", c.ComponentID) + populate(objectMap, "computeId", c.ComputeID) + populate(objectMap, "description", c.Description) + populate(objectMap, "displayName", c.DisplayName) + populate(objectMap, "distribution", c.Distribution) + populate(objectMap, "environmentId", c.EnvironmentID) + populate(objectMap, "environmentVariables", c.EnvironmentVariables) + populate(objectMap, "experimentName", c.ExperimentName) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "inputs", c.Inputs) + populate(objectMap, "isArchived", c.IsArchived) + objectMap["jobType"] = JobTypeCommand + populate(objectMap, "limits", c.Limits) + populate(objectMap, "outputs", c.Outputs) + populate(objectMap, "parameters", &c.Parameters) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "resources", c.Resources) + populate(objectMap, "services", c.Services) + populate(objectMap, "status", c.Status) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommandJob. +func (c *CommandJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autologgerSettings": + err = unpopulate(val, "AutologgerSettings", &c.AutologgerSettings) + delete(rawMsg, key) + case "codeId": + err = unpopulate(val, "CodeID", &c.CodeID) + delete(rawMsg, key) + case "command": + err = unpopulate(val, "Command", &c.Command) + delete(rawMsg, key) + case "componentId": + err = unpopulate(val, "ComponentID", &c.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &c.ComputeID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &c.DisplayName) + delete(rawMsg, key) + case "distribution": + c.Distribution, err = unmarshalDistributionConfigurationClassification(val) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &c.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &c.EnvironmentVariables) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &c.ExperimentName) + delete(rawMsg, key) + case "identity": + c.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "inputs": + c.Inputs, err = unmarshalJobInputClassificationMap(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &c.IsArchived) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &c.JobType) + delete(rawMsg, key) + case "limits": + err = unpopulate(val, "Limits", &c.Limits) + delete(rawMsg, key) + case "outputs": + c.Outputs, err = unmarshalJobOutputClassificationMap(val) + delete(rawMsg, key) + case "parameters": + err = unpopulate(val, "Parameters", &c.Parameters) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &c.Resources) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &c.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CommandJobLimits. +func (c CommandJobLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["jobLimitsType"] = JobLimitsTypeCommand + populate(objectMap, "timeout", c.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CommandJobLimits. +func (c *CommandJobLimits) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobLimitsType": + err = unpopulate(val, "JobLimitsType", &c.JobLimitsType) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &c.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentContainer. +func (c ComponentContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentContainer. +func (c *ComponentContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentContainerProperties. +func (c ComponentContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", c.Description) + populate(objectMap, "isArchived", c.IsArchived) + populate(objectMap, "latestVersion", c.LatestVersion) + populate(objectMap, "nextVersion", c.NextVersion) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentContainerProperties. +func (c *ComponentContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &c.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &c.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &c.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentContainerResourceArmPaginatedResult. +func (c ComponentContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentContainerResourceArmPaginatedResult. +func (c *ComponentContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentVersion. +func (c ComponentVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentVersion. +func (c *ComponentVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentVersionProperties. +func (c ComponentVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "componentSpec", &c.ComponentSpec) + populate(objectMap, "description", c.Description) + populate(objectMap, "isAnonymous", c.IsAnonymous) + populate(objectMap, "isArchived", c.IsArchived) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentVersionProperties. +func (c *ComponentVersionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentSpec": + err = unpopulate(val, "ComponentSpec", &c.ComponentSpec) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &c.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &c.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComponentVersionResourceArmPaginatedResult. +func (c ComponentVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentVersionResourceArmPaginatedResult. +func (c *ComponentVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &c.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Compute. +func (c Compute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", c.ComputeLocation) + objectMap["computeType"] = c.ComputeType + populateTimeRFC3339(objectMap, "createdOn", c.CreatedOn) + populate(objectMap, "description", c.Description) + populate(objectMap, "disableLocalAuth", c.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", c.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", c.ModifiedOn) + populate(objectMap, "provisioningErrors", c.ProvisioningErrors) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "resourceId", c.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Compute. +func (c *Compute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &c.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &c.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &c.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &c.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &c.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &c.ModifiedOn) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &c.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstance. +func (c ComputeInstance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", c.ComputeLocation) + objectMap["computeType"] = ComputeTypeComputeInstance + populateTimeRFC3339(objectMap, "createdOn", c.CreatedOn) + populate(objectMap, "description", c.Description) + populate(objectMap, "disableLocalAuth", c.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", c.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", c.ModifiedOn) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningErrors", c.ProvisioningErrors) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "resourceId", c.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstance. +func (c *ComputeInstance) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &c.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &c.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &c.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &c.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &c.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &c.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &c.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &c.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceApplication. +func (c ComputeInstanceApplication) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayName", c.DisplayName) + populate(objectMap, "endpointUri", c.EndpointURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceApplication. +func (c *ComputeInstanceApplication) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &c.DisplayName) + delete(rawMsg, key) + case "endpointUri": + err = unpopulate(val, "EndpointURI", &c.EndpointURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceAutologgerSettings. +func (c ComputeInstanceAutologgerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "mlflowAutologger", c.MlflowAutologger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceAutologgerSettings. +func (c *ComputeInstanceAutologgerSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mlflowAutologger": + err = unpopulate(val, "MlflowAutologger", &c.MlflowAutologger) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceConnectivityEndpoints. +func (c ComputeInstanceConnectivityEndpoints) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateIpAddress", c.PrivateIPAddress) + populate(objectMap, "publicIpAddress", c.PublicIPAddress) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceConnectivityEndpoints. +func (c *ComputeInstanceConnectivityEndpoints) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateIpAddress": + err = unpopulate(val, "PrivateIPAddress", &c.PrivateIPAddress) + delete(rawMsg, key) + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &c.PublicIPAddress) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceContainer. +func (c ComputeInstanceContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "autosave", c.Autosave) + populate(objectMap, "environment", c.Environment) + populate(objectMap, "gpu", c.Gpu) + populate(objectMap, "name", c.Name) + populate(objectMap, "network", c.Network) + populate(objectMap, "services", c.Services) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceContainer. +func (c *ComputeInstanceContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autosave": + err = unpopulate(val, "Autosave", &c.Autosave) + delete(rawMsg, key) + case "environment": + err = unpopulate(val, "Environment", &c.Environment) + delete(rawMsg, key) + case "gpu": + err = unpopulate(val, "Gpu", &c.Gpu) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "network": + err = unpopulate(val, "Network", &c.Network) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &c.Services) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceCreatedBy. +func (c ComputeInstanceCreatedBy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "userId", c.UserID) + populate(objectMap, "userName", c.UserName) + populate(objectMap, "userOrgId", c.UserOrgID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceCreatedBy. +func (c *ComputeInstanceCreatedBy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "userId": + err = unpopulate(val, "UserID", &c.UserID) + delete(rawMsg, key) + case "userName": + err = unpopulate(val, "UserName", &c.UserName) + delete(rawMsg, key) + case "userOrgId": + err = unpopulate(val, "UserOrgID", &c.UserOrgID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceDataDisk. +func (c ComputeInstanceDataDisk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "caching", c.Caching) + populate(objectMap, "diskSizeGB", c.DiskSizeGB) + populate(objectMap, "lun", c.Lun) + populate(objectMap, "storageAccountType", c.StorageAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceDataDisk. +func (c *ComputeInstanceDataDisk) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "caching": + err = unpopulate(val, "Caching", &c.Caching) + delete(rawMsg, key) + case "diskSizeGB": + err = unpopulate(val, "DiskSizeGB", &c.DiskSizeGB) + delete(rawMsg, key) + case "lun": + err = unpopulate(val, "Lun", &c.Lun) + delete(rawMsg, key) + case "storageAccountType": + err = unpopulate(val, "StorageAccountType", &c.StorageAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceDataMount. +func (c ComputeInstanceDataMount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "createdBy", c.CreatedBy) + populate(objectMap, "error", c.Error) + populate(objectMap, "mountAction", c.MountAction) + populate(objectMap, "mountName", c.MountName) + populate(objectMap, "mountPath", c.MountPath) + populate(objectMap, "mountState", c.MountState) + populateTimeRFC3339(objectMap, "mountedOn", c.MountedOn) + populate(objectMap, "source", c.Source) + populate(objectMap, "sourceType", c.SourceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceDataMount. +func (c *ComputeInstanceDataMount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdBy": + err = unpopulate(val, "CreatedBy", &c.CreatedBy) + delete(rawMsg, key) + case "error": + err = unpopulate(val, "Error", &c.Error) + delete(rawMsg, key) + case "mountAction": + err = unpopulate(val, "MountAction", &c.MountAction) + delete(rawMsg, key) + case "mountName": + err = unpopulate(val, "MountName", &c.MountName) + delete(rawMsg, key) + case "mountPath": + err = unpopulate(val, "MountPath", &c.MountPath) + delete(rawMsg, key) + case "mountState": + err = unpopulate(val, "MountState", &c.MountState) + delete(rawMsg, key) + case "mountedOn": + err = unpopulateTimeRFC3339(val, "MountedOn", &c.MountedOn) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &c.Source) + delete(rawMsg, key) + case "sourceType": + err = unpopulate(val, "SourceType", &c.SourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceEnvironmentInfo. +func (c ComputeInstanceEnvironmentInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", c.Name) + populate(objectMap, "version", c.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceEnvironmentInfo. +func (c *ComputeInstanceEnvironmentInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &c.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceLastOperation. +func (c ComputeInstanceLastOperation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "operationName", c.OperationName) + populate(objectMap, "operationStatus", c.OperationStatus) + populateTimeRFC3339(objectMap, "operationTime", c.OperationTime) + populate(objectMap, "operationTrigger", c.OperationTrigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceLastOperation. +func (c *ComputeInstanceLastOperation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "operationName": + err = unpopulate(val, "OperationName", &c.OperationName) + delete(rawMsg, key) + case "operationStatus": + err = unpopulate(val, "OperationStatus", &c.OperationStatus) + delete(rawMsg, key) + case "operationTime": + err = unpopulateTimeRFC3339(val, "OperationTime", &c.OperationTime) + delete(rawMsg, key) + case "operationTrigger": + err = unpopulate(val, "OperationTrigger", &c.OperationTrigger) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceProperties. +func (c ComputeInstanceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationSharingPolicy", c.ApplicationSharingPolicy) + populate(objectMap, "applications", c.Applications) + populate(objectMap, "autologgerSettings", c.AutologgerSettings) + populate(objectMap, "computeInstanceAuthorizationType", c.ComputeInstanceAuthorizationType) + populate(objectMap, "connectivityEndpoints", c.ConnectivityEndpoints) + populate(objectMap, "containers", c.Containers) + populate(objectMap, "createdBy", c.CreatedBy) + populate(objectMap, "customServices", c.CustomServices) + populate(objectMap, "dataDisks", c.DataDisks) + populate(objectMap, "dataMounts", c.DataMounts) + populate(objectMap, "enableNodePublicIp", c.EnableNodePublicIP) + populate(objectMap, "errors", c.Errors) + populate(objectMap, "idleTimeBeforeShutdown", c.IdleTimeBeforeShutdown) + populate(objectMap, "lastOperation", c.LastOperation) + populate(objectMap, "osImageMetadata", c.OSImageMetadata) + populate(objectMap, "personalComputeInstanceSettings", c.PersonalComputeInstanceSettings) + populate(objectMap, "sshSettings", c.SSHSettings) + populate(objectMap, "schedules", c.Schedules) + populate(objectMap, "setupScripts", c.SetupScripts) + populate(objectMap, "state", c.State) + populate(objectMap, "subnet", c.Subnet) + populate(objectMap, "vmSize", c.VMSize) + populate(objectMap, "versions", c.Versions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceProperties. +func (c *ComputeInstanceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationSharingPolicy": + err = unpopulate(val, "ApplicationSharingPolicy", &c.ApplicationSharingPolicy) + delete(rawMsg, key) + case "applications": + err = unpopulate(val, "Applications", &c.Applications) + delete(rawMsg, key) + case "autologgerSettings": + err = unpopulate(val, "AutologgerSettings", &c.AutologgerSettings) + delete(rawMsg, key) + case "computeInstanceAuthorizationType": + err = unpopulate(val, "ComputeInstanceAuthorizationType", &c.ComputeInstanceAuthorizationType) + delete(rawMsg, key) + case "connectivityEndpoints": + err = unpopulate(val, "ConnectivityEndpoints", &c.ConnectivityEndpoints) + delete(rawMsg, key) + case "containers": + err = unpopulate(val, "Containers", &c.Containers) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &c.CreatedBy) + delete(rawMsg, key) + case "customServices": + err = unpopulate(val, "CustomServices", &c.CustomServices) + delete(rawMsg, key) + case "dataDisks": + err = unpopulate(val, "DataDisks", &c.DataDisks) + delete(rawMsg, key) + case "dataMounts": + err = unpopulate(val, "DataMounts", &c.DataMounts) + delete(rawMsg, key) + case "enableNodePublicIp": + err = unpopulate(val, "EnableNodePublicIP", &c.EnableNodePublicIP) + delete(rawMsg, key) + case "errors": + err = unpopulate(val, "Errors", &c.Errors) + delete(rawMsg, key) + case "idleTimeBeforeShutdown": + err = unpopulate(val, "IdleTimeBeforeShutdown", &c.IdleTimeBeforeShutdown) + delete(rawMsg, key) + case "lastOperation": + err = unpopulate(val, "LastOperation", &c.LastOperation) + delete(rawMsg, key) + case "osImageMetadata": + err = unpopulate(val, "OSImageMetadata", &c.OSImageMetadata) + delete(rawMsg, key) + case "personalComputeInstanceSettings": + err = unpopulate(val, "PersonalComputeInstanceSettings", &c.PersonalComputeInstanceSettings) + delete(rawMsg, key) + case "sshSettings": + err = unpopulate(val, "SSHSettings", &c.SSHSettings) + delete(rawMsg, key) + case "schedules": + err = unpopulate(val, "Schedules", &c.Schedules) + delete(rawMsg, key) + case "setupScripts": + err = unpopulate(val, "SetupScripts", &c.SetupScripts) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &c.State) + delete(rawMsg, key) + case "subnet": + err = unpopulate(val, "Subnet", &c.Subnet) + delete(rawMsg, key) + case "vmSize": + err = unpopulate(val, "VMSize", &c.VMSize) + delete(rawMsg, key) + case "versions": + err = unpopulate(val, "Versions", &c.Versions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceSSHSettings. +func (c ComputeInstanceSSHSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "adminPublicKey", c.AdminPublicKey) + populate(objectMap, "adminUserName", c.AdminUserName) + populate(objectMap, "sshPort", c.SSHPort) + populate(objectMap, "sshPublicAccess", c.SSHPublicAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceSSHSettings. +func (c *ComputeInstanceSSHSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminPublicKey": + err = unpopulate(val, "AdminPublicKey", &c.AdminPublicKey) + delete(rawMsg, key) + case "adminUserName": + err = unpopulate(val, "AdminUserName", &c.AdminUserName) + delete(rawMsg, key) + case "sshPort": + err = unpopulate(val, "SSHPort", &c.SSHPort) + delete(rawMsg, key) + case "sshPublicAccess": + err = unpopulate(val, "SSHPublicAccess", &c.SSHPublicAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceSchema. +func (c ComputeInstanceSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceSchema. +func (c *ComputeInstanceSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &c.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceVersion. +func (c ComputeInstanceVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "runtime", c.Runtime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceVersion. +func (c *ComputeInstanceVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "runtime": + err = unpopulate(val, "Runtime", &c.Runtime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeResource. +func (c ComputeResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", c.ID) + populate(objectMap, "identity", c.Identity) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "sku", c.SKU) + populate(objectMap, "systemData", c.SystemData) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeResource. +func (c *ComputeResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &c.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &c.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "properties": + c.Properties, err = unmarshalComputeClassification(val) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &c.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &c.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &c.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &c.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeResourceSchema. +func (c ComputeResourceSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", c.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeResourceSchema. +func (c *ComputeResourceSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + c.Properties, err = unmarshalComputeClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeSchedules. +func (c ComputeSchedules) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeStartStop", c.ComputeStartStop) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeSchedules. +func (c *ComputeSchedules) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeStartStop": + err = unpopulate(val, "ComputeStartStop", &c.ComputeStartStop) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeSecrets. +func (c ComputeSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["computeType"] = c.ComputeType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeSecrets. +func (c *ComputeSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeType": + err = unpopulate(val, "ComputeType", &c.ComputeType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ComputeStartStopSchedule. +func (c ComputeStartStopSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", c.Action) + populate(objectMap, "cron", c.Cron) + populate(objectMap, "id", c.ID) + populate(objectMap, "provisioningStatus", c.ProvisioningStatus) + populate(objectMap, "recurrence", c.Recurrence) + populate(objectMap, "schedule", c.Schedule) + populate(objectMap, "status", c.Status) + populate(objectMap, "triggerType", c.TriggerType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeStartStopSchedule. +func (c *ComputeStartStopSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, "Action", &c.Action) + delete(rawMsg, key) + case "cron": + err = unpopulate(val, "Cron", &c.Cron) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "provisioningStatus": + err = unpopulate(val, "ProvisioningStatus", &c.ProvisioningStatus) + delete(rawMsg, key) + case "recurrence": + err = unpopulate(val, "Recurrence", &c.Recurrence) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &c.Schedule) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &c.Status) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &c.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerResourceRequirements. +func (c ContainerResourceRequirements) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containerResourceLimits", c.ContainerResourceLimits) + populate(objectMap, "containerResourceRequests", c.ContainerResourceRequests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResourceRequirements. +func (c *ContainerResourceRequirements) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerResourceLimits": + err = unpopulate(val, "ContainerResourceLimits", &c.ContainerResourceLimits) + delete(rawMsg, key) + case "containerResourceRequests": + err = unpopulate(val, "ContainerResourceRequests", &c.ContainerResourceRequests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerResourceSettings. +func (c ContainerResourceSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cpu", c.CPU) + populate(objectMap, "gpu", c.Gpu) + populate(objectMap, "memory", c.Memory) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ContainerResourceSettings. +func (c *ContainerResourceSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cpu": + err = unpopulate(val, "CPU", &c.CPU) + delete(rawMsg, key) + case "gpu": + err = unpopulate(val, "Gpu", &c.Gpu) + delete(rawMsg, key) + case "memory": + err = unpopulate(val, "Memory", &c.Memory) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CosmosDbSettings. +func (c CosmosDbSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "collectionsThroughput", c.CollectionsThroughput) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CosmosDbSettings. +func (c *CosmosDbSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "collectionsThroughput": + err = unpopulate(val, "CollectionsThroughput", &c.CollectionsThroughput) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Cron. +func (c Cron) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "expression", c.Expression) + populate(objectMap, "startTime", c.StartTime) + populate(objectMap, "timeZone", c.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Cron. +func (c *Cron) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "expression": + err = unpopulate(val, "Expression", &c.Expression) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &c.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CronTrigger. +func (c CronTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endTime", c.EndTime) + populate(objectMap, "expression", c.Expression) + populate(objectMap, "startTime", c.StartTime) + populate(objectMap, "timeZone", c.TimeZone) + objectMap["triggerType"] = TriggerTypeCron + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CronTrigger. +func (c *CronTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &c.EndTime) + delete(rawMsg, key) + case "expression": + err = unpopulate(val, "Expression", &c.Expression) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &c.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &c.TimeZone) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &c.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomForecastHorizon. +func (c CustomForecastHorizon) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = ForecastHorizonModeCustom + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomForecastHorizon. +func (c *CustomForecastHorizon) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomModelJobInput. +func (c CustomModelJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", c.Description) + objectMap["jobInputType"] = JobInputTypeCustomModel + populate(objectMap, "mode", c.Mode) + populate(objectMap, "uri", c.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobInput. +func (c *CustomModelJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &c.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomModelJobOutput. +func (c CustomModelJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetName", c.AssetName) + populate(objectMap, "assetVersion", c.AssetVersion) + populate(objectMap, "description", c.Description) + objectMap["jobOutputType"] = JobOutputTypeCustomModel + populate(objectMap, "mode", c.Mode) + populate(objectMap, "uri", c.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobOutput. +func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetName": + err = unpopulate(val, "AssetName", &c.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &c.AssetVersion) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &c.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &c.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomNCrossValidations. +func (c CustomNCrossValidations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = NCrossValidationsModeCustom + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomNCrossValidations. +func (c *CustomNCrossValidations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomSeasonality. +func (c CustomSeasonality) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = SeasonalityModeCustom + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomSeasonality. +func (c *CustomSeasonality) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomService. +func (c CustomService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "docker", c.Docker) + populate(objectMap, "endpoints", c.Endpoints) + populate(objectMap, "environmentVariables", c.EnvironmentVariables) + populate(objectMap, "image", c.Image) + populate(objectMap, "name", c.Name) + populate(objectMap, "volumes", c.Volumes) + if c.AdditionalProperties != nil { + for key, val := range c.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomService. +func (c *CustomService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "docker": + err = unpopulate(val, "Docker", &c.Docker) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &c.Endpoints) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &c.EnvironmentVariables) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &c.Image) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "volumes": + err = unpopulate(val, "Volumes", &c.Volumes) + delete(rawMsg, key) + default: + if c.AdditionalProperties == nil { + c.AdditionalProperties = map[string]interface{}{} + } + if val != nil { + var aux interface{} + err = json.Unmarshal(val, &aux) + c.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomTargetLags. +func (c CustomTargetLags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = TargetLagsModeCustom + populate(objectMap, "values", c.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomTargetLags. +func (c *CustomTargetLags) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &c.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type CustomTargetRollingWindowSize. +func (c CustomTargetRollingWindowSize) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = TargetRollingWindowSizeModeCustom + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomTargetRollingWindowSize. +func (c *CustomTargetRollingWindowSize) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &c.Mode) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &c.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataContainer. +func (d DataContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataContainer. +func (d *DataContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataContainerProperties. +func (d DataContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dataType", d.DataType) + populate(objectMap, "description", d.Description) + populate(objectMap, "isArchived", d.IsArchived) + populate(objectMap, "latestVersion", d.LatestVersion) + populate(objectMap, "nextVersion", d.NextVersion) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataContainerProperties. +func (d *DataContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &d.DataType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &d.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &d.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &d.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataContainerResourceArmPaginatedResult. +func (d DataContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataContainerResourceArmPaginatedResult. +func (d *DataContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataFactory. +func (d DataFactory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", d.ComputeLocation) + objectMap["computeType"] = ComputeTypeDataFactory + populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) + populate(objectMap, "description", d.Description) + populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", d.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", d.ModifiedOn) + populate(objectMap, "provisioningErrors", d.ProvisioningErrors) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "resourceId", d.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataFactory. +func (d *DataFactory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &d.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &d.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &d.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &d.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &d.ModifiedOn) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &d.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataLakeAnalytics. +func (d DataLakeAnalytics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", d.ComputeLocation) + objectMap["computeType"] = ComputeTypeDataLakeAnalytics + populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) + populate(objectMap, "description", d.Description) + populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", d.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", d.ModifiedOn) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "provisioningErrors", d.ProvisioningErrors) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "resourceId", d.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataLakeAnalytics. +func (d *DataLakeAnalytics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &d.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &d.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &d.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &d.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &d.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &d.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataLakeAnalyticsSchema. +func (d DataLakeAnalyticsSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataLakeAnalyticsSchema. +func (d *DataLakeAnalyticsSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataLakeAnalyticsSchemaProperties. +func (d DataLakeAnalyticsSchemaProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dataLakeStoreAccountName", d.DataLakeStoreAccountName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataLakeAnalyticsSchemaProperties. +func (d *DataLakeAnalyticsSchemaProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataLakeStoreAccountName": + err = unpopulate(val, "DataLakeStoreAccountName", &d.DataLakeStoreAccountName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataPathAssetReference. +func (d DataPathAssetReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "datastoreId", d.DatastoreID) + populate(objectMap, "path", d.Path) + objectMap["referenceType"] = ReferenceTypeDataPath + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataPathAssetReference. +func (d *DataPathAssetReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datastoreId": + err = unpopulate(val, "DatastoreID", &d.DatastoreID) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &d.Path) + delete(rawMsg, key) + case "referenceType": + err = unpopulate(val, "ReferenceType", &d.ReferenceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataVersionBase. +func (d DataVersionBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataVersionBase. +func (d *DataVersionBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + d.Properties, err = unmarshalDataVersionBasePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataVersionBaseProperties. +func (d DataVersionBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["dataType"] = d.DataType + populate(objectMap, "dataUri", d.DataURI) + populate(objectMap, "description", d.Description) + populate(objectMap, "isAnonymous", d.IsAnonymous) + populate(objectMap, "isArchived", d.IsArchived) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataVersionBaseProperties. +func (d *DataVersionBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &d.DataType) + delete(rawMsg, key) + case "dataUri": + err = unpopulate(val, "DataURI", &d.DataURI) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &d.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &d.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DataVersionBaseResourceArmPaginatedResult. +func (d DataVersionBaseResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DataVersionBaseResourceArmPaginatedResult. +func (d *DataVersionBaseResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Databricks. +func (d Databricks) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", d.ComputeLocation) + objectMap["computeType"] = ComputeTypeDatabricks + populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) + populate(objectMap, "description", d.Description) + populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", d.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", d.ModifiedOn) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "provisioningErrors", d.ProvisioningErrors) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "resourceId", d.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Databricks. +func (d *Databricks) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &d.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &d.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &d.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &d.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &d.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &d.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabricksComputeSecrets. +func (d DatabricksComputeSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["computeType"] = ComputeTypeDatabricks + populate(objectMap, "databricksAccessToken", d.DatabricksAccessToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabricksComputeSecrets. +func (d *DatabricksComputeSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeType": + err = unpopulate(val, "ComputeType", &d.ComputeType) + delete(rawMsg, key) + case "databricksAccessToken": + err = unpopulate(val, "DatabricksAccessToken", &d.DatabricksAccessToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabricksComputeSecretsProperties. +func (d DatabricksComputeSecretsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "databricksAccessToken", d.DatabricksAccessToken) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabricksComputeSecretsProperties. +func (d *DatabricksComputeSecretsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databricksAccessToken": + err = unpopulate(val, "DatabricksAccessToken", &d.DatabricksAccessToken) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabricksProperties. +func (d DatabricksProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "databricksAccessToken", d.DatabricksAccessToken) + populate(objectMap, "workspaceUrl", d.WorkspaceURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabricksProperties. +func (d *DatabricksProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "databricksAccessToken": + err = unpopulate(val, "DatabricksAccessToken", &d.DatabricksAccessToken) + delete(rawMsg, key) + case "workspaceUrl": + err = unpopulate(val, "WorkspaceURL", &d.WorkspaceURL) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatabricksSchema. +func (d DatabricksSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatabricksSchema. +func (d *DatabricksSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatasetExportSummary. +func (d DatasetExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endDateTime", d.EndDateTime) + populate(objectMap, "exportedRowCount", d.ExportedRowCount) + objectMap["format"] = ExportFormatTypeDataset + populate(objectMap, "labeledAssetName", d.LabeledAssetName) + populate(objectMap, "labelingJobId", d.LabelingJobID) + populateTimeRFC3339(objectMap, "startDateTime", d.StartDateTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatasetExportSummary. +func (d *DatasetExportSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endDateTime": + err = unpopulateTimeRFC3339(val, "EndDateTime", &d.EndDateTime) + delete(rawMsg, key) + case "exportedRowCount": + err = unpopulate(val, "ExportedRowCount", &d.ExportedRowCount) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &d.Format) + delete(rawMsg, key) + case "labeledAssetName": + err = unpopulate(val, "LabeledAssetName", &d.LabeledAssetName) + delete(rawMsg, key) + case "labelingJobId": + err = unpopulate(val, "LabelingJobID", &d.LabelingJobID) + delete(rawMsg, key) + case "startDateTime": + err = unpopulateTimeRFC3339(val, "StartDateTime", &d.StartDateTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Datastore. +func (d Datastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", d.ID) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "systemData", d.SystemData) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Datastore. +func (d *Datastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &d.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &d.Name) + delete(rawMsg, key) + case "properties": + d.Properties, err = unmarshalDatastorePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &d.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &d.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatastoreCredentials. +func (d DatastoreCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["credentialsType"] = d.CredentialsType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreCredentials. +func (d *DatastoreCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialsType": + err = unpopulate(val, "CredentialsType", &d.CredentialsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatastoreProperties. +func (d DatastoreProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "credentials", d.Credentials) + objectMap["datastoreType"] = d.DatastoreType + populate(objectMap, "description", d.Description) + populate(objectMap, "isDefault", d.IsDefault) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreProperties. +func (d *DatastoreProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + d.Credentials, err = unmarshalDatastoreCredentialsClassification(val) + delete(rawMsg, key) + case "datastoreType": + err = unpopulate(val, "DatastoreType", &d.DatastoreType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &d.Description) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &d.IsDefault) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &d.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatastoreResourceArmPaginatedResult. +func (d DatastoreResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreResourceArmPaginatedResult. +func (d *DatastoreResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &d.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DatastoreSecrets. +func (d DatastoreSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["secretsType"] = d.SecretsType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreSecrets. +func (d *DatastoreSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "secretsType": + err = unpopulate(val, "SecretsType", &d.SecretsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DefaultScaleSettings. +func (d DefaultScaleSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["scaleType"] = ScaleTypeDefault + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultScaleSettings. +func (d *DefaultScaleSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scaleType": + err = unpopulate(val, "ScaleType", &d.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentLogs. +func (d DeploymentLogs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "content", d.Content) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentLogs. +func (d *DeploymentLogs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "content": + err = unpopulate(val, "Content", &d.Content) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentLogsRequest. +func (d DeploymentLogsRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containerType", d.ContainerType) + populate(objectMap, "tail", d.Tail) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentLogsRequest. +func (d *DeploymentLogsRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "containerType": + err = unpopulate(val, "ContainerType", &d.ContainerType) + delete(rawMsg, key) + case "tail": + err = unpopulate(val, "Tail", &d.Tail) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DeploymentResourceConfiguration. +func (d DeploymentResourceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "instanceCount", d.InstanceCount) + populate(objectMap, "instanceType", d.InstanceType) + populate(objectMap, "properties", d.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DeploymentResourceConfiguration. +func (d *DeploymentResourceConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceCount": + err = unpopulate(val, "InstanceCount", &d.InstanceCount) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &d.InstanceType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &d.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnoseRequestProperties. +func (d DiagnoseRequestProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationInsights", d.ApplicationInsights) + populate(objectMap, "containerRegistry", d.ContainerRegistry) + populate(objectMap, "dnsResolution", d.DNSResolution) + populate(objectMap, "keyVault", d.KeyVault) + populate(objectMap, "nsg", d.Nsg) + populate(objectMap, "others", d.Others) + populate(objectMap, "resourceLock", d.ResourceLock) + populate(objectMap, "storageAccount", d.StorageAccount) + populate(objectMap, "udr", d.Udr) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnoseRequestProperties. +func (d *DiagnoseRequestProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationInsights": + err = unpopulate(val, "ApplicationInsights", &d.ApplicationInsights) + delete(rawMsg, key) + case "containerRegistry": + err = unpopulate(val, "ContainerRegistry", &d.ContainerRegistry) + delete(rawMsg, key) + case "dnsResolution": + err = unpopulate(val, "DNSResolution", &d.DNSResolution) + delete(rawMsg, key) + case "keyVault": + err = unpopulate(val, "KeyVault", &d.KeyVault) + delete(rawMsg, key) + case "nsg": + err = unpopulate(val, "Nsg", &d.Nsg) + delete(rawMsg, key) + case "others": + err = unpopulate(val, "Others", &d.Others) + delete(rawMsg, key) + case "resourceLock": + err = unpopulate(val, "ResourceLock", &d.ResourceLock) + delete(rawMsg, key) + case "storageAccount": + err = unpopulate(val, "StorageAccount", &d.StorageAccount) + delete(rawMsg, key) + case "udr": + err = unpopulate(val, "Udr", &d.Udr) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnoseResponseResult. +func (d DiagnoseResponseResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnoseResponseResult. +func (d *DiagnoseResponseResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnoseResponseResultValue. +func (d DiagnoseResponseResultValue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationInsightsResults", d.ApplicationInsightsResults) + populate(objectMap, "containerRegistryResults", d.ContainerRegistryResults) + populate(objectMap, "dnsResolutionResults", d.DNSResolutionResults) + populate(objectMap, "keyVaultResults", d.KeyVaultResults) + populate(objectMap, "networkSecurityRuleResults", d.NetworkSecurityRuleResults) + populate(objectMap, "otherResults", d.OtherResults) + populate(objectMap, "resourceLockResults", d.ResourceLockResults) + populate(objectMap, "storageAccountResults", d.StorageAccountResults) + populate(objectMap, "userDefinedRouteResults", d.UserDefinedRouteResults) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnoseResponseResultValue. +func (d *DiagnoseResponseResultValue) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationInsightsResults": + err = unpopulate(val, "ApplicationInsightsResults", &d.ApplicationInsightsResults) + delete(rawMsg, key) + case "containerRegistryResults": + err = unpopulate(val, "ContainerRegistryResults", &d.ContainerRegistryResults) + delete(rawMsg, key) + case "dnsResolutionResults": + err = unpopulate(val, "DNSResolutionResults", &d.DNSResolutionResults) + delete(rawMsg, key) + case "keyVaultResults": + err = unpopulate(val, "KeyVaultResults", &d.KeyVaultResults) + delete(rawMsg, key) + case "networkSecurityRuleResults": + err = unpopulate(val, "NetworkSecurityRuleResults", &d.NetworkSecurityRuleResults) + delete(rawMsg, key) + case "otherResults": + err = unpopulate(val, "OtherResults", &d.OtherResults) + delete(rawMsg, key) + case "resourceLockResults": + err = unpopulate(val, "ResourceLockResults", &d.ResourceLockResults) + delete(rawMsg, key) + case "storageAccountResults": + err = unpopulate(val, "StorageAccountResults", &d.StorageAccountResults) + delete(rawMsg, key) + case "userDefinedRouteResults": + err = unpopulate(val, "UserDefinedRouteResults", &d.UserDefinedRouteResults) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnoseResult. +func (d DiagnoseResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", d.Code) + populate(objectMap, "level", d.Level) + populate(objectMap, "message", d.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnoseResult. +func (d *DiagnoseResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &d.Code) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &d.Level) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &d.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DiagnoseWorkspaceParameters. +func (d DiagnoseWorkspaceParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DiagnoseWorkspaceParameters. +func (d *DiagnoseWorkspaceParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &d.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type DistributionConfiguration. +func (d DistributionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["distributionType"] = d.DistributionType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DistributionConfiguration. +func (d *DistributionConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "distributionType": + err = unpopulate(val, "DistributionType", &d.DistributionType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Docker. +func (d Docker) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privileged", d.Privileged) + if d.AdditionalProperties != nil { + for key, val := range d.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Docker. +func (d *Docker) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privileged": + err = unpopulate(val, "Privileged", &d.Privileged) + delete(rawMsg, key) + default: + if d.AdditionalProperties == nil { + d.AdditionalProperties = map[string]interface{}{} + } + if val != nil { + var aux interface{} + err = json.Unmarshal(val, &aux) + d.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EarlyTerminationPolicy. +func (e EarlyTerminationPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "delayEvaluation", e.DelayEvaluation) + populate(objectMap, "evaluationInterval", e.EvaluationInterval) + objectMap["policyType"] = e.PolicyType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EarlyTerminationPolicy. +func (e *EarlyTerminationPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delayEvaluation": + err = unpopulate(val, "DelayEvaluation", &e.DelayEvaluation) + delete(rawMsg, key) + case "evaluationInterval": + err = unpopulate(val, "EvaluationInterval", &e.EvaluationInterval) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &e.PolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionKeyVaultProperties. +func (e EncryptionKeyVaultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identityClientId", e.IdentityClientID) + populate(objectMap, "keyIdentifier", e.KeyIdentifier) + populate(objectMap, "keyVaultArmId", e.KeyVaultArmID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionKeyVaultProperties. +func (e *EncryptionKeyVaultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityClientId": + err = unpopulate(val, "IdentityClientID", &e.IdentityClientID) + delete(rawMsg, key) + case "keyIdentifier": + err = unpopulate(val, "KeyIdentifier", &e.KeyIdentifier) + delete(rawMsg, key) + case "keyVaultArmId": + err = unpopulate(val, "KeyVaultArmID", &e.KeyVaultArmID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionKeyVaultUpdateProperties. +func (e EncryptionKeyVaultUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "keyIdentifier", e.KeyIdentifier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionKeyVaultUpdateProperties. +func (e *EncryptionKeyVaultUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyIdentifier": + err = unpopulate(val, "KeyIdentifier", &e.KeyIdentifier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionProperty. +func (e EncryptionProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", e.Identity) + populate(objectMap, "keyVaultProperties", e.KeyVaultProperties) + populate(objectMap, "status", e.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionProperty. +func (e *EncryptionProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &e.Identity) + delete(rawMsg, key) + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &e.KeyVaultProperties) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &e.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EncryptionUpdateProperties. +func (e EncryptionUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "keyVaultProperties", e.KeyVaultProperties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EncryptionUpdateProperties. +func (e *EncryptionUpdateProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyVaultProperties": + err = unpopulate(val, "KeyVaultProperties", &e.KeyVaultProperties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Endpoint. +func (e Endpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hostIp", e.HostIP) + populate(objectMap, "name", e.Name) + populate(objectMap, "protocol", e.Protocol) + populate(objectMap, "published", e.Published) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Endpoint. +func (e *Endpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostIp": + err = unpopulate(val, "HostIP", &e.HostIP) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &e.Protocol) + delete(rawMsg, key) + case "published": + err = unpopulate(val, "Published", &e.Published) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointAuthKeys. +func (e EndpointAuthKeys) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "primaryKey", e.PrimaryKey) + populate(objectMap, "secondaryKey", e.SecondaryKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointAuthKeys. +func (e *EndpointAuthKeys) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primaryKey": + err = unpopulate(val, "PrimaryKey", &e.PrimaryKey) + delete(rawMsg, key) + case "secondaryKey": + err = unpopulate(val, "SecondaryKey", &e.SecondaryKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointAuthToken. +func (e EndpointAuthToken) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessToken", e.AccessToken) + populate(objectMap, "expiryTimeUtc", e.ExpiryTimeUTC) + populate(objectMap, "refreshAfterTimeUtc", e.RefreshAfterTimeUTC) + populate(objectMap, "tokenType", e.TokenType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointAuthToken. +func (e *EndpointAuthToken) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessToken": + err = unpopulate(val, "AccessToken", &e.AccessToken) + delete(rawMsg, key) + case "expiryTimeUtc": + err = unpopulate(val, "ExpiryTimeUTC", &e.ExpiryTimeUTC) + delete(rawMsg, key) + case "refreshAfterTimeUtc": + err = unpopulate(val, "RefreshAfterTimeUTC", &e.RefreshAfterTimeUTC) + delete(rawMsg, key) + case "tokenType": + err = unpopulate(val, "TokenType", &e.TokenType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointDeploymentPropertiesBase. +func (e EndpointDeploymentPropertiesBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "codeConfiguration", e.CodeConfiguration) + populate(objectMap, "description", e.Description) + populate(objectMap, "environmentId", e.EnvironmentID) + populate(objectMap, "environmentVariables", e.EnvironmentVariables) + populate(objectMap, "properties", e.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointDeploymentPropertiesBase. +func (e *EndpointDeploymentPropertiesBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &e.CodeConfiguration) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &e.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &e.EnvironmentVariables) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesBase. +func (e EndpointPropertiesBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authMode", e.AuthMode) + populate(objectMap, "description", e.Description) + populate(objectMap, "keys", e.Keys) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "scoringUri", e.ScoringURI) + populate(objectMap, "swaggerUri", e.SwaggerURI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointPropertiesBase. +func (e *EndpointPropertiesBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authMode": + err = unpopulate(val, "AuthMode", &e.AuthMode) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "keys": + err = unpopulate(val, "Keys", &e.Keys) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "scoringUri": + err = unpopulate(val, "ScoringURI", &e.ScoringURI) + delete(rawMsg, key) + case "swaggerUri": + err = unpopulate(val, "SwaggerURI", &e.SwaggerURI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointScheduleAction. +func (e EndpointScheduleAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["actionType"] = ScheduleActionTypeInvokeBatchEndpoint + populate(objectMap, "endpointInvocationDefinition", &e.EndpointInvocationDefinition) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EndpointScheduleAction. +func (e *EndpointScheduleAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &e.ActionType) + delete(rawMsg, key) + case "endpointInvocationDefinition": + err = unpopulate(val, "EndpointInvocationDefinition", &e.EndpointInvocationDefinition) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentContainer. +func (e EnvironmentContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentContainer. +func (e *EnvironmentContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentContainerProperties. +func (e EnvironmentContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", e.Description) + populate(objectMap, "isArchived", e.IsArchived) + populate(objectMap, "latestVersion", e.LatestVersion) + populate(objectMap, "nextVersion", e.NextVersion) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "tags", e.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentContainerProperties. +func (e *EnvironmentContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &e.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &e.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &e.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentContainerResourceArmPaginatedResult. +func (e EnvironmentContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentContainerResourceArmPaginatedResult. +func (e *EnvironmentContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable. +func (e EnvironmentVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "type", e.Type) + populate(objectMap, "value", e.Value) + if e.AdditionalProperties != nil { + for key, val := range e.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVariable. +func (e *EnvironmentVariable) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + default: + if e.AdditionalProperties == nil { + e.AdditionalProperties = map[string]interface{}{} + } + if val != nil { + var aux interface{} + err = json.Unmarshal(val, &aux) + e.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersion. +func (e EnvironmentVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", e.ID) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "systemData", e.SystemData) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVersion. +func (e *EnvironmentVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &e.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &e.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &e.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersionProperties. +func (e EnvironmentVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "autoRebuild", e.AutoRebuild) + populate(objectMap, "build", e.Build) + populate(objectMap, "condaFile", e.CondaFile) + populate(objectMap, "description", e.Description) + populate(objectMap, "environmentType", e.EnvironmentType) + populate(objectMap, "image", e.Image) + populate(objectMap, "inferenceConfig", e.InferenceConfig) + populate(objectMap, "isAnonymous", e.IsAnonymous) + populate(objectMap, "isArchived", e.IsArchived) + populate(objectMap, "osType", e.OSType) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "tags", e.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVersionProperties. +func (e *EnvironmentVersionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoRebuild": + err = unpopulate(val, "AutoRebuild", &e.AutoRebuild) + delete(rawMsg, key) + case "build": + err = unpopulate(val, "Build", &e.Build) + delete(rawMsg, key) + case "condaFile": + err = unpopulate(val, "CondaFile", &e.CondaFile) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &e.Description) + delete(rawMsg, key) + case "environmentType": + err = unpopulate(val, "EnvironmentType", &e.EnvironmentType) + delete(rawMsg, key) + case "image": + err = unpopulate(val, "Image", &e.Image) + delete(rawMsg, key) + case "inferenceConfig": + err = unpopulate(val, "InferenceConfig", &e.InferenceConfig) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &e.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &e.IsArchived) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &e.OSType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &e.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &e.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersionResourceArmPaginatedResult. +func (e EnvironmentVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EnvironmentVersionResourceArmPaginatedResult. +func (e *EnvironmentVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &e.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. +func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "info", &e.Info) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. +func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "info": + err = unpopulate(val, "Info", &e.Info) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &e.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. +func (e ErrorDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "additionalInfo", e.AdditionalInfo) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. +func (e *ErrorDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "additionalInfo": + err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) + delete(rawMsg, key) + case "code": + err = unpopulate(val, "Code", &e.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &e.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &e.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &e.Target) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ErrorResponse. +func (e ErrorResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "error", e.Error) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse. +func (e *ErrorResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "error": + err = unpopulate(val, "Error", &e.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EstimatedVMPrice. +func (e EstimatedVMPrice) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "osType", e.OSType) + populate(objectMap, "retailPrice", e.RetailPrice) + populate(objectMap, "vmTier", e.VMTier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EstimatedVMPrice. +func (e *EstimatedVMPrice) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "osType": + err = unpopulate(val, "OSType", &e.OSType) + delete(rawMsg, key) + case "retailPrice": + err = unpopulate(val, "RetailPrice", &e.RetailPrice) + delete(rawMsg, key) + case "vmTier": + err = unpopulate(val, "VMTier", &e.VMTier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EstimatedVMPrices. +func (e EstimatedVMPrices) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "billingCurrency", e.BillingCurrency) + populate(objectMap, "unitOfMeasure", e.UnitOfMeasure) + populate(objectMap, "values", e.Values) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EstimatedVMPrices. +func (e *EstimatedVMPrices) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "billingCurrency": + err = unpopulate(val, "BillingCurrency", &e.BillingCurrency) + delete(rawMsg, key) + case "unitOfMeasure": + err = unpopulate(val, "UnitOfMeasure", &e.UnitOfMeasure) + delete(rawMsg, key) + case "values": + err = unpopulate(val, "Values", &e.Values) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExportSummary. +func (e ExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "endDateTime", e.EndDateTime) + populate(objectMap, "exportedRowCount", e.ExportedRowCount) + objectMap["format"] = e.Format + populate(objectMap, "labelingJobId", e.LabelingJobID) + populateTimeRFC3339(objectMap, "startDateTime", e.StartDateTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExportSummary. +func (e *ExportSummary) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endDateTime": + err = unpopulateTimeRFC3339(val, "EndDateTime", &e.EndDateTime) + delete(rawMsg, key) + case "exportedRowCount": + err = unpopulate(val, "ExportedRowCount", &e.ExportedRowCount) + delete(rawMsg, key) + case "format": + err = unpopulate(val, "Format", &e.Format) + delete(rawMsg, key) + case "labelingJobId": + err = unpopulate(val, "LabelingJobID", &e.LabelingJobID) + delete(rawMsg, key) + case "startDateTime": + err = unpopulateTimeRFC3339(val, "StartDateTime", &e.StartDateTime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ExternalFQDNResponse. +func (e ExternalFQDNResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ExternalFQDNResponse. +func (e *ExternalFQDNResponse) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &e.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", e, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FQDNEndpoint. +func (f FQDNEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "domainName", f.DomainName) + populate(objectMap, "endpointDetails", f.EndpointDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FQDNEndpoint. +func (f *FQDNEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "domainName": + err = unpopulate(val, "DomainName", &f.DomainName) + delete(rawMsg, key) + case "endpointDetails": + err = unpopulate(val, "EndpointDetails", &f.EndpointDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FQDNEndpointDetail. +func (f FQDNEndpointDetail) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "port", f.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FQDNEndpointDetail. +func (f *FQDNEndpointDetail) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "port": + err = unpopulate(val, "Port", &f.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FQDNEndpoints. +func (f FQDNEndpoints) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", f.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FQDNEndpoints. +func (f *FQDNEndpoints) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FQDNEndpointsProperties. +func (f FQDNEndpointsProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "category", f.Category) + populate(objectMap, "endpoints", f.Endpoints) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FQDNEndpointsProperties. +func (f *FQDNEndpointsProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "category": + err = unpopulate(val, "Category", &f.Category) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, "Endpoints", &f.Endpoints) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FeaturizationSettings. +func (f FeaturizationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "datasetLanguage", f.DatasetLanguage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturizationSettings. +func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasetLanguage": + err = unpopulate(val, "DatasetLanguage", &f.DatasetLanguage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FlavorData. +func (f FlavorData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "data", f.Data) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FlavorData. +func (f *FlavorData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "data": + err = unpopulate(val, "Data", &f.Data) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForecastHorizon. +func (f ForecastHorizon) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = f.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastHorizon. +func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &f.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Forecasting. +func (f Forecasting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cvSplitColumnNames", f.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", f.FeaturizationSettings) + populate(objectMap, "fixedParameters", f.FixedParameters) + populate(objectMap, "forecastingSettings", f.ForecastingSettings) + populate(objectMap, "limitSettings", f.LimitSettings) + populate(objectMap, "logVerbosity", f.LogVerbosity) + populate(objectMap, "nCrossValidations", f.NCrossValidations) + populate(objectMap, "primaryMetric", f.PrimaryMetric) + populate(objectMap, "searchSpace", f.SearchSpace) + populate(objectMap, "sweepSettings", f.SweepSettings) + populate(objectMap, "targetColumnName", f.TargetColumnName) + objectMap["taskType"] = TaskTypeForecasting + populate(objectMap, "testData", f.TestData) + populate(objectMap, "testDataSize", f.TestDataSize) + populate(objectMap, "trainingData", f.TrainingData) + populate(objectMap, "trainingSettings", f.TrainingSettings) + populate(objectMap, "validationData", f.ValidationData) + populate(objectMap, "validationDataSize", f.ValidationDataSize) + populate(objectMap, "weightColumnName", f.WeightColumnName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Forecasting. +func (f *Forecasting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cvSplitColumnNames": + err = unpopulate(val, "CvSplitColumnNames", &f.CvSplitColumnNames) + delete(rawMsg, key) + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &f.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &f.FixedParameters) + delete(rawMsg, key) + case "forecastingSettings": + err = unpopulate(val, "ForecastingSettings", &f.ForecastingSettings) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &f.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &f.LogVerbosity) + delete(rawMsg, key) + case "nCrossValidations": + f.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &f.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &f.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &f.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &f.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &f.TaskType) + delete(rawMsg, key) + case "testData": + err = unpopulate(val, "TestData", &f.TestData) + delete(rawMsg, key) + case "testDataSize": + err = unpopulate(val, "TestDataSize", &f.TestDataSize) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &f.TrainingData) + delete(rawMsg, key) + case "trainingSettings": + err = unpopulate(val, "TrainingSettings", &f.TrainingSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &f.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &f.ValidationDataSize) + delete(rawMsg, key) + case "weightColumnName": + err = unpopulate(val, "WeightColumnName", &f.WeightColumnName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForecastingSettings. +func (f ForecastingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "countryOrRegionForHolidays", f.CountryOrRegionForHolidays) + populate(objectMap, "cvStepSize", f.CvStepSize) + populate(objectMap, "featureLags", f.FeatureLags) + populate(objectMap, "forecastHorizon", f.ForecastHorizon) + populate(objectMap, "frequency", f.Frequency) + populate(objectMap, "seasonality", f.Seasonality) + populate(objectMap, "shortSeriesHandlingConfig", f.ShortSeriesHandlingConfig) + populate(objectMap, "targetAggregateFunction", f.TargetAggregateFunction) + populate(objectMap, "targetLags", f.TargetLags) + populate(objectMap, "targetRollingWindowSize", f.TargetRollingWindowSize) + populate(objectMap, "timeColumnName", f.TimeColumnName) + populate(objectMap, "timeSeriesIdColumnNames", f.TimeSeriesIDColumnNames) + populate(objectMap, "useStl", f.UseStl) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastingSettings. +func (f *ForecastingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "countryOrRegionForHolidays": + err = unpopulate(val, "CountryOrRegionForHolidays", &f.CountryOrRegionForHolidays) + delete(rawMsg, key) + case "cvStepSize": + err = unpopulate(val, "CvStepSize", &f.CvStepSize) + delete(rawMsg, key) + case "featureLags": + err = unpopulate(val, "FeatureLags", &f.FeatureLags) + delete(rawMsg, key) + case "forecastHorizon": + f.ForecastHorizon, err = unmarshalForecastHorizonClassification(val) + delete(rawMsg, key) + case "frequency": + err = unpopulate(val, "Frequency", &f.Frequency) + delete(rawMsg, key) + case "seasonality": + f.Seasonality, err = unmarshalSeasonalityClassification(val) + delete(rawMsg, key) + case "shortSeriesHandlingConfig": + err = unpopulate(val, "ShortSeriesHandlingConfig", &f.ShortSeriesHandlingConfig) + delete(rawMsg, key) + case "targetAggregateFunction": + err = unpopulate(val, "TargetAggregateFunction", &f.TargetAggregateFunction) + delete(rawMsg, key) + case "targetLags": + f.TargetLags, err = unmarshalTargetLagsClassification(val) + delete(rawMsg, key) + case "targetRollingWindowSize": + f.TargetRollingWindowSize, err = unmarshalTargetRollingWindowSizeClassification(val) + delete(rawMsg, key) + case "timeColumnName": + err = unpopulate(val, "TimeColumnName", &f.TimeColumnName) + delete(rawMsg, key) + case "timeSeriesIdColumnNames": + err = unpopulate(val, "TimeSeriesIDColumnNames", &f.TimeSeriesIDColumnNames) + delete(rawMsg, key) + case "useStl": + err = unpopulate(val, "UseStl", &f.UseStl) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForecastingTrainingSettings. +func (f ForecastingTrainingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedTrainingAlgorithms", f.AllowedTrainingAlgorithms) + populate(objectMap, "blockedTrainingAlgorithms", f.BlockedTrainingAlgorithms) + populate(objectMap, "enableDnnTraining", f.EnableDnnTraining) + populate(objectMap, "enableModelExplainability", f.EnableModelExplainability) + populate(objectMap, "enableOnnxCompatibleModels", f.EnableOnnxCompatibleModels) + populate(objectMap, "enableStackEnsemble", f.EnableStackEnsemble) + populate(objectMap, "enableVoteEnsemble", f.EnableVoteEnsemble) + populate(objectMap, "ensembleModelDownloadTimeout", f.EnsembleModelDownloadTimeout) + populate(objectMap, "stackEnsembleSettings", f.StackEnsembleSettings) + populate(objectMap, "trainingMode", f.TrainingMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastingTrainingSettings. +func (f *ForecastingTrainingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTrainingAlgorithms": + err = unpopulate(val, "AllowedTrainingAlgorithms", &f.AllowedTrainingAlgorithms) + delete(rawMsg, key) + case "blockedTrainingAlgorithms": + err = unpopulate(val, "BlockedTrainingAlgorithms", &f.BlockedTrainingAlgorithms) + delete(rawMsg, key) + case "enableDnnTraining": + err = unpopulate(val, "EnableDnnTraining", &f.EnableDnnTraining) + delete(rawMsg, key) + case "enableModelExplainability": + err = unpopulate(val, "EnableModelExplainability", &f.EnableModelExplainability) + delete(rawMsg, key) + case "enableOnnxCompatibleModels": + err = unpopulate(val, "EnableOnnxCompatibleModels", &f.EnableOnnxCompatibleModels) + delete(rawMsg, key) + case "enableStackEnsemble": + err = unpopulate(val, "EnableStackEnsemble", &f.EnableStackEnsemble) + delete(rawMsg, key) + case "enableVoteEnsemble": + err = unpopulate(val, "EnableVoteEnsemble", &f.EnableVoteEnsemble) + delete(rawMsg, key) + case "ensembleModelDownloadTimeout": + err = unpopulate(val, "EnsembleModelDownloadTimeout", &f.EnsembleModelDownloadTimeout) + delete(rawMsg, key) + case "stackEnsembleSettings": + err = unpopulate(val, "StackEnsembleSettings", &f.StackEnsembleSettings) + delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &f.TrainingMode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GridSamplingAlgorithm. +func (g GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeGrid + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GridSamplingAlgorithm. +func (g *GridSamplingAlgorithm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "samplingAlgorithmType": + err = unpopulate(val, "SamplingAlgorithmType", &g.SamplingAlgorithmType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HDInsight. +func (h HDInsight) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", h.ComputeLocation) + objectMap["computeType"] = ComputeTypeHDInsight + populateTimeRFC3339(objectMap, "createdOn", h.CreatedOn) + populate(objectMap, "description", h.Description) + populate(objectMap, "disableLocalAuth", h.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", h.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", h.ModifiedOn) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "provisioningErrors", h.ProvisioningErrors) + populate(objectMap, "provisioningState", h.ProvisioningState) + populate(objectMap, "resourceId", h.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsight. +func (h *HDInsight) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &h.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &h.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &h.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &h.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &h.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &h.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &h.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &h.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &h.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HDInsightProperties. +func (h HDInsightProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "address", h.Address) + populate(objectMap, "administratorAccount", h.AdministratorAccount) + populate(objectMap, "sshPort", h.SSHPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsightProperties. +func (h *HDInsightProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &h.Address) + delete(rawMsg, key) + case "administratorAccount": + err = unpopulate(val, "AdministratorAccount", &h.AdministratorAccount) + delete(rawMsg, key) + case "sshPort": + err = unpopulate(val, "SSHPort", &h.SSHPort) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HDInsightSchema. +func (h HDInsightSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", h.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsightSchema. +func (h *HDInsightSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type HdfsDatastore. +func (h HdfsDatastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "credentials", h.Credentials) + objectMap["datastoreType"] = DatastoreTypeHdfs + populate(objectMap, "description", h.Description) + populate(objectMap, "hdfsServerCertificate", h.HdfsServerCertificate) + populate(objectMap, "isDefault", h.IsDefault) + populate(objectMap, "nameNodeAddress", h.NameNodeAddress) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "protocol", h.Protocol) + populate(objectMap, "tags", h.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type HdfsDatastore. +func (h *HdfsDatastore) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentials": + h.Credentials, err = unmarshalDatastoreCredentialsClassification(val) + delete(rawMsg, key) + case "datastoreType": + err = unpopulate(val, "DatastoreType", &h.DatastoreType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &h.Description) + delete(rawMsg, key) + case "hdfsServerCertificate": + err = unpopulate(val, "HdfsServerCertificate", &h.HdfsServerCertificate) + delete(rawMsg, key) + case "isDefault": + err = unpopulate(val, "IsDefault", &h.IsDefault) + delete(rawMsg, key) + case "nameNodeAddress": + err = unpopulate(val, "NameNodeAddress", &h.NameNodeAddress) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &h.Protocol) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &h.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", h, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IDAssetReference. +func (i IDAssetReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetId", i.AssetID) + objectMap["referenceType"] = ReferenceTypeID + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IDAssetReference. +func (i *IDAssetReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetId": + err = unpopulate(val, "AssetID", &i.AssetID) + delete(rawMsg, key) + case "referenceType": + err = unpopulate(val, "ReferenceType", &i.ReferenceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityConfiguration. +func (i IdentityConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["identityType"] = i.IdentityType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityConfiguration. +func (i *IdentityConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityType": + err = unpopulate(val, "IdentityType", &i.IdentityType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdentityForCmk. +func (i IdentityForCmk) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "userAssignedIdentity", i.UserAssignedIdentity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityForCmk. +func (i *IdentityForCmk) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "userAssignedIdentity": + err = unpopulate(val, "UserAssignedIdentity", &i.UserAssignedIdentity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IdleShutdownSetting. +func (i IdleShutdownSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "idleTimeBeforeShutdown", i.IdleTimeBeforeShutdown) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IdleShutdownSetting. +func (i *IdleShutdownSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "idleTimeBeforeShutdown": + err = unpopulate(val, "IdleTimeBeforeShutdown", &i.IdleTimeBeforeShutdown) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Image. +func (i Image) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "reference", i.Reference) + populate(objectMap, "type", i.Type) + if i.AdditionalProperties != nil { + for key, val := range i.AdditionalProperties { + objectMap[key] = val + } + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Image. +func (i *Image) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "reference": + err = unpopulate(val, "Reference", &i.Reference) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &i.Type) + delete(rawMsg, key) + default: + if i.AdditionalProperties == nil { + i.AdditionalProperties = map[string]interface{}{} + } + if val != nil { + var aux interface{} + err = json.Unmarshal(val, &aux) + i.AdditionalProperties[key] = aux + } + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageClassification. +func (i ImageClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageClassification + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassification. +func (i *ImageClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageClassificationBase. +func (i ImageClassificationBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassificationBase. +func (i *ImageClassificationBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageClassificationMultilabel. +func (i ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageClassificationMultilabel + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageClassificationMultilabel. +func (i *ImageClassificationMultilabel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageInstanceSegmentation. +func (i ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageInstanceSegmentation + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageInstanceSegmentation. +func (i *ImageInstanceSegmentation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageLimitSettings. +func (i ImageLimitSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxConcurrentTrials", i.MaxConcurrentTrials) + populate(objectMap, "maxTrials", i.MaxTrials) + populate(objectMap, "timeout", i.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageLimitSettings. +func (i *ImageLimitSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxConcurrentTrials": + err = unpopulate(val, "MaxConcurrentTrials", &i.MaxConcurrentTrials) + delete(rawMsg, key) + case "maxTrials": + err = unpopulate(val, "MaxTrials", &i.MaxTrials) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &i.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageMetadata. +func (i ImageMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "currentImageVersion", i.CurrentImageVersion) + populate(objectMap, "isLatestOsImageVersion", i.IsLatestOsImageVersion) + populate(objectMap, "latestImageVersion", i.LatestImageVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageMetadata. +func (i *ImageMetadata) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentImageVersion": + err = unpopulate(val, "CurrentImageVersion", &i.CurrentImageVersion) + delete(rawMsg, key) + case "isLatestOsImageVersion": + err = unpopulate(val, "IsLatestOsImageVersion", &i.IsLatestOsImageVersion) + delete(rawMsg, key) + case "latestImageVersion": + err = unpopulate(val, "LatestImageVersion", &i.LatestImageVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettings. +func (i ImageModelDistributionSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettings. +func (i *ImageModelDistributionSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsClassification. +func (i ImageModelDistributionSettingsClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "trainingCropSize", i.TrainingCropSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationCropSize", i.ValidationCropSize) + populate(objectMap, "validationResizeSize", i.ValidationResizeSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "weightedLoss", i.WeightedLoss) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettingsClassification. +func (i *ImageModelDistributionSettingsClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "trainingCropSize": + err = unpopulate(val, "TrainingCropSize", &i.TrainingCropSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationCropSize": + err = unpopulate(val, "ValidationCropSize", &i.ValidationCropSize) + delete(rawMsg, key) + case "validationResizeSize": + err = unpopulate(val, "ValidationResizeSize", &i.ValidationResizeSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + case "weightedLoss": + err = unpopulate(val, "WeightedLoss", &i.WeightedLoss) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsObjectDetection. +func (i ImageModelDistributionSettingsObjectDetection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "boxDetectionsPerImage", i.BoxDetectionsPerImage) + populate(objectMap, "boxScoreThreshold", i.BoxScoreThreshold) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "imageSize", i.ImageSize) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "maxSize", i.MaxSize) + populate(objectMap, "minSize", i.MinSize) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "modelSize", i.ModelSize) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "multiScale", i.MultiScale) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "nmsIouThreshold", i.NmsIouThreshold) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "tileGridSize", i.TileGridSize) + populate(objectMap, "tileOverlapRatio", i.TileOverlapRatio) + populate(objectMap, "tilePredictionsNmsThreshold", i.TilePredictionsNmsThreshold) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationIouThreshold", i.ValidationIouThreshold) + populate(objectMap, "validationMetricType", i.ValidationMetricType) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelDistributionSettingsObjectDetection. +func (i *ImageModelDistributionSettingsObjectDetection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "boxDetectionsPerImage": + err = unpopulate(val, "BoxDetectionsPerImage", &i.BoxDetectionsPerImage) + delete(rawMsg, key) + case "boxScoreThreshold": + err = unpopulate(val, "BoxScoreThreshold", &i.BoxScoreThreshold) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "imageSize": + err = unpopulate(val, "ImageSize", &i.ImageSize) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "maxSize": + err = unpopulate(val, "MaxSize", &i.MaxSize) + delete(rawMsg, key) + case "minSize": + err = unpopulate(val, "MinSize", &i.MinSize) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "modelSize": + err = unpopulate(val, "ModelSize", &i.ModelSize) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "multiScale": + err = unpopulate(val, "MultiScale", &i.MultiScale) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "nmsIouThreshold": + err = unpopulate(val, "NmsIouThreshold", &i.NmsIouThreshold) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "tileGridSize": + err = unpopulate(val, "TileGridSize", &i.TileGridSize) + delete(rawMsg, key) + case "tileOverlapRatio": + err = unpopulate(val, "TileOverlapRatio", &i.TileOverlapRatio) + delete(rawMsg, key) + case "tilePredictionsNmsThreshold": + err = unpopulate(val, "TilePredictionsNmsThreshold", &i.TilePredictionsNmsThreshold) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationIouThreshold": + err = unpopulate(val, "ValidationIouThreshold", &i.ValidationIouThreshold) + delete(rawMsg, key) + case "validationMetricType": + err = unpopulate(val, "ValidationMetricType", &i.ValidationMetricType) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelSettings. +func (i ImageModelSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "advancedSettings", i.AdvancedSettings) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) + populate(objectMap, "checkpointModel", i.CheckpointModel) + populate(objectMap, "checkpointRunId", i.CheckpointRunID) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettings. +func (i *ImageModelSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advancedSettings": + err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) + delete(rawMsg, key) + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "checkpointFrequency": + err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) + delete(rawMsg, key) + case "checkpointModel": + err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + delete(rawMsg, key) + case "checkpointRunId": + err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsClassification. +func (i ImageModelSettingsClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "advancedSettings", i.AdvancedSettings) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) + populate(objectMap, "checkpointModel", i.CheckpointModel) + populate(objectMap, "checkpointRunId", i.CheckpointRunID) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "trainingCropSize", i.TrainingCropSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationCropSize", i.ValidationCropSize) + populate(objectMap, "validationResizeSize", i.ValidationResizeSize) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + populate(objectMap, "weightedLoss", i.WeightedLoss) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettingsClassification. +func (i *ImageModelSettingsClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advancedSettings": + err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) + delete(rawMsg, key) + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "checkpointFrequency": + err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) + delete(rawMsg, key) + case "checkpointModel": + err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + delete(rawMsg, key) + case "checkpointRunId": + err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "trainingCropSize": + err = unpopulate(val, "TrainingCropSize", &i.TrainingCropSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationCropSize": + err = unpopulate(val, "ValidationCropSize", &i.ValidationCropSize) + delete(rawMsg, key) + case "validationResizeSize": + err = unpopulate(val, "ValidationResizeSize", &i.ValidationResizeSize) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + case "weightedLoss": + err = unpopulate(val, "WeightedLoss", &i.WeightedLoss) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsObjectDetection. +func (i ImageModelSettingsObjectDetection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "advancedSettings", i.AdvancedSettings) + populate(objectMap, "amsGradient", i.AmsGradient) + populate(objectMap, "augmentations", i.Augmentations) + populate(objectMap, "beta1", i.Beta1) + populate(objectMap, "beta2", i.Beta2) + populate(objectMap, "boxDetectionsPerImage", i.BoxDetectionsPerImage) + populate(objectMap, "boxScoreThreshold", i.BoxScoreThreshold) + populate(objectMap, "checkpointFrequency", i.CheckpointFrequency) + populate(objectMap, "checkpointModel", i.CheckpointModel) + populate(objectMap, "checkpointRunId", i.CheckpointRunID) + populate(objectMap, "distributed", i.Distributed) + populate(objectMap, "earlyStopping", i.EarlyStopping) + populate(objectMap, "earlyStoppingDelay", i.EarlyStoppingDelay) + populate(objectMap, "earlyStoppingPatience", i.EarlyStoppingPatience) + populate(objectMap, "enableOnnxNormalization", i.EnableOnnxNormalization) + populate(objectMap, "evaluationFrequency", i.EvaluationFrequency) + populate(objectMap, "gradientAccumulationStep", i.GradientAccumulationStep) + populate(objectMap, "imageSize", i.ImageSize) + populate(objectMap, "layersToFreeze", i.LayersToFreeze) + populate(objectMap, "learningRate", i.LearningRate) + populate(objectMap, "learningRateScheduler", i.LearningRateScheduler) + populate(objectMap, "maxSize", i.MaxSize) + populate(objectMap, "minSize", i.MinSize) + populate(objectMap, "modelName", i.ModelName) + populate(objectMap, "modelSize", i.ModelSize) + populate(objectMap, "momentum", i.Momentum) + populate(objectMap, "multiScale", i.MultiScale) + populate(objectMap, "nesterov", i.Nesterov) + populate(objectMap, "nmsIouThreshold", i.NmsIouThreshold) + populate(objectMap, "numberOfEpochs", i.NumberOfEpochs) + populate(objectMap, "numberOfWorkers", i.NumberOfWorkers) + populate(objectMap, "optimizer", i.Optimizer) + populate(objectMap, "randomSeed", i.RandomSeed) + populate(objectMap, "stepLRGamma", i.StepLRGamma) + populate(objectMap, "stepLRStepSize", i.StepLRStepSize) + populate(objectMap, "tileGridSize", i.TileGridSize) + populate(objectMap, "tileOverlapRatio", i.TileOverlapRatio) + populate(objectMap, "tilePredictionsNmsThreshold", i.TilePredictionsNmsThreshold) + populate(objectMap, "trainingBatchSize", i.TrainingBatchSize) + populate(objectMap, "validationBatchSize", i.ValidationBatchSize) + populate(objectMap, "validationIouThreshold", i.ValidationIouThreshold) + populate(objectMap, "validationMetricType", i.ValidationMetricType) + populate(objectMap, "warmupCosineLRCycles", i.WarmupCosineLRCycles) + populate(objectMap, "warmupCosineLRWarmupEpochs", i.WarmupCosineLRWarmupEpochs) + populate(objectMap, "weightDecay", i.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageModelSettingsObjectDetection. +func (i *ImageModelSettingsObjectDetection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "advancedSettings": + err = unpopulate(val, "AdvancedSettings", &i.AdvancedSettings) + delete(rawMsg, key) + case "amsGradient": + err = unpopulate(val, "AmsGradient", &i.AmsGradient) + delete(rawMsg, key) + case "augmentations": + err = unpopulate(val, "Augmentations", &i.Augmentations) + delete(rawMsg, key) + case "beta1": + err = unpopulate(val, "Beta1", &i.Beta1) + delete(rawMsg, key) + case "beta2": + err = unpopulate(val, "Beta2", &i.Beta2) + delete(rawMsg, key) + case "boxDetectionsPerImage": + err = unpopulate(val, "BoxDetectionsPerImage", &i.BoxDetectionsPerImage) + delete(rawMsg, key) + case "boxScoreThreshold": + err = unpopulate(val, "BoxScoreThreshold", &i.BoxScoreThreshold) + delete(rawMsg, key) + case "checkpointFrequency": + err = unpopulate(val, "CheckpointFrequency", &i.CheckpointFrequency) + delete(rawMsg, key) + case "checkpointModel": + err = unpopulate(val, "CheckpointModel", &i.CheckpointModel) + delete(rawMsg, key) + case "checkpointRunId": + err = unpopulate(val, "CheckpointRunID", &i.CheckpointRunID) + delete(rawMsg, key) + case "distributed": + err = unpopulate(val, "Distributed", &i.Distributed) + delete(rawMsg, key) + case "earlyStopping": + err = unpopulate(val, "EarlyStopping", &i.EarlyStopping) + delete(rawMsg, key) + case "earlyStoppingDelay": + err = unpopulate(val, "EarlyStoppingDelay", &i.EarlyStoppingDelay) + delete(rawMsg, key) + case "earlyStoppingPatience": + err = unpopulate(val, "EarlyStoppingPatience", &i.EarlyStoppingPatience) + delete(rawMsg, key) + case "enableOnnxNormalization": + err = unpopulate(val, "EnableOnnxNormalization", &i.EnableOnnxNormalization) + delete(rawMsg, key) + case "evaluationFrequency": + err = unpopulate(val, "EvaluationFrequency", &i.EvaluationFrequency) + delete(rawMsg, key) + case "gradientAccumulationStep": + err = unpopulate(val, "GradientAccumulationStep", &i.GradientAccumulationStep) + delete(rawMsg, key) + case "imageSize": + err = unpopulate(val, "ImageSize", &i.ImageSize) + delete(rawMsg, key) + case "layersToFreeze": + err = unpopulate(val, "LayersToFreeze", &i.LayersToFreeze) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &i.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &i.LearningRateScheduler) + delete(rawMsg, key) + case "maxSize": + err = unpopulate(val, "MaxSize", &i.MaxSize) + delete(rawMsg, key) + case "minSize": + err = unpopulate(val, "MinSize", &i.MinSize) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &i.ModelName) + delete(rawMsg, key) + case "modelSize": + err = unpopulate(val, "ModelSize", &i.ModelSize) + delete(rawMsg, key) + case "momentum": + err = unpopulate(val, "Momentum", &i.Momentum) + delete(rawMsg, key) + case "multiScale": + err = unpopulate(val, "MultiScale", &i.MultiScale) + delete(rawMsg, key) + case "nesterov": + err = unpopulate(val, "Nesterov", &i.Nesterov) + delete(rawMsg, key) + case "nmsIouThreshold": + err = unpopulate(val, "NmsIouThreshold", &i.NmsIouThreshold) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &i.NumberOfEpochs) + delete(rawMsg, key) + case "numberOfWorkers": + err = unpopulate(val, "NumberOfWorkers", &i.NumberOfWorkers) + delete(rawMsg, key) + case "optimizer": + err = unpopulate(val, "Optimizer", &i.Optimizer) + delete(rawMsg, key) + case "randomSeed": + err = unpopulate(val, "RandomSeed", &i.RandomSeed) + delete(rawMsg, key) + case "stepLRGamma": + err = unpopulate(val, "StepLRGamma", &i.StepLRGamma) + delete(rawMsg, key) + case "stepLRStepSize": + err = unpopulate(val, "StepLRStepSize", &i.StepLRStepSize) + delete(rawMsg, key) + case "tileGridSize": + err = unpopulate(val, "TileGridSize", &i.TileGridSize) + delete(rawMsg, key) + case "tileOverlapRatio": + err = unpopulate(val, "TileOverlapRatio", &i.TileOverlapRatio) + delete(rawMsg, key) + case "tilePredictionsNmsThreshold": + err = unpopulate(val, "TilePredictionsNmsThreshold", &i.TilePredictionsNmsThreshold) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &i.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &i.ValidationBatchSize) + delete(rawMsg, key) + case "validationIouThreshold": + err = unpopulate(val, "ValidationIouThreshold", &i.ValidationIouThreshold) + delete(rawMsg, key) + case "validationMetricType": + err = unpopulate(val, "ValidationMetricType", &i.ValidationMetricType) + delete(rawMsg, key) + case "warmupCosineLRCycles": + err = unpopulate(val, "WarmupCosineLRCycles", &i.WarmupCosineLRCycles) + delete(rawMsg, key) + case "warmupCosineLRWarmupEpochs": + err = unpopulate(val, "WarmupCosineLRWarmupEpochs", &i.WarmupCosineLRWarmupEpochs) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &i.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageObjectDetection. +func (i ImageObjectDetection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "logVerbosity", i.LogVerbosity) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "primaryMetric", i.PrimaryMetric) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "targetColumnName", i.TargetColumnName) + objectMap["taskType"] = TaskTypeImageObjectDetection + populate(objectMap, "trainingData", i.TrainingData) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageObjectDetection. +func (i *ImageObjectDetection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &i.LogVerbosity) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &i.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &i.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &i.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &i.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageObjectDetectionBase. +func (i ImageObjectDetectionBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "modelSettings", i.ModelSettings) + populate(objectMap, "searchSpace", i.SearchSpace) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageObjectDetectionBase. +func (i *ImageObjectDetectionBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "modelSettings": + err = unpopulate(val, "ModelSettings", &i.ModelSettings) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &i.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageSweepSettings. +func (i ImageSweepSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "earlyTermination", i.EarlyTermination) + populate(objectMap, "samplingAlgorithm", i.SamplingAlgorithm) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageSweepSettings. +func (i *ImageSweepSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "earlyTermination": + i.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) + delete(rawMsg, key) + case "samplingAlgorithm": + err = unpopulate(val, "SamplingAlgorithm", &i.SamplingAlgorithm) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ImageVertical. +func (i ImageVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limitSettings", i.LimitSettings) + populate(objectMap, "sweepSettings", i.SweepSettings) + populate(objectMap, "validationData", i.ValidationData) + populate(objectMap, "validationDataSize", i.ValidationDataSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageVertical. +func (i *ImageVertical) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limitSettings": + err = unpopulate(val, "LimitSettings", &i.LimitSettings) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &i.SweepSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &i.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &i.ValidationDataSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InferenceContainerProperties. +func (i InferenceContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "livenessRoute", i.LivenessRoute) + populate(objectMap, "readinessRoute", i.ReadinessRoute) + populate(objectMap, "scoringRoute", i.ScoringRoute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InferenceContainerProperties. +func (i *InferenceContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "livenessRoute": + err = unpopulate(val, "LivenessRoute", &i.LivenessRoute) + delete(rawMsg, key) + case "readinessRoute": + err = unpopulate(val, "ReadinessRoute", &i.ReadinessRoute) + delete(rawMsg, key) + case "scoringRoute": + err = unpopulate(val, "ScoringRoute", &i.ScoringRoute) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchema. +func (i InstanceTypeSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nodeSelector", i.NodeSelector) + populate(objectMap, "resources", i.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceTypeSchema. +func (i *InstanceTypeSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodeSelector": + err = unpopulate(val, "NodeSelector", &i.NodeSelector) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &i.Resources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchemaResources. +func (i InstanceTypeSchemaResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "limits", i.Limits) + populate(objectMap, "requests", i.Requests) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InstanceTypeSchemaResources. +func (i *InstanceTypeSchemaResources) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "limits": + err = unpopulate(val, "Limits", &i.Limits) + delete(rawMsg, key) + case "requests": + err = unpopulate(val, "Requests", &i.Requests) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobBase. +func (j JobBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", j.ID) + populate(objectMap, "name", j.Name) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "systemData", j.SystemData) + populate(objectMap, "type", j.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobBase. +func (j *JobBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &j.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &j.Name) + delete(rawMsg, key) + case "properties": + j.Properties, err = unmarshalJobBasePropertiesClassification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &j.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &j.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobBaseProperties. +func (j JobBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "componentId", j.ComponentID) + populate(objectMap, "computeId", j.ComputeID) + populate(objectMap, "description", j.Description) + populate(objectMap, "displayName", j.DisplayName) + populate(objectMap, "experimentName", j.ExperimentName) + populate(objectMap, "identity", j.Identity) + populate(objectMap, "isArchived", j.IsArchived) + objectMap["jobType"] = j.JobType + populate(objectMap, "properties", j.Properties) + populate(objectMap, "services", j.Services) + populate(objectMap, "status", j.Status) + populate(objectMap, "tags", j.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobBaseProperties. +func (j *JobBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &j.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &j.ComputeID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &j.DisplayName) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &j.ExperimentName) + delete(rawMsg, key) + case "identity": + j.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &j.IsArchived) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &j.JobType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &j.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &j.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobBaseResourceArmPaginatedResult. +func (j JobBaseResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", j.NextLink) + populate(objectMap, "value", j.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobBaseResourceArmPaginatedResult. +func (j *JobBaseResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &j.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &j.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobInput. +func (j JobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", j.Description) + objectMap["jobInputType"] = j.JobInputType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobInput. +func (j *JobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &j.JobInputType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobLimits. +func (j JobLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["jobLimitsType"] = j.JobLimitsType + populate(objectMap, "timeout", j.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobLimits. +func (j *JobLimits) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobLimitsType": + err = unpopulate(val, "JobLimitsType", &j.JobLimitsType) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &j.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobOutput. +func (j JobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", j.Description) + objectMap["jobOutputType"] = j.JobOutputType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobOutput. +func (j *JobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &j.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &j.JobOutputType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobResourceConfiguration. +func (j JobResourceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dockerArgs", j.DockerArgs) + populate(objectMap, "instanceCount", j.InstanceCount) + populate(objectMap, "instanceType", j.InstanceType) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "shmSize", j.ShmSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobResourceConfiguration. +func (j *JobResourceConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dockerArgs": + err = unpopulate(val, "DockerArgs", &j.DockerArgs) + delete(rawMsg, key) + case "instanceCount": + err = unpopulate(val, "InstanceCount", &j.InstanceCount) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &j.InstanceType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "shmSize": + err = unpopulate(val, "ShmSize", &j.ShmSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobScheduleAction. +func (j JobScheduleAction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["actionType"] = ScheduleActionTypeCreateJob + populate(objectMap, "jobDefinition", j.JobDefinition) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobScheduleAction. +func (j *JobScheduleAction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &j.ActionType) + delete(rawMsg, key) + case "jobDefinition": + j.JobDefinition, err = unmarshalJobBasePropertiesClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type JobService. +func (j JobService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endpoint", j.Endpoint) + populate(objectMap, "errorMessage", j.ErrorMessage) + populate(objectMap, "jobServiceType", j.JobServiceType) + populate(objectMap, "nodes", j.Nodes) + populate(objectMap, "port", j.Port) + populate(objectMap, "properties", j.Properties) + populate(objectMap, "status", j.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type JobService. +func (j *JobService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endpoint": + err = unpopulate(val, "Endpoint", &j.Endpoint) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &j.ErrorMessage) + delete(rawMsg, key) + case "jobServiceType": + err = unpopulate(val, "JobServiceType", &j.JobServiceType) + delete(rawMsg, key) + case "nodes": + j.Nodes, err = unmarshalNodesClassification(val) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &j.Port) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &j.Properties) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &j.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", j, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KerberosCredentials. +func (k KerberosCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "kerberosKdcAddress", k.KerberosKdcAddress) + populate(objectMap, "kerberosPrincipal", k.KerberosPrincipal) + populate(objectMap, "kerberosRealm", k.KerberosRealm) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KerberosCredentials. +func (k *KerberosCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kerberosKdcAddress": + err = unpopulate(val, "KerberosKdcAddress", &k.KerberosKdcAddress) + delete(rawMsg, key) + case "kerberosPrincipal": + err = unpopulate(val, "KerberosPrincipal", &k.KerberosPrincipal) + delete(rawMsg, key) + case "kerberosRealm": + err = unpopulate(val, "KerberosRealm", &k.KerberosRealm) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KerberosKeytabCredentials. +func (k KerberosKeytabCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["credentialsType"] = CredentialsTypeKerberosKeytab + populate(objectMap, "kerberosKdcAddress", k.KerberosKdcAddress) + populate(objectMap, "kerberosPrincipal", k.KerberosPrincipal) + populate(objectMap, "kerberosRealm", k.KerberosRealm) + populate(objectMap, "secrets", k.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KerberosKeytabCredentials. +func (k *KerberosKeytabCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialsType": + err = unpopulate(val, "CredentialsType", &k.CredentialsType) + delete(rawMsg, key) + case "kerberosKdcAddress": + err = unpopulate(val, "KerberosKdcAddress", &k.KerberosKdcAddress) + delete(rawMsg, key) + case "kerberosPrincipal": + err = unpopulate(val, "KerberosPrincipal", &k.KerberosPrincipal) + delete(rawMsg, key) + case "kerberosRealm": + err = unpopulate(val, "KerberosRealm", &k.KerberosRealm) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &k.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KerberosKeytabSecrets. +func (k KerberosKeytabSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "kerberosKeytab", k.KerberosKeytab) + objectMap["secretsType"] = SecretsTypeKerberosKeytab + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KerberosKeytabSecrets. +func (k *KerberosKeytabSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kerberosKeytab": + err = unpopulate(val, "KerberosKeytab", &k.KerberosKeytab) + delete(rawMsg, key) + case "secretsType": + err = unpopulate(val, "SecretsType", &k.SecretsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KerberosPasswordCredentials. +func (k KerberosPasswordCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["credentialsType"] = CredentialsTypeKerberosPassword + populate(objectMap, "kerberosKdcAddress", k.KerberosKdcAddress) + populate(objectMap, "kerberosPrincipal", k.KerberosPrincipal) + populate(objectMap, "kerberosRealm", k.KerberosRealm) + populate(objectMap, "secrets", k.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KerberosPasswordCredentials. +func (k *KerberosPasswordCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialsType": + err = unpopulate(val, "CredentialsType", &k.CredentialsType) + delete(rawMsg, key) + case "kerberosKdcAddress": + err = unpopulate(val, "KerberosKdcAddress", &k.KerberosKdcAddress) + delete(rawMsg, key) + case "kerberosPrincipal": + err = unpopulate(val, "KerberosPrincipal", &k.KerberosPrincipal) + delete(rawMsg, key) + case "kerberosRealm": + err = unpopulate(val, "KerberosRealm", &k.KerberosRealm) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &k.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KerberosPasswordSecrets. +func (k KerberosPasswordSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "kerberosPassword", k.KerberosPassword) + objectMap["secretsType"] = SecretsTypeKerberosPassword + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KerberosPasswordSecrets. +func (k *KerberosPasswordSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "kerberosPassword": + err = unpopulate(val, "KerberosPassword", &k.KerberosPassword) + delete(rawMsg, key) + case "secretsType": + err = unpopulate(val, "SecretsType", &k.SecretsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Kubernetes. +func (k Kubernetes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", k.ComputeLocation) + objectMap["computeType"] = ComputeTypeKubernetes + populateTimeRFC3339(objectMap, "createdOn", k.CreatedOn) + populate(objectMap, "description", k.Description) + populate(objectMap, "disableLocalAuth", k.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", k.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", k.ModifiedOn) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "provisioningErrors", k.ProvisioningErrors) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "resourceId", k.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Kubernetes. +func (k *Kubernetes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &k.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &k.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &k.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &k.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &k.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &k.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &k.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &k.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &k.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesOnlineDeployment. +func (k KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appInsightsEnabled", k.AppInsightsEnabled) + populate(objectMap, "codeConfiguration", k.CodeConfiguration) + populate(objectMap, "containerResourceRequirements", k.ContainerResourceRequirements) + populate(objectMap, "description", k.Description) + populate(objectMap, "egressPublicNetworkAccess", k.EgressPublicNetworkAccess) + objectMap["endpointComputeType"] = EndpointComputeTypeKubernetes + populate(objectMap, "environmentId", k.EnvironmentID) + populate(objectMap, "environmentVariables", k.EnvironmentVariables) + populate(objectMap, "instanceType", k.InstanceType) + populate(objectMap, "livenessProbe", k.LivenessProbe) + populate(objectMap, "model", k.Model) + populate(objectMap, "modelMountPath", k.ModelMountPath) + populate(objectMap, "properties", k.Properties) + populate(objectMap, "provisioningState", k.ProvisioningState) + populate(objectMap, "readinessProbe", k.ReadinessProbe) + populate(objectMap, "requestSettings", k.RequestSettings) + populate(objectMap, "scaleSettings", k.ScaleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesOnlineDeployment. +func (k *KubernetesOnlineDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsEnabled": + err = unpopulate(val, "AppInsightsEnabled", &k.AppInsightsEnabled) + delete(rawMsg, key) + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &k.CodeConfiguration) + delete(rawMsg, key) + case "containerResourceRequirements": + err = unpopulate(val, "ContainerResourceRequirements", &k.ContainerResourceRequirements) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &k.Description) + delete(rawMsg, key) + case "egressPublicNetworkAccess": + err = unpopulate(val, "EgressPublicNetworkAccess", &k.EgressPublicNetworkAccess) + delete(rawMsg, key) + case "endpointComputeType": + err = unpopulate(val, "EndpointComputeType", &k.EndpointComputeType) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &k.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &k.EnvironmentVariables) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &k.InstanceType) + delete(rawMsg, key) + case "livenessProbe": + err = unpopulate(val, "LivenessProbe", &k.LivenessProbe) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &k.Model) + delete(rawMsg, key) + case "modelMountPath": + err = unpopulate(val, "ModelMountPath", &k.ModelMountPath) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) + delete(rawMsg, key) + case "readinessProbe": + err = unpopulate(val, "ReadinessProbe", &k.ReadinessProbe) + delete(rawMsg, key) + case "requestSettings": + err = unpopulate(val, "RequestSettings", &k.RequestSettings) + delete(rawMsg, key) + case "scaleSettings": + k.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesProperties. +func (k KubernetesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "defaultInstanceType", k.DefaultInstanceType) + populate(objectMap, "extensionInstanceReleaseTrain", k.ExtensionInstanceReleaseTrain) + populate(objectMap, "extensionPrincipalId", k.ExtensionPrincipalID) + populate(objectMap, "instanceTypes", k.InstanceTypes) + populate(objectMap, "namespace", k.Namespace) + populate(objectMap, "relayConnectionString", k.RelayConnectionString) + populate(objectMap, "serviceBusConnectionString", k.ServiceBusConnectionString) + populate(objectMap, "vcName", k.VcName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesProperties. +func (k *KubernetesProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "defaultInstanceType": + err = unpopulate(val, "DefaultInstanceType", &k.DefaultInstanceType) + delete(rawMsg, key) + case "extensionInstanceReleaseTrain": + err = unpopulate(val, "ExtensionInstanceReleaseTrain", &k.ExtensionInstanceReleaseTrain) + delete(rawMsg, key) + case "extensionPrincipalId": + err = unpopulate(val, "ExtensionPrincipalID", &k.ExtensionPrincipalID) + delete(rawMsg, key) + case "instanceTypes": + err = unpopulate(val, "InstanceTypes", &k.InstanceTypes) + delete(rawMsg, key) + case "namespace": + err = unpopulate(val, "Namespace", &k.Namespace) + delete(rawMsg, key) + case "relayConnectionString": + err = unpopulate(val, "RelayConnectionString", &k.RelayConnectionString) + delete(rawMsg, key) + case "serviceBusConnectionString": + err = unpopulate(val, "ServiceBusConnectionString", &k.ServiceBusConnectionString) + delete(rawMsg, key) + case "vcName": + err = unpopulate(val, "VcName", &k.VcName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type KubernetesSchema. +func (k KubernetesSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", k.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesSchema. +func (k *KubernetesSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &k.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", k, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelCategory. +func (l LabelCategory) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "classes", l.Classes) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "multiSelect", l.MultiSelect) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelCategory. +func (l *LabelCategory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "classes": + err = unpopulate(val, "Classes", &l.Classes) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "multiSelect": + err = unpopulate(val, "MultiSelect", &l.MultiSelect) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelClass. +func (l LabelClass) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "subclasses", l.Subclasses) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelClass. +func (l *LabelClass) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "subclasses": + err = unpopulate(val, "Subclasses", &l.Subclasses) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingDataConfiguration. +func (l LabelingDataConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dataId", l.DataID) + populate(objectMap, "incrementalDataRefresh", l.IncrementalDataRefresh) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingDataConfiguration. +func (l *LabelingDataConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataId": + err = unpopulate(val, "DataID", &l.DataID) + delete(rawMsg, key) + case "incrementalDataRefresh": + err = unpopulate(val, "IncrementalDataRefresh", &l.IncrementalDataRefresh) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJob. +func (l LabelingJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", l.ID) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "systemData", l.SystemData) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJob. +func (l *LabelingJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &l.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &l.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &l.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &l.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJobImageProperties. +func (l LabelingJobImageProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "annotationType", l.AnnotationType) + objectMap["mediaType"] = MediaTypeImage + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJobImageProperties. +func (l *LabelingJobImageProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "annotationType": + err = unpopulate(val, "AnnotationType", &l.AnnotationType) + delete(rawMsg, key) + case "mediaType": + err = unpopulate(val, "MediaType", &l.MediaType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJobInstructions. +func (l LabelingJobInstructions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "uri", l.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJobInstructions. +func (l *LabelingJobInstructions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "uri": + err = unpopulate(val, "URI", &l.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJobMediaProperties. +func (l LabelingJobMediaProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mediaType"] = l.MediaType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJobMediaProperties. +func (l *LabelingJobMediaProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mediaType": + err = unpopulate(val, "MediaType", &l.MediaType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJobProperties. +func (l LabelingJobProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "componentId", l.ComponentID) + populate(objectMap, "computeId", l.ComputeID) + populateTimeRFC3339(objectMap, "createdDateTime", l.CreatedDateTime) + populate(objectMap, "dataConfiguration", l.DataConfiguration) + populate(objectMap, "description", l.Description) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "experimentName", l.ExperimentName) + populate(objectMap, "identity", l.Identity) + populate(objectMap, "isArchived", l.IsArchived) + populate(objectMap, "jobInstructions", l.JobInstructions) + objectMap["jobType"] = JobTypeLabeling + populate(objectMap, "labelCategories", l.LabelCategories) + populate(objectMap, "labelingJobMediaProperties", l.LabelingJobMediaProperties) + populate(objectMap, "mlAssistConfiguration", l.MlAssistConfiguration) + populate(objectMap, "progressMetrics", l.ProgressMetrics) + populate(objectMap, "projectId", l.ProjectID) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "provisioningState", l.ProvisioningState) + populate(objectMap, "services", l.Services) + populate(objectMap, "status", l.Status) + populate(objectMap, "statusMessages", l.StatusMessages) + populate(objectMap, "tags", l.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJobProperties. +func (l *LabelingJobProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &l.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &l.ComputeID) + delete(rawMsg, key) + case "createdDateTime": + err = unpopulateTimeRFC3339(val, "CreatedDateTime", &l.CreatedDateTime) + delete(rawMsg, key) + case "dataConfiguration": + err = unpopulate(val, "DataConfiguration", &l.DataConfiguration) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &l.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &l.ExperimentName) + delete(rawMsg, key) + case "identity": + l.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &l.IsArchived) + delete(rawMsg, key) + case "jobInstructions": + err = unpopulate(val, "JobInstructions", &l.JobInstructions) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &l.JobType) + delete(rawMsg, key) + case "labelCategories": + err = unpopulate(val, "LabelCategories", &l.LabelCategories) + delete(rawMsg, key) + case "labelingJobMediaProperties": + l.LabelingJobMediaProperties, err = unmarshalLabelingJobMediaPropertiesClassification(val) + delete(rawMsg, key) + case "mlAssistConfiguration": + l.MlAssistConfiguration, err = unmarshalMLAssistConfigurationClassification(val) + delete(rawMsg, key) + case "progressMetrics": + err = unpopulate(val, "ProgressMetrics", &l.ProgressMetrics) + delete(rawMsg, key) + case "projectId": + err = unpopulate(val, "ProjectID", &l.ProjectID) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &l.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &l.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &l.Status) + delete(rawMsg, key) + case "statusMessages": + err = unpopulate(val, "StatusMessages", &l.StatusMessages) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &l.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJobResourceArmPaginatedResult. +func (l LabelingJobResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJobResourceArmPaginatedResult. +func (l *LabelingJobResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJobTextProperties. +func (l LabelingJobTextProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "annotationType", l.AnnotationType) + objectMap["mediaType"] = MediaTypeText + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJobTextProperties. +func (l *LabelingJobTextProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "annotationType": + err = unpopulate(val, "AnnotationType", &l.AnnotationType) + delete(rawMsg, key) + case "mediaType": + err = unpopulate(val, "MediaType", &l.MediaType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListAmlUserFeatureResult. +func (l ListAmlUserFeatureResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListAmlUserFeatureResult. +func (l *ListAmlUserFeatureResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListNotebookKeysResult. +func (l ListNotebookKeysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "primaryAccessKey", l.PrimaryAccessKey) + populate(objectMap, "secondaryAccessKey", l.SecondaryAccessKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListNotebookKeysResult. +func (l *ListNotebookKeysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "primaryAccessKey": + err = unpopulate(val, "PrimaryAccessKey", &l.PrimaryAccessKey) + delete(rawMsg, key) + case "secondaryAccessKey": + err = unpopulate(val, "SecondaryAccessKey", &l.SecondaryAccessKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListStorageAccountKeysResult. +func (l ListStorageAccountKeysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "userStorageKey", l.UserStorageKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListStorageAccountKeysResult. +func (l *ListStorageAccountKeysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "userStorageKey": + err = unpopulate(val, "UserStorageKey", &l.UserStorageKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListUsagesResult. +func (l ListUsagesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListUsagesResult. +func (l *ListUsagesResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListWorkspaceKeysResult. +func (l ListWorkspaceKeysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appInsightsInstrumentationKey", l.AppInsightsInstrumentationKey) + populate(objectMap, "containerRegistryCredentials", l.ContainerRegistryCredentials) + populate(objectMap, "notebookAccessKeys", l.NotebookAccessKeys) + populate(objectMap, "userStorageKey", l.UserStorageKey) + populate(objectMap, "userStorageResourceId", l.UserStorageResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListWorkspaceKeysResult. +func (l *ListWorkspaceKeysResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsInstrumentationKey": + err = unpopulate(val, "AppInsightsInstrumentationKey", &l.AppInsightsInstrumentationKey) + delete(rawMsg, key) + case "containerRegistryCredentials": + err = unpopulate(val, "ContainerRegistryCredentials", &l.ContainerRegistryCredentials) + delete(rawMsg, key) + case "notebookAccessKeys": + err = unpopulate(val, "NotebookAccessKeys", &l.NotebookAccessKeys) + delete(rawMsg, key) + case "userStorageKey": + err = unpopulate(val, "UserStorageKey", &l.UserStorageKey) + delete(rawMsg, key) + case "userStorageResourceId": + err = unpopulate(val, "UserStorageResourceID", &l.UserStorageResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ListWorkspaceQuotas. +func (l ListWorkspaceQuotas) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ListWorkspaceQuotas. +func (l *ListWorkspaceQuotas) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &l.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LiteralJobInput. +func (l LiteralJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", l.Description) + objectMap["jobInputType"] = JobInputTypeLiteral + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LiteralJobInput. +func (l *LiteralJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &l.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &l.JobInputType) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &l.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLAssistConfiguration. +func (m MLAssistConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mlAssist"] = m.MlAssist + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLAssistConfiguration. +func (m *MLAssistConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mlAssist": + err = unpopulate(val, "MlAssist", &m.MlAssist) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLAssistConfigurationDisabled. +func (m MLAssistConfigurationDisabled) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mlAssist"] = MLAssistConfigurationTypeDisabled + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLAssistConfigurationDisabled. +func (m *MLAssistConfigurationDisabled) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mlAssist": + err = unpopulate(val, "MlAssist", &m.MlAssist) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLAssistConfigurationEnabled. +func (m MLAssistConfigurationEnabled) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "inferencingComputeBinding", m.InferencingComputeBinding) + objectMap["mlAssist"] = MLAssistConfigurationTypeEnabled + populate(objectMap, "trainingComputeBinding", m.TrainingComputeBinding) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLAssistConfigurationEnabled. +func (m *MLAssistConfigurationEnabled) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "inferencingComputeBinding": + err = unpopulate(val, "InferencingComputeBinding", &m.InferencingComputeBinding) + delete(rawMsg, key) + case "mlAssist": + err = unpopulate(val, "MlAssist", &m.MlAssist) + delete(rawMsg, key) + case "trainingComputeBinding": + err = unpopulate(val, "TrainingComputeBinding", &m.TrainingComputeBinding) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobInput. +func (m MLFlowModelJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", m.Description) + objectMap["jobInputType"] = JobInputTypeMlflowModel + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobInput. +func (m *MLFlowModelJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &m.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobOutput. +func (m MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetName", m.AssetName) + populate(objectMap, "assetVersion", m.AssetVersion) + populate(objectMap, "description", m.Description) + objectMap["jobOutputType"] = JobOutputTypeMlflowModel + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobOutput. +func (m *MLFlowModelJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetName": + err = unpopulate(val, "AssetName", &m.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &m.AssetVersion) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &m.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLTableData. +func (m MLTableData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["dataType"] = DataTypeMltable + populate(objectMap, "dataUri", m.DataURI) + populate(objectMap, "description", m.Description) + populate(objectMap, "isAnonymous", m.IsAnonymous) + populate(objectMap, "isArchived", m.IsArchived) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "referencedUris", m.ReferencedUris) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableData. +func (m *MLTableData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &m.DataType) + delete(rawMsg, key) + case "dataUri": + err = unpopulate(val, "DataURI", &m.DataURI) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &m.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &m.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "referencedUris": + err = unpopulate(val, "ReferencedUris", &m.ReferencedUris) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLTableJobInput. +func (m MLTableJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", m.Description) + objectMap["jobInputType"] = JobInputTypeMltable + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobInput. +func (m *MLTableJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &m.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MLTableJobOutput. +func (m MLTableJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetName", m.AssetName) + populate(objectMap, "assetVersion", m.AssetVersion) + populate(objectMap, "description", m.Description) + objectMap["jobOutputType"] = JobOutputTypeMltable + populate(objectMap, "mode", m.Mode) + populate(objectMap, "uri", m.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobOutput. +func (m *MLTableJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetName": + err = unpopulate(val, "AssetName", &m.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &m.AssetVersion) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &m.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &m.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentity. +func (m ManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", m.ClientID) + objectMap["identityType"] = IdentityConfigurationTypeManaged + populate(objectMap, "objectId", m.ObjectID) + populate(objectMap, "resourceId", m.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity. +func (m *ManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) + delete(rawMsg, key) + case "identityType": + err = unpopulate(val, "IdentityType", &m.IdentityType) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &m.ObjectID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &m.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. +func (m ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = ConnectionAuthTypeManagedIdentity + populate(objectMap, "category", m.Category) + populate(objectMap, "credentials", m.Credentials) + populate(objectMap, "target", m.Target) + populate(objectMap, "value", m.Value) + populate(objectMap, "valueFormat", m.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. +func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &m.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &m.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &m.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &m.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &m.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedOnlineDeployment. +func (m ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appInsightsEnabled", m.AppInsightsEnabled) + populate(objectMap, "codeConfiguration", m.CodeConfiguration) + populate(objectMap, "description", m.Description) + populate(objectMap, "egressPublicNetworkAccess", m.EgressPublicNetworkAccess) + objectMap["endpointComputeType"] = EndpointComputeTypeManaged + populate(objectMap, "environmentId", m.EnvironmentID) + populate(objectMap, "environmentVariables", m.EnvironmentVariables) + populate(objectMap, "instanceType", m.InstanceType) + populate(objectMap, "livenessProbe", m.LivenessProbe) + populate(objectMap, "model", m.Model) + populate(objectMap, "modelMountPath", m.ModelMountPath) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "readinessProbe", m.ReadinessProbe) + populate(objectMap, "requestSettings", m.RequestSettings) + populate(objectMap, "scaleSettings", m.ScaleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedOnlineDeployment. +func (m *ManagedOnlineDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsEnabled": + err = unpopulate(val, "AppInsightsEnabled", &m.AppInsightsEnabled) + delete(rawMsg, key) + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &m.CodeConfiguration) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "egressPublicNetworkAccess": + err = unpopulate(val, "EgressPublicNetworkAccess", &m.EgressPublicNetworkAccess) + delete(rawMsg, key) + case "endpointComputeType": + err = unpopulate(val, "EndpointComputeType", &m.EndpointComputeType) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &m.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &m.EnvironmentVariables) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + delete(rawMsg, key) + case "livenessProbe": + err = unpopulate(val, "LivenessProbe", &m.LivenessProbe) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &m.Model) + delete(rawMsg, key) + case "modelMountPath": + err = unpopulate(val, "ModelMountPath", &m.ModelMountPath) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "readinessProbe": + err = unpopulate(val, "ReadinessProbe", &m.ReadinessProbe) + delete(rawMsg, key) + case "requestSettings": + err = unpopulate(val, "RequestSettings", &m.RequestSettings) + delete(rawMsg, key) + case "scaleSettings": + m.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentity. +func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MedianStoppingPolicy. +func (m MedianStoppingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "delayEvaluation", m.DelayEvaluation) + populate(objectMap, "evaluationInterval", m.EvaluationInterval) + objectMap["policyType"] = EarlyTerminationPolicyTypeMedianStopping + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MedianStoppingPolicy. +func (m *MedianStoppingPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delayEvaluation": + err = unpopulate(val, "DelayEvaluation", &m.DelayEvaluation) + delete(rawMsg, key) + case "evaluationInterval": + err = unpopulate(val, "EvaluationInterval", &m.EvaluationInterval) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &m.PolicyType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelContainer. +func (m ModelContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainer. +func (m *ModelContainer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelContainerProperties. +func (m ModelContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", m.Description) + populate(objectMap, "isArchived", m.IsArchived) + populate(objectMap, "latestVersion", m.LatestVersion) + populate(objectMap, "nextVersion", m.NextVersion) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainerProperties. +func (m *ModelContainerProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &m.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &m.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &m.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelContainerResourceArmPaginatedResult. +func (m ModelContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelContainerResourceArmPaginatedResult. +func (m *ModelContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelVersion. +func (m ModelVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersion. +func (m *ModelVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelVersionProperties. +func (m ModelVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", m.Description) + populate(objectMap, "flavors", m.Flavors) + populate(objectMap, "isAnonymous", m.IsAnonymous) + populate(objectMap, "isArchived", m.IsArchived) + populate(objectMap, "jobName", m.JobName) + populate(objectMap, "modelType", m.ModelType) + populate(objectMap, "modelUri", m.ModelURI) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "tags", m.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersionProperties. +func (m *ModelVersionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &m.Description) + delete(rawMsg, key) + case "flavors": + err = unpopulate(val, "Flavors", &m.Flavors) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &m.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &m.IsArchived) + delete(rawMsg, key) + case "jobName": + err = unpopulate(val, "JobName", &m.JobName) + delete(rawMsg, key) + case "modelType": + err = unpopulate(val, "ModelType", &m.ModelType) + delete(rawMsg, key) + case "modelUri": + err = unpopulate(val, "ModelURI", &m.ModelURI) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ModelVersionResourceArmPaginatedResult. +func (m ModelVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelVersionResourceArmPaginatedResult. +func (m *ModelVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Mpi. +func (m Mpi) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["distributionType"] = DistributionTypeMpi + populate(objectMap, "processCountPerInstance", m.ProcessCountPerInstance) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Mpi. +func (m *Mpi) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "distributionType": + err = unpopulate(val, "DistributionType", &m.DistributionType) + delete(rawMsg, key) + case "processCountPerInstance": + err = unpopulate(val, "ProcessCountPerInstance", &m.ProcessCountPerInstance) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NCrossValidations. +func (n NCrossValidations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = n.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NCrossValidations. +func (n *NCrossValidations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &n.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpFixedParameters. +func (n NlpFixedParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "gradientAccumulationSteps", n.GradientAccumulationSteps) + populate(objectMap, "learningRate", n.LearningRate) + populate(objectMap, "learningRateScheduler", n.LearningRateScheduler) + populate(objectMap, "modelName", n.ModelName) + populate(objectMap, "numberOfEpochs", n.NumberOfEpochs) + populate(objectMap, "trainingBatchSize", n.TrainingBatchSize) + populate(objectMap, "validationBatchSize", n.ValidationBatchSize) + populate(objectMap, "warmupRatio", n.WarmupRatio) + populate(objectMap, "weightDecay", n.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpFixedParameters. +func (n *NlpFixedParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gradientAccumulationSteps": + err = unpopulate(val, "GradientAccumulationSteps", &n.GradientAccumulationSteps) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &n.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &n.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &n.ModelName) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &n.NumberOfEpochs) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &n.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &n.ValidationBatchSize) + delete(rawMsg, key) + case "warmupRatio": + err = unpopulate(val, "WarmupRatio", &n.WarmupRatio) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &n.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpParameterSubspace. +func (n NlpParameterSubspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "gradientAccumulationSteps", n.GradientAccumulationSteps) + populate(objectMap, "learningRate", n.LearningRate) + populate(objectMap, "learningRateScheduler", n.LearningRateScheduler) + populate(objectMap, "modelName", n.ModelName) + populate(objectMap, "numberOfEpochs", n.NumberOfEpochs) + populate(objectMap, "trainingBatchSize", n.TrainingBatchSize) + populate(objectMap, "validationBatchSize", n.ValidationBatchSize) + populate(objectMap, "warmupRatio", n.WarmupRatio) + populate(objectMap, "weightDecay", n.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpParameterSubspace. +func (n *NlpParameterSubspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gradientAccumulationSteps": + err = unpopulate(val, "GradientAccumulationSteps", &n.GradientAccumulationSteps) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &n.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &n.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &n.ModelName) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &n.NumberOfEpochs) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &n.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &n.ValidationBatchSize) + delete(rawMsg, key) + case "warmupRatio": + err = unpopulate(val, "WarmupRatio", &n.WarmupRatio) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &n.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpSweepSettings. +func (n NlpSweepSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "earlyTermination", n.EarlyTermination) + populate(objectMap, "samplingAlgorithm", n.SamplingAlgorithm) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpSweepSettings. +func (n *NlpSweepSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "earlyTermination": + n.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) + delete(rawMsg, key) + case "samplingAlgorithm": + err = unpopulate(val, "SamplingAlgorithm", &n.SamplingAlgorithm) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpVertical. +func (n NlpVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "featurizationSettings", n.FeaturizationSettings) + populate(objectMap, "fixedParameters", n.FixedParameters) + populate(objectMap, "limitSettings", n.LimitSettings) + populate(objectMap, "searchSpace", n.SearchSpace) + populate(objectMap, "sweepSettings", n.SweepSettings) + populate(objectMap, "validationData", n.ValidationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVertical. +func (n *NlpVertical) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &n.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &n.FixedParameters) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &n.LimitSettings) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &n.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &n.SweepSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &n.ValidationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpVerticalFeaturizationSettings. +func (n NlpVerticalFeaturizationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "datasetLanguage", n.DatasetLanguage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVerticalFeaturizationSettings. +func (n *NlpVerticalFeaturizationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "datasetLanguage": + err = unpopulate(val, "DatasetLanguage", &n.DatasetLanguage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpVerticalLimitSettings. +func (n NlpVerticalLimitSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxConcurrentTrials", n.MaxConcurrentTrials) + populate(objectMap, "maxNodes", n.MaxNodes) + populate(objectMap, "maxTrials", n.MaxTrials) + populate(objectMap, "timeout", n.Timeout) + populate(objectMap, "trialTimeout", n.TrialTimeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpVerticalLimitSettings. +func (n *NlpVerticalLimitSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxConcurrentTrials": + err = unpopulate(val, "MaxConcurrentTrials", &n.MaxConcurrentTrials) + delete(rawMsg, key) + case "maxNodes": + err = unpopulate(val, "MaxNodes", &n.MaxNodes) + delete(rawMsg, key) + case "maxTrials": + err = unpopulate(val, "MaxTrials", &n.MaxTrials) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &n.Timeout) + delete(rawMsg, key) + case "trialTimeout": + err = unpopulate(val, "TrialTimeout", &n.TrialTimeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NodeStateCounts. +func (n NodeStateCounts) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "idleNodeCount", n.IdleNodeCount) + populate(objectMap, "leavingNodeCount", n.LeavingNodeCount) + populate(objectMap, "preemptedNodeCount", n.PreemptedNodeCount) + populate(objectMap, "preparingNodeCount", n.PreparingNodeCount) + populate(objectMap, "runningNodeCount", n.RunningNodeCount) + populate(objectMap, "unusableNodeCount", n.UnusableNodeCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NodeStateCounts. +func (n *NodeStateCounts) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "idleNodeCount": + err = unpopulate(val, "IdleNodeCount", &n.IdleNodeCount) + delete(rawMsg, key) + case "leavingNodeCount": + err = unpopulate(val, "LeavingNodeCount", &n.LeavingNodeCount) + delete(rawMsg, key) + case "preemptedNodeCount": + err = unpopulate(val, "PreemptedNodeCount", &n.PreemptedNodeCount) + delete(rawMsg, key) + case "preparingNodeCount": + err = unpopulate(val, "PreparingNodeCount", &n.PreparingNodeCount) + delete(rawMsg, key) + case "runningNodeCount": + err = unpopulate(val, "RunningNodeCount", &n.RunningNodeCount) + delete(rawMsg, key) + case "unusableNodeCount": + err = unpopulate(val, "UnusableNodeCount", &n.UnusableNodeCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Nodes. +func (n Nodes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["nodesValueType"] = n.NodesValueType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Nodes. +func (n *Nodes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodesValueType": + err = unpopulate(val, "NodesValueType", &n.NodesValueType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. +func (n NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = ConnectionAuthTypeNone + populate(objectMap, "category", n.Category) + populate(objectMap, "target", n.Target) + populate(objectMap, "value", n.Value) + populate(objectMap, "valueFormat", n.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. +func (n *NoneAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &n.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &n.Category) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &n.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &n.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &n.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NoneDatastoreCredentials. +func (n NoneDatastoreCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["credentialsType"] = CredentialsTypeNone + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NoneDatastoreCredentials. +func (n *NoneDatastoreCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialsType": + err = unpopulate(val, "CredentialsType", &n.CredentialsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NotebookAccessTokenResult. +func (n NotebookAccessTokenResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessToken", n.AccessToken) + populate(objectMap, "expiresIn", n.ExpiresIn) + populate(objectMap, "hostName", n.HostName) + populate(objectMap, "notebookResourceId", n.NotebookResourceID) + populate(objectMap, "publicDns", n.PublicDNS) + populate(objectMap, "refreshToken", n.RefreshToken) + populate(objectMap, "scope", n.Scope) + populate(objectMap, "tokenType", n.TokenType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookAccessTokenResult. +func (n *NotebookAccessTokenResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessToken": + err = unpopulate(val, "AccessToken", &n.AccessToken) + delete(rawMsg, key) + case "expiresIn": + err = unpopulate(val, "ExpiresIn", &n.ExpiresIn) + delete(rawMsg, key) + case "hostName": + err = unpopulate(val, "HostName", &n.HostName) + delete(rawMsg, key) + case "notebookResourceId": + err = unpopulate(val, "NotebookResourceID", &n.NotebookResourceID) + delete(rawMsg, key) + case "publicDns": + err = unpopulate(val, "PublicDNS", &n.PublicDNS) + delete(rawMsg, key) + case "refreshToken": + err = unpopulate(val, "RefreshToken", &n.RefreshToken) + delete(rawMsg, key) + case "scope": + err = unpopulate(val, "Scope", &n.Scope) + delete(rawMsg, key) + case "tokenType": + err = unpopulate(val, "TokenType", &n.TokenType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NotebookPreparationError. +func (n NotebookPreparationError) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "errorMessage", n.ErrorMessage) + populate(objectMap, "statusCode", n.StatusCode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookPreparationError. +func (n *NotebookPreparationError) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &n.ErrorMessage) + delete(rawMsg, key) + case "statusCode": + err = unpopulate(val, "StatusCode", &n.StatusCode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NotebookResourceInfo. +func (n NotebookResourceInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "fqdn", n.Fqdn) + populate(objectMap, "notebookPreparationError", n.NotebookPreparationError) + populate(objectMap, "resourceId", n.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotebookResourceInfo. +func (n *NotebookResourceInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "fqdn": + err = unpopulate(val, "Fqdn", &n.Fqdn) + delete(rawMsg, key) + case "notebookPreparationError": + err = unpopulate(val, "NotebookPreparationError", &n.NotebookPreparationError) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &n.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Objective. +func (o Objective) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "goal", o.Goal) + populate(objectMap, "primaryMetric", o.PrimaryMetric) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Objective. +func (o *Objective) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "goal": + err = unpopulate(val, "Goal", &o.Goal) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &o.PrimaryMetric) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineDeployment. +func (o OnlineDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", o.ID) + populate(objectMap, "identity", o.Identity) + populate(objectMap, "kind", o.Kind) + populate(objectMap, "location", o.Location) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "sku", o.SKU) + populate(objectMap, "systemData", o.SystemData) + populate(objectMap, "tags", o.Tags) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeployment. +func (o *OnlineDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &o.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &o.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &o.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + o.Properties, err = unmarshalOnlineDeploymentPropertiesClassification(val) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &o.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &o.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &o.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentProperties. +func (o OnlineDeploymentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appInsightsEnabled", o.AppInsightsEnabled) + populate(objectMap, "codeConfiguration", o.CodeConfiguration) + populate(objectMap, "description", o.Description) + populate(objectMap, "egressPublicNetworkAccess", o.EgressPublicNetworkAccess) + objectMap["endpointComputeType"] = o.EndpointComputeType + populate(objectMap, "environmentId", o.EnvironmentID) + populate(objectMap, "environmentVariables", o.EnvironmentVariables) + populate(objectMap, "instanceType", o.InstanceType) + populate(objectMap, "livenessProbe", o.LivenessProbe) + populate(objectMap, "model", o.Model) + populate(objectMap, "modelMountPath", o.ModelMountPath) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "provisioningState", o.ProvisioningState) + populate(objectMap, "readinessProbe", o.ReadinessProbe) + populate(objectMap, "requestSettings", o.RequestSettings) + populate(objectMap, "scaleSettings", o.ScaleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeploymentProperties. +func (o *OnlineDeploymentProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appInsightsEnabled": + err = unpopulate(val, "AppInsightsEnabled", &o.AppInsightsEnabled) + delete(rawMsg, key) + case "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &o.CodeConfiguration) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "egressPublicNetworkAccess": + err = unpopulate(val, "EgressPublicNetworkAccess", &o.EgressPublicNetworkAccess) + delete(rawMsg, key) + case "endpointComputeType": + err = unpopulate(val, "EndpointComputeType", &o.EndpointComputeType) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &o.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &o.EnvironmentVariables) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &o.InstanceType) + delete(rawMsg, key) + case "livenessProbe": + err = unpopulate(val, "LivenessProbe", &o.LivenessProbe) + delete(rawMsg, key) + case "model": + err = unpopulate(val, "Model", &o.Model) + delete(rawMsg, key) + case "modelMountPath": + err = unpopulate(val, "ModelMountPath", &o.ModelMountPath) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + case "readinessProbe": + err = unpopulate(val, "ReadinessProbe", &o.ReadinessProbe) + delete(rawMsg, key) + case "requestSettings": + err = unpopulate(val, "RequestSettings", &o.RequestSettings) + delete(rawMsg, key) + case "scaleSettings": + o.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentTrackedResourceArmPaginatedResult. +func (o OnlineDeploymentTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeploymentTrackedResourceArmPaginatedResult. +func (o *OnlineDeploymentTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineEndpoint. +func (o OnlineEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", o.ID) + populate(objectMap, "identity", o.Identity) + populate(objectMap, "kind", o.Kind) + populate(objectMap, "location", o.Location) + populate(objectMap, "name", o.Name) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "sku", o.SKU) + populate(objectMap, "systemData", o.SystemData) + populate(objectMap, "tags", o.Tags) + populate(objectMap, "type", o.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpoint. +func (o *OnlineEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &o.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &o.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &o.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &o.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &o.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &o.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &o.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &o.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &o.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineEndpointProperties. +func (o OnlineEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authMode", o.AuthMode) + populate(objectMap, "compute", o.Compute) + populate(objectMap, "description", o.Description) + populate(objectMap, "keys", o.Keys) + populate(objectMap, "mirrorTraffic", o.MirrorTraffic) + populate(objectMap, "properties", o.Properties) + populate(objectMap, "provisioningState", o.ProvisioningState) + populate(objectMap, "publicNetworkAccess", o.PublicNetworkAccess) + populate(objectMap, "scoringUri", o.ScoringURI) + populate(objectMap, "swaggerUri", o.SwaggerURI) + populate(objectMap, "traffic", o.Traffic) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpointProperties. +func (o *OnlineEndpointProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authMode": + err = unpopulate(val, "AuthMode", &o.AuthMode) + delete(rawMsg, key) + case "compute": + err = unpopulate(val, "Compute", &o.Compute) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &o.Description) + delete(rawMsg, key) + case "keys": + err = unpopulate(val, "Keys", &o.Keys) + delete(rawMsg, key) + case "mirrorTraffic": + err = unpopulate(val, "MirrorTraffic", &o.MirrorTraffic) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &o.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &o.PublicNetworkAccess) + delete(rawMsg, key) + case "scoringUri": + err = unpopulate(val, "ScoringURI", &o.ScoringURI) + delete(rawMsg, key) + case "swaggerUri": + err = unpopulate(val, "SwaggerURI", &o.SwaggerURI) + delete(rawMsg, key) + case "traffic": + err = unpopulate(val, "Traffic", &o.Traffic) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineEndpointTrackedResourceArmPaginatedResult. +func (o OnlineEndpointTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineEndpointTrackedResourceArmPaginatedResult. +func (o *OnlineEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &o.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &o.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineRequestSettings. +func (o OnlineRequestSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxConcurrentRequestsPerInstance", o.MaxConcurrentRequestsPerInstance) + populate(objectMap, "maxQueueWait", o.MaxQueueWait) + populate(objectMap, "requestTimeout", o.RequestTimeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineRequestSettings. +func (o *OnlineRequestSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxConcurrentRequestsPerInstance": + err = unpopulate(val, "MaxConcurrentRequestsPerInstance", &o.MaxConcurrentRequestsPerInstance) + delete(rawMsg, key) + case "maxQueueWait": + err = unpopulate(val, "MaxQueueWait", &o.MaxQueueWait) + delete(rawMsg, key) + case "requestTimeout": + err = unpopulate(val, "RequestTimeout", &o.RequestTimeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OnlineScaleSettings. +func (o OnlineScaleSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["scaleType"] = o.ScaleType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineScaleSettings. +func (o *OnlineScaleSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scaleType": + err = unpopulate(val, "ScaleType", &o.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OutputPathAssetReference. +func (o OutputPathAssetReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "jobId", o.JobID) + populate(objectMap, "path", o.Path) + objectMap["referenceType"] = ReferenceTypeOutputPath + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OutputPathAssetReference. +func (o *OutputPathAssetReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobId": + err = unpopulate(val, "JobID", &o.JobID) + delete(rawMsg, key) + case "path": + err = unpopulate(val, "Path", &o.Path) + delete(rawMsg, key) + case "referenceType": + err = unpopulate(val, "ReferenceType", &o.ReferenceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", o, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PATAuthTypeWorkspaceConnectionProperties. +func (p PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = ConnectionAuthTypePAT + populate(objectMap, "category", p.Category) + populate(objectMap, "credentials", p.Credentials) + populate(objectMap, "target", p.Target) + populate(objectMap, "value", p.Value) + populate(objectMap, "valueFormat", p.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PATAuthTypeWorkspaceConnectionProperties. +func (p *PATAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &p.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &p.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &p.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &p.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &p.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PaginatedComputeResourcesList. +func (p PaginatedComputeResourcesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PaginatedComputeResourcesList. +func (p *PaginatedComputeResourcesList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialBatchDeployment. +func (p PartialBatchDeployment) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", p.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialBatchDeployment. +func (p *PartialBatchDeployment) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. +func (p PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. +func (p *PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialManagedServiceIdentity. +func (p PartialManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "type", p.Type) + populate(objectMap, "userAssignedIdentities", p.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialManagedServiceIdentity. +func (p *PartialManagedServiceIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &p.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResource. +func (p PartialMinimalTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResource. +func (p *PartialMinimalTrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithIdentity. +func (p PartialMinimalTrackedResourceWithIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResourceWithIdentity. +func (p *PartialMinimalTrackedResourceWithIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithSKU. +func (p PartialMinimalTrackedResourceWithSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialMinimalTrackedResourceWithSKU. +func (p *PartialMinimalTrackedResourceWithSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialRegistryPartialTrackedResource. +func (p PartialRegistryPartialTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "properties", &p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialRegistryPartialTrackedResource. +func (p *PartialRegistryPartialTrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PartialSKU. +func (p PartialSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "capacity", p.Capacity) + populate(objectMap, "family", p.Family) + populate(objectMap, "name", p.Name) + populate(objectMap, "size", p.Size) + populate(objectMap, "tier", p.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialSKU. +func (p *PartialSKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &p.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &p.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &p.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &p.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Password. +func (p Password) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", p.Name) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Password. +func (p *Password) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PersonalComputeInstanceSettings. +func (p PersonalComputeInstanceSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assignedUser", p.AssignedUser) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PersonalComputeInstanceSettings. +func (p *PersonalComputeInstanceSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assignedUser": + err = unpopulate(val, "AssignedUser", &p.AssignedUser) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PipelineJob. +func (p PipelineJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "componentId", p.ComponentID) + populate(objectMap, "computeId", p.ComputeID) + populate(objectMap, "description", p.Description) + populate(objectMap, "displayName", p.DisplayName) + populate(objectMap, "experimentName", p.ExperimentName) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "inputs", p.Inputs) + populate(objectMap, "isArchived", p.IsArchived) + objectMap["jobType"] = JobTypePipeline + populate(objectMap, "jobs", p.Jobs) + populate(objectMap, "outputs", p.Outputs) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "services", p.Services) + populate(objectMap, "settings", &p.Settings) + populate(objectMap, "sourceJobId", p.SourceJobID) + populate(objectMap, "status", p.Status) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PipelineJob. +func (p *PipelineJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &p.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &p.ComputeID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &p.DisplayName) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &p.ExperimentName) + delete(rawMsg, key) + case "identity": + p.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "inputs": + p.Inputs, err = unmarshalJobInputClassificationMap(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &p.IsArchived) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &p.JobType) + delete(rawMsg, key) + case "jobs": + err = unpopulate(val, "Jobs", &p.Jobs) + delete(rawMsg, key) + case "outputs": + p.Outputs, err = unmarshalJobOutputClassificationMap(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &p.Services) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &p.Settings) + delete(rawMsg, key) + case "sourceJobId": + err = unpopulate(val, "SourceJobID", &p.SourceJobID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "subnetArmId", p.SubnetArmID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpoint. +func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "subnetArmId": + err = unpopulate(val, "SubnetArmID", &p.SubnetArmID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. +func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection. +func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult. +func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. +func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateEndpoint", p.PrivateEndpoint) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties. +func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "privateEndpoint": + err = unpopulate(val, "PrivateEndpoint", &p.PrivateEndpoint) + delete(rawMsg, key) + case "privateLinkServiceConnectionState": + err = unpopulate(val, "PrivateLinkServiceConnectionState", &p.PrivateLinkServiceConnectionState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. +func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", p.ID) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource. +func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &p.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. +func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult. +func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &p.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. +func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groupId", p.GroupID) + populate(objectMap, "requiredMembers", p.RequiredMembers) + populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties. +func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &p.GroupID) + delete(rawMsg, key) + case "requiredMembers": + err = unpopulate(val, "RequiredMembers", &p.RequiredMembers) + delete(rawMsg, key) + case "requiredZoneNames": + err = unpopulate(val, "RequiredZoneNames", &p.RequiredZoneNames) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. +func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionsRequired", p.ActionsRequired) + populate(objectMap, "description", p.Description) + populate(objectMap, "status", p.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionState. +func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionsRequired": + err = unpopulate(val, "ActionsRequired", &p.ActionsRequired) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &p.Description) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &p.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProbeSettings. +func (p ProbeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "failureThreshold", p.FailureThreshold) + populate(objectMap, "initialDelay", p.InitialDelay) + populate(objectMap, "period", p.Period) + populate(objectMap, "successThreshold", p.SuccessThreshold) + populate(objectMap, "timeout", p.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProbeSettings. +func (p *ProbeSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "failureThreshold": + err = unpopulate(val, "FailureThreshold", &p.FailureThreshold) + delete(rawMsg, key) + case "initialDelay": + err = unpopulate(val, "InitialDelay", &p.InitialDelay) + delete(rawMsg, key) + case "period": + err = unpopulate(val, "Period", &p.Period) + delete(rawMsg, key) + case "successThreshold": + err = unpopulate(val, "SuccessThreshold", &p.SuccessThreshold) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &p.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ProgressMetrics. +func (p ProgressMetrics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "completedDatapointCount", p.CompletedDatapointCount) + populateTimeRFC3339(objectMap, "incrementalDataLastRefreshDateTime", p.IncrementalDataLastRefreshDateTime) + populate(objectMap, "skippedDatapointCount", p.SkippedDatapointCount) + populate(objectMap, "totalDatapointCount", p.TotalDatapointCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProgressMetrics. +func (p *ProgressMetrics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "completedDatapointCount": + err = unpopulate(val, "CompletedDatapointCount", &p.CompletedDatapointCount) + delete(rawMsg, key) + case "incrementalDataLastRefreshDateTime": + err = unpopulateTimeRFC3339(val, "IncrementalDataLastRefreshDateTime", &p.IncrementalDataLastRefreshDateTime) + delete(rawMsg, key) + case "skippedDatapointCount": + err = unpopulate(val, "SkippedDatapointCount", &p.SkippedDatapointCount) + delete(rawMsg, key) + case "totalDatapointCount": + err = unpopulate(val, "TotalDatapointCount", &p.TotalDatapointCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PyTorch. +func (p PyTorch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["distributionType"] = DistributionTypePyTorch + populate(objectMap, "processCountPerInstance", p.ProcessCountPerInstance) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PyTorch. +func (p *PyTorch) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "distributionType": + err = unpopulate(val, "DistributionType", &p.DistributionType) + delete(rawMsg, key) + case "processCountPerInstance": + err = unpopulate(val, "ProcessCountPerInstance", &p.ProcessCountPerInstance) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaBaseProperties. +func (q QuotaBaseProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", q.ID) + populate(objectMap, "limit", q.Limit) + populate(objectMap, "type", q.Type) + populate(objectMap, "unit", q.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaBaseProperties. +func (q *QuotaBaseProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &q.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &q.Limit) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &q.Type) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &q.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type QuotaUpdateParameters. +func (q QuotaUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "location", q.Location) + populate(objectMap, "value", q.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QuotaUpdateParameters. +func (q *QuotaUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &q.Location) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &q.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", q, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RandomSamplingAlgorithm. +func (r RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "logbase", r.Logbase) + populate(objectMap, "rule", r.Rule) + objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeRandom + populate(objectMap, "seed", r.Seed) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RandomSamplingAlgorithm. +func (r *RandomSamplingAlgorithm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logbase": + err = unpopulate(val, "Logbase", &r.Logbase) + delete(rawMsg, key) + case "rule": + err = unpopulate(val, "Rule", &r.Rule) + delete(rawMsg, key) + case "samplingAlgorithmType": + err = unpopulate(val, "SamplingAlgorithmType", &r.SamplingAlgorithmType) + delete(rawMsg, key) + case "seed": + err = unpopulate(val, "Seed", &r.Seed) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Recurrence. +func (r Recurrence) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "frequency", r.Frequency) + populate(objectMap, "interval", r.Interval) + populate(objectMap, "schedule", r.Schedule) + populate(objectMap, "startTime", r.StartTime) + populate(objectMap, "timeZone", r.TimeZone) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Recurrence. +func (r *Recurrence) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "frequency": + err = unpopulate(val, "Frequency", &r.Frequency) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &r.Interval) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &r.Schedule) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &r.TimeZone) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecurrenceSchedule. +func (r RecurrenceSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hours", r.Hours) + populate(objectMap, "minutes", r.Minutes) + populate(objectMap, "monthDays", r.MonthDays) + populate(objectMap, "weekDays", r.WeekDays) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceSchedule. +func (r *RecurrenceSchedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hours": + err = unpopulate(val, "Hours", &r.Hours) + delete(rawMsg, key) + case "minutes": + err = unpopulate(val, "Minutes", &r.Minutes) + delete(rawMsg, key) + case "monthDays": + err = unpopulate(val, "MonthDays", &r.MonthDays) + delete(rawMsg, key) + case "weekDays": + err = unpopulate(val, "WeekDays", &r.WeekDays) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RecurrenceTrigger. +func (r RecurrenceTrigger) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endTime", r.EndTime) + populate(objectMap, "frequency", r.Frequency) + populate(objectMap, "interval", r.Interval) + populate(objectMap, "schedule", r.Schedule) + populate(objectMap, "startTime", r.StartTime) + populate(objectMap, "timeZone", r.TimeZone) + objectMap["triggerType"] = TriggerTypeRecurrence + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RecurrenceTrigger. +func (r *RecurrenceTrigger) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &r.EndTime) + delete(rawMsg, key) + case "frequency": + err = unpopulate(val, "Frequency", &r.Frequency) + delete(rawMsg, key) + case "interval": + err = unpopulate(val, "Interval", &r.Interval) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &r.Schedule) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &r.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &r.TimeZone) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &r.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegenerateEndpointKeysRequest. +func (r RegenerateEndpointKeysRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "keyType", r.KeyType) + populate(objectMap, "keyValue", r.KeyValue) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegenerateEndpointKeysRequest. +func (r *RegenerateEndpointKeysRequest) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "keyType": + err = unpopulate(val, "KeyType", &r.KeyType) + delete(rawMsg, key) + case "keyValue": + err = unpopulate(val, "KeyValue", &r.KeyValue) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Registry. +func (r Registry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "identity", r.Identity) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Registry. +func (r *Registry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &r.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistryListCredentialsResult. +func (r RegistryListCredentialsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "location", r.Location) + populate(objectMap, "passwords", r.Passwords) + populate(objectMap, "username", r.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryListCredentialsResult. +func (r *RegistryListCredentialsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "passwords": + err = unpopulate(val, "Passwords", &r.Passwords) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &r.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistryProperties. +func (r RegistryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", r.Description) + populate(objectMap, "discoveryUrl", r.DiscoveryURL) + populate(objectMap, "intellectualPropertyPublisher", r.IntellectualPropertyPublisher) + populate(objectMap, "managedResourceGroup", r.ManagedResourceGroup) + populate(objectMap, "mlFlowRegistryUri", r.MlFlowRegistryURI) + populate(objectMap, "privateLinkCount", r.PrivateLinkCount) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "publicNetworkAccess", r.PublicNetworkAccess) + populate(objectMap, "regionDetails", r.RegionDetails) + populate(objectMap, "tags", r.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryProperties. +func (r *RegistryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "discoveryUrl": + err = unpopulate(val, "DiscoveryURL", &r.DiscoveryURL) + delete(rawMsg, key) + case "intellectualPropertyPublisher": + err = unpopulate(val, "IntellectualPropertyPublisher", &r.IntellectualPropertyPublisher) + delete(rawMsg, key) + case "managedResourceGroup": + err = unpopulate(val, "ManagedResourceGroup", &r.ManagedResourceGroup) + delete(rawMsg, key) + case "mlFlowRegistryUri": + err = unpopulate(val, "MlFlowRegistryURI", &r.MlFlowRegistryURI) + delete(rawMsg, key) + case "privateLinkCount": + err = unpopulate(val, "PrivateLinkCount", &r.PrivateLinkCount) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &r.PublicNetworkAccess) + delete(rawMsg, key) + case "regionDetails": + err = unpopulate(val, "RegionDetails", &r.RegionDetails) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistryRegionArmDetails. +func (r RegistryRegionArmDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "acrDetails", r.AcrDetails) + populate(objectMap, "location", r.Location) + populate(objectMap, "storageAccountDetails", r.StorageAccountDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryRegionArmDetails. +func (r *RegistryRegionArmDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acrDetails": + err = unpopulate(val, "AcrDetails", &r.AcrDetails) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "storageAccountDetails": + err = unpopulate(val, "StorageAccountDetails", &r.StorageAccountDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistryTrackedResourceArmPaginatedResult. +func (r RegistryTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryTrackedResourceArmPaginatedResult. +func (r *RegistryTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Regression. +func (r Regression) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cvSplitColumnNames", r.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", r.FeaturizationSettings) + populate(objectMap, "fixedParameters", r.FixedParameters) + populate(objectMap, "limitSettings", r.LimitSettings) + populate(objectMap, "logVerbosity", r.LogVerbosity) + populate(objectMap, "nCrossValidations", r.NCrossValidations) + populate(objectMap, "primaryMetric", r.PrimaryMetric) + populate(objectMap, "searchSpace", r.SearchSpace) + populate(objectMap, "sweepSettings", r.SweepSettings) + populate(objectMap, "targetColumnName", r.TargetColumnName) + objectMap["taskType"] = TaskTypeRegression + populate(objectMap, "testData", r.TestData) + populate(objectMap, "testDataSize", r.TestDataSize) + populate(objectMap, "trainingData", r.TrainingData) + populate(objectMap, "trainingSettings", r.TrainingSettings) + populate(objectMap, "validationData", r.ValidationData) + populate(objectMap, "validationDataSize", r.ValidationDataSize) + populate(objectMap, "weightColumnName", r.WeightColumnName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Regression. +func (r *Regression) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cvSplitColumnNames": + err = unpopulate(val, "CvSplitColumnNames", &r.CvSplitColumnNames) + delete(rawMsg, key) + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &r.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &r.FixedParameters) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &r.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &r.LogVerbosity) + delete(rawMsg, key) + case "nCrossValidations": + r.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &r.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &r.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &r.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &r.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &r.TaskType) + delete(rawMsg, key) + case "testData": + err = unpopulate(val, "TestData", &r.TestData) + delete(rawMsg, key) + case "testDataSize": + err = unpopulate(val, "TestDataSize", &r.TestDataSize) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &r.TrainingData) + delete(rawMsg, key) + case "trainingSettings": + err = unpopulate(val, "TrainingSettings", &r.TrainingSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &r.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &r.ValidationDataSize) + delete(rawMsg, key) + case "weightColumnName": + err = unpopulate(val, "WeightColumnName", &r.WeightColumnName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegressionTrainingSettings. +func (r RegressionTrainingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowedTrainingAlgorithms", r.AllowedTrainingAlgorithms) + populate(objectMap, "blockedTrainingAlgorithms", r.BlockedTrainingAlgorithms) + populate(objectMap, "enableDnnTraining", r.EnableDnnTraining) + populate(objectMap, "enableModelExplainability", r.EnableModelExplainability) + populate(objectMap, "enableOnnxCompatibleModels", r.EnableOnnxCompatibleModels) + populate(objectMap, "enableStackEnsemble", r.EnableStackEnsemble) + populate(objectMap, "enableVoteEnsemble", r.EnableVoteEnsemble) + populate(objectMap, "ensembleModelDownloadTimeout", r.EnsembleModelDownloadTimeout) + populate(objectMap, "stackEnsembleSettings", r.StackEnsembleSettings) + populate(objectMap, "trainingMode", r.TrainingMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegressionTrainingSettings. +func (r *RegressionTrainingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedTrainingAlgorithms": + err = unpopulate(val, "AllowedTrainingAlgorithms", &r.AllowedTrainingAlgorithms) + delete(rawMsg, key) + case "blockedTrainingAlgorithms": + err = unpopulate(val, "BlockedTrainingAlgorithms", &r.BlockedTrainingAlgorithms) + delete(rawMsg, key) + case "enableDnnTraining": + err = unpopulate(val, "EnableDnnTraining", &r.EnableDnnTraining) + delete(rawMsg, key) + case "enableModelExplainability": + err = unpopulate(val, "EnableModelExplainability", &r.EnableModelExplainability) + delete(rawMsg, key) + case "enableOnnxCompatibleModels": + err = unpopulate(val, "EnableOnnxCompatibleModels", &r.EnableOnnxCompatibleModels) + delete(rawMsg, key) + case "enableStackEnsemble": + err = unpopulate(val, "EnableStackEnsemble", &r.EnableStackEnsemble) + delete(rawMsg, key) + case "enableVoteEnsemble": + err = unpopulate(val, "EnableVoteEnsemble", &r.EnableVoteEnsemble) + delete(rawMsg, key) + case "ensembleModelDownloadTimeout": + err = unpopulate(val, "EnsembleModelDownloadTimeout", &r.EnsembleModelDownloadTimeout) + delete(rawMsg, key) + case "stackEnsembleSettings": + err = unpopulate(val, "StackEnsembleSettings", &r.StackEnsembleSettings) + delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &r.TrainingMode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "name", r.Name) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Resource. +func (r *Resource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceBase. +func (r ResourceBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", r.Description) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceBase. +func (r *ResourceBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceConfiguration. +func (r ResourceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "instanceCount", r.InstanceCount) + populate(objectMap, "instanceType", r.InstanceType) + populate(objectMap, "properties", r.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceConfiguration. +func (r *ResourceConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceCount": + err = unpopulate(val, "InstanceCount", &r.InstanceCount) + delete(rawMsg, key) + case "instanceType": + err = unpopulate(val, "InstanceType", &r.InstanceType) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceID. +func (r ResourceID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceID. +func (r *ResourceID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceName. +func (r ResourceName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "localizedValue", r.LocalizedValue) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceName. +func (r *ResourceName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &r.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceQuota. +func (r ResourceQuota) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "amlWorkspaceLocation", r.AmlWorkspaceLocation) + populate(objectMap, "id", r.ID) + populate(objectMap, "limit", r.Limit) + populate(objectMap, "name", r.Name) + populate(objectMap, "type", r.Type) + populate(objectMap, "unit", r.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ResourceQuota. +func (r *ResourceQuota) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amlWorkspaceLocation": + err = unpopulate(val, "AmlWorkspaceLocation", &r.AmlWorkspaceLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &r.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &r.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Route. +func (r Route) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "path", r.Path) + populate(objectMap, "port", r.Port) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Route. +func (r *Route) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "path": + err = unpopulate(val, "Path", &r.Path) + delete(rawMsg, key) + case "port": + err = unpopulate(val, "Port", &r.Port) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SASAuthTypeWorkspaceConnectionProperties. +func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = ConnectionAuthTypeSAS + populate(objectMap, "category", s.Category) + populate(objectMap, "credentials", s.Credentials) + populate(objectMap, "target", s.Target) + populate(objectMap, "value", s.Value) + populate(objectMap, "valueFormat", s.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SASAuthTypeWorkspaceConnectionProperties. +func (s *SASAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &s.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &s.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &s.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &s.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKU. +func (s SKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "family", s.Family) + populate(objectMap, "name", s.Name) + populate(objectMap, "size", s.Size) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKU. +func (s *SKU) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &s.Family) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "size": + err = unpopulate(val, "Size", &s.Size) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUCapacity. +func (s SKUCapacity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "default", s.Default) + populate(objectMap, "maximum", s.Maximum) + populate(objectMap, "minimum", s.Minimum) + populate(objectMap, "scaleType", s.ScaleType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUCapacity. +func (s *SKUCapacity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "default": + err = unpopulate(val, "Default", &s.Default) + delete(rawMsg, key) + case "maximum": + err = unpopulate(val, "Maximum", &s.Maximum) + delete(rawMsg, key) + case "minimum": + err = unpopulate(val, "Minimum", &s.Minimum) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &s.ScaleType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUResource. +func (s SKUResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "capacity", s.Capacity) + populate(objectMap, "resourceType", s.ResourceType) + populate(objectMap, "sku", s.SKU) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResource. +func (s *SKUResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "capacity": + err = unpopulate(val, "Capacity", &s.Capacity) + delete(rawMsg, key) + case "resourceType": + err = unpopulate(val, "ResourceType", &s.ResourceType) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &s.SKU) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUResourceArmPaginatedResult. +func (s SKUResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUResourceArmPaginatedResult. +func (s *SKUResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SKUSetting. +func (s SKUSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", s.Name) + populate(objectMap, "tier", s.Tier) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SKUSetting. +func (s *SKUSetting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &s.Tier) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SSLConfiguration. +func (s SSLConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cert", s.Cert) + populate(objectMap, "cname", s.Cname) + populate(objectMap, "key", s.Key) + populate(objectMap, "leafDomainLabel", s.LeafDomainLabel) + populate(objectMap, "overwriteExistingDomain", s.OverwriteExistingDomain) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SSLConfiguration. +func (s *SSLConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cert": + err = unpopulate(val, "Cert", &s.Cert) + delete(rawMsg, key) + case "cname": + err = unpopulate(val, "Cname", &s.Cname) + delete(rawMsg, key) + case "key": + err = unpopulate(val, "Key", &s.Key) + delete(rawMsg, key) + case "leafDomainLabel": + err = unpopulate(val, "LeafDomainLabel", &s.LeafDomainLabel) + delete(rawMsg, key) + case "overwriteExistingDomain": + err = unpopulate(val, "OverwriteExistingDomain", &s.OverwriteExistingDomain) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SamplingAlgorithm. +func (s SamplingAlgorithm) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["samplingAlgorithmType"] = s.SamplingAlgorithmType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SamplingAlgorithm. +func (s *SamplingAlgorithm) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "samplingAlgorithmType": + err = unpopulate(val, "SamplingAlgorithmType", &s.SamplingAlgorithmType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SasDatastoreCredentials. +func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["credentialsType"] = CredentialsTypeSas + populate(objectMap, "secrets", s.Secrets) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreCredentials. +func (s *SasDatastoreCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "credentialsType": + err = unpopulate(val, "CredentialsType", &s.CredentialsType) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &s.Secrets) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SasDatastoreSecrets. +func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sasToken", s.SasToken) + objectMap["secretsType"] = SecretsTypeSas + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreSecrets. +func (s *SasDatastoreSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sasToken": + err = unpopulate(val, "SasToken", &s.SasToken) + delete(rawMsg, key) + case "secretsType": + err = unpopulate(val, "SecretsType", &s.SecretsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleSettings. +func (s ScaleSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxNodeCount", s.MaxNodeCount) + populate(objectMap, "minNodeCount", s.MinNodeCount) + populate(objectMap, "nodeIdleTimeBeforeScaleDown", s.NodeIdleTimeBeforeScaleDown) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettings. +func (s *ScaleSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxNodeCount": + err = unpopulate(val, "MaxNodeCount", &s.MaxNodeCount) + delete(rawMsg, key) + case "minNodeCount": + err = unpopulate(val, "MinNodeCount", &s.MinNodeCount) + delete(rawMsg, key) + case "nodeIdleTimeBeforeScaleDown": + err = unpopulate(val, "NodeIdleTimeBeforeScaleDown", &s.NodeIdleTimeBeforeScaleDown) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScaleSettingsInformation. +func (s ScaleSettingsInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "scaleSettings", s.ScaleSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleSettingsInformation. +func (s *ScaleSettingsInformation) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scaleSettings": + err = unpopulate(val, "ScaleSettings", &s.ScaleSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Schedule. +func (s Schedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "systemData", s.SystemData) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Schedule. +func (s *Schedule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &s.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &s.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScheduleActionBase. +func (s ScheduleActionBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["actionType"] = s.ActionType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleActionBase. +func (s *ScheduleActionBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "actionType": + err = unpopulate(val, "ActionType", &s.ActionType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScheduleBase. +func (s ScheduleBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "provisioningStatus", s.ProvisioningStatus) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleBase. +func (s *ScheduleBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &s.ID) + delete(rawMsg, key) + case "provisioningStatus": + err = unpopulate(val, "ProvisioningStatus", &s.ProvisioningStatus) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScheduleProperties. +func (s ScheduleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", s.Action) + populate(objectMap, "description", s.Description) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "isEnabled", s.IsEnabled) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "trigger", s.Trigger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleProperties. +func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + s.Action, err = unmarshalScheduleActionBaseClassification(val) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "isEnabled": + err = unpopulate(val, "IsEnabled", &s.IsEnabled) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "trigger": + s.Trigger, err = unmarshalTriggerBaseClassification(val) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScheduleResourceArmPaginatedResult. +func (s ScheduleResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScheduleResourceArmPaginatedResult. +func (s *ScheduleResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &s.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptReference. +func (s ScriptReference) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "scriptArguments", s.ScriptArguments) + populate(objectMap, "scriptData", s.ScriptData) + populate(objectMap, "scriptSource", s.ScriptSource) + populate(objectMap, "timeout", s.Timeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptReference. +func (s *ScriptReference) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scriptArguments": + err = unpopulate(val, "ScriptArguments", &s.ScriptArguments) + delete(rawMsg, key) + case "scriptData": + err = unpopulate(val, "ScriptData", &s.ScriptData) + delete(rawMsg, key) + case "scriptSource": + err = unpopulate(val, "ScriptSource", &s.ScriptSource) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &s.Timeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ScriptsToExecute. +func (s ScriptsToExecute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "creationScript", s.CreationScript) + populate(objectMap, "startupScript", s.StartupScript) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ScriptsToExecute. +func (s *ScriptsToExecute) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "creationScript": + err = unpopulate(val, "CreationScript", &s.CreationScript) + delete(rawMsg, key) + case "startupScript": + err = unpopulate(val, "StartupScript", &s.StartupScript) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Seasonality. +func (s Seasonality) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = s.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Seasonality. +func (s *Seasonality) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &s.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceManagedResourcesSettings. +func (s ServiceManagedResourcesSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cosmosDb", s.CosmosDb) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceManagedResourcesSettings. +func (s *ServiceManagedResourcesSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cosmosDb": + err = unpopulate(val, "CosmosDb", &s.CosmosDb) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s ServicePrincipalAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = ConnectionAuthTypeServicePrincipal + populate(objectMap, "category", s.Category) + populate(objectMap, "credentials", s.Credentials) + populate(objectMap, "target", s.Target) + populate(objectMap, "value", s.Value) + populate(objectMap, "valueFormat", s.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s *ServicePrincipalAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &s.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &s.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &s.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &s.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreCredentials. +func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authorityUrl", s.AuthorityURL) + populate(objectMap, "clientId", s.ClientID) + objectMap["credentialsType"] = CredentialsTypeServicePrincipal + populate(objectMap, "resourceUrl", s.ResourceURL) + populate(objectMap, "secrets", s.Secrets) + populate(objectMap, "tenantId", s.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreCredentials. +func (s *ServicePrincipalDatastoreCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorityUrl": + err = unpopulate(val, "AuthorityURL", &s.AuthorityURL) + delete(rawMsg, key) + case "clientId": + err = unpopulate(val, "ClientID", &s.ClientID) + delete(rawMsg, key) + case "credentialsType": + err = unpopulate(val, "CredentialsType", &s.CredentialsType) + delete(rawMsg, key) + case "resourceUrl": + err = unpopulate(val, "ResourceURL", &s.ResourceURL) + delete(rawMsg, key) + case "secrets": + err = unpopulate(val, "Secrets", &s.Secrets) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &s.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreSecrets. +func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientSecret", s.ClientSecret) + objectMap["secretsType"] = SecretsTypeServicePrincipal + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreSecrets. +func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientSecret": + err = unpopulate(val, "ClientSecret", &s.ClientSecret) + delete(rawMsg, key) + case "secretsType": + err = unpopulate(val, "SecretsType", &s.SecretsType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SetupScripts. +func (s SetupScripts) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "scripts", s.Scripts) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SetupScripts. +func (s *SetupScripts) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "scripts": + err = unpopulate(val, "Scripts", &s.Scripts) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResource. +func (s SharedPrivateLinkResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResource. +func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &s.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SharedPrivateLinkResourceProperty. +func (s SharedPrivateLinkResourceProperty) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groupId", s.GroupID) + populate(objectMap, "privateLinkResourceId", s.PrivateLinkResourceID) + populate(objectMap, "requestMessage", s.RequestMessage) + populate(objectMap, "status", s.Status) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperty. +func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "groupId": + err = unpopulate(val, "GroupID", &s.GroupID) + delete(rawMsg, key) + case "privateLinkResourceId": + err = unpopulate(val, "PrivateLinkResourceID", &s.PrivateLinkResourceID) + delete(rawMsg, key) + case "requestMessage": + err = unpopulate(val, "RequestMessage", &s.RequestMessage) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkJob. +func (s SparkJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "archives", s.Archives) + populate(objectMap, "args", s.Args) + populate(objectMap, "codeId", s.CodeID) + populate(objectMap, "componentId", s.ComponentID) + populate(objectMap, "computeId", s.ComputeID) + populate(objectMap, "conf", s.Conf) + populate(objectMap, "description", s.Description) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "entry", s.Entry) + populate(objectMap, "environmentId", s.EnvironmentID) + populate(objectMap, "experimentName", s.ExperimentName) + populate(objectMap, "files", s.Files) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "inputs", s.Inputs) + populate(objectMap, "isArchived", s.IsArchived) + populate(objectMap, "jars", s.Jars) + objectMap["jobType"] = JobTypeSpark + populate(objectMap, "outputs", s.Outputs) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "pyFiles", s.PyFiles) + populate(objectMap, "resources", s.Resources) + populate(objectMap, "services", s.Services) + populate(objectMap, "status", s.Status) + populate(objectMap, "tags", s.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJob. +func (s *SparkJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "archives": + err = unpopulate(val, "Archives", &s.Archives) + delete(rawMsg, key) + case "args": + err = unpopulate(val, "Args", &s.Args) + delete(rawMsg, key) + case "codeId": + err = unpopulate(val, "CodeID", &s.CodeID) + delete(rawMsg, key) + case "componentId": + err = unpopulate(val, "ComponentID", &s.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &s.ComputeID) + delete(rawMsg, key) + case "conf": + err = unpopulate(val, "Conf", &s.Conf) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "entry": + s.Entry, err = unmarshalSparkJobEntryClassification(val) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &s.EnvironmentID) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &s.ExperimentName) + delete(rawMsg, key) + case "files": + err = unpopulate(val, "Files", &s.Files) + delete(rawMsg, key) + case "identity": + s.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "inputs": + s.Inputs, err = unmarshalJobInputClassificationMap(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &s.IsArchived) + delete(rawMsg, key) + case "jars": + err = unpopulate(val, "Jars", &s.Jars) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &s.JobType) + delete(rawMsg, key) + case "outputs": + s.Outputs, err = unmarshalJobOutputClassificationMap(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "pyFiles": + err = unpopulate(val, "PyFiles", &s.PyFiles) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &s.Resources) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &s.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkJobEntry. +func (s SparkJobEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["sparkJobEntryType"] = s.SparkJobEntryType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJobEntry. +func (s *SparkJobEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkJobPythonEntry. +func (s SparkJobPythonEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "file", s.File) + objectMap["sparkJobEntryType"] = SparkJobEntryTypeSparkJobPythonEntry + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJobPythonEntry. +func (s *SparkJobPythonEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "file": + err = unpopulate(val, "File", &s.File) + delete(rawMsg, key) + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkJobScalaEntry. +func (s SparkJobScalaEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "className", s.ClassName) + objectMap["sparkJobEntryType"] = SparkJobEntryTypeSparkJobScalaEntry + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkJobScalaEntry. +func (s *SparkJobScalaEntry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "className": + err = unpopulate(val, "ClassName", &s.ClassName) + delete(rawMsg, key) + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SparkResourceConfiguration. +func (s SparkResourceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "instanceType", s.InstanceType) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SparkResourceConfiguration. +func (s *SparkResourceConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) + delete(rawMsg, key) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StackEnsembleSettings. +func (s StackEnsembleSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "stackMetaLearnerKWargs", &s.StackMetaLearnerKWargs) + populate(objectMap, "stackMetaLearnerTrainPercentage", s.StackMetaLearnerTrainPercentage) + populate(objectMap, "stackMetaLearnerType", s.StackMetaLearnerType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StackEnsembleSettings. +func (s *StackEnsembleSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "stackMetaLearnerKWargs": + err = unpopulate(val, "StackMetaLearnerKWargs", &s.StackMetaLearnerKWargs) + delete(rawMsg, key) + case "stackMetaLearnerTrainPercentage": + err = unpopulate(val, "StackMetaLearnerTrainPercentage", &s.StackMetaLearnerTrainPercentage) + delete(rawMsg, key) + case "stackMetaLearnerType": + err = unpopulate(val, "StackMetaLearnerType", &s.StackMetaLearnerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StatusMessage. +func (s StatusMessage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", s.Code) + populateTimeRFC3339(objectMap, "createdDateTime", s.CreatedDateTime) + populate(objectMap, "level", s.Level) + populate(objectMap, "message", s.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StatusMessage. +func (s *StatusMessage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &s.Code) + delete(rawMsg, key) + case "createdDateTime": + err = unpopulateTimeRFC3339(val, "CreatedDateTime", &s.CreatedDateTime) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &s.Level) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageAccountDetails. +func (s StorageAccountDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "systemCreatedStorageAccount", s.SystemCreatedStorageAccount) + populate(objectMap, "userCreatedStorageAccount", s.UserCreatedStorageAccount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccountDetails. +func (s *StorageAccountDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "systemCreatedStorageAccount": + err = unpopulate(val, "SystemCreatedStorageAccount", &s.SystemCreatedStorageAccount) + delete(rawMsg, key) + case "userCreatedStorageAccount": + err = unpopulate(val, "UserCreatedStorageAccount", &s.UserCreatedStorageAccount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SweepJob. +func (s SweepJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "componentId", s.ComponentID) + populate(objectMap, "computeId", s.ComputeID) + populate(objectMap, "description", s.Description) + populate(objectMap, "displayName", s.DisplayName) + populate(objectMap, "earlyTermination", s.EarlyTermination) + populate(objectMap, "experimentName", s.ExperimentName) + populate(objectMap, "identity", s.Identity) + populate(objectMap, "inputs", s.Inputs) + populate(objectMap, "isArchived", s.IsArchived) + objectMap["jobType"] = JobTypeSweep + populate(objectMap, "limits", s.Limits) + populate(objectMap, "objective", s.Objective) + populate(objectMap, "outputs", s.Outputs) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "samplingAlgorithm", s.SamplingAlgorithm) + populate(objectMap, "searchSpace", &s.SearchSpace) + populate(objectMap, "services", s.Services) + populate(objectMap, "status", s.Status) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "trial", s.Trial) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SweepJob. +func (s *SweepJob) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "componentId": + err = unpopulate(val, "ComponentID", &s.ComponentID) + delete(rawMsg, key) + case "computeId": + err = unpopulate(val, "ComputeID", &s.ComputeID) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &s.DisplayName) + delete(rawMsg, key) + case "earlyTermination": + s.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) + delete(rawMsg, key) + case "experimentName": + err = unpopulate(val, "ExperimentName", &s.ExperimentName) + delete(rawMsg, key) + case "identity": + s.Identity, err = unmarshalIdentityConfigurationClassification(val) + delete(rawMsg, key) + case "inputs": + s.Inputs, err = unmarshalJobInputClassificationMap(val) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &s.IsArchived) + delete(rawMsg, key) + case "jobType": + err = unpopulate(val, "JobType", &s.JobType) + delete(rawMsg, key) + case "limits": + err = unpopulate(val, "Limits", &s.Limits) + delete(rawMsg, key) + case "objective": + err = unpopulate(val, "Objective", &s.Objective) + delete(rawMsg, key) + case "outputs": + s.Outputs, err = unmarshalJobOutputClassificationMap(val) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "samplingAlgorithm": + s.SamplingAlgorithm, err = unmarshalSamplingAlgorithmClassification(val) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &s.SearchSpace) + delete(rawMsg, key) + case "services": + err = unpopulate(val, "Services", &s.Services) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &s.Tags) + delete(rawMsg, key) + case "trial": + err = unpopulate(val, "Trial", &s.Trial) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SweepJobLimits. +func (s SweepJobLimits) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["jobLimitsType"] = JobLimitsTypeSweep + populate(objectMap, "maxConcurrentTrials", s.MaxConcurrentTrials) + populate(objectMap, "maxTotalTrials", s.MaxTotalTrials) + populate(objectMap, "timeout", s.Timeout) + populate(objectMap, "trialTimeout", s.TrialTimeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SweepJobLimits. +func (s *SweepJobLimits) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "jobLimitsType": + err = unpopulate(val, "JobLimitsType", &s.JobLimitsType) + delete(rawMsg, key) + case "maxConcurrentTrials": + err = unpopulate(val, "MaxConcurrentTrials", &s.MaxConcurrentTrials) + delete(rawMsg, key) + case "maxTotalTrials": + err = unpopulate(val, "MaxTotalTrials", &s.MaxTotalTrials) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &s.Timeout) + delete(rawMsg, key) + case "trialTimeout": + err = unpopulate(val, "TrialTimeout", &s.TrialTimeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SynapseSpark. +func (s SynapseSpark) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", s.ComputeLocation) + objectMap["computeType"] = ComputeTypeSynapseSpark + populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) + populate(objectMap, "description", s.Description) + populate(objectMap, "disableLocalAuth", s.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", s.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", s.ModifiedOn) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "provisioningErrors", s.ProvisioningErrors) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceId", s.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SynapseSpark. +func (s *SynapseSpark) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &s.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &s.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &s.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &s.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &s.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &s.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &s.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &s.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &s.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SynapseSparkProperties. +func (s SynapseSparkProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "autoPauseProperties", s.AutoPauseProperties) + populate(objectMap, "autoScaleProperties", s.AutoScaleProperties) + populate(objectMap, "nodeCount", s.NodeCount) + populate(objectMap, "nodeSize", s.NodeSize) + populate(objectMap, "nodeSizeFamily", s.NodeSizeFamily) + populate(objectMap, "poolName", s.PoolName) + populate(objectMap, "resourceGroup", s.ResourceGroup) + populate(objectMap, "sparkVersion", s.SparkVersion) + populate(objectMap, "subscriptionId", s.SubscriptionID) + populate(objectMap, "workspaceName", s.WorkspaceName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SynapseSparkProperties. +func (s *SynapseSparkProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "autoPauseProperties": + err = unpopulate(val, "AutoPauseProperties", &s.AutoPauseProperties) + delete(rawMsg, key) + case "autoScaleProperties": + err = unpopulate(val, "AutoScaleProperties", &s.AutoScaleProperties) + delete(rawMsg, key) + case "nodeCount": + err = unpopulate(val, "NodeCount", &s.NodeCount) + delete(rawMsg, key) + case "nodeSize": + err = unpopulate(val, "NodeSize", &s.NodeSize) + delete(rawMsg, key) + case "nodeSizeFamily": + err = unpopulate(val, "NodeSizeFamily", &s.NodeSizeFamily) + delete(rawMsg, key) + case "poolName": + err = unpopulate(val, "PoolName", &s.PoolName) + delete(rawMsg, key) + case "resourceGroup": + err = unpopulate(val, "ResourceGroup", &s.ResourceGroup) + delete(rawMsg, key) + case "sparkVersion": + err = unpopulate(val, "SparkVersion", &s.SparkVersion) + delete(rawMsg, key) + case "subscriptionId": + err = unpopulate(val, "SubscriptionID", &s.SubscriptionID) + delete(rawMsg, key) + case "workspaceName": + err = unpopulate(val, "WorkspaceName", &s.WorkspaceName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemCreatedAcrAccount. +func (s SystemCreatedAcrAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "acrAccountSku", s.AcrAccountSKU) + populate(objectMap, "armResourceId", s.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemCreatedAcrAccount. +func (s *SystemCreatedAcrAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acrAccountSku": + err = unpopulate(val, "AcrAccountSKU", &s.AcrAccountSKU) + delete(rawMsg, key) + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &s.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemCreatedStorageAccount. +func (s SystemCreatedStorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowBlobPublicAccess", s.AllowBlobPublicAccess) + populate(objectMap, "armResourceId", s.ArmResourceID) + populate(objectMap, "storageAccountHnsEnabled", s.StorageAccountHnsEnabled) + populate(objectMap, "storageAccountType", s.StorageAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemCreatedStorageAccount. +func (s *SystemCreatedStorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowBlobPublicAccess": + err = unpopulate(val, "AllowBlobPublicAccess", &s.AllowBlobPublicAccess) + delete(rawMsg, key) + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &s.ArmResourceID) + delete(rawMsg, key) + case "storageAccountHnsEnabled": + err = unpopulate(val, "StorageAccountHnsEnabled", &s.StorageAccountHnsEnabled) + delete(rawMsg, key) + case "storageAccountType": + err = unpopulate(val, "StorageAccountType", &s.StorageAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemData. +func (s SystemData) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) + populate(objectMap, "createdBy", s.CreatedBy) + populate(objectMap, "createdByType", s.CreatedByType) + populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) + populate(objectMap, "lastModifiedBy", s.LastModifiedBy) + populate(objectMap, "lastModifiedByType", s.LastModifiedByType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. +func (s *SystemData) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "createdAt": + err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) + delete(rawMsg, key) + case "createdBy": + err = unpopulate(val, "CreatedBy", &s.CreatedBy) + delete(rawMsg, key) + case "createdByType": + err = unpopulate(val, "CreatedByType", &s.CreatedByType) + delete(rawMsg, key) + case "lastModifiedAt": + err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + delete(rawMsg, key) + case "lastModifiedBy": + err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + delete(rawMsg, key) + case "lastModifiedByType": + err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemService. +func (s SystemService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "publicIpAddress", s.PublicIPAddress) + populate(objectMap, "systemServiceType", s.SystemServiceType) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemService. +func (s *SystemService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &s.PublicIPAddress) + delete(rawMsg, key) + case "systemServiceType": + err = unpopulate(val, "SystemServiceType", &s.SystemServiceType) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableFixedParameters. +func (t TableFixedParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "booster", t.Booster) + populate(objectMap, "boostingType", t.BoostingType) + populate(objectMap, "growPolicy", t.GrowPolicy) + populate(objectMap, "learningRate", t.LearningRate) + populate(objectMap, "maxBin", t.MaxBin) + populate(objectMap, "maxDepth", t.MaxDepth) + populate(objectMap, "maxLeaves", t.MaxLeaves) + populate(objectMap, "minDataInLeaf", t.MinDataInLeaf) + populate(objectMap, "minSplitGain", t.MinSplitGain) + populate(objectMap, "modelName", t.ModelName) + populate(objectMap, "nEstimators", t.NEstimators) + populate(objectMap, "numLeaves", t.NumLeaves) + populate(objectMap, "preprocessorName", t.PreprocessorName) + populate(objectMap, "regAlpha", t.RegAlpha) + populate(objectMap, "regLambda", t.RegLambda) + populate(objectMap, "subsample", t.Subsample) + populate(objectMap, "subsampleFreq", t.SubsampleFreq) + populate(objectMap, "treeMethod", t.TreeMethod) + populate(objectMap, "withMean", t.WithMean) + populate(objectMap, "withStd", t.WithStd) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableFixedParameters. +func (t *TableFixedParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "booster": + err = unpopulate(val, "Booster", &t.Booster) + delete(rawMsg, key) + case "boostingType": + err = unpopulate(val, "BoostingType", &t.BoostingType) + delete(rawMsg, key) + case "growPolicy": + err = unpopulate(val, "GrowPolicy", &t.GrowPolicy) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &t.LearningRate) + delete(rawMsg, key) + case "maxBin": + err = unpopulate(val, "MaxBin", &t.MaxBin) + delete(rawMsg, key) + case "maxDepth": + err = unpopulate(val, "MaxDepth", &t.MaxDepth) + delete(rawMsg, key) + case "maxLeaves": + err = unpopulate(val, "MaxLeaves", &t.MaxLeaves) + delete(rawMsg, key) + case "minDataInLeaf": + err = unpopulate(val, "MinDataInLeaf", &t.MinDataInLeaf) + delete(rawMsg, key) + case "minSplitGain": + err = unpopulate(val, "MinSplitGain", &t.MinSplitGain) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &t.ModelName) + delete(rawMsg, key) + case "nEstimators": + err = unpopulate(val, "NEstimators", &t.NEstimators) + delete(rawMsg, key) + case "numLeaves": + err = unpopulate(val, "NumLeaves", &t.NumLeaves) + delete(rawMsg, key) + case "preprocessorName": + err = unpopulate(val, "PreprocessorName", &t.PreprocessorName) + delete(rawMsg, key) + case "regAlpha": + err = unpopulate(val, "RegAlpha", &t.RegAlpha) + delete(rawMsg, key) + case "regLambda": + err = unpopulate(val, "RegLambda", &t.RegLambda) + delete(rawMsg, key) + case "subsample": + err = unpopulate(val, "Subsample", &t.Subsample) + delete(rawMsg, key) + case "subsampleFreq": + err = unpopulate(val, "SubsampleFreq", &t.SubsampleFreq) + delete(rawMsg, key) + case "treeMethod": + err = unpopulate(val, "TreeMethod", &t.TreeMethod) + delete(rawMsg, key) + case "withMean": + err = unpopulate(val, "WithMean", &t.WithMean) + delete(rawMsg, key) + case "withStd": + err = unpopulate(val, "WithStd", &t.WithStd) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableParameterSubspace. +func (t TableParameterSubspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "booster", t.Booster) + populate(objectMap, "boostingType", t.BoostingType) + populate(objectMap, "growPolicy", t.GrowPolicy) + populate(objectMap, "learningRate", t.LearningRate) + populate(objectMap, "maxBin", t.MaxBin) + populate(objectMap, "maxDepth", t.MaxDepth) + populate(objectMap, "maxLeaves", t.MaxLeaves) + populate(objectMap, "minDataInLeaf", t.MinDataInLeaf) + populate(objectMap, "minSplitGain", t.MinSplitGain) + populate(objectMap, "modelName", t.ModelName) + populate(objectMap, "nEstimators", t.NEstimators) + populate(objectMap, "numLeaves", t.NumLeaves) + populate(objectMap, "preprocessorName", t.PreprocessorName) + populate(objectMap, "regAlpha", t.RegAlpha) + populate(objectMap, "regLambda", t.RegLambda) + populate(objectMap, "subsample", t.Subsample) + populate(objectMap, "subsampleFreq", t.SubsampleFreq) + populate(objectMap, "treeMethod", t.TreeMethod) + populate(objectMap, "withMean", t.WithMean) + populate(objectMap, "withStd", t.WithStd) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableParameterSubspace. +func (t *TableParameterSubspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "booster": + err = unpopulate(val, "Booster", &t.Booster) + delete(rawMsg, key) + case "boostingType": + err = unpopulate(val, "BoostingType", &t.BoostingType) + delete(rawMsg, key) + case "growPolicy": + err = unpopulate(val, "GrowPolicy", &t.GrowPolicy) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &t.LearningRate) + delete(rawMsg, key) + case "maxBin": + err = unpopulate(val, "MaxBin", &t.MaxBin) + delete(rawMsg, key) + case "maxDepth": + err = unpopulate(val, "MaxDepth", &t.MaxDepth) + delete(rawMsg, key) + case "maxLeaves": + err = unpopulate(val, "MaxLeaves", &t.MaxLeaves) + delete(rawMsg, key) + case "minDataInLeaf": + err = unpopulate(val, "MinDataInLeaf", &t.MinDataInLeaf) + delete(rawMsg, key) + case "minSplitGain": + err = unpopulate(val, "MinSplitGain", &t.MinSplitGain) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &t.ModelName) + delete(rawMsg, key) + case "nEstimators": + err = unpopulate(val, "NEstimators", &t.NEstimators) + delete(rawMsg, key) + case "numLeaves": + err = unpopulate(val, "NumLeaves", &t.NumLeaves) + delete(rawMsg, key) + case "preprocessorName": + err = unpopulate(val, "PreprocessorName", &t.PreprocessorName) + delete(rawMsg, key) + case "regAlpha": + err = unpopulate(val, "RegAlpha", &t.RegAlpha) + delete(rawMsg, key) + case "regLambda": + err = unpopulate(val, "RegLambda", &t.RegLambda) + delete(rawMsg, key) + case "subsample": + err = unpopulate(val, "Subsample", &t.Subsample) + delete(rawMsg, key) + case "subsampleFreq": + err = unpopulate(val, "SubsampleFreq", &t.SubsampleFreq) + delete(rawMsg, key) + case "treeMethod": + err = unpopulate(val, "TreeMethod", &t.TreeMethod) + delete(rawMsg, key) + case "withMean": + err = unpopulate(val, "WithMean", &t.WithMean) + delete(rawMsg, key) + case "withStd": + err = unpopulate(val, "WithStd", &t.WithStd) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableSweepSettings. +func (t TableSweepSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "earlyTermination", t.EarlyTermination) + populate(objectMap, "samplingAlgorithm", t.SamplingAlgorithm) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableSweepSettings. +func (t *TableSweepSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "earlyTermination": + t.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) + delete(rawMsg, key) + case "samplingAlgorithm": + err = unpopulate(val, "SamplingAlgorithm", &t.SamplingAlgorithm) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableVertical. +func (t TableVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cvSplitColumnNames", t.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) + populate(objectMap, "limitSettings", t.LimitSettings) + populate(objectMap, "nCrossValidations", t.NCrossValidations) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) + populate(objectMap, "testData", t.TestData) + populate(objectMap, "testDataSize", t.TestDataSize) + populate(objectMap, "validationData", t.ValidationData) + populate(objectMap, "validationDataSize", t.ValidationDataSize) + populate(objectMap, "weightColumnName", t.WeightColumnName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableVertical. +func (t *TableVertical) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cvSplitColumnNames": + err = unpopulate(val, "CvSplitColumnNames", &t.CvSplitColumnNames) + delete(rawMsg, key) + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &t.LimitSettings) + delete(rawMsg, key) + case "nCrossValidations": + t.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) + case "testData": + err = unpopulate(val, "TestData", &t.TestData) + delete(rawMsg, key) + case "testDataSize": + err = unpopulate(val, "TestDataSize", &t.TestDataSize) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &t.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &t.ValidationDataSize) + delete(rawMsg, key) + case "weightColumnName": + err = unpopulate(val, "WeightColumnName", &t.WeightColumnName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableVerticalFeaturizationSettings. +func (t TableVerticalFeaturizationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "blockedTransformers", t.BlockedTransformers) + populate(objectMap, "columnNameAndTypes", t.ColumnNameAndTypes) + populate(objectMap, "datasetLanguage", t.DatasetLanguage) + populate(objectMap, "enableDnnFeaturization", t.EnableDnnFeaturization) + populate(objectMap, "mode", t.Mode) + populate(objectMap, "transformerParams", t.TransformerParams) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableVerticalFeaturizationSettings. +func (t *TableVerticalFeaturizationSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "blockedTransformers": + err = unpopulate(val, "BlockedTransformers", &t.BlockedTransformers) + delete(rawMsg, key) + case "columnNameAndTypes": + err = unpopulate(val, "ColumnNameAndTypes", &t.ColumnNameAndTypes) + delete(rawMsg, key) + case "datasetLanguage": + err = unpopulate(val, "DatasetLanguage", &t.DatasetLanguage) + delete(rawMsg, key) + case "enableDnnFeaturization": + err = unpopulate(val, "EnableDnnFeaturization", &t.EnableDnnFeaturization) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &t.Mode) + delete(rawMsg, key) + case "transformerParams": + err = unpopulate(val, "TransformerParams", &t.TransformerParams) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableVerticalLimitSettings. +func (t TableVerticalLimitSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enableEarlyTermination", t.EnableEarlyTermination) + populate(objectMap, "exitScore", t.ExitScore) + populate(objectMap, "maxConcurrentTrials", t.MaxConcurrentTrials) + populate(objectMap, "maxCoresPerTrial", t.MaxCoresPerTrial) + populate(objectMap, "maxNodes", t.MaxNodes) + populate(objectMap, "maxTrials", t.MaxTrials) + populate(objectMap, "sweepConcurrentTrials", t.SweepConcurrentTrials) + populate(objectMap, "sweepTrials", t.SweepTrials) + populate(objectMap, "timeout", t.Timeout) + populate(objectMap, "trialTimeout", t.TrialTimeout) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableVerticalLimitSettings. +func (t *TableVerticalLimitSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableEarlyTermination": + err = unpopulate(val, "EnableEarlyTermination", &t.EnableEarlyTermination) + delete(rawMsg, key) + case "exitScore": + err = unpopulate(val, "ExitScore", &t.ExitScore) + delete(rawMsg, key) + case "maxConcurrentTrials": + err = unpopulate(val, "MaxConcurrentTrials", &t.MaxConcurrentTrials) + delete(rawMsg, key) + case "maxCoresPerTrial": + err = unpopulate(val, "MaxCoresPerTrial", &t.MaxCoresPerTrial) + delete(rawMsg, key) + case "maxNodes": + err = unpopulate(val, "MaxNodes", &t.MaxNodes) + delete(rawMsg, key) + case "maxTrials": + err = unpopulate(val, "MaxTrials", &t.MaxTrials) + delete(rawMsg, key) + case "sweepConcurrentTrials": + err = unpopulate(val, "SweepConcurrentTrials", &t.SweepConcurrentTrials) + delete(rawMsg, key) + case "sweepTrials": + err = unpopulate(val, "SweepTrials", &t.SweepTrials) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &t.Timeout) + delete(rawMsg, key) + case "trialTimeout": + err = unpopulate(val, "TrialTimeout", &t.TrialTimeout) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetLags. +func (t TargetLags) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = t.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetLags. +func (t *TargetLags) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &t.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetRollingWindowSize. +func (t TargetRollingWindowSize) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["mode"] = t.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetRollingWindowSize. +func (t *TargetRollingWindowSize) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &t.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TargetUtilizationScaleSettings. +func (t TargetUtilizationScaleSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxInstances", t.MaxInstances) + populate(objectMap, "minInstances", t.MinInstances) + populate(objectMap, "pollingInterval", t.PollingInterval) + objectMap["scaleType"] = ScaleTypeTargetUtilization + populate(objectMap, "targetUtilizationPercentage", t.TargetUtilizationPercentage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TargetUtilizationScaleSettings. +func (t *TargetUtilizationScaleSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maxInstances": + err = unpopulate(val, "MaxInstances", &t.MaxInstances) + delete(rawMsg, key) + case "minInstances": + err = unpopulate(val, "MinInstances", &t.MinInstances) + delete(rawMsg, key) + case "pollingInterval": + err = unpopulate(val, "PollingInterval", &t.PollingInterval) + delete(rawMsg, key) + case "scaleType": + err = unpopulate(val, "ScaleType", &t.ScaleType) + delete(rawMsg, key) + case "targetUtilizationPercentage": + err = unpopulate(val, "TargetUtilizationPercentage", &t.TargetUtilizationPercentage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TensorFlow. +func (t TensorFlow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["distributionType"] = DistributionTypeTensorFlow + populate(objectMap, "parameterServerCount", t.ParameterServerCount) + populate(objectMap, "workerCount", t.WorkerCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TensorFlow. +func (t *TensorFlow) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "distributionType": + err = unpopulate(val, "DistributionType", &t.DistributionType) + delete(rawMsg, key) + case "parameterServerCount": + err = unpopulate(val, "ParameterServerCount", &t.ParameterServerCount) + delete(rawMsg, key) + case "workerCount": + err = unpopulate(val, "WorkerCount", &t.WorkerCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TextClassification. +func (t TextClassification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) + populate(objectMap, "limitSettings", t.LimitSettings) + populate(objectMap, "logVerbosity", t.LogVerbosity) + populate(objectMap, "primaryMetric", t.PrimaryMetric) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) + populate(objectMap, "targetColumnName", t.TargetColumnName) + objectMap["taskType"] = TaskTypeTextClassification + populate(objectMap, "trainingData", t.TrainingData) + populate(objectMap, "validationData", t.ValidationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TextClassification. +func (t *TextClassification) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &t.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &t.LogVerbosity) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &t.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &t.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &t.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &t.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &t.ValidationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TextClassificationMultilabel. +func (t TextClassificationMultilabel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) + populate(objectMap, "limitSettings", t.LimitSettings) + populate(objectMap, "logVerbosity", t.LogVerbosity) + populate(objectMap, "primaryMetric", t.PrimaryMetric) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) + populate(objectMap, "targetColumnName", t.TargetColumnName) + objectMap["taskType"] = TaskTypeTextClassificationMultilabel + populate(objectMap, "trainingData", t.TrainingData) + populate(objectMap, "validationData", t.ValidationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TextClassificationMultilabel. +func (t *TextClassificationMultilabel) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &t.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &t.LogVerbosity) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &t.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &t.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &t.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &t.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &t.ValidationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TextNer. +func (t TextNer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) + populate(objectMap, "limitSettings", t.LimitSettings) + populate(objectMap, "logVerbosity", t.LogVerbosity) + populate(objectMap, "primaryMetric", t.PrimaryMetric) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) + populate(objectMap, "targetColumnName", t.TargetColumnName) + objectMap["taskType"] = TaskTypeTextNER + populate(objectMap, "trainingData", t.TrainingData) + populate(objectMap, "validationData", t.ValidationData) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TextNer. +func (t *TextNer) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &t.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &t.LogVerbosity) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &t.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &t.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &t.TaskType) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &t.TrainingData) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &t.ValidationData) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TmpfsOptions. +func (t TmpfsOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "size", t.Size) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TmpfsOptions. +func (t *TmpfsOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "size": + err = unpopulate(val, "Size", &t.Size) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrackedResource. +func (t TrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + populate(objectMap, "systemData", t.SystemData) + populate(objectMap, "tags", t.Tags) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource. +func (t *TrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &t.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &t.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &t.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrainingSettings. +func (t TrainingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enableDnnTraining", t.EnableDnnTraining) + populate(objectMap, "enableModelExplainability", t.EnableModelExplainability) + populate(objectMap, "enableOnnxCompatibleModels", t.EnableOnnxCompatibleModels) + populate(objectMap, "enableStackEnsemble", t.EnableStackEnsemble) + populate(objectMap, "enableVoteEnsemble", t.EnableVoteEnsemble) + populate(objectMap, "ensembleModelDownloadTimeout", t.EnsembleModelDownloadTimeout) + populate(objectMap, "stackEnsembleSettings", t.StackEnsembleSettings) + populate(objectMap, "trainingMode", t.TrainingMode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrainingSettings. +func (t *TrainingSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enableDnnTraining": + err = unpopulate(val, "EnableDnnTraining", &t.EnableDnnTraining) + delete(rawMsg, key) + case "enableModelExplainability": + err = unpopulate(val, "EnableModelExplainability", &t.EnableModelExplainability) + delete(rawMsg, key) + case "enableOnnxCompatibleModels": + err = unpopulate(val, "EnableOnnxCompatibleModels", &t.EnableOnnxCompatibleModels) + delete(rawMsg, key) + case "enableStackEnsemble": + err = unpopulate(val, "EnableStackEnsemble", &t.EnableStackEnsemble) + delete(rawMsg, key) + case "enableVoteEnsemble": + err = unpopulate(val, "EnableVoteEnsemble", &t.EnableVoteEnsemble) + delete(rawMsg, key) + case "ensembleModelDownloadTimeout": + err = unpopulate(val, "EnsembleModelDownloadTimeout", &t.EnsembleModelDownloadTimeout) + delete(rawMsg, key) + case "stackEnsembleSettings": + err = unpopulate(val, "StackEnsembleSettings", &t.StackEnsembleSettings) + delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &t.TrainingMode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrialComponent. +func (t TrialComponent) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "codeId", t.CodeID) + populate(objectMap, "command", t.Command) + populate(objectMap, "distribution", t.Distribution) + populate(objectMap, "environmentId", t.EnvironmentID) + populate(objectMap, "environmentVariables", t.EnvironmentVariables) + populate(objectMap, "resources", t.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrialComponent. +func (t *TrialComponent) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "codeId": + err = unpopulate(val, "CodeID", &t.CodeID) + delete(rawMsg, key) + case "command": + err = unpopulate(val, "Command", &t.Command) + delete(rawMsg, key) + case "distribution": + t.Distribution, err = unmarshalDistributionConfigurationClassification(val) + delete(rawMsg, key) + case "environmentId": + err = unpopulate(val, "EnvironmentID", &t.EnvironmentID) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &t.EnvironmentVariables) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &t.Resources) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TriggerBase. +func (t TriggerBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "endTime", t.EndTime) + populate(objectMap, "startTime", t.StartTime) + populate(objectMap, "timeZone", t.TimeZone) + objectMap["triggerType"] = t.TriggerType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TriggerBase. +func (t *TriggerBase) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "endTime": + err = unpopulate(val, "EndTime", &t.EndTime) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &t.StartTime) + delete(rawMsg, key) + case "timeZone": + err = unpopulate(val, "TimeZone", &t.TimeZone) + delete(rawMsg, key) + case "triggerType": + err = unpopulate(val, "TriggerType", &t.TriggerType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TritonModelJobInput. +func (t TritonModelJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", t.Description) + objectMap["jobInputType"] = JobInputTypeTritonModel + populate(objectMap, "mode", t.Mode) + populate(objectMap, "uri", t.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TritonModelJobInput. +func (t *TritonModelJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &t.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &t.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &t.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &t.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TritonModelJobOutput. +func (t TritonModelJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetName", t.AssetName) + populate(objectMap, "assetVersion", t.AssetVersion) + populate(objectMap, "description", t.Description) + objectMap["jobOutputType"] = JobOutputTypeTritonModel + populate(objectMap, "mode", t.Mode) + populate(objectMap, "uri", t.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TritonModelJobOutput. +func (t *TritonModelJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetName": + err = unpopulate(val, "AssetName", &t.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &t.AssetVersion) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &t.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &t.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &t.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &t.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TruncationSelectionPolicy. +func (t TruncationSelectionPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "delayEvaluation", t.DelayEvaluation) + populate(objectMap, "evaluationInterval", t.EvaluationInterval) + objectMap["policyType"] = EarlyTerminationPolicyTypeTruncationSelection + populate(objectMap, "truncationPercentage", t.TruncationPercentage) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TruncationSelectionPolicy. +func (t *TruncationSelectionPolicy) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delayEvaluation": + err = unpopulate(val, "DelayEvaluation", &t.DelayEvaluation) + delete(rawMsg, key) + case "evaluationInterval": + err = unpopulate(val, "EvaluationInterval", &t.EvaluationInterval) + delete(rawMsg, key) + case "policyType": + err = unpopulate(val, "PolicyType", &t.PolicyType) + delete(rawMsg, key) + case "truncationPercentage": + err = unpopulate(val, "TruncationPercentage", &t.TruncationPercentage) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URIFileDataVersion. +func (u URIFileDataVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["dataType"] = DataTypeURIFile + populate(objectMap, "dataUri", u.DataURI) + populate(objectMap, "description", u.Description) + populate(objectMap, "isAnonymous", u.IsAnonymous) + populate(objectMap, "isArchived", u.IsArchived) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "tags", u.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URIFileDataVersion. +func (u *URIFileDataVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &u.DataType) + delete(rawMsg, key) + case "dataUri": + err = unpopulate(val, "DataURI", &u.DataURI) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &u.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &u.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &u.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URIFileJobInput. +func (u URIFileJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", u.Description) + objectMap["jobInputType"] = JobInputTypeURIFile + populate(objectMap, "mode", u.Mode) + populate(objectMap, "uri", u.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URIFileJobInput. +func (u *URIFileJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &u.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &u.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &u.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URIFileJobOutput. +func (u URIFileJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetName", u.AssetName) + populate(objectMap, "assetVersion", u.AssetVersion) + populate(objectMap, "description", u.Description) + objectMap["jobOutputType"] = JobOutputTypeURIFile + populate(objectMap, "mode", u.Mode) + populate(objectMap, "uri", u.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URIFileJobOutput. +func (u *URIFileJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetName": + err = unpopulate(val, "AssetName", &u.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &u.AssetVersion) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &u.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &u.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &u.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URIFolderDataVersion. +func (u URIFolderDataVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["dataType"] = DataTypeURIFolder + populate(objectMap, "dataUri", u.DataURI) + populate(objectMap, "description", u.Description) + populate(objectMap, "isAnonymous", u.IsAnonymous) + populate(objectMap, "isArchived", u.IsArchived) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "tags", u.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URIFolderDataVersion. +func (u *URIFolderDataVersion) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataType": + err = unpopulate(val, "DataType", &u.DataType) + delete(rawMsg, key) + case "dataUri": + err = unpopulate(val, "DataURI", &u.DataURI) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &u.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &u.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &u.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URIFolderJobInput. +func (u URIFolderJobInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", u.Description) + objectMap["jobInputType"] = JobInputTypeURIFolder + populate(objectMap, "mode", u.Mode) + populate(objectMap, "uri", u.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URIFolderJobInput. +func (u *URIFolderJobInput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + case "jobInputType": + err = unpopulate(val, "JobInputType", &u.JobInputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &u.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &u.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type URIFolderJobOutput. +func (u URIFolderJobOutput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "assetName", u.AssetName) + populate(objectMap, "assetVersion", u.AssetVersion) + populate(objectMap, "description", u.Description) + objectMap["jobOutputType"] = JobOutputTypeURIFolder + populate(objectMap, "mode", u.Mode) + populate(objectMap, "uri", u.URI) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type URIFolderJobOutput. +func (u *URIFolderJobOutput) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "assetName": + err = unpopulate(val, "AssetName", &u.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &u.AssetVersion) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &u.Description) + delete(rawMsg, key) + case "jobOutputType": + err = unpopulate(val, "JobOutputType", &u.JobOutputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &u.Mode) + delete(rawMsg, key) + case "uri": + err = unpopulate(val, "URI", &u.URI) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateWorkspaceQuotas. +func (u UpdateWorkspaceQuotas) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", u.ID) + populate(objectMap, "limit", u.Limit) + populate(objectMap, "status", u.Status) + populate(objectMap, "type", u.Type) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateWorkspaceQuotas. +func (u *UpdateWorkspaceQuotas) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &u.Status) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UpdateWorkspaceQuotasResult. +func (u UpdateWorkspaceQuotasResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpdateWorkspaceQuotasResult. +func (u *UpdateWorkspaceQuotasResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "amlWorkspaceLocation", u.AmlWorkspaceLocation) + populate(objectMap, "currentValue", u.CurrentValue) + populate(objectMap, "id", u.ID) + populate(objectMap, "limit", u.Limit) + populate(objectMap, "name", u.Name) + populate(objectMap, "type", u.Type) + populate(objectMap, "unit", u.Unit) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Usage. +func (u *Usage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "amlWorkspaceLocation": + err = unpopulate(val, "AmlWorkspaceLocation", &u.AmlWorkspaceLocation) + delete(rawMsg, key) + case "currentValue": + err = unpopulate(val, "CurrentValue", &u.CurrentValue) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "limit": + err = unpopulate(val, "Limit", &u.Limit) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + case "unit": + err = unpopulate(val, "Unit", &u.Unit) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsageName. +func (u UsageName) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "localizedValue", u.LocalizedValue) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsageName. +func (u *UsageName) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "localizedValue": + err = unpopulate(val, "LocalizedValue", &u.LocalizedValue) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAccountCredentials. +func (u UserAccountCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "adminUserName", u.AdminUserName) + populate(objectMap, "adminUserPassword", u.AdminUserPassword) + populate(objectMap, "adminUserSshPublicKey", u.AdminUserSSHPublicKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAccountCredentials. +func (u *UserAccountCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminUserName": + err = unpopulate(val, "AdminUserName", &u.AdminUserName) + delete(rawMsg, key) + case "adminUserPassword": + err = unpopulate(val, "AdminUserPassword", &u.AdminUserPassword) + delete(rawMsg, key) + case "adminUserSshPublicKey": + err = unpopulate(val, "AdminUserSSHPublicKey", &u.AdminUserSSHPublicKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. +func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", u.ClientID) + populate(objectMap, "principalId", u.PrincipalID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserAssignedIdentity. +func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &u.ClientID) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &u.PrincipalID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCreatedAcrAccount. +func (u UserCreatedAcrAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "armResourceId", u.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreatedAcrAccount. +func (u *UserCreatedAcrAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &u.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCreatedStorageAccount. +func (u UserCreatedStorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "armResourceId", u.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreatedStorageAccount. +func (u *UserCreatedStorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &u.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserIdentity. +func (u UserIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["identityType"] = IdentityConfigurationTypeUserIdentity + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity. +func (u *UserIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identityType": + err = unpopulate(val, "IdentityType", &u.IdentityType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsernamePasswordAuthTypeWorkspaceConnectionProperties. +func (u UsernamePasswordAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = ConnectionAuthTypeUsernamePassword + populate(objectMap, "category", u.Category) + populate(objectMap, "credentials", u.Credentials) + populate(objectMap, "target", u.Target) + populate(objectMap, "value", u.Value) + populate(objectMap, "valueFormat", u.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UsernamePasswordAuthTypeWorkspaceConnectionProperties. +func (u *UsernamePasswordAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &u.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &u.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &u.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &u.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &u.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachine. +func (v VirtualMachine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "computeLocation", v.ComputeLocation) + objectMap["computeType"] = ComputeTypeVirtualMachine + populateTimeRFC3339(objectMap, "createdOn", v.CreatedOn) + populate(objectMap, "description", v.Description) + populate(objectMap, "disableLocalAuth", v.DisableLocalAuth) + populate(objectMap, "isAttachedCompute", v.IsAttachedCompute) + populateTimeRFC3339(objectMap, "modifiedOn", v.ModifiedOn) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "provisioningErrors", v.ProvisioningErrors) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceId", v.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine. +func (v *VirtualMachine) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "computeLocation": + err = unpopulate(val, "ComputeLocation", &v.ComputeLocation) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &v.ComputeType) + delete(rawMsg, key) + case "createdOn": + err = unpopulateTimeRFC3339(val, "CreatedOn", &v.CreatedOn) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &v.Description) + delete(rawMsg, key) + case "disableLocalAuth": + err = unpopulate(val, "DisableLocalAuth", &v.DisableLocalAuth) + delete(rawMsg, key) + case "isAttachedCompute": + err = unpopulate(val, "IsAttachedCompute", &v.IsAttachedCompute) + delete(rawMsg, key) + case "modifiedOn": + err = unpopulateTimeRFC3339(val, "ModifiedOn", &v.ModifiedOn) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + case "provisioningErrors": + err = unpopulate(val, "ProvisioningErrors", &v.ProvisioningErrors) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &v.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineImage. +func (v VirtualMachineImage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineImage. +func (v *VirtualMachineImage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &v.ID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSSHCredentials. +func (v VirtualMachineSSHCredentials) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "password", v.Password) + populate(objectMap, "privateKeyData", v.PrivateKeyData) + populate(objectMap, "publicKeyData", v.PublicKeyData) + populate(objectMap, "username", v.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSSHCredentials. +func (v *VirtualMachineSSHCredentials) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + err = unpopulate(val, "Password", &v.Password) + delete(rawMsg, key) + case "privateKeyData": + err = unpopulate(val, "PrivateKeyData", &v.PrivateKeyData) + delete(rawMsg, key) + case "publicKeyData": + err = unpopulate(val, "PublicKeyData", &v.PublicKeyData) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &v.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSchema. +func (v VirtualMachineSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "properties", v.Properties) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSchema. +func (v *VirtualMachineSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "properties": + err = unpopulate(val, "Properties", &v.Properties) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSchemaProperties. +func (v VirtualMachineSchemaProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "address", v.Address) + populate(objectMap, "administratorAccount", v.AdministratorAccount) + populate(objectMap, "isNotebookInstanceCompute", v.IsNotebookInstanceCompute) + populate(objectMap, "notebookServerPort", v.NotebookServerPort) + populate(objectMap, "sshPort", v.SSHPort) + populate(objectMap, "virtualMachineSize", v.VirtualMachineSize) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSchemaProperties. +func (v *VirtualMachineSchemaProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "address": + err = unpopulate(val, "Address", &v.Address) + delete(rawMsg, key) + case "administratorAccount": + err = unpopulate(val, "AdministratorAccount", &v.AdministratorAccount) + delete(rawMsg, key) + case "isNotebookInstanceCompute": + err = unpopulate(val, "IsNotebookInstanceCompute", &v.IsNotebookInstanceCompute) + delete(rawMsg, key) + case "notebookServerPort": + err = unpopulate(val, "NotebookServerPort", &v.NotebookServerPort) + delete(rawMsg, key) + case "sshPort": + err = unpopulate(val, "SSHPort", &v.SSHPort) + delete(rawMsg, key) + case "virtualMachineSize": + err = unpopulate(val, "VirtualMachineSize", &v.VirtualMachineSize) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSecrets. +func (v VirtualMachineSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "administratorAccount", v.AdministratorAccount) + objectMap["computeType"] = ComputeTypeVirtualMachine + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSecrets. +func (v *VirtualMachineSecrets) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorAccount": + err = unpopulate(val, "AdministratorAccount", &v.AdministratorAccount) + delete(rawMsg, key) + case "computeType": + err = unpopulate(val, "ComputeType", &v.ComputeType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSecretsSchema. +func (v VirtualMachineSecretsSchema) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "administratorAccount", v.AdministratorAccount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSecretsSchema. +func (v *VirtualMachineSecretsSchema) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "administratorAccount": + err = unpopulate(val, "AdministratorAccount", &v.AdministratorAccount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSize. +func (v VirtualMachineSize) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "estimatedVMPrices", v.EstimatedVMPrices) + populate(objectMap, "family", v.Family) + populate(objectMap, "gpus", v.Gpus) + populate(objectMap, "lowPriorityCapable", v.LowPriorityCapable) + populate(objectMap, "maxResourceVolumeMB", v.MaxResourceVolumeMB) + populate(objectMap, "memoryGB", v.MemoryGB) + populate(objectMap, "name", v.Name) + populate(objectMap, "osVhdSizeMB", v.OSVhdSizeMB) + populate(objectMap, "premiumIO", v.PremiumIO) + populate(objectMap, "supportedComputeTypes", v.SupportedComputeTypes) + populate(objectMap, "vCPUs", v.VCPUs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSize. +func (v *VirtualMachineSize) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "estimatedVMPrices": + err = unpopulate(val, "EstimatedVMPrices", &v.EstimatedVMPrices) + delete(rawMsg, key) + case "family": + err = unpopulate(val, "Family", &v.Family) + delete(rawMsg, key) + case "gpus": + err = unpopulate(val, "Gpus", &v.Gpus) + delete(rawMsg, key) + case "lowPriorityCapable": + err = unpopulate(val, "LowPriorityCapable", &v.LowPriorityCapable) + delete(rawMsg, key) + case "maxResourceVolumeMB": + err = unpopulate(val, "MaxResourceVolumeMB", &v.MaxResourceVolumeMB) + delete(rawMsg, key) + case "memoryGB": + err = unpopulate(val, "MemoryGB", &v.MemoryGB) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &v.Name) + delete(rawMsg, key) + case "osVhdSizeMB": + err = unpopulate(val, "OSVhdSizeMB", &v.OSVhdSizeMB) + delete(rawMsg, key) + case "premiumIO": + err = unpopulate(val, "PremiumIO", &v.PremiumIO) + delete(rawMsg, key) + case "supportedComputeTypes": + err = unpopulate(val, "SupportedComputeTypes", &v.SupportedComputeTypes) + delete(rawMsg, key) + case "vCPUs": + err = unpopulate(val, "VCPUs", &v.VCPUs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualMachineSizeListResult. +func (v VirtualMachineSizeListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSizeListResult. +func (v *VirtualMachineSizeListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "value": + err = unpopulate(val, "Value", &v.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeDefinition. +func (v VolumeDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bind", v.Bind) + populate(objectMap, "consistency", v.Consistency) + populate(objectMap, "readOnly", v.ReadOnly) + populate(objectMap, "source", v.Source) + populate(objectMap, "target", v.Target) + populate(objectMap, "tmpfs", v.Tmpfs) + populate(objectMap, "type", v.Type) + populate(objectMap, "volume", v.Volume) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeDefinition. +func (v *VolumeDefinition) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bind": + err = unpopulate(val, "Bind", &v.Bind) + delete(rawMsg, key) + case "consistency": + err = unpopulate(val, "Consistency", &v.Consistency) + delete(rawMsg, key) + case "readOnly": + err = unpopulate(val, "ReadOnly", &v.ReadOnly) + delete(rawMsg, key) + case "source": + err = unpopulate(val, "Source", &v.Source) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &v.Target) + delete(rawMsg, key) + case "tmpfs": + err = unpopulate(val, "Tmpfs", &v.Tmpfs) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &v.Type) + delete(rawMsg, key) + case "volume": + err = unpopulate(val, "Volume", &v.Volume) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type VolumeOptions. +func (v VolumeOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nocopy", v.Nocopy) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type VolumeOptions. +func (v *VolumeOptions) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nocopy": + err = unpopulate(val, "Nocopy", &v.Nocopy) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", v, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Workspace. +func (w Workspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "identity", w.Identity) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "systemData", w.SystemData) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Workspace. +func (w *Workspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &w.Identity) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &w.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &w.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionAccessKey. +func (w WorkspaceConnectionAccessKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "accessKeyId", w.AccessKeyID) + populate(objectMap, "secretAccessKey", w.SecretAccessKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionAccessKey. +func (w *WorkspaceConnectionAccessKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessKeyId": + err = unpopulate(val, "AccessKeyID", &w.AccessKeyID) + delete(rawMsg, key) + case "secretAccessKey": + err = unpopulate(val, "SecretAccessKey", &w.SecretAccessKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionManagedIdentity. +func (w WorkspaceConnectionManagedIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", w.ClientID) + populate(objectMap, "resourceId", w.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionManagedIdentity. +func (w *WorkspaceConnectionManagedIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &w.ClientID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &w.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPersonalAccessToken. +func (w WorkspaceConnectionPersonalAccessToken) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "pat", w.Pat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionPersonalAccessToken. +func (w *WorkspaceConnectionPersonalAccessToken) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "pat": + err = unpopulate(val, "Pat", &w.Pat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPropertiesV2. +func (w WorkspaceConnectionPropertiesV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["authType"] = w.AuthType + populate(objectMap, "category", w.Category) + populate(objectMap, "target", w.Target) + populate(objectMap, "value", w.Value) + populate(objectMap, "valueFormat", w.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionPropertiesV2. +func (w *WorkspaceConnectionPropertiesV2) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &w.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &w.Category) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &w.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &w.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPropertiesV2BasicResource. +func (w WorkspaceConnectionPropertiesV2BasicResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", w.ID) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "systemData", w.SystemData) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionPropertiesV2BasicResource. +func (w *WorkspaceConnectionPropertiesV2BasicResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &w.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &w.Name) + delete(rawMsg, key) + case "properties": + w.Properties, err = unmarshalWorkspaceConnectionPropertiesV2Classification(val) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &w.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &w.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. +func (w WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. +func (w *WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionServicePrincipal. +func (w WorkspaceConnectionServicePrincipal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientId", w.ClientID) + populate(objectMap, "clientSecret", w.ClientSecret) + populate(objectMap, "tenantId", w.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionServicePrincipal. +func (w *WorkspaceConnectionServicePrincipal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &w.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &w.ClientSecret) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &w.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionSharedAccessSignature. +func (w WorkspaceConnectionSharedAccessSignature) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sas", w.Sas) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionSharedAccessSignature. +func (w *WorkspaceConnectionSharedAccessSignature) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sas": + err = unpopulate(val, "Sas", &w.Sas) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionUsernamePassword. +func (w WorkspaceConnectionUsernamePassword) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "password", w.Password) + populate(objectMap, "username", w.Username) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionUsernamePassword. +func (w *WorkspaceConnectionUsernamePassword) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "password": + err = unpopulate(val, "Password", &w.Password) + delete(rawMsg, key) + case "username": + err = unpopulate(val, "Username", &w.Username) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceListResult. +func (w WorkspaceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceListResult. +func (w *WorkspaceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &w.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &w.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. +func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowPublicAccessWhenBehindVnet", w.AllowPublicAccessWhenBehindVnet) + populate(objectMap, "applicationInsights", w.ApplicationInsights) + populate(objectMap, "containerRegistry", w.ContainerRegistry) + populate(objectMap, "description", w.Description) + populate(objectMap, "discoveryUrl", w.DiscoveryURL) + populate(objectMap, "encryption", w.Encryption) + populate(objectMap, "friendlyName", w.FriendlyName) + populate(objectMap, "hbiWorkspace", w.HbiWorkspace) + populate(objectMap, "imageBuildCompute", w.ImageBuildCompute) + populate(objectMap, "keyVault", w.KeyVault) + populate(objectMap, "mlFlowTrackingUri", w.MlFlowTrackingURI) + populate(objectMap, "notebookInfo", w.NotebookInfo) + populate(objectMap, "primaryUserAssignedIdentity", w.PrimaryUserAssignedIdentity) + populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections) + populate(objectMap, "privateLinkCount", w.PrivateLinkCount) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + populate(objectMap, "scheduledPurgeDate", w.ScheduledPurgeDate) + populate(objectMap, "serviceManagedResourcesSettings", w.ServiceManagedResourcesSettings) + populate(objectMap, "serviceProvisionedResourceGroup", w.ServiceProvisionedResourceGroup) + populate(objectMap, "sharedPrivateLinkResources", w.SharedPrivateLinkResources) + populate(objectMap, "softDeletedAt", w.SoftDeletedAt) + populate(objectMap, "storageAccount", w.StorageAccount) + populate(objectMap, "storageHnsEnabled", w.StorageHnsEnabled) + populate(objectMap, "tenantId", w.TenantID) + populate(objectMap, "v1LegacyMode", w.V1LegacyMode) + populate(objectMap, "workspaceId", w.WorkspaceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceProperties. +func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowPublicAccessWhenBehindVnet": + err = unpopulate(val, "AllowPublicAccessWhenBehindVnet", &w.AllowPublicAccessWhenBehindVnet) + delete(rawMsg, key) + case "applicationInsights": + err = unpopulate(val, "ApplicationInsights", &w.ApplicationInsights) + delete(rawMsg, key) + case "containerRegistry": + err = unpopulate(val, "ContainerRegistry", &w.ContainerRegistry) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "discoveryUrl": + err = unpopulate(val, "DiscoveryURL", &w.DiscoveryURL) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &w.Encryption) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &w.FriendlyName) + delete(rawMsg, key) + case "hbiWorkspace": + err = unpopulate(val, "HbiWorkspace", &w.HbiWorkspace) + delete(rawMsg, key) + case "imageBuildCompute": + err = unpopulate(val, "ImageBuildCompute", &w.ImageBuildCompute) + delete(rawMsg, key) + case "keyVault": + err = unpopulate(val, "KeyVault", &w.KeyVault) + delete(rawMsg, key) + case "mlFlowTrackingUri": + err = unpopulate(val, "MlFlowTrackingURI", &w.MlFlowTrackingURI) + delete(rawMsg, key) + case "notebookInfo": + err = unpopulate(val, "NotebookInfo", &w.NotebookInfo) + delete(rawMsg, key) + case "primaryUserAssignedIdentity": + err = unpopulate(val, "PrimaryUserAssignedIdentity", &w.PrimaryUserAssignedIdentity) + delete(rawMsg, key) + case "privateEndpointConnections": + err = unpopulate(val, "PrivateEndpointConnections", &w.PrivateEndpointConnections) + delete(rawMsg, key) + case "privateLinkCount": + err = unpopulate(val, "PrivateLinkCount", &w.PrivateLinkCount) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &w.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) + delete(rawMsg, key) + case "scheduledPurgeDate": + err = unpopulate(val, "ScheduledPurgeDate", &w.ScheduledPurgeDate) + delete(rawMsg, key) + case "serviceManagedResourcesSettings": + err = unpopulate(val, "ServiceManagedResourcesSettings", &w.ServiceManagedResourcesSettings) + delete(rawMsg, key) + case "serviceProvisionedResourceGroup": + err = unpopulate(val, "ServiceProvisionedResourceGroup", &w.ServiceProvisionedResourceGroup) + delete(rawMsg, key) + case "sharedPrivateLinkResources": + err = unpopulate(val, "SharedPrivateLinkResources", &w.SharedPrivateLinkResources) + delete(rawMsg, key) + case "softDeletedAt": + err = unpopulate(val, "SoftDeletedAt", &w.SoftDeletedAt) + delete(rawMsg, key) + case "storageAccount": + err = unpopulate(val, "StorageAccount", &w.StorageAccount) + delete(rawMsg, key) + case "storageHnsEnabled": + err = unpopulate(val, "StorageHnsEnabled", &w.StorageHnsEnabled) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &w.TenantID) + delete(rawMsg, key) + case "v1LegacyMode": + err = unpopulate(val, "V1LegacyMode", &w.V1LegacyMode) + delete(rawMsg, key) + case "workspaceId": + err = unpopulate(val, "WorkspaceID", &w.WorkspaceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspacePropertiesUpdateParameters. +func (w WorkspacePropertiesUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationInsights", w.ApplicationInsights) + populate(objectMap, "containerRegistry", w.ContainerRegistry) + populate(objectMap, "description", w.Description) + populate(objectMap, "encryption", w.Encryption) + populate(objectMap, "friendlyName", w.FriendlyName) + populate(objectMap, "imageBuildCompute", w.ImageBuildCompute) + populate(objectMap, "primaryUserAssignedIdentity", w.PrimaryUserAssignedIdentity) + populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) + populate(objectMap, "serviceManagedResourcesSettings", w.ServiceManagedResourcesSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspacePropertiesUpdateParameters. +func (w *WorkspacePropertiesUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "applicationInsights": + err = unpopulate(val, "ApplicationInsights", &w.ApplicationInsights) + delete(rawMsg, key) + case "containerRegistry": + err = unpopulate(val, "ContainerRegistry", &w.ContainerRegistry) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &w.Description) + delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &w.Encryption) + delete(rawMsg, key) + case "friendlyName": + err = unpopulate(val, "FriendlyName", &w.FriendlyName) + delete(rawMsg, key) + case "imageBuildCompute": + err = unpopulate(val, "ImageBuildCompute", &w.ImageBuildCompute) + delete(rawMsg, key) + case "primaryUserAssignedIdentity": + err = unpopulate(val, "PrimaryUserAssignedIdentity", &w.PrimaryUserAssignedIdentity) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &w.PublicNetworkAccess) + delete(rawMsg, key) + case "serviceManagedResourcesSettings": + err = unpopulate(val, "ServiceManagedResourcesSettings", &w.ServiceManagedResourcesSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type WorkspaceUpdateParameters. +func (w WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "identity", w.Identity) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "sku", w.SKU) + populate(objectMap, "tags", w.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceUpdateParameters. +func (w *WorkspaceUpdateParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &w.Identity) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &w.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &w.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &w.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + +func populate(m map[string]interface{}, k string, v interface{}) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, fn string, v interface{}) error { + if data == nil { + return nil + } + if err := json.Unmarshal(data, v); err != nil { + return fmt.Errorf("struct field %s: %v", fn, err) + } + return nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_modelversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_modelversions_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go index d06c5498e698..a36747e153bd 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_modelversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewModelVersionsClient(subscriptionID string, credential azcore.TokenCreden // CreateOrUpdate - Create or update version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -108,7 +109,7 @@ func (client *ModelVersionsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -125,7 +126,7 @@ func (client *ModelVersionsClient) createOrUpdateHandleResponse(resp *http.Respo // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -174,7 +175,7 @@ func (client *ModelVersionsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +183,7 @@ func (client *ModelVersionsClient) deleteCreateRequest(ctx context.Context, reso // Get - Get version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Container name. This is case-sensitive. @@ -231,7 +232,7 @@ func (client *ModelVersionsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -247,8 +248,7 @@ func (client *ModelVersionsClient) getHandleResponse(resp *http.Response) (Model } // NewListPager - List model versions. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // name - Model name. This is case-sensitive. @@ -305,7 +305,7 @@ func (client *ModelVersionsClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_onlinedeployments_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_onlinedeployments_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go index 537c723ce0ed..71ca00778dd0 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_onlinedeployments_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewOnlineDeploymentsClient(subscriptionID string, credential azcore.TokenCr // BeginCreateOrUpdate - Create or update Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name. @@ -79,7 +80,7 @@ func (client *OnlineDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, // CreateOrUpdate - Create or update Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *OnlineDeploymentsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body OnlineDeployment, options *OnlineDeploymentsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) if err != nil { @@ -123,7 +124,7 @@ func (client *OnlineDeploymentsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -131,7 +132,7 @@ func (client *OnlineDeploymentsClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Delete Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name. @@ -152,7 +153,7 @@ func (client *OnlineDeploymentsClient) BeginDelete(ctx context.Context, resource // Delete - Delete Inference Endpoint Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *OnlineDeploymentsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *OnlineDeploymentsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, options) if err != nil { @@ -196,7 +197,7 @@ func (client *OnlineDeploymentsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -204,7 +205,7 @@ func (client *OnlineDeploymentsClient) deleteCreateRequest(ctx context.Context, // Get - Get Inference Deployment Deployment. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name. @@ -253,7 +254,7 @@ func (client *OnlineDeploymentsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -270,7 +271,7 @@ func (client *OnlineDeploymentsClient) getHandleResponse(resp *http.Response) (O // GetLogs - Polls an Endpoint operation. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name. @@ -321,7 +322,7 @@ func (client *OnlineDeploymentsClient) getLogsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -337,8 +338,7 @@ func (client *OnlineDeploymentsClient) getLogsHandleResponse(resp *http.Response } // NewListPager - List Inference Endpoint Deployments. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name. @@ -395,7 +395,7 @@ func (client *OnlineDeploymentsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } @@ -420,8 +420,7 @@ func (client *OnlineDeploymentsClient) listHandleResponse(resp *http.Response) ( } // NewListSKUsPager - List Inference Endpoint Deployment Skus. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Inference endpoint name. @@ -484,7 +483,7 @@ func (client *OnlineDeploymentsClient) listSKUsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -507,7 +506,7 @@ func (client *OnlineDeploymentsClient) listSKUsHandleResponse(resp *http.Respons // BeginUpdate - Update Online Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -529,7 +528,7 @@ func (client *OnlineDeploymentsClient) BeginUpdate(ctx context.Context, resource // Update - Update Online Deployment (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *OnlineDeploymentsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialMinimalTrackedResourceWithSKU, options *OnlineDeploymentsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) if err != nil { @@ -573,7 +572,7 @@ func (client *OnlineDeploymentsClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_onlineendpoints_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go similarity index 96% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_onlineendpoints_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go index 32218a40ed44..08ee1ab00d56 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_onlineendpoints_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -57,7 +58,7 @@ func NewOnlineEndpointsClient(subscriptionID string, credential azcore.TokenCred // BeginCreateOrUpdate - Create or update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -78,7 +79,7 @@ func (client *OnlineEndpointsClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Create or update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *OnlineEndpointsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body OnlineEndpoint, options *OnlineEndpointsClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, body, options) if err != nil { @@ -118,7 +119,7 @@ func (client *OnlineEndpointsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,7 +127,7 @@ func (client *OnlineEndpointsClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Delete Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -146,7 +147,7 @@ func (client *OnlineEndpointsClient) BeginDelete(ctx context.Context, resourceGr // Delete - Delete Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *OnlineEndpointsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *OnlineEndpointsClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { @@ -186,7 +187,7 @@ func (client *OnlineEndpointsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +195,7 @@ func (client *OnlineEndpointsClient) deleteCreateRequest(ctx context.Context, re // Get - Get Online Endpoint. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -238,7 +239,7 @@ func (client *OnlineEndpointsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +256,7 @@ func (client *OnlineEndpointsClient) getHandleResponse(resp *http.Response) (Onl // GetToken - Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -300,7 +301,7 @@ func (client *OnlineEndpointsClient) getTokenCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -316,8 +317,7 @@ func (client *OnlineEndpointsClient) getTokenHandleResponse(resp *http.Response) } // NewListPager - List Online Endpoints. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - OnlineEndpointsClientListOptions contains the optional parameters for the OnlineEndpointsClient.List method. @@ -369,7 +369,7 @@ func (client *OnlineEndpointsClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Name != nil { reqQP.Set("name", *options.Name) } @@ -407,7 +407,7 @@ func (client *OnlineEndpointsClient) listHandleResponse(resp *http.Response) (On // ListKeys - List EndpointAuthKeys for an Endpoint using Key-based authentication. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -452,7 +452,7 @@ func (client *OnlineEndpointsClient) listKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -469,7 +469,7 @@ func (client *OnlineEndpointsClient) listKeysHandleResponse(resp *http.Response) // BeginRegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -492,7 +492,7 @@ func (client *OnlineEndpointsClient) BeginRegenerateKeys(ctx context.Context, re // RegenerateKeys - Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *OnlineEndpointsClient) regenerateKeys(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body RegenerateEndpointKeysRequest, options *OnlineEndpointsClientBeginRegenerateKeysOptions) (*http.Response, error) { req, err := client.regenerateKeysCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, body, options) if err != nil { @@ -532,7 +532,7 @@ func (client *OnlineEndpointsClient) regenerateKeysCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -540,7 +540,7 @@ func (client *OnlineEndpointsClient) regenerateKeysCreateRequest(ctx context.Con // BeginUpdate - Update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // endpointName - Online Endpoint name. @@ -561,7 +561,7 @@ func (client *OnlineEndpointsClient) BeginUpdate(ctx context.Context, resourceGr // Update - Update Online Endpoint (asynchronous). // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *OnlineEndpointsClient) update(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *OnlineEndpointsClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, body, options) if err != nil { @@ -601,7 +601,7 @@ func (client *OnlineEndpointsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_operations_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go similarity index 95% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_operations_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go index 8aa1578e7695..8d29655f57b3 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_operations_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -48,9 +49,8 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return client, nil } -// NewListPager - Lists all of the available Azure Machine Learning Workspaces REST API operations. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// NewListPager - Lists all of the available Azure Machine Learning Services REST API operations. +// Generated from API version 2022-12-01-preview // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -82,7 +82,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_polymorphic_helpers.go b/sdk/resourcemanager/machinelearning/armmachinelearning/polymorphic_helpers.go similarity index 61% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_polymorphic_helpers.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/polymorphic_helpers.go index aef187b22026..3fc4b6129674 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_polymorphic_helpers.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/polymorphic_helpers.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -32,6 +33,42 @@ func unmarshalAssetReferenceBaseClassification(rawMsg json.RawMessage) (AssetRef return b, json.Unmarshal(rawMsg, b) } +func unmarshalAutoMLVerticalClassification(rawMsg json.RawMessage) (AutoMLVerticalClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b AutoMLVerticalClassification + switch m["taskType"] { + case string(TaskTypeClassification): + b = &Classification{} + case string(TaskTypeForecasting): + b = &Forecasting{} + case string(TaskTypeImageClassification): + b = &ImageClassification{} + case string(TaskTypeImageClassificationMultilabel): + b = &ImageClassificationMultilabel{} + case string(TaskTypeImageInstanceSegmentation): + b = &ImageInstanceSegmentation{} + case string(TaskTypeImageObjectDetection): + b = &ImageObjectDetection{} + case string(TaskTypeRegression): + b = &Regression{} + case string(TaskTypeTextClassification): + b = &TextClassification{} + case string(TaskTypeTextClassificationMultilabel): + b = &TextClassificationMultilabel{} + case string(TaskTypeTextNER): + b = &TextNer{} + default: + b = &AutoMLVertical{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalComputeClassification(rawMsg json.RawMessage) (ComputeClassification, error) { if rawMsg == nil { return nil, nil @@ -126,6 +163,10 @@ func unmarshalDatastoreCredentialsClassification(rawMsg json.RawMessage) (Datast b = &AccountKeyDatastoreCredentials{} case string(CredentialsTypeCertificate): b = &CertificateDatastoreCredentials{} + case string(CredentialsTypeKerberosKeytab): + b = &KerberosKeytabCredentials{} + case string(CredentialsTypeKerberosPassword): + b = &KerberosPasswordCredentials{} case string(CredentialsTypeNone): b = &NoneDatastoreCredentials{} case string(CredentialsTypeSas): @@ -156,6 +197,8 @@ func unmarshalDatastorePropertiesClassification(rawMsg json.RawMessage) (Datasto b = &AzureDataLakeGen2Datastore{} case string(DatastoreTypeAzureFile): b = &AzureFileDatastore{} + case string(DatastoreTypeHdfs): + b = &HdfsDatastore{} default: b = &DatastoreProperties{} } @@ -176,6 +219,10 @@ func unmarshalDatastoreSecretsClassification(rawMsg json.RawMessage) (DatastoreS b = &AccountKeyDatastoreSecrets{} case string(SecretsTypeCertificate): b = &CertificateDatastoreSecrets{} + case string(SecretsTypeKerberosKeytab): + b = &KerberosKeytabSecrets{} + case string(SecretsTypeKerberosPassword): + b = &KerberosPasswordSecrets{} case string(SecretsTypeSas): b = &SasDatastoreSecrets{} case string(SecretsTypeServicePrincipal): @@ -230,6 +277,48 @@ func unmarshalEarlyTerminationPolicyClassification(rawMsg json.RawMessage) (Earl return b, json.Unmarshal(rawMsg, b) } +func unmarshalExportSummaryClassification(rawMsg json.RawMessage) (ExportSummaryClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ExportSummaryClassification + switch m["format"] { + case string(ExportFormatTypeCSV): + b = &CSVExportSummary{} + case string(ExportFormatTypeCoco): + b = &CocoExportSummary{} + case string(ExportFormatTypeDataset): + b = &DatasetExportSummary{} + default: + b = &ExportSummary{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalForecastHorizonClassification(rawMsg json.RawMessage) (ForecastHorizonClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ForecastHorizonClassification + switch m["mode"] { + case string(ForecastHorizonModeAuto): + b = &AutoForecastHorizon{} + case string(ForecastHorizonModeCustom): + b = &CustomForecastHorizon{} + default: + b = &ForecastHorizon{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalIdentityConfigurationClassification(rawMsg json.RawMessage) (IdentityConfigurationClassification, error) { if rawMsg == nil { return nil, nil @@ -262,10 +351,16 @@ func unmarshalJobBasePropertiesClassification(rawMsg json.RawMessage) (JobBasePr } var b JobBasePropertiesClassification switch m["jobType"] { + case string(JobTypeAutoML): + b = &AutoMLJob{} case string(JobTypeCommand): b = &CommandJob{} + case string(JobTypeLabeling): + b = &LabelingJobProperties{} case string(JobTypePipeline): b = &PipelineJob{} + case string(JobTypeSpark): + b = &SparkJob{} case string(JobTypeSweep): b = &SweepJob{} default: @@ -370,6 +465,84 @@ func unmarshalJobOutputClassificationMap(rawMsg json.RawMessage) (map[string]Job return fMap, nil } +func unmarshalLabelingJobMediaPropertiesClassification(rawMsg json.RawMessage) (LabelingJobMediaPropertiesClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b LabelingJobMediaPropertiesClassification + switch m["mediaType"] { + case string(MediaTypeImage): + b = &LabelingJobImageProperties{} + case string(MediaTypeText): + b = &LabelingJobTextProperties{} + default: + b = &LabelingJobMediaProperties{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalMLAssistConfigurationClassification(rawMsg json.RawMessage) (MLAssistConfigurationClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b MLAssistConfigurationClassification + switch m["mlAssist"] { + case string(MLAssistConfigurationTypeDisabled): + b = &MLAssistConfigurationDisabled{} + case string(MLAssistConfigurationTypeEnabled): + b = &MLAssistConfigurationEnabled{} + default: + b = &MLAssistConfiguration{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalNCrossValidationsClassification(rawMsg json.RawMessage) (NCrossValidationsClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b NCrossValidationsClassification + switch m["mode"] { + case string(NCrossValidationsModeAuto): + b = &AutoNCrossValidations{} + case string(NCrossValidationsModeCustom): + b = &CustomNCrossValidations{} + default: + b = &NCrossValidations{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalNodesClassification(rawMsg json.RawMessage) (NodesClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b NodesClassification + switch m["nodesValueType"] { + case string(NodesValueTypeAll): + b = &AllNodes{} + default: + b = &Nodes{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalOnlineDeploymentPropertiesClassification(rawMsg json.RawMessage) (OnlineDeploymentPropertiesClassification, error) { if rawMsg == nil { return nil, nil @@ -432,6 +605,126 @@ func unmarshalSamplingAlgorithmClassification(rawMsg json.RawMessage) (SamplingA return b, json.Unmarshal(rawMsg, b) } +func unmarshalScheduleActionBaseClassification(rawMsg json.RawMessage) (ScheduleActionBaseClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b ScheduleActionBaseClassification + switch m["actionType"] { + case string(ScheduleActionTypeCreateJob): + b = &JobScheduleAction{} + case string(ScheduleActionTypeInvokeBatchEndpoint): + b = &EndpointScheduleAction{} + default: + b = &ScheduleActionBase{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalSeasonalityClassification(rawMsg json.RawMessage) (SeasonalityClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SeasonalityClassification + switch m["mode"] { + case string(SeasonalityModeAuto): + b = &AutoSeasonality{} + case string(SeasonalityModeCustom): + b = &CustomSeasonality{} + default: + b = &Seasonality{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalSparkJobEntryClassification(rawMsg json.RawMessage) (SparkJobEntryClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SparkJobEntryClassification + switch m["sparkJobEntryType"] { + case string(SparkJobEntryTypeSparkJobPythonEntry): + b = &SparkJobPythonEntry{} + case string(SparkJobEntryTypeSparkJobScalaEntry): + b = &SparkJobScalaEntry{} + default: + b = &SparkJobEntry{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalTargetLagsClassification(rawMsg json.RawMessage) (TargetLagsClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TargetLagsClassification + switch m["mode"] { + case string(TargetLagsModeAuto): + b = &AutoTargetLags{} + case string(TargetLagsModeCustom): + b = &CustomTargetLags{} + default: + b = &TargetLags{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalTargetRollingWindowSizeClassification(rawMsg json.RawMessage) (TargetRollingWindowSizeClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TargetRollingWindowSizeClassification + switch m["mode"] { + case string(TargetRollingWindowSizeModeAuto): + b = &AutoTargetRollingWindowSize{} + case string(TargetRollingWindowSizeModeCustom): + b = &CustomTargetRollingWindowSize{} + default: + b = &TargetRollingWindowSize{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalTriggerBaseClassification(rawMsg json.RawMessage) (TriggerBaseClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]interface{} + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b TriggerBaseClassification + switch m["triggerType"] { + case string(TriggerTypeCron): + b = &CronTrigger{} + case string(TriggerTypeRecurrence): + b = &RecurrenceTrigger{} + default: + b = &TriggerBase{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalWorkspaceConnectionPropertiesV2Classification(rawMsg json.RawMessage) (WorkspaceConnectionPropertiesV2Classification, error) { if rawMsg == nil { return nil, nil @@ -442,6 +735,8 @@ func unmarshalWorkspaceConnectionPropertiesV2Classification(rawMsg json.RawMessa } var b WorkspaceConnectionPropertiesV2Classification switch m["authType"] { + case string(ConnectionAuthTypeAccessKey): + b = &AccessKeyAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeManagedIdentity): b = &ManagedIdentityAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeNone): @@ -450,6 +745,8 @@ func unmarshalWorkspaceConnectionPropertiesV2Classification(rawMsg json.RawMessa b = &PATAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeSAS): b = &SASAuthTypeWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeServicePrincipal): + b = &ServicePrincipalAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeUsernamePassword): b = &UsernamePasswordAuthTypeWorkspaceConnectionProperties{} default: diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_privateendpointconnections_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_privateendpointconnections_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go index a9bafbaca3fb..c32dac013bd4 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_privateendpointconnections_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // CreateOrUpdate - Update the state of specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -102,7 +103,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) @@ -119,7 +120,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateHandleResponse(res // Delete - Deletes the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -164,7 +165,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +173,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - Gets the specified private endpoint connection associated with the workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // privateEndpointConnectionName - The name of the private endpoint connection associated with the workspace @@ -217,7 +218,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,8 +234,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res } // NewListPager - List all the private endpoint connections associated with the workspace. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List @@ -281,7 +281,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_privatelinkresources_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_privatelinkresources_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go index 5294a59e2527..a912078b961b 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_privatelinkresources_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // List - Gets the private link resources that need to be created for a workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List @@ -96,7 +97,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_quotas_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go similarity index 96% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_quotas_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go index 1d8e8d928da7..99a96464fcc0 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_quotas_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -55,8 +56,7 @@ func NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, o } // NewListPager - Gets the currently assigned Workspace Quotas based on VMFamily. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // location - The location for which resource usage is queried. // options - QuotasClientListOptions contains the optional parameters for the QuotasClient.List method. func (client *QuotasClient) NewListPager(location string, options *QuotasClientListOptions) *runtime.Pager[QuotasClientListResponse] { @@ -103,7 +103,7 @@ func (client *QuotasClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,7 +120,7 @@ func (client *QuotasClient) listHandleResponse(resp *http.Response) (QuotasClien // Update - Update quota for each VM family in workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // location - The location for update quota is queried. // parameters - Quota update parameters. // options - QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. @@ -155,7 +155,7 @@ func (client *QuotasClient) updateCreateRequest(ctx context.Context, location st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go new file mode 100644 index 000000000000..ac537e4f2da9 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go @@ -0,0 +1,439 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistriesClient contains the methods for the Registries group. +// Don't use this type directly, use NewRegistriesClient() instead. +type RegistriesClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistriesClient creates a new instance of RegistriesClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistriesClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistriesClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update registry +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of registry. This is case-insensitive +// body - Details required to create the registry. +// options - RegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistriesClient.BeginCreateOrUpdate +// method. +func (client *RegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistriesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistriesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistriesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update registry +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistriesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete registry. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of registry. This is case-insensitive +// options - RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method. +func (client *RegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*runtime.Poller[RegistriesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistriesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistriesClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete registry. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistriesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get registry +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of registry. This is case-insensitive +// options - RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method. +func (client *RegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientGetOptions) (RegistriesClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, options) + if err != nil { + return RegistriesClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistriesClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistriesClient) getHandleResponse(resp *http.Response) (RegistriesClientGetResponse, error) { + result := RegistriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Registry); err != nil { + return RegistriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List registries +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// options - RegistriesClientListOptions contains the optional parameters for the RegistriesClient.List method. +func (client *RegistriesClient) NewListPager(resourceGroupName string, options *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistriesClientListResponse]{ + More: func(page RegistriesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistriesClientListResponse) (RegistriesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistriesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistriesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistriesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *RegistriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistriesClient) listHandleResponse(resp *http.Response) (RegistriesClientListResponse, error) { + result := RegistriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistryTrackedResourceArmPaginatedResult); err != nil { + return RegistriesClientListResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List registries by subscription +// Generated from API version 2022-12-01-preview +// options - RegistriesClientListBySubscriptionOptions contains the optional parameters for the RegistriesClient.ListBySubscription +// method. +func (client *RegistriesClient) NewListBySubscriptionPager(options *RegistriesClientListBySubscriptionOptions) *runtime.Pager[RegistriesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistriesClientListBySubscriptionResponse]{ + More: func(page RegistriesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistriesClientListBySubscriptionResponse) (RegistriesClientListBySubscriptionResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listBySubscriptionCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistriesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + } + return client.listBySubscriptionHandleResponse(resp) + }, + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *RegistriesClient) listBySubscriptionCreateRequest(ctx context.Context, options *RegistriesClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *RegistriesClient) listBySubscriptionHandleResponse(resp *http.Response) (RegistriesClientListBySubscriptionResponse, error) { + result := RegistriesClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistryTrackedResourceArmPaginatedResult); err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// Update - Update tags +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of registry. This is case-insensitive +// body - Details required to create the registry. +// options - RegistriesClientUpdateOptions contains the optional parameters for the RegistriesClient.Update method. +func (client *RegistriesClient) Update(ctx context.Context, resourceGroupName string, registryName string, body PartialRegistryPartialTrackedResource, options *RegistriesClientUpdateOptions) (RegistriesClientUpdateResponse, error) { + req, err := client.updateCreateRequest(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return RegistriesClientUpdateResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistriesClientUpdateResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return RegistriesClientUpdateResponse{}, runtime.NewResponseError(resp) + } + return client.updateHandleResponse(resp) +} + +// updateCreateRequest creates the Update request. +func (client *RegistriesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, body PartialRegistryPartialTrackedResource, options *RegistriesClientUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// updateHandleResponse handles the Update response. +func (client *RegistriesClient) updateHandleResponse(resp *http.Response) (RegistriesClientUpdateResponse, error) { + result := RegistriesClientUpdateResponse{} + if val := resp.Header.Get("Location"); val != "" { + result.Location = &val + } + if val := resp.Header.Get("Retry-After"); val != "" { + retryAfter32, err := strconv.ParseInt(val, 10, 32) + retryAfter := int32(retryAfter32) + if err != nil { + return RegistriesClientUpdateResponse{}, err + } + result.RetryAfter = &retryAfter + } + if err := runtime.UnmarshalAsJSON(resp, &result.Registry); err != nil { + return RegistriesClientUpdateResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go new file mode 100644 index 000000000000..7eaee1a5d699 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go @@ -0,0 +1,331 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryCodeContainersClient contains the methods for the RegistryCodeContainers group. +// Don't use this type directly, use NewRegistryCodeContainersClient() instead. +type RegistryCodeContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryCodeContainersClient creates a new instance of RegistryCodeContainersClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryCodeContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryCodeContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryCodeContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// codeName - Container name. +// body - Container entity to create or update. +// options - RegistryCodeContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryCodeContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, codeName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryCodeContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, codeName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryCodeContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// codeName - Container name. +// options - RegistryCodeContainersClientBeginDeleteOptions contains the optional parameters for the RegistryCodeContainersClient.BeginDelete +// method. +func (client *RegistryCodeContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryCodeContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryCodeContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// codeName - Container name. +// options - RegistryCodeContainersClientGetOptions contains the optional parameters for the RegistryCodeContainersClient.Get +// method. +func (client *RegistryCodeContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientGetOptions) (RegistryCodeContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryCodeContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryCodeContainersClient) getHandleResponse(resp *http.Response) (RegistryCodeContainersClientGetResponse, error) { + result := RegistryCodeContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeContainer); err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// options - RegistryCodeContainersClientListOptions contains the optional parameters for the RegistryCodeContainersClient.List +// method. +func (client *RegistryCodeContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryCodeContainersClientListOptions) *runtime.Pager[RegistryCodeContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryCodeContainersClientListResponse]{ + More: func(page RegistryCodeContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryCodeContainersClientListResponse) (RegistryCodeContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryCodeContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryCodeContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryCodeContainersClient) listHandleResponse(resp *http.Response) (RegistryCodeContainersClientListResponse, error) { + result := RegistryCodeContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeContainerResourceArmPaginatedResult); err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go new file mode 100644 index 000000000000..a49591497a64 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go @@ -0,0 +1,358 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryCodeVersionsClient contains the methods for the RegistryCodeVersions group. +// Don't use this type directly, use NewRegistryCodeVersionsClient() instead. +type RegistryCodeVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryCodeVersionsClient creates a new instance of RegistryCodeVersionsClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryCodeVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryCodeVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryCodeVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// codeName - Container name. +// version - Version identifier. +// body - Version entity to create or update. +// options - RegistryCodeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryCodeVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, codeName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryCodeVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, codeName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryCodeVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// codeName - Container name. +// version - Version identifier. +// options - RegistryCodeVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginDelete +// method. +func (client *RegistryCodeVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryCodeVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryCodeVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// codeName - Container name. +// version - Version identifier. +// options - RegistryCodeVersionsClientGetOptions contains the optional parameters for the RegistryCodeVersionsClient.Get +// method. +func (client *RegistryCodeVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientGetOptions) (RegistryCodeVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryCodeVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryCodeVersionsClient) getHandleResponse(resp *http.Response) (RegistryCodeVersionsClientGetResponse, error) { + result := RegistryCodeVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeVersion); err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// codeName - Container name. +// options - RegistryCodeVersionsClientListOptions contains the optional parameters for the RegistryCodeVersionsClient.List +// method. +func (client *RegistryCodeVersionsClient) NewListPager(resourceGroupName string, registryName string, codeName string, options *RegistryCodeVersionsClientListOptions) *runtime.Pager[RegistryCodeVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryCodeVersionsClientListResponse]{ + More: func(page RegistryCodeVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryCodeVersionsClientListResponse) (RegistryCodeVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryCodeVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryCodeVersionsClient) listHandleResponse(resp *http.Response) (RegistryCodeVersionsClientListResponse, error) { + result := RegistryCodeVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeVersionResourceArmPaginatedResult); err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go new file mode 100644 index 000000000000..aa5307323ce2 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go @@ -0,0 +1,331 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryComponentContainersClient contains the methods for the RegistryComponentContainers group. +// Don't use this type directly, use NewRegistryComponentContainersClient() instead. +type RegistryComponentContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryComponentContainersClient creates a new instance of RegistryComponentContainersClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryComponentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryComponentContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryComponentContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// componentName - Container name. +// body - Container entity to create or update. +// options - RegistryComponentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryComponentContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, componentName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryComponentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, componentName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryComponentContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// componentName - Container name. +// options - RegistryComponentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryComponentContainersClient.BeginDelete +// method. +func (client *RegistryComponentContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryComponentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryComponentContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// componentName - Container name. +// options - RegistryComponentContainersClientGetOptions contains the optional parameters for the RegistryComponentContainersClient.Get +// method. +func (client *RegistryComponentContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientGetOptions) (RegistryComponentContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryComponentContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryComponentContainersClient) getHandleResponse(resp *http.Response) (RegistryComponentContainersClientGetResponse, error) { + result := RegistryComponentContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentContainer); err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// options - RegistryComponentContainersClientListOptions contains the optional parameters for the RegistryComponentContainersClient.List +// method. +func (client *RegistryComponentContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryComponentContainersClientListOptions) *runtime.Pager[RegistryComponentContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryComponentContainersClientListResponse]{ + More: func(page RegistryComponentContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryComponentContainersClientListResponse) (RegistryComponentContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryComponentContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryComponentContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryComponentContainersClient) listHandleResponse(resp *http.Response) (RegistryComponentContainersClientListResponse, error) { + result := RegistryComponentContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentContainerResourceArmPaginatedResult); err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go new file mode 100644 index 000000000000..f2925f259860 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go @@ -0,0 +1,358 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryComponentVersionsClient contains the methods for the RegistryComponentVersions group. +// Don't use this type directly, use NewRegistryComponentVersionsClient() instead. +type RegistryComponentVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryComponentVersionsClient creates a new instance of RegistryComponentVersionsClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryComponentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryComponentVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryComponentVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// componentName - Container name. +// version - Version identifier. +// body - Version entity to create or update. +// options - RegistryComponentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryComponentVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, componentName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryComponentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, componentName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryComponentVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// componentName - Container name. +// version - Version identifier. +// options - RegistryComponentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginDelete +// method. +func (client *RegistryComponentVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryComponentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryComponentVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// componentName - Container name. +// version - Version identifier. +// options - RegistryComponentVersionsClientGetOptions contains the optional parameters for the RegistryComponentVersionsClient.Get +// method. +func (client *RegistryComponentVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientGetOptions) (RegistryComponentVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryComponentVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryComponentVersionsClient) getHandleResponse(resp *http.Response) (RegistryComponentVersionsClientGetResponse, error) { + result := RegistryComponentVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentVersion); err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// componentName - Container name. +// options - RegistryComponentVersionsClientListOptions contains the optional parameters for the RegistryComponentVersionsClient.List +// method. +func (client *RegistryComponentVersionsClient) NewListPager(resourceGroupName string, registryName string, componentName string, options *RegistryComponentVersionsClientListOptions) *runtime.Pager[RegistryComponentVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryComponentVersionsClientListResponse]{ + More: func(page RegistryComponentVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryComponentVersionsClientListResponse) (RegistryComponentVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryComponentVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryComponentVersionsClient) listHandleResponse(resp *http.Response) (RegistryComponentVersionsClientListResponse, error) { + result := RegistryComponentVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentVersionResourceArmPaginatedResult); err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go new file mode 100644 index 000000000000..63e4e680b7a7 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go @@ -0,0 +1,334 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryEnvironmentContainersClient contains the methods for the RegistryEnvironmentContainers group. +// Don't use this type directly, use NewRegistryEnvironmentContainersClient() instead. +type RegistryEnvironmentContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryEnvironmentContainersClient creates a new instance of RegistryEnvironmentContainersClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryEnvironmentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryEnvironmentContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryEnvironmentContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// environmentName - Container name. +// body - Container entity to create or update. +// options - RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryEnvironmentContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, environmentName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryEnvironmentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, environmentName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryEnvironmentContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// environmentName - Container name. +// options - RegistryEnvironmentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginDelete +// method. +func (client *RegistryEnvironmentContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryEnvironmentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryEnvironmentContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// environmentName - Container name. This is case-sensitive. +// options - RegistryEnvironmentContainersClientGetOptions contains the optional parameters for the RegistryEnvironmentContainersClient.Get +// method. +func (client *RegistryEnvironmentContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientGetOptions) (RegistryEnvironmentContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryEnvironmentContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryEnvironmentContainersClient) getHandleResponse(resp *http.Response) (RegistryEnvironmentContainersClientGetResponse, error) { + result := RegistryEnvironmentContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentContainer); err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List environment containers. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// options - RegistryEnvironmentContainersClientListOptions contains the optional parameters for the RegistryEnvironmentContainersClient.List +// method. +func (client *RegistryEnvironmentContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryEnvironmentContainersClientListOptions) *runtime.Pager[RegistryEnvironmentContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryEnvironmentContainersClientListResponse]{ + More: func(page RegistryEnvironmentContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryEnvironmentContainersClientListResponse) (RegistryEnvironmentContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryEnvironmentContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryEnvironmentContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryEnvironmentContainersClient) listHandleResponse(resp *http.Response) (RegistryEnvironmentContainersClientListResponse, error) { + result := RegistryEnvironmentContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentContainerResourceArmPaginatedResult); err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go new file mode 100644 index 000000000000..d879eaa48cf4 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go @@ -0,0 +1,361 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryEnvironmentVersionsClient contains the methods for the RegistryEnvironmentVersions group. +// Don't use this type directly, use NewRegistryEnvironmentVersionsClient() instead. +type RegistryEnvironmentVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryEnvironmentVersionsClient creates a new instance of RegistryEnvironmentVersionsClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryEnvironmentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryEnvironmentVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryEnvironmentVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// environmentName - Container name. +// version - Version identifier. +// body - Version entity to create or update. +// options - RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryEnvironmentVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, environmentName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryEnvironmentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryEnvironmentVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// environmentName - Container name. +// version - Version identifier. +// options - RegistryEnvironmentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginDelete +// method. +func (client *RegistryEnvironmentVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryEnvironmentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryEnvironmentVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// environmentName - Container name. This is case-sensitive. +// version - Version identifier. This is case-sensitive. +// options - RegistryEnvironmentVersionsClientGetOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.Get +// method. +func (client *RegistryEnvironmentVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientGetOptions) (RegistryEnvironmentVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryEnvironmentVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryEnvironmentVersionsClient) getHandleResponse(resp *http.Response) (RegistryEnvironmentVersionsClientGetResponse, error) { + result := RegistryEnvironmentVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentVersion); err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// environmentName - Container name. This is case-sensitive. +// options - RegistryEnvironmentVersionsClientListOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.List +// method. +func (client *RegistryEnvironmentVersionsClient) NewListPager(resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentVersionsClientListOptions) *runtime.Pager[RegistryEnvironmentVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryEnvironmentVersionsClientListResponse]{ + More: func(page RegistryEnvironmentVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryEnvironmentVersionsClientListResponse) (RegistryEnvironmentVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryEnvironmentVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryEnvironmentVersionsClient) listHandleResponse(resp *http.Response) (RegistryEnvironmentVersionsClientListResponse, error) { + result := RegistryEnvironmentVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentVersionResourceArmPaginatedResult); err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go new file mode 100644 index 000000000000..fc08bd344b0b --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go @@ -0,0 +1,334 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryModelContainersClient contains the methods for the RegistryModelContainers group. +// Don't use this type directly, use NewRegistryModelContainersClient() instead. +type RegistryModelContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryModelContainersClient creates a new instance of RegistryModelContainersClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryModelContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryModelContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryModelContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update model container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// modelName - Container name. +// body - Container entity to create or update. +// options - RegistryModelContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryModelContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, modelName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update model container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryModelContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, modelName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryModelContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// modelName - Container name. +// options - RegistryModelContainersClientBeginDeleteOptions contains the optional parameters for the RegistryModelContainersClient.BeginDelete +// method. +func (client *RegistryModelContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryModelContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryModelContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryModelContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// modelName - Container name. This is case-sensitive. +// options - RegistryModelContainersClientGetOptions contains the optional parameters for the RegistryModelContainersClient.Get +// method. +func (client *RegistryModelContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientGetOptions) (RegistryModelContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryModelContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryModelContainersClient) getHandleResponse(resp *http.Response) (RegistryModelContainersClientGetResponse, error) { + result := RegistryModelContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelContainer); err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List model containers. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// options - RegistryModelContainersClientListOptions contains the optional parameters for the RegistryModelContainersClient.List +// method. +func (client *RegistryModelContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryModelContainersClientListOptions) *runtime.Pager[RegistryModelContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryModelContainersClientListResponse]{ + More: func(page RegistryModelContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryModelContainersClientListResponse) (RegistryModelContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryModelContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryModelContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryModelContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryModelContainersClient) listHandleResponse(resp *http.Response) (RegistryModelContainersClientListResponse, error) { + result := RegistryModelContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelContainerResourceArmPaginatedResult); err != nil { + return RegistryModelContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go new file mode 100644 index 000000000000..75404b536b20 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go @@ -0,0 +1,373 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryModelVersionsClient contains the methods for the RegistryModelVersions group. +// Don't use this type directly, use NewRegistryModelVersionsClient() instead. +type RegistryModelVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryModelVersionsClient creates a new instance of RegistryModelVersionsClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewRegistryModelVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryModelVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryModelVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// modelName - Container name. +// version - Version identifier. +// body - Version entity to create or update. +// options - RegistryModelVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryModelVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, modelName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryModelVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, modelName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryModelVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// modelName - Container name. +// version - Version identifier. +// options - RegistryModelVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryModelVersionsClient.BeginDelete +// method. +func (client *RegistryModelVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryModelVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *RegistryModelVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryModelVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// modelName - Container name. This is case-sensitive. +// version - Version identifier. This is case-sensitive. +// options - RegistryModelVersionsClientGetOptions contains the optional parameters for the RegistryModelVersionsClient.Get +// method. +func (client *RegistryModelVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientGetOptions) (RegistryModelVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryModelVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryModelVersionsClient) getHandleResponse(resp *http.Response) (RegistryModelVersionsClientGetResponse, error) { + result := RegistryModelVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelVersion); err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// registryName - Name of Azure Machine Learning registry. +// modelName - Container name. This is case-sensitive. +// options - RegistryModelVersionsClientListOptions contains the optional parameters for the RegistryModelVersionsClient.List +// method. +func (client *RegistryModelVersionsClient) NewListPager(resourceGroupName string, registryName string, modelName string, options *RegistryModelVersionsClientListOptions) *runtime.Pager[RegistryModelVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryModelVersionsClientListResponse]{ + More: func(page RegistryModelVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryModelVersionsClientListResponse) (RegistryModelVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryModelVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Version != nil { + reqQP.Set("version", *options.Version) + } + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.Properties != nil { + reqQP.Set("properties", *options.Properties) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryModelVersionsClient) listHandleResponse(resp *http.Response) (RegistryModelVersionsClientListResponse, error) { + result := RegistryModelVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelVersionResourceArmPaginatedResult); err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_response_types.go b/sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go similarity index 67% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_response_types.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go index 160588373737..1bcfbd5c197f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_response_types.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -198,6 +199,16 @@ type ComputeClientStopResponse struct { // placeholder for future response values } +// ComputeClientUpdateCustomServicesResponse contains the response from method ComputeClient.UpdateCustomServices. +type ComputeClientUpdateCustomServicesResponse struct { + // placeholder for future response values +} + +// ComputeClientUpdateIdleShutdownSettingResponse contains the response from method ComputeClient.UpdateIdleShutdownSetting. +type ComputeClientUpdateIdleShutdownSettingResponse struct { + // placeholder for future response values +} + // ComputeClientUpdateResponse contains the response from method ComputeClient.Update. type ComputeClientUpdateResponse struct { ComputeResource @@ -343,6 +354,51 @@ type JobsClientListResponse struct { JobBaseResourceArmPaginatedResult } +// LabelingJobsClientCreateOrUpdateResponse contains the response from method LabelingJobsClient.CreateOrUpdate. +type LabelingJobsClientCreateOrUpdateResponse struct { + LabelingJob +} + +// LabelingJobsClientDeleteResponse contains the response from method LabelingJobsClient.Delete. +type LabelingJobsClientDeleteResponse struct { + // placeholder for future response values +} + +// LabelingJobsClientExportLabelsResponse contains the response from method LabelingJobsClient.ExportLabels. +type LabelingJobsClientExportLabelsResponse struct { + ExportSummaryClassification +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingJobsClientExportLabelsResponse. +func (l *LabelingJobsClientExportLabelsResponse) UnmarshalJSON(data []byte) error { + res, err := unmarshalExportSummaryClassification(data) + if err != nil { + return err + } + l.ExportSummaryClassification = res + return nil +} + +// LabelingJobsClientGetResponse contains the response from method LabelingJobsClient.Get. +type LabelingJobsClientGetResponse struct { + LabelingJob +} + +// LabelingJobsClientListResponse contains the response from method LabelingJobsClient.List. +type LabelingJobsClientListResponse struct { + LabelingJobResourceArmPaginatedResult +} + +// LabelingJobsClientPauseResponse contains the response from method LabelingJobsClient.Pause. +type LabelingJobsClientPauseResponse struct { + // placeholder for future response values +} + +// LabelingJobsClientResumeResponse contains the response from method LabelingJobsClient.Resume. +type LabelingJobsClientResumeResponse struct { + // placeholder for future response values +} + // ModelContainersClientCreateOrUpdateResponse contains the response from method ModelContainersClient.CreateOrUpdate. type ModelContainersClientCreateOrUpdateResponse struct { ModelContainer @@ -498,6 +554,221 @@ type QuotasClientUpdateResponse struct { UpdateWorkspaceQuotasResult } +// RegistriesClientCreateOrUpdateResponse contains the response from method RegistriesClient.CreateOrUpdate. +type RegistriesClientCreateOrUpdateResponse struct { + Registry +} + +// RegistriesClientDeleteResponse contains the response from method RegistriesClient.Delete. +type RegistriesClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistriesClientGetResponse contains the response from method RegistriesClient.Get. +type RegistriesClientGetResponse struct { + Registry +} + +// RegistriesClientListBySubscriptionResponse contains the response from method RegistriesClient.ListBySubscription. +type RegistriesClientListBySubscriptionResponse struct { + RegistryTrackedResourceArmPaginatedResult +} + +// RegistriesClientListResponse contains the response from method RegistriesClient.List. +type RegistriesClientListResponse struct { + RegistryTrackedResourceArmPaginatedResult +} + +// RegistriesClientUpdateResponse contains the response from method RegistriesClient.Update. +type RegistriesClientUpdateResponse struct { + Registry + // Location contains the information returned from the Location header response. + Location *string + + // RetryAfter contains the information returned from the Retry-After header response. + RetryAfter *int32 +} + +// RegistryCodeContainersClientCreateOrUpdateResponse contains the response from method RegistryCodeContainersClient.CreateOrUpdate. +type RegistryCodeContainersClientCreateOrUpdateResponse struct { + CodeContainer +} + +// RegistryCodeContainersClientDeleteResponse contains the response from method RegistryCodeContainersClient.Delete. +type RegistryCodeContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryCodeContainersClientGetResponse contains the response from method RegistryCodeContainersClient.Get. +type RegistryCodeContainersClientGetResponse struct { + CodeContainer +} + +// RegistryCodeContainersClientListResponse contains the response from method RegistryCodeContainersClient.List. +type RegistryCodeContainersClientListResponse struct { + CodeContainerResourceArmPaginatedResult +} + +// RegistryCodeVersionsClientCreateOrUpdateResponse contains the response from method RegistryCodeVersionsClient.CreateOrUpdate. +type RegistryCodeVersionsClientCreateOrUpdateResponse struct { + CodeVersion +} + +// RegistryCodeVersionsClientDeleteResponse contains the response from method RegistryCodeVersionsClient.Delete. +type RegistryCodeVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryCodeVersionsClientGetResponse contains the response from method RegistryCodeVersionsClient.Get. +type RegistryCodeVersionsClientGetResponse struct { + CodeVersion +} + +// RegistryCodeVersionsClientListResponse contains the response from method RegistryCodeVersionsClient.List. +type RegistryCodeVersionsClientListResponse struct { + CodeVersionResourceArmPaginatedResult +} + +// RegistryComponentContainersClientCreateOrUpdateResponse contains the response from method RegistryComponentContainersClient.CreateOrUpdate. +type RegistryComponentContainersClientCreateOrUpdateResponse struct { + ComponentContainer +} + +// RegistryComponentContainersClientDeleteResponse contains the response from method RegistryComponentContainersClient.Delete. +type RegistryComponentContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryComponentContainersClientGetResponse contains the response from method RegistryComponentContainersClient.Get. +type RegistryComponentContainersClientGetResponse struct { + ComponentContainer +} + +// RegistryComponentContainersClientListResponse contains the response from method RegistryComponentContainersClient.List. +type RegistryComponentContainersClientListResponse struct { + ComponentContainerResourceArmPaginatedResult +} + +// RegistryComponentVersionsClientCreateOrUpdateResponse contains the response from method RegistryComponentVersionsClient.CreateOrUpdate. +type RegistryComponentVersionsClientCreateOrUpdateResponse struct { + ComponentVersion +} + +// RegistryComponentVersionsClientDeleteResponse contains the response from method RegistryComponentVersionsClient.Delete. +type RegistryComponentVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryComponentVersionsClientGetResponse contains the response from method RegistryComponentVersionsClient.Get. +type RegistryComponentVersionsClientGetResponse struct { + ComponentVersion +} + +// RegistryComponentVersionsClientListResponse contains the response from method RegistryComponentVersionsClient.List. +type RegistryComponentVersionsClientListResponse struct { + ComponentVersionResourceArmPaginatedResult +} + +// RegistryEnvironmentContainersClientCreateOrUpdateResponse contains the response from method RegistryEnvironmentContainersClient.CreateOrUpdate. +type RegistryEnvironmentContainersClientCreateOrUpdateResponse struct { + EnvironmentContainer +} + +// RegistryEnvironmentContainersClientDeleteResponse contains the response from method RegistryEnvironmentContainersClient.Delete. +type RegistryEnvironmentContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryEnvironmentContainersClientGetResponse contains the response from method RegistryEnvironmentContainersClient.Get. +type RegistryEnvironmentContainersClientGetResponse struct { + EnvironmentContainer +} + +// RegistryEnvironmentContainersClientListResponse contains the response from method RegistryEnvironmentContainersClient.List. +type RegistryEnvironmentContainersClientListResponse struct { + EnvironmentContainerResourceArmPaginatedResult +} + +// RegistryEnvironmentVersionsClientCreateOrUpdateResponse contains the response from method RegistryEnvironmentVersionsClient.CreateOrUpdate. +type RegistryEnvironmentVersionsClientCreateOrUpdateResponse struct { + EnvironmentVersion +} + +// RegistryEnvironmentVersionsClientDeleteResponse contains the response from method RegistryEnvironmentVersionsClient.Delete. +type RegistryEnvironmentVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryEnvironmentVersionsClientGetResponse contains the response from method RegistryEnvironmentVersionsClient.Get. +type RegistryEnvironmentVersionsClientGetResponse struct { + EnvironmentVersion +} + +// RegistryEnvironmentVersionsClientListResponse contains the response from method RegistryEnvironmentVersionsClient.List. +type RegistryEnvironmentVersionsClientListResponse struct { + EnvironmentVersionResourceArmPaginatedResult +} + +// RegistryModelContainersClientCreateOrUpdateResponse contains the response from method RegistryModelContainersClient.CreateOrUpdate. +type RegistryModelContainersClientCreateOrUpdateResponse struct { + ModelContainer +} + +// RegistryModelContainersClientDeleteResponse contains the response from method RegistryModelContainersClient.Delete. +type RegistryModelContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryModelContainersClientGetResponse contains the response from method RegistryModelContainersClient.Get. +type RegistryModelContainersClientGetResponse struct { + ModelContainer +} + +// RegistryModelContainersClientListResponse contains the response from method RegistryModelContainersClient.List. +type RegistryModelContainersClientListResponse struct { + ModelContainerResourceArmPaginatedResult +} + +// RegistryModelVersionsClientCreateOrUpdateResponse contains the response from method RegistryModelVersionsClient.CreateOrUpdate. +type RegistryModelVersionsClientCreateOrUpdateResponse struct { + ModelVersion +} + +// RegistryModelVersionsClientDeleteResponse contains the response from method RegistryModelVersionsClient.Delete. +type RegistryModelVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryModelVersionsClientGetResponse contains the response from method RegistryModelVersionsClient.Get. +type RegistryModelVersionsClientGetResponse struct { + ModelVersion +} + +// RegistryModelVersionsClientListResponse contains the response from method RegistryModelVersionsClient.List. +type RegistryModelVersionsClientListResponse struct { + ModelVersionResourceArmPaginatedResult +} + +// SchedulesClientCreateOrUpdateResponse contains the response from method SchedulesClient.CreateOrUpdate. +type SchedulesClientCreateOrUpdateResponse struct { + Schedule +} + +// SchedulesClientDeleteResponse contains the response from method SchedulesClient.Delete. +type SchedulesClientDeleteResponse struct { + // placeholder for future response values +} + +// SchedulesClientGetResponse contains the response from method SchedulesClient.Get. +type SchedulesClientGetResponse struct { + Schedule +} + +// SchedulesClientListResponse contains the response from method SchedulesClient.List. +type SchedulesClientListResponse struct { + ScheduleResourceArmPaginatedResult +} + // UsagesClientListResponse contains the response from method UsagesClient.List. type UsagesClientListResponse struct { ListUsagesResult diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go new file mode 100644 index 000000000000..3d199e0ce9b5 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go @@ -0,0 +1,327 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// SchedulesClient contains the methods for the Schedules group. +// Don't use this type directly, use NewSchedulesClient() instead. +type SchedulesClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewSchedulesClient creates a new instance of SchedulesClient with the specified values. +// subscriptionID - The ID of the target subscription. +// credential - used to authorize requests. Usually a credential from azidentity. +// options - pass nil to accept the default values. +func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SchedulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &SchedulesClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update schedule. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// name - Schedule name. +// body - Schedule definition. +// options - SchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.BeginCreateOrUpdate +// method. +func (client *SchedulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body Schedule, options *SchedulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SchedulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[SchedulesClientCreateOrUpdateResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[SchedulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update schedule. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *SchedulesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body Schedule, options *SchedulesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body Schedule, options *SchedulesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete schedule. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// name - Schedule name. +// options - SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method. +func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *SchedulesClientBeginDeleteOptions) (*runtime.Poller[SchedulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + return runtime.NewPoller[SchedulesClientDeleteResponse](resp, client.pl, nil) + } else { + return runtime.NewPollerFromResumeToken[SchedulesClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete schedule. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +func (client *SchedulesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *SchedulesClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *SchedulesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get schedule. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// name - Schedule name. +// options - SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. +func (client *SchedulesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *SchedulesClientGetOptions) (SchedulesClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return SchedulesClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SchedulesClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SchedulesClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *SchedulesClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *SchedulesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *SchedulesClient) getHandleResponse(resp *http.Response) (SchedulesClientGetResponse, error) { + result := SchedulesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Schedule); err != nil { + return SchedulesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List schedules in specified workspace. +// Generated from API version 2022-12-01-preview +// resourceGroupName - The name of the resource group. The name is case insensitive. +// workspaceName - Name of Azure Machine Learning workspace. +// options - SchedulesClientListOptions contains the optional parameters for the SchedulesClient.List method. +func (client *SchedulesClient) NewListPager(resourceGroupName string, workspaceName string, options *SchedulesClientListOptions) *runtime.Pager[SchedulesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[SchedulesClientListResponse]{ + More: func(page SchedulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *SchedulesClientListResponse) (SchedulesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return SchedulesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SchedulesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SchedulesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *SchedulesClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *SchedulesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2022-12-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *SchedulesClient) listHandleResponse(resp *http.Response) (SchedulesClientListResponse, error) { + result := SchedulesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ScheduleResourceArmPaginatedResult); err != nil { + return SchedulesClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_time_rfc3339.go b/sdk/resourcemanager/machinelearning/armmachinelearning/time_rfc3339.go similarity index 99% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_time_rfc3339.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/time_rfc3339.go index 9a83980c92ad..7ce1982bab3f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/time_rfc3339.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_usages_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go similarity index 96% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_usages_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go index 0ab6ba8a3dbf..ad5feee98715 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_usages_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -55,8 +56,7 @@ func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, o } // NewListPager - Gets the current usage information as well as limits for AML resources for given subscription and location. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // location - The location for which resource usage is queried. // options - UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { @@ -103,7 +103,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_virtualmachinesizes_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_virtualmachinesizes_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go index 471a4ebc6861..cb7db2e6fcf0 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_virtualmachinesizes_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewVirtualMachineSizesClient(subscriptionID string, credential azcore.Token // List - Returns supported VM Sizes in a location // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // location - The location upon which virtual-machine-sizes is queried. // options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List // method. @@ -91,7 +92,7 @@ func (client *VirtualMachineSizesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspaceconnections_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspaceconnections_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go index df08c10b779d..c94c402f8bfa 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspaceconnections_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewWorkspaceConnectionsClient(subscriptionID string, credential azcore.Toke // Create - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // connectionName - Friendly name of the workspace connection @@ -102,7 +103,7 @@ func (client *WorkspaceConnectionsClient) createCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -119,7 +120,7 @@ func (client *WorkspaceConnectionsClient) createHandleResponse(resp *http.Respon // Delete - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // connectionName - Friendly name of the workspace connection @@ -164,7 +165,7 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +173,7 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex // Get - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // connectionName - Friendly name of the workspace connection @@ -217,7 +218,7 @@ func (client *WorkspaceConnectionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,9 +233,6 @@ func (client *WorkspaceConnectionsClient) getHandleResponse(resp *http.Response) return result, nil } -// NewListPager - -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspaceConnectionsClientListOptions contains the optional parameters for the WorkspaceConnectionsClient.List @@ -293,7 +291,7 @@ func (client *WorkspaceConnectionsClient) listCreateRequest(ctx context.Context, if options != nil && options.Category != nil { reqQP.Set("category", *options.Category) } - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspacefeatures_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go similarity index 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspacefeatures_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go index 605cbf349a91..81a968f60a14 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspacefeatures_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -55,8 +56,7 @@ func NewWorkspaceFeaturesClient(subscriptionID string, credential azcore.TokenCr } // NewListPager - Lists all enabled features for a workspace -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspaceFeaturesClientListOptions contains the optional parameters for the WorkspaceFeaturesClient.List method. @@ -108,7 +108,7 @@ func (client *WorkspaceFeaturesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspaces_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go similarity index 96% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspaces_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go index a7148e6c7d6a..e5c7572e3342 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_workspaces_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go @@ -5,6 +5,7 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. package armmachinelearning @@ -56,7 +57,7 @@ func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredentia // BeginCreateOrUpdate - Creates or updates a workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // parameters - The parameters for creating or updating a machine learning workspace. @@ -76,7 +77,7 @@ func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates a workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, parameters, options) if err != nil { @@ -112,7 +113,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -120,7 +121,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. @@ -138,7 +139,7 @@ func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes a machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -174,7 +175,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -182,7 +183,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc // BeginDiagnose - Diagnose workspace setup issue. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientBeginDiagnoseOptions contains the optional parameters for the WorkspacesClient.BeginDiagnose @@ -203,7 +204,7 @@ func (client *WorkspacesClient) BeginDiagnose(ctx context.Context, resourceGroup // Diagnose - Diagnose workspace setup issue. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *WorkspacesClient) diagnose(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDiagnoseOptions) (*http.Response, error) { req, err := client.diagnoseCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -239,7 +240,7 @@ func (client *WorkspacesClient) diagnoseCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -250,7 +251,7 @@ func (client *WorkspacesClient) diagnoseCreateRequest(ctx context.Context, resou // Get - Gets the properties of the specified machine learning workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method. @@ -289,7 +290,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -305,8 +306,7 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac } // NewListByResourceGroupPager - Lists all the available machine learning workspaces under the specified resource group. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup // method. @@ -354,7 +354,7 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -373,8 +373,7 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res } // NewListBySubscriptionPager - Lists all the available machine learning workspaces under the specified subscription. -// If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription // method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { @@ -417,7 +416,7 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -438,7 +437,7 @@ func (client *WorkspacesClient) listBySubscriptionHandleResponse(resp *http.Resp // ListKeys - Lists all the keys associated with this workspace. This includes keys for the storage account, app insights // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientListKeysOptions contains the optional parameters for the WorkspacesClient.ListKeys method. @@ -477,7 +476,7 @@ func (client *WorkspacesClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -494,7 +493,7 @@ func (client *WorkspacesClient) listKeysHandleResponse(resp *http.Response) (Wor // ListNotebookAccessToken - return notebook access token and refresh token // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientListNotebookAccessTokenOptions contains the optional parameters for the WorkspacesClient.ListNotebookAccessToken @@ -534,7 +533,7 @@ func (client *WorkspacesClient) listNotebookAccessTokenCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -551,7 +550,7 @@ func (client *WorkspacesClient) listNotebookAccessTokenHandleResponse(resp *http // ListNotebookKeys - List keys of a notebook. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientListNotebookKeysOptions contains the optional parameters for the WorkspacesClient.ListNotebookKeys @@ -591,7 +590,7 @@ func (client *WorkspacesClient) listNotebookKeysCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -609,7 +608,7 @@ func (client *WorkspacesClient) listNotebookKeysHandleResponse(resp *http.Respon // ListOutboundNetworkDependenciesEndpoints - Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies // (FQDNs) programmatically. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the WorkspacesClient.ListOutboundNetworkDependenciesEndpoints @@ -649,7 +648,7 @@ func (client *WorkspacesClient) listOutboundNetworkDependenciesEndpointsCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -666,7 +665,7 @@ func (client *WorkspacesClient) listOutboundNetworkDependenciesEndpointsHandleRe // ListStorageAccountKeys - List storage account keys of a workspace. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientListStorageAccountKeysOptions contains the optional parameters for the WorkspacesClient.ListStorageAccountKeys @@ -706,7 +705,7 @@ func (client *WorkspacesClient) listStorageAccountKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -723,7 +722,7 @@ func (client *WorkspacesClient) listStorageAccountKeysHandleResponse(resp *http. // BeginPrepareNotebook - Prepare a notebook. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientBeginPrepareNotebookOptions contains the optional parameters for the WorkspacesClient.BeginPrepareNotebook @@ -744,7 +743,7 @@ func (client *WorkspacesClient) BeginPrepareNotebook(ctx context.Context, resour // PrepareNotebook - Prepare a notebook. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *WorkspacesClient) prepareNotebook(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginPrepareNotebookOptions) (*http.Response, error) { req, err := client.prepareNotebookCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -780,7 +779,7 @@ func (client *WorkspacesClient) prepareNotebookCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -789,7 +788,7 @@ func (client *WorkspacesClient) prepareNotebookCreateRequest(ctx context.Context // BeginResyncKeys - Resync all the keys associated with this workspace. This includes keys for the storage account, app insights // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // options - WorkspacesClientBeginResyncKeysOptions contains the optional parameters for the WorkspacesClient.BeginResyncKeys @@ -809,7 +808,7 @@ func (client *WorkspacesClient) BeginResyncKeys(ctx context.Context, resourceGro // ResyncKeys - Resync all the keys associated with this workspace. This includes keys for the storage account, app insights // and password for container registry // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *WorkspacesClient) resyncKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginResyncKeysOptions) (*http.Response, error) { req, err := client.resyncKeysCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -845,7 +844,7 @@ func (client *WorkspacesClient) resyncKeysCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -853,7 +852,7 @@ func (client *WorkspacesClient) resyncKeysCreateRequest(ctx context.Context, res // BeginUpdate - Updates a machine learning workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview // resourceGroupName - The name of the resource group. The name is case insensitive. // workspaceName - Name of Azure Machine Learning workspace. // parameters - The parameters for updating a machine learning workspace. @@ -872,7 +871,7 @@ func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupNa // Update - Updates a machine learning workspace with the specified parameters. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-12-01-preview func (client *WorkspacesClient) update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters, options *WorkspacesClientBeginUpdateOptions) (*http.Response, error) { req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, parameters, options) if err != nil { @@ -908,7 +907,7 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-05-01") + reqQP.Set("api-version", "2022-12-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchdeployments_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchdeployments_client_test.go deleted file mode 100644 index c0c23572dffc..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchdeployments_client_test.go +++ /dev/null @@ -1,216 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchDeployment/list.json -func ExampleBatchDeploymentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - "testEndpointName", - &armmachinelearning.BatchDeploymentsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchDeployment/delete.json -func ExampleBatchDeploymentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchDeployment/get.json -func ExampleBatchDeploymentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchDeployment/update.json -func ExampleBatchDeploymentsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - armmachinelearning.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties{ - Properties: &armmachinelearning.PartialBatchDeployment{ - Description: to.Ptr("string"), - }, - Tags: map[string]*string{}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchDeployment/createOrUpdate.json -func ExampleBatchDeploymentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - armmachinelearning.BatchDeployment{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.BatchDeploymentProperties{ - Description: to.Ptr("string"), - CodeConfiguration: &armmachinelearning.CodeConfiguration{ - CodeID: to.Ptr("string"), - ScoringScript: to.Ptr("string"), - }, - EnvironmentID: to.Ptr("string"), - EnvironmentVariables: map[string]*string{ - "string": to.Ptr("string"), - }, - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Compute: to.Ptr("string"), - ErrorThreshold: to.Ptr[int32](1), - LoggingLevel: to.Ptr(armmachinelearning.BatchLoggingLevelInfo), - MaxConcurrencyPerInstance: to.Ptr[int32](1), - MiniBatchSize: to.Ptr[int64](1), - Model: &armmachinelearning.IDAssetReference{ - ReferenceType: to.Ptr(armmachinelearning.ReferenceTypeID), - AssetID: to.Ptr("string"), - }, - OutputAction: to.Ptr(armmachinelearning.BatchOutputActionSummaryOnly), - OutputFileName: to.Ptr("string"), - Resources: &armmachinelearning.ResourceConfiguration{ - InstanceCount: to.Ptr[int32](1), - InstanceType: to.Ptr("string"), - Properties: map[string]interface{}{ - "string": map[string]interface{}{ - "cd3c37dc-2876-4ca4-8a54-21bd7619724a": nil, - }, - }, - }, - RetrySettings: &armmachinelearning.BatchRetrySettings{ - MaxRetries: to.Ptr[int32](1), - Timeout: to.Ptr("PT5M"), - }, - }, - SKU: &armmachinelearning.SKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierFree), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchendpoints_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchendpoints_client_test.go deleted file mode 100644 index 6a8f7c11efa7..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchendpoints_client_test.go +++ /dev/null @@ -1,208 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchEndpoint/list.json -func ExampleBatchEndpointsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - &armmachinelearning.BatchEndpointsClientListOptions{Count: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchEndpoint/delete.json -func ExampleBatchEndpointsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "resourceGroup-1234", - "testworkspace", - "testBatchEndpoint", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchEndpoint/get.json -func ExampleBatchEndpointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchEndpoint/update.json -func ExampleBatchEndpointsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - armmachinelearning.PartialMinimalTrackedResourceWithIdentity{ - Tags: map[string]*string{}, - Identity: &armmachinelearning.PartialManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]interface{}{ - "string": map[string]interface{}{}, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchEndpoint/createOrUpdate.json -func ExampleBatchEndpointsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - armmachinelearning.BatchEndpoint{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.BatchEndpointProperties{ - Description: to.Ptr("string"), - AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Defaults: &armmachinelearning.BatchEndpointDefaults{ - DeploymentName: to.Ptr("string"), - }, - }, - SKU: &armmachinelearning.SKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierFree), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/BatchEndpoint/listKeys.json -func ExampleBatchEndpointsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewBatchEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListKeys(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codecontainers_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codecontainers_client_test.go deleted file mode 100644 index be5c5e705b74..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codecontainers_client_test.go +++ /dev/null @@ -1,120 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeContainer/list.json -func ExampleCodeContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg123", - "testworkspace", - &armmachinelearning.CodeContainersClientListOptions{Skip: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeContainer/delete.json -func ExampleCodeContainersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "testworkspace", - "testContainer", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeContainer/get.json -func ExampleCodeContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "testworkspace", - "testContainer", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeContainer/createOrUpdate.json -func ExampleCodeContainersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "testrg123", - "testworkspace", - "testContainer", - armmachinelearning.CodeContainer{ - Properties: &armmachinelearning.CodeContainerProperties{ - Description: to.Ptr("string"), - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codeversions_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codeversions_client_test.go deleted file mode 100644 index b22b6c23d2a6..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codeversions_client_test.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeVersion/list.json -func ExampleCodeVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - "string", - &armmachinelearning.CodeVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeVersion/delete.json -func ExampleCodeVersionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeVersion/get.json -func ExampleCodeVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/CodeVersion/createOrUpdate.json -func ExampleCodeVersionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewCodeVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - armmachinelearning.CodeVersion{ - Properties: &armmachinelearning.CodeVersionProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - CodeURI: to.Ptr("https://blobStorage/folderName"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentcontainers_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentcontainers_client_test.go deleted file mode 100644 index 7f55176f6eca..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentcontainers_client_test.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentContainer/list.json -func ExampleComponentContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - &armmachinelearning.ComponentContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentContainer/delete.json -func ExampleComponentContainersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentContainer/get.json -func ExampleComponentContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentContainer/createOrUpdate.json -func ExampleComponentContainersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - armmachinelearning.ComponentContainer{ - Properties: &armmachinelearning.ComponentContainerProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentversions_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentversions_client_test.go deleted file mode 100644 index 49690a232734..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentversions_client_test.go +++ /dev/null @@ -1,134 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentVersion/list.json -func ExampleComponentVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - "string", - &armmachinelearning.ComponentVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentVersion/delete.json -func ExampleComponentVersionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentVersion/get.json -func ExampleComponentVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ComponentVersion/createOrUpdate.json -func ExampleComponentVersionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComponentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - armmachinelearning.ComponentVersion{ - Properties: &armmachinelearning.ComponentVersionProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - ComponentSpec: map[string]interface{}{ - "8ced901b-d826-477d-bfef-329da9672513": nil, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_compute_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_compute_client_test.go deleted file mode 100644 index 9079f881af2e..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_compute_client_test.go +++ /dev/null @@ -1,311 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/list.json -func ExampleComputeClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg123", - "workspaces123", - &armmachinelearning.ComputeClientListOptions{Skip: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/get/AKSCompute.json -func ExampleComputeClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "workspaces123", - "compute123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/createOrUpdate/KubernetesCompute.json -func ExampleComputeClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "testrg123", - "workspaces123", - "compute123", - armmachinelearning.ComputeResource{ - Properties: &armmachinelearning.Kubernetes{ - Description: to.Ptr("some compute"), - ComputeType: to.Ptr(armmachinelearning.ComputeTypeKubernetes), - ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), - Properties: &armmachinelearning.KubernetesProperties{ - DefaultInstanceType: to.Ptr("defaultInstanceType"), - InstanceTypes: map[string]*armmachinelearning.InstanceTypeSchema{ - "defaultInstanceType": { - Resources: &armmachinelearning.InstanceTypeSchemaResources{ - Limits: map[string]*string{ - "cpu": to.Ptr("1"), - "memory": to.Ptr("4Gi"), - "nvidia.com/gpu": nil, - }, - Requests: map[string]*string{ - "cpu": to.Ptr("1"), - "memory": to.Ptr("4Gi"), - "nvidia.com/gpu": nil, - }, - }, - }, - }, - Namespace: to.Ptr("default"), - }, - }, - Location: to.Ptr("eastus"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/patch.json -func ExampleComputeClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "testrg123", - "workspaces123", - "compute123", - armmachinelearning.ClusterUpdateParameters{ - Properties: &armmachinelearning.ClusterUpdateProperties{ - Properties: &armmachinelearning.ScaleSettingsInformation{ - ScaleSettings: &armmachinelearning.ScaleSettings{ - MaxNodeCount: to.Ptr[int32](4), - MinNodeCount: to.Ptr[int32](4), - NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), - }, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/delete.json -func ExampleComputeClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testrg123", - "workspaces123", - "compute123", - armmachinelearning.UnderlyingResourceActionDelete, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/listNodes.json -func ExampleComputeClient_NewListNodesPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListNodesPager("testrg123", - "workspaces123", - "compute123", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Nodes { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/listKeys.json -func ExampleComputeClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListKeys(ctx, - "testrg123", - "workspaces123", - "compute123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/start.json -func ExampleComputeClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStart(ctx, - "testrg123", - "workspaces123", - "compute123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/stop.json -func ExampleComputeClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginStop(ctx, - "testrg123", - "workspaces123", - "compute123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Compute/restart.json -func ExampleComputeClient_BeginRestart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewComputeClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRestart(ctx, - "testrg123", - "workspaces123", - "compute123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datacontainers_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datacontainers_client_test.go deleted file mode 100644 index fd9789bbfca1..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datacontainers_client_test.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataContainer/list.json -func ExampleDataContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg123", - "workspace123", - &armmachinelearning.DataContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataContainer/delete.json -func ExampleDataContainersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "workspace123", - "datacontainer123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataContainer/get.json -func ExampleDataContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "workspace123", - "datacontainer123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataContainer/createOrUpdate.json -func ExampleDataContainersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "testrg123", - "workspace123", - "datacontainer123", - armmachinelearning.DataContainer{ - Properties: &armmachinelearning.DataContainerProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "properties1": to.Ptr("value1"), - "properties2": to.Ptr("value2"), - }, - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - DataType: to.Ptr(armmachinelearning.DataType("UriFile")), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datastores_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datastores_client_test.go deleted file mode 100644 index fffba3053cd5..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datastores_client_test.go +++ /dev/null @@ -1,163 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Datastore/list.json -func ExampleDatastoresClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - &armmachinelearning.DatastoresClientListOptions{Skip: nil, - Count: to.Ptr[int32](1), - IsDefault: to.Ptr(false), - Names: []string{ - "string"}, - SearchText: to.Ptr("string"), - OrderBy: to.Ptr("string"), - OrderByAsc: to.Ptr(false), - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Datastore/delete.json -func ExampleDatastoresClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Datastore/get.json -func ExampleDatastoresClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json -func ExampleDatastoresClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - armmachinelearning.Datastore{ - Properties: &armmachinelearning.AzureDataLakeGen1Datastore{ - Description: to.Ptr("string"), - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - Credentials: &armmachinelearning.ServicePrincipalDatastoreCredentials{ - CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeServicePrincipal), - AuthorityURL: to.Ptr("string"), - ClientID: to.Ptr("00000000-1111-2222-3333-444444444444"), - ResourceURL: to.Ptr("string"), - Secrets: &armmachinelearning.ServicePrincipalDatastoreSecrets{ - SecretsType: to.Ptr(armmachinelearning.SecretsTypeServicePrincipal), - ClientSecret: to.Ptr("string"), - }, - TenantID: to.Ptr("00000000-1111-2222-3333-444444444444"), - }, - DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureDataLakeGen1), - StoreName: to.Ptr("string"), - }, - }, - &armmachinelearning.DatastoresClientCreateOrUpdateOptions{SkipValidation: to.Ptr(false)}) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Datastore/listSecrets.json -func ExampleDatastoresClient_ListSecrets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDatastoresClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListSecrets(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_dataversions_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_dataversions_client_test.go deleted file mode 100644 index 540a57bc6d5c..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_dataversions_client_test.go +++ /dev/null @@ -1,134 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataVersionBase/list.json -func ExampleDataVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - "string", - &armmachinelearning.DataVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - Tags: to.Ptr("string"), - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataVersionBase/delete.json -func ExampleDataVersionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataVersionBase/get.json -func ExampleDataVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/DataVersionBase/createOrUpdate.json -func ExampleDataVersionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewDataVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - armmachinelearning.DataVersionBase{ - Properties: &armmachinelearning.URIFileDataVersion{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - DataType: to.Ptr(armmachinelearning.DataTypeURIFile), - DataURI: to.Ptr("string"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentcontainers_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentcontainers_client_test.go deleted file mode 100644 index 397c04246f01..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentcontainers_client_test.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentContainer/list.json -func ExampleEnvironmentContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg123", - "testworkspace", - &armmachinelearning.EnvironmentContainersClientListOptions{Skip: nil, - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentContainer/delete.json -func ExampleEnvironmentContainersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "testworkspace", - "testContainer", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentContainer/get.json -func ExampleEnvironmentContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "testworkspace", - "testEnvironment", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentContainer/createOrUpdate.json -func ExampleEnvironmentContainersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "testrg123", - "testworkspace", - "testEnvironment", - armmachinelearning.EnvironmentContainer{ - Properties: &armmachinelearning.EnvironmentContainerProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "additionalProp1": to.Ptr("string"), - "additionalProp2": to.Ptr("string"), - "additionalProp3": to.Ptr("string"), - }, - Tags: map[string]*string{ - "additionalProp1": to.Ptr("string"), - "additionalProp2": to.Ptr("string"), - "additionalProp3": to.Ptr("string"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentversions_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentversions_client_test.go deleted file mode 100644 index 610a0b954cd4..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentversions_client_test.go +++ /dev/null @@ -1,151 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentVersion/list.json -func ExampleEnvironmentVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - "string", - &armmachinelearning.EnvironmentVersionsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentVersion/delete.json -func ExampleEnvironmentVersionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentVersion/get.json -func ExampleEnvironmentVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/EnvironmentVersion/createOrUpdate.json -func ExampleEnvironmentVersionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewEnvironmentVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - armmachinelearning.EnvironmentVersion{ - Properties: &armmachinelearning.EnvironmentVersionProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - Build: &armmachinelearning.BuildContext{ - ContextURI: to.Ptr("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/"), - DockerfilePath: to.Ptr("prod/Dockerfile"), - }, - CondaFile: to.Ptr("string"), - Image: to.Ptr("docker.io/tensorflow/serving:latest"), - InferenceConfig: &armmachinelearning.InferenceContainerProperties{ - LivenessRoute: &armmachinelearning.Route{ - Path: to.Ptr("string"), - Port: to.Ptr[int32](1), - }, - ReadinessRoute: &armmachinelearning.Route{ - Path: to.Ptr("string"), - Port: to.Ptr[int32](1), - }, - ScoringRoute: &armmachinelearning.Route{ - Path: to.Ptr("string"), - Port: to.Ptr[int32](1), - }, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_jobs_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_jobs_client_test.go deleted file mode 100644 index 741244b897f2..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_jobs_client_test.go +++ /dev/null @@ -1,211 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Job/CommandJob/list.json -func ExampleJobsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - &armmachinelearning.JobsClientListOptions{Skip: nil, - JobType: to.Ptr("string"), - Tag: to.Ptr("string"), - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Job/delete.json -func ExampleJobsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Job/CommandJob/get.json -func ExampleJobsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Job/CommandJob/createOrUpdate.json -func ExampleJobsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - armmachinelearning.JobBase{ - Properties: &armmachinelearning.CommandJob{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - ComputeID: to.Ptr("string"), - DisplayName: to.Ptr("string"), - ExperimentName: to.Ptr("string"), - Identity: &armmachinelearning.AmlToken{ - IdentityType: to.Ptr(armmachinelearning.IdentityConfigurationTypeAMLToken), - }, - JobType: to.Ptr(armmachinelearning.JobTypeCommand), - Services: map[string]*armmachinelearning.JobService{ - "string": { - Endpoint: to.Ptr("string"), - JobServiceType: to.Ptr("string"), - Port: to.Ptr[int32](1), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - CodeID: to.Ptr("string"), - Command: to.Ptr("string"), - Distribution: &armmachinelearning.TensorFlow{ - DistributionType: to.Ptr(armmachinelearning.DistributionTypeTensorFlow), - ParameterServerCount: to.Ptr[int32](1), - WorkerCount: to.Ptr[int32](1), - }, - EnvironmentID: to.Ptr("string"), - EnvironmentVariables: map[string]*string{ - "string": to.Ptr("string"), - }, - Inputs: map[string]armmachinelearning.JobInputClassification{ - "string": &armmachinelearning.LiteralJobInput{ - Description: to.Ptr("string"), - JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), - Value: to.Ptr("string"), - }, - }, - Limits: &armmachinelearning.CommandJobLimits{ - JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeCommand), - Timeout: to.Ptr("PT5M"), - }, - Outputs: map[string]armmachinelearning.JobOutputClassification{ - "string": &armmachinelearning.URIFileJobOutput{ - Mode: to.Ptr(armmachinelearning.OutputDeliveryModeReadWriteMount), - URI: to.Ptr("string"), - Description: to.Ptr("string"), - JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), - }, - }, - Resources: &armmachinelearning.ResourceConfiguration{ - InstanceCount: to.Ptr[int32](1), - InstanceType: to.Ptr("string"), - Properties: map[string]interface{}{ - "string": map[string]interface{}{ - "e6b6493e-7d5e-4db3-be1e-306ec641327e": nil, - }, - }, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Job/cancel.json -func ExampleJobsClient_BeginCancel() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewJobsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCancel(ctx, - "test-rg", - "my-aml-workspace", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelcontainers_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelcontainers_client_test.go deleted file mode 100644 index 2652c0c92be7..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelcontainers_client_test.go +++ /dev/null @@ -1,123 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelContainer/list.json -func ExampleModelContainersClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("testrg123", - "workspace123", - &armmachinelearning.ModelContainersClientListOptions{Skip: nil, - Count: nil, - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelContainer/delete.json -func ExampleModelContainersClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "testrg123", - "workspace123", - "testContainer", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelContainer/get.json -func ExampleModelContainersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "testrg123", - "workspace123", - "testContainer", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelContainer/createOrUpdate.json -func ExampleModelContainersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelContainersClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "testrg123", - "workspace123", - "testContainer", - armmachinelearning.ModelContainer{ - Properties: &armmachinelearning.ModelContainerProperties{ - Description: to.Ptr("Model container description"), - Tags: map[string]*string{ - "tag1": to.Ptr("value1"), - "tag2": to.Ptr("value2"), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelversions_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelversions_client_test.go deleted file mode 100644 index bd3f918bc9ef..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelversions_client_test.go +++ /dev/null @@ -1,146 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelVersion/list.json -func ExampleModelVersionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - "string", - &armmachinelearning.ModelVersionsClientListOptions{Skip: nil, - OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Version: to.Ptr("string"), - Description: to.Ptr("string"), - Offset: to.Ptr[int32](1), - Tags: to.Ptr("string"), - Properties: to.Ptr("string"), - Feed: nil, - ListViewType: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelVersion/delete.json -func ExampleModelVersionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelVersion/get.json -func ExampleModelVersionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ModelVersion/createOrUpdate.json -func ExampleModelVersionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewModelVersionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "string", - "string", - armmachinelearning.ModelVersion{ - Properties: &armmachinelearning.ModelVersionProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - IsAnonymous: to.Ptr(false), - Flavors: map[string]*armmachinelearning.FlavorData{ - "string": { - Data: map[string]*string{ - "string": to.Ptr("string"), - }, - }, - }, - ModelType: to.Ptr("CustomModel"), - ModelURI: to.Ptr("string"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlinedeployments_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlinedeployments_client_test.go deleted file mode 100644 index 92bd22b9966c..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlinedeployments_client_test.go +++ /dev/null @@ -1,256 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineDeployment/list.json -func ExampleOnlineDeploymentsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - "testEndpointName", - &armmachinelearning.OnlineDeploymentsClientListOptions{OrderBy: to.Ptr("string"), - Top: to.Ptr[int32](1), - Skip: nil, - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineDeployment/delete.json -func ExampleOnlineDeploymentsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "testrg123", - "workspace123", - "testEndpoint", - "testDeployment", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json -func ExampleOnlineDeploymentsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json -func ExampleOnlineDeploymentsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - armmachinelearning.PartialMinimalTrackedResourceWithSKU{ - Tags: map[string]*string{}, - SKU: &armmachinelearning.PartialSKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierFree), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json -func ExampleOnlineDeploymentsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - armmachinelearning.OnlineDeployment{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.KubernetesOnlineDeployment{ - Description: to.Ptr("string"), - CodeConfiguration: &armmachinelearning.CodeConfiguration{ - CodeID: to.Ptr("string"), - ScoringScript: to.Ptr("string"), - }, - EnvironmentID: to.Ptr("string"), - EnvironmentVariables: map[string]*string{ - "string": to.Ptr("string"), - }, - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - AppInsightsEnabled: to.Ptr(false), - EndpointComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeKubernetes), - InstanceType: to.Ptr("string"), - LivenessProbe: &armmachinelearning.ProbeSettings{ - FailureThreshold: to.Ptr[int32](1), - InitialDelay: to.Ptr("PT5M"), - Period: to.Ptr("PT5M"), - SuccessThreshold: to.Ptr[int32](1), - Timeout: to.Ptr("PT5M"), - }, - Model: to.Ptr("string"), - ModelMountPath: to.Ptr("string"), - RequestSettings: &armmachinelearning.OnlineRequestSettings{ - MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), - MaxQueueWait: to.Ptr("PT5M"), - RequestTimeout: to.Ptr("PT5M"), - }, - ScaleSettings: &armmachinelearning.DefaultScaleSettings{ - ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), - }, - ContainerResourceRequirements: &armmachinelearning.ContainerResourceRequirements{ - ContainerResourceLimits: &armmachinelearning.ContainerResourceSettings{ - CPU: to.Ptr("\"1\""), - Gpu: to.Ptr("\"1\""), - Memory: to.Ptr("\"2Gi\""), - }, - ContainerResourceRequests: &armmachinelearning.ContainerResourceSettings{ - CPU: to.Ptr("\"1\""), - Gpu: to.Ptr("\"1\""), - Memory: to.Ptr("\"2Gi\""), - }, - }, - }, - SKU: &armmachinelearning.SKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierFree), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineDeployment/getLogs.json -func ExampleOnlineDeploymentsClient_GetLogs() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineDeploymentsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetLogs(ctx, - "testrg123", - "workspace123", - "testEndpoint", - "testDeployment", - armmachinelearning.DeploymentLogsRequest{ - ContainerType: to.Ptr(armmachinelearning.ContainerTypeStorageInitializer), - Tail: to.Ptr[int32](0), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlineendpoints_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlineendpoints_client_test.go deleted file mode 100644 index 57ceaef4a9ba..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlineendpoints_client_test.go +++ /dev/null @@ -1,266 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/list.json -func ExampleOnlineEndpointsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("test-rg", - "my-aml-workspace", - &armmachinelearning.OnlineEndpointsClientListOptions{Name: to.Ptr("string"), - Count: to.Ptr[int32](1), - ComputeType: to.Ptr(armmachinelearning.EndpointComputeTypeManaged), - Skip: nil, - Tags: to.Ptr("string"), - Properties: to.Ptr("string"), - OrderBy: to.Ptr(armmachinelearning.OrderStringCreatedAtDesc), - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/delete.json -func ExampleOnlineEndpointsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/get.json -func ExampleOnlineEndpointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/update.json -func ExampleOnlineEndpointsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - armmachinelearning.PartialMinimalTrackedResourceWithIdentity{ - Tags: map[string]*string{}, - Identity: &armmachinelearning.PartialManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]interface{}{ - "string": map[string]interface{}{}, - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/createOrUpdate.json -func ExampleOnlineEndpointsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - armmachinelearning.OnlineEndpoint{ - Location: to.Ptr("string"), - Tags: map[string]*string{}, - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "string": {}, - }, - }, - Kind: to.Ptr("string"), - Properties: &armmachinelearning.OnlineEndpointProperties{ - Description: to.Ptr("string"), - AuthMode: to.Ptr(armmachinelearning.EndpointAuthModeAMLToken), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Compute: to.Ptr("string"), - Traffic: map[string]*int32{ - "string": to.Ptr[int32](1), - }, - }, - SKU: &armmachinelearning.SKU{ - Name: to.Ptr("string"), - Capacity: to.Ptr[int32](1), - Family: to.Ptr("string"), - Size: to.Ptr("string"), - Tier: to.Ptr(armmachinelearning.SKUTierFree), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/listKeys.json -func ExampleOnlineEndpointsClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListKeys(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/regenerateKeys.json -func ExampleOnlineEndpointsClient_BeginRegenerateKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginRegenerateKeys(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - armmachinelearning.RegenerateEndpointKeysRequest{ - KeyType: to.Ptr(armmachinelearning.KeyTypePrimary), - KeyValue: to.Ptr("string"), - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/OnlineEndpoint/getToken.json -func ExampleOnlineEndpointsClient_GetToken() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOnlineEndpointsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.GetToken(ctx, - "test-rg", - "my-aml-workspace", - "testEndpointName", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_operations_client_test.go deleted file mode 100644 index 1574663a604f..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_operations_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/operationsList.json -func ExampleOperationsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewOperationsClient(cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager(nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privateendpointconnections_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privateendpointconnections_client_test.go deleted file mode 100644 index a68faed65c38..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privateendpointconnections_client_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/PrivateEndpointConnection/list.json -func ExamplePrivateEndpointConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("rg-1234", - "testworkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/PrivateEndpointConnection/get.json -func ExamplePrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "rg-1234", - "testworkspace", - "{privateEndpointConnectionName}", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/PrivateEndpointConnection/createOrUpdate.json -func ExamplePrivateEndpointConnectionsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.CreateOrUpdate(ctx, - "rg-1234", - "testworkspace", - "{privateEndpointConnectionName}", - armmachinelearning.PrivateEndpointConnection{ - Properties: &armmachinelearning.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armmachinelearning.PrivateLinkServiceConnectionState{ - Description: to.Ptr("Auto-Approved"), - Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), - }, - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/PrivateEndpointConnection/delete.json -func ExamplePrivateEndpointConnectionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewPrivateEndpointConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "rg-1234", - "testworkspace", - "{privateEndpointConnectionName}", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privatelinkresources_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privatelinkresources_client_test.go deleted file mode 100644 index fe8b64bfb363..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privatelinkresources_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/PrivateLinkResource/list.json -func ExamplePrivateLinkResourcesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewPrivateLinkResourcesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "rg-1234", - "testworkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_quotas_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_quotas_client_test.go deleted file mode 100644 index 07683a5c1c6a..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_quotas_client_test.go +++ /dev/null @@ -1,79 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Quota/update.json -func ExampleQuotasClient_Update() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewQuotasClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Update(ctx, - "eastus", - armmachinelearning.QuotaUpdateParameters{ - Value: []*armmachinelearning.QuotaBaseProperties{ - { - Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), - Limit: to.Ptr[int64](100), - Unit: to.Ptr(armmachinelearning.QuotaUnitCount), - }, - { - Type: to.Ptr("Microsoft.MachineLearningServices/workspaces/quotas"), - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs"), - Limit: to.Ptr[int64](200), - Unit: to.Ptr(armmachinelearning.QuotaUnitCount), - }}, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Quota/list.json -func ExampleQuotasClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewQuotasClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("eastus", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_usages_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_usages_client_test.go deleted file mode 100644 index 02e7ae352d10..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_usages_client_test.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Usage/list.json -func ExampleUsagesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewUsagesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("eastus", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_virtualmachinesizes_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_virtualmachinesizes_client_test.go deleted file mode 100644 index a50cd2c7809c..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_virtualmachinesizes_client_test.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/VirtualMachineSize/list.json -func ExampleVirtualMachineSizesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewVirtualMachineSizesClient("34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.List(ctx, - "eastus", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaceconnections_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaceconnections_client_test.go deleted file mode 100644 index ed2eb9f80d0f..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaceconnections_client_test.go +++ /dev/null @@ -1,120 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/WorkspaceConnection/create.json -func ExampleWorkspaceConnectionsClient_Create() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Create(ctx, - "resourceGroup-1", - "workspace-1", - "connection-1", - armmachinelearning.WorkspaceConnectionPropertiesV2BasicResource{ - Properties: &armmachinelearning.NoneAuthTypeWorkspaceConnectionProperties{ - AuthType: to.Ptr(armmachinelearning.ConnectionAuthTypeNone), - Category: to.Ptr(armmachinelearning.ConnectionCategoryContainerRegistry), - Target: to.Ptr("www.facebook.com"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/WorkspaceConnection/get.json -func ExampleWorkspaceConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "resourceGroup-1", - "workspace-1", - "connection-1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/WorkspaceConnection/delete.json -func ExampleWorkspaceConnectionsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = client.Delete(ctx, - "resourceGroup-1", - "workspace-1", - "connection-1", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/WorkspaceConnection/list.json -func ExampleWorkspaceConnectionsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceConnectionsClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("resourceGroup-1", - "workspace-1", - &armmachinelearning.WorkspaceConnectionsClientListOptions{Target: to.Ptr("www.facebook.com"), - Category: to.Ptr("ContainerRegistry"), - }) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspacefeatures_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspacefeatures_client_test.go deleted file mode 100644 index 5be8c96b9d4f..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspacefeatures_client_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/WorkspaceFeature/list.json -func ExampleWorkspaceFeaturesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspaceFeaturesClient("00000000-0000-0000-0000-000000000000", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListPager("myResourceGroup", - "testworkspace", - nil) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaces_client_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaces_client_test.go deleted file mode 100644 index 5f307aa2fe58..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaces_client_test.go +++ /dev/null @@ -1,410 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/armmachinelearning/v2" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/get.json -func ExampleWorkspacesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.Get(ctx, - "workspace-1234", - "testworkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/create.json -func ExampleWorkspacesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginCreateOrUpdate(ctx, - "workspace-1234", - "testworkspace", - armmachinelearning.Workspace{ - Identity: &armmachinelearning.ManagedServiceIdentity{ - Type: to.Ptr(armmachinelearning.ManagedServiceIdentityTypeSystemAssignedUserAssigned), - UserAssignedIdentities: map[string]*armmachinelearning.UserAssignedIdentity{ - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": {}, - }, - }, - Location: to.Ptr("eastus2euap"), - Properties: &armmachinelearning.WorkspaceProperties{ - Description: to.Ptr("test description"), - ApplicationInsights: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights"), - ContainerRegistry: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry"), - Encryption: &armmachinelearning.EncryptionProperty{ - Identity: &armmachinelearning.IdentityForCmk{ - UserAssignedIdentity: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai"), - }, - KeyVaultProperties: &armmachinelearning.EncryptionKeyVaultProperties{ - IdentityClientID: to.Ptr(""), - KeyIdentifier: to.Ptr("https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb"), - KeyVaultArmID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), - }, - Status: to.Ptr(armmachinelearning.EncryptionStatusEnabled), - }, - FriendlyName: to.Ptr("HelloName"), - HbiWorkspace: to.Ptr(false), - KeyVault: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), - SharedPrivateLinkResources: []*armmachinelearning.SharedPrivateLinkResource{ - { - Name: to.Ptr("testdbresource"), - Properties: &armmachinelearning.SharedPrivateLinkResourceProperty{ - GroupID: to.Ptr("Sql"), - PrivateLinkResourceID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql"), - RequestMessage: to.Ptr("Please approve"), - Status: to.Ptr(armmachinelearning.PrivateEndpointServiceConnectionStatusApproved), - }, - }}, - StorageAccount: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount"), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/delete.json -func ExampleWorkspacesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDelete(ctx, - "workspace-1234", - "testworkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/update.json -func ExampleWorkspacesClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginUpdate(ctx, - "workspace-1234", - "testworkspace", - armmachinelearning.WorkspaceUpdateParameters{ - Properties: &armmachinelearning.WorkspacePropertiesUpdateParameters{ - Description: to.Ptr("new description"), - FriendlyName: to.Ptr("New friendly name"), - PublicNetworkAccess: to.Ptr(armmachinelearning.PublicNetworkAccessDisabled), - }, - }, - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/listByResourceGroup.json -func ExampleWorkspacesClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListByResourceGroupPager("workspace-1234", - &armmachinelearning.WorkspacesClientListByResourceGroupOptions{Skip: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/diagnose.json -func ExampleWorkspacesClient_BeginDiagnose() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginDiagnose(ctx, - "workspace-1234", - "testworkspace", - &armmachinelearning.WorkspacesClientBeginDiagnoseOptions{Parameters: &armmachinelearning.DiagnoseWorkspaceParameters{ - Value: &armmachinelearning.DiagnoseRequestProperties{ - ApplicationInsights: map[string]interface{}{}, - ContainerRegistry: map[string]interface{}{}, - DNSResolution: map[string]interface{}{}, - KeyVault: map[string]interface{}{}, - Nsg: map[string]interface{}{}, - Others: map[string]interface{}{}, - ResourceLock: map[string]interface{}{}, - StorageAccount: map[string]interface{}{}, - Udr: map[string]interface{}{}, - }, - }, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/listKeys.json -func ExampleWorkspacesClient_ListKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListKeys(ctx, - "testrg123", - "workspaces123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/resyncKeys.json -func ExampleWorkspacesClient_BeginResyncKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginResyncKeys(ctx, - "testrg123", - "workspaces123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/listBySubscription.json -func ExampleWorkspacesClient_NewListBySubscriptionPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := client.NewListBySubscriptionPager(&armmachinelearning.WorkspacesClientListBySubscriptionOptions{Skip: nil}) - for pager.More() { - nextResult, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range nextResult.Value { - // TODO: use page item - _ = v - } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/listNotebookAccessToken.json -func ExampleWorkspacesClient_ListNotebookAccessToken() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListNotebookAccessToken(ctx, - "workspace-1234", - "testworkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Notebook/prepare.json -func ExampleWorkspacesClient_BeginPrepareNotebook() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := client.BeginPrepareNotebook(ctx, - "testrg123", - "workspaces123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Workspace/listStorageAccountKeys.json -func ExampleWorkspacesClient_ListStorageAccountKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListStorageAccountKeys(ctx, - "testrg123", - "workspaces123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/Notebook/listKeys.json -func ExampleWorkspacesClient_ListNotebookKeys() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListNotebookKeys(ctx, - "testrg123", - "workspaces123", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-05-01/examples/ExternalFQDN/get.json -func ExampleWorkspacesClient_ListOutboundNetworkDependenciesEndpoints() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewWorkspacesClient("00000000-1111-2222-3333-444444444444", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := client.ListOutboundNetworkDependenciesEndpoints(ctx, - "workspace-1234", - "testworkspace", - nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // TODO: use response item - _ = res -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_constants.go b/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_constants.go deleted file mode 100644 index 82057e311ee0..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_constants.go +++ /dev/null @@ -1,1576 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning - -const ( - moduleName = "armmachinelearning" - moduleVersion = "v2.0.0" -) - -// AllocationState - Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. -// There are no changes to the number of compute nodes in the compute in progress. A compute -// enters this state when it is created and when no operations are being performed on the compute to change the number of -// compute nodes. resizing - Indicates that the compute is resizing; that is, -// compute nodes are being added to or removed from the compute. -type AllocationState string - -const ( - AllocationStateResizing AllocationState = "Resizing" - AllocationStateSteady AllocationState = "Steady" -) - -// PossibleAllocationStateValues returns the possible values for the AllocationState const type. -func PossibleAllocationStateValues() []AllocationState { - return []AllocationState{ - AllocationStateResizing, - AllocationStateSteady, - } -} - -// ApplicationSharingPolicy - 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. -type ApplicationSharingPolicy string - -const ( - ApplicationSharingPolicyPersonal ApplicationSharingPolicy = "Personal" - ApplicationSharingPolicyShared ApplicationSharingPolicy = "Shared" -) - -// PossibleApplicationSharingPolicyValues returns the possible values for the ApplicationSharingPolicy const type. -func PossibleApplicationSharingPolicyValues() []ApplicationSharingPolicy { - return []ApplicationSharingPolicy{ - ApplicationSharingPolicyPersonal, - ApplicationSharingPolicyShared, - } -} - -// Autosave - Auto save settings. -type Autosave string - -const ( - AutosaveLocal Autosave = "Local" - AutosaveNone Autosave = "None" - AutosaveRemote Autosave = "Remote" -) - -// PossibleAutosaveValues returns the possible values for the Autosave const type. -func PossibleAutosaveValues() []Autosave { - return []Autosave{ - AutosaveLocal, - AutosaveNone, - AutosaveRemote, - } -} - -// BatchLoggingLevel - Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and -// Debug. The default value is Info. -type BatchLoggingLevel string - -const ( - BatchLoggingLevelDebug BatchLoggingLevel = "Debug" - BatchLoggingLevelInfo BatchLoggingLevel = "Info" - BatchLoggingLevelWarning BatchLoggingLevel = "Warning" -) - -// PossibleBatchLoggingLevelValues returns the possible values for the BatchLoggingLevel const type. -func PossibleBatchLoggingLevelValues() []BatchLoggingLevel { - return []BatchLoggingLevel{ - BatchLoggingLevelDebug, - BatchLoggingLevelInfo, - BatchLoggingLevelWarning, - } -} - -// BatchOutputAction - Enum to determine how batch inferencing will handle output -type BatchOutputAction string - -const ( - BatchOutputActionAppendRow BatchOutputAction = "AppendRow" - BatchOutputActionSummaryOnly BatchOutputAction = "SummaryOnly" -) - -// PossibleBatchOutputActionValues returns the possible values for the BatchOutputAction const type. -func PossibleBatchOutputActionValues() []BatchOutputAction { - return []BatchOutputAction{ - BatchOutputActionAppendRow, - BatchOutputActionSummaryOnly, - } -} - -// BillingCurrency - Three lettered code specifying the currency of the VM price. Example: USD -type BillingCurrency string - -const ( - BillingCurrencyUSD BillingCurrency = "USD" -) - -// PossibleBillingCurrencyValues returns the possible values for the BillingCurrency const type. -func PossibleBillingCurrencyValues() []BillingCurrency { - return []BillingCurrency{ - BillingCurrencyUSD, - } -} - -// Caching - Caching type of Data Disk. -type Caching string - -const ( - CachingNone Caching = "None" - CachingReadOnly Caching = "ReadOnly" - CachingReadWrite Caching = "ReadWrite" -) - -// PossibleCachingValues returns the possible values for the Caching const type. -func PossibleCachingValues() []Caching { - return []Caching{ - CachingNone, - CachingReadOnly, - CachingReadWrite, - } -} - -// ClusterPurpose - Intended usage of the cluster -type ClusterPurpose string - -const ( - ClusterPurposeDenseProd ClusterPurpose = "DenseProd" - ClusterPurposeDevTest ClusterPurpose = "DevTest" - ClusterPurposeFastProd ClusterPurpose = "FastProd" -) - -// PossibleClusterPurposeValues returns the possible values for the ClusterPurpose const type. -func PossibleClusterPurposeValues() []ClusterPurpose { - return []ClusterPurpose{ - ClusterPurposeDenseProd, - ClusterPurposeDevTest, - ClusterPurposeFastProd, - } -} - -// ComputeInstanceAuthorizationType - The Compute Instance Authorization type. Available values are personal (default). -type ComputeInstanceAuthorizationType string - -const ( - ComputeInstanceAuthorizationTypePersonal ComputeInstanceAuthorizationType = "personal" -) - -// PossibleComputeInstanceAuthorizationTypeValues returns the possible values for the ComputeInstanceAuthorizationType const type. -func PossibleComputeInstanceAuthorizationTypeValues() []ComputeInstanceAuthorizationType { - return []ComputeInstanceAuthorizationType{ - ComputeInstanceAuthorizationTypePersonal, - } -} - -// ComputeInstanceState - Current state of an ComputeInstance. -type ComputeInstanceState string - -const ( - ComputeInstanceStateCreateFailed ComputeInstanceState = "CreateFailed" - ComputeInstanceStateCreating ComputeInstanceState = "Creating" - ComputeInstanceStateDeleting ComputeInstanceState = "Deleting" - ComputeInstanceStateJobRunning ComputeInstanceState = "JobRunning" - ComputeInstanceStateRestarting ComputeInstanceState = "Restarting" - ComputeInstanceStateRunning ComputeInstanceState = "Running" - ComputeInstanceStateSettingUp ComputeInstanceState = "SettingUp" - ComputeInstanceStateSetupFailed ComputeInstanceState = "SetupFailed" - ComputeInstanceStateStarting ComputeInstanceState = "Starting" - ComputeInstanceStateStopped ComputeInstanceState = "Stopped" - ComputeInstanceStateStopping ComputeInstanceState = "Stopping" - ComputeInstanceStateUnknown ComputeInstanceState = "Unknown" - ComputeInstanceStateUnusable ComputeInstanceState = "Unusable" - ComputeInstanceStateUserSettingUp ComputeInstanceState = "UserSettingUp" - ComputeInstanceStateUserSetupFailed ComputeInstanceState = "UserSetupFailed" -) - -// PossibleComputeInstanceStateValues returns the possible values for the ComputeInstanceState const type. -func PossibleComputeInstanceStateValues() []ComputeInstanceState { - return []ComputeInstanceState{ - ComputeInstanceStateCreateFailed, - ComputeInstanceStateCreating, - ComputeInstanceStateDeleting, - ComputeInstanceStateJobRunning, - ComputeInstanceStateRestarting, - ComputeInstanceStateRunning, - ComputeInstanceStateSettingUp, - ComputeInstanceStateSetupFailed, - ComputeInstanceStateStarting, - ComputeInstanceStateStopped, - ComputeInstanceStateStopping, - ComputeInstanceStateUnknown, - ComputeInstanceStateUnusable, - ComputeInstanceStateUserSettingUp, - ComputeInstanceStateUserSetupFailed, - } -} - -// ComputePowerAction - The compute power action. -type ComputePowerAction string - -const ( - ComputePowerActionStart ComputePowerAction = "Start" - ComputePowerActionStop ComputePowerAction = "Stop" -) - -// PossibleComputePowerActionValues returns the possible values for the ComputePowerAction const type. -func PossibleComputePowerActionValues() []ComputePowerAction { - return []ComputePowerAction{ - ComputePowerActionStart, - ComputePowerActionStop, - } -} - -// ComputeType - The type of compute -type ComputeType string - -const ( - ComputeTypeAKS ComputeType = "AKS" - ComputeTypeAmlCompute ComputeType = "AmlCompute" - ComputeTypeComputeInstance ComputeType = "ComputeInstance" - ComputeTypeDataFactory ComputeType = "DataFactory" - ComputeTypeDataLakeAnalytics ComputeType = "DataLakeAnalytics" - ComputeTypeDatabricks ComputeType = "Databricks" - ComputeTypeHDInsight ComputeType = "HDInsight" - ComputeTypeKubernetes ComputeType = "Kubernetes" - ComputeTypeSynapseSpark ComputeType = "SynapseSpark" - ComputeTypeVirtualMachine ComputeType = "VirtualMachine" -) - -// PossibleComputeTypeValues returns the possible values for the ComputeType const type. -func PossibleComputeTypeValues() []ComputeType { - return []ComputeType{ - ComputeTypeAKS, - ComputeTypeAmlCompute, - ComputeTypeComputeInstance, - ComputeTypeDataFactory, - ComputeTypeDataLakeAnalytics, - ComputeTypeDatabricks, - ComputeTypeHDInsight, - ComputeTypeKubernetes, - ComputeTypeSynapseSpark, - ComputeTypeVirtualMachine, - } -} - -// ConnectionAuthType - Authentication type of the connection target -type ConnectionAuthType string - -const ( - ConnectionAuthTypeManagedIdentity ConnectionAuthType = "ManagedIdentity" - ConnectionAuthTypeNone ConnectionAuthType = "None" - ConnectionAuthTypePAT ConnectionAuthType = "PAT" - ConnectionAuthTypeSAS ConnectionAuthType = "SAS" - ConnectionAuthTypeUsernamePassword ConnectionAuthType = "UsernamePassword" -) - -// PossibleConnectionAuthTypeValues returns the possible values for the ConnectionAuthType const type. -func PossibleConnectionAuthTypeValues() []ConnectionAuthType { - return []ConnectionAuthType{ - ConnectionAuthTypeManagedIdentity, - ConnectionAuthTypeNone, - ConnectionAuthTypePAT, - ConnectionAuthTypeSAS, - ConnectionAuthTypeUsernamePassword, - } -} - -// ConnectionCategory - Category of the connection -type ConnectionCategory string - -const ( - ConnectionCategoryContainerRegistry ConnectionCategory = "ContainerRegistry" - ConnectionCategoryGit ConnectionCategory = "Git" - ConnectionCategoryPythonFeed ConnectionCategory = "PythonFeed" -) - -// PossibleConnectionCategoryValues returns the possible values for the ConnectionCategory const type. -func PossibleConnectionCategoryValues() []ConnectionCategory { - return []ConnectionCategory{ - ConnectionCategoryContainerRegistry, - ConnectionCategoryGit, - ConnectionCategoryPythonFeed, - } -} - -type ContainerType string - -const ( - ContainerTypeInferenceServer ContainerType = "InferenceServer" - ContainerTypeStorageInitializer ContainerType = "StorageInitializer" -) - -// PossibleContainerTypeValues returns the possible values for the ContainerType const type. -func PossibleContainerTypeValues() []ContainerType { - return []ContainerType{ - ContainerTypeInferenceServer, - ContainerTypeStorageInitializer, - } -} - -// CreatedByType - The type of identity that created the resource. -type CreatedByType string - -const ( - CreatedByTypeApplication CreatedByType = "Application" - CreatedByTypeKey CreatedByType = "Key" - CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" - CreatedByTypeUser CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{ - CreatedByTypeApplication, - CreatedByTypeKey, - CreatedByTypeManagedIdentity, - CreatedByTypeUser, - } -} - -// CredentialsType - Enum to determine the datastore credentials type. -type CredentialsType string - -const ( - CredentialsTypeAccountKey CredentialsType = "AccountKey" - CredentialsTypeCertificate CredentialsType = "Certificate" - CredentialsTypeNone CredentialsType = "None" - CredentialsTypeSas CredentialsType = "Sas" - CredentialsTypeServicePrincipal CredentialsType = "ServicePrincipal" -) - -// PossibleCredentialsTypeValues returns the possible values for the CredentialsType const type. -func PossibleCredentialsTypeValues() []CredentialsType { - return []CredentialsType{ - CredentialsTypeAccountKey, - CredentialsTypeCertificate, - CredentialsTypeNone, - CredentialsTypeSas, - CredentialsTypeServicePrincipal, - } -} - -// DataType - Enum to determine the type of data. -type DataType string - -const ( - DataTypeMltable DataType = "mltable" - DataTypeURIFile DataType = "uri_file" - DataTypeURIFolder DataType = "uri_folder" -) - -// PossibleDataTypeValues returns the possible values for the DataType const type. -func PossibleDataTypeValues() []DataType { - return []DataType{ - DataTypeMltable, - DataTypeURIFile, - DataTypeURIFolder, - } -} - -// DatastoreType - Enum to determine the datastore contents type. -type DatastoreType string - -const ( - DatastoreTypeAzureBlob DatastoreType = "AzureBlob" - DatastoreTypeAzureDataLakeGen1 DatastoreType = "AzureDataLakeGen1" - DatastoreTypeAzureDataLakeGen2 DatastoreType = "AzureDataLakeGen2" - DatastoreTypeAzureFile DatastoreType = "AzureFile" -) - -// PossibleDatastoreTypeValues returns the possible values for the DatastoreType const type. -func PossibleDatastoreTypeValues() []DatastoreType { - return []DatastoreType{ - DatastoreTypeAzureBlob, - DatastoreTypeAzureDataLakeGen1, - DatastoreTypeAzureDataLakeGen2, - DatastoreTypeAzureFile, - } -} - -// DeploymentProvisioningState - Possible values for DeploymentProvisioningState. -type DeploymentProvisioningState string - -const ( - DeploymentProvisioningStateCanceled DeploymentProvisioningState = "Canceled" - DeploymentProvisioningStateCreating DeploymentProvisioningState = "Creating" - DeploymentProvisioningStateDeleting DeploymentProvisioningState = "Deleting" - DeploymentProvisioningStateFailed DeploymentProvisioningState = "Failed" - DeploymentProvisioningStateScaling DeploymentProvisioningState = "Scaling" - DeploymentProvisioningStateSucceeded DeploymentProvisioningState = "Succeeded" - DeploymentProvisioningStateUpdating DeploymentProvisioningState = "Updating" -) - -// PossibleDeploymentProvisioningStateValues returns the possible values for the DeploymentProvisioningState const type. -func PossibleDeploymentProvisioningStateValues() []DeploymentProvisioningState { - return []DeploymentProvisioningState{ - DeploymentProvisioningStateCanceled, - DeploymentProvisioningStateCreating, - DeploymentProvisioningStateDeleting, - DeploymentProvisioningStateFailed, - DeploymentProvisioningStateScaling, - DeploymentProvisioningStateSucceeded, - DeploymentProvisioningStateUpdating, - } -} - -// DiagnoseResultLevel - Level of workspace setup error -type DiagnoseResultLevel string - -const ( - DiagnoseResultLevelError DiagnoseResultLevel = "Error" - DiagnoseResultLevelInformation DiagnoseResultLevel = "Information" - DiagnoseResultLevelWarning DiagnoseResultLevel = "Warning" -) - -// PossibleDiagnoseResultLevelValues returns the possible values for the DiagnoseResultLevel const type. -func PossibleDiagnoseResultLevelValues() []DiagnoseResultLevel { - return []DiagnoseResultLevel{ - DiagnoseResultLevelError, - DiagnoseResultLevelInformation, - DiagnoseResultLevelWarning, - } -} - -// DistributionType - Enum to determine the job distribution type. -type DistributionType string - -const ( - DistributionTypeMpi DistributionType = "Mpi" - DistributionTypePyTorch DistributionType = "PyTorch" - DistributionTypeTensorFlow DistributionType = "TensorFlow" -) - -// PossibleDistributionTypeValues returns the possible values for the DistributionType const type. -func PossibleDistributionTypeValues() []DistributionType { - return []DistributionType{ - DistributionTypeMpi, - DistributionTypePyTorch, - DistributionTypeTensorFlow, - } -} - -type EarlyTerminationPolicyType string - -const ( - EarlyTerminationPolicyTypeBandit EarlyTerminationPolicyType = "Bandit" - EarlyTerminationPolicyTypeMedianStopping EarlyTerminationPolicyType = "MedianStopping" - EarlyTerminationPolicyTypeTruncationSelection EarlyTerminationPolicyType = "TruncationSelection" -) - -// PossibleEarlyTerminationPolicyTypeValues returns the possible values for the EarlyTerminationPolicyType const type. -func PossibleEarlyTerminationPolicyTypeValues() []EarlyTerminationPolicyType { - return []EarlyTerminationPolicyType{ - EarlyTerminationPolicyTypeBandit, - EarlyTerminationPolicyTypeMedianStopping, - EarlyTerminationPolicyTypeTruncationSelection, - } -} - -// EncryptionStatus - Indicates whether or not the encryption is enabled for the workspace. -type EncryptionStatus string - -const ( - EncryptionStatusDisabled EncryptionStatus = "Disabled" - EncryptionStatusEnabled EncryptionStatus = "Enabled" -) - -// PossibleEncryptionStatusValues returns the possible values for the EncryptionStatus const type. -func PossibleEncryptionStatusValues() []EncryptionStatus { - return []EncryptionStatus{ - EncryptionStatusDisabled, - EncryptionStatusEnabled, - } -} - -// EndpointAuthMode - Enum to determine endpoint authentication mode. -type EndpointAuthMode string - -const ( - EndpointAuthModeAADToken EndpointAuthMode = "AADToken" - EndpointAuthModeAMLToken EndpointAuthMode = "AMLToken" - EndpointAuthModeKey EndpointAuthMode = "Key" -) - -// PossibleEndpointAuthModeValues returns the possible values for the EndpointAuthMode const type. -func PossibleEndpointAuthModeValues() []EndpointAuthMode { - return []EndpointAuthMode{ - EndpointAuthModeAADToken, - EndpointAuthModeAMLToken, - EndpointAuthModeKey, - } -} - -// EndpointComputeType - Enum to determine endpoint compute type. -type EndpointComputeType string - -const ( - EndpointComputeTypeAzureMLCompute EndpointComputeType = "AzureMLCompute" - EndpointComputeTypeKubernetes EndpointComputeType = "Kubernetes" - EndpointComputeTypeManaged EndpointComputeType = "Managed" -) - -// PossibleEndpointComputeTypeValues returns the possible values for the EndpointComputeType const type. -func PossibleEndpointComputeTypeValues() []EndpointComputeType { - return []EndpointComputeType{ - EndpointComputeTypeAzureMLCompute, - EndpointComputeTypeKubernetes, - EndpointComputeTypeManaged, - } -} - -// EndpointProvisioningState - State of endpoint provisioning. -type EndpointProvisioningState string - -const ( - EndpointProvisioningStateCanceled EndpointProvisioningState = "Canceled" - EndpointProvisioningStateCreating EndpointProvisioningState = "Creating" - EndpointProvisioningStateDeleting EndpointProvisioningState = "Deleting" - EndpointProvisioningStateFailed EndpointProvisioningState = "Failed" - EndpointProvisioningStateSucceeded EndpointProvisioningState = "Succeeded" - EndpointProvisioningStateUpdating EndpointProvisioningState = "Updating" -) - -// PossibleEndpointProvisioningStateValues returns the possible values for the EndpointProvisioningState const type. -func PossibleEndpointProvisioningStateValues() []EndpointProvisioningState { - return []EndpointProvisioningState{ - EndpointProvisioningStateCanceled, - EndpointProvisioningStateCreating, - EndpointProvisioningStateDeleting, - EndpointProvisioningStateFailed, - EndpointProvisioningStateSucceeded, - EndpointProvisioningStateUpdating, - } -} - -// EnvironmentType - Environment type is either user created or curated by Azure ML service -type EnvironmentType string - -const ( - EnvironmentTypeCurated EnvironmentType = "Curated" - EnvironmentTypeUserCreated EnvironmentType = "UserCreated" -) - -// PossibleEnvironmentTypeValues returns the possible values for the EnvironmentType const type. -func PossibleEnvironmentTypeValues() []EnvironmentType { - return []EnvironmentType{ - EnvironmentTypeCurated, - EnvironmentTypeUserCreated, - } -} - -// Goal - Defines supported metric goals for hyperparameter tuning -type Goal string - -const ( - GoalMaximize Goal = "Maximize" - GoalMinimize Goal = "Minimize" -) - -// PossibleGoalValues returns the possible values for the Goal const type. -func PossibleGoalValues() []Goal { - return []Goal{ - GoalMaximize, - GoalMinimize, - } -} - -// IdentityConfigurationType - Enum to determine identity framework. -type IdentityConfigurationType string - -const ( - IdentityConfigurationTypeAMLToken IdentityConfigurationType = "AMLToken" - IdentityConfigurationTypeManaged IdentityConfigurationType = "Managed" - IdentityConfigurationTypeUserIdentity IdentityConfigurationType = "UserIdentity" -) - -// PossibleIdentityConfigurationTypeValues returns the possible values for the IdentityConfigurationType const type. -func PossibleIdentityConfigurationTypeValues() []IdentityConfigurationType { - return []IdentityConfigurationType{ - IdentityConfigurationTypeAMLToken, - IdentityConfigurationTypeManaged, - IdentityConfigurationTypeUserIdentity, - } -} - -// InputDeliveryMode - Enum to determine the input data delivery mode. -type InputDeliveryMode string - -const ( - InputDeliveryModeDirect InputDeliveryMode = "Direct" - InputDeliveryModeDownload InputDeliveryMode = "Download" - InputDeliveryModeEvalDownload InputDeliveryMode = "EvalDownload" - InputDeliveryModeEvalMount InputDeliveryMode = "EvalMount" - InputDeliveryModeReadOnlyMount InputDeliveryMode = "ReadOnlyMount" - InputDeliveryModeReadWriteMount InputDeliveryMode = "ReadWriteMount" -) - -// PossibleInputDeliveryModeValues returns the possible values for the InputDeliveryMode const type. -func PossibleInputDeliveryModeValues() []InputDeliveryMode { - return []InputDeliveryMode{ - InputDeliveryModeDirect, - InputDeliveryModeDownload, - InputDeliveryModeEvalDownload, - InputDeliveryModeEvalMount, - InputDeliveryModeReadOnlyMount, - InputDeliveryModeReadWriteMount, - } -} - -// JobInputType - Enum to determine the Job Input Type. -type JobInputType string - -const ( - JobInputTypeCustomModel JobInputType = "custom_model" - JobInputTypeLiteral JobInputType = "literal" - JobInputTypeMlflowModel JobInputType = "mlflow_model" - JobInputTypeMltable JobInputType = "mltable" - JobInputTypeTritonModel JobInputType = "triton_model" - JobInputTypeURIFile JobInputType = "uri_file" - JobInputTypeURIFolder JobInputType = "uri_folder" -) - -// PossibleJobInputTypeValues returns the possible values for the JobInputType const type. -func PossibleJobInputTypeValues() []JobInputType { - return []JobInputType{ - JobInputTypeCustomModel, - JobInputTypeLiteral, - JobInputTypeMlflowModel, - JobInputTypeMltable, - JobInputTypeTritonModel, - JobInputTypeURIFile, - JobInputTypeURIFolder, - } -} - -type JobLimitsType string - -const ( - JobLimitsTypeCommand JobLimitsType = "Command" - JobLimitsTypeSweep JobLimitsType = "Sweep" -) - -// PossibleJobLimitsTypeValues returns the possible values for the JobLimitsType const type. -func PossibleJobLimitsTypeValues() []JobLimitsType { - return []JobLimitsType{ - JobLimitsTypeCommand, - JobLimitsTypeSweep, - } -} - -// JobOutputType - Enum to determine the Job Output Type. -type JobOutputType string - -const ( - JobOutputTypeCustomModel JobOutputType = "custom_model" - JobOutputTypeMlflowModel JobOutputType = "mlflow_model" - JobOutputTypeMltable JobOutputType = "mltable" - JobOutputTypeTritonModel JobOutputType = "triton_model" - JobOutputTypeURIFile JobOutputType = "uri_file" - JobOutputTypeURIFolder JobOutputType = "uri_folder" -) - -// PossibleJobOutputTypeValues returns the possible values for the JobOutputType const type. -func PossibleJobOutputTypeValues() []JobOutputType { - return []JobOutputType{ - JobOutputTypeCustomModel, - JobOutputTypeMlflowModel, - JobOutputTypeMltable, - JobOutputTypeTritonModel, - JobOutputTypeURIFile, - JobOutputTypeURIFolder, - } -} - -// JobStatus - The status of a job. -type JobStatus string - -const ( - // JobStatusCancelRequested - Cancellation has been requested for the job. - JobStatusCancelRequested JobStatus = "CancelRequested" - // JobStatusCanceled - Following cancellation request, the job is now successfully canceled. - JobStatusCanceled JobStatus = "Canceled" - // JobStatusCompleted - Job completed successfully. This reflects that both the job itself and output collection states completed - // successfully - JobStatusCompleted JobStatus = "Completed" - // JobStatusFailed - Job failed. - JobStatusFailed JobStatus = "Failed" - // JobStatusFinalizing - Job is completed in the target. It is in output collection state now. - JobStatusFinalizing JobStatus = "Finalizing" - // JobStatusNotResponding - When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run - // goes to NotResponding state. - // NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of - // the previous states. - JobStatusNotResponding JobStatus = "NotResponding" - // JobStatusNotStarted - Run hasn't started yet. - JobStatusNotStarted JobStatus = "NotStarted" - // JobStatusPaused - The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. - JobStatusPaused JobStatus = "Paused" - // JobStatusPreparing - The run environment is being prepared. - JobStatusPreparing JobStatus = "Preparing" - // JobStatusProvisioning - (Not used currently) It will be used if ES is creating the compute target. - JobStatusProvisioning JobStatus = "Provisioning" - // JobStatusQueued - The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting - // for all required nodes to be ready. - JobStatusQueued JobStatus = "Queued" - // JobStatusRunning - The job started to run in the compute target. - JobStatusRunning JobStatus = "Running" - // JobStatusStarting - Run has started. The user has a run ID. - JobStatusStarting JobStatus = "Starting" - // JobStatusUnknown - Default job status if not mapped to all other statuses - JobStatusUnknown JobStatus = "Unknown" -) - -// PossibleJobStatusValues returns the possible values for the JobStatus const type. -func PossibleJobStatusValues() []JobStatus { - return []JobStatus{ - JobStatusCancelRequested, - JobStatusCanceled, - JobStatusCompleted, - JobStatusFailed, - JobStatusFinalizing, - JobStatusNotResponding, - JobStatusNotStarted, - JobStatusPaused, - JobStatusPreparing, - JobStatusProvisioning, - JobStatusQueued, - JobStatusRunning, - JobStatusStarting, - JobStatusUnknown, - } -} - -// JobType - Enum to determine the type of job. -type JobType string - -const ( - JobTypeCommand JobType = "Command" - JobTypePipeline JobType = "Pipeline" - JobTypeSweep JobType = "Sweep" -) - -// PossibleJobTypeValues returns the possible values for the JobType const type. -func PossibleJobTypeValues() []JobType { - return []JobType{ - JobTypeCommand, - JobTypePipeline, - JobTypeSweep, - } -} - -type KeyType string - -const ( - KeyTypePrimary KeyType = "Primary" - KeyTypeSecondary KeyType = "Secondary" -) - -// PossibleKeyTypeValues returns the possible values for the KeyType const type. -func PossibleKeyTypeValues() []KeyType { - return []KeyType{ - KeyTypePrimary, - KeyTypeSecondary, - } -} - -type ListViewType string - -const ( - ListViewTypeActiveOnly ListViewType = "ActiveOnly" - ListViewTypeAll ListViewType = "All" - ListViewTypeArchivedOnly ListViewType = "ArchivedOnly" -) - -// PossibleListViewTypeValues returns the possible values for the ListViewType const type. -func PossibleListViewTypeValues() []ListViewType { - return []ListViewType{ - ListViewTypeActiveOnly, - ListViewTypeAll, - ListViewTypeArchivedOnly, - } -} - -// LoadBalancerType - Load Balancer Type -type LoadBalancerType string - -const ( - LoadBalancerTypeInternalLoadBalancer LoadBalancerType = "InternalLoadBalancer" - LoadBalancerTypePublicIP LoadBalancerType = "PublicIp" -) - -// PossibleLoadBalancerTypeValues returns the possible values for the LoadBalancerType const type. -func PossibleLoadBalancerTypeValues() []LoadBalancerType { - return []LoadBalancerType{ - LoadBalancerTypeInternalLoadBalancer, - LoadBalancerTypePublicIP, - } -} - -// ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). -type ManagedServiceIdentityType string - -const ( - ManagedServiceIdentityTypeNone ManagedServiceIdentityType = "None" - ManagedServiceIdentityTypeSystemAssigned ManagedServiceIdentityType = "SystemAssigned" - ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned" - ManagedServiceIdentityTypeUserAssigned ManagedServiceIdentityType = "UserAssigned" -) - -// PossibleManagedServiceIdentityTypeValues returns the possible values for the ManagedServiceIdentityType const type. -func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { - return []ManagedServiceIdentityType{ - ManagedServiceIdentityTypeNone, - ManagedServiceIdentityTypeSystemAssigned, - ManagedServiceIdentityTypeSystemAssignedUserAssigned, - ManagedServiceIdentityTypeUserAssigned, - } -} - -// MountAction - Mount Action. -type MountAction string - -const ( - MountActionMount MountAction = "Mount" - MountActionUnmount MountAction = "Unmount" -) - -// PossibleMountActionValues returns the possible values for the MountAction const type. -func PossibleMountActionValues() []MountAction { - return []MountAction{ - MountActionMount, - MountActionUnmount, - } -} - -// MountState - Mount state. -type MountState string - -const ( - MountStateMountFailed MountState = "MountFailed" - MountStateMountRequested MountState = "MountRequested" - MountStateMounted MountState = "Mounted" - MountStateUnmountFailed MountState = "UnmountFailed" - MountStateUnmountRequested MountState = "UnmountRequested" - MountStateUnmounted MountState = "Unmounted" -) - -// PossibleMountStateValues returns the possible values for the MountState const type. -func PossibleMountStateValues() []MountState { - return []MountState{ - MountStateMountFailed, - MountStateMountRequested, - MountStateMounted, - MountStateUnmountFailed, - MountStateUnmountRequested, - MountStateUnmounted, - } -} - -// Network - network of this container. -type Network string - -const ( - NetworkBridge Network = "Bridge" - NetworkHost Network = "Host" -) - -// PossibleNetworkValues returns the possible values for the Network const type. -func PossibleNetworkValues() []Network { - return []Network{ - NetworkBridge, - NetworkHost, - } -} - -// NodeState - State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. -type NodeState string - -const ( - NodeStateIdle NodeState = "idle" - NodeStateLeaving NodeState = "leaving" - NodeStatePreempted NodeState = "preempted" - NodeStatePreparing NodeState = "preparing" - NodeStateRunning NodeState = "running" - NodeStateUnusable NodeState = "unusable" -) - -// PossibleNodeStateValues returns the possible values for the NodeState const type. -func PossibleNodeStateValues() []NodeState { - return []NodeState{ - NodeStateIdle, - NodeStateLeaving, - NodeStatePreempted, - NodeStatePreparing, - NodeStateRunning, - NodeStateUnusable, - } -} - -// OperatingSystemType - The type of operating system. -type OperatingSystemType string - -const ( - OperatingSystemTypeLinux OperatingSystemType = "Linux" - OperatingSystemTypeWindows OperatingSystemType = "Windows" -) - -// PossibleOperatingSystemTypeValues returns the possible values for the OperatingSystemType const type. -func PossibleOperatingSystemTypeValues() []OperatingSystemType { - return []OperatingSystemType{ - OperatingSystemTypeLinux, - OperatingSystemTypeWindows, - } -} - -// OperationName - Name of the last operation. -type OperationName string - -const ( - OperationNameCreate OperationName = "Create" - OperationNameDelete OperationName = "Delete" - OperationNameReimage OperationName = "Reimage" - OperationNameRestart OperationName = "Restart" - OperationNameStart OperationName = "Start" - OperationNameStop OperationName = "Stop" -) - -// PossibleOperationNameValues returns the possible values for the OperationName const type. -func PossibleOperationNameValues() []OperationName { - return []OperationName{ - OperationNameCreate, - OperationNameDelete, - OperationNameReimage, - OperationNameRestart, - OperationNameStart, - OperationNameStop, - } -} - -// OperationStatus - Operation status. -type OperationStatus string - -const ( - OperationStatusCreateFailed OperationStatus = "CreateFailed" - OperationStatusDeleteFailed OperationStatus = "DeleteFailed" - OperationStatusInProgress OperationStatus = "InProgress" - OperationStatusReimageFailed OperationStatus = "ReimageFailed" - OperationStatusRestartFailed OperationStatus = "RestartFailed" - OperationStatusStartFailed OperationStatus = "StartFailed" - OperationStatusStopFailed OperationStatus = "StopFailed" - OperationStatusSucceeded OperationStatus = "Succeeded" -) - -// PossibleOperationStatusValues returns the possible values for the OperationStatus const type. -func PossibleOperationStatusValues() []OperationStatus { - return []OperationStatus{ - OperationStatusCreateFailed, - OperationStatusDeleteFailed, - OperationStatusInProgress, - OperationStatusReimageFailed, - OperationStatusRestartFailed, - OperationStatusStartFailed, - OperationStatusStopFailed, - OperationStatusSucceeded, - } -} - -// OperationTrigger - Trigger of operation. -type OperationTrigger string - -const ( - OperationTriggerIdleShutdown OperationTrigger = "IdleShutdown" - OperationTriggerSchedule OperationTrigger = "Schedule" - OperationTriggerUser OperationTrigger = "User" -) - -// PossibleOperationTriggerValues returns the possible values for the OperationTrigger const type. -func PossibleOperationTriggerValues() []OperationTrigger { - return []OperationTrigger{ - OperationTriggerIdleShutdown, - OperationTriggerSchedule, - OperationTriggerUser, - } -} - -type OrderString string - -const ( - OrderStringCreatedAtAsc OrderString = "CreatedAtAsc" - OrderStringCreatedAtDesc OrderString = "CreatedAtDesc" - OrderStringUpdatedAtAsc OrderString = "UpdatedAtAsc" - OrderStringUpdatedAtDesc OrderString = "UpdatedAtDesc" -) - -// PossibleOrderStringValues returns the possible values for the OrderString const type. -func PossibleOrderStringValues() []OrderString { - return []OrderString{ - OrderStringCreatedAtAsc, - OrderStringCreatedAtDesc, - OrderStringUpdatedAtAsc, - OrderStringUpdatedAtDesc, - } -} - -// OsType - Compute OS Type -type OsType string - -const ( - OsTypeLinux OsType = "Linux" - OsTypeWindows OsType = "Windows" -) - -// PossibleOsTypeValues returns the possible values for the OsType const type. -func PossibleOsTypeValues() []OsType { - return []OsType{ - OsTypeLinux, - OsTypeWindows, - } -} - -// OutputDeliveryMode - Output data delivery mode enums. -type OutputDeliveryMode string - -const ( - OutputDeliveryModeReadWriteMount OutputDeliveryMode = "ReadWriteMount" - OutputDeliveryModeUpload OutputDeliveryMode = "Upload" -) - -// PossibleOutputDeliveryModeValues returns the possible values for the OutputDeliveryMode const type. -func PossibleOutputDeliveryModeValues() []OutputDeliveryMode { - return []OutputDeliveryMode{ - OutputDeliveryModeReadWriteMount, - OutputDeliveryModeUpload, - } -} - -// PrivateEndpointConnectionProvisioningState - The current provisioning state. -type PrivateEndpointConnectionProvisioningState string - -const ( - PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating" - PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting" - PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed" - PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded" -) - -// PossiblePrivateEndpointConnectionProvisioningStateValues returns the possible values for the PrivateEndpointConnectionProvisioningState const type. -func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { - return []PrivateEndpointConnectionProvisioningState{ - PrivateEndpointConnectionProvisioningStateCreating, - PrivateEndpointConnectionProvisioningStateDeleting, - PrivateEndpointConnectionProvisioningStateFailed, - PrivateEndpointConnectionProvisioningStateSucceeded, - } -} - -// PrivateEndpointServiceConnectionStatus - The private endpoint connection status. -type PrivateEndpointServiceConnectionStatus string - -const ( - PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved" - PrivateEndpointServiceConnectionStatusDisconnected PrivateEndpointServiceConnectionStatus = "Disconnected" - PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending" - PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected" - PrivateEndpointServiceConnectionStatusTimeout PrivateEndpointServiceConnectionStatus = "Timeout" -) - -// PossiblePrivateEndpointServiceConnectionStatusValues returns the possible values for the PrivateEndpointServiceConnectionStatus const type. -func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { - return []PrivateEndpointServiceConnectionStatus{ - PrivateEndpointServiceConnectionStatusApproved, - PrivateEndpointServiceConnectionStatusDisconnected, - PrivateEndpointServiceConnectionStatusPending, - PrivateEndpointServiceConnectionStatusRejected, - PrivateEndpointServiceConnectionStatusTimeout, - } -} - -// ProvisioningState - The current deployment state of workspace resource. The provisioningState is to indicate states for -// resource provisioning. -type ProvisioningState string - -const ( - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreating ProvisioningState = "Creating" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUnknown ProvisioningState = "Unknown" - ProvisioningStateUpdating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{ - ProvisioningStateCanceled, - ProvisioningStateCreating, - ProvisioningStateDeleting, - ProvisioningStateFailed, - ProvisioningStateSucceeded, - ProvisioningStateUnknown, - ProvisioningStateUpdating, - } -} - -// ProvisioningStatus - The current deployment state of schedule. -type ProvisioningStatus string - -const ( - ProvisioningStatusCompleted ProvisioningStatus = "Completed" - ProvisioningStatusFailed ProvisioningStatus = "Failed" - ProvisioningStatusProvisioning ProvisioningStatus = "Provisioning" -) - -// PossibleProvisioningStatusValues returns the possible values for the ProvisioningStatus const type. -func PossibleProvisioningStatusValues() []ProvisioningStatus { - return []ProvisioningStatus{ - ProvisioningStatusCompleted, - ProvisioningStatusFailed, - ProvisioningStatusProvisioning, - } -} - -// PublicNetworkAccess - Whether requests from Public Network are allowed. -type PublicNetworkAccess string - -const ( - PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" -) - -// PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. -func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { - return []PublicNetworkAccess{ - PublicNetworkAccessDisabled, - PublicNetworkAccessEnabled, - } -} - -// QuotaUnit - An enum describing the unit of quota measurement. -type QuotaUnit string - -const ( - QuotaUnitCount QuotaUnit = "Count" -) - -// PossibleQuotaUnitValues returns the possible values for the QuotaUnit const type. -func PossibleQuotaUnitValues() []QuotaUnit { - return []QuotaUnit{ - QuotaUnitCount, - } -} - -// RandomSamplingAlgorithmRule - The specific type of random algorithm -type RandomSamplingAlgorithmRule string - -const ( - RandomSamplingAlgorithmRuleRandom RandomSamplingAlgorithmRule = "Random" - RandomSamplingAlgorithmRuleSobol RandomSamplingAlgorithmRule = "Sobol" -) - -// PossibleRandomSamplingAlgorithmRuleValues returns the possible values for the RandomSamplingAlgorithmRule const type. -func PossibleRandomSamplingAlgorithmRuleValues() []RandomSamplingAlgorithmRule { - return []RandomSamplingAlgorithmRule{ - RandomSamplingAlgorithmRuleRandom, - RandomSamplingAlgorithmRuleSobol, - } -} - -// ReferenceType - Enum to determine which reference method to use for an asset. -type ReferenceType string - -const ( - ReferenceTypeDataPath ReferenceType = "DataPath" - ReferenceTypeID ReferenceType = "Id" - ReferenceTypeOutputPath ReferenceType = "OutputPath" -) - -// PossibleReferenceTypeValues returns the possible values for the ReferenceType const type. -func PossibleReferenceTypeValues() []ReferenceType { - return []ReferenceType{ - ReferenceTypeDataPath, - ReferenceTypeID, - ReferenceTypeOutputPath, - } -} - -// RemoteLoginPortPublicAccess - State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh -// port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all -// nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is -// defined, else is open all public nodes. It can be default only during cluster -// creation time, after creation it will be either enabled or disabled. -type RemoteLoginPortPublicAccess string - -const ( - RemoteLoginPortPublicAccessDisabled RemoteLoginPortPublicAccess = "Disabled" - RemoteLoginPortPublicAccessEnabled RemoteLoginPortPublicAccess = "Enabled" - RemoteLoginPortPublicAccessNotSpecified RemoteLoginPortPublicAccess = "NotSpecified" -) - -// PossibleRemoteLoginPortPublicAccessValues returns the possible values for the RemoteLoginPortPublicAccess const type. -func PossibleRemoteLoginPortPublicAccessValues() []RemoteLoginPortPublicAccess { - return []RemoteLoginPortPublicAccess{ - RemoteLoginPortPublicAccessDisabled, - RemoteLoginPortPublicAccessEnabled, - RemoteLoginPortPublicAccessNotSpecified, - } -} - -// SKUScaleType - Node scaling setting for the compute sku. -type SKUScaleType string - -const ( - // SKUScaleTypeAutomatic - Automatically scales node count. - SKUScaleTypeAutomatic SKUScaleType = "Automatic" - // SKUScaleTypeManual - Node count scaled upon user request. - SKUScaleTypeManual SKUScaleType = "Manual" - // SKUScaleTypeNone - Fixed set of nodes. - SKUScaleTypeNone SKUScaleType = "None" -) - -// PossibleSKUScaleTypeValues returns the possible values for the SKUScaleType const type. -func PossibleSKUScaleTypeValues() []SKUScaleType { - return []SKUScaleType{ - SKUScaleTypeAutomatic, - SKUScaleTypeManual, - SKUScaleTypeNone, - } -} - -// SKUTier - 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. -type SKUTier string - -const ( - SKUTierFree SKUTier = "Free" - SKUTierBasic SKUTier = "Basic" - SKUTierStandard SKUTier = "Standard" - SKUTierPremium SKUTier = "Premium" -) - -// PossibleSKUTierValues returns the possible values for the SKUTier const type. -func PossibleSKUTierValues() []SKUTier { - return []SKUTier{ - SKUTierFree, - SKUTierBasic, - SKUTierStandard, - SKUTierPremium, - } -} - -// SSHPublicAccess - 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. -type SSHPublicAccess string - -const ( - SSHPublicAccessDisabled SSHPublicAccess = "Disabled" - SSHPublicAccessEnabled SSHPublicAccess = "Enabled" -) - -// PossibleSSHPublicAccessValues returns the possible values for the SSHPublicAccess const type. -func PossibleSSHPublicAccessValues() []SSHPublicAccess { - return []SSHPublicAccess{ - SSHPublicAccessDisabled, - SSHPublicAccessEnabled, - } -} - -// SSLConfigStatus - Enable or disable ssl for scoring -type SSLConfigStatus string - -const ( - SSLConfigStatusAuto SSLConfigStatus = "Auto" - SSLConfigStatusDisabled SSLConfigStatus = "Disabled" - SSLConfigStatusEnabled SSLConfigStatus = "Enabled" -) - -// PossibleSSLConfigStatusValues returns the possible values for the SSLConfigStatus const type. -func PossibleSSLConfigStatusValues() []SSLConfigStatus { - return []SSLConfigStatus{ - SSLConfigStatusAuto, - SSLConfigStatusDisabled, - SSLConfigStatusEnabled, - } -} - -type SamplingAlgorithmType string - -const ( - SamplingAlgorithmTypeBayesian SamplingAlgorithmType = "Bayesian" - SamplingAlgorithmTypeGrid SamplingAlgorithmType = "Grid" - SamplingAlgorithmTypeRandom SamplingAlgorithmType = "Random" -) - -// PossibleSamplingAlgorithmTypeValues returns the possible values for the SamplingAlgorithmType const type. -func PossibleSamplingAlgorithmTypeValues() []SamplingAlgorithmType { - return []SamplingAlgorithmType{ - SamplingAlgorithmTypeBayesian, - SamplingAlgorithmTypeGrid, - SamplingAlgorithmTypeRandom, - } -} - -type ScaleType string - -const ( - ScaleTypeDefault ScaleType = "Default" - ScaleTypeTargetUtilization ScaleType = "TargetUtilization" -) - -// PossibleScaleTypeValues returns the possible values for the ScaleType const type. -func PossibleScaleTypeValues() []ScaleType { - return []ScaleType{ - ScaleTypeDefault, - ScaleTypeTargetUtilization, - } -} - -type ScheduleProvisioningState string - -const ( - ScheduleProvisioningStateCompleted ScheduleProvisioningState = "Completed" - ScheduleProvisioningStateFailed ScheduleProvisioningState = "Failed" - ScheduleProvisioningStateProvisioning ScheduleProvisioningState = "Provisioning" -) - -// PossibleScheduleProvisioningStateValues returns the possible values for the ScheduleProvisioningState const type. -func PossibleScheduleProvisioningStateValues() []ScheduleProvisioningState { - return []ScheduleProvisioningState{ - ScheduleProvisioningStateCompleted, - ScheduleProvisioningStateFailed, - ScheduleProvisioningStateProvisioning, - } -} - -type ScheduleStatus string - -const ( - ScheduleStatusDisabled ScheduleStatus = "Disabled" - ScheduleStatusEnabled ScheduleStatus = "Enabled" -) - -// PossibleScheduleStatusValues returns the possible values for the ScheduleStatus const type. -func PossibleScheduleStatusValues() []ScheduleStatus { - return []ScheduleStatus{ - ScheduleStatusDisabled, - ScheduleStatusEnabled, - } -} - -// SecretsType - Enum to determine the datastore secrets type. -type SecretsType string - -const ( - SecretsTypeAccountKey SecretsType = "AccountKey" - SecretsTypeCertificate SecretsType = "Certificate" - SecretsTypeSas SecretsType = "Sas" - SecretsTypeServicePrincipal SecretsType = "ServicePrincipal" -) - -// PossibleSecretsTypeValues returns the possible values for the SecretsType const type. -func PossibleSecretsTypeValues() []SecretsType { - return []SecretsType{ - SecretsTypeAccountKey, - SecretsTypeCertificate, - SecretsTypeSas, - SecretsTypeServicePrincipal, - } -} - -type ServiceDataAccessAuthIdentity string - -const ( - // ServiceDataAccessAuthIdentityNone - Do not use any identity for service data access. - ServiceDataAccessAuthIdentityNone ServiceDataAccessAuthIdentity = "None" - // ServiceDataAccessAuthIdentityWorkspaceSystemAssignedIdentity - Use the system assigned managed identity of the Workspace - // to authenticate service data access. - ServiceDataAccessAuthIdentityWorkspaceSystemAssignedIdentity ServiceDataAccessAuthIdentity = "WorkspaceSystemAssignedIdentity" - // ServiceDataAccessAuthIdentityWorkspaceUserAssignedIdentity - Use the user assigned managed identity of the Workspace to - // authenticate service data access. - ServiceDataAccessAuthIdentityWorkspaceUserAssignedIdentity ServiceDataAccessAuthIdentity = "WorkspaceUserAssignedIdentity" -) - -// PossibleServiceDataAccessAuthIdentityValues returns the possible values for the ServiceDataAccessAuthIdentity const type. -func PossibleServiceDataAccessAuthIdentityValues() []ServiceDataAccessAuthIdentity { - return []ServiceDataAccessAuthIdentity{ - ServiceDataAccessAuthIdentityNone, - ServiceDataAccessAuthIdentityWorkspaceSystemAssignedIdentity, - ServiceDataAccessAuthIdentityWorkspaceUserAssignedIdentity, - } -} - -// SourceType - Data source type. -type SourceType string - -const ( - SourceTypeDataset SourceType = "Dataset" - SourceTypeDatastore SourceType = "Datastore" - SourceTypeURI SourceType = "URI" -) - -// PossibleSourceTypeValues returns the possible values for the SourceType const type. -func PossibleSourceTypeValues() []SourceType { - return []SourceType{ - SourceTypeDataset, - SourceTypeDatastore, - SourceTypeURI, - } -} - -// Status - Status of update workspace quota. -type Status string - -const ( - StatusFailure Status = "Failure" - StatusInvalidQuotaBelowClusterMinimum Status = "InvalidQuotaBelowClusterMinimum" - StatusInvalidQuotaExceedsSubscriptionLimit Status = "InvalidQuotaExceedsSubscriptionLimit" - StatusInvalidVMFamilyName Status = "InvalidVMFamilyName" - StatusOperationNotEnabledForRegion Status = "OperationNotEnabledForRegion" - StatusOperationNotSupportedForSKU Status = "OperationNotSupportedForSku" - StatusSuccess Status = "Success" - StatusUndefined Status = "Undefined" -) - -// PossibleStatusValues returns the possible values for the Status const type. -func PossibleStatusValues() []Status { - return []Status{ - StatusFailure, - StatusInvalidQuotaBelowClusterMinimum, - StatusInvalidQuotaExceedsSubscriptionLimit, - StatusInvalidVMFamilyName, - StatusOperationNotEnabledForRegion, - StatusOperationNotSupportedForSKU, - StatusSuccess, - StatusUndefined, - } -} - -// StorageAccountType - type of this storage account. -type StorageAccountType string - -const ( - StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS" - StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS" -) - -// PossibleStorageAccountTypeValues returns the possible values for the StorageAccountType const type. -func PossibleStorageAccountTypeValues() []StorageAccountType { - return []StorageAccountType{ - StorageAccountTypePremiumLRS, - StorageAccountTypeStandardLRS, - } -} - -type UnderlyingResourceAction string - -const ( - UnderlyingResourceActionDelete UnderlyingResourceAction = "Delete" - UnderlyingResourceActionDetach UnderlyingResourceAction = "Detach" -) - -// PossibleUnderlyingResourceActionValues returns the possible values for the UnderlyingResourceAction const type. -func PossibleUnderlyingResourceActionValues() []UnderlyingResourceAction { - return []UnderlyingResourceAction{ - UnderlyingResourceActionDelete, - UnderlyingResourceActionDetach, - } -} - -// UnitOfMeasure - The unit of time measurement for the specified VM price. Example: OneHour -type UnitOfMeasure string - -const ( - UnitOfMeasureOneHour UnitOfMeasure = "OneHour" -) - -// PossibleUnitOfMeasureValues returns the possible values for the UnitOfMeasure const type. -func PossibleUnitOfMeasureValues() []UnitOfMeasure { - return []UnitOfMeasure{ - UnitOfMeasureOneHour, - } -} - -// UsageUnit - An enum describing the unit of usage measurement. -type UsageUnit string - -const ( - UsageUnitCount UsageUnit = "Count" -) - -// PossibleUsageUnitValues returns the possible values for the UsageUnit const type. -func PossibleUsageUnitValues() []UsageUnit { - return []UsageUnit{ - UsageUnitCount, - } -} - -// VMPriceOSType - Operating system type used by the VM. -type VMPriceOSType string - -const ( - VMPriceOSTypeLinux VMPriceOSType = "Linux" - VMPriceOSTypeWindows VMPriceOSType = "Windows" -) - -// PossibleVMPriceOSTypeValues returns the possible values for the VMPriceOSType const type. -func PossibleVMPriceOSTypeValues() []VMPriceOSType { - return []VMPriceOSType{ - VMPriceOSTypeLinux, - VMPriceOSTypeWindows, - } -} - -// VMPriority - Virtual Machine priority -type VMPriority string - -const ( - VMPriorityDedicated VMPriority = "Dedicated" - VMPriorityLowPriority VMPriority = "LowPriority" -) - -// PossibleVMPriorityValues returns the possible values for the VMPriority const type. -func PossibleVMPriorityValues() []VMPriority { - return []VMPriority{ - VMPriorityDedicated, - VMPriorityLowPriority, - } -} - -// VMTier - The type of the VM. -type VMTier string - -const ( - VMTierLowPriority VMTier = "LowPriority" - VMTierSpot VMTier = "Spot" - VMTierStandard VMTier = "Standard" -) - -// PossibleVMTierValues returns the possible values for the VMTier const type. -func PossibleVMTierValues() []VMTier { - return []VMTier{ - VMTierLowPriority, - VMTierSpot, - VMTierStandard, - } -} - -// ValueFormat - format for the workspace connection value -type ValueFormat string - -const ( - ValueFormatJSON ValueFormat = "JSON" -) - -// PossibleValueFormatValues returns the possible values for the ValueFormat const type. -func PossibleValueFormatValues() []ValueFormat { - return []ValueFormat{ - ValueFormatJSON, - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models_serde.go b/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models_serde.go deleted file mode 100644 index 13c4f0fa98d7..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models_serde.go +++ /dev/null @@ -1,4862 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armmachinelearning - -import ( - "encoding/json" - "fmt" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" -) - -// MarshalJSON implements the json.Marshaller interface for type AKS. -func (a AKS) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", a.ComputeLocation) - objectMap["computeType"] = ComputeTypeAKS - populateTimeRFC3339(objectMap, "createdOn", a.CreatedOn) - populate(objectMap, "description", a.Description) - populate(objectMap, "disableLocalAuth", a.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", a.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", a.ModifiedOn) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "provisioningErrors", a.ProvisioningErrors) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "resourceId", a.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AKS. -func (a *AKS) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &a.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &a.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &a.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &a.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &a.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &a.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &a.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &a.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AKSSchemaProperties. -func (a AKSSchemaProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "agentCount", a.AgentCount) - populate(objectMap, "agentVmSize", a.AgentVMSize) - populate(objectMap, "aksNetworkingConfiguration", a.AksNetworkingConfiguration) - populate(objectMap, "clusterFqdn", a.ClusterFqdn) - populate(objectMap, "clusterPurpose", a.ClusterPurpose) - populate(objectMap, "loadBalancerSubnet", a.LoadBalancerSubnet) - populate(objectMap, "loadBalancerType", a.LoadBalancerType) - populate(objectMap, "sslConfiguration", a.SSLConfiguration) - populate(objectMap, "systemServices", a.SystemServices) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AccountKeyDatastoreCredentials. -func (a AccountKeyDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["credentialsType"] = CredentialsTypeAccountKey - populate(objectMap, "secrets", a.Secrets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeyDatastoreCredentials. -func (a *AccountKeyDatastoreCredentials) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentialsType": - err = unpopulate(val, "CredentialsType", &a.CredentialsType) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &a.Secrets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AccountKeyDatastoreSecrets. -func (a AccountKeyDatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "key", a.Key) - objectMap["secretsType"] = SecretsTypeAccountKey - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AccountKeyDatastoreSecrets. -func (a *AccountKeyDatastoreSecrets) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "key": - err = unpopulate(val, "Key", &a.Key) - delete(rawMsg, key) - case "secretsType": - err = unpopulate(val, "SecretsType", &a.SecretsType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AksComputeSecrets. -func (a *AksComputeSecrets) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "adminKubeConfig": - err = unpopulate(val, "AdminKubeConfig", &a.AdminKubeConfig) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &a.ComputeType) - delete(rawMsg, key) - case "imagePullSecretName": - err = unpopulate(val, "ImagePullSecretName", &a.ImagePullSecretName) - delete(rawMsg, key) - case "userKubeConfig": - err = unpopulate(val, "UserKubeConfig", &a.UserKubeConfig) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AmlCompute. -func (a AmlCompute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", a.ComputeLocation) - objectMap["computeType"] = ComputeTypeAmlCompute - populateTimeRFC3339(objectMap, "createdOn", a.CreatedOn) - populate(objectMap, "description", a.Description) - populate(objectMap, "disableLocalAuth", a.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", a.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", a.ModifiedOn) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "provisioningErrors", a.ProvisioningErrors) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "resourceId", a.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlCompute. -func (a *AmlCompute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &a.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &a.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &a.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &a.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &a.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &a.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &a.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &a.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &a.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AmlComputeProperties. -func (a AmlComputeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocationState", a.AllocationState) - populateTimeRFC3339(objectMap, "allocationStateTransitionTime", a.AllocationStateTransitionTime) - populate(objectMap, "currentNodeCount", a.CurrentNodeCount) - populate(objectMap, "enableNodePublicIp", a.EnableNodePublicIP) - populate(objectMap, "errors", a.Errors) - populate(objectMap, "isolatedNetwork", a.IsolatedNetwork) - populate(objectMap, "nodeStateCounts", a.NodeStateCounts) - populate(objectMap, "osType", a.OSType) - populate(objectMap, "propertyBag", &a.PropertyBag) - populate(objectMap, "remoteLoginPortPublicAccess", a.RemoteLoginPortPublicAccess) - populate(objectMap, "scaleSettings", a.ScaleSettings) - populate(objectMap, "subnet", a.Subnet) - populate(objectMap, "targetNodeCount", a.TargetNodeCount) - populate(objectMap, "userAccountCredentials", a.UserAccountCredentials) - populate(objectMap, "vmPriority", a.VMPriority) - populate(objectMap, "vmSize", a.VMSize) - populate(objectMap, "virtualMachineImage", a.VirtualMachineImage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlComputeProperties. -func (a *AmlComputeProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allocationState": - err = unpopulate(val, "AllocationState", &a.AllocationState) - delete(rawMsg, key) - case "allocationStateTransitionTime": - err = unpopulateTimeRFC3339(val, "AllocationStateTransitionTime", &a.AllocationStateTransitionTime) - delete(rawMsg, key) - case "currentNodeCount": - err = unpopulate(val, "CurrentNodeCount", &a.CurrentNodeCount) - delete(rawMsg, key) - case "enableNodePublicIp": - err = unpopulate(val, "EnableNodePublicIP", &a.EnableNodePublicIP) - delete(rawMsg, key) - case "errors": - err = unpopulate(val, "Errors", &a.Errors) - delete(rawMsg, key) - case "isolatedNetwork": - err = unpopulate(val, "IsolatedNetwork", &a.IsolatedNetwork) - delete(rawMsg, key) - case "nodeStateCounts": - err = unpopulate(val, "NodeStateCounts", &a.NodeStateCounts) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &a.OSType) - delete(rawMsg, key) - case "propertyBag": - err = unpopulate(val, "PropertyBag", &a.PropertyBag) - delete(rawMsg, key) - case "remoteLoginPortPublicAccess": - err = unpopulate(val, "RemoteLoginPortPublicAccess", &a.RemoteLoginPortPublicAccess) - delete(rawMsg, key) - case "scaleSettings": - err = unpopulate(val, "ScaleSettings", &a.ScaleSettings) - delete(rawMsg, key) - case "subnet": - err = unpopulate(val, "Subnet", &a.Subnet) - delete(rawMsg, key) - case "targetNodeCount": - err = unpopulate(val, "TargetNodeCount", &a.TargetNodeCount) - delete(rawMsg, key) - case "userAccountCredentials": - err = unpopulate(val, "UserAccountCredentials", &a.UserAccountCredentials) - delete(rawMsg, key) - case "vmPriority": - err = unpopulate(val, "VMPriority", &a.VMPriority) - delete(rawMsg, key) - case "vmSize": - err = unpopulate(val, "VMSize", &a.VMSize) - delete(rawMsg, key) - case "virtualMachineImage": - err = unpopulate(val, "VirtualMachineImage", &a.VirtualMachineImage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AmlToken. -func (a AmlToken) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["identityType"] = IdentityConfigurationTypeAMLToken - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AmlToken. -func (a *AmlToken) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "identityType": - err = unpopulate(val, "IdentityType", &a.IdentityType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AssetBase. -func (a AssetBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "isAnonymous", a.IsAnonymous) - populate(objectMap, "isArchived", a.IsArchived) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AssetContainer. -func (a AssetContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "isArchived", a.IsArchived) - populate(objectMap, "latestVersion", a.LatestVersion) - populate(objectMap, "nextVersion", a.NextVersion) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type AzureBlobDatastore. -func (a AzureBlobDatastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accountName", a.AccountName) - populate(objectMap, "containerName", a.ContainerName) - populate(objectMap, "credentials", a.Credentials) - objectMap["datastoreType"] = DatastoreTypeAzureBlob - populate(objectMap, "description", a.Description) - populate(objectMap, "endpoint", a.Endpoint) - populate(objectMap, "isDefault", a.IsDefault) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureBlobDatastore. -func (a *AzureBlobDatastore) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountName": - err = unpopulate(val, "AccountName", &a.AccountName) - delete(rawMsg, key) - case "containerName": - err = unpopulate(val, "ContainerName", &a.ContainerName) - delete(rawMsg, key) - case "credentials": - a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) - delete(rawMsg, key) - case "datastoreType": - err = unpopulate(val, "DatastoreType", &a.DatastoreType) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "endpoint": - err = unpopulate(val, "Endpoint", &a.Endpoint) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &a.IsDefault) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "serviceDataAccessAuthIdentity": - err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureDataLakeGen1Datastore. -func (a AzureDataLakeGen1Datastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "credentials", a.Credentials) - objectMap["datastoreType"] = DatastoreTypeAzureDataLakeGen1 - populate(objectMap, "description", a.Description) - populate(objectMap, "isDefault", a.IsDefault) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) - populate(objectMap, "storeName", a.StoreName) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureDataLakeGen1Datastore. -func (a *AzureDataLakeGen1Datastore) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentials": - a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) - delete(rawMsg, key) - case "datastoreType": - err = unpopulate(val, "DatastoreType", &a.DatastoreType) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &a.IsDefault) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "serviceDataAccessAuthIdentity": - err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) - delete(rawMsg, key) - case "storeName": - err = unpopulate(val, "StoreName", &a.StoreName) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureDataLakeGen2Datastore. -func (a AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accountName", a.AccountName) - populate(objectMap, "credentials", a.Credentials) - objectMap["datastoreType"] = DatastoreTypeAzureDataLakeGen2 - populate(objectMap, "description", a.Description) - populate(objectMap, "endpoint", a.Endpoint) - populate(objectMap, "filesystem", a.Filesystem) - populate(objectMap, "isDefault", a.IsDefault) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureDataLakeGen2Datastore. -func (a *AzureDataLakeGen2Datastore) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountName": - err = unpopulate(val, "AccountName", &a.AccountName) - delete(rawMsg, key) - case "credentials": - a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) - delete(rawMsg, key) - case "datastoreType": - err = unpopulate(val, "DatastoreType", &a.DatastoreType) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "endpoint": - err = unpopulate(val, "Endpoint", &a.Endpoint) - delete(rawMsg, key) - case "filesystem": - err = unpopulate(val, "Filesystem", &a.Filesystem) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &a.IsDefault) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "serviceDataAccessAuthIdentity": - err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AzureFileDatastore. -func (a AzureFileDatastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "accountName", a.AccountName) - populate(objectMap, "credentials", a.Credentials) - objectMap["datastoreType"] = DatastoreTypeAzureFile - populate(objectMap, "description", a.Description) - populate(objectMap, "endpoint", a.Endpoint) - populate(objectMap, "fileShareName", a.FileShareName) - populate(objectMap, "isDefault", a.IsDefault) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "serviceDataAccessAuthIdentity", a.ServiceDataAccessAuthIdentity) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureFileDatastore. -func (a *AzureFileDatastore) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "accountName": - err = unpopulate(val, "AccountName", &a.AccountName) - delete(rawMsg, key) - case "credentials": - a.Credentials, err = unmarshalDatastoreCredentialsClassification(val) - delete(rawMsg, key) - case "datastoreType": - err = unpopulate(val, "DatastoreType", &a.DatastoreType) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &a.Description) - delete(rawMsg, key) - case "endpoint": - err = unpopulate(val, "Endpoint", &a.Endpoint) - delete(rawMsg, key) - case "fileShareName": - err = unpopulate(val, "FileShareName", &a.FileShareName) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &a.IsDefault) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &a.Properties) - delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &a.Protocol) - delete(rawMsg, key) - case "serviceDataAccessAuthIdentity": - err = unpopulate(val, "ServiceDataAccessAuthIdentity", &a.ServiceDataAccessAuthIdentity) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BanditPolicy. -func (b BanditPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "delayEvaluation", b.DelayEvaluation) - populate(objectMap, "evaluationInterval", b.EvaluationInterval) - objectMap["policyType"] = EarlyTerminationPolicyTypeBandit - populate(objectMap, "slackAmount", b.SlackAmount) - populate(objectMap, "slackFactor", b.SlackFactor) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BanditPolicy. -func (b *BanditPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "delayEvaluation": - err = unpopulate(val, "DelayEvaluation", &b.DelayEvaluation) - delete(rawMsg, key) - case "evaluationInterval": - err = unpopulate(val, "EvaluationInterval", &b.EvaluationInterval) - delete(rawMsg, key) - case "policyType": - err = unpopulate(val, "PolicyType", &b.PolicyType) - delete(rawMsg, key) - case "slackAmount": - err = unpopulate(val, "SlackAmount", &b.SlackAmount) - delete(rawMsg, key) - case "slackFactor": - err = unpopulate(val, "SlackFactor", &b.SlackFactor) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BatchDeployment. -func (b BatchDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "identity", b.Identity) - populate(objectMap, "kind", b.Kind) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "sku", b.SKU) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BatchDeploymentProperties. -func (b BatchDeploymentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "codeConfiguration", b.CodeConfiguration) - populate(objectMap, "compute", b.Compute) - populate(objectMap, "description", b.Description) - populate(objectMap, "environmentId", b.EnvironmentID) - populate(objectMap, "environmentVariables", b.EnvironmentVariables) - populate(objectMap, "errorThreshold", b.ErrorThreshold) - populate(objectMap, "loggingLevel", b.LoggingLevel) - populate(objectMap, "maxConcurrencyPerInstance", b.MaxConcurrencyPerInstance) - populate(objectMap, "miniBatchSize", b.MiniBatchSize) - populate(objectMap, "model", b.Model) - populate(objectMap, "outputAction", b.OutputAction) - populate(objectMap, "outputFileName", b.OutputFileName) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "resources", b.Resources) - populate(objectMap, "retrySettings", b.RetrySettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BatchDeploymentProperties. -func (b *BatchDeploymentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "codeConfiguration": - err = unpopulate(val, "CodeConfiguration", &b.CodeConfiguration) - delete(rawMsg, key) - case "compute": - err = unpopulate(val, "Compute", &b.Compute) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &b.Description) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &b.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &b.EnvironmentVariables) - delete(rawMsg, key) - case "errorThreshold": - err = unpopulate(val, "ErrorThreshold", &b.ErrorThreshold) - delete(rawMsg, key) - case "loggingLevel": - err = unpopulate(val, "LoggingLevel", &b.LoggingLevel) - delete(rawMsg, key) - case "maxConcurrencyPerInstance": - err = unpopulate(val, "MaxConcurrencyPerInstance", &b.MaxConcurrencyPerInstance) - delete(rawMsg, key) - case "miniBatchSize": - err = unpopulate(val, "MiniBatchSize", &b.MiniBatchSize) - delete(rawMsg, key) - case "model": - b.Model, err = unmarshalAssetReferenceBaseClassification(val) - delete(rawMsg, key) - case "outputAction": - err = unpopulate(val, "OutputAction", &b.OutputAction) - delete(rawMsg, key) - case "outputFileName": - err = unpopulate(val, "OutputFileName", &b.OutputFileName) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &b.Properties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &b.ProvisioningState) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &b.Resources) - delete(rawMsg, key) - case "retrySettings": - err = unpopulate(val, "RetrySettings", &b.RetrySettings) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type BatchEndpoint. -func (b BatchEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "identity", b.Identity) - populate(objectMap, "kind", b.Kind) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "sku", b.SKU) - populate(objectMap, "systemData", b.SystemData) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BatchEndpointProperties. -func (b BatchEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authMode", b.AuthMode) - populate(objectMap, "defaults", b.Defaults) - populate(objectMap, "description", b.Description) - populate(objectMap, "keys", b.Keys) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "scoringUri", b.ScoringURI) - populate(objectMap, "swaggerUri", b.SwaggerURI) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type BayesianSamplingAlgorithm. -func (b BayesianSamplingAlgorithm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeBayesian - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type BayesianSamplingAlgorithm. -func (b *BayesianSamplingAlgorithm) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "samplingAlgorithmType": - err = unpopulate(val, "SamplingAlgorithmType", &b.SamplingAlgorithmType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", b, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateDatastoreCredentials. -func (c CertificateDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorityUrl", c.AuthorityURL) - populate(objectMap, "clientId", c.ClientID) - objectMap["credentialsType"] = CredentialsTypeCertificate - populate(objectMap, "resourceUrl", c.ResourceURL) - populate(objectMap, "secrets", c.Secrets) - populate(objectMap, "tenantId", c.TenantID) - populate(objectMap, "thumbprint", c.Thumbprint) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDatastoreCredentials. -func (c *CertificateDatastoreCredentials) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorityUrl": - err = unpopulate(val, "AuthorityURL", &c.AuthorityURL) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &c.ClientID) - delete(rawMsg, key) - case "credentialsType": - err = unpopulate(val, "CredentialsType", &c.CredentialsType) - delete(rawMsg, key) - case "resourceUrl": - err = unpopulate(val, "ResourceURL", &c.ResourceURL) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &c.Secrets) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &c.TenantID) - delete(rawMsg, key) - case "thumbprint": - err = unpopulate(val, "Thumbprint", &c.Thumbprint) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CertificateDatastoreSecrets. -func (c CertificateDatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "certificate", c.Certificate) - objectMap["secretsType"] = SecretsTypeCertificate - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CertificateDatastoreSecrets. -func (c *CertificateDatastoreSecrets) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "certificate": - err = unpopulate(val, "Certificate", &c.Certificate) - delete(rawMsg, key) - case "secretsType": - err = unpopulate(val, "SecretsType", &c.SecretsType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ClusterUpdateParameters. -func (c ClusterUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CodeContainerProperties. -func (c CodeContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", c.Description) - populate(objectMap, "isArchived", c.IsArchived) - populate(objectMap, "latestVersion", c.LatestVersion) - populate(objectMap, "nextVersion", c.NextVersion) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CodeVersionProperties. -func (c CodeVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "codeUri", c.CodeURI) - populate(objectMap, "description", c.Description) - populate(objectMap, "isAnonymous", c.IsAnonymous) - populate(objectMap, "isArchived", c.IsArchived) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CommandJob. -func (c CommandJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "codeId", c.CodeID) - populate(objectMap, "command", c.Command) - populate(objectMap, "computeId", c.ComputeID) - populate(objectMap, "description", c.Description) - populate(objectMap, "displayName", c.DisplayName) - populate(objectMap, "distribution", c.Distribution) - populate(objectMap, "environmentId", c.EnvironmentID) - populate(objectMap, "environmentVariables", c.EnvironmentVariables) - populate(objectMap, "experimentName", c.ExperimentName) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "inputs", c.Inputs) - populate(objectMap, "isArchived", c.IsArchived) - objectMap["jobType"] = JobTypeCommand - populate(objectMap, "limits", c.Limits) - populate(objectMap, "outputs", c.Outputs) - populate(objectMap, "parameters", &c.Parameters) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "resources", c.Resources) - populate(objectMap, "services", c.Services) - populate(objectMap, "status", c.Status) - populate(objectMap, "tags", c.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CommandJob. -func (c *CommandJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "codeId": - err = unpopulate(val, "CodeID", &c.CodeID) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &c.Command) - delete(rawMsg, key) - case "computeId": - err = unpopulate(val, "ComputeID", &c.ComputeID) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &c.DisplayName) - delete(rawMsg, key) - case "distribution": - c.Distribution, err = unmarshalDistributionConfigurationClassification(val) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &c.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &c.EnvironmentVariables) - delete(rawMsg, key) - case "experimentName": - err = unpopulate(val, "ExperimentName", &c.ExperimentName) - delete(rawMsg, key) - case "identity": - c.Identity, err = unmarshalIdentityConfigurationClassification(val) - delete(rawMsg, key) - case "inputs": - c.Inputs, err = unmarshalJobInputClassificationMap(val) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &c.IsArchived) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &c.JobType) - delete(rawMsg, key) - case "limits": - err = unpopulate(val, "Limits", &c.Limits) - delete(rawMsg, key) - case "outputs": - c.Outputs, err = unmarshalJobOutputClassificationMap(val) - delete(rawMsg, key) - case "parameters": - err = unpopulate(val, "Parameters", &c.Parameters) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &c.Resources) - delete(rawMsg, key) - case "services": - err = unpopulate(val, "Services", &c.Services) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &c.Status) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CommandJobLimits. -func (c CommandJobLimits) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["jobLimitsType"] = JobLimitsTypeCommand - populate(objectMap, "timeout", c.Timeout) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CommandJobLimits. -func (c *CommandJobLimits) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobLimitsType": - err = unpopulate(val, "JobLimitsType", &c.JobLimitsType) - delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &c.Timeout) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComponentContainerProperties. -func (c ComponentContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", c.Description) - populate(objectMap, "isArchived", c.IsArchived) - populate(objectMap, "latestVersion", c.LatestVersion) - populate(objectMap, "nextVersion", c.NextVersion) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ComponentVersionProperties. -func (c ComponentVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "componentSpec", &c.ComponentSpec) - populate(objectMap, "description", c.Description) - populate(objectMap, "isAnonymous", c.IsAnonymous) - populate(objectMap, "isArchived", c.IsArchived) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Compute. -func (c Compute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", c.ComputeLocation) - objectMap["computeType"] = c.ComputeType - populateTimeRFC3339(objectMap, "createdOn", c.CreatedOn) - populate(objectMap, "description", c.Description) - populate(objectMap, "disableLocalAuth", c.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", c.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", c.ModifiedOn) - populate(objectMap, "provisioningErrors", c.ProvisioningErrors) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "resourceId", c.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Compute. -func (c *Compute) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &c.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &c.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &c.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &c.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &c.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &c.ModifiedOn) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &c.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeInstance. -func (c ComputeInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", c.ComputeLocation) - objectMap["computeType"] = ComputeTypeComputeInstance - populateTimeRFC3339(objectMap, "createdOn", c.CreatedOn) - populate(objectMap, "description", c.Description) - populate(objectMap, "disableLocalAuth", c.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", c.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", c.ModifiedOn) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "provisioningErrors", c.ProvisioningErrors) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "resourceId", c.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstance. -func (c *ComputeInstance) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &c.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &c.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &c.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &c.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &c.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &c.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &c.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &c.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &c.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceContainer. -func (c ComputeInstanceContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autosave", c.Autosave) - populate(objectMap, "environment", c.Environment) - populate(objectMap, "gpu", c.Gpu) - populate(objectMap, "name", c.Name) - populate(objectMap, "network", c.Network) - populate(objectMap, "services", c.Services) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceDataMount. -func (c ComputeInstanceDataMount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "createdBy", c.CreatedBy) - populate(objectMap, "error", c.Error) - populate(objectMap, "mountAction", c.MountAction) - populate(objectMap, "mountName", c.MountName) - populate(objectMap, "mountPath", c.MountPath) - populate(objectMap, "mountState", c.MountState) - populateTimeRFC3339(objectMap, "mountedOn", c.MountedOn) - populate(objectMap, "source", c.Source) - populate(objectMap, "sourceType", c.SourceType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceDataMount. -func (c *ComputeInstanceDataMount) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdBy": - err = unpopulate(val, "CreatedBy", &c.CreatedBy) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &c.Error) - delete(rawMsg, key) - case "mountAction": - err = unpopulate(val, "MountAction", &c.MountAction) - delete(rawMsg, key) - case "mountName": - err = unpopulate(val, "MountName", &c.MountName) - delete(rawMsg, key) - case "mountPath": - err = unpopulate(val, "MountPath", &c.MountPath) - delete(rawMsg, key) - case "mountState": - err = unpopulate(val, "MountState", &c.MountState) - delete(rawMsg, key) - case "mountedOn": - err = unpopulateTimeRFC3339(val, "MountedOn", &c.MountedOn) - delete(rawMsg, key) - case "source": - err = unpopulate(val, "Source", &c.Source) - delete(rawMsg, key) - case "sourceType": - err = unpopulate(val, "SourceType", &c.SourceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceLastOperation. -func (c ComputeInstanceLastOperation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "operationName", c.OperationName) - populate(objectMap, "operationStatus", c.OperationStatus) - populateTimeRFC3339(objectMap, "operationTime", c.OperationTime) - populate(objectMap, "operationTrigger", c.OperationTrigger) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceLastOperation. -func (c *ComputeInstanceLastOperation) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "operationName": - err = unpopulate(val, "OperationName", &c.OperationName) - delete(rawMsg, key) - case "operationStatus": - err = unpopulate(val, "OperationStatus", &c.OperationStatus) - delete(rawMsg, key) - case "operationTime": - err = unpopulateTimeRFC3339(val, "OperationTime", &c.OperationTime) - delete(rawMsg, key) - case "operationTrigger": - err = unpopulate(val, "OperationTrigger", &c.OperationTrigger) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceProperties. -func (c ComputeInstanceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationSharingPolicy", c.ApplicationSharingPolicy) - populate(objectMap, "applications", c.Applications) - populate(objectMap, "computeInstanceAuthorizationType", c.ComputeInstanceAuthorizationType) - populate(objectMap, "connectivityEndpoints", c.ConnectivityEndpoints) - populate(objectMap, "containers", c.Containers) - populate(objectMap, "createdBy", c.CreatedBy) - populate(objectMap, "dataDisks", c.DataDisks) - populate(objectMap, "dataMounts", c.DataMounts) - populate(objectMap, "enableNodePublicIp", c.EnableNodePublicIP) - populate(objectMap, "errors", c.Errors) - populate(objectMap, "lastOperation", c.LastOperation) - populate(objectMap, "personalComputeInstanceSettings", c.PersonalComputeInstanceSettings) - populate(objectMap, "sshSettings", c.SSHSettings) - populate(objectMap, "schedules", c.Schedules) - populate(objectMap, "setupScripts", c.SetupScripts) - populate(objectMap, "state", c.State) - populate(objectMap, "subnet", c.Subnet) - populate(objectMap, "vmSize", c.VMSize) - populate(objectMap, "versions", c.Versions) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeResource. -func (c ComputeResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", c.ID) - populate(objectMap, "identity", c.Identity) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "sku", c.SKU) - populate(objectMap, "systemData", c.SystemData) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeResource. -func (c *ComputeResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &c.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &c.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &c.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "properties": - c.Properties, err = unmarshalComputeClassification(val) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &c.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &c.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &c.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &c.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeResourceSchema. -func (c ComputeResourceSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", c.Properties) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeResourceSchema. -func (c *ComputeResourceSchema) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "properties": - c.Properties, err = unmarshalComputeClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ComputeSchedules. -func (c ComputeSchedules) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeStartStop", c.ComputeStartStop) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type CustomModelJobInput. -func (c CustomModelJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", c.Description) - objectMap["jobInputType"] = JobInputTypeCustomModel - populate(objectMap, "mode", c.Mode) - populate(objectMap, "uri", c.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobInput. -func (c *CustomModelJobInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &c.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &c.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type CustomModelJobOutput. -func (c CustomModelJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", c.Description) - objectMap["jobOutputType"] = JobOutputTypeCustomModel - populate(objectMap, "mode", c.Mode) - populate(objectMap, "uri", c.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type CustomModelJobOutput. -func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &c.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &c.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &c.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &c.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", c, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataContainerProperties. -func (d DataContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dataType", d.DataType) - populate(objectMap, "description", d.Description) - populate(objectMap, "isArchived", d.IsArchived) - populate(objectMap, "latestVersion", d.LatestVersion) - populate(objectMap, "nextVersion", d.NextVersion) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type DataFactory. -func (d DataFactory) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", d.ComputeLocation) - objectMap["computeType"] = ComputeTypeDataFactory - populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) - populate(objectMap, "description", d.Description) - populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", d.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", d.ModifiedOn) - populate(objectMap, "provisioningErrors", d.ProvisioningErrors) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "resourceId", d.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataFactory. -func (d *DataFactory) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &d.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &d.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &d.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &d.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &d.ModifiedOn) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &d.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &d.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataLakeAnalytics. -func (d DataLakeAnalytics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", d.ComputeLocation) - objectMap["computeType"] = ComputeTypeDataLakeAnalytics - populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) - populate(objectMap, "description", d.Description) - populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", d.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", d.ModifiedOn) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "provisioningErrors", d.ProvisioningErrors) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "resourceId", d.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataLakeAnalytics. -func (d *DataLakeAnalytics) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &d.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &d.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &d.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &d.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &d.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &d.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &d.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataPathAssetReference. -func (d DataPathAssetReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "datastoreId", d.DatastoreID) - populate(objectMap, "path", d.Path) - objectMap["referenceType"] = ReferenceTypeDataPath - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataPathAssetReference. -func (d *DataPathAssetReference) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "datastoreId": - err = unpopulate(val, "DatastoreID", &d.DatastoreID) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &d.Path) - delete(rawMsg, key) - case "referenceType": - err = unpopulate(val, "ReferenceType", &d.ReferenceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataVersionBase. -func (d DataVersionBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DataVersionBase. -func (d *DataVersionBase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - d.Properties, err = unmarshalDataVersionBasePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DataVersionBaseProperties. -func (d DataVersionBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["dataType"] = d.DataType - populate(objectMap, "dataUri", d.DataURI) - populate(objectMap, "description", d.Description) - populate(objectMap, "isAnonymous", d.IsAnonymous) - populate(objectMap, "isArchived", d.IsArchived) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Databricks. -func (d Databricks) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", d.ComputeLocation) - objectMap["computeType"] = ComputeTypeDatabricks - populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) - populate(objectMap, "description", d.Description) - populate(objectMap, "disableLocalAuth", d.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", d.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", d.ModifiedOn) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "provisioningErrors", d.ProvisioningErrors) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "resourceId", d.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Databricks. -func (d *Databricks) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &d.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &d.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &d.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &d.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &d.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &d.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &d.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &d.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &d.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatabricksComputeSecrets. -func (d *DatabricksComputeSecrets) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeType": - err = unpopulate(val, "ComputeType", &d.ComputeType) - delete(rawMsg, key) - case "databricksAccessToken": - err = unpopulate(val, "DatabricksAccessToken", &d.DatabricksAccessToken) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Datastore. -func (d Datastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", d.ID) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "systemData", d.SystemData) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Datastore. -func (d *Datastore) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &d.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &d.Name) - delete(rawMsg, key) - case "properties": - d.Properties, err = unmarshalDatastorePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &d.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &d.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DatastoreProperties. -func (d DatastoreProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "credentials", d.Credentials) - objectMap["datastoreType"] = d.DatastoreType - populate(objectMap, "description", d.Description) - populate(objectMap, "isDefault", d.IsDefault) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DatastoreProperties. -func (d *DatastoreProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentials": - d.Credentials, err = unmarshalDatastoreCredentialsClassification(val) - delete(rawMsg, key) - case "datastoreType": - err = unpopulate(val, "DatastoreType", &d.DatastoreType) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &d.Description) - delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &d.IsDefault) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &d.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &d.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DefaultScaleSettings. -func (d DefaultScaleSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["scaleType"] = ScaleTypeDefault - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type DefaultScaleSettings. -func (d *DefaultScaleSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "scaleType": - err = unpopulate(val, "ScaleType", &d.ScaleType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", d, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type DiagnoseRequestProperties. -func (d DiagnoseRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationInsights", d.ApplicationInsights) - populate(objectMap, "containerRegistry", d.ContainerRegistry) - populate(objectMap, "dnsResolution", d.DNSResolution) - populate(objectMap, "keyVault", d.KeyVault) - populate(objectMap, "nsg", d.Nsg) - populate(objectMap, "others", d.Others) - populate(objectMap, "resourceLock", d.ResourceLock) - populate(objectMap, "storageAccount", d.StorageAccount) - populate(objectMap, "udr", d.Udr) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointDeploymentPropertiesBase. -func (e EndpointDeploymentPropertiesBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "codeConfiguration", e.CodeConfiguration) - populate(objectMap, "description", e.Description) - populate(objectMap, "environmentId", e.EnvironmentID) - populate(objectMap, "environmentVariables", e.EnvironmentVariables) - populate(objectMap, "properties", e.Properties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesBase. -func (e EndpointPropertiesBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authMode", e.AuthMode) - populate(objectMap, "description", e.Description) - populate(objectMap, "keys", e.Keys) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "scoringUri", e.ScoringURI) - populate(objectMap, "swaggerUri", e.SwaggerURI) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EnvironmentContainerProperties. -func (e EnvironmentContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", e.Description) - populate(objectMap, "isArchived", e.IsArchived) - populate(objectMap, "latestVersion", e.LatestVersion) - populate(objectMap, "nextVersion", e.NextVersion) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type EnvironmentVersionProperties. -func (e EnvironmentVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "build", e.Build) - populate(objectMap, "condaFile", e.CondaFile) - populate(objectMap, "description", e.Description) - populate(objectMap, "environmentType", e.EnvironmentType) - populate(objectMap, "image", e.Image) - populate(objectMap, "inferenceConfig", e.InferenceConfig) - populate(objectMap, "isAnonymous", e.IsAnonymous) - populate(objectMap, "isArchived", e.IsArchived) - populate(objectMap, "osType", e.OSType) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. -func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalInfo", e.AdditionalInfo) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type FlavorData. -func (f FlavorData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "data", f.Data) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type GridSamplingAlgorithm. -func (g GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeGrid - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GridSamplingAlgorithm. -func (g *GridSamplingAlgorithm) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "samplingAlgorithmType": - err = unpopulate(val, "SamplingAlgorithmType", &g.SamplingAlgorithmType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type HDInsight. -func (h HDInsight) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", h.ComputeLocation) - objectMap["computeType"] = ComputeTypeHDInsight - populateTimeRFC3339(objectMap, "createdOn", h.CreatedOn) - populate(objectMap, "description", h.Description) - populate(objectMap, "disableLocalAuth", h.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", h.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", h.ModifiedOn) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "provisioningErrors", h.ProvisioningErrors) - populate(objectMap, "provisioningState", h.ProvisioningState) - populate(objectMap, "resourceId", h.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type HDInsight. -func (h *HDInsight) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &h.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &h.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &h.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &h.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &h.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &h.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &h.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &h.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &h.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &h.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &h.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", h, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IDAssetReference. -func (i IDAssetReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "assetId", i.AssetID) - objectMap["referenceType"] = ReferenceTypeID - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IDAssetReference. -func (i *IDAssetReference) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "assetId": - err = unpopulate(val, "AssetID", &i.AssetID) - delete(rawMsg, key) - case "referenceType": - err = unpopulate(val, "ReferenceType", &i.ReferenceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchema. -func (i InstanceTypeSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nodeSelector", i.NodeSelector) - populate(objectMap, "resources", i.Resources) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchemaResources. -func (i InstanceTypeSchemaResources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "limits", i.Limits) - populate(objectMap, "requests", i.Requests) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type JobBase. -func (j JobBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", j.ID) - populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "systemData", j.SystemData) - populate(objectMap, "type", j.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobBase. -func (j *JobBase) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) - delete(rawMsg, key) - case "properties": - j.Properties, err = unmarshalJobBasePropertiesClassification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &j.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobBaseProperties. -func (j JobBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeId", j.ComputeID) - populate(objectMap, "description", j.Description) - populate(objectMap, "displayName", j.DisplayName) - populate(objectMap, "experimentName", j.ExperimentName) - populate(objectMap, "identity", j.Identity) - populate(objectMap, "isArchived", j.IsArchived) - objectMap["jobType"] = j.JobType - populate(objectMap, "properties", j.Properties) - populate(objectMap, "services", j.Services) - populate(objectMap, "status", j.Status) - populate(objectMap, "tags", j.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type JobBaseProperties. -func (j *JobBaseProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeId": - err = unpopulate(val, "ComputeID", &j.ComputeID) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &j.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &j.DisplayName) - delete(rawMsg, key) - case "experimentName": - err = unpopulate(val, "ExperimentName", &j.ExperimentName) - delete(rawMsg, key) - case "identity": - j.Identity, err = unmarshalIdentityConfigurationClassification(val) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &j.IsArchived) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &j.JobType) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) - delete(rawMsg, key) - case "services": - err = unpopulate(val, "Services", &j.Services) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &j.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type JobService. -func (j JobService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "endpoint", j.Endpoint) - populate(objectMap, "errorMessage", j.ErrorMessage) - populate(objectMap, "jobServiceType", j.JobServiceType) - populate(objectMap, "port", j.Port) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "status", j.Status) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Kubernetes. -func (k Kubernetes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", k.ComputeLocation) - objectMap["computeType"] = ComputeTypeKubernetes - populateTimeRFC3339(objectMap, "createdOn", k.CreatedOn) - populate(objectMap, "description", k.Description) - populate(objectMap, "disableLocalAuth", k.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", k.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", k.ModifiedOn) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "provisioningErrors", k.ProvisioningErrors) - populate(objectMap, "provisioningState", k.ProvisioningState) - populate(objectMap, "resourceId", k.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Kubernetes. -func (k *Kubernetes) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &k.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &k.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &k.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &k.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &k.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &k.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &k.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &k.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &k.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &k.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KubernetesOnlineDeployment. -func (k KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appInsightsEnabled", k.AppInsightsEnabled) - populate(objectMap, "codeConfiguration", k.CodeConfiguration) - populate(objectMap, "containerResourceRequirements", k.ContainerResourceRequirements) - populate(objectMap, "description", k.Description) - objectMap["endpointComputeType"] = EndpointComputeTypeKubernetes - populate(objectMap, "environmentId", k.EnvironmentID) - populate(objectMap, "environmentVariables", k.EnvironmentVariables) - populate(objectMap, "instanceType", k.InstanceType) - populate(objectMap, "livenessProbe", k.LivenessProbe) - populate(objectMap, "model", k.Model) - populate(objectMap, "modelMountPath", k.ModelMountPath) - populate(objectMap, "properties", k.Properties) - populate(objectMap, "provisioningState", k.ProvisioningState) - populate(objectMap, "readinessProbe", k.ReadinessProbe) - populate(objectMap, "requestSettings", k.RequestSettings) - populate(objectMap, "scaleSettings", k.ScaleSettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesOnlineDeployment. -func (k *KubernetesOnlineDeployment) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appInsightsEnabled": - err = unpopulate(val, "AppInsightsEnabled", &k.AppInsightsEnabled) - delete(rawMsg, key) - case "codeConfiguration": - err = unpopulate(val, "CodeConfiguration", &k.CodeConfiguration) - delete(rawMsg, key) - case "containerResourceRequirements": - err = unpopulate(val, "ContainerResourceRequirements", &k.ContainerResourceRequirements) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &k.Description) - delete(rawMsg, key) - case "endpointComputeType": - err = unpopulate(val, "EndpointComputeType", &k.EndpointComputeType) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &k.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &k.EnvironmentVariables) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &k.InstanceType) - delete(rawMsg, key) - case "livenessProbe": - err = unpopulate(val, "LivenessProbe", &k.LivenessProbe) - delete(rawMsg, key) - case "model": - err = unpopulate(val, "Model", &k.Model) - delete(rawMsg, key) - case "modelMountPath": - err = unpopulate(val, "ModelMountPath", &k.ModelMountPath) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &k.Properties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &k.ProvisioningState) - delete(rawMsg, key) - case "readinessProbe": - err = unpopulate(val, "ReadinessProbe", &k.ReadinessProbe) - delete(rawMsg, key) - case "requestSettings": - err = unpopulate(val, "RequestSettings", &k.RequestSettings) - delete(rawMsg, key) - case "scaleSettings": - k.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type KubernetesProperties. -func (k KubernetesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultInstanceType", k.DefaultInstanceType) - populate(objectMap, "extensionInstanceReleaseTrain", k.ExtensionInstanceReleaseTrain) - populate(objectMap, "extensionPrincipalId", k.ExtensionPrincipalID) - populate(objectMap, "instanceTypes", k.InstanceTypes) - populate(objectMap, "namespace", k.Namespace) - populate(objectMap, "relayConnectionString", k.RelayConnectionString) - populate(objectMap, "serviceBusConnectionString", k.ServiceBusConnectionString) - populate(objectMap, "vcName", k.VcName) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type LiteralJobInput. -func (l LiteralJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", l.Description) - objectMap["jobInputType"] = JobInputTypeLiteral - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LiteralJobInput. -func (l *LiteralJobInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &l.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &l.JobInputType) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobInput. -func (m MLFlowModelJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - objectMap["jobInputType"] = JobInputTypeMlflowModel - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobInput. -func (m *MLFlowModelJobInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &m.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobOutput. -func (m MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - objectMap["jobOutputType"] = JobOutputTypeMlflowModel - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MLFlowModelJobOutput. -func (m *MLFlowModelJobOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &m.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MLTableData. -func (m MLTableData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["dataType"] = DataTypeMltable - populate(objectMap, "dataUri", m.DataURI) - populate(objectMap, "description", m.Description) - populate(objectMap, "isAnonymous", m.IsAnonymous) - populate(objectMap, "isArchived", m.IsArchived) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "referencedUris", m.ReferencedUris) - populate(objectMap, "tags", m.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableData. -func (m *MLTableData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataType": - err = unpopulate(val, "DataType", &m.DataType) - delete(rawMsg, key) - case "dataUri": - err = unpopulate(val, "DataURI", &m.DataURI) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "isAnonymous": - err = unpopulate(val, "IsAnonymous", &m.IsAnonymous) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &m.IsArchived) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "referencedUris": - err = unpopulate(val, "ReferencedUris", &m.ReferencedUris) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MLTableJobInput. -func (m MLTableJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - objectMap["jobInputType"] = JobInputTypeMltable - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobInput. -func (m *MLTableJobInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &m.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MLTableJobOutput. -func (m MLTableJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - objectMap["jobOutputType"] = JobOutputTypeMltable - populate(objectMap, "mode", m.Mode) - populate(objectMap, "uri", m.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MLTableJobOutput. -func (m *MLTableJobOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &m.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &m.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedIdentity. -func (m ManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientId", m.ClientID) - objectMap["identityType"] = IdentityConfigurationTypeManaged - populate(objectMap, "objectId", m.ObjectID) - populate(objectMap, "resourceId", m.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentity. -func (m *ManagedIdentity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) - delete(rawMsg, key) - case "identityType": - err = unpopulate(val, "IdentityType", &m.IdentityType) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &m.ObjectID) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &m.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. -func (m ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = ConnectionAuthTypeManagedIdentity - populate(objectMap, "category", m.Category) - populate(objectMap, "credentials", m.Credentials) - populate(objectMap, "target", m.Target) - populate(objectMap, "value", m.Value) - populate(objectMap, "valueFormat", m.ValueFormat) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. -func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authType": - err = unpopulate(val, "AuthType", &m.AuthType) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &m.Category) - delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &m.Credentials) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &m.Target) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &m.ValueFormat) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedOnlineDeployment. -func (m ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appInsightsEnabled", m.AppInsightsEnabled) - populate(objectMap, "codeConfiguration", m.CodeConfiguration) - populate(objectMap, "description", m.Description) - objectMap["endpointComputeType"] = EndpointComputeTypeManaged - populate(objectMap, "environmentId", m.EnvironmentID) - populate(objectMap, "environmentVariables", m.EnvironmentVariables) - populate(objectMap, "instanceType", m.InstanceType) - populate(objectMap, "livenessProbe", m.LivenessProbe) - populate(objectMap, "model", m.Model) - populate(objectMap, "modelMountPath", m.ModelMountPath) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "readinessProbe", m.ReadinessProbe) - populate(objectMap, "requestSettings", m.RequestSettings) - populate(objectMap, "scaleSettings", m.ScaleSettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedOnlineDeployment. -func (m *ManagedOnlineDeployment) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appInsightsEnabled": - err = unpopulate(val, "AppInsightsEnabled", &m.AppInsightsEnabled) - delete(rawMsg, key) - case "codeConfiguration": - err = unpopulate(val, "CodeConfiguration", &m.CodeConfiguration) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &m.Description) - delete(rawMsg, key) - case "endpointComputeType": - err = unpopulate(val, "EndpointComputeType", &m.EndpointComputeType) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &m.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &m.EnvironmentVariables) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &m.InstanceType) - delete(rawMsg, key) - case "livenessProbe": - err = unpopulate(val, "LivenessProbe", &m.LivenessProbe) - delete(rawMsg, key) - case "model": - err = unpopulate(val, "Model", &m.Model) - delete(rawMsg, key) - case "modelMountPath": - err = unpopulate(val, "ModelMountPath", &m.ModelMountPath) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "readinessProbe": - err = unpopulate(val, "ReadinessProbe", &m.ReadinessProbe) - delete(rawMsg, key) - case "requestSettings": - err = unpopulate(val, "RequestSettings", &m.RequestSettings) - delete(rawMsg, key) - case "scaleSettings": - m.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type MedianStoppingPolicy. -func (m MedianStoppingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "delayEvaluation", m.DelayEvaluation) - populate(objectMap, "evaluationInterval", m.EvaluationInterval) - objectMap["policyType"] = EarlyTerminationPolicyTypeMedianStopping - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MedianStoppingPolicy. -func (m *MedianStoppingPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "delayEvaluation": - err = unpopulate(val, "DelayEvaluation", &m.DelayEvaluation) - delete(rawMsg, key) - case "evaluationInterval": - err = unpopulate(val, "EvaluationInterval", &m.EvaluationInterval) - delete(rawMsg, key) - case "policyType": - err = unpopulate(val, "PolicyType", &m.PolicyType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ModelContainerProperties. -func (m ModelContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - populate(objectMap, "isArchived", m.IsArchived) - populate(objectMap, "latestVersion", m.LatestVersion) - populate(objectMap, "nextVersion", m.NextVersion) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ModelVersionProperties. -func (m ModelVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", m.Description) - populate(objectMap, "flavors", m.Flavors) - populate(objectMap, "isAnonymous", m.IsAnonymous) - populate(objectMap, "isArchived", m.IsArchived) - populate(objectMap, "jobName", m.JobName) - populate(objectMap, "modelType", m.ModelType) - populate(objectMap, "modelUri", m.ModelURI) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "tags", m.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type Mpi. -func (m Mpi) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["distributionType"] = DistributionTypeMpi - populate(objectMap, "processCountPerInstance", m.ProcessCountPerInstance) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Mpi. -func (m *Mpi) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "distributionType": - err = unpopulate(val, "DistributionType", &m.DistributionType) - delete(rawMsg, key) - case "processCountPerInstance": - err = unpopulate(val, "ProcessCountPerInstance", &m.ProcessCountPerInstance) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. -func (n NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = ConnectionAuthTypeNone - populate(objectMap, "category", n.Category) - populate(objectMap, "target", n.Target) - populate(objectMap, "value", n.Value) - populate(objectMap, "valueFormat", n.ValueFormat) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. -func (n *NoneAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authType": - err = unpopulate(val, "AuthType", &n.AuthType) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &n.Category) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &n.Target) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) - delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &n.ValueFormat) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NoneDatastoreCredentials. -func (n NoneDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["credentialsType"] = CredentialsTypeNone - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NoneDatastoreCredentials. -func (n *NoneDatastoreCredentials) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentialsType": - err = unpopulate(val, "CredentialsType", &n.CredentialsType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OnlineDeployment. -func (o OnlineDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", o.ID) - populate(objectMap, "identity", o.Identity) - populate(objectMap, "kind", o.Kind) - populate(objectMap, "location", o.Location) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "sku", o.SKU) - populate(objectMap, "systemData", o.SystemData) - populate(objectMap, "tags", o.Tags) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeployment. -func (o *OnlineDeployment) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &o.Identity) - delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &o.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &o.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "properties": - o.Properties, err = unmarshalOnlineDeploymentPropertiesClassification(val) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &o.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &o.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &o.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &o.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentProperties. -func (o OnlineDeploymentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appInsightsEnabled", o.AppInsightsEnabled) - populate(objectMap, "codeConfiguration", o.CodeConfiguration) - populate(objectMap, "description", o.Description) - objectMap["endpointComputeType"] = o.EndpointComputeType - populate(objectMap, "environmentId", o.EnvironmentID) - populate(objectMap, "environmentVariables", o.EnvironmentVariables) - populate(objectMap, "instanceType", o.InstanceType) - populate(objectMap, "livenessProbe", o.LivenessProbe) - populate(objectMap, "model", o.Model) - populate(objectMap, "modelMountPath", o.ModelMountPath) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "provisioningState", o.ProvisioningState) - populate(objectMap, "readinessProbe", o.ReadinessProbe) - populate(objectMap, "requestSettings", o.RequestSettings) - populate(objectMap, "scaleSettings", o.ScaleSettings) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineDeploymentProperties. -func (o *OnlineDeploymentProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appInsightsEnabled": - err = unpopulate(val, "AppInsightsEnabled", &o.AppInsightsEnabled) - delete(rawMsg, key) - case "codeConfiguration": - err = unpopulate(val, "CodeConfiguration", &o.CodeConfiguration) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &o.Description) - delete(rawMsg, key) - case "endpointComputeType": - err = unpopulate(val, "EndpointComputeType", &o.EndpointComputeType) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &o.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &o.EnvironmentVariables) - delete(rawMsg, key) - case "instanceType": - err = unpopulate(val, "InstanceType", &o.InstanceType) - delete(rawMsg, key) - case "livenessProbe": - err = unpopulate(val, "LivenessProbe", &o.LivenessProbe) - delete(rawMsg, key) - case "model": - err = unpopulate(val, "Model", &o.Model) - delete(rawMsg, key) - case "modelMountPath": - err = unpopulate(val, "ModelMountPath", &o.ModelMountPath) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &o.Properties) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &o.ProvisioningState) - delete(rawMsg, key) - case "readinessProbe": - err = unpopulate(val, "ReadinessProbe", &o.ReadinessProbe) - delete(rawMsg, key) - case "requestSettings": - err = unpopulate(val, "RequestSettings", &o.RequestSettings) - delete(rawMsg, key) - case "scaleSettings": - o.ScaleSettings, err = unmarshalOnlineScaleSettingsClassification(val) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OnlineEndpoint. -func (o OnlineEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", o.ID) - populate(objectMap, "identity", o.Identity) - populate(objectMap, "kind", o.Kind) - populate(objectMap, "location", o.Location) - populate(objectMap, "name", o.Name) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "sku", o.SKU) - populate(objectMap, "systemData", o.SystemData) - populate(objectMap, "tags", o.Tags) - populate(objectMap, "type", o.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type OnlineEndpointProperties. -func (o OnlineEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authMode", o.AuthMode) - populate(objectMap, "compute", o.Compute) - populate(objectMap, "description", o.Description) - populate(objectMap, "keys", o.Keys) - populate(objectMap, "properties", o.Properties) - populate(objectMap, "provisioningState", o.ProvisioningState) - populate(objectMap, "scoringUri", o.ScoringURI) - populate(objectMap, "swaggerUri", o.SwaggerURI) - populate(objectMap, "traffic", o.Traffic) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type OutputPathAssetReference. -func (o OutputPathAssetReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "jobId", o.JobID) - populate(objectMap, "path", o.Path) - objectMap["referenceType"] = ReferenceTypeOutputPath - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OutputPathAssetReference. -func (o *OutputPathAssetReference) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobId": - err = unpopulate(val, "JobID", &o.JobID) - delete(rawMsg, key) - case "path": - err = unpopulate(val, "Path", &o.Path) - delete(rawMsg, key) - case "referenceType": - err = unpopulate(val, "ReferenceType", &o.ReferenceType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PATAuthTypeWorkspaceConnectionProperties. -func (p PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = ConnectionAuthTypePAT - populate(objectMap, "category", p.Category) - populate(objectMap, "credentials", p.Credentials) - populate(objectMap, "target", p.Target) - populate(objectMap, "value", p.Value) - populate(objectMap, "valueFormat", p.ValueFormat) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PATAuthTypeWorkspaceConnectionProperties. -func (p *PATAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authType": - err = unpopulate(val, "AuthType", &p.AuthType) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &p.Category) - delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &p.Credentials) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &p.Target) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) - delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &p.ValueFormat) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. -func (p PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PartialManagedServiceIdentity. -func (p PartialManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "type", p.Type) - populate(objectMap, "userAssignedIdentities", p.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResource. -func (p PartialMinimalTrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithIdentity. -func (p PartialMinimalTrackedResourceWithIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithSKU. -func (p PartialMinimalTrackedResourceWithSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PipelineJob. -func (p PipelineJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeId", p.ComputeID) - populate(objectMap, "description", p.Description) - populate(objectMap, "displayName", p.DisplayName) - populate(objectMap, "experimentName", p.ExperimentName) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "inputs", p.Inputs) - populate(objectMap, "isArchived", p.IsArchived) - objectMap["jobType"] = JobTypePipeline - populate(objectMap, "jobs", p.Jobs) - populate(objectMap, "outputs", p.Outputs) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "services", p.Services) - populate(objectMap, "settings", &p.Settings) - populate(objectMap, "status", p.Status) - populate(objectMap, "tags", p.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PipelineJob. -func (p *PipelineJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeId": - err = unpopulate(val, "ComputeID", &p.ComputeID) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &p.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &p.DisplayName) - delete(rawMsg, key) - case "experimentName": - err = unpopulate(val, "ExperimentName", &p.ExperimentName) - delete(rawMsg, key) - case "identity": - p.Identity, err = unmarshalIdentityConfigurationClassification(val) - delete(rawMsg, key) - case "inputs": - p.Inputs, err = unmarshalJobInputClassificationMap(val) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &p.IsArchived) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &p.JobType) - delete(rawMsg, key) - case "jobs": - err = unpopulate(val, "Jobs", &p.Jobs) - delete(rawMsg, key) - case "outputs": - p.Outputs, err = unmarshalJobOutputClassificationMap(val) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) - delete(rawMsg, key) - case "services": - err = unpopulate(val, "Services", &p.Services) - delete(rawMsg, key) - case "settings": - err = unpopulate(val, "Settings", &p.Settings) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &p.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. -func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. -func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", p.ID) - populate(objectMap, "identity", p.Identity) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. -func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", p.GroupID) - populate(objectMap, "requiredMembers", p.RequiredMembers) - populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type PyTorch. -func (p PyTorch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["distributionType"] = DistributionTypePyTorch - populate(objectMap, "processCountPerInstance", p.ProcessCountPerInstance) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PyTorch. -func (p *PyTorch) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "distributionType": - err = unpopulate(val, "DistributionType", &p.DistributionType) - delete(rawMsg, key) - case "processCountPerInstance": - err = unpopulate(val, "ProcessCountPerInstance", &p.ProcessCountPerInstance) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type QuotaUpdateParameters. -func (q QuotaUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "location", q.Location) - populate(objectMap, "value", q.Value) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type RandomSamplingAlgorithm. -func (r RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "rule", r.Rule) - objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeRandom - populate(objectMap, "seed", r.Seed) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RandomSamplingAlgorithm. -func (r *RandomSamplingAlgorithm) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "rule": - err = unpopulate(val, "Rule", &r.Rule) - delete(rawMsg, key) - case "samplingAlgorithmType": - err = unpopulate(val, "SamplingAlgorithmType", &r.SamplingAlgorithmType) - delete(rawMsg, key) - case "seed": - err = unpopulate(val, "Seed", &r.Seed) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceBase. -func (r ResourceBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", r.Description) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type ResourceConfiguration. -func (r ResourceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "instanceCount", r.InstanceCount) - populate(objectMap, "instanceType", r.InstanceType) - populate(objectMap, "properties", r.Properties) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type SASAuthTypeWorkspaceConnectionProperties. -func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = ConnectionAuthTypeSAS - populate(objectMap, "category", s.Category) - populate(objectMap, "credentials", s.Credentials) - populate(objectMap, "target", s.Target) - populate(objectMap, "value", s.Value) - populate(objectMap, "valueFormat", s.ValueFormat) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SASAuthTypeWorkspaceConnectionProperties. -func (s *SASAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authType": - err = unpopulate(val, "AuthType", &s.AuthType) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &s.Category) - delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &s.Credentials) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &s.Target) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &s.ValueFormat) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SasDatastoreCredentials. -func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["credentialsType"] = CredentialsTypeSas - populate(objectMap, "secrets", s.Secrets) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreCredentials. -func (s *SasDatastoreCredentials) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "credentialsType": - err = unpopulate(val, "CredentialsType", &s.CredentialsType) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &s.Secrets) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SasDatastoreSecrets. -func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sasToken", s.SasToken) - objectMap["secretsType"] = SecretsTypeSas - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SasDatastoreSecrets. -func (s *SasDatastoreSecrets) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "sasToken": - err = unpopulate(val, "SasToken", &s.SasToken) - delete(rawMsg, key) - case "secretsType": - err = unpopulate(val, "SecretsType", &s.SecretsType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreCredentials. -func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorityUrl", s.AuthorityURL) - populate(objectMap, "clientId", s.ClientID) - objectMap["credentialsType"] = CredentialsTypeServicePrincipal - populate(objectMap, "resourceUrl", s.ResourceURL) - populate(objectMap, "secrets", s.Secrets) - populate(objectMap, "tenantId", s.TenantID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreCredentials. -func (s *ServicePrincipalDatastoreCredentials) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authorityUrl": - err = unpopulate(val, "AuthorityURL", &s.AuthorityURL) - delete(rawMsg, key) - case "clientId": - err = unpopulate(val, "ClientID", &s.ClientID) - delete(rawMsg, key) - case "credentialsType": - err = unpopulate(val, "CredentialsType", &s.CredentialsType) - delete(rawMsg, key) - case "resourceUrl": - err = unpopulate(val, "ResourceURL", &s.ResourceURL) - delete(rawMsg, key) - case "secrets": - err = unpopulate(val, "Secrets", &s.Secrets) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &s.TenantID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreSecrets. -func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientSecret", s.ClientSecret) - objectMap["secretsType"] = SecretsTypeServicePrincipal - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreSecrets. -func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "clientSecret": - err = unpopulate(val, "ClientSecret", &s.ClientSecret) - delete(rawMsg, key) - case "secretsType": - err = unpopulate(val, "SecretsType", &s.SecretsType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SweepJob. -func (s SweepJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeId", s.ComputeID) - populate(objectMap, "description", s.Description) - populate(objectMap, "displayName", s.DisplayName) - populate(objectMap, "earlyTermination", s.EarlyTermination) - populate(objectMap, "experimentName", s.ExperimentName) - populate(objectMap, "identity", s.Identity) - populate(objectMap, "inputs", s.Inputs) - populate(objectMap, "isArchived", s.IsArchived) - objectMap["jobType"] = JobTypeSweep - populate(objectMap, "limits", s.Limits) - populate(objectMap, "objective", s.Objective) - populate(objectMap, "outputs", s.Outputs) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "samplingAlgorithm", s.SamplingAlgorithm) - populate(objectMap, "searchSpace", &s.SearchSpace) - populate(objectMap, "services", s.Services) - populate(objectMap, "status", s.Status) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "trial", s.Trial) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SweepJob. -func (s *SweepJob) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeId": - err = unpopulate(val, "ComputeID", &s.ComputeID) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "displayName": - err = unpopulate(val, "DisplayName", &s.DisplayName) - delete(rawMsg, key) - case "earlyTermination": - s.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) - delete(rawMsg, key) - case "experimentName": - err = unpopulate(val, "ExperimentName", &s.ExperimentName) - delete(rawMsg, key) - case "identity": - s.Identity, err = unmarshalIdentityConfigurationClassification(val) - delete(rawMsg, key) - case "inputs": - s.Inputs, err = unmarshalJobInputClassificationMap(val) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &s.IsArchived) - delete(rawMsg, key) - case "jobType": - err = unpopulate(val, "JobType", &s.JobType) - delete(rawMsg, key) - case "limits": - err = unpopulate(val, "Limits", &s.Limits) - delete(rawMsg, key) - case "objective": - err = unpopulate(val, "Objective", &s.Objective) - delete(rawMsg, key) - case "outputs": - s.Outputs, err = unmarshalJobOutputClassificationMap(val) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "samplingAlgorithm": - s.SamplingAlgorithm, err = unmarshalSamplingAlgorithmClassification(val) - delete(rawMsg, key) - case "searchSpace": - err = unpopulate(val, "SearchSpace", &s.SearchSpace) - delete(rawMsg, key) - case "services": - err = unpopulate(val, "Services", &s.Services) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &s.Tags) - delete(rawMsg, key) - case "trial": - err = unpopulate(val, "Trial", &s.Trial) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SweepJobLimits. -func (s SweepJobLimits) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["jobLimitsType"] = JobLimitsTypeSweep - populate(objectMap, "maxConcurrentTrials", s.MaxConcurrentTrials) - populate(objectMap, "maxTotalTrials", s.MaxTotalTrials) - populate(objectMap, "timeout", s.Timeout) - populate(objectMap, "trialTimeout", s.TrialTimeout) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SweepJobLimits. -func (s *SweepJobLimits) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "jobLimitsType": - err = unpopulate(val, "JobLimitsType", &s.JobLimitsType) - delete(rawMsg, key) - case "maxConcurrentTrials": - err = unpopulate(val, "MaxConcurrentTrials", &s.MaxConcurrentTrials) - delete(rawMsg, key) - case "maxTotalTrials": - err = unpopulate(val, "MaxTotalTrials", &s.MaxTotalTrials) - delete(rawMsg, key) - case "timeout": - err = unpopulate(val, "Timeout", &s.Timeout) - delete(rawMsg, key) - case "trialTimeout": - err = unpopulate(val, "TrialTimeout", &s.TrialTimeout) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SynapseSpark. -func (s SynapseSpark) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", s.ComputeLocation) - objectMap["computeType"] = ComputeTypeSynapseSpark - populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) - populate(objectMap, "description", s.Description) - populate(objectMap, "disableLocalAuth", s.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", s.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", s.ModifiedOn) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "provisioningErrors", s.ProvisioningErrors) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "resourceId", s.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SynapseSpark. -func (s *SynapseSpark) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &s.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &s.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &s.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &s.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &s.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &s.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &s.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &s.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &s.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SystemData. -func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) - populate(objectMap, "createdBy", s.CreatedBy) - populate(objectMap, "createdByType", s.CreatedByType) - populateTimeRFC3339(objectMap, "lastModifiedAt", s.LastModifiedAt) - populate(objectMap, "lastModifiedBy", s.LastModifiedBy) - populate(objectMap, "lastModifiedByType", s.LastModifiedByType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemData. -func (s *SystemData) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "createdAt": - err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) - delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) - delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) - delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) - delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) - delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TargetUtilizationScaleSettings. -func (t TargetUtilizationScaleSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "maxInstances", t.MaxInstances) - populate(objectMap, "minInstances", t.MinInstances) - populate(objectMap, "pollingInterval", t.PollingInterval) - objectMap["scaleType"] = ScaleTypeTargetUtilization - populate(objectMap, "targetUtilizationPercentage", t.TargetUtilizationPercentage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TargetUtilizationScaleSettings. -func (t *TargetUtilizationScaleSettings) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "maxInstances": - err = unpopulate(val, "MaxInstances", &t.MaxInstances) - delete(rawMsg, key) - case "minInstances": - err = unpopulate(val, "MinInstances", &t.MinInstances) - delete(rawMsg, key) - case "pollingInterval": - err = unpopulate(val, "PollingInterval", &t.PollingInterval) - delete(rawMsg, key) - case "scaleType": - err = unpopulate(val, "ScaleType", &t.ScaleType) - delete(rawMsg, key) - case "targetUtilizationPercentage": - err = unpopulate(val, "TargetUtilizationPercentage", &t.TargetUtilizationPercentage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TensorFlow. -func (t TensorFlow) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["distributionType"] = DistributionTypeTensorFlow - populate(objectMap, "parameterServerCount", t.ParameterServerCount) - populate(objectMap, "workerCount", t.WorkerCount) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TensorFlow. -func (t *TensorFlow) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "distributionType": - err = unpopulate(val, "DistributionType", &t.DistributionType) - delete(rawMsg, key) - case "parameterServerCount": - err = unpopulate(val, "ParameterServerCount", &t.ParameterServerCount) - delete(rawMsg, key) - case "workerCount": - err = unpopulate(val, "WorkerCount", &t.WorkerCount) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TrackedResource. -func (t TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - populate(objectMap, "systemData", t.SystemData) - populate(objectMap, "tags", t.Tags) - populate(objectMap, "type", t.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type TrialComponent. -func (t TrialComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "codeId", t.CodeID) - populate(objectMap, "command", t.Command) - populate(objectMap, "distribution", t.Distribution) - populate(objectMap, "environmentId", t.EnvironmentID) - populate(objectMap, "environmentVariables", t.EnvironmentVariables) - populate(objectMap, "resources", t.Resources) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TrialComponent. -func (t *TrialComponent) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "codeId": - err = unpopulate(val, "CodeID", &t.CodeID) - delete(rawMsg, key) - case "command": - err = unpopulate(val, "Command", &t.Command) - delete(rawMsg, key) - case "distribution": - t.Distribution, err = unmarshalDistributionConfigurationClassification(val) - delete(rawMsg, key) - case "environmentId": - err = unpopulate(val, "EnvironmentID", &t.EnvironmentID) - delete(rawMsg, key) - case "environmentVariables": - err = unpopulate(val, "EnvironmentVariables", &t.EnvironmentVariables) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, "Resources", &t.Resources) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TritonModelJobInput. -func (t TritonModelJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", t.Description) - objectMap["jobInputType"] = JobInputTypeTritonModel - populate(objectMap, "mode", t.Mode) - populate(objectMap, "uri", t.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TritonModelJobInput. -func (t *TritonModelJobInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &t.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &t.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &t.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &t.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TritonModelJobOutput. -func (t TritonModelJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", t.Description) - objectMap["jobOutputType"] = JobOutputTypeTritonModel - populate(objectMap, "mode", t.Mode) - populate(objectMap, "uri", t.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TritonModelJobOutput. -func (t *TritonModelJobOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &t.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &t.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &t.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &t.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type TruncationSelectionPolicy. -func (t TruncationSelectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "delayEvaluation", t.DelayEvaluation) - populate(objectMap, "evaluationInterval", t.EvaluationInterval) - objectMap["policyType"] = EarlyTerminationPolicyTypeTruncationSelection - populate(objectMap, "truncationPercentage", t.TruncationPercentage) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TruncationSelectionPolicy. -func (t *TruncationSelectionPolicy) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "delayEvaluation": - err = unpopulate(val, "DelayEvaluation", &t.DelayEvaluation) - delete(rawMsg, key) - case "evaluationInterval": - err = unpopulate(val, "EvaluationInterval", &t.EvaluationInterval) - delete(rawMsg, key) - case "policyType": - err = unpopulate(val, "PolicyType", &t.PolicyType) - delete(rawMsg, key) - case "truncationPercentage": - err = unpopulate(val, "TruncationPercentage", &t.TruncationPercentage) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", t, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URIFileDataVersion. -func (u URIFileDataVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["dataType"] = DataTypeURIFile - populate(objectMap, "dataUri", u.DataURI) - populate(objectMap, "description", u.Description) - populate(objectMap, "isAnonymous", u.IsAnonymous) - populate(objectMap, "isArchived", u.IsArchived) - populate(objectMap, "properties", u.Properties) - populate(objectMap, "tags", u.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URIFileDataVersion. -func (u *URIFileDataVersion) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataType": - err = unpopulate(val, "DataType", &u.DataType) - delete(rawMsg, key) - case "dataUri": - err = unpopulate(val, "DataURI", &u.DataURI) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &u.Description) - delete(rawMsg, key) - case "isAnonymous": - err = unpopulate(val, "IsAnonymous", &u.IsAnonymous) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &u.IsArchived) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &u.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URIFileJobInput. -func (u URIFileJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", u.Description) - objectMap["jobInputType"] = JobInputTypeURIFile - populate(objectMap, "mode", u.Mode) - populate(objectMap, "uri", u.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URIFileJobInput. -func (u *URIFileJobInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &u.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &u.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &u.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &u.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URIFileJobOutput. -func (u URIFileJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", u.Description) - objectMap["jobOutputType"] = JobOutputTypeURIFile - populate(objectMap, "mode", u.Mode) - populate(objectMap, "uri", u.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URIFileJobOutput. -func (u *URIFileJobOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &u.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &u.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &u.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &u.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URIFolderDataVersion. -func (u URIFolderDataVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["dataType"] = DataTypeURIFolder - populate(objectMap, "dataUri", u.DataURI) - populate(objectMap, "description", u.Description) - populate(objectMap, "isAnonymous", u.IsAnonymous) - populate(objectMap, "isArchived", u.IsArchived) - populate(objectMap, "properties", u.Properties) - populate(objectMap, "tags", u.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URIFolderDataVersion. -func (u *URIFolderDataVersion) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dataType": - err = unpopulate(val, "DataType", &u.DataType) - delete(rawMsg, key) - case "dataUri": - err = unpopulate(val, "DataURI", &u.DataURI) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &u.Description) - delete(rawMsg, key) - case "isAnonymous": - err = unpopulate(val, "IsAnonymous", &u.IsAnonymous) - delete(rawMsg, key) - case "isArchived": - err = unpopulate(val, "IsArchived", &u.IsArchived) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &u.Properties) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &u.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URIFolderJobInput. -func (u URIFolderJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", u.Description) - objectMap["jobInputType"] = JobInputTypeURIFolder - populate(objectMap, "mode", u.Mode) - populate(objectMap, "uri", u.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URIFolderJobInput. -func (u *URIFolderJobInput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &u.Description) - delete(rawMsg, key) - case "jobInputType": - err = unpopulate(val, "JobInputType", &u.JobInputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &u.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &u.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type URIFolderJobOutput. -func (u URIFolderJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", u.Description) - objectMap["jobOutputType"] = JobOutputTypeURIFolder - populate(objectMap, "mode", u.Mode) - populate(objectMap, "uri", u.URI) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type URIFolderJobOutput. -func (u *URIFolderJobOutput) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, "Description", &u.Description) - delete(rawMsg, key) - case "jobOutputType": - err = unpopulate(val, "JobOutputType", &u.JobOutputType) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &u.Mode) - delete(rawMsg, key) - case "uri": - err = unpopulate(val, "URI", &u.URI) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UserIdentity. -func (u UserIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["identityType"] = IdentityConfigurationTypeUserIdentity - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UserIdentity. -func (u *UserIdentity) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "identityType": - err = unpopulate(val, "IdentityType", &u.IdentityType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type UsernamePasswordAuthTypeWorkspaceConnectionProperties. -func (u UsernamePasswordAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - objectMap["authType"] = ConnectionAuthTypeUsernamePassword - populate(objectMap, "category", u.Category) - populate(objectMap, "credentials", u.Credentials) - populate(objectMap, "target", u.Target) - populate(objectMap, "value", u.Value) - populate(objectMap, "valueFormat", u.ValueFormat) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type UsernamePasswordAuthTypeWorkspaceConnectionProperties. -func (u *UsernamePasswordAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "authType": - err = unpopulate(val, "AuthType", &u.AuthType) - delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &u.Category) - delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &u.Credentials) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &u.Target) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &u.Value) - delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &u.ValueFormat) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", u, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualMachine. -func (v VirtualMachine) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "computeLocation", v.ComputeLocation) - objectMap["computeType"] = ComputeTypeVirtualMachine - populateTimeRFC3339(objectMap, "createdOn", v.CreatedOn) - populate(objectMap, "description", v.Description) - populate(objectMap, "disableLocalAuth", v.DisableLocalAuth) - populate(objectMap, "isAttachedCompute", v.IsAttachedCompute) - populateTimeRFC3339(objectMap, "modifiedOn", v.ModifiedOn) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "provisioningErrors", v.ProvisioningErrors) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceId", v.ResourceID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachine. -func (v *VirtualMachine) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "computeLocation": - err = unpopulate(val, "ComputeLocation", &v.ComputeLocation) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &v.ComputeType) - delete(rawMsg, key) - case "createdOn": - err = unpopulateTimeRFC3339(val, "CreatedOn", &v.CreatedOn) - delete(rawMsg, key) - case "description": - err = unpopulate(val, "Description", &v.Description) - delete(rawMsg, key) - case "disableLocalAuth": - err = unpopulate(val, "DisableLocalAuth", &v.DisableLocalAuth) - delete(rawMsg, key) - case "isAttachedCompute": - err = unpopulate(val, "IsAttachedCompute", &v.IsAttachedCompute) - delete(rawMsg, key) - case "modifiedOn": - err = unpopulateTimeRFC3339(val, "ModifiedOn", &v.ModifiedOn) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &v.Properties) - delete(rawMsg, key) - case "provisioningErrors": - err = unpopulate(val, "ProvisioningErrors", &v.ProvisioningErrors) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &v.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &v.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineSecrets. -func (v *VirtualMachineSecrets) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "administratorAccount": - err = unpopulate(val, "AdministratorAccount", &v.AdministratorAccount) - delete(rawMsg, key) - case "computeType": - err = unpopulate(val, "ComputeType", &v.ComputeType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Workspace. -func (w Workspace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", w.ID) - populate(objectMap, "identity", w.Identity) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "sku", w.SKU) - populate(objectMap, "systemData", w.SystemData) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPropertiesV2BasicResource. -func (w WorkspaceConnectionPropertiesV2BasicResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", w.ID) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "systemData", w.SystemData) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionPropertiesV2BasicResource. -func (w *WorkspaceConnectionPropertiesV2BasicResource) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &w.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &w.Name) - delete(rawMsg, key) - case "properties": - w.Properties, err = unmarshalWorkspaceConnectionPropertiesV2Classification(val) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &w.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &w.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", w, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. -func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowPublicAccessWhenBehindVnet", w.AllowPublicAccessWhenBehindVnet) - populate(objectMap, "applicationInsights", w.ApplicationInsights) - populate(objectMap, "containerRegistry", w.ContainerRegistry) - populate(objectMap, "description", w.Description) - populate(objectMap, "discoveryUrl", w.DiscoveryURL) - populate(objectMap, "encryption", w.Encryption) - populate(objectMap, "friendlyName", w.FriendlyName) - populate(objectMap, "hbiWorkspace", w.HbiWorkspace) - populate(objectMap, "imageBuildCompute", w.ImageBuildCompute) - populate(objectMap, "keyVault", w.KeyVault) - populate(objectMap, "mlFlowTrackingUri", w.MlFlowTrackingURI) - populate(objectMap, "notebookInfo", w.NotebookInfo) - populate(objectMap, "primaryUserAssignedIdentity", w.PrimaryUserAssignedIdentity) - populate(objectMap, "privateEndpointConnections", w.PrivateEndpointConnections) - populate(objectMap, "privateLinkCount", w.PrivateLinkCount) - populate(objectMap, "provisioningState", w.ProvisioningState) - populate(objectMap, "publicNetworkAccess", w.PublicNetworkAccess) - populate(objectMap, "serviceManagedResourcesSettings", w.ServiceManagedResourcesSettings) - populate(objectMap, "serviceProvisionedResourceGroup", w.ServiceProvisionedResourceGroup) - populate(objectMap, "sharedPrivateLinkResources", w.SharedPrivateLinkResources) - populate(objectMap, "storageAccount", w.StorageAccount) - populate(objectMap, "storageHnsEnabled", w.StorageHnsEnabled) - populate(objectMap, "tenantId", w.TenantID) - populate(objectMap, "v1LegacyMode", w.V1LegacyMode) - populate(objectMap, "workspaceId", w.WorkspaceID) - return json.Marshal(objectMap) -} - -// MarshalJSON implements the json.Marshaller interface for type WorkspaceUpdateParameters. -func (w WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "identity", w.Identity) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "sku", w.SKU) - populate(objectMap, "tags", w.Tags) - return json.Marshal(objectMap) -} - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, fn string, v interface{}) error { - if data == nil { - return nil - } - if err := json.Unmarshal(data, v); err != nil { - return fmt.Errorf("struct field %s: %v", fn, err) - } - return nil -}