From 3748ed7aa5745911ded75b06e26e6ca8c912ab33 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 2 Aug 2022 02:51:25 +0000 Subject: [PATCH] CodeGen from PR 19842 in Azure/azure-rest-api-specs Merge 39ebcde4bca26dc856705e6b892c7a7f0d22aea8 into d1b0569d8adbd342a1111d6a69764d099f5f717c --- .../armmachinelearning/CHANGELOG.md | 740 + .../armmachinelearning/autorest.md | 6 +- ...s_client.go => batchdeployments_client.go} | 27 +- ...nts_client.go => batchendpoints_client.go} | 31 +- ...ers_client.go => codecontainers_client.go} | 17 +- ...sions_client.go => codeversions_client.go} | 17 +- ...lient.go => componentcontainers_client.go} | 17 +- ..._client.go => componentversions_client.go} | 17 +- ...ed_compute_client.go => compute_client.go} | 161 +- .../armmachinelearning/constants.go | 2829 +++ ...ers_client.go => datacontainers_client.go} | 17 +- ...astores_client.go => datastores_client.go} | 21 +- ...sions_client.go => dataversions_client.go} | 17 +- ...ent.go => environmentcontainers_client.go} | 17 +- ...lient.go => environmentversions_client.go} | 17 +- .../machinelearning/armmachinelearning/go.mod | 14 +- .../machinelearning/armmachinelearning/go.sum | 24 +- ...enerated_jobs_client.go => jobs_client.go} | 32 +- .../armmachinelearning/labelingjobs_client.go | 513 + ...rs_client.go => modelcontainers_client.go} | 17 +- .../{zz_generated_models.go => models.go} | 3781 +++- .../armmachinelearning/models_serde.go | 17595 ++++++++++++++++ ...ions_client.go => modelversions_client.go} | 17 +- ..._client.go => onlinedeployments_client.go} | 35 +- ...ts_client.go => onlineendpoints_client.go} | 41 +- ...rations_client.go => operations_client.go} | 5 +- ...phic_helpers.go => polymorphic_helpers.go} | 273 + ...o => privateendpointconnections_client.go} | 17 +- ...ient.go => privatelinkresources_client.go} | 5 +- ...ated_quotas_client.go => quotas_client.go} | 9 +- ...ed_response_types.go => response_types.go} | 76 + .../armmachinelearning/schedules_client.go | 325 + ...erated_time_rfc3339.go => time_rfc3339.go} | 1 + ...ated_usages_client.go => usages_client.go} | 5 +- ...lient.go => virtualmachinesizes_client.go} | 5 +- ...ient.go => workspaceconnections_client.go} | 17 +- ..._client.go => workspacefeatures_client.go} | 5 +- ...kspaces_client.go => workspaces_client.go} | 69 +- ...ed_example_batchdeployments_client_test.go | 216 - ...ated_example_batchendpoints_client_test.go | 208 - ...ated_example_codecontainers_client_test.go | 120 - ...erated_example_codeversions_client_test.go | 131 - ...example_componentcontainers_client_test.go | 124 - ...d_example_componentversions_client_test.go | 134 - ...e_generated_example_compute_client_test.go | 311 - ...ated_example_datacontainers_client_test.go | 127 - ...enerated_example_datastores_client_test.go | 163 - ...erated_example_dataversions_client_test.go | 134 - ...ample_environmentcontainers_client_test.go | 128 - ...example_environmentversions_client_test.go | 151 - .../ze_generated_example_jobs_client_test.go | 211 - ...ted_example_modelcontainers_client_test.go | 123 - ...rated_example_modelversions_client_test.go | 146 - ...d_example_onlinedeployments_client_test.go | 256 - ...ted_example_onlineendpoints_client_test.go | 266 - ...enerated_example_operations_client_test.go | 41 - ..._privateendpointconnections_client_test.go | 119 - ...xample_privatelinkresources_client_test.go | 39 - ...ze_generated_example_quotas_client_test.go | 79 - ...ze_generated_example_usages_client_test.go | 42 - ...example_virtualmachinesizes_client_test.go | 38 - ...xample_workspaceconnections_client_test.go | 120 - ...d_example_workspacefeatures_client_test.go | 43 - ...enerated_example_workspaces_client_test.go | 410 - .../zz_generated_constants.go | 1576 -- .../zz_generated_models_serde.go | 4862 ----- 66 files changed, 26262 insertions(+), 10888 deletions(-) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_batchdeployments_client.go => batchdeployments_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_batchendpoints_client.go => batchendpoints_client.go} (96%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_codecontainers_client.go => codecontainers_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_codeversions_client.go => codeversions_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_componentcontainers_client.go => componentcontainers_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_componentversions_client.go => componentversions_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_compute_client.go => compute_client.go} (82%) create mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/constants.go rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_datacontainers_client.go => datacontainers_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_datastores_client.go => datastores_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_dataversions_client.go => dataversions_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_environmentcontainers_client.go => environmentcontainers_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_environmentversions_client.go => environmentversions_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_jobs_client.go => jobs_client.go} (95%) create mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/labelingjobs_client.go rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_modelcontainers_client.go => modelcontainers_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_models.go => models.go} (63%) create mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_modelversions_client.go => modelversions_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_onlinedeployments_client.go => onlinedeployments_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_onlineendpoints_client.go => onlineendpoints_client.go} (96%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_operations_client.go => operations_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_polymorphic_helpers.go => polymorphic_helpers.go} (63%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_privateendpointconnections_client.go => privateendpointconnections_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_privatelinkresources_client.go => privatelinkresources_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_quotas_client.go => quotas_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_response_types.go => response_types.go} (89%) create mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_time_rfc3339.go => time_rfc3339.go} (99%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_usages_client.go => usages_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_virtualmachinesizes_client.go => virtualmachinesizes_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_workspaceconnections_client.go => workspaceconnections_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_workspacefeatures_client.go => workspacefeatures_client.go} (97%) rename sdk/resourcemanager/machinelearning/armmachinelearning/{zz_generated_workspaces_client.go => workspaces_client.go} (96%) delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchdeployments_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_batchendpoints_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codecontainers_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_codeversions_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentcontainers_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_componentversions_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_compute_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datacontainers_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_datastores_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_dataversions_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentcontainers_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_environmentversions_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_jobs_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelcontainers_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_modelversions_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlinedeployments_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_onlineendpoints_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_operations_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privateendpointconnections_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_privatelinkresources_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_quotas_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_usages_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_virtualmachinesizes_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaceconnections_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspacefeatures_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/ze_generated_example_workspaces_client_test.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_constants.go delete mode 100644 sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models_serde.go diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md index 4a1d0e506066..f993e60d3b0a 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md @@ -1,5 +1,745 @@ # Release History +## 2.0.0-beta.2 (2022-08-02) +### Breaking Changes + +- Function `*BatchDeploymentsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, BatchDeploymentData, *BatchDeploymentsClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, BatchDeployment, *BatchDeploymentsClientBeginCreateOrUpdateOptions)` +- Function `*OnlineDeploymentsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, PartialOnlineDeploymentPartialTrackedResource, *OnlineDeploymentsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, PartialMinimalTrackedResourceWithSKU, *OnlineDeploymentsClientBeginUpdateOptions)` +- Function `*WorkspaceConnectionsClient.Create` parameter(s) have been changed from `(context.Context, string, string, string, WorkspaceConnection, *WorkspaceConnectionsClientCreateOptions)` to `(context.Context, string, string, string, WorkspaceConnectionPropertiesV2BasicResource, *WorkspaceConnectionsClientCreateOptions)` +- Function `*BatchEndpointsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, PartialBatchEndpointPartialTrackedResource, *BatchEndpointsClientBeginUpdateOptions)` to `(context.Context, string, string, string, PartialMinimalTrackedResourceWithIdentity, *BatchEndpointsClientBeginUpdateOptions)` +- Function `*BatchDeploymentsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, PartialBatchDeploymentPartialTrackedResource, *BatchDeploymentsClientBeginUpdateOptions)` to `(context.Context, string, string, string, string, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties, *BatchDeploymentsClientBeginUpdateOptions)` +- Function `*ModelVersionsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, ModelVersionData, *ModelVersionsClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, ModelVersion, *ModelVersionsClientCreateOrUpdateOptions)` +- Function `*ComponentVersionsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, ComponentVersionData, *ComponentVersionsClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, ComponentVersion, *ComponentVersionsClientCreateOrUpdateOptions)` +- Function `*EnvironmentContainersClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, EnvironmentContainerData, *EnvironmentContainersClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, EnvironmentContainer, *EnvironmentContainersClientCreateOrUpdateOptions)` +- Function `*ModelContainersClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, ModelContainerData, *ModelContainersClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, ModelContainer, *ModelContainersClientCreateOrUpdateOptions)` +- Function `*DataVersionsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, DataVersionBaseData, *DataVersionsClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, DataVersionBase, *DataVersionsClientCreateOrUpdateOptions)` +- Function `*OnlineEndpointsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, OnlineEndpointData, *OnlineEndpointsClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, OnlineEndpoint, *OnlineEndpointsClientBeginCreateOrUpdateOptions)` +- Function `*EnvironmentVersionsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, EnvironmentVersionData, *EnvironmentVersionsClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, EnvironmentVersion, *EnvironmentVersionsClientCreateOrUpdateOptions)` +- Function `*ComponentContainersClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, ComponentContainerData, *ComponentContainersClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, ComponentContainer, *ComponentContainersClientCreateOrUpdateOptions)` +- Function `*CodeContainersClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, CodeContainerData, *CodeContainersClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, CodeContainer, *CodeContainersClientCreateOrUpdateOptions)` +- Function `*DatastoresClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, DatastoreData, *DatastoresClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, Datastore, *DatastoresClientCreateOrUpdateOptions)` +- Function `*CodeVersionsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, CodeVersionData, *CodeVersionsClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, CodeVersion, *CodeVersionsClientCreateOrUpdateOptions)` +- Function `*OnlineEndpointsClient.BeginUpdate` parameter(s) have been changed from `(context.Context, string, string, string, PartialOnlineEndpointPartialTrackedResource, *OnlineEndpointsClientBeginUpdateOptions)` to `(context.Context, string, string, string, PartialMinimalTrackedResourceWithIdentity, *OnlineEndpointsClientBeginUpdateOptions)` +- Function `*DataContainersClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, DataContainerData, *DataContainersClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, DataContainer, *DataContainersClientCreateOrUpdateOptions)` +- Function `*BatchEndpointsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, BatchEndpointData, *BatchEndpointsClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, BatchEndpoint, *BatchEndpointsClientBeginCreateOrUpdateOptions)` +- Function `*JobsClient.CreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, JobBaseData, *JobsClientCreateOrUpdateOptions)` to `(context.Context, string, string, string, JobBase, *JobsClientCreateOrUpdateOptions)` +- Function `*OnlineDeploymentsClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, string, string, string, OnlineDeploymentData, *OnlineDeploymentsClientBeginCreateOrUpdateOptions)` to `(context.Context, string, string, string, string, OnlineDeployment, *OnlineDeploymentsClientBeginCreateOrUpdateOptions)` +- Type of `DatastoreResourceArmPaginatedResult.Value` has been changed from `[]*DatastoreData` to `[]*Datastore` +- Type of `CodeContainerResourceArmPaginatedResult.Value` has been changed from `[]*CodeContainerData` to `[]*CodeContainer` +- Type of `HDInsight.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `ComponentVersionResourceArmPaginatedResult.Value` has been changed from `[]*ComponentVersionData` to `[]*ComponentVersion` +- Type of `SynapseSpark.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `TableVerticalFeaturizationSettings.BlockedTransformers` has been changed from `[]*string` to `[]*BlockedTransformers` +- Type of `VirtualMachine.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `SSLConfiguration.Status` has been changed from `*SSLConfigurationStatus` to `*SSLConfigStatus` +- Type of `ComputeStartStopSchedule.Schedule` has been changed from `ScheduleBaseClassification` to `*ScheduleBase` +- Type of `ComponentContainerResourceArmPaginatedResult.Value` has been changed from `[]*ComponentContainerData` to `[]*ComponentContainer` +- Type of `DataFactory.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `BatchDeploymentTrackedResourceArmPaginatedResult.Value` has been changed from `[]*BatchDeploymentData` to `[]*BatchDeployment` +- Type of `CodeVersionResourceArmPaginatedResult.Value` has been changed from `[]*CodeVersionData` to `[]*CodeVersion` +- Type of `BatchEndpointTrackedResourceArmPaginatedResult.Value` has been changed from `[]*BatchEndpointData` to `[]*BatchEndpoint` +- Type of `EnvironmentVersionResourceArmPaginatedResult.Value` has been changed from `[]*EnvironmentVersionData` to `[]*EnvironmentVersion` +- Type of `CommandJob.Resources` has been changed from `*ResourceConfiguration` to `*JobResourceConfiguration` +- Type of `Classification.TrainingSettings` has been changed from `*TrainingSettings` to `*ClassificationTrainingSettings` +- Type of `Compute.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `ComputeInstance.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `EnvironmentContainerResourceArmPaginatedResult.Value` has been changed from `[]*EnvironmentContainerData` to `[]*EnvironmentContainer` +- Type of `ModelVersionResourceArmPaginatedResult.Value` has been changed from `[]*ModelVersionData` to `[]*ModelVersion` +- Type of `DataContainerResourceArmPaginatedResult.Value` has been changed from `[]*DataContainerData` to `[]*DataContainer` +- Type of `AmlComputeProperties.PropertyBag` has been changed from `map[string]interface{}` to `interface{}` +- Type of `Kubernetes.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `Forecasting.TrainingSettings` has been changed from `*TrainingSettings` to `*ForecastingTrainingSettings` +- Type of `WorkspaceProperties.ProvisioningState` has been changed from `*ProvisioningState` to `*WorkspaceProvisioningState` +- Type of `DataLakeAnalytics.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `TrialComponent.Resources` has been changed from `*ResourceConfiguration` to `*JobResourceConfiguration` +- Type of `Databricks.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `ModelContainerResourceArmPaginatedResult.Value` has been changed from `[]*ModelContainerData` to `[]*ModelContainer` +- Type of `DataVersionBaseResourceArmPaginatedResult.Value` has been changed from `[]*DataVersionBaseData` to `[]*DataVersionBase` +- Type of `JobBaseResourceArmPaginatedResult.Value` has been changed from `[]*JobBaseData` to `[]*JobBase` +- Type of `OnlineDeploymentTrackedResourceArmPaginatedResult.Value` has been changed from `[]*OnlineDeploymentData` to `[]*OnlineDeployment` +- Type of `OnlineEndpointTrackedResourceArmPaginatedResult.Value` has been changed from `[]*OnlineEndpointData` to `[]*OnlineEndpoint` +- Type of `AutoMLJob.Resources` has been changed from `*ResourceConfiguration` to `*JobResourceConfiguration` +- Type of `AKS.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `AmlCompute.ProvisioningState` has been changed from `*ProvisioningState` to `*ComputeProvisioningState` +- Type of `Regression.TrainingSettings` has been changed from `*TrainingSettings` to `*RegressionTrainingSettings` +- Const `ModelTypeCustomModel` has been removed +- Const `ModelTypeTritonModel` has been removed +- Const `JobOutputTypeMLFlowModel` has been removed +- Const `WeekdayThursday` has been removed +- Const `WeekdaySaturday` has been removed +- Const `JobOutputTypeMLTable` has been removed +- Const `ProvisioningStateUpdating` has been removed +- Const `ProvisioningStateFailed` has been removed +- Const `ModelTypeMLFlowModel` has been removed +- Const `WeekdayFriday` has been removed +- Const `SSLConfigurationStatusEnabled` has been removed +- Const `WeekdayWednesday` has been removed +- Const `ProvisioningStateDeleting` has been removed +- Const `WeekdayTuesday` has been removed +- Const `ScheduleTypeRecurrence` has been removed +- Const `ProvisioningStateSucceeded` has been removed +- Const `JobInputTypeMLTable` has been removed +- Const `ProvisioningStateUnknown` has been removed +- Const `WeekdaySunday` has been removed +- Const `WeekdayMonday` has been removed +- Const `SSLConfigurationStatusAuto` has been removed +- Const `ProvisioningStateCreating` has been removed +- Const `DataTypeMLTable` has been removed +- Const `ScheduleTypeCron` has been removed +- Const `JobInputTypeMLFlowModel` has been removed +- Const `SSLConfigurationStatusDisabled` has been removed +- Const `ProvisioningStateCanceled` has been removed +- Function `PossibleProvisioningStateValues` has been removed +- Function `*URIFileDataVersion.GetDataVersionBaseDetails` has been removed +- Function `*AzureFileDatastore.GetDatastoreDetails` has been removed +- Function `*URIFolderDataVersion.GetDataVersionBaseDetails` has been removed +- Function `*PartialAssetReferenceBase.GetPartialAssetReferenceBase` has been removed +- Function `*PartialOnlineDeployment.GetPartialOnlineDeployment` has been removed +- Function `*AzureDataLakeGen2Datastore.GetDatastoreDetails` has been removed +- Function `PossibleWeekdayValues` has been removed +- Function `*DatastoreDetails.GetDatastoreDetails` has been removed +- Function `*HdfsDatastore.GetDatastoreDetails` has been removed +- Function `*PartialIDAssetReference.GetPartialAssetReferenceBase` has been removed +- Function `*KubernetesOnlineDeployment.GetOnlineDeploymentDetails` has been removed +- Function `*PartialKubernetesOnlineDeployment.GetPartialOnlineDeployment` has been removed +- Function `*ScheduleBase.GetScheduleBase` has been removed +- Function `*SweepJob.GetJobBaseDetails` has been removed +- Function `*MLTableData.GetDataVersionBaseDetails` has been removed +- Function `*AzureDataLakeGen1Datastore.GetDatastoreDetails` has been removed +- Function `*PartialDataPathAssetReference.GetPartialAssetReferenceBase` has been removed +- Function `PossibleSSLConfigurationStatusValues` has been removed +- Function `*JobsClient.Cancel` has been removed +- Function `*RecurrenceSchedule.GetScheduleBase` has been removed +- Function `*PartialManagedOnlineDeployment.GetPartialOnlineDeployment` has been removed +- Function `*JobBaseDetails.GetJobBaseDetails` has been removed +- Function `PossibleScheduleTypeValues` has been removed +- Function `*PartialOutputPathAssetReference.GetPartialAssetReferenceBase` has been removed +- Function `*CommandJob.GetJobBaseDetails` has been removed +- Function `*PipelineJob.GetJobBaseDetails` has been removed +- Function `*CronSchedule.GetScheduleBase` has been removed +- Function `*ManagedOnlineDeployment.GetOnlineDeploymentDetails` has been removed +- Function `*DataVersionBaseDetails.GetDataVersionBaseDetails` has been removed +- Function `*AzureBlobDatastore.GetDatastoreDetails` has been removed +- Function `PossibleModelTypeValues` has been removed +- Function `*OnlineDeploymentDetails.GetOnlineDeploymentDetails` has been removed +- Function `*AutoMLJob.GetJobBaseDetails` has been removed +- Struct `BatchDeploymentData` has been removed +- Struct `BatchDeploymentDetails` has been removed +- Struct `BatchEndpointData` has been removed +- Struct `BatchEndpointDetails` has been removed +- Struct `CodeContainerData` has been removed +- Struct `CodeContainerDetails` has been removed +- Struct `CodeVersionData` has been removed +- Struct `CodeVersionDetails` has been removed +- Struct `ComponentContainerData` has been removed +- Struct `ComponentContainerDetails` has been removed +- Struct `ComponentVersionData` has been removed +- Struct `ComponentVersionDetails` has been removed +- Struct `CronSchedule` has been removed +- Struct `DataContainerData` has been removed +- Struct `DataContainerDetails` has been removed +- Struct `DataSettings` has been removed +- Struct `DataVersionBaseData` has been removed +- Struct `DataVersionBaseDetails` has been removed +- Struct `DatastoreData` has been removed +- Struct `DatastoreDetails` has been removed +- Struct `EnvironmentContainerData` has been removed +- Struct `EnvironmentContainerDetails` has been removed +- Struct `EnvironmentVersionData` has been removed +- Struct `EnvironmentVersionDetails` has been removed +- Struct `ImageVerticalDataSettings` has been removed +- Struct `ImageVerticalValidationDataSettings` has been removed +- Struct `JobBaseData` has been removed +- Struct `JobBaseDetails` has been removed +- Struct `JobsClientCancelOptions` has been removed +- Struct `ModelContainerData` has been removed +- Struct `ModelContainerDetails` has been removed +- Struct `ModelVersionData` has been removed +- Struct `ModelVersionDetails` has been removed +- Struct `NlpVerticalDataSettings` has been removed +- Struct `NlpVerticalValidationDataSettings` has been removed +- Struct `OnlineDeploymentData` has been removed +- Struct `OnlineDeploymentDetails` has been removed +- Struct `OnlineEndpointData` has been removed +- Struct `OnlineEndpointDetails` has been removed +- Struct `PaginatedWorkspaceConnectionsList` has been removed +- Struct `PartialAssetReferenceBase` has been removed +- Struct `PartialBatchDeploymentPartialTrackedResource` has been removed +- Struct `PartialBatchEndpoint` has been removed +- Struct `PartialBatchEndpointPartialTrackedResource` has been removed +- Struct `PartialBatchRetrySettings` has been removed +- Struct `PartialCodeConfiguration` has been removed +- Struct `PartialDataPathAssetReference` has been removed +- Struct `PartialIDAssetReference` has been removed +- Struct `PartialKubernetesOnlineDeployment` has been removed +- Struct `PartialManagedOnlineDeployment` has been removed +- Struct `PartialOnlineDeployment` has been removed +- Struct `PartialOnlineDeploymentPartialTrackedResource` has been removed +- Struct `PartialOnlineEndpoint` has been removed +- Struct `PartialOnlineEndpointPartialTrackedResource` has been removed +- Struct `PartialOutputPathAssetReference` has been removed +- Struct `RecurrencePattern` has been removed +- Struct `TableVerticalDataSettings` has been removed +- Struct `TableVerticalValidationDataSettings` has been removed +- Struct `TestDataSettings` has been removed +- Struct `TrainingDataSettings` has been removed +- Struct `ValidationDataSettings` has been removed +- Struct `WorkspaceConnection` has been removed +- Struct `WorkspaceConnectionProps` has been removed +- Field `CodeContainerData` of struct `CodeContainersClientGetResponse` has been removed +- Field `Schedule` of struct `AutoMLJob` has been removed +- Field `OnlineEndpointData` of struct `OnlineEndpointsClientGetResponse` has been removed +- Field `Schedule` of struct `CommandJob` has been removed +- Field `BatchEndpointData` of struct `BatchEndpointsClientGetResponse` has been removed +- Field `DataSettings` of struct `ImageObjectDetection` has been removed +- Field `ComponentVersionData` of struct `ComponentVersionsClientGetResponse` has been removed +- Field `OnlineEndpointData` of struct `OnlineEndpointsClientUpdateResponse` has been removed +- Field `ComponentContainerData` of struct `ComponentContainersClientGetResponse` has been removed +- Field `DataSettings` of struct `TextClassification` has been removed +- Field `ModelVersionData` of struct `ModelVersionsClientGetResponse` has been removed +- Field `Schedule` of struct `PipelineJob` has been removed +- Field `DataVersionBaseData` of struct `DataVersionsClientGetResponse` has been removed +- Field `EndTime` of struct `ScheduleBase` has been removed +- Field `ScheduleStatus` of struct `ScheduleBase` has been removed +- Field `StartTime` of struct `ScheduleBase` has been removed +- Field `TimeZone` of struct `ScheduleBase` has been removed +- Field `ScheduleType` of struct `ScheduleBase` has been removed +- Field `WorkspaceConnection` of struct `WorkspaceConnectionsClientCreateResponse` has been removed +- Field `BatchDeploymentData` of struct `BatchDeploymentsClientGetResponse` has been removed +- Field `OnlineDeploymentData` of struct `OnlineDeploymentsClientUpdateResponse` has been removed +- Field `EnvironmentContainerData` of struct `EnvironmentContainersClientGetResponse` has been removed +- Field `DropColumns` of struct `TableVerticalFeaturizationSettings` has been removed +- Field `DataSettings` of struct `ImageInstanceSegmentation` has been removed +- Field `DataSettings` of struct `TextNer` has been removed +- Field `EnvironmentContainerData` of struct `EnvironmentContainersClientCreateOrUpdateResponse` has been removed +- Field `AllowedModels` of struct `Forecasting` has been removed +- Field `BlockedModels` of struct `Forecasting` has been removed +- Field `DataSettings` of struct `Forecasting` has been removed +- Field `JobBaseData` of struct `JobsClientGetResponse` has been removed +- Field `DataSettings` of struct `TableVertical` has been removed +- Field `TrainingSettings` of struct `TableVertical` has been removed +- Field `Schedule` of struct `SweepJob` has been removed +- Field `ModelVersionData` of struct `ModelVersionsClientCreateOrUpdateResponse` has been removed +- Field `PrivateNetworkConnection` of struct `ManagedOnlineDeployment` has been removed +- Field `BlockedModels` of struct `Classification` has been removed +- Field `AllowedModels` of struct `Classification` has been removed +- Field `DataSettings` of struct `Classification` has been removed +- Field `BatchEndpointData` of struct `BatchEndpointsClientCreateOrUpdateResponse` has been removed +- Field `BatchDeploymentData` of struct `BatchDeploymentsClientCreateOrUpdateResponse` has been removed +- Field `DataSettings` of struct `TextClassificationMultilabel` has been removed +- Field `DataSettings` of struct `ImageClassificationBase` has been removed +- Field `DataContainerData` of struct `DataContainersClientGetResponse` has been removed +- Field `DatastoreData` of struct `DatastoresClientGetResponse` has been removed +- Field `SplitRatio` of struct `ImageModelDistributionSettingsClassification` has been removed +- Field `DataVersionBaseData` of struct `DataVersionsClientCreateOrUpdateResponse` has been removed +- Field `PrivateNetworkConnection` of struct `KubernetesOnlineDeployment` has been removed +- Field `SplitRatio` of struct `ImageModelDistributionSettings` has been removed +- Field `CodeVersionData` of struct `CodeVersionsClientCreateOrUpdateResponse` has been removed +- Field `BatchEndpointData` of struct `BatchEndpointsClientUpdateResponse` has been removed +- Field `DataSettings` of struct `NlpVertical` has been removed +- Field `CheckpointDatasetID` of struct `ImageModelSettings` has been removed +- Field `SplitRatio` of struct `ImageModelSettings` has been removed +- Field `CheckpointFilename` of struct `ImageModelSettings` has been removed +- Field `Interval` of struct `RecurrenceSchedule` has been removed +- Field `ScheduleType` of struct `RecurrenceSchedule` has been removed +- Field `EndTime` of struct `RecurrenceSchedule` has been removed +- Field `Pattern` of struct `RecurrenceSchedule` has been removed +- Field `ScheduleStatus` of struct `RecurrenceSchedule` has been removed +- Field `StartTime` of struct `RecurrenceSchedule` has been removed +- Field `TimeZone` of struct `RecurrenceSchedule` has been removed +- Field `Frequency` of struct `RecurrenceSchedule` has been removed +- Field `DataSettings` of struct `ImageClassification` has been removed +- Field `BatchDeploymentData` of struct `BatchDeploymentsClientUpdateResponse` has been removed +- Field `ComponentContainerData` of struct `ComponentContainersClientCreateOrUpdateResponse` has been removed +- Field `DataSettings` of struct `ImageClassificationMultilabel` has been removed +- Field `JobBaseData` of struct `JobsClientCreateOrUpdateResponse` has been removed +- Field `PaginatedWorkspaceConnectionsList` of struct `WorkspaceConnectionsClientListResponse` has been removed +- Field `EnvironmentVersionData` of struct `EnvironmentVersionsClientGetResponse` has been removed +- Field `WorkspaceConnection` of struct `WorkspaceConnectionsClientGetResponse` has been removed +- Field `CheckpointFilename` of struct `ImageModelSettingsClassification` has been removed +- Field `CheckpointDatasetID` of struct `ImageModelSettingsClassification` has been removed +- Field `SplitRatio` of struct `ImageModelSettingsClassification` has been removed +- Field `ModelContainerData` of struct `ModelContainersClientCreateOrUpdateResponse` has been removed +- Field `SplitRatio` of struct `ImageModelSettingsObjectDetection` has been removed +- Field `CheckpointFilename` of struct `ImageModelSettingsObjectDetection` has been removed +- Field `CheckpointDatasetID` of struct `ImageModelSettingsObjectDetection` has been removed +- Field `EnvironmentVersionData` of struct `EnvironmentVersionsClientCreateOrUpdateResponse` has been removed +- Field `DataSettings` of struct `ImageObjectDetectionBase` has been removed +- Field `DataSettings` of struct `ImageVertical` has been removed +- Field `OutputFileName` of struct `PartialBatchDeployment` has been removed +- Field `LoggingLevel` of struct `PartialBatchDeployment` has been removed +- Field `Compute` of struct `PartialBatchDeployment` has been removed +- Field `ErrorThreshold` of struct `PartialBatchDeployment` has been removed +- Field `EnvironmentID` of struct `PartialBatchDeployment` has been removed +- Field `CodeConfiguration` of struct `PartialBatchDeployment` has been removed +- Field `EnvironmentVariables` of struct `PartialBatchDeployment` has been removed +- Field `Model` of struct `PartialBatchDeployment` has been removed +- Field `RetrySettings` of struct `PartialBatchDeployment` has been removed +- Field `OutputAction` of struct `PartialBatchDeployment` has been removed +- Field `MaxConcurrencyPerInstance` of struct `PartialBatchDeployment` has been removed +- Field `MiniBatchSize` of struct `PartialBatchDeployment` has been removed +- Field `Properties` of struct `PartialBatchDeployment` has been removed +- Field `CodeVersionData` of struct `CodeVersionsClientGetResponse` has been removed +- Field `OnlineEndpointData` of struct `OnlineEndpointsClientCreateOrUpdateResponse` has been removed +- Field `SplitRatio` of struct `ImageModelDistributionSettingsObjectDetection` has been removed +- Field `ComponentVersionData` of struct `ComponentVersionsClientCreateOrUpdateResponse` has been removed +- Field `OnlineDeploymentData` of struct `OnlineDeploymentsClientCreateOrUpdateResponse` has been removed +- Field `OnlineDeploymentData` of struct `OnlineDeploymentsClientGetResponse` has been removed +- Field `CodeContainerData` of struct `CodeContainersClientCreateOrUpdateResponse` has been removed +- Field `DatastoreData` of struct `DatastoresClientCreateOrUpdateResponse` has been removed +- Field `ModelContainerData` of struct `ModelContainersClientGetResponse` has been removed +- Field `AllowedModels` of struct `Regression` has been removed +- Field `BlockedModels` of struct `Regression` has been removed +- Field `DataSettings` of struct `Regression` has been removed +- Field `DataContainerData` of struct `DataContainersClientCreateOrUpdateResponse` has been removed + +### Features Added + +- New const `BlockedTransformersTfIdf` +- New const `MediaTypeImage` +- New const `ComputeProvisioningStateFailed` +- New const `WorkspaceProvisioningStateFailed` +- New const `ComputeProvisioningStateSucceeded` +- New const `JobTypeSpark` +- New const `ImageTypeAzureml` +- New const `ImageTypeDocker` +- New const `ExportFormatTypeCSV` +- New const `ScheduleProvisioningStateProvisioning` +- New const `VolumeDefinitionTypeVolume` +- New const `SparkJobEntryTypeSparkJobScalaEntry` +- New const `SSLConfigStatusDisabled` +- New const `JobOutputTypeMltable` +- New const `ConnectionAuthTypeSAS` +- New const `JobInputTypeMlflowModel` +- New const `ScheduleProvisioningStatusFailed` +- New const `ScheduleProvisioningStatusUpdating` +- New const `JobProvisioningStateSucceeded` +- New const `ConnectionAuthTypePAT` +- New const `ConnectionAuthTypeUsernamePassword` +- New const `ScheduleActionTypeInvokeBatchEndpoint` +- New const `BlockedTransformersCountVectorizer` +- New const `ProtocolUDP` +- New const `DataTypeMltable` +- New const `WorkspaceProvisioningStateDeleting` +- New const `ConnectionAuthTypeManagedIdentity` +- New const `TriggerTypeCron` +- New const `WeekDayMonday` +- New const `StatusMessageLevelError` +- New const `ScheduleProvisioningStatusDeleting` +- New const `TextAnnotationTypeClassification` +- New const `BlockedTransformersTextTargetEncoder` +- New const `JobOutputTypeMlflowModel` +- New const `ImageAnnotationTypeClassification` +- New const `BlockedTransformersHashOneHotEncoder` +- New const `WorkspaceProvisioningStateCreating` +- New const `ConnectionCategoryGit` +- New const `ComputeProvisioningStateUpdating` +- New const `ProtocolHTTP` +- New const `ComputeProvisioningStateCreating` +- New const `TextAnnotationTypeNamedEntityRecognition` +- New const `BlockedTransformersCatTargetEncoder` +- New const `WorkspaceProvisioningStateUnknown` +- New const `ScheduleProvisioningStatusSucceeded` +- New const `ComputeProvisioningStateCanceled` +- New const `WorkspaceProvisioningStateUpdating` +- New const `ImageAnnotationTypeBoundingBox` +- New const `WeekDayFriday` +- New const `WorkspaceProvisioningStateCanceled` +- New const `MLAssistConfigurationTypeDisabled` +- New const `ProtocolTCP` +- New const `VolumeDefinitionTypeNpipe` +- New const `JobProvisioningStateCanceled` +- New const `BlockedTransformersWordEmbedding` +- New const `ConnectionCategoryContainerRegistry` +- New const `WeekDayTuesday` +- New const `StatusMessageLevelWarning` +- New const `ScheduleActionTypeCreateJob` +- New const `JobInputTypeMltable` +- New const `ScheduleProvisioningStatusCanceled` +- New const `ScheduleProvisioningStatusCreating` +- New const `BlockedTransformersOneHotEncoder` +- New const `VolumeDefinitionTypeBind` +- New const `MediaTypeText` +- New const `ScheduleProvisioningStateCompleted` +- New const `StatusMessageLevelInformation` +- New const `ComputeProvisioningStateDeleting` +- New const `SparkJobEntryTypeSparkJobPythonEntry` +- New const `BlockedTransformersNaiveBayes` +- New const `WeekDayWednesday` +- New const `ComputeProvisioningStateUnknown` +- New const `MLAssistConfigurationTypeEnabled` +- New const `EnvironmentVariableTypeLocal` +- New const `SSLConfigStatusEnabled` +- New const `WorkspaceProvisioningStateSoftDeleted` +- New const `ExportFormatTypeCoco` +- New const `VolumeDefinitionTypeTmpfs` +- New const `BlockedTransformersLabelEncoder` +- New const `ConnectionCategoryPythonFeed` +- New const `TriggerTypeRecurrence` +- New const `JobProvisioningStateFailed` +- New const `WorkspaceProvisioningStateSucceeded` +- New const `JobTypeLabeling` +- New const `ExportFormatTypeDataset` +- New const `ConnectionAuthTypeNone` +- New const `OutputDeliveryModeDirect` +- New const `ImageAnnotationTypeInstanceSegmentation` +- New const `JobProvisioningStateInProgress` +- New const `SSLConfigStatusAuto` +- New const `BlockedTransformersWoETargetEncoder` +- New const `WeekDaySunday` +- New const `WeekDaySaturday` +- New const `WeekDayThursday` +- New const `ScheduleProvisioningStateFailed` +- New function `*JobScheduleAction.GetScheduleActionBase() *ScheduleActionBase` +- New function `*KubernetesOnlineDeployment.GetOnlineDeploymentProperties() *OnlineDeploymentProperties` +- New function `*ComputeClient.UpdateIdleShutdownSetting(context.Context, string, string, string, IdleShutdownSetting, *ComputeClientUpdateIdleShutdownSettingOptions) (ComputeClientUpdateIdleShutdownSettingResponse, error)` +- New function `PossibleVolumeDefinitionTypeValues() []VolumeDefinitionType` +- New function `*JobsClient.BeginCancel(context.Context, string, string, string, *JobsClientBeginCancelOptions) (*runtime.Poller[JobsClientCancelResponse], error)` +- New function `*CronTrigger.GetTriggerBase() *TriggerBase` +- New function `*SweepJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*RecurrenceTrigger.GetTriggerBase() *TriggerBase` +- New function `*MLTableData.GetDataVersionBaseProperties() *DataVersionBaseProperties` +- New function `*MLAssistConfiguration.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `*UsernamePasswordAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*NoneAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*LabelingJobImageProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `PossibleSSLConfigStatusValues() []SSLConfigStatus` +- New function `PossibleScheduleActionTypeValues() []ScheduleActionType` +- New function `NewLabelingJobsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*LabelingJobsClient, error)` +- New function `*URIFolderDataVersion.GetDataVersionBaseProperties() *DataVersionBaseProperties` +- New function `*SchedulesClient.BeginDelete(context.Context, string, string, string, *SchedulesClientBeginDeleteOptions) (*runtime.Poller[SchedulesClientDeleteResponse], error)` +- New function `*URIFileDataVersion.GetDataVersionBaseProperties() *DataVersionBaseProperties` +- New function `*AzureFileDatastore.GetDatastoreProperties() *DatastoreProperties` +- New function `*LabelingJobsClient.Delete(context.Context, string, string, string, *LabelingJobsClientDeleteOptions) (LabelingJobsClientDeleteResponse, error)` +- New function `*LabelingJobTextProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `*LabelingJobsClient.Pause(context.Context, string, string, string, *LabelingJobsClientPauseOptions) (LabelingJobsClientPauseResponse, error)` +- New function `PossibleConnectionCategoryValues() []ConnectionCategory` +- New function `*DatasetExportSummary.GetExportSummary() *ExportSummary` +- New function `*EndpointScheduleAction.GetScheduleActionBase() *ScheduleActionBase` +- New function `*LabelingJobsClient.Get(context.Context, string, string, string, *LabelingJobsClientGetOptions) (LabelingJobsClientGetResponse, error)` +- New function `*SparkJobPythonEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*SchedulesClient.Get(context.Context, string, string, string, *SchedulesClientGetOptions) (SchedulesClientGetResponse, error)` +- New function `*CSVExportSummary.GetExportSummary() *ExportSummary` +- New function `*DataVersionBaseProperties.GetDataVersionBaseProperties() *DataVersionBaseProperties` +- New function `PossibleProtocolValues() []Protocol` +- New function `*LabelingJobProperties.GetJobBaseProperties() *JobBaseProperties` +- New function `PossibleJobProvisioningStateValues() []JobProvisioningState` +- New function `*LabelingJobsClient.BeginExportLabels(context.Context, string, string, string, ExportSummaryClassification, *LabelingJobsClientBeginExportLabelsOptions) (*runtime.Poller[LabelingJobsClientExportLabelsResponse], error)` +- New function `PossibleEnvironmentVariableTypeValues() []EnvironmentVariableType` +- New function `PossibleStatusMessageLevelValues() []StatusMessageLevel` +- New function `PossibleScheduleProvisioningStatusValues() []ScheduleProvisioningStatus` +- New function `PossibleTriggerTypeValues() []TriggerType` +- New function `*TriggerBase.GetTriggerBase() *TriggerBase` +- New function `PossibleComputeProvisioningStateValues() []ComputeProvisioningState` +- New function `*LabelingJobsClient.BeginCreateOrUpdate(context.Context, string, string, string, LabelingJob, *LabelingJobsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LabelingJobsClientCreateOrUpdateResponse], error)` +- New function `PossibleScheduleProvisioningStateValues() []ScheduleProvisioningState` +- New function `*AutoMLJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*HdfsDatastore.GetDatastoreProperties() *DatastoreProperties` +- New function `*LabelingJobsClient.NewListPager(string, string, *LabelingJobsClientListOptions) *runtime.Pager[LabelingJobsClientListResponse]` +- New function `*AzureDataLakeGen2Datastore.GetDatastoreProperties() *DatastoreProperties` +- New function `*ManagedIdentityAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*SchedulesClient.NewListPager(string, string, *SchedulesClientListOptions) *runtime.Pager[SchedulesClientListResponse]` +- New function `*PATAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*CocoExportSummary.GetExportSummary() *ExportSummary` +- New function `*ComputeClient.UpdateCustomServices(context.Context, string, string, string, []*CustomService, *ComputeClientUpdateCustomServicesOptions) (ComputeClientUpdateCustomServicesResponse, error)` +- New function `*SchedulesClient.BeginCreateOrUpdate(context.Context, string, string, string, Schedule, *SchedulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[SchedulesClientCreateOrUpdateResponse], error)` +- New function `*ManagedOnlineDeployment.GetOnlineDeploymentProperties() *OnlineDeploymentProperties` +- New function `PossibleMediaTypeValues() []MediaType` +- New function `PossibleMLAssistConfigurationTypeValues() []MLAssistConfigurationType` +- New function `*SparkJobScalaEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `PossibleConnectionAuthTypeValues() []ConnectionAuthType` +- New function `PossibleBlockedTransformersValues() []BlockedTransformers` +- New function `PossibleTextAnnotationTypeValues() []TextAnnotationType` +- New function `PossibleExportFormatTypeValues() []ExportFormatType` +- New function `*WorkspaceConnectionPropertiesV2.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*AzureBlobDatastore.GetDatastoreProperties() *DatastoreProperties` +- New function `*SparkJobEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `PossibleSparkJobEntryTypeValues() []SparkJobEntryType` +- New function `PossibleImageAnnotationTypeValues() []ImageAnnotationType` +- New function `*DatastoreProperties.GetDatastoreProperties() *DatastoreProperties` +- New function `*SparkJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*CommandJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*OnlineDeploymentProperties.GetOnlineDeploymentProperties() *OnlineDeploymentProperties` +- New function `*LabelingJobMediaProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `PossibleImageTypeValues() []ImageType` +- New function `*LabelingJobsClient.BeginResume(context.Context, string, string, string, *LabelingJobsClientBeginResumeOptions) (*runtime.Poller[LabelingJobsClientResumeResponse], error)` +- New function `*MLAssistConfigurationEnabled.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `*ScheduleActionBase.GetScheduleActionBase() *ScheduleActionBase` +- New function `*PipelineJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*JobBaseProperties.GetJobBaseProperties() *JobBaseProperties` +- New function `*MLAssistConfigurationDisabled.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `*AzureDataLakeGen1Datastore.GetDatastoreProperties() *DatastoreProperties` +- New function `PossibleWeekDayValues() []WeekDay` +- New function `*SASAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `PossibleWorkspaceProvisioningStateValues() []WorkspaceProvisioningState` +- New function `*ExportSummary.GetExportSummary() *ExportSummary` +- New function `NewSchedulesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*SchedulesClient, error)` +- New struct `AzureDatastore` +- New struct `BatchDeployment` +- New struct `BatchDeploymentProperties` +- New struct `BatchEndpoint` +- New struct `BatchEndpointProperties` +- New struct `BindOptions` +- New struct `CSVExportSummary` +- New struct `ClassificationTrainingSettings` +- New struct `CocoExportSummary` +- New struct `CodeContainer` +- New struct `CodeContainerProperties` +- New struct `CodeVersion` +- New struct `CodeVersionProperties` +- New struct `ComponentContainer` +- New struct `ComponentContainerProperties` +- New struct `ComponentVersion` +- New struct `ComponentVersionProperties` +- New struct `ComputeClientUpdateCustomServicesOptions` +- New struct `ComputeClientUpdateCustomServicesResponse` +- New struct `ComputeClientUpdateIdleShutdownSettingOptions` +- New struct `ComputeClientUpdateIdleShutdownSettingResponse` +- New struct `CronTrigger` +- New struct `CustomService` +- New struct `DataContainer` +- New struct `DataContainerProperties` +- New struct `DataVersionBase` +- New struct `DataVersionBaseProperties` +- New struct `DatasetExportSummary` +- New struct `Datastore` +- New struct `DatastoreProperties` +- New struct `DeploymentResourceConfiguration` +- New struct `Docker` +- New struct `EncryptionKeyVaultUpdateProperties` +- New struct `EncryptionUpdateProperties` +- New struct `Endpoint` +- New struct `EndpointScheduleAction` +- New struct `EnvironmentContainer` +- New struct `EnvironmentContainerProperties` +- New struct `EnvironmentVariable` +- New struct `EnvironmentVersion` +- New struct `EnvironmentVersionProperties` +- New struct `ExportSummary` +- New struct `ForecastingTrainingSettings` +- New struct `IdleShutdownSetting` +- New struct `Image` +- New struct `JobBase` +- New struct `JobBaseProperties` +- New struct `JobResourceConfiguration` +- New struct `JobScheduleAction` +- New struct `JobsClientBeginCancelOptions` +- 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 `ManagedIdentityAuthTypeWorkspaceConnectionProperties` +- New struct `ModelContainer` +- New struct `ModelContainerProperties` +- New struct `ModelVersion` +- New struct `ModelVersionProperties` +- New struct `NoneAuthTypeWorkspaceConnectionProperties` +- New struct `OnlineDeployment` +- New struct `OnlineDeploymentProperties` +- New struct `OnlineEndpoint` +- New struct `OnlineEndpointProperties` +- New struct `PATAuthTypeWorkspaceConnectionProperties` +- New struct `PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties` +- New struct `PartialMinimalTrackedResource` +- New struct `PartialMinimalTrackedResourceWithIdentity` +- New struct `PartialMinimalTrackedResourceWithSKU` +- New struct `ProgressMetrics` +- New struct `RecurrenceTrigger` +- New struct `RegressionTrainingSettings` +- New struct `SASAuthTypeWorkspaceConnectionProperties` +- 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 `SparkJob` +- New struct `SparkJobEntry` +- New struct `SparkJobPythonEntry` +- New struct `SparkJobScalaEntry` +- New struct `SparkResourceConfiguration` +- New struct `StatusMessage` +- New struct `TmpfsOptions` +- New struct `TriggerBase` +- New struct `UsernamePasswordAuthTypeWorkspaceConnectionProperties` +- New struct `VolumeDefinition` +- New struct `VolumeOptions` +- New struct `WorkspaceConnectionManagedIdentity` +- New struct `WorkspaceConnectionPersonalAccessToken` +- New struct `WorkspaceConnectionPropertiesV2` +- New struct `WorkspaceConnectionPropertiesV2BasicResource` +- New struct `WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult` +- New struct `WorkspaceConnectionSharedAccessSignature` +- New struct `WorkspaceConnectionUsernamePassword` +- New field `ComponentID` in struct `SweepJob` +- New field `ValidationData` in struct `Classification` +- New field `ValidationDataSize` in struct `Classification` +- New field `TrainingData` in struct `Classification` +- New field `CvSplitColumnNames` in struct `Classification` +- New field `WeightColumnName` in struct `Classification` +- New field `TestData` in struct `Classification` +- New field `TestDataSize` in struct `Classification` +- New field `NCrossValidations` in struct `Classification` +- New field `TargetColumnName` in struct `Classification` +- New field `PositiveLabel` in struct `Classification` +- New field `ComponentID` in struct `AutoMLJob` +- New field `TargetColumnName` in struct `ImageClassificationMultilabel` +- New field `ValidationData` in struct `ImageClassificationMultilabel` +- New field `TrainingData` in struct `ImageClassificationMultilabel` +- New field `ValidationDataSize` in struct `ImageClassificationMultilabel` +- New anonymous field `CodeVersion` in struct `CodeVersionsClientGetResponse` +- New field `ValidationData` in struct `ImageObjectDetectionBase` +- New field `ValidationDataSize` in struct `ImageObjectDetectionBase` +- New field `ValidationData` in struct `ImageClassificationBase` +- New field `ValidationDataSize` in struct `ImageClassificationBase` +- New field `WeightColumnName` in struct `Regression` +- New field `TestData` in struct `Regression` +- New field `TestDataSize` in struct `Regression` +- New field `ValidationDataSize` in struct `Regression` +- New field `CvSplitColumnNames` in struct `Regression` +- New field `TrainingData` in struct `Regression` +- New field `TargetColumnName` in struct `Regression` +- New field `NCrossValidations` in struct `Regression` +- New field `ValidationData` in struct `Regression` +- New anonymous field `ComponentVersion` in struct `ComponentVersionsClientCreateOrUpdateResponse` +- New anonymous field `ComponentContainer` in struct `ComponentContainersClientGetResponse` +- New field `ResourceGroup` in struct `AzureFileDatastore` +- New field `SubscriptionID` in struct `AzureFileDatastore` +- New field `ValidationData` in struct `NlpVertical` +- New field `V1LegacyMode` in struct `WorkspaceProperties` +- New field `SoftDeletedAt` in struct `WorkspaceProperties` +- New field `ScheduledPurgeDate` in struct `WorkspaceProperties` +- New anonymous field `BatchEndpoint` in struct `BatchEndpointsClientGetResponse` +- New field `CheckpointModel` in struct `ImageModelSettingsClassification` +- New field `ValidationDataSize` in struct `ImageClassification` +- New field `TrainingData` in struct `ImageClassification` +- New field `TargetColumnName` in struct `ImageClassification` +- New field `ValidationData` in struct `ImageClassification` +- New field `SubscriptionID` in struct `AzureDataLakeGen2Datastore` +- New field `ResourceGroup` in struct `AzureDataLakeGen2Datastore` +- New anonymous field `EnvironmentVersion` in struct `EnvironmentVersionsClientGetResponse` +- New anonymous field `EnvironmentContainer` in struct `EnvironmentContainersClientCreateOrUpdateResponse` +- New anonymous field `OnlineDeployment` in struct `OnlineDeploymentsClientCreateOrUpdateResponse` +- New anonymous field `ComponentVersion` in struct `ComponentVersionsClientGetResponse` +- New anonymous field `CodeVersion` in struct `CodeVersionsClientCreateOrUpdateResponse` +- New anonymous field `ModelVersion` in struct `ModelVersionsClientCreateOrUpdateResponse` +- New anonymous field `OnlineDeployment` in struct `OnlineDeploymentsClientUpdateResponse` +- New field `ValidationData` in struct `TextClassification` +- New field `TrainingData` in struct `TextClassification` +- New field `TargetColumnName` in struct `TextClassification` +- New field `CvSplitColumnNames` in struct `TableVertical` +- New field `TestData` in struct `TableVertical` +- New field `NCrossValidations` in struct `TableVertical` +- New field `ValidationData` in struct `TableVertical` +- New field `TestDataSize` in struct `TableVertical` +- New field `ValidationDataSize` in struct `TableVertical` +- New field `WeightColumnName` in struct `TableVertical` +- New anonymous field `JobBase` in struct `JobsClientGetResponse` +- New anonymous field `ComponentContainer` in struct `ComponentContainersClientCreateOrUpdateResponse` +- New field `TargetColumnName` in struct `TextNer` +- New field `ValidationData` in struct `TextNer` +- New field `TrainingData` in struct `TextNer` +- New anonymous field `OnlineEndpoint` in struct `OnlineEndpointsClientGetResponse` +- New anonymous field `Datastore` in struct `DatastoresClientCreateOrUpdateResponse` +- New anonymous field `BatchDeployment` in struct `BatchDeploymentsClientUpdateResponse` +- New anonymous field `OnlineEndpoint` in struct `OnlineEndpointsClientUpdateResponse` +- New field `SourceJobID` in struct `PipelineJob` +- New field `ComponentID` in struct `PipelineJob` +- New field `Hours` in struct `RecurrenceSchedule` +- New field `Minutes` in struct `RecurrenceSchedule` +- New field `WeekDays` in struct `RecurrenceSchedule` +- New field `ResourceGroup` in struct `AzureDataLakeGen1Datastore` +- New field `SubscriptionID` in struct `AzureDataLakeGen1Datastore` +- New anonymous field `BatchEndpoint` in struct `BatchEndpointsClientUpdateResponse` +- New field `TrainingData` in struct `AutoMLVertical` +- New field `TargetColumnName` in struct `AutoMLVertical` +- New anonymous field `EnvironmentVersion` in struct `EnvironmentVersionsClientCreateOrUpdateResponse` +- New anonymous field `DataContainer` in struct `DataContainersClientCreateOrUpdateResponse` +- New field `TargetColumnName` in struct `TextClassificationMultilabel` +- New field `ValidationData` in struct `TextClassificationMultilabel` +- New field `TrainingData` in struct `TextClassificationMultilabel` +- New anonymous field `WorkspaceConnectionPropertiesV2BasicResource` in struct `WorkspaceConnectionsClientCreateResponse` +- New field `ResourceGroup` in struct `AzureBlobDatastore` +- New field `SubscriptionID` in struct `AzureBlobDatastore` +- New field `CheckpointModel` in struct `ImageModelSettings` +- New anonymous field `OnlineDeployment` in struct `OnlineDeploymentsClientGetResponse` +- New anonymous field `DataVersionBase` in struct `DataVersionsClientCreateOrUpdateResponse` +- New anonymous field `JobBase` in struct `JobsClientCreateOrUpdateResponse` +- New field `CheckpointModel` in struct `ImageModelSettingsObjectDetection` +- New anonymous field `WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult` in struct `WorkspaceConnectionsClientListResponse` +- New anonymous field `BatchDeployment` in struct `BatchDeploymentsClientCreateOrUpdateResponse` +- New field `Encryption` in struct `WorkspacePropertiesUpdateParameters` +- New anonymous field `CodeContainer` in struct `CodeContainersClientCreateOrUpdateResponse` +- New anonymous field `EnvironmentContainer` in struct `EnvironmentContainersClientGetResponse` +- New anonymous field `CodeContainer` in struct `CodeContainersClientGetResponse` +- New anonymous field `DataVersionBase` in struct `DataVersionsClientGetResponse` +- New anonymous field `ModelContainer` in struct `ModelContainersClientCreateOrUpdateResponse` +- New anonymous field `Datastore` in struct `DatastoresClientGetResponse` +- New field `CvSplitColumnNames` in struct `Forecasting` +- New field `TestData` in struct `Forecasting` +- New field `ValidationDataSize` in struct `Forecasting` +- New field `ValidationData` in struct `Forecasting` +- New field `TrainingData` in struct `Forecasting` +- New field `TestDataSize` in struct `Forecasting` +- New field `WeightColumnName` in struct `Forecasting` +- New field `NCrossValidations` in struct `Forecasting` +- New field `TargetColumnName` in struct `Forecasting` +- New anonymous field `BatchEndpoint` in struct `BatchEndpointsClientCreateOrUpdateResponse` +- New field `IdleTimeBeforeShutdown` in struct `ComputeInstanceProperties` +- New field `CustomServices` in struct `ComputeInstanceProperties` +- New anonymous field `ModelVersion` in struct `ModelVersionsClientGetResponse` +- New anonymous field `WorkspaceConnectionPropertiesV2BasicResource` in struct `WorkspaceConnectionsClientGetResponse` +- New anonymous field `BatchDeployment` in struct `BatchDeploymentsClientGetResponse` +- New anonymous field `DataContainer` in struct `DataContainersClientGetResponse` +- New anonymous field `ModelContainer` in struct `ModelContainersClientGetResponse` +- New field `TrainingData` in struct `ImageObjectDetection` +- New field `TargetColumnName` in struct `ImageObjectDetection` +- New field `ValidationData` in struct `ImageObjectDetection` +- New field `ValidationDataSize` in struct `ImageObjectDetection` +- New field `ValidationDataSize` in struct `ImageVertical` +- New field `ValidationData` in struct `ImageVertical` +- New field `ValidationDataSize` in struct `ImageInstanceSegmentation` +- New field `TrainingData` in struct `ImageInstanceSegmentation` +- New field `TargetColumnName` in struct `ImageInstanceSegmentation` +- New field `ValidationData` in struct `ImageInstanceSegmentation` +- New field `ComponentID` in struct `CommandJob` +- New field `Status` in struct `ScheduleBase` +- New field `ID` in struct `ScheduleBase` +- New field `ProvisioningStatus` in struct `ScheduleBase` +- New anonymous field `OnlineEndpoint` in struct `OnlineEndpointsClientCreateOrUpdateResponse` + + ## 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..ef225a49c0bc 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: 2.0.0-beta.2 ``` \ 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 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_batchdeployments_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go index 0c730a3dac34..8dba4c5a708e 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -270,7 +271,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-06-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 +328,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-06-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } @@ -353,7 +354,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-06-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 +376,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-06-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 +420,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-06-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..daa6ddc39a06 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,7 +256,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-06-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 +308,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-06-01-preview") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -330,7 +331,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-06-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 +375,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -391,7 +392,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-06-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 +413,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-06-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 +453,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-06-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..0f4d586d3a95 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +233,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-06-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 +285,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-06-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..296b9c3d75b6 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +249,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-06-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 +306,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-06-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..e2211ec15669 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,7 +234,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-06-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 +287,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-06-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..5fe79eb6673f 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +250,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-06-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 +307,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-06-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..4d97a82cb7e2 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,7 +262,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-06-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 +314,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-06-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -333,7 +334,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-06-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 +378,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -394,7 +395,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-06-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 +452,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -468,7 +469,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-06-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 +488,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-06-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 +528,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -535,7 +536,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-06-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 +555,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-06-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 +595,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -602,7 +603,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-06-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 +622,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-06-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 +662,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -670,7 +671,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-06-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 +691,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-06-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 +731,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-06-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-06-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-06-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-06-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-06-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..047c3e9cf278 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go @@ -0,0 +1,2829 @@ +//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 = "v2.0.0-beta.2" +) + +// 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, + } +} + +// 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 - 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 ( + 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" + 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, + } +} + +// 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, + } +} + +// 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, + } +} + +// 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, + } +} + +// 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, + } +} + +// 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, + } +} + +// 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 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, + } +} + +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, + } +} + +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..716c6c9fd9af 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +233,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-06-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 +285,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-06-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..a5fc40710080 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,7 +237,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-06-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 +289,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-06-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -326,7 +327,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-06-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 +371,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-06-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..1b673103b5f0 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +249,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-06-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 +306,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-06-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..8bd34f6e470d 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +235,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-06-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 +288,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-06-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..da5e1dfad63d 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,7 +250,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-06-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 +308,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-06-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..58e5685d0470 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod @@ -2,20 +2,12 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/machinelearning/arm 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..4cb94953212d 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,7 +317,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-06-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 +369,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-06-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -380,6 +382,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..55add45ad518 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/labelingjobs_client.go @@ -0,0 +1,513 @@ +//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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-06-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-06-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Count != nil { + reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 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-06-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-06-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-06-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-06-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-06-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..0b8bd53b83b5 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,7 +234,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-06-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 +286,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-06-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 63% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_models.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/models.go index 003a9881315b..c416fd47844b 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 @@ -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. @@ -215,7 +216,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. @@ -476,6 +477,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 +620,43 @@ 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, + } +} + // AzureBlobDatastore - Azure Blob datastore configuration. type AzureBlobDatastore struct { // REQUIRED; [Required] Account credentials. @@ -515,9 +683,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 +728,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 +782,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 +810,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 +845,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 +943,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 +978,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 +1166,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 +1187,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 +1268,102 @@ 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"` + + // 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"` + + // 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"` +} + // ClusterUpdateParameters - AmlCompute update parameters. type ClusterUpdateParameters struct { // The properties of the amlCompute. @@ -1034,6 +1376,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" @@ -1186,6 +1562,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" @@ -1200,6 +1585,9 @@ type CommandJob struct { // 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 +1626,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 +1644,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, @@ -1477,7 +1866,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 +1929,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 @@ -1574,7 +1974,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. @@ -1723,11 +2123,18 @@ type ComputeInstanceProperties struct { // 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"` @@ -1903,6 +2310,52 @@ type CosmosDbSettings struct { CollectionsThroughput *int32 `json:"collectionsThroughput,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"` @@ -1947,6 +2400,91 @@ func (c *CustomModelJobOutput) GetJobOutput() *JobOutput { } } +// 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. @@ -2053,7 +2591,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. @@ -2104,7 +2642,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 +2721,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. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220601Preview.Assets.DataVersionBase.DataType DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -2281,7 +2819,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 +2874,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 +2926,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 +2945,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 +2988,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 +3068,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 +3162,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 +3205,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,12 +3221,34 @@ type EncryptionProperty struct { Identity *IdentityForCmk `json:"identity,omitempty"` } -// EndpointAuthKeys - Keys for endpoint authentication. -type EndpointAuthKeys struct { - // The primary key. - PrimaryKey *string `json:"primaryKey,omitempty"` +type EncryptionUpdateProperties struct { + // REQUIRED; Customer Key vault properties. + KeyVaultProperties *EncryptionKeyVaultUpdateProperties `json:"keyVaultProperties,omitempty"` +} - // The secondary key. +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. + PrimaryKey *string `json:"primaryKey,omitempty"` + + // The secondary key. SecondaryKey *string `json:"secondaryKey,omitempty"` } @@ -2658,7 +3275,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 +3308,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. @@ -2763,6 +3395,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. @@ -2912,6 +3555,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 +3606,182 @@ 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"` + + // 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"` + + // 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"` +} + // 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 @@ -2986,7 +3829,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 +3865,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,189 +3946,1283 @@ 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"` -// 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 -} + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` -// JobInput - Command job definition. -type JobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` - // Description for the input. - Description *string `json:"description,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"` } -// 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 +// 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, + } } -type JobLimits struct { - // REQUIRED; [Required] JobLimit type. - JobLimitsType *JobLimitsType `json:"jobLimitsType,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"` - // 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"` -} + // REQUIRED; [Required] Task type for AutoMLJob. + TaskType *TaskType `json:"taskType,omitempty"` -// GetJobLimits implements the JobLimitsClassification interface for type JobLimits. -func (j *JobLimits) GetJobLimits() *JobLimits { return j } + // REQUIRED; [Required] Training data input. + TrainingData *MLTableJobInput `json:"trainingData,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 -} + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,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"` + // Settings used for training the model. + ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,omitempty"` - // Description for the output. - Description *string `json:"description,omitempty"` -} + // Primary metric to optimize for this task. + PrimaryMetric *InstanceSegmentationPrimaryMetrics `json:"primaryMetric,omitempty"` -// GetJobOutput implements the JobOutputClassification interface for type JobOutput. -func (j *JobOutput) GetJobOutput() *JobOutput { return j } + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsObjectDetection `json:"searchSpace,omitempty"` -// JobService - Job endpoint definition -type JobService struct { - // Url for endpoint. - Endpoint *string `json:"endpoint,omitempty"` + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` - // Endpoint type. - JobServiceType *string `json:"jobServiceType,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"` - // Port for endpoint. - Port *int32 `json:"port,omitempty"` + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` - // Additional properties to set on the endpoint. - 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"` +} + +// 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, + } +} + +// 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"` +} + +// 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"` + + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` + + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *string `json:"beta1,omitempty"` + + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *string `json:"beta2,omitempty"` + + // Whether to use distributer training. + Distributed *string `json:"distributed,omitempty"` + + // Enable early stopping logic during training. + EarlyStopping *string `json:"earlyStopping,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"` + + // 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"` + + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` + + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *string `json:"evaluationFrequency,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"` + + // 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"` + + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *string `json:"learningRate,omitempty"` + + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *string `json:"learningRateScheduler,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"` + + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *string `json:"momentum,omitempty"` + + // Enable nesterov when optimizer is 'sgd'. + Nesterov *string `json:"nesterov,omitempty"` + + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` + + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` + + // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + Optimizer *string `json:"optimizer,omitempty"` + + // Random seed to be used when using deterministic training. + RandomSeed *string `json:"randomSeed,omitempty"` + + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *string `json:"stepLRGamma,omitempty"` + + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *string `json:"stepLRStepSize,omitempty"` + + // Training batch size. Must be a positive integer. + TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` + + // Validation batch size. Must be a positive integer. + ValidationBatchSize *string `json:"validationBatchSize,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"` + + // 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"` +} + +// 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"` + + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` + + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *string `json:"beta1,omitempty"` + + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *string `json:"beta2,omitempty"` + + // Whether to use distributer training. + Distributed *string `json:"distributed,omitempty"` + + // Enable early stopping logic during training. + EarlyStopping *string `json:"earlyStopping,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"` + + // 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"` + + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` + + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *string `json:"evaluationFrequency,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"` + + // 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"` + + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *string `json:"learningRate,omitempty"` + + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *string `json:"learningRateScheduler,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"` + + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *string `json:"momentum,omitempty"` + + // Enable nesterov when optimizer is 'sgd'. + Nesterov *string `json:"nesterov,omitempty"` + + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` + + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` + + // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + Optimizer *string `json:"optimizer,omitempty"` + + // Random seed to be used when using deterministic training. + RandomSeed *string `json:"randomSeed,omitempty"` + + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *string `json:"stepLRGamma,omitempty"` + + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *string `json:"stepLRStepSize,omitempty"` + + // Training batch size. Must be a positive integer. + TrainingBatchSize *string `json:"trainingBatchSize,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"` + + // Validation batch size. Must be a positive integer. + ValidationBatchSize *string `json:"validationBatchSize,omitempty"` + + // Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + ValidationCropSize *string `json:"validationCropSize,omitempty"` + + // Image size to which to resize before cropping for validation dataset. Must be a positive integer. + ValidationResizeSize *string `json:"validationResizeSize,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"` + + // 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"` + + // 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"` +} + +// 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"` + + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` + + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *string `json:"beta1,omitempty"` + + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *string `json:"beta2,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 *string `json:"boxDetectionsPerImage,omitempty"` + + // 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"` + + // Whether to use distributer training. + Distributed *string `json:"distributed,omitempty"` + + // Enable early stopping logic during training. + EarlyStopping *string `json:"earlyStopping,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"` + + // 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"` + + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` + + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *string `json:"evaluationFrequency,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"` + + // 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"` + + // 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"` + + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *string `json:"learningRate,omitempty"` + + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *string `json:"learningRateScheduler,omitempty"` + + // 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"` + + // 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"` + + // 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"` + + // 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"` + + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *string `json:"momentum,omitempty"` + + // 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"` + + // Enable nesterov when optimizer is 'sgd'. + Nesterov *string `json:"nesterov,omitempty"` + + // IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. + NmsIouThreshold *string `json:"nmsIouThreshold,omitempty"` + + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` + + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` + + // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + Optimizer *string `json:"optimizer,omitempty"` + + // Random seed to be used when using deterministic training. + RandomSeed *string `json:"randomSeed,omitempty"` + + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *string `json:"stepLRGamma,omitempty"` + + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *string `json:"stepLRStepSize,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"` + + // 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"` + + // 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"` + + // Training batch size. Must be a positive integer. + TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` + + // Validation batch size. Must be a positive integer. + ValidationBatchSize *string `json:"validationBatchSize,omitempty"` + + // IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + ValidationIouThreshold *string `json:"validationIouThreshold,omitempty"` + + // Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. + ValidationMetricType *string `json:"validationMetricType,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"` + + // 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"` +} + +// 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"` + + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *bool `json:"amsGradient,omitempty"` + + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` + + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *float32 `json:"beta1,omitempty"` + + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *float32 `json:"beta2,omitempty"` + + // Frequency to store model checkpoints. Must be a positive integer. + CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` + + // The pretrained checkpoint model for incremental training. + CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` + + // The id of a previous run that has a pretrained checkpoint for incremental training. + CheckpointRunID *string `json:"checkpointRunId,omitempty"` + + // Whether to use distributed training. + Distributed *bool `json:"distributed,omitempty"` + + // Enable early stopping logic during training. + EarlyStopping *bool `json:"earlyStopping,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"` + + // 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"` + + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` + + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *int32 `json:"evaluationFrequency,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"` + + // 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"` + + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *float32 `json:"learningRate,omitempty"` + + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,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"` + + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *float32 `json:"momentum,omitempty"` + + // Enable nesterov when optimizer is 'sgd'. + Nesterov *bool `json:"nesterov,omitempty"` + + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` + + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + + // Type of optimizer. + Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` + + // Random seed to be used when using deterministic training. + RandomSeed *int32 `json:"randomSeed,omitempty"` + + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *float32 `json:"stepLRGamma,omitempty"` + + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` + + // Training batch size. Must be a positive integer. + TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` + + // Validation batch size. Must be a positive integer. + ValidationBatchSize *int32 `json:"validationBatchSize,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"` + + // 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"` +} + +// 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"` + + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *bool `json:"amsGradient,omitempty"` + + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` + + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *float32 `json:"beta1,omitempty"` + + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *float32 `json:"beta2,omitempty"` + + // Frequency to store model checkpoints. Must be a positive integer. + CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` + + // The pretrained checkpoint model for incremental training. + CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` + + // The id of a previous run that has a pretrained checkpoint for incremental training. + CheckpointRunID *string `json:"checkpointRunId,omitempty"` + + // Whether to use distributed training. + Distributed *bool `json:"distributed,omitempty"` + + // Enable early stopping logic during training. + EarlyStopping *bool `json:"earlyStopping,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"` + + // 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"` + + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` + + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *int32 `json:"evaluationFrequency,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"` + + // 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"` + + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *float32 `json:"learningRate,omitempty"` + + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,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"` + + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *float32 `json:"momentum,omitempty"` + + // Enable nesterov when optimizer is 'sgd'. + Nesterov *bool `json:"nesterov,omitempty"` + + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` + + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + + // Type of optimizer. + Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` + + // Random seed to be used when using deterministic training. + RandomSeed *int32 `json:"randomSeed,omitempty"` + + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *float32 `json:"stepLRGamma,omitempty"` + + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` + + // Training batch size. Must be a positive integer. + TrainingBatchSize *int32 `json:"trainingBatchSize,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"` + + // Validation batch size. Must be a positive integer. + ValidationBatchSize *int32 `json:"validationBatchSize,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"` + + // Image size to which to resize before cropping for validation dataset. Must be a positive integer. + ValidationResizeSize *int32 `json:"validationResizeSize,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"` + + // 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"` + + // 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"` +} + +// 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"` + + // Enable AMSGrad when optimizer is 'adam' or 'adamw'. + AmsGradient *bool `json:"amsGradient,omitempty"` + + // Settings for using Augmentations. + Augmentations *string `json:"augmentations,omitempty"` + + // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta1 *float32 `json:"beta1,omitempty"` + + // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + Beta2 *float32 `json:"beta2,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"` + + // 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"` + + // Frequency to store model checkpoints. Must be a positive integer. + CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` + + // The pretrained checkpoint model for incremental training. + CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` + + // The id of a previous run that has a pretrained checkpoint for incremental training. + CheckpointRunID *string `json:"checkpointRunId,omitempty"` + + // Whether to use distributed training. + Distributed *bool `json:"distributed,omitempty"` + + // Enable early stopping logic during training. + EarlyStopping *bool `json:"earlyStopping,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"` + + // 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"` + + // Enable normalization when exporting ONNX model. + EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` + + // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + EvaluationFrequency *int32 `json:"evaluationFrequency,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"` + + // 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"` + + // 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"` + + // Initial learning rate. Must be a float in the range [0, 1]. + LearningRate *float32 `json:"learningRate,omitempty"` + + // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,omitempty"` + + // 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"` + + // 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"` + + // 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"` + + // 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"` + + // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + Momentum *float32 `json:"momentum,omitempty"` + + // 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"` + + // Enable nesterov when optimizer is 'sgd'. + Nesterov *bool `json:"nesterov,omitempty"` + + // IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. + NmsIouThreshold *float32 `json:"nmsIouThreshold,omitempty"` + + // Number of training epochs. Must be a positive integer. + NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` + + // Number of data loader workers. Must be a non-negative integer. + NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + + // Type of optimizer. + Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` + + // Random seed to be used when using deterministic training. + RandomSeed *int32 `json:"randomSeed,omitempty"` + + // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + StepLRGamma *float32 `json:"stepLRGamma,omitempty"` + + // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + StepLRStepSize *int32 `json:"stepLRStepSize,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"` + + // 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"` + + // 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"` + + // Training batch size. Must be a positive integer. + TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` + + // Validation batch size. Must be a positive integer. + ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` + + // IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + ValidationIouThreshold *float32 `json:"validationIouThreshold,omitempty"` + + // Metric computation method to use for validation metrics. + ValidationMetricType *ValidationMetricType `json:"validationMetricType,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"` + + // 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"` +} + +// 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"` + + // 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"` + + // Settings used for training the model. + ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,omitempty"` + + // Primary metric to optimize for this task. + PrimaryMetric *ObjectDetectionPrimaryMetrics `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"` +} + +// 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, + } +} + +type ImageObjectDetectionBase struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` + + // Settings used for training the model. + ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,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"` + + // 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"` +} + +// ImageSweepLimitSettings - Limit settings for model sweeping and hyperparameter sweeping. +type ImageSweepLimitSettings struct { + // Maximum number of concurrent iterations for the underlying Sweep job. + MaxConcurrentTrials *int32 `json:"maxConcurrentTrials,omitempty"` + + // Maximum number of iterations for the underlying Sweep job. + MaxTrials *int32 `json:"maxTrials,omitempty"` +} + +// ImageSweepSettings - Model sweeping and hyperparameter sweeping related settings. +type ImageSweepSettings struct { + // REQUIRED; [Required] Limit settings for model sweeping and hyperparameter sweeping. + Limits *ImageSweepLimitSettings `json:"limits,omitempty"` + + // REQUIRED; [Required] Type of the hyperparameter sampling algorithms. + SamplingAlgorithm *SamplingAlgorithmType `json:"samplingAlgorithm,omitempty"` + + // Type of early termination policy. + EarlyTermination EarlyTerminationPolicyClassification `json:"earlyTermination,omitempty"` +} + +// 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"` + + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,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 InferenceContainerProperties struct { + // The route to check the liveness of the inference server container. + LivenessRoute *Route `json:"livenessRoute,omitempty"` + + // The route to check the readiness of the inference server container. + ReadinessRoute *Route `json:"readinessRoute,omitempty"` + + // The port to send the scoring requests to, within the inference server container. + ScoringRoute *Route `json:"scoringRoute,omitempty"` +} + +// InstanceTypeSchema - Instance type schema. +type InstanceTypeSchema struct { + // Node Selector + NodeSelector map[string]*string `json:"nodeSelector,omitempty"` + + // Resource requests/limits for this instance type + Resources *InstanceTypeSchemaResources `json:"resources,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 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"` + + // 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"` +} + +// 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 +} + +// JobBaseProperties - Base definition for a job. +type JobBaseProperties 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"` + + // Is the asset archived? + IsArchived *bool `json:"isArchived,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; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` +} + +// 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 JobBase. + Value []*JobBase `json:"value,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 +} + +// JobInput - Command job definition. +type JobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,omitempty"` + + // Description for the input. + Description *string `json:"description,omitempty"` +} + +// 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 +} + +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"` +} + +// 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 +} + +// 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"` +} + +// 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"` + + // Port for endpoint. + 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"` @@ -3281,12 +5259,108 @@ type JobsClientListOptions struct { 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 // Jobs returned will have this tag key. Tag *string } +type KerberosCredentials struct { + // 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"` +} + +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"` +} + +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type KerberosKeytabCredentials. +func (k *KerberosKeytabCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: k.CredentialsType, + } +} + +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 @@ -3321,7 +5395,7 @@ type Kubernetes 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 Kubernetes. @@ -3348,103 +5422,356 @@ type KubernetesOnlineDeployment struct { // If true, enables Application Insights logging. AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` - // Code configuration for the endpoint deployment. - CodeConfiguration *CodeConfiguration `json:"codeConfiguration,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. + MultiSelectEnabled *bool `json:"multiSelectEnabled,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. + IncrementalDataRefreshEnabled *bool `json:"incrementalDataRefreshEnabled,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"` - // The resource requirements for the container (cpu and memory). - ContainerResourceRequirements *ContainerResourceRequirements `json:"containerResourceRequirements,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Description of the endpoint deployment. - Description *string `json:"description,omitempty"` + // Labeling instructions of the job. + JobInstructions *LabelingJobInstructions `json:"jobInstructions,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. - EnvironmentID *string `json:"environmentId,omitempty"` + // Label categories of the job. + LabelCategories map[string]*LabelCategory `json:"labelCategories,omitempty"` - // Environment variables configuration for the deployment. - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + // Media type specific properties in the job. + LabelingJobMediaProperties LabelingJobMediaPropertiesClassification `json:"labelingJobMediaProperties,omitempty"` - // Compute instance type. - InstanceType *string `json:"instanceType,omitempty"` + // Configuration of MLAssist feature in the job. + MlAssistConfiguration MLAssistConfigurationClassification `json:"mlAssistConfiguration,omitempty"` - // Liveness probe monitors the health of the container regularly. - LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // The URI path to the model. - Model *string `json:"model,omitempty"` + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` - // The path to mount the model in custom container. - ModelMountPath *string `json:"modelMountPath,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` + // READ-ONLY; Created time of the job in UTC timezone. + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"` - // 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"` + // READ-ONLY; Progress metrics of the job. + ProgressMetrics *ProgressMetrics `json:"progressMetrics,omitempty" azure:"ro"` - // Request settings for the deployment. - RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + // READ-ONLY; Internal id of the job(Previously called project). + ProjectID *string `json:"projectId,omitempty" azure:"ro"` - // 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; Specifies the labeling job provisioning state. + ProvisioningState *JobProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - // READ-ONLY; Provisioning state for the endpoint deployment. - ProvisioningState *DeploymentProvisioningState `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"` } -// 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, +// 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, } } -// KubernetesProperties - Kubernetes properties -type KubernetesProperties struct { - // Default instance type - DefaultInstanceType *string `json:"defaultInstanceType,omitempty"` +// 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"` - // Extension instance release train. - ExtensionInstanceReleaseTrain *string `json:"extensionInstanceReleaseTrain,omitempty"` + // An array of objects of type LabelingJob. + Value []*LabelingJob `json:"value,omitempty"` +} - // Extension principal-id. - ExtensionPrincipalID *string `json:"extensionPrincipalId,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"` - // Instance Type Schema - InstanceTypes map[string]*InstanceTypeSchema `json:"instanceTypes,omitempty"` + // Annotation type of text labeling job. + AnnotationType *TextAnnotationType `json:"annotationType,omitempty"` +} - // Compute namespace - Namespace *string `json:"namespace,omitempty"` +// GetLabelingJobMediaProperties implements the LabelingJobMediaPropertiesClassification interface for type LabelingJobTextProperties. +func (l *LabelingJobTextProperties) GetLabelingJobMediaProperties() *LabelingJobMediaProperties { + return &LabelingJobMediaProperties{ + MediaType: l.MediaType, + } +} - // Relay connection string. - RelayConnectionString *string `json:"relayConnectionString,omitempty"` +// LabelingJobsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabelingJobsClient.BeginCreateOrUpdate +// method. +type LabelingJobsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // ServiceBus connection string. - ServiceBusConnectionString *string `json:"serviceBusConnectionString,omitempty"` +// LabelingJobsClientBeginExportLabelsOptions contains the optional parameters for the LabelingJobsClient.BeginExportLabels +// method. +type LabelingJobsClientBeginExportLabelsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // VC name. - VcName *string `json:"vcName,omitempty"` +// LabelingJobsClientBeginResumeOptions contains the optional parameters for the LabelingJobsClient.BeginResume method. +type LabelingJobsClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// KubernetesSchema - Kubernetes Compute Schema -type KubernetesSchema struct { - // Properties of Kubernetes - Properties *KubernetesProperties `json:"properties,omitempty"` +// 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 { + // Number of labeling jobs to return. + Count *int32 + // Continuation token for pagination. + Skip *string +} + +// 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. @@ -3527,6 +5854,56 @@ func (l *LiteralJobInput) GetJobInput() *JobInput { } } +// 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"` @@ -3576,7 +5953,7 @@ type MLTableData 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. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220601Preview.Assets.DataVersionBase.DataType DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -3718,7 +6095,10 @@ type ManagedOnlineDeployment struct { // Description of the endpoint deployment. Description *string `json:"description,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. + // 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. @@ -3757,21 +6137,22 @@ type ManagedOnlineDeployment struct { // 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, + 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, } } @@ -4001,6 +6382,53 @@ func (m *Mpi) GetDistributionConfiguration() *DistributionConfiguration { } } +// 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 } + +// 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"` + + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,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"` + + // Number of AutoML iterations. + MaxTrials *int32 `json:"maxTrials,omitempty"` + + // AutoML job timeout. + Timeout *string `json:"timeout,omitempty"` +} + // NodeStateCounts - Counts of various compute node states on the amlCompute. type NodeStateCounts struct { // READ-ONLY; Number of compute nodes in idle state. @@ -4165,7 +6593,10 @@ type OnlineDeploymentProperties struct { // Description of the endpoint deployment. Description *string `json:"description,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. + // 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. @@ -4312,9 +6743,16 @@ type OnlineEndpointProperties struct { // 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"` @@ -4579,6 +7017,9 @@ 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"` @@ -4616,6 +7057,9 @@ type PipelineJob struct { // 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"` @@ -4626,6 +7070,7 @@ type PipelineJob struct { // 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, @@ -4805,6 +7250,21 @@ type ProbeSettings struct { 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. @@ -4874,6 +7334,53 @@ func (r *RandomSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { } } +type RecurrenceSchedule struct { + // REQUIRED; [Required] List of hours for the schedule. + Hours []*int32 `json:"hours,omitempty"` + + // REQUIRED; [Required] List of minutes for the schedule. + Minutes []*int32 `json:"minutes,omitempty"` + + // List of days for the schedule. + WeekDays []*WeekDay `json:"weekDays,omitempty"` +} + +type RecurrenceTrigger struct { + // REQUIRED; [Required] The frequency to trigger schedule. + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` + + // REQUIRED; [Required] Specifies schedule interval in conjunction with frequency + Interval *int32 `json:"interval,omitempty"` + + // REQUIRED; [Required] The recurrence schedule. + Schedule *RecurrenceSchedule `json:"schedule,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 RecurrenceTrigger. +func (r *RecurrenceTrigger) GetTriggerBase() *TriggerBase { + return &TriggerBase{ + EndTime: r.EndTime, + StartTime: r.StartTime, + TimeZone: r.TimeZone, + TriggerType: r.TriggerType, + } +} + type RegenerateEndpointKeysRequest struct { // REQUIRED; [Required] Specification for which type of key to generate. Primary or Secondary. KeyType *KeyType `json:"keyType,omitempty"` @@ -4892,6 +7399,99 @@ type RegistryListCredentialsResult struct { Username *string `json:"username,omitempty" azure:"ro"` } +// Regression task in AutoML Table vertical. +type Regression 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"` + + // 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 regression task. + PrimaryMetric *RegressionPrimaryMetrics `json:"primaryMetric,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 *RegressionTrainingSettings `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 Regression. +func (r *Regression) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: r.LogVerbosity, + TargetColumnName: r.TargetColumnName, + TaskType: r.TaskType, + TrainingData: r.TrainingData, + } +} + +// RegressionTrainingSettings - Regression Training related configuration. +type RegressionTrainingSettings struct { + // Allowed models for regression task. + AllowedTrainingAlgorithms []*RegressionModels `json:"allowedTrainingAlgorithms,omitempty"` + + // Blocked models for regression task. + BlockedTrainingAlgorithms []*RegressionModels `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"` +} + // Resource - Common fields that are returned in the response for all Azure Resource Manager resources type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -5127,39 +7727,134 @@ type SasDatastoreSecrets struct { // REQUIRED; [Required] Credential type used to authentication with storage. SecretsType *SecretsType `json:"secretsType,omitempty"` - // Storage container SAS token. - SasToken *string `json:"sasToken,omitempty"` + // Storage container SAS token. + SasToken *string `json:"sasToken,omitempty"` +} + +// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type SasDatastoreSecrets. +func (s *SasDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { + return &DatastoreSecrets{ + SecretsType: s.SecretsType, + } +} + +// ScaleSettings - scale settings for AML Compute +type ScaleSettings struct { + // REQUIRED; Max number of nodes to use + MaxNodeCount *int32 `json:"maxNodeCount,omitempty"` + + // Min number of nodes to use + MinNodeCount *int32 `json:"minNodeCount,omitempty"` + + // Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. + NodeIdleTimeBeforeScaleDown *string `json:"nodeIdleTimeBeforeScaleDown,omitempty"` +} + +// ScaleSettingsInformation - Desired scale settings for the amlCompute. +type ScaleSettingsInformation struct { + // scale settings for AML Compute + 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"` + ProvisioningStatus *ScheduleProvisioningState `json:"provisioningStatus,omitempty"` + 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"` } -// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type SasDatastoreSecrets. -func (s *SasDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { - return &DatastoreSecrets{ - SecretsType: s.SecretsType, - } -} +// 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"` -// ScaleSettings - scale settings for AML Compute -type ScaleSettings struct { - // REQUIRED; Max number of nodes to use - MaxNodeCount *int32 `json:"maxNodeCount,omitempty"` + // An array of objects of type Schedule. + Value []*Schedule `json:"value,omitempty"` +} - // Min number of nodes to use - MinNodeCount *int32 `json:"minNodeCount,omitempty"` +// SchedulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SchedulesClient.BeginCreateOrUpdate +// method. +type SchedulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. - NodeIdleTimeBeforeScaleDown *string `json:"nodeIdleTimeBeforeScaleDown,omitempty"` +// SchedulesClientBeginDeleteOptions contains the optional parameters for the SchedulesClient.BeginDelete method. +type SchedulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// ScaleSettingsInformation - Desired scale settings for the amlCompute. -type ScaleSettingsInformation struct { - // scale settings for AML Compute - ScaleSettings *ScaleSettings `json:"scaleSettings,omitempty"` +// SchedulesClientGetOptions contains the optional parameters for the SchedulesClient.Get method. +type SchedulesClientGetOptions struct { + // placeholder for future optional parameters } -type ScheduleBase struct { - ID *string `json:"id,omitempty"` - ProvisioningStatus *ScheduleProvisioningState `json:"provisioningStatus,omitempty"` - Status *ScheduleStatus `json:"status,omitempty"` +// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.List method. +type SchedulesClientListOptions struct { + // Continuation token for pagination. + Skip *string } // ScriptReference - Script reference @@ -5186,6 +7881,24 @@ 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"` @@ -5264,6 +7977,184 @@ type SharedPrivateLinkResourceProperty struct { 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, *SparkJobScalaEntry +type SparkJobEntryClassification interface { + // GetSparkJobEntry returns the SparkJobEntry content of the underlying type. + GetSparkJobEntry() *SparkJobEntry +} + +// SparkJobEntry - Spark job entry point definition. +type SparkJobEntry struct { + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType `json:"sparkJobEntryType,omitempty"` +} + +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobEntry. +func (s *SparkJobEntry) GetSparkJobEntry() *SparkJobEntry { return s } + +type SparkJobPythonEntry struct { + // REQUIRED; [Required] Relative python file path for job entry point. + File *string `json:"file,omitempty"` + + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType `json:"sparkJobEntryType,omitempty"` +} + +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobPythonEntry. +func (s *SparkJobPythonEntry) GetSparkJobEntry() *SparkJobEntry { + return &SparkJobEntry{ + SparkJobEntryType: s.SparkJobEntryType, + } +} + +type SparkJobScalaEntry struct { + // REQUIRED; [Required] Scala class name used as entry point. + ClassName *string `json:"className,omitempty"` + + // REQUIRED; [Required] Type of the job's entry point. + SparkJobEntryType *SparkJobEntryType `json:"sparkJobEntryType,omitempty"` +} + +// GetSparkJobEntry implements the SparkJobEntryClassification interface for type SparkJobScalaEntry. +func (s *SparkJobScalaEntry) GetSparkJobEntry() *SparkJobEntry { + return &SparkJobEntry{ + SparkJobEntryType: s.SparkJobEntryType, + } +} + +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"` +} + +// 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"` + + // 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"` +} + +// StatusMessage - Active message associated with project +type StatusMessage struct { + // READ-ONLY; Service-defined message code. + Code *string `json:"code,omitempty" azure:"ro"` + + // READ-ONLY; Time in UTC at which the message was created. + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"` + + // READ-ONLY; Severity level of message. + Level *StatusMessageLevel `json:"level,omitempty" azure:"ro"` + + // READ-ONLY; A human-readable representation of the message code. + Message *string `json:"message,omitempty" azure:"ro"` +} + // SweepJob - Sweep job definition. type SweepJob struct { // REQUIRED; [Required] Specifies the type of job. @@ -5282,6 +8173,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 +8223,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, @@ -5402,7 +8297,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. @@ -5486,6 +8381,124 @@ type SystemService struct { Version *string `json:"version,omitempty" azure:"ro"` } +// 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"` + + // 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"` + + // 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"` + + // Number of iterations. + MaxTrials *int32 `json:"maxTrials,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 +8542,123 @@ 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"` + + // 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"` + + // 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"` + + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,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"` + + // 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"` + + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,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"` + + // 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 +8681,32 @@ 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"` +} + // TrialComponent - Trial component definition. type TrialComponent struct { // REQUIRED; [Required] The command to execute on startup of the job. eg. "python train.py" @@ -5569,9 +8725,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"` @@ -5646,7 +8831,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. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220601Preview.Assets.DataVersionBase.DataType DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -5727,7 +8912,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. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220601Preview.Assets.DataVersionBase.DataType DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -5962,7 +9147,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 +9279,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. @@ -6298,12 +9514,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 +9547,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..5af3a2cc1b2e --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go @@ -0,0 +1,17595 @@ +//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 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 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 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 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, "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 "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 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, "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, "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 "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 "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) + 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) + } + 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, "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 "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, "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 "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, "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 "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, "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 "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, "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 "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 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, "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, "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 "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 "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, "id", c.ID) + populate(objectMap, "provisioningStatus", c.ProvisioningStatus) + populate(objectMap, "schedule", c.Schedule) + 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 "id": + err = unpopulate(val, "ID", &c.ID) + delete(rawMsg, key) + case "provisioningStatus": + err = unpopulate(val, "ProvisioningStatus", &c.ProvisioningStatus) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &c.Schedule) + 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 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, "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 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, "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 "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, "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) +} + +// 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 "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 "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, "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, "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 "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 "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) + 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) + } + 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 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 ImageSweepLimitSettings. +func (i ImageSweepLimitSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "maxConcurrentTrials", i.MaxConcurrentTrials) + populate(objectMap, "maxTrials", i.MaxTrials) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageSweepLimitSettings. +func (i *ImageSweepLimitSettings) UnmarshalJSON(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) + } + 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, "limits", i.Limits) + 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 "limits": + err = unpopulate(val, "Limits", &i.Limits) + 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, "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 "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, "multiSelectEnabled", l.MultiSelectEnabled) + 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 "multiSelectEnabled": + err = unpopulate(val, "MultiSelectEnabled", &l.MultiSelectEnabled) + 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, "incrementalDataRefreshEnabled", l.IncrementalDataRefreshEnabled) + 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 "incrementalDataRefreshEnabled": + err = unpopulate(val, "IncrementalDataRefreshEnabled", &l.IncrementalDataRefreshEnabled) + 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, "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) + 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, "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 "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, "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 "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 NlpVertical. +func (n NlpVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "featurizationSettings", n.FeaturizationSettings) + populate(objectMap, "limitSettings", n.LimitSettings) + 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 "limitSettings": + err = unpopulate(val, "LimitSettings", &n.LimitSettings) + 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, "maxTrials", n.MaxTrials) + populate(objectMap, "timeout", n.Timeout) + 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 "maxTrials": + err = unpopulate(val, "MaxTrials", &n.MaxTrials) + delete(rawMsg, key) + case "timeout": + err = unpopulate(val, "Timeout", &n.Timeout) + 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 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 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, "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 RecurrenceSchedule. +func (r RecurrenceSchedule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hours", r.Hours) + populate(objectMap, "minutes", r.Minutes) + 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 "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 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 Regression. +func (r Regression) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cvSplitColumnNames", r.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", r.FeaturizationSettings) + populate(objectMap, "limitSettings", r.LimitSettings) + populate(objectMap, "logVerbosity", r.LogVerbosity) + populate(objectMap, "nCrossValidations", r.NCrossValidations) + populate(objectMap, "primaryMetric", r.PrimaryMetric) + 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 "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 "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) + 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) + } + 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 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"] = SparkJobEntryTypeSparkJobPythonEntry + 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 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 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 TableVertical. +func (t TableVertical) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cvSplitColumnNames", t.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "limitSettings", t.LimitSettings) + populate(objectMap, "nCrossValidations", t.NCrossValidations) + 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 "limitSettings": + err = unpopulate(val, "LimitSettings", &t.LimitSettings) + delete(rawMsg, key) + case "nCrossValidations": + t.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) + 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, "maxTrials", t.MaxTrials) + 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 "maxTrials": + err = unpopulate(val, "MaxTrials", &t.MaxTrials) + 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, "limitSettings", t.LimitSettings) + populate(objectMap, "logVerbosity", t.LogVerbosity) + populate(objectMap, "primaryMetric", t.PrimaryMetric) + 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 "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 "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, "limitSettings", t.LimitSettings) + populate(objectMap, "logVerbosity", t.LogVerbosity) + populate(objectMap, "primaryMetric", t.PrimaryMetric) + 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 "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 "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, "limitSettings", t.LimitSettings) + populate(objectMap, "logVerbosity", t.LogVerbosity) + populate(objectMap, "primaryMetric", t.PrimaryMetric) + 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 "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 "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) + 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) + } + 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, "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 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 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 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 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..baa9d400560b 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,7 +249,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-06-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 +306,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-06-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..c638845c77a1 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -338,7 +339,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-06-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 +396,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-06-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } @@ -421,7 +422,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-06-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 +485,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-06-01-preview") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -507,7 +508,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-06-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 +530,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-06-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 +574,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-06-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..0018232b674a 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,7 +318,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-06-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 +370,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-06-01-preview") if options != nil && options.Name != nil { reqQP.Set("name", *options.Name) } @@ -407,7 +408,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-06-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 +453,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -469,7 +470,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-06-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 +493,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-06-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 +533,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -540,7 +541,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-06-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 +562,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-06-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 +602,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-06-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 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_operations_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go index 8aa1578e7695..2cb2a39ad8a9 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 @@ -50,7 +51,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // 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 +// Generated from API version 2022-06-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 +83,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-06-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 63% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_polymorphic_helpers.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/polymorphic_helpers.go index aef187b22026..de546b9fbe3c 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,66 @@ 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 unmarshalOnlineDeploymentPropertiesClassification(rawMsg json.RawMessage) (OnlineDeploymentPropertiesClassification, error) { if rawMsg == nil { return nil, nil @@ -432,6 +587,124 @@ 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 = &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 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..e5ba2da8d76e 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +235,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-06-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 +282,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-06-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..232adeed7ebe 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-06-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-06-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 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_quotas_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go index 1d8e8d928da7..2b88f7081c77 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 @@ -56,7 +57,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-06-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 +104,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,7 +121,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-06-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 +156,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-06-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/zz_generated_response_types.go b/sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go similarity index 89% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_response_types.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go index 160588373737..88f5472348b1 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,26 @@ type QuotasClientUpdateResponse struct { UpdateWorkspaceQuotasResult } +// 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..ed16eea97978 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go @@ -0,0 +1,325 @@ +//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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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. +// If the operation fails it returns an *azcore.ResponseError type. +// Generated from API version 2022-06-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-06-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 *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 97% rename from sdk/resourcemanager/machinelearning/armmachinelearning/zz_generated_usages_client.go rename to sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go index 0ab6ba8a3dbf..d1393b09c657 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 @@ -56,7 +57,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-06-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 +104,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-06-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..4675d08e25eb 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-06-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-06-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..4655d8208022 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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,7 +235,7 @@ func (client *WorkspaceConnectionsClient) getHandleResponse(resp *http.Response) // NewListPager - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-05-01 +// Generated from API version 2022-06-01-preview // 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 +294,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-06-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..76c97cb0bb2b 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 @@ -56,7 +57,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-06-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 +109,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-06-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..08cea5c7ab75 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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,7 +307,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-06-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 +355,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-06-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -374,7 +375,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-06-01-preview // options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription // method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { @@ -417,7 +418,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-06-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -438,7 +439,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-06-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 +478,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -494,7 +495,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-06-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 +535,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -551,7 +552,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-06-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 +592,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -609,7 +610,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-06-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 +650,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -666,7 +667,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-06-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 +707,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -723,7 +724,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-06-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 +745,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-06-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 +781,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -789,7 +790,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-06-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 +810,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-06-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 +846,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-06-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -853,7 +854,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-06-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 +873,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-06-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 +909,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-06-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 -}