diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md index c9ff1b23881f..520b19fc4f33 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/CHANGELOG.md @@ -1,5 +1,400 @@ # Release History +## 3.1.0-beta.1 (2023-03-16) +### Features Added + +- New value `ConnectionAuthTypeAccessKey`, `ConnectionAuthTypeServicePrincipal` added to type alias `ConnectionAuthType` +- New value `ConnectionCategoryAzureDataLakeGen2`, `ConnectionCategoryAzureMySQLDb`, `ConnectionCategoryAzurePostgresDb`, `ConnectionCategoryAzureSQLDb`, `ConnectionCategoryAzureSynapseAnalytics`, `ConnectionCategoryFeatureStore`, `ConnectionCategoryRedis`, `ConnectionCategoryS3`, `ConnectionCategorySnowflake` added to type alias `ConnectionCategory` +- New value `ContainerTypeModelDataCollector` added to type alias `ContainerType` +- New value `CredentialsTypeKerberosKeytab`, `CredentialsTypeKerberosPassword` added to type alias `CredentialsType` +- New value `DatastoreTypeHdfs` added to type alias `DatastoreType` +- New value `JobStatusScheduled` added to type alias `JobStatus` +- New value `JobTypeLabeling`, `JobTypeSpark` added to type alias `JobType` +- New value `OutputDeliveryModeDirect` added to type alias `OutputDeliveryMode` +- New value `ProvisioningStateSoftDeleted` added to type alias `ProvisioningState` +- New value `SecretsTypeKerberosKeytab`, `SecretsTypeKerberosPassword` added to type alias `SecretsType` +- New type alias `AssetProvisioningState` with values `AssetProvisioningStateCanceled`, `AssetProvisioningStateCreating`, `AssetProvisioningStateDeleting`, `AssetProvisioningStateFailed`, `AssetProvisioningStateSucceeded`, `AssetProvisioningStateUpdating` +- New type alias `BaseEnvironmentSourceType` with values `BaseEnvironmentSourceTypeEnvironmentAsset` +- New type alias `BatchDeploymentConfigurationType` with values `BatchDeploymentConfigurationTypeModel`, `BatchDeploymentConfigurationTypePipelineComponent` +- New type alias `EmailNotificationEnableType` with values `EmailNotificationEnableTypeJobCancelled`, `EmailNotificationEnableTypeJobCompleted`, `EmailNotificationEnableTypeJobFailed` +- New type alias `EnvironmentVariableType` with values `EnvironmentVariableTypeLocal` +- New type alias `ExportFormatType` with values `ExportFormatTypeCSV`, `ExportFormatTypeCoco`, `ExportFormatTypeDataset` +- New type alias `FeatureDataType` with values `FeatureDataTypeBinary`, `FeatureDataTypeBoolean`, `FeatureDataTypeDatetime`, `FeatureDataTypeDouble`, `FeatureDataTypeFloat`, `FeatureDataTypeInteger`, `FeatureDataTypeLong`, `FeatureDataTypeString` +- New type alias `FeaturestoreJobType` with values `FeaturestoreJobTypeBackfillMaterialization`, `FeaturestoreJobTypeRecurrentMaterialization` +- New type alias `ImageAnnotationType` with values `ImageAnnotationTypeBoundingBox`, `ImageAnnotationTypeClassification`, `ImageAnnotationTypeInstanceSegmentation` +- New type alias `ImageType` with values `ImageTypeAzureml`, `ImageTypeDocker` +- New type alias `IncrementalDataRefresh` with values `IncrementalDataRefreshDisabled`, `IncrementalDataRefreshEnabled` +- New type alias `InferencingServerType` with values `InferencingServerTypeAzureMLBatch`, `InferencingServerTypeAzureMLOnline`, `InferencingServerTypeCustom`, `InferencingServerTypeTriton` +- New type alias `InputPathType` with values `InputPathTypePathID`, `InputPathTypePathVersion`, `InputPathTypeURL` +- New type alias `JobProvisioningState` with values `JobProvisioningStateCanceled`, `JobProvisioningStateFailed`, `JobProvisioningStateInProgress`, `JobProvisioningStateSucceeded` +- New type alias `JobTier` with values `JobTierBasic`, `JobTierPremium`, `JobTierSpot`, `JobTierStandard` +- New type alias `MLAssistConfigurationType` with values `MLAssistConfigurationTypeDisabled`, `MLAssistConfigurationTypeEnabled` +- New type alias `MLFlowAutologgerState` with values `MLFlowAutologgerStateDisabled`, `MLFlowAutologgerStateEnabled` +- New type alias `MaterializationStoreType` with values `MaterializationStoreTypeNone`, `MaterializationStoreTypeOffline`, `MaterializationStoreTypeOnline`, `MaterializationStoreTypeOnlineAndOffline` +- New type alias `MediaType` with values `MediaTypeImage`, `MediaTypeText` +- New type alias `MlflowAutologger` with values `MlflowAutologgerDisabled`, `MlflowAutologgerEnabled` +- New type alias `MultiSelect` with values `MultiSelectDisabled`, `MultiSelectEnabled` +- New type alias `NlpLearningRateScheduler` with values `NlpLearningRateSchedulerConstant`, `NlpLearningRateSchedulerConstantWithWarmup`, `NlpLearningRateSchedulerCosine`, `NlpLearningRateSchedulerCosineWithRestarts`, `NlpLearningRateSchedulerLinear`, `NlpLearningRateSchedulerNone`, `NlpLearningRateSchedulerPolynomial` +- New type alias `NodesValueType` with values `NodesValueTypeAll`, `NodesValueTypeCustom` +- New type alias `PackageBuildState` with values `PackageBuildStateFailed`, `PackageBuildStateNotStarted`, `PackageBuildStateRunning`, `PackageBuildStateSucceeded` +- New type alias `PackageInputDeliveryMode` with values `PackageInputDeliveryModeDownload`, `PackageInputDeliveryModeReadOnlyMount` +- New type alias `PackageInputType` with values `PackageInputTypeURIFile`, `PackageInputTypeURIFolder` +- New type alias `Protocol` with values `ProtocolHTTP`, `ProtocolTCP`, `ProtocolUDP` +- New type alias `SparkJobEntryType` with values `SparkJobEntryTypeSparkJobPythonEntry`, `SparkJobEntryTypeSparkJobScalaEntry` +- New type alias `StatusMessageLevel` with values `StatusMessageLevelError`, `StatusMessageLevelInformation`, `StatusMessageLevelWarning` +- New type alias `TextAnnotationType` with values `TextAnnotationTypeClassification`, `TextAnnotationTypeNamedEntityRecognition` +- New type alias `TrainingMode` with values `TrainingModeAuto`, `TrainingModeDistributed`, `TrainingModeNonDistributed` +- New type alias `VolumeDefinitionType` with values `VolumeDefinitionTypeBind`, `VolumeDefinitionTypeNpipe`, `VolumeDefinitionTypeTmpfs`, `VolumeDefinitionTypeVolume` +- New function `*AccessKeyAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*AllNodes.GetNodes() *Nodes` +- New function `*AzureMLBatchInferencingServer.GetInferencingServer() *InferencingServer` +- New function `*AzureMLOnlineInferencingServer.GetInferencingServer() *InferencingServer` +- New function `*BaseEnvironmentID.GetBaseEnvironmentSource() *BaseEnvironmentSource` +- New function `*BaseEnvironmentSource.GetBaseEnvironmentSource() *BaseEnvironmentSource` +- New function `*BatchDeploymentConfiguration.GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration` +- New function `*BatchPipelineComponentDeploymentConfiguration.GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration` +- New function `*CSVExportSummary.GetExportSummary() *ExportSummary` +- New function `*CocoExportSummary.GetExportSummary() *ExportSummary` +- New function `*ComputeClient.UpdateCustomServices(context.Context, string, string, string, []*CustomService, *ComputeClientUpdateCustomServicesOptions) (ComputeClientUpdateCustomServicesResponse, error)` +- New function `*ComputeClient.UpdateIdleShutdownSetting(context.Context, string, string, string, IdleShutdownSetting, *ComputeClientUpdateIdleShutdownSettingOptions) (ComputeClientUpdateIdleShutdownSettingResponse, error)` +- New function `*CustomInferencingServer.GetInferencingServer() *InferencingServer` +- New function `*DatasetExportSummary.GetExportSummary() *ExportSummary` +- New function `*ExportSummary.GetExportSummary() *ExportSummary` +- New function `NewFeaturesetContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturesetContainersClient, error)` +- New function `*FeaturesetContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, FeaturesetContainer, *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetContainersClientCreateOrUpdateResponse], error)` +- New function `*FeaturesetContainersClient.BeginDelete(context.Context, string, string, string, *FeaturesetContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturesetContainersClientDeleteResponse], error)` +- New function `*FeaturesetContainersClient.GetEntity(context.Context, string, string, string, *FeaturesetContainersClientGetEntityOptions) (FeaturesetContainersClientGetEntityResponse, error)` +- New function `*FeaturesetContainersClient.NewListPager(string, string, *FeaturesetContainersClientListOptions) *runtime.Pager[FeaturesetContainersClientListResponse]` +- New function `NewFeaturesetVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturesetVersionsClient, error)` +- New function `*FeaturesetVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, FeaturesetVersion, *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetVersionsClientCreateOrUpdateResponse], error)` +- New function `*FeaturesetVersionsClient.BeginDelete(context.Context, string, string, string, string, *FeaturesetVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturesetVersionsClientDeleteResponse], error)` +- New function `*FeaturesetVersionsClient.Get(context.Context, string, string, string, string, *FeaturesetVersionsClientGetOptions) (FeaturesetVersionsClientGetResponse, error)` +- New function `*FeaturesetVersionsClient.GetFeature(context.Context, string, string, string, string, GetFeatureRequest, *FeaturesetVersionsClientGetFeatureOptions) (FeaturesetVersionsClientGetFeatureResponse, error)` +- New function `*FeaturesetVersionsClient.NewListFeaturesPager(string, string, string, string, *FeaturesetVersionsClientListFeaturesOptions) *runtime.Pager[FeaturesetVersionsClientListFeaturesResponse]` +- New function `*FeaturesetVersionsClient.NewListMaterializationJobsPager(string, string, string, string, *FeaturesetVersionsClientListMaterializationJobsOptions) *runtime.Pager[FeaturesetVersionsClientListMaterializationJobsResponse]` +- New function `*FeaturesetVersionsClient.NewListPager(string, string, string, *FeaturesetVersionsClientListOptions) *runtime.Pager[FeaturesetVersionsClientListResponse]` +- New function `*FeaturesetVersionsClient.BeginBackfill(context.Context, string, string, string, string, FeaturesetVersionBackfillRequest, *FeaturesetVersionsClientBeginBackfillOptions) (*runtime.Poller[FeaturesetVersionsClientBackfillResponse], error)` +- New function `NewFeaturestoreEntityContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturestoreEntityContainersClient, error)` +- New function `*FeaturestoreEntityContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, FeaturestoreEntityContainer, *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityContainersClientCreateOrUpdateResponse], error)` +- New function `*FeaturestoreEntityContainersClient.BeginDelete(context.Context, string, string, string, *FeaturestoreEntityContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityContainersClientDeleteResponse], error)` +- New function `*FeaturestoreEntityContainersClient.GetEntity(context.Context, string, string, string, *FeaturestoreEntityContainersClientGetEntityOptions) (FeaturestoreEntityContainersClientGetEntityResponse, error)` +- New function `*FeaturestoreEntityContainersClient.NewListPager(string, string, *FeaturestoreEntityContainersClientListOptions) *runtime.Pager[FeaturestoreEntityContainersClientListResponse]` +- New function `NewFeaturestoreEntityVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*FeaturestoreEntityVersionsClient, error)` +- New function `*FeaturestoreEntityVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, FeaturestoreEntityVersion, *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientCreateOrUpdateResponse], error)` +- New function `*FeaturestoreEntityVersionsClient.BeginDelete(context.Context, string, string, string, string, *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientDeleteResponse], error)` +- New function `*FeaturestoreEntityVersionsClient.Get(context.Context, string, string, string, string, *FeaturestoreEntityVersionsClientGetOptions) (FeaturestoreEntityVersionsClientGetResponse, error)` +- New function `*FeaturestoreEntityVersionsClient.NewListPager(string, string, string, *FeaturestoreEntityVersionsClientListOptions) *runtime.Pager[FeaturestoreEntityVersionsClientListResponse]` +- New function `*HdfsDatastore.GetDatastoreProperties() *DatastoreProperties` +- New function `*InferencingServer.GetInferencingServer() *InferencingServer` +- New function `*KerberosKeytabCredentials.GetDatastoreCredentials() *DatastoreCredentials` +- New function `*KerberosKeytabSecrets.GetDatastoreSecrets() *DatastoreSecrets` +- New function `*KerberosPasswordCredentials.GetDatastoreCredentials() *DatastoreCredentials` +- New function `*KerberosPasswordSecrets.GetDatastoreSecrets() *DatastoreSecrets` +- New function `*LabelingJobImageProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `*LabelingJobMediaProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `*LabelingJobProperties.GetJobBaseProperties() *JobBaseProperties` +- New function `*LabelingJobTextProperties.GetLabelingJobMediaProperties() *LabelingJobMediaProperties` +- New function `NewLabelingJobsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*LabelingJobsClient, error)` +- New function `*LabelingJobsClient.BeginCreateOrUpdate(context.Context, string, string, string, LabelingJob, *LabelingJobsClientBeginCreateOrUpdateOptions) (*runtime.Poller[LabelingJobsClientCreateOrUpdateResponse], error)` +- New function `*LabelingJobsClient.Delete(context.Context, string, string, string, *LabelingJobsClientDeleteOptions) (LabelingJobsClientDeleteResponse, error)` +- New function `*LabelingJobsClient.BeginExportLabels(context.Context, string, string, string, ExportSummaryClassification, *LabelingJobsClientBeginExportLabelsOptions) (*runtime.Poller[LabelingJobsClientExportLabelsResponse], error)` +- New function `*LabelingJobsClient.Get(context.Context, string, string, string, *LabelingJobsClientGetOptions) (LabelingJobsClientGetResponse, error)` +- New function `*LabelingJobsClient.NewListPager(string, string, *LabelingJobsClientListOptions) *runtime.Pager[LabelingJobsClientListResponse]` +- New function `*LabelingJobsClient.Pause(context.Context, string, string, string, *LabelingJobsClientPauseOptions) (LabelingJobsClientPauseResponse, error)` +- New function `*LabelingJobsClient.BeginResume(context.Context, string, string, string, *LabelingJobsClientBeginResumeOptions) (*runtime.Poller[LabelingJobsClientResumeResponse], error)` +- New function `*MLAssistConfiguration.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `*MLAssistConfigurationDisabled.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `*MLAssistConfigurationEnabled.GetMLAssistConfiguration() *MLAssistConfiguration` +- New function `*ModelVersionsClient.BeginPackage(context.Context, string, string, string, string, PackageRequest, *ModelVersionsClientBeginPackageOptions) (*runtime.Poller[ModelVersionsClientPackageResponse], error)` +- New function `*PackageInputPathBase.GetPackageInputPathBase() *PackageInputPathBase` +- New function `*PackageInputPathID.GetPackageInputPathBase() *PackageInputPathBase` +- New function `*PackageInputPathURL.GetPackageInputPathBase() *PackageInputPathBase` +- New function `*PackageInputPathVersion.GetPackageInputPathBase() *PackageInputPathBase` +- New function `NewRegistriesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistriesClient, error)` +- New function `*RegistriesClient.BeginCreateOrUpdate(context.Context, string, string, Registry, *RegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistriesClientCreateOrUpdateResponse], error)` +- New function `*RegistriesClient.BeginDelete(context.Context, string, string, *RegistriesClientBeginDeleteOptions) (*runtime.Poller[RegistriesClientDeleteResponse], error)` +- New function `*RegistriesClient.Get(context.Context, string, string, *RegistriesClientGetOptions) (RegistriesClientGetResponse, error)` +- New function `*RegistriesClient.NewListBySubscriptionPager(*RegistriesClientListBySubscriptionOptions) *runtime.Pager[RegistriesClientListBySubscriptionResponse]` +- New function `*RegistriesClient.NewListPager(string, *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse]` +- New function `*RegistriesClient.BeginUpdate(context.Context, string, string, PartialRegistryPartialTrackedResource, *RegistriesClientBeginUpdateOptions) (*runtime.Poller[RegistriesClientUpdateResponse], error)` +- New function `NewRegistryCodeContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryCodeContainersClient, error)` +- New function `*RegistryCodeContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, CodeContainer, *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryCodeContainersClient.BeginDelete(context.Context, string, string, string, *RegistryCodeContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeContainersClientDeleteResponse], error)` +- New function `*RegistryCodeContainersClient.Get(context.Context, string, string, string, *RegistryCodeContainersClientGetOptions) (RegistryCodeContainersClientGetResponse, error)` +- New function `*RegistryCodeContainersClient.NewListPager(string, string, *RegistryCodeContainersClientListOptions) *runtime.Pager[RegistryCodeContainersClientListResponse]` +- New function `NewRegistryCodeVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryCodeVersionsClient, error)` +- New function `*RegistryCodeVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, CodeVersion, *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryCodeVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryCodeVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeVersionsClientDeleteResponse], error)` +- New function `*RegistryCodeVersionsClient.Get(context.Context, string, string, string, string, *RegistryCodeVersionsClientGetOptions) (RegistryCodeVersionsClientGetResponse, error)` +- New function `*RegistryCodeVersionsClient.NewListPager(string, string, string, *RegistryCodeVersionsClientListOptions) *runtime.Pager[RegistryCodeVersionsClientListResponse]` +- New function `NewRegistryComponentContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryComponentContainersClient, error)` +- New function `*RegistryComponentContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, ComponentContainer, *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryComponentContainersClient.BeginDelete(context.Context, string, string, string, *RegistryComponentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentContainersClientDeleteResponse], error)` +- New function `*RegistryComponentContainersClient.Get(context.Context, string, string, string, *RegistryComponentContainersClientGetOptions) (RegistryComponentContainersClientGetResponse, error)` +- New function `*RegistryComponentContainersClient.NewListPager(string, string, *RegistryComponentContainersClientListOptions) *runtime.Pager[RegistryComponentContainersClientListResponse]` +- New function `NewRegistryComponentVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryComponentVersionsClient, error)` +- New function `*RegistryComponentVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, ComponentVersion, *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryComponentVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryComponentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentVersionsClientDeleteResponse], error)` +- New function `*RegistryComponentVersionsClient.Get(context.Context, string, string, string, string, *RegistryComponentVersionsClientGetOptions) (RegistryComponentVersionsClientGetResponse, error)` +- New function `*RegistryComponentVersionsClient.NewListPager(string, string, string, *RegistryComponentVersionsClientListOptions) *runtime.Pager[RegistryComponentVersionsClientListResponse]` +- New function `NewRegistryDataContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryDataContainersClient, error)` +- New function `*RegistryDataContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, DataContainer, *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryDataContainersClient.BeginDelete(context.Context, string, string, string, *RegistryDataContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryDataContainersClientDeleteResponse], error)` +- New function `*RegistryDataContainersClient.Get(context.Context, string, string, string, *RegistryDataContainersClientGetOptions) (RegistryDataContainersClientGetResponse, error)` +- New function `*RegistryDataContainersClient.NewListPager(string, string, *RegistryDataContainersClientListOptions) *runtime.Pager[RegistryDataContainersClientListResponse]` +- New function `NewRegistryDataVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryDataVersionsClient, error)` +- New function `*RegistryDataVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, DataVersionBase, *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryDataVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryDataVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryDataVersionsClientDeleteResponse], error)` +- New function `*RegistryDataVersionsClient.Get(context.Context, string, string, string, string, *RegistryDataVersionsClientGetOptions) (RegistryDataVersionsClientGetResponse, error)` +- New function `*RegistryDataVersionsClient.NewListPager(string, string, string, *RegistryDataVersionsClientListOptions) *runtime.Pager[RegistryDataVersionsClientListResponse]` +- New function `NewRegistryEnvironmentContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryEnvironmentContainersClient, error)` +- New function `*RegistryEnvironmentContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, EnvironmentContainer, *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryEnvironmentContainersClient.BeginDelete(context.Context, string, string, string, *RegistryEnvironmentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentContainersClientDeleteResponse], error)` +- New function `*RegistryEnvironmentContainersClient.Get(context.Context, string, string, string, *RegistryEnvironmentContainersClientGetOptions) (RegistryEnvironmentContainersClientGetResponse, error)` +- New function `*RegistryEnvironmentContainersClient.NewListPager(string, string, *RegistryEnvironmentContainersClientListOptions) *runtime.Pager[RegistryEnvironmentContainersClientListResponse]` +- New function `NewRegistryEnvironmentVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryEnvironmentVersionsClient, error)` +- New function `*RegistryEnvironmentVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, EnvironmentVersion, *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryEnvironmentVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientDeleteResponse], error)` +- New function `*RegistryEnvironmentVersionsClient.Get(context.Context, string, string, string, string, *RegistryEnvironmentVersionsClientGetOptions) (RegistryEnvironmentVersionsClientGetResponse, error)` +- New function `*RegistryEnvironmentVersionsClient.NewListPager(string, string, string, *RegistryEnvironmentVersionsClientListOptions) *runtime.Pager[RegistryEnvironmentVersionsClientListResponse]` +- New function `NewRegistryModelContainersClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryModelContainersClient, error)` +- New function `*RegistryModelContainersClient.BeginCreateOrUpdate(context.Context, string, string, string, ModelContainer, *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelContainersClientCreateOrUpdateResponse], error)` +- New function `*RegistryModelContainersClient.BeginDelete(context.Context, string, string, string, *RegistryModelContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryModelContainersClientDeleteResponse], error)` +- New function `*RegistryModelContainersClient.Get(context.Context, string, string, string, *RegistryModelContainersClientGetOptions) (RegistryModelContainersClientGetResponse, error)` +- New function `*RegistryModelContainersClient.NewListPager(string, string, *RegistryModelContainersClientListOptions) *runtime.Pager[RegistryModelContainersClientListResponse]` +- New function `NewRegistryModelVersionsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*RegistryModelVersionsClient, error)` +- New function `*RegistryModelVersionsClient.BeginCreateOrUpdate(context.Context, string, string, string, string, ModelVersion, *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelVersionsClientCreateOrUpdateResponse], error)` +- New function `*RegistryModelVersionsClient.BeginDelete(context.Context, string, string, string, string, *RegistryModelVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryModelVersionsClientDeleteResponse], error)` +- New function `*RegistryModelVersionsClient.Get(context.Context, string, string, string, string, *RegistryModelVersionsClientGetOptions) (RegistryModelVersionsClientGetResponse, error)` +- New function `*RegistryModelVersionsClient.NewListPager(string, string, string, *RegistryModelVersionsClientListOptions) *runtime.Pager[RegistryModelVersionsClientListResponse]` +- New function `*ServicePrincipalAuthTypeWorkspaceConnectionProperties.GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2` +- New function `*SparkJob.GetJobBaseProperties() *JobBaseProperties` +- New function `*SparkJobEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*SparkJobPythonEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*SparkJobScalaEntry.GetSparkJobEntry() *SparkJobEntry` +- New function `*TritonInferencingServer.GetInferencingServer() *InferencingServer` +- New function `*Nodes.GetNodes() *Nodes` +- New struct `AccessKeyAuthTypeWorkspaceConnectionProperties` +- New struct `AcrDetails` +- New struct `AllNodes` +- New struct `ArmResourceID` +- New struct `AutologgerSettings` +- New struct `AzureDatastore` +- New struct `AzureMLBatchInferencingServer` +- New struct `AzureMLOnlineInferencingServer` +- New struct `BaseEnvironmentID` +- New struct `BatchPipelineComponentDeploymentConfiguration` +- New struct `BindOptions` +- New struct `CSVExportSummary` +- New struct `CocoExportSummary` +- New struct `ComputeInstanceAutologgerSettings` +- New struct `ComputeRuntimeDto` +- New struct `CustomInferencingServer` +- New struct `CustomService` +- New struct `DatasetExportSummary` +- New struct `Docker` +- New struct `EncryptionKeyVaultUpdateProperties` +- New struct `EncryptionUpdateProperties` +- New struct `Endpoint` +- New struct `EnvironmentVariable` +- New struct `Feature` +- New struct `FeatureArmPaginatedResult` +- New struct `FeatureStoreSettings` +- New struct `FeatureWindow` +- New struct `FeaturesetContainer` +- New struct `FeaturesetContainerProperties` +- New struct `FeaturesetContainerResourceArmPaginatedResult` +- New struct `FeaturesetContainersClient` +- New struct `FeaturesetJob` +- New struct `FeaturesetJobArmPaginatedResult` +- New struct `FeaturesetSpecification` +- New struct `FeaturesetVersion` +- New struct `FeaturesetVersionBackfillRequest` +- New struct `FeaturesetVersionBackfillResponse` +- New struct `FeaturesetVersionProperties` +- New struct `FeaturesetVersionResourceArmPaginatedResult` +- New struct `FeaturesetVersionsClient` +- New struct `FeaturestoreEntityContainer` +- New struct `FeaturestoreEntityContainerProperties` +- New struct `FeaturestoreEntityContainerResourceArmPaginatedResult` +- New struct `FeaturestoreEntityContainersClient` +- New struct `FeaturestoreEntityVersion` +- New struct `FeaturestoreEntityVersionProperties` +- New struct `FeaturestoreEntityVersionResourceArmPaginatedResult` +- New struct `FeaturestoreEntityVersionsClient` +- New struct `GetFeatureRequest` +- New struct `HdfsDatastore` +- New struct `IdleShutdownSetting` +- New struct `Image` +- New struct `ImageMetadata` +- New struct `IndexColumn` +- New struct `KerberosCredentials` +- New struct `KerberosKeytabCredentials` +- New struct `KerberosKeytabSecrets` +- New struct `KerberosPasswordCredentials` +- New struct `KerberosPasswordSecrets` +- New struct `LabelCategory` +- New struct `LabelClass` +- New struct `LabelingDataConfiguration` +- New struct `LabelingJob` +- New struct `LabelingJobImageProperties` +- New struct `LabelingJobInstructions` +- New struct `LabelingJobProperties` +- New struct `LabelingJobResourceArmPaginatedResult` +- New struct `LabelingJobTextProperties` +- New struct `LabelingJobsClient` +- New struct `MLAssistConfigurationDisabled` +- New struct `MLAssistConfigurationEnabled` +- New struct `MaterializationComputeResource` +- New struct `MaterializationSettings` +- New struct `ModelConfiguration` +- New struct `ModelPackageInput` +- New struct `NlpFixedParameters` +- New struct `NlpParameterSubspace` +- New struct `NlpSweepSettings` +- New struct `NotificationSetting` +- New struct `OnlineInferenceConfiguration` +- New struct `PackageInputPathID` +- New struct `PackageInputPathURL` +- New struct `PackageInputPathVersion` +- New struct `PackageRequest` +- New struct `PackageResponse` +- New struct `PartialRegistryPartialTrackedResource` +- New struct `ProgressMetrics` +- New struct `QueueSettings` +- New struct `RegistriesClient` +- New struct `Registry` +- New struct `RegistryCodeContainersClient` +- New struct `RegistryCodeVersionsClient` +- New struct `RegistryComponentContainersClient` +- New struct `RegistryComponentVersionsClient` +- New struct `RegistryDataContainersClient` +- New struct `RegistryDataVersionsClient` +- New struct `RegistryEnvironmentContainersClient` +- New struct `RegistryEnvironmentVersionsClient` +- New struct `RegistryModelContainersClient` +- New struct `RegistryModelVersionsClient` +- New struct `RegistryProperties` +- New struct `RegistryRegionArmDetails` +- New struct `RegistryTrackedResourceArmPaginatedResult` +- New struct `ServicePrincipalAuthTypeWorkspaceConnectionProperties` +- New struct `SparkJob` +- New struct `SparkJobPythonEntry` +- New struct `SparkJobScalaEntry` +- New struct `SparkResourceConfiguration` +- New struct `StatusMessage` +- New struct `StorageAccountDetails` +- New struct `SystemCreatedAcrAccount` +- New struct `SystemCreatedStorageAccount` +- New struct `TableFixedParameters` +- New struct `TableParameterSubspace` +- New struct `TableSweepSettings` +- New struct `TmpfsOptions` +- New struct `TritonInferencingServer` +- New struct `UserCreatedAcrAccount` +- New struct `UserCreatedStorageAccount` +- New struct `VolumeDefinition` +- New struct `VolumeOptions` +- New struct `WorkspaceConnectionAccessKey` +- New struct `WorkspaceConnectionServicePrincipal` +- New field `AssetName` in struct `AssetJobOutput` +- New field `AssetVersion` in struct `AssetJobOutput` +- New field `NotificationSetting` in struct `AutoMLJob` +- New field `QueueSettings` in struct `AutoMLJob` +- New field `ResourceGroup` in struct `AzureBlobDatastore` +- New field `SubscriptionID` in struct `AzureBlobDatastore` +- New field `ResourceGroup` in struct `AzureDataLakeGen1Datastore` +- New field `SubscriptionID` in struct `AzureDataLakeGen1Datastore` +- New field `ResourceGroup` in struct `AzureDataLakeGen2Datastore` +- New field `SubscriptionID` in struct `AzureDataLakeGen2Datastore` +- New field `ResourceGroup` in struct `AzureFileDatastore` +- New field `SubscriptionID` in struct `AzureFileDatastore` +- New field `DeploymentConfiguration` in struct `BatchDeploymentProperties` +- New field `FixedParameters` in struct `Classification` +- New field `SearchSpace` in struct `Classification` +- New field `SweepSettings` in struct `Classification` +- New field `TrainingMode` in struct `ClassificationTrainingSettings` +- New field `ProvisioningState` in struct `CodeContainerProperties` +- New field `ProvisioningState` in struct `CodeVersionProperties` +- New field `AutologgerSettings` in struct `CommandJob` +- New field `NotificationSetting` in struct `CommandJob` +- New field `QueueSettings` in struct `CommandJob` +- New field `ProvisioningState` in struct `ComponentContainerProperties` +- New field `ProvisioningState` in struct `ComponentVersionProperties` +- New field `AutologgerSettings` in struct `ComputeInstanceProperties` +- New field `CustomServices` in struct `ComputeInstanceProperties` +- New field `IdleTimeBeforeShutdown` in struct `ComputeInstanceProperties` +- New field `OSImageMetadata` in struct `ComputeInstanceProperties` +- New field `AssetName` in struct `CustomModelJobOutput` +- New field `AssetVersion` in struct `CustomModelJobOutput` +- New field `Locations` in struct `DeploymentResourceConfiguration` +- New field `ProvisioningState` in struct `EnvironmentContainerProperties` +- New field `ProvisioningState` in struct `EnvironmentVersionProperties` +- New field `FixedParameters` in struct `Forecasting` +- New field `SearchSpace` in struct `Forecasting` +- New field `SweepSettings` in struct `Forecasting` +- New field `TrainingMode` in struct `ForecastingTrainingSettings` +- New field `Locations` in struct `JobResourceConfiguration` +- New field `Nodes` in struct `JobService` +- New field `AssetName` in struct `JobsClientListOptions` +- New field `ScheduleID` in struct `JobsClientListOptions` +- New field `Scheduled` in struct `JobsClientListOptions` +- New field `AssetName` in struct `MLFlowModelJobOutput` +- New field `AssetVersion` in struct `MLFlowModelJobOutput` +- New field `AssetName` in struct `MLTableJobOutput` +- New field `AssetVersion` in struct `MLTableJobOutput` +- New field `ProvisioningState` in struct `ModelContainerProperties` +- New field `ProvisioningState` in struct `ModelVersionProperties` +- New field `FixedParameters` in struct `NlpVertical` +- New field `SearchSpace` in struct `NlpVertical` +- New field `SweepSettings` in struct `NlpVertical` +- New field `MaxNodes` in struct `NlpVerticalLimitSettings` +- New field `TrialTimeout` in struct `NlpVerticalLimitSettings` +- New field `MirrorTraffic` in struct `OnlineEndpointProperties` +- New field `NotificationSetting` in struct `PipelineJob` +- New field `Logbase` in struct `RandomSamplingAlgorithm` +- New field `FixedParameters` in struct `Regression` +- New field `SearchSpace` in struct `Regression` +- New field `SweepSettings` in struct `Regression` +- New field `TrainingMode` in struct `RegressionTrainingSettings` +- New field `Locations` in struct `ResourceConfiguration` +- New field `NotificationSetting` in struct `SweepJob` +- New field `QueueSettings` in struct `SweepJob` +- New field `FixedParameters` in struct `TableVertical` +- New field `SearchSpace` in struct `TableVertical` +- New field `SweepSettings` in struct `TableVertical` +- New field `MaxNodes` in struct `TableVerticalLimitSettings` +- New field `SweepConcurrentTrials` in struct `TableVerticalLimitSettings` +- New field `SweepTrials` in struct `TableVerticalLimitSettings` +- New field `FixedParameters` in struct `TextClassification` +- New field `SearchSpace` in struct `TextClassification` +- New field `SweepSettings` in struct `TextClassification` +- New field `FixedParameters` in struct `TextClassificationMultilabel` +- New field `SearchSpace` in struct `TextClassificationMultilabel` +- New field `SweepSettings` in struct `TextClassificationMultilabel` +- New field `FixedParameters` in struct `TextNer` +- New field `SearchSpace` in struct `TextNer` +- New field `SweepSettings` in struct `TextNer` +- New field `TrainingMode` in struct `TrainingSettings` +- New field `AssetName` in struct `TritonModelJobOutput` +- New field `AssetVersion` in struct `TritonModelJobOutput` +- New field `AssetName` in struct `URIFileJobOutput` +- New field `AssetVersion` in struct `URIFileJobOutput` +- New field `AssetName` in struct `URIFolderJobOutput` +- New field `AssetVersion` in struct `URIFolderJobOutput` +- New field `Kind` in struct `Workspace` +- New field `FeatureStoreSettings` in struct `WorkspaceProperties` +- New field `ScheduledPurgeDate` in struct `WorkspaceProperties` +- New field `SoftDeleteRetentionInDays` in struct `WorkspaceProperties` +- New field `SoftDeletedAt` in struct `WorkspaceProperties` +- New field `SystemDatastoresAuthMode` in struct `WorkspaceProperties` +- New field `Encryption` in struct `WorkspacePropertiesUpdateParameters` +- New field `FeatureStoreSettings` in struct `WorkspacePropertiesUpdateParameters` +- New field `ForceToPurge` in struct `WorkspacesClientBeginDeleteOptions` +- New field `Kind` in struct `WorkspacesClientListByResourceGroupOptions` +- New field `Kind` in struct `WorkspacesClientListBySubscriptionOptions` + + ## 3.0.0 (2022-11-01) ### Breaking Changes diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md b/sdk/resourcemanager/machinelearning/armmachinelearning/autorest.md index 937b9ce73620..1a899a1f5dec 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/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/specification/machinelearningservices/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/aafb0944f7ab936e8cfbad8969bd5eb32263fb4f/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: 3.0.0 +module-version: 3.1.0-beta.1 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go index ade81dad72a7..e8662ec23f90 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client.go @@ -33,9 +33,9 @@ type BatchDeploymentsClient struct { } // NewBatchDeploymentsClient creates a new instance of BatchDeploymentsClient 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. +// - 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 NewBatchDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BatchDeploymentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,21 +58,24 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name -// deploymentName - The identifier for the Batch inference deployment. -// body - Batch inference deployment definition object. -// options - BatchDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the BatchDeploymentsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-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 +// - deploymentName - The identifier for the Batch inference deployment. +// - body - Batch inference deployment definition object. +// - options - BatchDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the BatchDeploymentsClient.BeginCreateOrUpdate +// method. func (client *BatchDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body BatchDeployment, options *BatchDeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BatchDeploymentsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) if err != nil { return nil, err } - return runtime.NewPoller[BatchDeploymentsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BatchDeploymentsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) } else { return runtime.NewPollerFromResumeToken[BatchDeploymentsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } @@ -80,7 +83,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -124,7 +128,7 @@ func (client *BatchDeploymentsClient) createOrUpdateCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -132,20 +136,23 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Endpoint name -// deploymentName - Inference deployment identifier. -// options - BatchDeploymentsClientBeginDeleteOptions contains the optional parameters for the BatchDeploymentsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - endpointName - Endpoint name +// - deploymentName - Inference deployment identifier. +// - options - BatchDeploymentsClientBeginDeleteOptions contains the optional parameters for the BatchDeploymentsClient.BeginDelete +// method. func (client *BatchDeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *BatchDeploymentsClientBeginDeleteOptions) (*runtime.Poller[BatchDeploymentsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, options) if err != nil { return nil, err } - return runtime.NewPoller[BatchDeploymentsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BatchDeploymentsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[BatchDeploymentsClientDeleteResponse](options.ResumeToken, client.pl, nil) } @@ -153,7 +160,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -197,7 +205,7 @@ func (client *BatchDeploymentsClient) deleteCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -205,12 +213,13 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Endpoint name -// deploymentName - The identifier for the Batch deployments. -// options - BatchDeploymentsClientGetOptions contains the optional parameters for the BatchDeploymentsClient.Get method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - endpointName - Endpoint name +// - deploymentName - The identifier for the Batch deployments. +// - options - BatchDeploymentsClientGetOptions contains the optional parameters for the BatchDeploymentsClient.Get method. func (client *BatchDeploymentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *BatchDeploymentsClientGetOptions) (BatchDeploymentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, options) if err != nil { @@ -254,7 +263,7 @@ func (client *BatchDeploymentsClient) getCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -270,11 +279,13 @@ func (client *BatchDeploymentsClient) getHandleResponse(resp *http.Response) (Ba } // NewListPager - Lists Batch inference deployments in the workspace. -// Generated from API version 2022-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Endpoint name -// options - BatchDeploymentsClientListOptions contains the optional parameters for the BatchDeploymentsClient.List method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - endpointName - Endpoint name +// - options - BatchDeploymentsClientListOptions contains the optional parameters for the BatchDeploymentsClient.NewListPager +// method. func (client *BatchDeploymentsClient) NewListPager(resourceGroupName string, workspaceName string, endpointName string, options *BatchDeploymentsClientListOptions) *runtime.Pager[BatchDeploymentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BatchDeploymentsClientListResponse]{ More: func(page BatchDeploymentsClientListResponse) bool { @@ -327,7 +338,7 @@ func (client *BatchDeploymentsClient) listCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } @@ -353,14 +364,15 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name -// deploymentName - The identifier for the Batch inference deployment. -// body - Batch inference deployment definition object. -// options - BatchDeploymentsClientBeginUpdateOptions contains the optional parameters for the BatchDeploymentsClient.BeginUpdate -// method. +// +// Generated from API version 2023-02-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 +// - deploymentName - The identifier for the Batch inference deployment. +// - body - Batch inference deployment definition object. +// - options - BatchDeploymentsClientBeginUpdateOptions contains the optional parameters for the BatchDeploymentsClient.BeginUpdate +// method. func (client *BatchDeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties, options *BatchDeploymentsClientBeginUpdateOptions) (*runtime.Poller[BatchDeploymentsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) @@ -375,7 +387,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 +432,7 @@ func (client *BatchDeploymentsClient) updateCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/batchdeployments_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client_example_test.go deleted file mode 100644 index fbfe62d400e7..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchdeployments_client_example_test.go +++ /dev/null @@ -1,191 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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-10-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.DeploymentResourceConfiguration{ - 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/batchendpoints_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go index cd85ebcccb84..84b0c60b6385 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client.go @@ -33,9 +33,9 @@ type BatchEndpointsClient struct { } // NewBatchEndpointsClient creates a new instance of BatchEndpointsClient 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. +// - 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 NewBatchEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BatchEndpointsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,20 +58,23 @@ 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-10-01 -// 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. -// body - Batch inference endpoint definition object. -// options - BatchEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the BatchEndpointsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - body - Batch inference endpoint definition object. +// - options - BatchEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the BatchEndpointsClient.BeginCreateOrUpdate +// method. func (client *BatchEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body BatchEndpoint, options *BatchEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[BatchEndpointsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, endpointName, body, options) if err != nil { return nil, err } - return runtime.NewPoller[BatchEndpointsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BatchEndpointsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) } else { return runtime.NewPollerFromResumeToken[BatchEndpointsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } @@ -79,7 +82,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -119,7 +123,7 @@ func (client *BatchEndpointsClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -127,19 +131,22 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference Endpoint name. -// options - BatchEndpointsClientBeginDeleteOptions contains the optional parameters for the BatchEndpointsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-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. +// - options - BatchEndpointsClientBeginDeleteOptions contains the optional parameters for the BatchEndpointsClient.BeginDelete +// method. func (client *BatchEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *BatchEndpointsClientBeginDeleteOptions) (*runtime.Poller[BatchEndpointsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { return nil, err } - return runtime.NewPoller[BatchEndpointsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[BatchEndpointsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[BatchEndpointsClientDeleteResponse](options.ResumeToken, client.pl, nil) } @@ -147,7 +154,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -187,7 +195,7 @@ func (client *BatchEndpointsClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -195,11 +203,12 @@ 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-10-01 -// 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. -// options - BatchEndpointsClientGetOptions contains the optional parameters for the BatchEndpointsClient.Get method. +// +// Generated from API version 2023-02-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. +// - options - BatchEndpointsClientGetOptions contains the optional parameters for the BatchEndpointsClient.Get method. func (client *BatchEndpointsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *BatchEndpointsClientGetOptions) (BatchEndpointsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { @@ -239,7 +248,7 @@ func (client *BatchEndpointsClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,10 +264,11 @@ func (client *BatchEndpointsClient) getHandleResponse(resp *http.Response) (Batc } // NewListPager - Lists Batch inference endpoint in the workspace. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager method. func (client *BatchEndpointsClient) NewListPager(resourceGroupName string, workspaceName string, options *BatchEndpointsClientListOptions) *runtime.Pager[BatchEndpointsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[BatchEndpointsClientListResponse]{ More: func(page BatchEndpointsClientListResponse) bool { @@ -307,7 +317,7 @@ func (client *BatchEndpointsClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -330,11 +340,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference Endpoint name. -// options - BatchEndpointsClientListKeysOptions contains the optional parameters for the BatchEndpointsClient.ListKeys method. +// +// Generated from API version 2023-02-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. +// - options - BatchEndpointsClientListKeysOptions contains the optional parameters for the BatchEndpointsClient.ListKeys method. func (client *BatchEndpointsClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *BatchEndpointsClientListKeysOptions) (BatchEndpointsClientListKeysResponse, error) { req, err := client.listKeysCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { @@ -374,7 +385,7 @@ func (client *BatchEndpointsClient) listKeysCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -391,13 +402,14 @@ 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-10-01 -// 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. -// body - Mutable batch inference endpoint definition object. -// options - BatchEndpointsClientBeginUpdateOptions contains the optional parameters for the BatchEndpointsClient.BeginUpdate -// method. +// +// Generated from API version 2023-02-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. +// - body - Mutable batch inference endpoint definition object. +// - options - BatchEndpointsClientBeginUpdateOptions contains the optional parameters for the BatchEndpointsClient.BeginUpdate +// method. func (client *BatchEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *BatchEndpointsClientBeginUpdateOptions) (*runtime.Poller[BatchEndpointsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, endpointName, body, options) @@ -412,7 +424,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 +465,7 @@ func (client *BatchEndpointsClient) updateCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/batchendpoints_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client_example_test.go deleted file mode 100644 index 1aec4c17aa10..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/batchendpoints_client_example_test.go +++ /dev/null @@ -1,184 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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-10-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-10-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/codecontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go index 37ee91f56081..08eafca1fa72 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client.go @@ -32,9 +32,9 @@ type CodeContainersClient struct { } // NewCodeContainersClient creates a new instance of CodeContainersClient 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. +// - 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 NewCodeContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CodeContainersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ 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-10-01 -// 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. -// body - Container entity to create or update. -// options - CodeContainersClientCreateOrUpdateOptions contains the optional parameters for the CodeContainersClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - body - Container entity to create or update. +// - options - CodeContainersClientCreateOrUpdateOptions contains the optional parameters for the CodeContainersClient.CreateOrUpdate +// method. func (client *CodeContainersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body CodeContainer, options *CodeContainersClientCreateOrUpdateOptions) (CodeContainersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) if err != nil { @@ -103,7 +104,7 @@ func (client *CodeContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -120,11 +121,12 @@ 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-10-01 -// 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. -// options - CodeContainersClientDeleteOptions contains the optional parameters for the CodeContainersClient.Delete method. +// +// Generated from API version 2023-02-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. +// - options - CodeContainersClientDeleteOptions contains the optional parameters for the CodeContainersClient.Delete method. func (client *CodeContainersClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *CodeContainersClientDeleteOptions) (CodeContainersClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -164,7 +166,7 @@ func (client *CodeContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,11 +174,12 @@ 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-10-01 -// 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. -// options - CodeContainersClientGetOptions contains the optional parameters for the CodeContainersClient.Get method. +// +// Generated from API version 2023-02-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. +// - options - CodeContainersClientGetOptions contains the optional parameters for the CodeContainersClient.Get method. func (client *CodeContainersClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *CodeContainersClientGetOptions) (CodeContainersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -216,7 +219,7 @@ func (client *CodeContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,10 +235,11 @@ func (client *CodeContainersClient) getHandleResponse(resp *http.Response) (Code } // NewListPager - List containers. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager method. func (client *CodeContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *CodeContainersClientListOptions) *runtime.Pager[CodeContainersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CodeContainersClientListResponse]{ More: func(page CodeContainersClientListResponse) bool { @@ -284,7 +288,7 @@ func (client *CodeContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client_example_test.go deleted file mode 100644 index 7d3f0ae71932..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codecontainers_client_example_test.go +++ /dev/null @@ -1,105 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/codeversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go index b0c03608d0e7..0d3e595b7b3b 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client.go @@ -33,9 +33,9 @@ type CodeVersionsClient struct { } // NewCodeVersionsClient creates a new instance of CodeVersionsClient 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. +// - 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 NewCodeVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CodeVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// body - Version entity to create or update. -// options - CodeVersionsClientCreateOrUpdateOptions contains the optional parameters for the CodeVersionsClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - body - Version entity to create or update. +// - options - CodeVersionsClientCreateOrUpdateOptions contains the optional parameters for the CodeVersionsClient.CreateOrUpdate +// method. func (client *CodeVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body CodeVersion, options *CodeVersionsClientCreateOrUpdateOptions) (CodeVersionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) if err != nil { @@ -109,7 +110,7 @@ func (client *CodeVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,12 +127,13 @@ 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-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// options - CodeVersionsClientDeleteOptions contains the optional parameters for the CodeVersionsClient.Delete method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - CodeVersionsClientDeleteOptions contains the optional parameters for the CodeVersionsClient.Delete method. func (client *CodeVersionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *CodeVersionsClientDeleteOptions) (CodeVersionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -175,7 +177,7 @@ func (client *CodeVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,12 +185,13 @@ 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-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// options - CodeVersionsClientGetOptions contains the optional parameters for the CodeVersionsClient.Get method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - CodeVersionsClientGetOptions contains the optional parameters for the CodeVersionsClient.Get method. func (client *CodeVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *CodeVersionsClientGetOptions) (CodeVersionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -232,7 +235,7 @@ func (client *CodeVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,11 +251,12 @@ func (client *CodeVersionsClient) getHandleResponse(resp *http.Response) (CodeVe } // NewListPager - List versions. -// Generated from API version 2022-10-01 -// 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. -// options - CodeVersionsClientListOptions contains the optional parameters for the CodeVersionsClient.List method. +// +// Generated from API version 2023-02-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. +// - options - CodeVersionsClientListOptions contains the optional parameters for the CodeVersionsClient.NewListPager method. func (client *CodeVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *CodeVersionsClientListOptions) *runtime.Pager[CodeVersionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[CodeVersionsClientListResponse]{ More: func(page CodeVersionsClientListResponse) bool { @@ -305,7 +309,7 @@ func (client *CodeVersionsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client_example_test.go deleted file mode 100644 index 9cad1ae515df..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/codeversions_client_example_test.go +++ /dev/null @@ -1,112 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/componentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go index 03947262bfe6..86837d7f72bc 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client.go @@ -32,9 +32,9 @@ type ComponentContainersClient struct { } // NewComponentContainersClient creates a new instance of ComponentContainersClient 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. +// - 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 NewComponentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentContainersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// body - Container entity to create or update. -// options - ComponentContainersClientCreateOrUpdateOptions contains the optional parameters for the ComponentContainersClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - body - Container entity to create or update. +// - options - ComponentContainersClientCreateOrUpdateOptions contains the optional parameters for the ComponentContainersClient.CreateOrUpdate +// method. func (client *ComponentContainersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body ComponentContainer, options *ComponentContainersClientCreateOrUpdateOptions) (ComponentContainersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) if err != nil { @@ -103,7 +104,7 @@ func (client *ComponentContainersClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -120,12 +121,13 @@ func (client *ComponentContainersClient) createOrUpdateHandleResponse(resp *http // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// options - ComponentContainersClientDeleteOptions contains the optional parameters for the ComponentContainersClient.Delete -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - options - ComponentContainersClientDeleteOptions contains the optional parameters for the ComponentContainersClient.Delete +// method. func (client *ComponentContainersClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ComponentContainersClientDeleteOptions) (ComponentContainersClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -165,7 +167,7 @@ func (client *ComponentContainersClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,11 +175,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// options - ComponentContainersClientGetOptions contains the optional parameters for the ComponentContainersClient.Get method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - options - ComponentContainersClientGetOptions contains the optional parameters for the ComponentContainersClient.Get method. func (client *ComponentContainersClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ComponentContainersClientGetOptions) (ComponentContainersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -217,7 +220,7 @@ func (client *ComponentContainersClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,11 +236,12 @@ func (client *ComponentContainersClient) getHandleResponse(resp *http.Response) } // NewListPager - List component containers. -// Generated from API version 2022-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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.NewListPager +// method. func (client *ComponentContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *ComponentContainersClientListOptions) *runtime.Pager[ComponentContainersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ComponentContainersClientListResponse]{ More: func(page ComponentContainersClientListResponse) bool { @@ -286,7 +290,7 @@ func (client *ComponentContainersClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client_example_test.go deleted file mode 100644 index bd9a66f7c1f8..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentcontainers_client_example_test.go +++ /dev/null @@ -1,109 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/componentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go index 36fc991e4f54..d922e9707f1b 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client.go @@ -33,9 +33,9 @@ type ComponentVersionsClient struct { } // NewComponentVersionsClient creates a new instance of ComponentVersionsClient 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. +// - 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 NewComponentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComponentVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// version - Version identifier. -// body - Version entity to create or update. -// options - ComponentVersionsClientCreateOrUpdateOptions contains the optional parameters for the ComponentVersionsClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - ComponentVersionsClientCreateOrUpdateOptions contains the optional parameters for the ComponentVersionsClient.CreateOrUpdate +// method. func (client *ComponentVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body ComponentVersion, options *ComponentVersionsClientCreateOrUpdateOptions) (ComponentVersionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) if err != nil { @@ -109,7 +110,7 @@ func (client *ComponentVersionsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,13 +127,14 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// version - Version identifier. -// options - ComponentVersionsClientDeleteOptions contains the optional parameters for the ComponentVersionsClient.Delete -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - options - ComponentVersionsClientDeleteOptions contains the optional parameters for the ComponentVersionsClient.Delete +// method. func (client *ComponentVersionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *ComponentVersionsClientDeleteOptions) (ComponentVersionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -176,7 +178,7 @@ func (client *ComponentVersionsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,12 +186,13 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// version - Version identifier. -// options - ComponentVersionsClientGetOptions contains the optional parameters for the ComponentVersionsClient.Get method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - options - ComponentVersionsClientGetOptions contains the optional parameters for the ComponentVersionsClient.Get method. func (client *ComponentVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *ComponentVersionsClientGetOptions) (ComponentVersionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -233,7 +236,7 @@ func (client *ComponentVersionsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,11 +252,13 @@ func (client *ComponentVersionsClient) getHandleResponse(resp *http.Response) (C } // NewListPager - List component versions. -// Generated from API version 2022-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Component name. -// options - ComponentVersionsClientListOptions contains the optional parameters for the ComponentVersionsClient.List method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Component name. +// - options - ComponentVersionsClientListOptions contains the optional parameters for the ComponentVersionsClient.NewListPager +// method. func (client *ComponentVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *ComponentVersionsClientListOptions) *runtime.Pager[ComponentVersionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ComponentVersionsClientListResponse]{ More: func(page ComponentVersionsClientListResponse) bool { @@ -306,7 +311,7 @@ func (client *ComponentVersionsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client_example_test.go deleted file mode 100644 index bbb9de004ca4..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/componentversions_client_example_test.go +++ /dev/null @@ -1,115 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/compute_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go index 98f38be6a001..ef3eac443f08 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client.go @@ -32,9 +32,9 @@ type ComputeClient struct { } // NewComputeClient creates a new instance of ComputeClient 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. +// - 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 NewComputeClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ComputeClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -59,13 +59,14 @@ 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-10-01 -// 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 - Payload with Machine Learning compute definition. -// options - ComputeClientBeginCreateOrUpdateOptions contains the optional parameters for the ComputeClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-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 - Payload with Machine Learning compute definition. +// - options - ComputeClientBeginCreateOrUpdateOptions contains the optional parameters for the ComputeClient.BeginCreateOrUpdate +// method. func (client *ComputeClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ComputeResource, options *ComputeClientBeginCreateOrUpdateOptions) (*runtime.Poller[ComputeClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, computeName, parameters, options) @@ -82,7 +83,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -122,7 +124,7 @@ func (client *ComputeClient) createOrUpdateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -130,13 +132,14 @@ 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-10-01 -// 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. -// underlyingResourceAction - Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if -// 'Detach'. -// options - ComputeClientBeginDeleteOptions contains the optional parameters for the ComputeClient.BeginDelete method. +// +// Generated from API version 2023-02-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. +// - underlyingResourceAction - Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if +// 'Detach'. +// - options - ComputeClientBeginDeleteOptions contains the optional parameters for the ComputeClient.BeginDelete method. func (client *ComputeClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, underlyingResourceAction UnderlyingResourceAction, options *ComputeClientBeginDeleteOptions) (*runtime.Poller[ComputeClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, computeName, underlyingResourceAction, options) @@ -151,7 +154,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -191,7 +195,7 @@ func (client *ComputeClient) deleteCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") reqQP.Set("underlyingResourceAction", string(underlyingResourceAction)) req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} @@ -201,11 +205,12 @@ 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-10-01 -// 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. -// options - ComputeClientGetOptions contains the optional parameters for the ComputeClient.Get method. +// +// Generated from API version 2023-02-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. +// - options - ComputeClientGetOptions contains the optional parameters for the ComputeClient.Get method. func (client *ComputeClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientGetOptions) (ComputeClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, computeName, options) if err != nil { @@ -245,7 +250,7 @@ func (client *ComputeClient) getCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -261,10 +266,11 @@ func (client *ComputeClient) getHandleResponse(resp *http.Response) (ComputeClie } // NewListPager - Gets computes in specified workspace. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager method. func (client *ComputeClient) NewListPager(resourceGroupName string, workspaceName string, options *ComputeClientListOptions) *runtime.Pager[ComputeClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ComputeClientListResponse]{ More: func(page ComputeClientListResponse) bool { @@ -313,7 +319,7 @@ func (client *ComputeClient) listCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -333,11 +339,12 @@ 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-10-01 -// 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. -// options - ComputeClientListKeysOptions contains the optional parameters for the ComputeClient.ListKeys method. +// +// Generated from API version 2023-02-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. +// - options - ComputeClientListKeysOptions contains the optional parameters for the ComputeClient.ListKeys method. func (client *ComputeClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientListKeysOptions) (ComputeClientListKeysResponse, error) { req, err := client.listKeysCreateRequest(ctx, resourceGroupName, workspaceName, computeName, options) if err != nil { @@ -377,7 +384,7 @@ func (client *ComputeClient) listKeysCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -393,11 +400,12 @@ 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. -// Generated from API version 2022-10-01 -// 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. -// options - ComputeClientListNodesOptions contains the optional parameters for the ComputeClient.ListNodes method. +// +// Generated from API version 2023-02-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. +// - options - ComputeClientListNodesOptions contains the optional parameters for the ComputeClient.NewListNodesPager method. func (client *ComputeClient) NewListNodesPager(resourceGroupName string, workspaceName string, computeName string, options *ComputeClientListNodesOptions) *runtime.Pager[ComputeClientListNodesResponse] { return runtime.NewPager(runtime.PagingHandler[ComputeClientListNodesResponse]{ More: func(page ComputeClientListNodesResponse) bool { @@ -450,7 +458,7 @@ func (client *ComputeClient) listNodesCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -467,11 +475,12 @@ 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-10-01 -// 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. -// options - ComputeClientBeginRestartOptions contains the optional parameters for the ComputeClient.BeginRestart method. +// +// Generated from API version 2023-02-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. +// - options - ComputeClientBeginRestartOptions contains the optional parameters for the ComputeClient.BeginRestart method. func (client *ComputeClient) BeginRestart(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginRestartOptions) (*runtime.Poller[ComputeClientRestartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.restart(ctx, resourceGroupName, workspaceName, computeName, options) @@ -486,7 +495,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -526,7 +536,7 @@ func (client *ComputeClient) restartCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -534,11 +544,12 @@ 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-10-01 -// 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. -// options - ComputeClientBeginStartOptions contains the optional parameters for the ComputeClient.BeginStart method. +// +// Generated from API version 2023-02-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. +// - options - ComputeClientBeginStartOptions contains the optional parameters for the ComputeClient.BeginStart method. func (client *ComputeClient) BeginStart(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStartOptions) (*runtime.Poller[ComputeClientStartResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.start(ctx, resourceGroupName, workspaceName, computeName, options) @@ -553,7 +564,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -593,7 +605,7 @@ func (client *ComputeClient) startCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -601,11 +613,12 @@ 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-10-01 -// 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. -// options - ComputeClientBeginStopOptions contains the optional parameters for the ComputeClient.BeginStop method. +// +// Generated from API version 2023-02-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. +// - options - ComputeClientBeginStopOptions contains the optional parameters for the ComputeClient.BeginStop method. func (client *ComputeClient) BeginStop(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, options *ComputeClientBeginStopOptions) (*runtime.Poller[ComputeClientStopResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.stop(ctx, resourceGroupName, workspaceName, computeName, options) @@ -620,7 +633,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -660,7 +674,7 @@ func (client *ComputeClient) stopCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -669,12 +683,13 @@ 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-10-01 -// 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 - Additional parameters for cluster update. -// options - ComputeClientBeginUpdateOptions contains the optional parameters for the ComputeClient.BeginUpdate method. +// +// Generated from API version 2023-02-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 - Additional parameters for cluster update. +// - options - ComputeClientBeginUpdateOptions contains the optional parameters for the ComputeClient.BeginUpdate method. func (client *ComputeClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, computeName string, parameters ClusterUpdateParameters, options *ComputeClientBeginUpdateOptions) (*runtime.Poller[ComputeClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, computeName, parameters, options) @@ -689,7 +704,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -729,7 +745,117 @@ func (client *ComputeClient) updateCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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 2023-02-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", "2023-02-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 2023-02-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", "2023-02-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/compute_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client_example_test.go deleted file mode 100644 index 7aa901d0b7b8..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/compute_client_example_test.go +++ /dev/null @@ -1,628 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-01/examples/Compute/get/AKSCompute.json -func ExampleComputeClient_Get_getAAksCompute() { - 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-10-01/examples/Compute/get/AmlCompute.json -func ExampleComputeClient_Get_getAAmlCompute() { - 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-10-01/examples/Compute/get/KubernetesCompute.json -func ExampleComputeClient_Get_getAKubernetesCompute() { - 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-10-01/examples/Compute/get/ComputeInstance.json -func ExampleComputeClient_Get_getAnComputeInstance() { - 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-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json -func ExampleComputeClient_BeginCreateOrUpdate_attachAKubernetesCompute() { - 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-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json -func ExampleComputeClient_BeginCreateOrUpdate_createAAmlCompute() { - 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.AmlCompute{ - Properties: &armmachinelearning.AmlComputeProperties{ - EnableNodePublicIP: to.Ptr(true), - IsolatedNetwork: to.Ptr(false), - OSType: to.Ptr(armmachinelearning.OsTypeWindows), - RemoteLoginPortPublicAccess: to.Ptr(armmachinelearning.RemoteLoginPortPublicAccessNotSpecified), - ScaleSettings: &armmachinelearning.ScaleSettings{ - MaxNodeCount: to.Ptr[int32](1), - MinNodeCount: to.Ptr[int32](0), - NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), - }, - VirtualMachineImage: &armmachinelearning.VirtualMachineImage{ - ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1"), - }, - VMPriority: to.Ptr(armmachinelearning.VMPriorityDedicated), - VMSize: to.Ptr("STANDARD_NC6"), - }, - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), - }, - 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-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json -func ExampleComputeClient_BeginCreateOrUpdate_createADataFactoryCompute() { - 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.DataFactory{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeDataFactory), - }, - 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-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json -func ExampleComputeClient_BeginCreateOrUpdate_createAnAksCompute() { - 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.AKS{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), - }, - 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-10-01/examples/Compute/createOrUpdate/ComputeInstance.json -func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceCompute() { - 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.ComputeInstance{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), - Properties: &armmachinelearning.ComputeInstanceProperties{ - ApplicationSharingPolicy: to.Ptr(armmachinelearning.ApplicationSharingPolicyPersonal), - ComputeInstanceAuthorizationType: to.Ptr(armmachinelearning.ComputeInstanceAuthorizationTypePersonal), - PersonalComputeInstanceSettings: &armmachinelearning.PersonalComputeInstanceSettings{ - AssignedUser: &armmachinelearning.AssignedUser{ - ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), - TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), - }, - }, - SSHSettings: &armmachinelearning.ComputeInstanceSSHSettings{ - SSHPublicAccess: to.Ptr(armmachinelearning.SSHPublicAccessDisabled), - }, - Subnet: &armmachinelearning.ResourceID{ - ID: to.Ptr("test-subnet-resource-id"), - }, - VMSize: to.Ptr("STANDARD_NC6"), - }, - }, - 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-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json -func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWithSchedules() { - 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.ComputeInstance{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), - Properties: &armmachinelearning.ComputeInstanceProperties{ - ApplicationSharingPolicy: to.Ptr(armmachinelearning.ApplicationSharingPolicyPersonal), - ComputeInstanceAuthorizationType: to.Ptr(armmachinelearning.ComputeInstanceAuthorizationTypePersonal), - PersonalComputeInstanceSettings: &armmachinelearning.PersonalComputeInstanceSettings{ - AssignedUser: &armmachinelearning.AssignedUser{ - ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), - TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), - }, - }, - Schedules: &armmachinelearning.ComputeSchedules{ - ComputeStartStop: []*armmachinelearning.ComputeStartStopSchedule{ - { - Action: to.Ptr(armmachinelearning.ComputePowerActionStop), - Cron: &armmachinelearning.CronTrigger{ - StartTime: to.Ptr("2021-04-23T01:30:00"), - TimeZone: to.Ptr("Pacific Standard Time"), - Expression: to.Ptr("0 18 * * *"), - }, - Status: to.Ptr(armmachinelearning.ScheduleStatusEnabled), - TriggerType: to.Ptr(armmachinelearning.TriggerTypeCron), - }}, - }, - SSHSettings: &armmachinelearning.ComputeInstanceSSHSettings{ - SSHPublicAccess: to.Ptr(armmachinelearning.SSHPublicAccessDisabled), - }, - VMSize: to.Ptr("STANDARD_NC6"), - }, - }, - 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-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json -func ExampleComputeClient_BeginCreateOrUpdate_createAnComputeInstanceComputeWithMinimalInputs() { - 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.ComputeInstance{ - ComputeType: to.Ptr(armmachinelearning.ComputeTypeComputeInstance), - Properties: &armmachinelearning.ComputeInstanceProperties{ - VMSize: to.Ptr("STANDARD_NC6"), - }, - }, - 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-10-01/examples/Compute/createOrUpdate/AmlCompute.json -func ExampleComputeClient_BeginCreateOrUpdate_updateAAmlCompute() { - 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.AmlCompute{ - Properties: &armmachinelearning.AmlComputeProperties{ - ScaleSettings: &armmachinelearning.ScaleSettings{ - MaxNodeCount: to.Ptr[int32](4), - MinNodeCount: to.Ptr[int32](4), - NodeIdleTimeBeforeScaleDown: to.Ptr("PT5M"), - }, - }, - Description: to.Ptr("some compute"), - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAmlCompute), - }, - 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-10-01/examples/Compute/createOrUpdate/AKSCompute.json -func ExampleComputeClient_BeginCreateOrUpdate_updateAnAksCompute() { - 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.AKS{ - Properties: &armmachinelearning.AKSSchemaProperties{ - AgentCount: to.Ptr[int32](4), - }, - Description: to.Ptr("some compute"), - ComputeType: to.Ptr(armmachinelearning.ComputeTypeAKS), - ResourceID: to.Ptr("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2"), - }, - 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-10-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-10-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-10-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-10-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-10-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-10-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-10-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/constants.go b/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go index 9167cbccc2d9..e5c06c8f9c9f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/constants.go @@ -11,7 +11,7 @@ package armmachinelearning const ( moduleName = "armmachinelearning" - moduleVersion = "v3.0.0" + moduleVersion = "v3.1.0-beta.1" ) // AllocationState - Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. @@ -52,6 +52,30 @@ func PossibleApplicationSharingPolicyValues() []ApplicationSharingPolicy { } } +// AssetProvisioningState - Provisioning state of registry asset. +type AssetProvisioningState string + +const ( + AssetProvisioningStateCanceled AssetProvisioningState = "Canceled" + AssetProvisioningStateCreating AssetProvisioningState = "Creating" + AssetProvisioningStateDeleting AssetProvisioningState = "Deleting" + AssetProvisioningStateFailed AssetProvisioningState = "Failed" + AssetProvisioningStateSucceeded AssetProvisioningState = "Succeeded" + AssetProvisioningStateUpdating AssetProvisioningState = "Updating" +) + +// PossibleAssetProvisioningStateValues returns the possible values for the AssetProvisioningState const type. +func PossibleAssetProvisioningStateValues() []AssetProvisioningState { + return []AssetProvisioningState{ + AssetProvisioningStateCanceled, + AssetProvisioningStateCreating, + AssetProvisioningStateDeleting, + AssetProvisioningStateFailed, + AssetProvisioningStateSucceeded, + AssetProvisioningStateUpdating, + } +} + // AutoRebuildSetting - AutoRebuild setting for the derived image type AutoRebuildSetting string @@ -86,6 +110,36 @@ func PossibleAutosaveValues() []Autosave { } } +// BaseEnvironmentSourceType - Base environment type. +type BaseEnvironmentSourceType string + +const ( + BaseEnvironmentSourceTypeEnvironmentAsset BaseEnvironmentSourceType = "EnvironmentAsset" +) + +// PossibleBaseEnvironmentSourceTypeValues returns the possible values for the BaseEnvironmentSourceType const type. +func PossibleBaseEnvironmentSourceTypeValues() []BaseEnvironmentSourceType { + return []BaseEnvironmentSourceType{ + BaseEnvironmentSourceTypeEnvironmentAsset, + } +} + +// BatchDeploymentConfigurationType - The enumerated property types for batch deployments. +type BatchDeploymentConfigurationType string + +const ( + BatchDeploymentConfigurationTypeModel BatchDeploymentConfigurationType = "Model" + BatchDeploymentConfigurationTypePipelineComponent BatchDeploymentConfigurationType = "PipelineComponent" +) + +// PossibleBatchDeploymentConfigurationTypeValues returns the possible values for the BatchDeploymentConfigurationType const type. +func PossibleBatchDeploymentConfigurationTypeValues() []BatchDeploymentConfigurationType { + return []BatchDeploymentConfigurationType{ + BatchDeploymentConfigurationTypeModel, + BatchDeploymentConfigurationTypePipelineComponent, + } +} + // BatchLoggingLevel - Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and // Debug. The default value is Info. type BatchLoggingLevel string @@ -239,7 +293,7 @@ const ( // 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 "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 @@ -420,7 +474,7 @@ func PossibleComputeInstanceStateValues() []ComputeInstanceState { } } -// ComputePowerAction - The compute power action. +// ComputePowerAction - [Required] The compute power action. type ComputePowerAction string const ( @@ -472,20 +526,24 @@ func PossibleComputeTypeValues() []ComputeType { type ConnectionAuthType string const ( + ConnectionAuthTypeAccessKey ConnectionAuthType = "AccessKey" ConnectionAuthTypeManagedIdentity ConnectionAuthType = "ManagedIdentity" ConnectionAuthTypeNone ConnectionAuthType = "None" ConnectionAuthTypePAT ConnectionAuthType = "PAT" ConnectionAuthTypeSAS ConnectionAuthType = "SAS" + ConnectionAuthTypeServicePrincipal ConnectionAuthType = "ServicePrincipal" ConnectionAuthTypeUsernamePassword ConnectionAuthType = "UsernamePassword" ) // PossibleConnectionAuthTypeValues returns the possible values for the ConnectionAuthType const type. func PossibleConnectionAuthTypeValues() []ConnectionAuthType { return []ConnectionAuthType{ + ConnectionAuthTypeAccessKey, ConnectionAuthTypeManagedIdentity, ConnectionAuthTypeNone, ConnectionAuthTypePAT, ConnectionAuthTypeSAS, + ConnectionAuthTypeServicePrincipal, ConnectionAuthTypeUsernamePassword, } } @@ -494,24 +552,47 @@ func PossibleConnectionAuthTypeValues() []ConnectionAuthType { type ConnectionCategory string const ( - ConnectionCategoryContainerRegistry ConnectionCategory = "ContainerRegistry" - ConnectionCategoryGit ConnectionCategory = "Git" - ConnectionCategoryPythonFeed ConnectionCategory = "PythonFeed" + ConnectionCategoryAzureDataLakeGen2 ConnectionCategory = "AzureDataLakeGen2" + ConnectionCategoryAzureMySQLDb ConnectionCategory = "AzureMySqlDb" + ConnectionCategoryAzurePostgresDb ConnectionCategory = "AzurePostgresDb" + ConnectionCategoryAzureSQLDb ConnectionCategory = "AzureSqlDb" + ConnectionCategoryAzureSynapseAnalytics ConnectionCategory = "AzureSynapseAnalytics" + ConnectionCategoryContainerRegistry ConnectionCategory = "ContainerRegistry" + ConnectionCategoryFeatureStore ConnectionCategory = "FeatureStore" + ConnectionCategoryGit ConnectionCategory = "Git" + ConnectionCategoryPythonFeed ConnectionCategory = "PythonFeed" + ConnectionCategoryRedis ConnectionCategory = "Redis" + ConnectionCategoryS3 ConnectionCategory = "S3" + ConnectionCategorySnowflake ConnectionCategory = "Snowflake" ) // PossibleConnectionCategoryValues returns the possible values for the ConnectionCategory const type. func PossibleConnectionCategoryValues() []ConnectionCategory { return []ConnectionCategory{ + ConnectionCategoryAzureDataLakeGen2, + ConnectionCategoryAzureMySQLDb, + ConnectionCategoryAzurePostgresDb, + ConnectionCategoryAzureSQLDb, + ConnectionCategoryAzureSynapseAnalytics, ConnectionCategoryContainerRegistry, + ConnectionCategoryFeatureStore, ConnectionCategoryGit, ConnectionCategoryPythonFeed, + ConnectionCategoryRedis, + ConnectionCategoryS3, + ConnectionCategorySnowflake, } } +// ContainerType - The type of container to retrieve logs from. type ContainerType string const ( - ContainerTypeInferenceServer ContainerType = "InferenceServer" + // ContainerTypeInferenceServer - The container used to serve user's request. + ContainerTypeInferenceServer ContainerType = "InferenceServer" + // ContainerTypeModelDataCollector - The container used to collect payload and custom logging when mdc is enabled. + ContainerTypeModelDataCollector ContainerType = "ModelDataCollector" + // ContainerTypeStorageInitializer - The container used to download models and score script. ContainerTypeStorageInitializer ContainerType = "StorageInitializer" ) @@ -519,6 +600,7 @@ const ( func PossibleContainerTypeValues() []ContainerType { return []ContainerType{ ContainerTypeInferenceServer, + ContainerTypeModelDataCollector, ContainerTypeStorageInitializer, } } @@ -549,6 +631,8 @@ 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" @@ -559,6 +643,8 @@ func PossibleCredentialsTypeValues() []CredentialsType { return []CredentialsType{ CredentialsTypeAccountKey, CredentialsTypeCertificate, + CredentialsTypeKerberosKeytab, + CredentialsTypeKerberosPassword, CredentialsTypeNone, CredentialsTypeSas, CredentialsTypeServicePrincipal, @@ -591,6 +677,7 @@ const ( DatastoreTypeAzureDataLakeGen1 DatastoreType = "AzureDataLakeGen1" DatastoreTypeAzureDataLakeGen2 DatastoreType = "AzureDataLakeGen2" DatastoreTypeAzureFile DatastoreType = "AzureFile" + DatastoreTypeHdfs DatastoreType = "Hdfs" ) // PossibleDatastoreTypeValues returns the possible values for the DatastoreType const type. @@ -600,6 +687,7 @@ func PossibleDatastoreTypeValues() []DatastoreType { DatastoreTypeAzureDataLakeGen1, DatastoreTypeAzureDataLakeGen2, DatastoreTypeAzureFile, + DatastoreTypeHdfs, } } @@ -698,6 +786,24 @@ func PossibleEgressPublicNetworkAccessTypeValues() []EgressPublicNetworkAccessTy } } +// EmailNotificationEnableType - Enum to determine the email notification type. +type EmailNotificationEnableType string + +const ( + EmailNotificationEnableTypeJobCancelled EmailNotificationEnableType = "JobCancelled" + EmailNotificationEnableTypeJobCompleted EmailNotificationEnableType = "JobCompleted" + EmailNotificationEnableTypeJobFailed EmailNotificationEnableType = "JobFailed" +) + +// PossibleEmailNotificationEnableTypeValues returns the possible values for the EmailNotificationEnableType const type. +func PossibleEmailNotificationEnableTypeValues() []EmailNotificationEnableType { + return []EmailNotificationEnableType{ + EmailNotificationEnableTypeJobCancelled, + EmailNotificationEnableTypeJobCompleted, + EmailNotificationEnableTypeJobFailed, + } +} + // EncryptionStatus - Indicates whether or not the encryption is enabled for the workspace. type EncryptionStatus string @@ -790,6 +896,65 @@ func PossibleEnvironmentTypeValues() []EnvironmentType { } } +// 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, + } +} + +type FeatureDataType string + +const ( + FeatureDataTypeBinary FeatureDataType = "Binary" + FeatureDataTypeBoolean FeatureDataType = "Boolean" + FeatureDataTypeDatetime FeatureDataType = "Datetime" + FeatureDataTypeDouble FeatureDataType = "Double" + FeatureDataTypeFloat FeatureDataType = "Float" + FeatureDataTypeInteger FeatureDataType = "Integer" + FeatureDataTypeLong FeatureDataType = "Long" + FeatureDataTypeString FeatureDataType = "String" +) + +// PossibleFeatureDataTypeValues returns the possible values for the FeatureDataType const type. +func PossibleFeatureDataTypeValues() []FeatureDataType { + return []FeatureDataType{ + FeatureDataTypeBinary, + FeatureDataTypeBoolean, + FeatureDataTypeDatetime, + FeatureDataTypeDouble, + FeatureDataTypeFloat, + FeatureDataTypeInteger, + FeatureDataTypeLong, + FeatureDataTypeString, + } +} + // FeatureLags - Flag for generating lags for the numeric features. type FeatureLags string @@ -808,6 +973,21 @@ func PossibleFeatureLagsValues() []FeatureLags { } } +type FeaturestoreJobType string + +const ( + FeaturestoreJobTypeBackfillMaterialization FeaturestoreJobType = "BackfillMaterialization" + FeaturestoreJobTypeRecurrentMaterialization FeaturestoreJobType = "RecurrentMaterialization" +) + +// PossibleFeaturestoreJobTypeValues returns the possible values for the FeaturestoreJobType const type. +func PossibleFeaturestoreJobTypeValues() []FeaturestoreJobType { + return []FeaturestoreJobType{ + FeaturestoreJobTypeBackfillMaterialization, + FeaturestoreJobTypeRecurrentMaterialization, + } +} + // FeaturizationMode - Featurization mode - determines data featurization mode. type FeaturizationMode string @@ -898,7 +1078,7 @@ const ( // 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 "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 @@ -1006,6 +1186,76 @@ func PossibleIdentityConfigurationTypeValues() []IdentityConfigurationType { } } +// ImageAnnotationType - Annotation type of image data. +type ImageAnnotationType string + +const ( + ImageAnnotationTypeBoundingBox ImageAnnotationType = "BoundingBox" + ImageAnnotationTypeClassification ImageAnnotationType = "Classification" + ImageAnnotationTypeInstanceSegmentation ImageAnnotationType = "InstanceSegmentation" +) + +// PossibleImageAnnotationTypeValues returns the possible values for the ImageAnnotationType const type. +func PossibleImageAnnotationTypeValues() []ImageAnnotationType { + return []ImageAnnotationType{ + ImageAnnotationTypeBoundingBox, + ImageAnnotationTypeClassification, + ImageAnnotationTypeInstanceSegmentation, + } +} + +// ImageType - Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images +type ImageType string + +const ( + ImageTypeAzureml ImageType = "azureml" + ImageTypeDocker ImageType = "docker" +) + +// PossibleImageTypeValues returns the possible values for the ImageType const type. +func PossibleImageTypeValues() []ImageType { + return []ImageType{ + ImageTypeAzureml, + ImageTypeDocker, + } +} + +// IncrementalDataRefresh - Whether IncrementalDataRefresh is enabled +type IncrementalDataRefresh string + +const ( + IncrementalDataRefreshDisabled IncrementalDataRefresh = "Disabled" + IncrementalDataRefreshEnabled IncrementalDataRefresh = "Enabled" +) + +// PossibleIncrementalDataRefreshValues returns the possible values for the IncrementalDataRefresh const type. +func PossibleIncrementalDataRefreshValues() []IncrementalDataRefresh { + return []IncrementalDataRefresh{ + IncrementalDataRefreshDisabled, + IncrementalDataRefreshEnabled, + } +} + +// InferencingServerType - Inferencing server type for various targets. +type InferencingServerType string + +const ( + InferencingServerTypeAzureMLBatch InferencingServerType = "AzureMLBatch" + InferencingServerTypeAzureMLOnline InferencingServerType = "AzureMLOnline" + InferencingServerTypeCustom InferencingServerType = "Custom" + InferencingServerTypeTriton InferencingServerType = "Triton" +) + +// PossibleInferencingServerTypeValues returns the possible values for the InferencingServerType const type. +func PossibleInferencingServerTypeValues() []InferencingServerType { + return []InferencingServerType{ + InferencingServerTypeAzureMLBatch, + InferencingServerTypeAzureMLOnline, + InferencingServerTypeCustom, + InferencingServerTypeTriton, + } +} + // InputDeliveryMode - Enum to determine the input data delivery mode. type InputDeliveryMode string @@ -1030,6 +1280,24 @@ func PossibleInputDeliveryModeValues() []InputDeliveryMode { } } +// InputPathType - Input path type for package inputs. +type InputPathType string + +const ( + InputPathTypePathID InputPathType = "PathId" + InputPathTypePathVersion InputPathType = "PathVersion" + InputPathTypeURL InputPathType = "Url" +) + +// PossibleInputPathTypeValues returns the possible values for the InputPathType const type. +func PossibleInputPathTypeValues() []InputPathType { + return []InputPathType{ + InputPathTypePathID, + InputPathTypePathVersion, + InputPathTypeURL, + } +} + // InstanceSegmentationPrimaryMetrics - Primary metrics for InstanceSegmentation tasks. type InstanceSegmentationPrimaryMetrics string @@ -1111,6 +1379,26 @@ func PossibleJobOutputTypeValues() []JobOutputType { } } +// 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 @@ -1144,6 +1432,8 @@ const ( 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 @@ -1165,18 +1455,41 @@ func PossibleJobStatusValues() []JobStatus { JobStatusProvisioning, JobStatusQueued, JobStatusRunning, + JobStatusScheduled, JobStatusStarting, JobStatusUnknown, } } +// JobTier - Enum to determine the job tier. +type JobTier string + +const ( + JobTierBasic JobTier = "Basic" + JobTierPremium JobTier = "Premium" + JobTierSpot JobTier = "Spot" + JobTierStandard JobTier = "Standard" +) + +// PossibleJobTierValues returns the possible values for the JobTier const type. +func PossibleJobTierValues() []JobTier { + return []JobTier{ + JobTierBasic, + JobTierPremium, + JobTierSpot, + JobTierStandard, + } +} + // 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" ) @@ -1185,7 +1498,9 @@ func PossibleJobTypeValues() []JobType { return []JobType{ JobTypeAutoML, JobTypeCommand, + JobTypeLabeling, JobTypePipeline, + JobTypeSpark, JobTypeSweep, } } @@ -1289,6 +1604,37 @@ func PossibleLogVerbosityValues() []LogVerbosity { } } +type MLAssistConfigurationType string + +const ( + MLAssistConfigurationTypeDisabled MLAssistConfigurationType = "Disabled" + MLAssistConfigurationTypeEnabled MLAssistConfigurationType = "Enabled" +) + +// PossibleMLAssistConfigurationTypeValues returns the possible values for the MLAssistConfigurationType const type. +func PossibleMLAssistConfigurationTypeValues() []MLAssistConfigurationType { + return []MLAssistConfigurationType{ + MLAssistConfigurationTypeDisabled, + MLAssistConfigurationTypeEnabled, + } +} + +// MLFlowAutologgerState - Enum to determine the state of mlflow autologger. +type MLFlowAutologgerState string + +const ( + MLFlowAutologgerStateDisabled MLFlowAutologgerState = "Disabled" + MLFlowAutologgerStateEnabled MLFlowAutologgerState = "Enabled" +) + +// PossibleMLFlowAutologgerStateValues returns the possible values for the MLFlowAutologgerState const type. +func PossibleMLFlowAutologgerStateValues() []MLFlowAutologgerState { + return []MLFlowAutologgerState{ + MLFlowAutologgerStateDisabled, + MLFlowAutologgerStateEnabled, + } +} + // ManagedServiceIdentityType - Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). type ManagedServiceIdentityType string @@ -1309,6 +1655,57 @@ func PossibleManagedServiceIdentityTypeValues() []ManagedServiceIdentityType { } } +type MaterializationStoreType string + +const ( + MaterializationStoreTypeNone MaterializationStoreType = "None" + MaterializationStoreTypeOffline MaterializationStoreType = "Offline" + MaterializationStoreTypeOnline MaterializationStoreType = "Online" + MaterializationStoreTypeOnlineAndOffline MaterializationStoreType = "OnlineAndOffline" +) + +// PossibleMaterializationStoreTypeValues returns the possible values for the MaterializationStoreType const type. +func PossibleMaterializationStoreTypeValues() []MaterializationStoreType { + return []MaterializationStoreType{ + MaterializationStoreTypeNone, + MaterializationStoreTypeOffline, + MaterializationStoreTypeOnline, + MaterializationStoreTypeOnlineAndOffline, + } +} + +// MediaType - Media type of data asset. +type MediaType string + +const ( + MediaTypeImage MediaType = "Image" + MediaTypeText MediaType = "Text" +) + +// PossibleMediaTypeValues returns the possible values for the MediaType const type. +func PossibleMediaTypeValues() []MediaType { + return []MediaType{ + MediaTypeImage, + MediaTypeText, + } +} + +// MlflowAutologger - Indicates whether mlflow autologger is enabled for notebooks. +type MlflowAutologger string + +const ( + MlflowAutologgerDisabled MlflowAutologger = "Disabled" + MlflowAutologgerEnabled MlflowAutologger = "Enabled" +) + +// PossibleMlflowAutologgerValues returns the possible values for the MlflowAutologger const type. +func PossibleMlflowAutologgerValues() []MlflowAutologger { + return []MlflowAutologger{ + MlflowAutologgerDisabled, + MlflowAutologgerEnabled, + } +} + // ModelSize - Image model size. type ModelSize string @@ -1376,6 +1773,22 @@ func PossibleMountStateValues() []MountState { } } +// MultiSelect - Whether multiSelect is enabled +type MultiSelect string + +const ( + MultiSelectDisabled MultiSelect = "Disabled" + MultiSelectEnabled MultiSelect = "Enabled" +) + +// PossibleMultiSelectValues returns the possible values for the MultiSelect const type. +func PossibleMultiSelectValues() []MultiSelect { + return []MultiSelect{ + MultiSelectDisabled, + MultiSelectEnabled, + } +} + // NCrossValidationsMode - Determines how N-Cross validations value is determined. type NCrossValidationsMode string @@ -1411,6 +1824,39 @@ func PossibleNetworkValues() []Network { } } +// NlpLearningRateScheduler - Enum of learning rate schedulers that aligns with those supported by HF +type NlpLearningRateScheduler string + +const ( + // NlpLearningRateSchedulerConstant - Constant learning rate. + NlpLearningRateSchedulerConstant NlpLearningRateScheduler = "Constant" + // NlpLearningRateSchedulerConstantWithWarmup - Linear warmup followed by constant value. + NlpLearningRateSchedulerConstantWithWarmup NlpLearningRateScheduler = "ConstantWithWarmup" + // NlpLearningRateSchedulerCosine - Linear warmup then cosine decay. + NlpLearningRateSchedulerCosine NlpLearningRateScheduler = "Cosine" + // NlpLearningRateSchedulerCosineWithRestarts - Linear warmup, cosine decay, then restart to initial LR. + NlpLearningRateSchedulerCosineWithRestarts NlpLearningRateScheduler = "CosineWithRestarts" + // NlpLearningRateSchedulerLinear - Linear warmup and decay. + NlpLearningRateSchedulerLinear NlpLearningRateScheduler = "Linear" + // NlpLearningRateSchedulerNone - No learning rate schedule. + NlpLearningRateSchedulerNone NlpLearningRateScheduler = "None" + // NlpLearningRateSchedulerPolynomial - Increase linearly then polynomially decay. + NlpLearningRateSchedulerPolynomial NlpLearningRateScheduler = "Polynomial" +) + +// PossibleNlpLearningRateSchedulerValues returns the possible values for the NlpLearningRateScheduler const type. +func PossibleNlpLearningRateSchedulerValues() []NlpLearningRateScheduler { + return []NlpLearningRateScheduler{ + NlpLearningRateSchedulerConstant, + NlpLearningRateSchedulerConstantWithWarmup, + NlpLearningRateSchedulerCosine, + NlpLearningRateSchedulerCosineWithRestarts, + NlpLearningRateSchedulerLinear, + NlpLearningRateSchedulerNone, + NlpLearningRateSchedulerPolynomial, + } +} + // NodeState - State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. type NodeState string @@ -1435,6 +1881,22 @@ func PossibleNodeStateValues() []NodeState { } } +// NodesValueType - The enumerated types for the nodes value +type NodesValueType string + +const ( + NodesValueTypeAll NodesValueType = "All" + NodesValueTypeCustom NodesValueType = "Custom" +) + +// PossibleNodesValueTypeValues returns the possible values for the NodesValueType const type. +func PossibleNodesValueTypeValues() []NodesValueType { + return []NodesValueType{ + NodesValueTypeAll, + NodesValueTypeCustom, + } +} + // ObjectDetectionPrimaryMetrics - Primary metrics for Image ObjectDetection task. type ObjectDetectionPrimaryMetrics string @@ -1576,6 +2038,7 @@ func PossibleOsTypeValues() []OsType { type OutputDeliveryMode string const ( + OutputDeliveryModeDirect OutputDeliveryMode = "Direct" OutputDeliveryModeReadWriteMount OutputDeliveryMode = "ReadWriteMount" OutputDeliveryModeUpload OutputDeliveryMode = "Upload" ) @@ -1583,11 +2046,64 @@ const ( // PossibleOutputDeliveryModeValues returns the possible values for the OutputDeliveryMode const type. func PossibleOutputDeliveryModeValues() []OutputDeliveryMode { return []OutputDeliveryMode{ + OutputDeliveryModeDirect, OutputDeliveryModeReadWriteMount, OutputDeliveryModeUpload, } } +// PackageBuildState - Package build state returned in package response. +type PackageBuildState string + +const ( + PackageBuildStateFailed PackageBuildState = "Failed" + PackageBuildStateNotStarted PackageBuildState = "NotStarted" + PackageBuildStateRunning PackageBuildState = "Running" + PackageBuildStateSucceeded PackageBuildState = "Succeeded" +) + +// PossiblePackageBuildStateValues returns the possible values for the PackageBuildState const type. +func PossiblePackageBuildStateValues() []PackageBuildState { + return []PackageBuildState{ + PackageBuildStateFailed, + PackageBuildStateNotStarted, + PackageBuildStateRunning, + PackageBuildStateSucceeded, + } +} + +// PackageInputDeliveryMode - Mounting type of the model or the inputs +type PackageInputDeliveryMode string + +const ( + PackageInputDeliveryModeDownload PackageInputDeliveryMode = "Download" + PackageInputDeliveryModeReadOnlyMount PackageInputDeliveryMode = "ReadOnlyMount" +) + +// PossiblePackageInputDeliveryModeValues returns the possible values for the PackageInputDeliveryMode const type. +func PossiblePackageInputDeliveryModeValues() []PackageInputDeliveryMode { + return []PackageInputDeliveryMode{ + PackageInputDeliveryModeDownload, + PackageInputDeliveryModeReadOnlyMount, + } +} + +// PackageInputType - Type of the inputs. +type PackageInputType string + +const ( + PackageInputTypeURIFile PackageInputType = "UriFile" + PackageInputTypeURIFolder PackageInputType = "UriFolder" +) + +// PossiblePackageInputTypeValues returns the possible values for the PackageInputType const type. +func PossiblePackageInputTypeValues() []PackageInputType { + return []PackageInputType{ + PackageInputTypeURIFile, + PackageInputTypeURIFolder, + } +} + // PrivateEndpointConnectionProvisioningState - The current provisioning state. type PrivateEndpointConnectionProvisioningState string @@ -1630,18 +2146,37 @@ func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointSer } } +// 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, + } +} + // 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" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStateSoftDeleted ProvisioningState = "SoftDeleted" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUnknown ProvisioningState = "Unknown" + ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. @@ -1651,6 +2186,7 @@ func PossibleProvisioningStateValues() []ProvisioningState { ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, + ProvisioningStateSoftDeleted, ProvisioningStateSucceeded, ProvisioningStateUnknown, ProvisioningStateUpdating, @@ -1810,7 +2346,7 @@ const ( // 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 "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 @@ -2111,6 +2647,8 @@ type SecretsType string const ( SecretsTypeAccountKey SecretsType = "AccountKey" SecretsTypeCertificate SecretsType = "Certificate" + SecretsTypeKerberosKeytab SecretsType = "KerberosKeytab" + SecretsTypeKerberosPassword SecretsType = "KerberosPassword" SecretsTypeSas SecretsType = "Sas" SecretsTypeServicePrincipal SecretsType = "ServicePrincipal" ) @@ -2120,6 +2658,8 @@ func PossibleSecretsTypeValues() []SecretsType { return []SecretsType{ SecretsTypeAccountKey, SecretsTypeCertificate, + SecretsTypeKerberosKeytab, + SecretsTypeKerberosPassword, SecretsTypeSas, SecretsTypeServicePrincipal, } @@ -2190,6 +2730,21 @@ func PossibleSourceTypeValues() []SourceType { } } +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). @@ -2255,6 +2810,23 @@ func PossibleStatusValues() []Status { } } +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 @@ -2414,6 +2986,43 @@ func PossibleTaskTypeValues() []TaskType { } } +// TextAnnotationType - Annotation type of text data. +type TextAnnotationType string + +const ( + TextAnnotationTypeClassification TextAnnotationType = "Classification" + TextAnnotationTypeNamedEntityRecognition TextAnnotationType = "NamedEntityRecognition" +) + +// PossibleTextAnnotationTypeValues returns the possible values for the TextAnnotationType const type. +func PossibleTextAnnotationTypeValues() []TextAnnotationType { + return []TextAnnotationType{ + TextAnnotationTypeClassification, + TextAnnotationTypeNamedEntityRecognition, + } +} + +// TrainingMode - Training mode dictates whether to use distributed training or not +type TrainingMode string + +const ( + // TrainingModeAuto - Auto mode + TrainingModeAuto TrainingMode = "Auto" + // TrainingModeDistributed - Distributed training mode + TrainingModeDistributed TrainingMode = "Distributed" + // TrainingModeNonDistributed - Non distributed training mode + TrainingModeNonDistributed TrainingMode = "NonDistributed" +) + +// PossibleTrainingModeValues returns the possible values for the TrainingMode const type. +func PossibleTrainingModeValues() []TrainingMode { + return []TrainingMode{ + TrainingModeAuto, + TrainingModeDistributed, + TrainingModeNonDistributed, + } +} + type TriggerType string const ( @@ -2579,6 +3188,26 @@ func PossibleValueFormatValues() []ValueFormat { } } +// 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 diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go index 294cfebdaf4f..a38f1bfa3e9f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client.go @@ -32,9 +32,9 @@ type DataContainersClient struct { } // NewDataContainersClient creates a new instance of DataContainersClient 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. +// - 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 NewDataContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataContainersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// body - Container entity to create or update. -// options - DataContainersClientCreateOrUpdateOptions contains the optional parameters for the DataContainersClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - body - Container entity to create or update. +// - options - DataContainersClientCreateOrUpdateOptions contains the optional parameters for the DataContainersClient.CreateOrUpdate +// method. func (client *DataContainersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body DataContainer, options *DataContainersClientCreateOrUpdateOptions) (DataContainersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) if err != nil { @@ -103,7 +104,7 @@ func (client *DataContainersClient) createOrUpdateCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -120,11 +121,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// options - DataContainersClientDeleteOptions contains the optional parameters for the DataContainersClient.Delete method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - options - DataContainersClientDeleteOptions contains the optional parameters for the DataContainersClient.Delete method. func (client *DataContainersClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *DataContainersClientDeleteOptions) (DataContainersClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -164,7 +166,7 @@ func (client *DataContainersClient) deleteCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,11 +174,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// options - DataContainersClientGetOptions contains the optional parameters for the DataContainersClient.Get method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - options - DataContainersClientGetOptions contains the optional parameters for the DataContainersClient.Get method. func (client *DataContainersClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *DataContainersClientGetOptions) (DataContainersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -216,7 +219,7 @@ func (client *DataContainersClient) getCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,10 +235,11 @@ func (client *DataContainersClient) getHandleResponse(resp *http.Response) (Data } // NewListPager - List data containers. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager method. func (client *DataContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *DataContainersClientListOptions) *runtime.Pager[DataContainersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DataContainersClientListResponse]{ More: func(page DataContainersClientListResponse) bool { @@ -284,7 +288,7 @@ func (client *DataContainersClient) listCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client_example_test.go deleted file mode 100644 index b84214bcd586..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datacontainers_client_example_test.go +++ /dev/null @@ -1,112 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/datastores_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go index d09d9f5f9ba6..797420b5faf9 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client.go @@ -33,9 +33,9 @@ type DatastoresClient struct { } // NewDatastoresClient creates a new instance of DatastoresClient 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. +// - 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 NewDatastoresClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DatastoresClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Datastore name. -// body - Datastore entity to create or update. -// options - DatastoresClientCreateOrUpdateOptions contains the optional parameters for the DatastoresClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Datastore name. +// - body - Datastore entity to create or update. +// - options - DatastoresClientCreateOrUpdateOptions contains the optional parameters for the DatastoresClient.CreateOrUpdate +// method. func (client *DatastoresClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body Datastore, options *DatastoresClientCreateOrUpdateOptions) (DatastoresClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) if err != nil { @@ -104,7 +105,7 @@ func (client *DatastoresClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.SkipValidation != nil { reqQP.Set("skipValidation", strconv.FormatBool(*options.SkipValidation)) } @@ -124,11 +125,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Datastore name. -// options - DatastoresClientDeleteOptions contains the optional parameters for the DatastoresClient.Delete method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Datastore name. +// - options - DatastoresClientDeleteOptions contains the optional parameters for the DatastoresClient.Delete method. func (client *DatastoresClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *DatastoresClientDeleteOptions) (DatastoresClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -168,7 +170,7 @@ func (client *DatastoresClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -176,11 +178,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Datastore name. -// options - DatastoresClientGetOptions contains the optional parameters for the DatastoresClient.Get method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Datastore name. +// - options - DatastoresClientGetOptions contains the optional parameters for the DatastoresClient.Get method. func (client *DatastoresClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *DatastoresClientGetOptions) (DatastoresClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -220,7 +223,7 @@ func (client *DatastoresClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -236,10 +239,11 @@ func (client *DatastoresClient) getHandleResponse(resp *http.Response) (Datastor } // NewListPager - List datastores. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager method. func (client *DatastoresClient) NewListPager(resourceGroupName string, workspaceName string, options *DatastoresClientListOptions) *runtime.Pager[DatastoresClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DatastoresClientListResponse]{ More: func(page DatastoresClientListResponse) bool { @@ -288,7 +292,7 @@ func (client *DatastoresClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -326,11 +330,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Datastore name. -// options - DatastoresClientListSecretsOptions contains the optional parameters for the DatastoresClient.ListSecrets method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Datastore name. +// - options - DatastoresClientListSecretsOptions contains the optional parameters for the DatastoresClient.ListSecrets method. func (client *DatastoresClient) ListSecrets(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *DatastoresClientListSecretsOptions) (DatastoresClientListSecretsResponse, error) { req, err := client.listSecretsCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -370,7 +375,7 @@ func (client *DatastoresClient) listSecretsCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/datastores_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client_example_test.go deleted file mode 100644 index 9d466bdd39ff..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/datastores_client_example_test.go +++ /dev/null @@ -1,262 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json -func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal() { - 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-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json -func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal() { - 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.AzureDataLakeGen2Datastore{ - 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.DatastoreTypeAzureDataLakeGen2), - AccountName: to.Ptr("string"), - Endpoint: to.Ptr("string"), - Filesystem: to.Ptr("string"), - Protocol: 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-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json -func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureFileStoreWAccountKey() { - 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.AzureFileDatastore{ - Description: to.Ptr("string"), - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ - CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), - Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - Key: to.Ptr("string"), - }, - }, - DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureFile), - AccountName: to.Ptr("string"), - Endpoint: to.Ptr("string"), - FileShareName: to.Ptr("string"), - Protocol: 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-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json -func ExampleDatastoresClient_CreateOrUpdate_createOrUpdateDatastoreAzureBlobWAccountKey() { - 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.AzureBlobDatastore{ - Description: to.Ptr("string"), - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - Credentials: &armmachinelearning.AccountKeyDatastoreCredentials{ - CredentialsType: to.Ptr(armmachinelearning.CredentialsTypeAccountKey), - Secrets: &armmachinelearning.AccountKeyDatastoreSecrets{ - SecretsType: to.Ptr(armmachinelearning.SecretsTypeAccountKey), - Key: to.Ptr("string"), - }, - }, - DatastoreType: to.Ptr(armmachinelearning.DatastoreTypeAzureBlob), - AccountName: to.Ptr("string"), - ContainerName: to.Ptr("string"), - Endpoint: to.Ptr("core.windows.net"), - Protocol: to.Ptr("https"), - }, - }, &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-10-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/dataversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go index 851bf4360a49..ca883b6b6a0d 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client.go @@ -33,9 +33,9 @@ type DataVersionsClient struct { } // NewDataVersionsClient creates a new instance of DataVersionsClient 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. +// - 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 NewDataVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DataVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// version - Version identifier. -// body - Version entity to create or update. -// options - DataVersionsClientCreateOrUpdateOptions contains the optional parameters for the DataVersionsClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - DataVersionsClientCreateOrUpdateOptions contains the optional parameters for the DataVersionsClient.CreateOrUpdate +// method. func (client *DataVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body DataVersionBase, options *DataVersionsClientCreateOrUpdateOptions) (DataVersionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) if err != nil { @@ -109,7 +110,7 @@ func (client *DataVersionsClient) createOrUpdateCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,12 +127,13 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// version - Version identifier. -// options - DataVersionsClientDeleteOptions contains the optional parameters for the DataVersionsClient.Delete method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - options - DataVersionsClientDeleteOptions contains the optional parameters for the DataVersionsClient.Delete method. func (client *DataVersionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *DataVersionsClientDeleteOptions) (DataVersionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -175,7 +177,7 @@ func (client *DataVersionsClient) deleteCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,12 +185,13 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Container name. -// version - Version identifier. -// options - DataVersionsClientGetOptions contains the optional parameters for the DataVersionsClient.Get method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Container name. +// - version - Version identifier. +// - options - DataVersionsClientGetOptions contains the optional parameters for the DataVersionsClient.Get method. func (client *DataVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *DataVersionsClientGetOptions) (DataVersionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -232,7 +235,7 @@ func (client *DataVersionsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,11 +251,12 @@ func (client *DataVersionsClient) getHandleResponse(resp *http.Response) (DataVe } // NewListPager - List data versions in the data container -// Generated from API version 2022-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// name - Data container's name -// options - DataVersionsClientListOptions contains the optional parameters for the DataVersionsClient.List method. +// +// Generated from API version 2023-02-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 +// - options - DataVersionsClientListOptions contains the optional parameters for the DataVersionsClient.NewListPager method. func (client *DataVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *DataVersionsClientListOptions) *runtime.Pager[DataVersionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[DataVersionsClientListResponse]{ More: func(page DataVersionsClientListResponse) bool { @@ -305,7 +309,7 @@ func (client *DataVersionsClient) listCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client_example_test.go deleted file mode 100644 index d34e4f1f4b46..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/dataversions_client_example_test.go +++ /dev/null @@ -1,115 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/environmentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go index 3478f6387c3b..7feb907b34c3 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client.go @@ -32,9 +32,9 @@ type EnvironmentContainersClient struct { } // NewEnvironmentContainersClient creates a new instance of EnvironmentContainersClient 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. +// - 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 NewEnvironmentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentContainersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ 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-10-01 -// 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. -// body - Container entity to create or update. -// options - EnvironmentContainersClientCreateOrUpdateOptions contains the optional parameters for the EnvironmentContainersClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - body - Container entity to create or update. +// - options - EnvironmentContainersClientCreateOrUpdateOptions contains the optional parameters for the EnvironmentContainersClient.CreateOrUpdate +// method. func (client *EnvironmentContainersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body EnvironmentContainer, options *EnvironmentContainersClientCreateOrUpdateOptions) (EnvironmentContainersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) if err != nil { @@ -103,7 +104,7 @@ func (client *EnvironmentContainersClient) createOrUpdateCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -120,12 +121,13 @@ func (client *EnvironmentContainersClient) createOrUpdateHandleResponse(resp *ht // Delete - Delete container. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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. -// options - EnvironmentContainersClientDeleteOptions contains the optional parameters for the EnvironmentContainersClient.Delete -// method. +// +// Generated from API version 2023-02-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. +// - options - EnvironmentContainersClientDeleteOptions contains the optional parameters for the EnvironmentContainersClient.Delete +// method. func (client *EnvironmentContainersClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *EnvironmentContainersClientDeleteOptions) (EnvironmentContainersClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -165,7 +167,7 @@ func (client *EnvironmentContainersClient) deleteCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,12 +175,13 @@ 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-10-01 -// 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. -// options - EnvironmentContainersClientGetOptions contains the optional parameters for the EnvironmentContainersClient.Get -// method. +// +// Generated from API version 2023-02-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. +// - options - EnvironmentContainersClientGetOptions contains the optional parameters for the EnvironmentContainersClient.Get +// method. func (client *EnvironmentContainersClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *EnvironmentContainersClientGetOptions) (EnvironmentContainersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -218,7 +221,7 @@ func (client *EnvironmentContainersClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,11 +237,12 @@ func (client *EnvironmentContainersClient) getHandleResponse(resp *http.Response } // NewListPager - List environment containers. -// Generated from API version 2022-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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.NewListPager +// method. func (client *EnvironmentContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *EnvironmentContainersClientListOptions) *runtime.Pager[EnvironmentContainersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[EnvironmentContainersClientListResponse]{ More: func(page EnvironmentContainersClientListResponse) bool { @@ -287,7 +291,7 @@ func (client *EnvironmentContainersClient) listCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client_example_test.go deleted file mode 100644 index 089a42538f43..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentcontainers_client_example_test.go +++ /dev/null @@ -1,113 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/environmentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go index 51bfc88ab0c5..0138fe378995 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client.go @@ -33,9 +33,9 @@ type EnvironmentVersionsClient struct { } // NewEnvironmentVersionsClient creates a new instance of EnvironmentVersionsClient 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. +// - 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 NewEnvironmentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*EnvironmentVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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-10-01 -// 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. -// version - Version of EnvironmentVersion. -// body - Definition of EnvironmentVersion. -// options - EnvironmentVersionsClientCreateOrUpdateOptions contains the optional parameters for the EnvironmentVersionsClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - version - Version of EnvironmentVersion. +// - body - Definition of EnvironmentVersion. +// - options - EnvironmentVersionsClientCreateOrUpdateOptions contains the optional parameters for the EnvironmentVersionsClient.CreateOrUpdate +// method. func (client *EnvironmentVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body EnvironmentVersion, options *EnvironmentVersionsClientCreateOrUpdateOptions) (EnvironmentVersionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) if err != nil { @@ -109,7 +110,7 @@ func (client *EnvironmentVersionsClient) createOrUpdateCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,13 +127,14 @@ func (client *EnvironmentVersionsClient) createOrUpdateHandleResponse(resp *http // Delete - Delete version. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// options - EnvironmentVersionsClientDeleteOptions contains the optional parameters for the EnvironmentVersionsClient.Delete -// method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - EnvironmentVersionsClientDeleteOptions contains the optional parameters for the EnvironmentVersionsClient.Delete +// method. func (client *EnvironmentVersionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *EnvironmentVersionsClientDeleteOptions) (EnvironmentVersionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -176,7 +178,7 @@ func (client *EnvironmentVersionsClient) deleteCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -184,12 +186,13 @@ 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-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// options - EnvironmentVersionsClientGetOptions contains the optional parameters for the EnvironmentVersionsClient.Get method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - EnvironmentVersionsClientGetOptions contains the optional parameters for the EnvironmentVersionsClient.Get method. func (client *EnvironmentVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *EnvironmentVersionsClientGetOptions) (EnvironmentVersionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -233,7 +236,7 @@ func (client *EnvironmentVersionsClient) getCreateRequest(ctx context.Context, r return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,12 +252,13 @@ func (client *EnvironmentVersionsClient) getHandleResponse(resp *http.Response) } // NewListPager - List versions. -// Generated from API version 2022-10-01 -// 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. -// options - EnvironmentVersionsClientListOptions contains the optional parameters for the EnvironmentVersionsClient.List -// method. +// +// Generated from API version 2023-02-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. +// - options - EnvironmentVersionsClientListOptions contains the optional parameters for the EnvironmentVersionsClient.NewListPager +// method. func (client *EnvironmentVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *EnvironmentVersionsClientListOptions) *runtime.Pager[EnvironmentVersionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[EnvironmentVersionsClientListResponse]{ More: func(page EnvironmentVersionsClientListResponse) bool { @@ -307,7 +311,7 @@ func (client *EnvironmentVersionsClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client_example_test.go deleted file mode 100644 index 8f86c9b49a9c..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/environmentversions_client_example_test.go +++ /dev/null @@ -1,132 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/featuresetcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client.go new file mode 100644 index 000000000000..907f36fdd184 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetcontainers_client.go @@ -0,0 +1,343 @@ +//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" +) + +// FeaturesetContainersClient contains the methods for the FeaturesetContainers group. +// Don't use this type directly, use NewFeaturesetContainersClient() instead. +type FeaturesetContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewFeaturesetContainersClient creates a new instance of FeaturesetContainersClient 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 NewFeaturesetContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturesetContainersClient, 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 := &FeaturesetContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - body - Container entity to create or update. +// - options - FeaturesetContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetContainersClient.BeginCreateOrUpdate +// method. +func (client *FeaturesetContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturesetContainer, options *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetContainersClientCreateOrUpdateResponse], 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(resp, client.pl, &runtime.NewPollerOptions[FeaturesetContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturesetContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturesetContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturesetContainer, options *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*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 *FeaturesetContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturesetContainer, options *FeaturesetContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - options - FeaturesetContainersClientBeginDeleteOptions contains the optional parameters for the FeaturesetContainersClient.BeginDelete +// method. +func (client *FeaturesetContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturesetContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FeaturesetContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturesetContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturesetContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientBeginDeleteOptions) (*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 *FeaturesetContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetEntity - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - options - FeaturesetContainersClientGetEntityOptions contains the optional parameters for the FeaturesetContainersClient.GetEntity +// method. +func (client *FeaturesetContainersClient) GetEntity(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientGetEntityOptions) (FeaturesetContainersClientGetEntityResponse, error) { + req, err := client.getEntityCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return FeaturesetContainersClientGetEntityResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturesetContainersClientGetEntityResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturesetContainersClientGetEntityResponse{}, runtime.NewResponseError(resp) + } + return client.getEntityHandleResponse(resp) +} + +// getEntityCreateRequest creates the GetEntity request. +func (client *FeaturesetContainersClient) getEntityCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetContainersClientGetEntityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityHandleResponse handles the GetEntity response. +func (client *FeaturesetContainersClient) getEntityHandleResponse(resp *http.Response) (FeaturesetContainersClientGetEntityResponse, error) { + result := FeaturesetContainersClientGetEntityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetContainer); err != nil { + return FeaturesetContainersClientGetEntityResponse{}, err + } + return result, nil +} + +// NewListPager - List featurestore entity containers. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - FeaturesetContainersClientListOptions contains the optional parameters for the FeaturesetContainersClient.NewListPager +// method. +func (client *FeaturesetContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *FeaturesetContainersClientListOptions) *runtime.Pager[FeaturesetContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturesetContainersClientListResponse]{ + More: func(page FeaturesetContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturesetContainersClientListResponse) (FeaturesetContainersClientListResponse, 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 FeaturesetContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturesetContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturesetContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturesetContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *FeaturesetContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets" + 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", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturesetContainersClient) listHandleResponse(resp *http.Response) (FeaturesetContainersClientListResponse, error) { + result := FeaturesetContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetContainerResourceArmPaginatedResult); err != nil { + return FeaturesetContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client.go new file mode 100644 index 000000000000..99d9c0372701 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featuresetversions_client.go @@ -0,0 +1,687 @@ +//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" +) + +// FeaturesetVersionsClient contains the methods for the FeaturesetVersions group. +// Don't use this type directly, use NewFeaturesetVersionsClient() instead. +type FeaturesetVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewFeaturesetVersionsClient creates a new instance of FeaturesetVersionsClient 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 NewFeaturesetVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturesetVersionsClient, 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 := &FeaturesetVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginBackfill - Backfill. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - body - Feature set version backfill request entity. +// - options - FeaturesetVersionsClientBeginBackfillOptions contains the optional parameters for the FeaturesetVersionsClient.BeginBackfill +// method. +func (client *FeaturesetVersionsClient) BeginBackfill(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersionBackfillRequest, options *FeaturesetVersionsClientBeginBackfillOptions) (*runtime.Poller[FeaturesetVersionsClientBackfillResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.backfill(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FeaturesetVersionsClientBackfillResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturesetVersionsClientBackfillResponse](options.ResumeToken, client.pl, nil) + } +} + +// Backfill - Backfill. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturesetVersionsClient) backfill(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersionBackfillRequest, options *FeaturesetVersionsClientBeginBackfillOptions) (*http.Response, error) { + req, err := client.backfillCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// backfillCreateRequest creates the Backfill request. +func (client *FeaturesetVersionsClient) backfillCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersionBackfillRequest, options *FeaturesetVersionsClientBeginBackfillOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill" + 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - body - Version entity to create or update. +// - options - FeaturesetVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetVersionsClient.BeginCreateOrUpdate +// method. +func (client *FeaturesetVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersion, options *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturesetVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FeaturesetVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturesetVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturesetVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersion, options *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FeaturesetVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturesetVersion, options *FeaturesetVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturesetVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturesetVersionsClient.BeginDelete +// method. +func (client *FeaturesetVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturesetVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FeaturesetVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturesetVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturesetVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FeaturesetVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturesetVersionsClientGetOptions contains the optional parameters for the FeaturesetVersionsClient.Get method. +func (client *FeaturesetVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientGetOptions) (FeaturesetVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return FeaturesetVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturesetVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturesetVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *FeaturesetVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-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 *FeaturesetVersionsClient) getHandleResponse(resp *http.Response) (FeaturesetVersionsClientGetResponse, error) { + result := FeaturesetVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetVersion); err != nil { + return FeaturesetVersionsClientGetResponse{}, err + } + return result, nil +} + +// GetFeature - Get feature. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Feature set name. This is case-sensitive. +// - version - Feature set version identifier. This is case-sensitive. +// - body - Feature Name request. This is case-sensitive. +// - options - FeaturesetVersionsClientGetFeatureOptions contains the optional parameters for the FeaturesetVersionsClient.GetFeature +// method. +func (client *FeaturesetVersionsClient) GetFeature(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body GetFeatureRequest, options *FeaturesetVersionsClientGetFeatureOptions) (FeaturesetVersionsClientGetFeatureResponse, error) { + req, err := client.getFeatureCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return FeaturesetVersionsClientGetFeatureResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturesetVersionsClientGetFeatureResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturesetVersionsClientGetFeatureResponse{}, runtime.NewResponseError(resp) + } + return client.getFeatureHandleResponse(resp) +} + +// getFeatureCreateRequest creates the GetFeature request. +func (client *FeaturesetVersionsClient) getFeatureCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body GetFeatureRequest, options *FeaturesetVersionsClientGetFeatureOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/getFeature" + 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// getFeatureHandleResponse handles the GetFeature response. +func (client *FeaturesetVersionsClient) getFeatureHandleResponse(resp *http.Response) (FeaturesetVersionsClientGetFeatureResponse, error) { + result := FeaturesetVersionsClientGetFeatureResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Feature); err != nil { + return FeaturesetVersionsClientGetFeatureResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Featureset name. This is case-sensitive. +// - options - FeaturesetVersionsClientListOptions contains the optional parameters for the FeaturesetVersionsClient.NewListPager +// method. +func (client *FeaturesetVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *FeaturesetVersionsClientListOptions) *runtime.Pager[FeaturesetVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturesetVersionsClientListResponse]{ + More: func(page FeaturesetVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturesetVersionsClientListResponse) (FeaturesetVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FeaturesetVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturesetVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturesetVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturesetVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturesetVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturesetVersionsClient) listHandleResponse(resp *http.Response) (FeaturesetVersionsClientListResponse, error) { + result := FeaturesetVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetVersionResourceArmPaginatedResult); err != nil { + return FeaturesetVersionsClientListResponse{}, err + } + return result, nil +} + +// NewListFeaturesPager - List Features. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Featureset name. This is case-sensitive. +// - version - Featureset Version identifier. This is case-sensitive. +// - options - FeaturesetVersionsClientListFeaturesOptions contains the optional parameters for the FeaturesetVersionsClient.NewListFeaturesPager +// method. +func (client *FeaturesetVersionsClient) NewListFeaturesPager(resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientListFeaturesOptions) *runtime.Pager[FeaturesetVersionsClientListFeaturesResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturesetVersionsClientListFeaturesResponse]{ + More: func(page FeaturesetVersionsClientListFeaturesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturesetVersionsClientListFeaturesResponse) (FeaturesetVersionsClientListFeaturesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listFeaturesCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FeaturesetVersionsClientListFeaturesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturesetVersionsClientListFeaturesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturesetVersionsClientListFeaturesResponse{}, runtime.NewResponseError(resp) + } + return client.listFeaturesHandleResponse(resp) + }, + }) +} + +// listFeaturesCreateRequest creates the ListFeatures request. +func (client *FeaturesetVersionsClient) listFeaturesCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientListFeaturesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/listFeatures" + 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Tags != nil { + reqQP.Set("$tags", *options.Tags) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listFeaturesHandleResponse handles the ListFeatures response. +func (client *FeaturesetVersionsClient) listFeaturesHandleResponse(resp *http.Response) (FeaturesetVersionsClientListFeaturesResponse, error) { + result := FeaturesetVersionsClientListFeaturesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeatureArmPaginatedResult); err != nil { + return FeaturesetVersionsClientListFeaturesResponse{}, err + } + return result, nil +} + +// NewListMaterializationJobsPager - List materialization Jobs. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturesetVersionsClientListMaterializationJobsOptions contains the optional parameters for the FeaturesetVersionsClient.NewListMaterializationJobsPager +// method. +func (client *FeaturesetVersionsClient) NewListMaterializationJobsPager(resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientListMaterializationJobsOptions) *runtime.Pager[FeaturesetVersionsClientListMaterializationJobsResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturesetVersionsClientListMaterializationJobsResponse]{ + More: func(page FeaturesetVersionsClientListMaterializationJobsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturesetVersionsClientListMaterializationJobsResponse) (FeaturesetVersionsClientListMaterializationJobsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listMaterializationJobsCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FeaturesetVersionsClientListMaterializationJobsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturesetVersionsClientListMaterializationJobsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturesetVersionsClientListMaterializationJobsResponse{}, runtime.NewResponseError(resp) + } + return client.listMaterializationJobsHandleResponse(resp) + }, + }) +} + +// listMaterializationJobsCreateRequest creates the ListMaterializationJobs request. +func (client *FeaturesetVersionsClient) listMaterializationJobsCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturesetVersionsClientListMaterializationJobsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/listMaterializationJobs" + 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Filters != nil { + reqQP.Set("filters", *options.Filters) + } + if options != nil && options.FeatureWindowStart != nil { + reqQP.Set("featureWindowStart", *options.FeatureWindowStart) + } + if options != nil && options.FeatureWindowEnd != nil { + reqQP.Set("featureWindowEnd", *options.FeatureWindowEnd) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMaterializationJobsHandleResponse handles the ListMaterializationJobs response. +func (client *FeaturesetVersionsClient) listMaterializationJobsHandleResponse(resp *http.Response) (FeaturesetVersionsClientListMaterializationJobsResponse, error) { + result := FeaturesetVersionsClientListMaterializationJobsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturesetJobArmPaginatedResult); err != nil { + return FeaturesetVersionsClientListMaterializationJobsResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client.go new file mode 100644 index 000000000000..e8c4e2e8481b --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentitycontainers_client.go @@ -0,0 +1,343 @@ +//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" +) + +// FeaturestoreEntityContainersClient contains the methods for the FeaturestoreEntityContainers group. +// Don't use this type directly, use NewFeaturestoreEntityContainersClient() instead. +type FeaturestoreEntityContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewFeaturestoreEntityContainersClient creates a new instance of FeaturestoreEntityContainersClient 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 NewFeaturestoreEntityContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturestoreEntityContainersClient, 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 := &FeaturestoreEntityContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - body - Container entity to create or update. +// - options - FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginCreateOrUpdate +// method. +func (client *FeaturestoreEntityContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturestoreEntityContainer, options *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityContainersClientCreateOrUpdateResponse], 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(resp, client.pl, &runtime.NewPollerOptions[FeaturestoreEntityContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturestoreEntityContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturestoreEntityContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturestoreEntityContainer, options *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*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 *FeaturestoreEntityContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, body FeaturestoreEntityContainer, options *FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - options - FeaturestoreEntityContainersClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginDelete +// method. +func (client *FeaturestoreEntityContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FeaturestoreEntityContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturestoreEntityContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturestoreEntityContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientBeginDeleteOptions) (*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 *FeaturestoreEntityContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// GetEntity - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - options - FeaturestoreEntityContainersClientGetEntityOptions contains the optional parameters for the FeaturestoreEntityContainersClient.GetEntity +// method. +func (client *FeaturestoreEntityContainersClient) GetEntity(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientGetEntityOptions) (FeaturestoreEntityContainersClientGetEntityResponse, error) { + req, err := client.getEntityCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + if err != nil { + return FeaturestoreEntityContainersClientGetEntityResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturestoreEntityContainersClientGetEntityResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturestoreEntityContainersClientGetEntityResponse{}, runtime.NewResponseError(resp) + } + return client.getEntityHandleResponse(resp) +} + +// getEntityCreateRequest creates the GetEntity request. +func (client *FeaturestoreEntityContainersClient) getEntityCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityContainersClientGetEntityOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getEntityHandleResponse handles the GetEntity response. +func (client *FeaturestoreEntityContainersClient) getEntityHandleResponse(resp *http.Response) (FeaturestoreEntityContainersClientGetEntityResponse, error) { + result := FeaturestoreEntityContainersClientGetEntityResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityContainer); err != nil { + return FeaturestoreEntityContainersClientGetEntityResponse{}, err + } + return result, nil +} + +// NewListPager - List featurestore entity containers. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - options - FeaturestoreEntityContainersClientListOptions contains the optional parameters for the FeaturestoreEntityContainersClient.NewListPager +// method. +func (client *FeaturestoreEntityContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *FeaturestoreEntityContainersClientListOptions) *runtime.Pager[FeaturestoreEntityContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturestoreEntityContainersClientListResponse]{ + More: func(page FeaturestoreEntityContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturestoreEntityContainersClientListResponse) (FeaturestoreEntityContainersClientListResponse, 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 FeaturestoreEntityContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturestoreEntityContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturestoreEntityContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturestoreEntityContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *FeaturestoreEntityContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities" + 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", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturestoreEntityContainersClient) listHandleResponse(resp *http.Response) (FeaturestoreEntityContainersClientListResponse, error) { + result := FeaturestoreEntityContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityContainerResourceArmPaginatedResult); err != nil { + return FeaturestoreEntityContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client.go new file mode 100644 index 000000000000..38ca59b07b7c --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/featurestoreentityversions_client.go @@ -0,0 +1,363 @@ +//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" +) + +// FeaturestoreEntityVersionsClient contains the methods for the FeaturestoreEntityVersions group. +// Don't use this type directly, use NewFeaturestoreEntityVersionsClient() instead. +type FeaturestoreEntityVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewFeaturestoreEntityVersionsClient creates a new instance of FeaturestoreEntityVersionsClient 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 NewFeaturestoreEntityVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FeaturestoreEntityVersionsClient, 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 := &FeaturestoreEntityVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - body - Version entity to create or update. +// - options - FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginCreateOrUpdate +// method. +func (client *FeaturestoreEntityVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturestoreEntityVersion, options *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FeaturestoreEntityVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturestoreEntityVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturestoreEntityVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturestoreEntityVersion, options *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *FeaturestoreEntityVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body FeaturestoreEntityVersion, options *FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturestoreEntityVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginDelete +// method. +func (client *FeaturestoreEntityVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*runtime.Poller[FeaturestoreEntityVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[FeaturestoreEntityVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[FeaturestoreEntityVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *FeaturestoreEntityVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *FeaturestoreEntityVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - FeaturestoreEntityVersionsClientGetOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.Get +// method. +func (client *FeaturestoreEntityVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientGetOptions) (FeaturestoreEntityVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) + if err != nil { + return FeaturestoreEntityVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturestoreEntityVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturestoreEntityVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *FeaturestoreEntityVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *FeaturestoreEntityVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-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 *FeaturestoreEntityVersionsClient) getHandleResponse(resp *http.Response) (FeaturestoreEntityVersionsClientGetResponse, error) { + result := FeaturestoreEntityVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityVersion); err != nil { + return FeaturestoreEntityVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - Name of Azure Machine Learning workspace. +// - name - Feature entity name. This is case-sensitive. +// - options - FeaturestoreEntityVersionsClientListOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.NewListPager +// method. +func (client *FeaturestoreEntityVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityVersionsClientListOptions) *runtime.Pager[FeaturestoreEntityVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[FeaturestoreEntityVersionsClientListResponse]{ + More: func(page FeaturestoreEntityVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *FeaturestoreEntityVersionsClientListResponse) (FeaturestoreEntityVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, workspaceName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FeaturestoreEntityVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FeaturestoreEntityVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FeaturestoreEntityVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *FeaturestoreEntityVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *FeaturestoreEntityVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if 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", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *FeaturestoreEntityVersionsClient) listHandleResponse(resp *http.Response) (FeaturestoreEntityVersionsClientListResponse, error) { + result := FeaturestoreEntityVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.FeaturestoreEntityVersionResourceArmPaginatedResult); err != nil { + return FeaturestoreEntityVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod b/sdk/resourcemanager/machinelearning/armmachinelearning/go.mod index 9da13d0e7798..a5ae2d99ca4a 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/jobs_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go index 1d5e6ef7f5c3..cf881f486366 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client.go @@ -20,6 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -32,9 +33,9 @@ type JobsClient struct { } // NewJobsClient creates a new instance of JobsClient 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. +// - 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 NewJobsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JobsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +58,12 @@ 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-10-01 -// 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. -// options - JobsClientBeginCancelOptions contains the optional parameters for the JobsClient.BeginCancel method. +// +// Generated from API version 2023-02-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. +// - options - JobsClientBeginCancelOptions contains the optional parameters for the JobsClient.BeginCancel method. func (client *JobsClient) BeginCancel(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginCancelOptions) (*runtime.Poller[JobsClientCancelResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.cancel(ctx, resourceGroupName, workspaceName, id, options) @@ -78,7 +80,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -118,7 +121,7 @@ func (client *JobsClient) cancelCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -126,12 +129,13 @@ 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-10-01 -// 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. -// body - Job definition object. -// options - JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. +// +// Generated from API version 2023-02-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. +// - body - Job definition object. +// - options - JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. func (client *JobsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, id string, body JobBase, options *JobsClientCreateOrUpdateOptions) (JobsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, id, body, options) if err != nil { @@ -171,7 +175,7 @@ func (client *JobsClient) createOrUpdateCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -188,18 +192,21 @@ 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-10-01 -// 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. -// options - JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. +// +// Generated from API version 2023-02-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. +// - options - JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. func (client *JobsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientBeginDeleteOptions) (*runtime.Poller[JobsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, id, options) if err != nil { return nil, err } - return runtime.NewPoller[JobsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[JobsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[JobsClientDeleteResponse](options.ResumeToken, client.pl, nil) } @@ -207,7 +214,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -247,7 +255,7 @@ func (client *JobsClient) deleteCreateRequest(ctx context.Context, resourceGroup return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -255,11 +263,12 @@ 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-10-01 -// 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. -// options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +// +// Generated from API version 2023-02-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. +// - options - JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. func (client *JobsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, id string, options *JobsClientGetOptions) (JobsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, id, options) if err != nil { @@ -299,7 +308,7 @@ func (client *JobsClient) getCreateRequest(ctx context.Context, resourceGroupNam return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,10 +324,11 @@ func (client *JobsClient) getHandleResponse(resp *http.Response) (JobsClientGetR } // NewListPager - Lists Jobs in the workspace. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager method. func (client *JobsClient) NewListPager(resourceGroupName string, workspaceName string, options *JobsClientListOptions) *runtime.Pager[JobsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[JobsClientListResponse]{ More: func(page JobsClientListResponse) bool { @@ -367,7 +377,7 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupNa return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -380,6 +390,15 @@ func (client *JobsClient) listCreateRequest(ctx context.Context, resourceGroupNa if options != nil && options.ListViewType != nil { reqQP.Set("listViewType", string(*options.ListViewType)) } + if options != nil && options.AssetName != nil { + reqQP.Set("assetName", *options.AssetName) + } + 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/jobs_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client_example_test.go deleted file mode 100644 index 4abfd8f3b270..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/jobs_client_example_test.go +++ /dev/null @@ -1,563 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/list.json -func ExampleJobsClient_NewListPager_listAutoMlJob() { - 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: nil, - Tag: 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-10-01/examples/Job/CommandJob/list.json -func ExampleJobsClient_NewListPager_listCommandJob() { - 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-10-01/examples/Job/PipelineJob/list.json -func ExampleJobsClient_NewListPager_listPipelineJob() { - 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-10-01/examples/Job/SweepJob/list.json -func ExampleJobsClient_NewListPager_listSweepJob() { - 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-10-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-10-01/examples/Job/AutoMLJob/get.json -func ExampleJobsClient_Get_getAutoMlJob() { - 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-10-01/examples/Job/CommandJob/get.json -func ExampleJobsClient_Get_getCommandJob() { - 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-10-01/examples/Job/PipelineJob/get.json -func ExampleJobsClient_Get_getPipelineJob() { - 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-10-01/examples/Job/SweepJob/get.json -func ExampleJobsClient_Get_getSweepJob() { - 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-10-01/examples/Job/AutoMLJob/createOrUpdate.json -func ExampleJobsClient_CreateOrUpdate_createOrUpdateAutoMlJob() { - 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.AutoMLJob{ - 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), - }, - IsArchived: to.Ptr(false), - JobType: to.Ptr(armmachinelearning.JobTypeAutoML), - 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"), - }, - }, - }, - EnvironmentID: to.Ptr("string"), - EnvironmentVariables: map[string]*string{ - "string": to.Ptr("string"), - }, - 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.JobResourceConfiguration{ - InstanceCount: to.Ptr[int32](1), - InstanceType: to.Ptr("string"), - Properties: map[string]interface{}{ - "string": map[string]interface{}{ - "9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad": nil, - }, - }, - }, - TaskDetails: &armmachinelearning.ImageClassification{ - TargetColumnName: to.Ptr("string"), - TaskType: to.Ptr(armmachinelearning.TaskTypeImageClassification), - TrainingData: &armmachinelearning.MLTableJobInput{ - URI: to.Ptr("string"), - JobInputType: to.Ptr(armmachinelearning.JobInputTypeMltable), - }, - LimitSettings: &armmachinelearning.ImageLimitSettings{ - MaxTrials: to.Ptr[int32](2), - }, - ModelSettings: &armmachinelearning.ImageModelSettingsClassification{ - ValidationCropSize: to.Ptr[int32](2), - }, - SearchSpace: []*armmachinelearning.ImageModelDistributionSettingsClassification{ - { - ValidationCropSize: to.Ptr("choice(2, 360)"), - }}, - }, - }, - }, 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-10-01/examples/Job/CommandJob/createOrUpdate.json -func ExampleJobsClient_CreateOrUpdate_createOrUpdateCommandJob() { - 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.JobResourceConfiguration{ - 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-10-01/examples/Job/PipelineJob/createOrUpdate.json -func ExampleJobsClient_CreateOrUpdate_createOrUpdatePipelineJob() { - 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.PipelineJob{ - 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"), - JobType: to.Ptr(armmachinelearning.JobTypePipeline), - 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"), - }, - }, - }, - Inputs: map[string]armmachinelearning.JobInputClassification{ - "string": &armmachinelearning.LiteralJobInput{ - Description: to.Ptr("string"), - JobInputType: to.Ptr(armmachinelearning.JobInputTypeLiteral), - Value: to.Ptr("string"), - }, - }, - Outputs: map[string]armmachinelearning.JobOutputClassification{ - "string": &armmachinelearning.URIFileJobOutput{ - Mode: to.Ptr(armmachinelearning.OutputDeliveryModeUpload), - URI: to.Ptr("string"), - Description: to.Ptr("string"), - JobOutputType: to.Ptr(armmachinelearning.JobOutputTypeURIFile), - }, - }, - Settings: map[string]interface{}{}, - }, - }, 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-10-01/examples/Job/SweepJob/createOrUpdate.json -func ExampleJobsClient_CreateOrUpdate_createOrUpdateSweepJob() { - 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.SweepJob{ - 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"), - JobType: to.Ptr(armmachinelearning.JobTypeSweep), - 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"), - }, - }, - }, - EarlyTermination: &armmachinelearning.MedianStoppingPolicy{ - DelayEvaluation: to.Ptr[int32](1), - EvaluationInterval: to.Ptr[int32](1), - PolicyType: to.Ptr(armmachinelearning.EarlyTerminationPolicyTypeMedianStopping), - }, - Limits: &armmachinelearning.SweepJobLimits{ - JobLimitsType: to.Ptr(armmachinelearning.JobLimitsTypeSweep), - MaxConcurrentTrials: to.Ptr[int32](1), - MaxTotalTrials: to.Ptr[int32](1), - TrialTimeout: to.Ptr("PT1S"), - }, - Objective: &armmachinelearning.Objective{ - Goal: to.Ptr(armmachinelearning.GoalMinimize), - PrimaryMetric: to.Ptr("string"), - }, - SamplingAlgorithm: &armmachinelearning.GridSamplingAlgorithm{ - SamplingAlgorithmType: to.Ptr(armmachinelearning.SamplingAlgorithmTypeGrid), - }, - SearchSpace: map[string]interface{}{ - "string": map[string]interface{}{}, - }, - Trial: &armmachinelearning.TrialComponent{ - CodeID: to.Ptr("string"), - Command: to.Ptr("string"), - Distribution: &armmachinelearning.Mpi{ - DistributionType: to.Ptr(armmachinelearning.DistributionTypeMpi), - ProcessCountPerInstance: to.Ptr[int32](1), - }, - EnvironmentID: to.Ptr("string"), - EnvironmentVariables: map[string]*string{ - "string": to.Ptr("string"), - }, - Resources: &armmachinelearning.JobResourceConfiguration{ - 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-10-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/labelingjobs_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/labelingjobs_client.go new file mode 100644 index 000000000000..0e58fff5e6b5 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/labelingjobs_client.go @@ -0,0 +1,524 @@ +//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 2023-02-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(resp, client.pl, &runtime.NewPollerOptions[LabelingJobsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } 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 2023-02-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", "2023-02-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 2023-02-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", "2023-02-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 2023-02-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 2023-02-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", "2023-02-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 2023-02-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", "2023-02-01-preview") + if options != nil && options.IncludeJobInstructions != nil { + reqQP.Set("includeJobInstructions", strconv.FormatBool(*options.IncludeJobInstructions)) + } + if options != nil && options.IncludeLabelCategories != nil { + reqQP.Set("includeLabelCategories", strconv.FormatBool(*options.IncludeLabelCategories)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *LabelingJobsClient) getHandleResponse(resp *http.Response) (LabelingJobsClientGetResponse, error) { + result := LabelingJobsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LabelingJob); err != nil { + return LabelingJobsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Lists labeling jobs in the workspace. +// +// Generated from API version 2023-02-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.NewListPager 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", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *LabelingJobsClient) listHandleResponse(resp *http.Response) (LabelingJobsClientListResponse, error) { + result := LabelingJobsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.LabelingJobResourceArmPaginatedResult); err != nil { + return LabelingJobsClientListResponse{}, err + } + return result, nil +} + +// Pause - Pause a labeling job. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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", "2023-02-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 2023-02-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 2023-02-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", "2023-02-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/modelcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go index eabb6c875e34..79bcb30ec15d 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client.go @@ -33,9 +33,9 @@ type ModelContainersClient struct { } // NewModelContainersClient creates a new instance of ModelContainersClient 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. +// - 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 NewModelContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ModelContainersClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,13 +58,14 @@ 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-10-01 -// 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. -// body - Container entity to create or update. -// options - ModelContainersClientCreateOrUpdateOptions contains the optional parameters for the ModelContainersClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - body - Container entity to create or update. +// - options - ModelContainersClientCreateOrUpdateOptions contains the optional parameters for the ModelContainersClient.CreateOrUpdate +// method. func (client *ModelContainersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, body ModelContainer, options *ModelContainersClientCreateOrUpdateOptions) (ModelContainersClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, body, options) if err != nil { @@ -104,7 +105,7 @@ func (client *ModelContainersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -121,11 +122,12 @@ 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-10-01 -// 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. -// options - ModelContainersClientDeleteOptions contains the optional parameters for the ModelContainersClient.Delete method. +// +// Generated from API version 2023-02-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. +// - options - ModelContainersClientDeleteOptions contains the optional parameters for the ModelContainersClient.Delete method. func (client *ModelContainersClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ModelContainersClientDeleteOptions) (ModelContainersClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -165,7 +167,7 @@ func (client *ModelContainersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,11 +175,12 @@ 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-10-01 -// 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. -// options - ModelContainersClientGetOptions contains the optional parameters for the ModelContainersClient.Get method. +// +// Generated from API version 2023-02-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. +// - options - ModelContainersClientGetOptions contains the optional parameters for the ModelContainersClient.Get method. func (client *ModelContainersClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, options *ModelContainersClientGetOptions) (ModelContainersClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, options) if err != nil { @@ -217,7 +220,7 @@ func (client *ModelContainersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,10 +236,12 @@ func (client *ModelContainersClient) getHandleResponse(resp *http.Response) (Mod } // NewListPager - List model containers. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager +// method. func (client *ModelContainersClient) NewListPager(resourceGroupName string, workspaceName string, options *ModelContainersClientListOptions) *runtime.Pager[ModelContainersClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ModelContainersClientListResponse]{ More: func(page ModelContainersClientListResponse) bool { @@ -285,7 +290,7 @@ func (client *ModelContainersClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client_example_test.go deleted file mode 100644 index 09652ec8352a..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelcontainers_client_example_test.go +++ /dev/null @@ -1,108 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/models.go b/sdk/resourcemanager/machinelearning/armmachinelearning/models.go index 1ffa0147f8b5..fdb60ce7bf87 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/models.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/models.go @@ -99,6 +99,33 @@ type AKSSchemaProperties struct { SystemServices []*SystemService `json:"systemServices,omitempty" azure:"ro"` } +type AccessKeyAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` + + // Category of the connection + Category *ConnectionCategory `json:"category,omitempty"` + Credentials *WorkspaceConnectionAccessKey `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccessKeyAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: a.AuthType, + Category: a.Category, + Target: a.Target, + Value: a.Value, + ValueFormat: a.ValueFormat, + } +} + // AccountKeyDatastoreCredentials - Account key datastore credentials configuration. type AccountKeyDatastoreCredentials struct { // REQUIRED; [Required] Credential type used to authentication with storage. @@ -131,6 +158,12 @@ func (a *AccountKeyDatastoreSecrets) GetDatastoreSecrets() *DatastoreSecrets { } } +// AcrDetails - Details of ACR account to be used for the Registry +type AcrDetails struct { + SystemCreatedAcrAccount *SystemCreatedAcrAccount `json:"systemCreatedAcrAccount,omitempty"` + UserCreatedAcrAccount *UserCreatedAcrAccount `json:"userCreatedAcrAccount,omitempty"` +} + // AksComputeSecrets - Secrets related to a Machine Learning compute based on AKS. type AksComputeSecrets struct { // REQUIRED; The type of compute @@ -182,6 +215,19 @@ type AksNetworkingConfiguration struct { SubnetID *string `json:"subnetId,omitempty"` } +// AllNodes - All nodes means the service will be running on all of the nodes of the job +type AllNodes struct { + // REQUIRED; [Required] Type of the Nodes value + NodesValueType *NodesValueType `json:"nodesValueType,omitempty"` +} + +// GetNodes implements the NodesClassification interface for type AllNodes. +func (a *AllNodes) GetNodes() *Nodes { + return &Nodes{ + NodesValueType: a.NodesValueType, + } +} + // AmlCompute - An Azure Machine Learning compute. type AmlCompute struct { // REQUIRED; The type of compute @@ -279,7 +325,7 @@ type AmlComputeProperties struct { OSType *OsType `json:"osType,omitempty"` // A property bag containing additional properties. - PropertyBag interface{} `json:"propertyBag,omitempty"` + PropertyBag any `json:"propertyBag,omitempty"` // 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 @@ -337,7 +383,7 @@ type AmlComputeSchema struct { Properties *AmlComputeProperties `json:"properties,omitempty"` } -// AmlOperation - Azure Machine Learning workspace REST API operation +// AmlOperation - Azure Machine Learning REST API operation type AmlOperation struct { // Display name of operation Display *AmlOperationDisplay `json:"display,omitempty"` @@ -366,7 +412,7 @@ type AmlOperationDisplay struct { // AmlOperationListResult - An array of operations supported by the resource provider. type AmlOperationListResult struct { - // List of AML workspace operations supported by the AML workspace resource provider. + // List of AML operations supported by the AML resource provider. Value []*AmlOperation `json:"value,omitempty"` } @@ -395,6 +441,14 @@ type AmlUserFeature struct { ID *string `json:"id,omitempty"` } +// ArmResourceID - ARM ResourceId of a resource +type ArmResourceID struct { + // Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + // or + // "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + ResourceID *string `json:"resourceId,omitempty"` +} + type AssetBase struct { // The asset description text. Description *string `json:"description,omitempty"` @@ -443,6 +497,12 @@ type AssetJobInput struct { // AssetJobOutput - Asset output type. type AssetJobOutput struct { + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Output Asset Delivery Mode. Mode *OutputDeliveryMode `json:"mode,omitempty"` @@ -529,12 +589,18 @@ type AutoMLJob struct { // Is the asset archived? IsArchived *bool `json:"isArchived,omitempty"` + // Notification setting for the job + NotificationSetting *NotificationSetting `json:"notificationSetting,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"` + // Queue settings for the job + QueueSettings *QueueSettings `json:"queueSettings,omitempty"` + // Compute Resource configuration for the job. Resources *JobResourceConfiguration `json:"resources,omitempty"` @@ -551,18 +617,19 @@ type AutoMLJob struct { // 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, + ComponentID: a.ComponentID, + ComputeID: a.ComputeID, + DisplayName: a.DisplayName, + ExperimentName: a.ExperimentName, + Identity: a.Identity, + IsArchived: a.IsArchived, + JobType: a.JobType, + NotificationSetting: a.NotificationSetting, + Services: a.Services, + Status: a.Status, + Description: a.Description, + Properties: a.Properties, + Tags: a.Tags, } } @@ -657,6 +724,12 @@ func (a *AutoTargetRollingWindowSize) GetTargetRollingWindowSize() *TargetRollin } } +// AutologgerSettings - Settings for Autologger. +type AutologgerSettings struct { + // REQUIRED; [Required] Indicates whether mlflow autologger is enabled. + MlflowAutologger *MLFlowAutologgerState `json:"mlflowAutologger,omitempty"` +} + // AzureBlobDatastore - Azure Blob datastore configuration. type AzureBlobDatastore struct { // REQUIRED; [Required] Account credentials. @@ -683,9 +756,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"` @@ -722,9 +801,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"` @@ -770,9 +855,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"` @@ -792,6 +883,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. @@ -818,9 +918,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"` @@ -840,6 +946,38 @@ func (a *AzureFileDatastore) GetDatastoreProperties() *DatastoreProperties { } } +// AzureMLBatchInferencingServer - Azure ML batch inferencing server configurations. +type AzureMLBatchInferencingServer struct { + // REQUIRED; [Required] Inferencing server type for various targets. + ServerType *InferencingServerType `json:"serverType,omitempty"` + + // Code configuration for AML batch inferencing server. + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` +} + +// GetInferencingServer implements the InferencingServerClassification interface for type AzureMLBatchInferencingServer. +func (a *AzureMLBatchInferencingServer) GetInferencingServer() *InferencingServer { + return &InferencingServer{ + ServerType: a.ServerType, + } +} + +// AzureMLOnlineInferencingServer - Azure ML online inferencing configurations. +type AzureMLOnlineInferencingServer struct { + // REQUIRED; [Required] Inferencing server type for various targets. + ServerType *InferencingServerType `json:"serverType,omitempty"` + + // Code configuration for AML inferencing server. + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` +} + +// GetInferencingServer implements the InferencingServerClassification interface for type AzureMLOnlineInferencingServer. +func (a *AzureMLOnlineInferencingServer) GetInferencingServer() *InferencingServer { + return &InferencingServer{ + ServerType: a.ServerType, + } +} + // BanditPolicy - Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation type BanditPolicy struct { // REQUIRED; [Required] Name of policy configuration @@ -867,6 +1005,39 @@ func (b *BanditPolicy) GetEarlyTerminationPolicy() *EarlyTerminationPolicy { } } +// BaseEnvironmentID - Base environment type. +type BaseEnvironmentID struct { + // REQUIRED; [Required] Base environment type. + BaseEnvironmentSourceType *BaseEnvironmentSourceType `json:"baseEnvironmentSourceType,omitempty"` + + // REQUIRED; [Required] Resource id accepting ArmId or AzureMlId. + ResourceID *string `json:"resourceId,omitempty"` +} + +// GetBaseEnvironmentSource implements the BaseEnvironmentSourceClassification interface for type BaseEnvironmentID. +func (b *BaseEnvironmentID) GetBaseEnvironmentSource() *BaseEnvironmentSource { + return &BaseEnvironmentSource{ + BaseEnvironmentSourceType: b.BaseEnvironmentSourceType, + } +} + +// BaseEnvironmentSourceClassification provides polymorphic access to related types. +// Call the interface's GetBaseEnvironmentSource() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BaseEnvironmentID, *BaseEnvironmentSource +type BaseEnvironmentSourceClassification interface { + // GetBaseEnvironmentSource returns the BaseEnvironmentSource content of the underlying type. + GetBaseEnvironmentSource() *BaseEnvironmentSource +} + +type BaseEnvironmentSource struct { + // REQUIRED; [Required] Base environment type. + BaseEnvironmentSourceType *BaseEnvironmentSourceType `json:"baseEnvironmentSourceType,omitempty"` +} + +// GetBaseEnvironmentSource implements the BaseEnvironmentSourceClassification interface for type BaseEnvironmentSource. +func (b *BaseEnvironmentSource) GetBaseEnvironmentSource() *BaseEnvironmentSource { return b } + type BatchDeployment struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` @@ -899,6 +1070,26 @@ type BatchDeployment struct { Type *string `json:"type,omitempty" azure:"ro"` } +// BatchDeploymentConfigurationClassification provides polymorphic access to related types. +// Call the interface's GetBatchDeploymentConfiguration() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *BatchDeploymentConfiguration, *BatchPipelineComponentDeploymentConfiguration +type BatchDeploymentConfigurationClassification interface { + // GetBatchDeploymentConfiguration returns the BatchDeploymentConfiguration content of the underlying type. + GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration +} + +// BatchDeploymentConfiguration - Properties relevant to different deployment types. +type BatchDeploymentConfiguration struct { + // REQUIRED; [Required] The type of the deployment + DeploymentConfigurationType *BatchDeploymentConfigurationType `json:"deploymentConfigurationType,omitempty"` +} + +// GetBatchDeploymentConfiguration implements the BatchDeploymentConfigurationClassification interface for type BatchDeploymentConfiguration. +func (b *BatchDeploymentConfiguration) GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration { + return b +} + // BatchDeploymentProperties - Batch inference settings per deployment. type BatchDeploymentProperties struct { // Code configuration for the endpoint deployment. @@ -907,10 +1098,13 @@ type BatchDeploymentProperties struct { // Compute target for batch inference operation. Compute *string `json:"compute,omitempty"` + // Properties relevant to different deployment types. + DeploymentConfiguration BatchDeploymentConfigurationClassification `json:"deploymentConfiguration,omitempty"` + // 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. @@ -987,7 +1181,7 @@ type BatchDeploymentsClientGetOptions struct { // placeholder for future optional parameters } -// BatchDeploymentsClientListOptions contains the optional parameters for the BatchDeploymentsClient.List method. +// BatchDeploymentsClientListOptions contains the optional parameters for the BatchDeploymentsClient.NewListPager method. type BatchDeploymentsClientListOptions struct { // Ordering of list. OrderBy *string @@ -1042,7 +1236,7 @@ type BatchEndpointProperties struct { // 'Key' doesn't expire but 'AMLToken' does. AuthMode *EndpointAuthMode `json:"authMode,omitempty"` - // Default values for Batch Endpoint + // Default values for Batch Endpoint. Defaults *BatchEndpointDefaults `json:"defaults,omitempty"` // Description of the inference endpoint. @@ -1103,7 +1297,7 @@ type BatchEndpointsClientListKeysOptions struct { // placeholder for future optional parameters } -// BatchEndpointsClientListOptions contains the optional parameters for the BatchEndpointsClient.List method. +// BatchEndpointsClientListOptions contains the optional parameters for the BatchEndpointsClient.NewListPager method. type BatchEndpointsClientListOptions struct { // Number of endpoints to be retrieved in a page of results. Count *int32 @@ -1111,6 +1305,31 @@ type BatchEndpointsClientListOptions struct { Skip *string } +// BatchPipelineComponentDeploymentConfiguration - Properties for a Batch Pipeline Component Deployment. +type BatchPipelineComponentDeploymentConfiguration struct { + // REQUIRED; [Required] The type of the deployment + DeploymentConfigurationType *BatchDeploymentConfigurationType `json:"deploymentConfigurationType,omitempty"` + + // The ARM id of the component to be run. + ComponentID *IDAssetReference `json:"componentId,omitempty"` + + // The description which will be applied to the job. + Description *string `json:"description,omitempty"` + + // Run-time settings for the pipeline job. + Settings map[string]*string `json:"settings,omitempty"` + + // The tags which will be applied to the job. + Tags map[string]*string `json:"tags,omitempty"` +} + +// GetBatchDeploymentConfiguration implements the BatchDeploymentConfigurationClassification interface for type BatchPipelineComponentDeploymentConfiguration. +func (b *BatchPipelineComponentDeploymentConfiguration) GetBatchDeploymentConfiguration() *BatchDeploymentConfiguration { + return &BatchDeploymentConfiguration{ + DeploymentConfigurationType: b.DeploymentConfigurationType, + } +} + // BatchRetrySettings - Retry settings for a batch inference operation. type BatchRetrySettings struct { // Maximum retry count for a mini-batch @@ -1133,6 +1352,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 @@ -1143,6 +1373,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. @@ -1204,6 +1468,9 @@ type Classification struct { // Featurization inputs needed for AutoML job. FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` + // Execution constraints for AutoMLJob. LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` @@ -1219,6 +1486,12 @@ type Classification struct { // Primary metric for the task. PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. TargetColumnName *string `json:"targetColumnName,omitempty"` @@ -1284,6 +1557,12 @@ type ClassificationTrainingSettings struct { // Stack ensemble settings for stack ensemble run. StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` + + // TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result + // in mixed mode or heuristics based mode selection. Default is 'auto'. If + // 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. If 'NonDistributed' then + // only non distributed algorithms are chosen. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` } // ClusterUpdateParameters - AmlCompute update parameters. @@ -1298,6 +1577,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" @@ -1344,6 +1657,9 @@ type CodeContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the code container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // CodeContainerResourceArmPaginatedResult - A paginated list of CodeContainer entities. @@ -1371,7 +1687,7 @@ type CodeContainersClientGetOptions struct { // placeholder for future optional parameters } -// CodeContainersClientListOptions contains the optional parameters for the CodeContainersClient.List method. +// CodeContainersClientListOptions contains the optional parameters for the CodeContainersClient.NewListPager method. type CodeContainersClientListOptions struct { // Continuation token for pagination. Skip *string @@ -1414,6 +1730,9 @@ type CodeVersionProperties struct { // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Provisioning state for the code version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // CodeVersionResourceArmPaginatedResult - A paginated list of CodeVersion entities. @@ -1440,7 +1759,7 @@ type CodeVersionsClientGetOptions struct { // placeholder for future optional parameters } -// CodeVersionsClientListOptions contains the optional parameters for the CodeVersionsClient.List method. +// CodeVersionsClientListOptions contains the optional parameters for the CodeVersionsClient.NewListPager method. type CodeVersionsClientListOptions struct { // Ordering of list. OrderBy *string @@ -1456,7 +1775,7 @@ type ColumnTransformer struct { 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"` + Parameters any `json:"parameters,omitempty"` } // CommandJob - Command job definition. @@ -1470,6 +1789,9 @@ type CommandJob struct { // REQUIRED; [Required] Specifies the type of job. JobType *JobType `json:"jobType,omitempty"` + // Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + AutologgerSettings *AutologgerSettings `json:"autologgerSettings,omitempty"` + // ARM resource ID of the code asset. CodeID *string `json:"codeId,omitempty"` @@ -1507,12 +1829,18 @@ type CommandJob struct { // Command Job limit. Limits *CommandJobLimits `json:"limits,omitempty"` + // Notification setting for the job + NotificationSetting *NotificationSetting `json:"notificationSetting,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"` + // Queue settings for the job + QueueSettings *QueueSettings `json:"queueSettings,omitempty"` + // Compute Resource configuration for the job. Resources *JobResourceConfiguration `json:"resources,omitempty"` @@ -1523,7 +1851,7 @@ type CommandJob struct { Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Input parameters. - Parameters interface{} `json:"parameters,omitempty" azure:"ro"` + Parameters any `json:"parameters,omitempty" azure:"ro"` // READ-ONLY; Status of the job. Status *JobStatus `json:"status,omitempty" azure:"ro"` @@ -1532,18 +1860,19 @@ 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, - Identity: c.Identity, - IsArchived: c.IsArchived, - JobType: c.JobType, - Services: c.Services, - Status: c.Status, - Description: c.Description, - Properties: c.Properties, - Tags: c.Tags, + ComponentID: c.ComponentID, + ComputeID: c.ComputeID, + DisplayName: c.DisplayName, + ExperimentName: c.ExperimentName, + Identity: c.Identity, + IsArchived: c.IsArchived, + JobType: c.JobType, + NotificationSetting: c.NotificationSetting, + Services: c.Services, + Status: c.Status, + Description: c.Description, + Properties: c.Properties, + Tags: c.Tags, } } @@ -1602,6 +1931,9 @@ type ComponentContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the component container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // ComponentContainerResourceArmPaginatedResult - A paginated list of ComponentContainer entities. @@ -1629,7 +1961,7 @@ type ComponentContainersClientGetOptions struct { // placeholder for future optional parameters } -// ComponentContainersClientListOptions contains the optional parameters for the ComponentContainersClient.List method. +// ComponentContainersClientListOptions contains the optional parameters for the ComponentContainersClient.NewListPager method. type ComponentContainersClientListOptions struct { // View type for including/excluding (for example) archived entities. ListViewType *ListViewType @@ -1658,7 +1990,7 @@ type ComponentVersion struct { // ComponentVersionProperties - Definition of a component version: defines resources that span component types. type ComponentVersionProperties struct { // Defines Component definition details. - ComponentSpec interface{} `json:"componentSpec,omitempty"` + ComponentSpec any `json:"componentSpec,omitempty"` // The asset description text. Description *string `json:"description,omitempty"` @@ -1674,6 +2006,9 @@ type ComponentVersionProperties struct { // Tag dictionary. Tags can be added, removed, and updated. Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Provisioning state for the component version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // ComponentVersionResourceArmPaginatedResult - A paginated list of ComponentVersion entities. @@ -1701,7 +2036,7 @@ type ComponentVersionsClientGetOptions struct { // placeholder for future optional parameters } -// ComponentVersionsClientListOptions contains the optional parameters for the ComponentVersionsClient.List method. +// ComponentVersionsClientListOptions contains the optional parameters for the ComponentVersionsClient.NewListPager method. type ComponentVersionsClientListOptions struct { // View type for including/excluding (for example) archived entities. ListViewType *ListViewType @@ -1806,17 +2141,28 @@ type ComputeClientListKeysOptions struct { // placeholder for future optional parameters } -// ComputeClientListNodesOptions contains the optional parameters for the ComputeClient.ListNodes method. +// ComputeClientListNodesOptions contains the optional parameters for the ComputeClient.NewListNodesPager method. type ComputeClientListNodesOptions struct { // placeholder for future optional parameters } -// ComputeClientListOptions contains the optional parameters for the ComputeClient.List method. +// ComputeClientListOptions contains the optional parameters for the ComputeClient.NewListPager method. type ComputeClientListOptions struct { // Continuation token for pagination. 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 @@ -1879,6 +2225,12 @@ type ComputeInstanceApplication struct { EndpointURI *string `json:"endpointUri,omitempty"` } +// ComputeInstanceAutologgerSettings - Specifies settings for autologger. +type ComputeInstanceAutologgerSettings struct { + // Indicates whether mlflow autologger is enabled for notebooks. + MlflowAutologger *MlflowAutologger `json:"mlflowAutologger,omitempty"` +} + // ComputeInstanceConnectivityEndpoints - Defines all connectivity endpoints and properties for an ComputeInstance. type ComputeInstanceConnectivityEndpoints struct { // READ-ONLY; Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). @@ -1906,7 +2258,7 @@ type ComputeInstanceContainer struct { Network *Network `json:"network,omitempty"` // READ-ONLY; services of this containers. - Services []interface{} `json:"services,omitempty" azure:"ro"` + Services []any `json:"services,omitempty" azure:"ro"` } // ComputeInstanceCreatedBy - Describes information on user who created this ComputeInstance. @@ -1997,20 +2349,33 @@ type ComputeInstanceProperties struct { // user can access applications on this instance depending on his/her assigned role. ApplicationSharingPolicy *ApplicationSharingPolicy `json:"applicationSharingPolicy,omitempty"` + // Specifies settings for autologger. + AutologgerSettings *ComputeInstanceAutologgerSettings `json:"autologgerSettings,omitempty"` + // The Compute Instance Authorization type. Available values are personal (default). ComputeInstanceAuthorizationType *ComputeInstanceAuthorizationType `json:"computeInstanceAuthorizationType,omitempty"` + // List of Custom Services added to the compute. + CustomServices []*CustomService `json:"customServices,omitempty"` + // Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that // the compute nodes will have public IPs provisioned. false - Indicates that the // compute nodes will have a private endpoint and no public IPs. EnableNodePublicIP *bool `json:"enableNodePublicIp,omitempty"` + // Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum + // is 3 days. + IdleTimeBeforeShutdown *string `json:"idleTimeBeforeShutdown,omitempty"` + // Settings for a personal compute instance. PersonalComputeInstanceSettings *PersonalComputeInstanceSettings `json:"personalComputeInstanceSettings,omitempty"` // Specifies policy and settings for SSH access. SSHSettings *ComputeInstanceSSHSettings `json:"sshSettings,omitempty"` + // The list of schedules to be applied on the computes. + Schedules *ComputeSchedules `json:"schedules,omitempty"` + // Details of customized scripts to execute for setting up the cluster. SetupScripts *SetupScripts `json:"setupScripts,omitempty"` @@ -2044,8 +2409,8 @@ type ComputeInstanceProperties struct { // READ-ONLY; The last operation on ComputeInstance. LastOperation *ComputeInstanceLastOperation `json:"lastOperation,omitempty" azure:"ro"` - // READ-ONLY; The list of schedules to be applied on the computes. - Schedules *ComputeSchedules `json:"schedules,omitempty" azure:"ro"` + // READ-ONLY; Returns metadata about the operating system image for this compute instance. + OSImageMetadata *ImageMetadata `json:"osImageMetadata,omitempty" azure:"ro"` // READ-ONLY; The current state of this ComputeInstance. State *ComputeInstanceState `json:"state,omitempty" azure:"ro"` @@ -2118,6 +2483,10 @@ type ComputeResourceSchema struct { Properties ComputeClassification `json:"properties,omitempty"` } +type ComputeRuntimeDto struct { + SparkRuntimeVersion *string `json:"sparkRuntimeVersion,omitempty"` +} + // ComputeSchedules - The list of schedules to be applied on the computes type ComputeSchedules struct { // The list of compute start stop schedules to be applied. @@ -2240,6 +2609,22 @@ func (c *CustomForecastHorizon) GetForecastHorizon() *ForecastHorizon { } } +// CustomInferencingServer - Custom inference server configurations. +type CustomInferencingServer struct { + // REQUIRED; [Required] Inferencing server type for various targets. + ServerType *InferencingServerType `json:"serverType,omitempty"` + + // Inference configuration for custom inferencing. + InferenceConfiguration *OnlineInferenceConfiguration `json:"inferenceConfiguration,omitempty"` +} + +// GetInferencingServer implements the InferencingServerClassification interface for type CustomInferencingServer. +func (c *CustomInferencingServer) GetInferencingServer() *InferencingServer { + return &InferencingServer{ + ServerType: c.ServerType, + } +} + type CustomModelJobInput struct { // REQUIRED; [Required] Specifies the type of job. JobInputType *JobInputType `json:"jobInputType,omitempty"` @@ -2266,6 +2651,12 @@ type CustomModelJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -2315,6 +2706,30 @@ func (c *CustomSeasonality) GetSeasonality() *Seasonality { } } +// CustomService - Specifies the custom service configuration +type CustomService struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]any + + // 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"` @@ -2412,7 +2827,7 @@ type DataContainersClientGetOptions struct { // placeholder for future optional parameters } -// DataContainersClientListOptions contains the optional parameters for the DataContainersClient.List method. +// DataContainersClientListOptions contains the optional parameters for the DataContainersClient.NewListPager method. type DataContainersClientListOptions struct { // View type for including/excluding (for example) archived entities. ListViewType *ListViewType @@ -2581,7 +2996,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.V20221001.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -2629,7 +3044,7 @@ type DataVersionsClientGetOptions struct { // placeholder for future optional parameters } -// DataVersionsClientListOptions contains the optional parameters for the DataVersionsClient.List method. +// DataVersionsClientListOptions contains the optional parameters for the DataVersionsClient.NewListPager method. type DataVersionsClientListOptions struct { // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived // entities. @@ -2734,6 +3149,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. @@ -2755,8 +3201,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 @@ -2774,7 +3220,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 @@ -2816,7 +3263,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 @@ -2847,7 +3295,7 @@ type DatastoresClientGetOptions struct { // placeholder for future optional parameters } -// DatastoresClientListOptions contains the optional parameters for the DatastoresClient.List method. +// DatastoresClientListOptions contains the optional parameters for the DatastoresClient.NewListPager method. type DatastoresClientListOptions struct { // Maximum number of results to return. Count *int32 @@ -2902,37 +3350,40 @@ type DeploymentResourceConfiguration struct { // Optional type of VM used as supported by the compute target. InstanceType *string `json:"instanceType,omitempty"` + // Locations where the job can run. + Locations []*string `json:"locations,omitempty"` + // Additional properties bag. - Properties map[string]interface{} `json:"properties,omitempty"` + Properties map[string]any `json:"properties,omitempty"` } type DiagnoseRequestProperties struct { // Setting for diagnosing dependent application insights - ApplicationInsights map[string]interface{} `json:"applicationInsights,omitempty"` + ApplicationInsights map[string]any `json:"applicationInsights,omitempty"` // Setting for diagnosing dependent container registry - ContainerRegistry map[string]interface{} `json:"containerRegistry,omitempty"` + ContainerRegistry map[string]any `json:"containerRegistry,omitempty"` // Setting for diagnosing dns resolution - DNSResolution map[string]interface{} `json:"dnsResolution,omitempty"` + DNSResolution map[string]any `json:"dnsResolution,omitempty"` // Setting for diagnosing dependent key vault - KeyVault map[string]interface{} `json:"keyVault,omitempty"` + KeyVault map[string]any `json:"keyVault,omitempty"` // Setting for diagnosing network security group - Nsg map[string]interface{} `json:"nsg,omitempty"` + Nsg map[string]any `json:"nsg,omitempty"` // Setting for diagnosing unclassified category of problems - Others map[string]interface{} `json:"others,omitempty"` + Others map[string]any `json:"others,omitempty"` // Setting for diagnosing resource lock - ResourceLock map[string]interface{} `json:"resourceLock,omitempty"` + ResourceLock map[string]any `json:"resourceLock,omitempty"` // Setting for diagnosing dependent storage account - StorageAccount map[string]interface{} `json:"storageAccount,omitempty"` + StorageAccount map[string]any `json:"storageAccount,omitempty"` // Setting for diagnosing user defined routing - Udr map[string]interface{} `json:"udr,omitempty"` + Udr map[string]any `json:"udr,omitempty"` } type DiagnoseResponseResult struct { @@ -2989,6 +3440,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]any + + // 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: @@ -3024,6 +3483,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"` @@ -3035,6 +3499,28 @@ type EncryptionProperty struct { Identity *IdentityForCmk `json:"identity,omitempty"` } +type EncryptionUpdateProperties struct { + // REQUIRED; Customer Key vault properties. + KeyVaultProperties *EncryptionKeyVaultUpdateProperties `json:"keyVaultProperties,omitempty"` +} + +type Endpoint struct { + // Host IP over which the application is exposed from the container + HostIP *string `json:"hostIp,omitempty"` + + // Name of the Endpoint + Name *string `json:"name,omitempty"` + + // Protocol over which communication will happen over this endpoint + Protocol *Protocol `json:"protocol,omitempty"` + + // Port over which the application is exposed from container. + Published *int32 `json:"published,omitempty"` + + // Application port inside the container. + Target *int32 `json:"target,omitempty"` +} + // EndpointAuthKeys - Keys for endpoint authentication. type EndpointAuthKeys struct { // The primary key. @@ -3067,7 +3553,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. @@ -3105,7 +3591,7 @@ type EndpointScheduleAction struct { ActionType *ScheduleActionType `json:"actionType,omitempty"` // REQUIRED; [Required] Defines Schedule action definition details. - EndpointInvocationDefinition interface{} `json:"endpointInvocationDefinition,omitempty"` + EndpointInvocationDefinition any `json:"endpointInvocationDefinition,omitempty"` } // GetScheduleActionBase implements the ScheduleActionBaseClassification interface for type EndpointScheduleAction. @@ -3152,6 +3638,9 @@ type EnvironmentContainerProperties struct { // READ-ONLY; The next auto incremental version NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the environment container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // EnvironmentContainerResourceArmPaginatedResult - A paginated list of EnvironmentContainer entities. @@ -3179,7 +3668,8 @@ type EnvironmentContainersClientGetOptions struct { // placeholder for future optional parameters } -// EnvironmentContainersClientListOptions contains the optional parameters for the EnvironmentContainersClient.List method. +// EnvironmentContainersClientListOptions contains the optional parameters for the EnvironmentContainersClient.NewListPager +// method. type EnvironmentContainersClientListOptions struct { // View type for including/excluding (for example) archived entities. ListViewType *ListViewType @@ -3187,6 +3677,17 @@ type EnvironmentContainersClientListOptions struct { Skip *string } +type EnvironmentVariable struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]any + + // 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. @@ -3242,6 +3743,9 @@ type EnvironmentVersionProperties struct { // READ-ONLY; Environment type is either user managed or curated by the Azure ML service EnvironmentType *EnvironmentType `json:"environmentType,omitempty" azure:"ro"` + + // READ-ONLY; Provisioning state for the environment version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } // EnvironmentVersionResourceArmPaginatedResult - A paginated list of EnvironmentVersion entities. @@ -3269,7 +3773,7 @@ type EnvironmentVersionsClientGetOptions struct { // placeholder for future optional parameters } -// EnvironmentVersionsClientListOptions contains the optional parameters for the EnvironmentVersionsClient.List method. +// EnvironmentVersionsClientListOptions contains the optional parameters for the EnvironmentVersionsClient.NewListPager method. type EnvironmentVersionsClientListOptions struct { // View type for including/excluding (for example) archived entities. ListViewType *ListViewType @@ -3284,7 +3788,7 @@ type EnvironmentVersionsClientListOptions struct { // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. - Info interface{} `json:"info,omitempty" azure:"ro"` + Info any `json:"info,omitempty" azure:"ro"` // READ-ONLY; The additional info type. Type *string `json:"type,omitempty" azure:"ro"` @@ -3339,6 +3843,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"` } @@ -3361,2018 +3894,3711 @@ 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"` -} +// Feature - Dto object representing feature +type Feature struct { + // Specifies type + DataType *FeatureDataType `json:"dataType,omitempty"` -type FlavorData struct { - // Model flavor-specific data. - Data map[string]*string `json:"data,omitempty"` + // Specifies description + Description *string `json:"description,omitempty"` + + // Specifies name + FeatureName *string `json:"featureName,omitempty"` + + // Specifies tags + Tags map[string]*string `json:"tags,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 +// FeatureArmPaginatedResult - A paginated list of Feature entities. +type FeatureArmPaginatedResult struct { + // The link to the next page of Feature objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type Feature. + Value []*Feature `json:"value,omitempty"` } -// 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"` +type FeatureStoreSettings struct { + ComputeRuntime *ComputeRuntimeDto `json:"computeRuntime,omitempty"` + OfflineStoreConnectionName *string `json:"offlineStoreConnectionName,omitempty"` + OnlineStoreConnectionName *string `json:"onlineStoreConnectionName,omitempty"` } -// GetForecastHorizon implements the ForecastHorizonClassification interface for type ForecastHorizon. -func (f *ForecastHorizon) GetForecastHorizon() *ForecastHorizon { return f } +// FeatureWindow - Specifies the feature window +type FeatureWindow struct { + // Specifies the feature window end time + FeatureWindowEnd *time.Time `json:"featureWindowEnd,omitempty"` -// Forecasting task in AutoML Table vertical. -type Forecasting struct { - // REQUIRED; [Required] Task type for AutoMLJob. - TaskType *TaskType `json:"taskType,omitempty"` + // Specifies the feature window start time + FeatureWindowStart *time.Time `json:"featureWindowStart,omitempty"` +} - // REQUIRED; [Required] Training data input. - TrainingData *MLTableJobInput `json:"trainingData,omitempty"` +// FeaturesetContainer - Azure Resource Manager resource envelope. +type FeaturesetContainer struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturesetContainerProperties `json:"properties,omitempty"` - // Columns to use for CVSplit data. - CvSplitColumnNames []*string `json:"cvSplitColumnNames,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"` - // Featurization inputs needed for AutoML job. - FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // Forecasting task specific inputs. - ForecastingSettings *ForecastingSettings `json:"forecastingSettings,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // Execution constraints for AutoMLJob. - LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} - // Log verbosity for the job. - LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` +// FeaturesetContainerProperties - Dto object representing feature set +type FeaturesetContainerProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` - // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. - NCrossValidations NCrossValidationsClassification `json:"nCrossValidations,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Primary metric for forecasting task. - PrimaryMetric *ForecastingPrimaryMetrics `json:"primaryMetric,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,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"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // Test data input. - TestData *MLTableJobInput `json:"testData,omitempty"` + // READ-ONLY; The latest version inside this container. + LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` - // 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"` + // READ-ONLY; The next auto incremental version + NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` - // Inputs for training phase for an AutoML Job. - TrainingSettings *ForecastingTrainingSettings `json:"trainingSettings,omitempty"` + // READ-ONLY; Provisioning state for the featureset container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} - // Validation data inputs. - ValidationData *MLTableJobInput `json:"validationData,omitempty"` +// FeaturesetContainerResourceArmPaginatedResult - A paginated list of FeaturesetContainer entities. +type FeaturesetContainerResourceArmPaginatedResult struct { + // The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,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"` + // An array of objects of type FeaturesetContainer. + Value []*FeaturesetContainer `json:"value,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"` +// FeaturesetContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetContainersClient.BeginCreateOrUpdate +// method. +type FeaturesetContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// 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, - } +// FeaturesetContainersClientBeginDeleteOptions contains the optional parameters for the FeaturesetContainersClient.BeginDelete +// method. +type FeaturesetContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// 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"` +// FeaturesetContainersClientGetEntityOptions contains the optional parameters for the FeaturesetContainersClient.GetEntity +// method. +type FeaturesetContainersClientGetEntityOptions struct { + // placeholder for future optional parameters +} - // 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"` +// FeaturesetContainersClientListOptions contains the optional parameters for the FeaturesetContainersClient.NewListPager +// method. +type FeaturesetContainersClientListOptions struct { + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string +} - // Flag for generating lags for the numeric features with 'auto' or null. - FeatureLags *FeatureLags `json:"featureLags,omitempty"` +// FeaturesetJob - Dto object representing the feature set job +type FeaturesetJob struct { + // Specifies the created date + CreatedDate *time.Time `json:"createdDate,omitempty"` - // The desired maximum forecast horizon in units of time-series frequency. - ForecastHorizon ForecastHorizonClassification `json:"forecastHorizon,omitempty"` + // Specifies the display name + DisplayName *string `json:"displayName,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"` + // Specifies the duration + Duration *string `json:"duration,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"` + // Specifies the experiment id + ExperimentID *string `json:"experimentId,omitempty"` - // The parameter defining how if AutoML should handle short time series. - ShortSeriesHandlingConfig *ShortSeriesHandlingConfiguration `json:"shortSeriesHandlingConfig,omitempty"` + // Specifies the backfill feature window to be materialized + FeatureWindow *FeatureWindow `json:"featureWindow,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"` + // Specifies the job id + JobID *string `json:"jobId,omitempty"` - // The number of past periods to lag from the target column. - TargetLags TargetLagsClassification `json:"targetLags,omitempty"` + // Specifies the job status + Status *JobStatus `json:"status,omitempty"` - // The number of past periods used to create a rolling window average of the target column. - TargetRollingWindowSize TargetRollingWindowSizeClassification `json:"targetRollingWindowSize,omitempty"` + // Specifies the tags if any + Tags map[string]*string `json:"tags,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"` + // Specifies the feature store job type + Type *FeaturestoreJobType `json:"type,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"` +// FeaturesetJobArmPaginatedResult - A paginated list of FeaturesetJob entities. +type FeaturesetJobArmPaginatedResult struct { + // The link to the next page of FeaturesetJob objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` - // Configure STL Decomposition of the time-series target column. - UseStl *UseStl `json:"useStl,omitempty"` + // An array of objects of type FeaturesetJob. + Value []*FeaturesetJob `json:"value,omitempty"` } -// ForecastingTrainingSettings - Forecasting Training related configuration. -type ForecastingTrainingSettings struct { - // Allowed models for forecasting task. - AllowedTrainingAlgorithms []*ForecastingModels `json:"allowedTrainingAlgorithms,omitempty"` +// FeaturesetSpecification - Dto object representing specification +type FeaturesetSpecification struct { + // Specifies the spec path + Path *string `json:"path,omitempty"` +} - // Blocked models for forecasting task. - BlockedTrainingAlgorithms []*ForecastingModels `json:"blockedTrainingAlgorithms,omitempty"` +// FeaturesetVersion - Azure Resource Manager resource envelope. +type FeaturesetVersion struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturesetVersionProperties `json:"properties,omitempty"` - // Enable recommendation of DNN models. - EnableDnnTraining *bool `json:"enableDnnTraining,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"` - // Flag to turn on explainability on best model. - EnableModelExplainability *bool `json:"enableModelExplainability,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // Flag for enabling onnx compatible models. - EnableOnnxCompatibleModels *bool `json:"enableOnnxCompatibleModels,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // Enable stack ensemble run. - EnableStackEnsemble *bool `json:"enableStackEnsemble,omitempty"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} - // Enable voting ensemble run. - EnableVoteEnsemble *bool `json:"enableVoteEnsemble,omitempty"` +// FeaturesetVersionBackfillRequest - Request payload for creating a backfill request for a given feature set version +type FeaturesetVersionBackfillRequest struct { + // Specifies description + Description *string `json:"description,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"` + // Specifies description + DisplayName *string `json:"displayName,omitempty"` - // Stack ensemble settings for stack ensemble run. - StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` -} + // Specifies the backfill feature window to be materialized + FeatureWindow *FeatureWindow `json:"featureWindow,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 - SamplingAlgorithmType *SamplingAlgorithmType `json:"samplingAlgorithmType,omitempty"` -} + // Specifies the compute resource settings + Resource *MaterializationComputeResource `json:"resource,omitempty"` -// GetSamplingAlgorithm implements the SamplingAlgorithmClassification interface for type GridSamplingAlgorithm. -func (g *GridSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { - return &SamplingAlgorithm{ - SamplingAlgorithmType: g.SamplingAlgorithmType, - } -} + // Specifies the spark compute settings + SparkConfiguration map[string]*string `json:"sparkConfiguration,omitempty"` -// HDInsight - A HDInsight compute. -type HDInsight struct { - // REQUIRED; The type of compute - ComputeType *ComputeType `json:"computeType,omitempty"` + // Specifies the tags + Tags map[string]*string `json:"tags,omitempty"` +} - // Location for the underlying compute - ComputeLocation *string `json:"computeLocation,omitempty"` +// FeaturesetVersionBackfillResponse - Response payload for creating a backfill request for a given feature set version +type FeaturesetVersionBackfillResponse struct { + // Job id created as part of request + JobID *string `json:"jobId,omitempty"` +} - // The description of the Machine Learning compute. +// FeaturesetVersionProperties - Dto object representing feature set version +type FeaturesetVersionProperties struct { + // The asset description text. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + // Specifies list of entities + Entities []*string `json:"entities,omitempty"` - // HDInsight compute properties - Properties *HDInsightProperties `json:"properties,omitempty"` + // If the name version are system generated (anonymous registration). + IsAnonymous *bool `json:"isAnonymous,omitempty"` - // ARM resource id of the underlying compute - ResourceID *string `json:"resourceId,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // READ-ONLY; The time at which the compute was created. - CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // Specifies the materialization settings + MaterializationSettings *MaterializationSettings `json:"materializationSettings,omitempty"` - // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - // service provisioned it if false. - IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // READ-ONLY; The time at which the compute was last modified. - ModifiedOn *time.Time `json:"modifiedOn,omitempty" azure:"ro"` + // Specifies the feature spec details + Specification *FeaturesetSpecification `json:"specification,omitempty"` - // READ-ONLY; Errors during provisioning - ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` + // Specifies the asset stage + Stage *string `json:"stage,omitempty"` - // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` -// GetCompute implements the ComputeClassification interface for type HDInsight. -func (h *HDInsight) GetCompute() *Compute { - return &Compute{ - ComputeType: h.ComputeType, - ComputeLocation: h.ComputeLocation, - ProvisioningState: h.ProvisioningState, - Description: h.Description, - CreatedOn: h.CreatedOn, - ModifiedOn: h.ModifiedOn, - ResourceID: h.ResourceID, - ProvisioningErrors: h.ProvisioningErrors, - IsAttachedCompute: h.IsAttachedCompute, - DisableLocalAuth: h.DisableLocalAuth, - } + // READ-ONLY; Provisioning state for the featureset version container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// HDInsightProperties - HDInsight compute properties -type HDInsightProperties struct { - // Public IP address of the master node of the cluster. - Address *string `json:"address,omitempty"` +// FeaturesetVersionResourceArmPaginatedResult - A paginated list of FeaturesetVersion entities. +type FeaturesetVersionResourceArmPaginatedResult struct { + // The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` - // Admin credentials for master node of the cluster - AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"` + // An array of objects of type FeaturesetVersion. + Value []*FeaturesetVersion `json:"value,omitempty"` +} - // Port open for ssh connections on the master node of the cluster. - SSHPort *int32 `json:"sshPort,omitempty"` +// FeaturesetVersionsClientBeginBackfillOptions contains the optional parameters for the FeaturesetVersionsClient.BeginBackfill +// method. +type FeaturesetVersionsClientBeginBackfillOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -type HDInsightSchema struct { - // HDInsight compute properties - Properties *HDInsightProperties `json:"properties,omitempty"` +// FeaturesetVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturesetVersionsClient.BeginCreateOrUpdate +// method. +type FeaturesetVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// IDAssetReference - Reference to an asset via its ARM resource ID. -type IDAssetReference struct { - // REQUIRED; [Required] ARM resource ID of the asset. - AssetID *string `json:"assetId,omitempty"` +// FeaturesetVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturesetVersionsClient.BeginDelete +// method. +type FeaturesetVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // REQUIRED; [Required] Specifies the type of asset reference. - ReferenceType *ReferenceType `json:"referenceType,omitempty"` +// FeaturesetVersionsClientGetFeatureOptions contains the optional parameters for the FeaturesetVersionsClient.GetFeature +// method. +type FeaturesetVersionsClientGetFeatureOptions struct { + // placeholder for future optional parameters } -// GetAssetReferenceBase implements the AssetReferenceBaseClassification interface for type IDAssetReference. -func (i *IDAssetReference) GetAssetReferenceBase() *AssetReferenceBase { - return &AssetReferenceBase{ - ReferenceType: i.ReferenceType, - } +// FeaturesetVersionsClientGetOptions contains the optional parameters for the FeaturesetVersionsClient.Get method. +type FeaturesetVersionsClientGetOptions struct { + // placeholder for future optional parameters } -// IdentityConfigurationClassification provides polymorphic access to related types. -// Call the interface's GetIdentityConfiguration() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AmlToken, *IdentityConfiguration, *ManagedIdentity, *UserIdentity -type IdentityConfigurationClassification interface { - // GetIdentityConfiguration returns the IdentityConfiguration content of the underlying type. - GetIdentityConfiguration() *IdentityConfiguration +// FeaturesetVersionsClientListFeaturesOptions contains the optional parameters for the FeaturesetVersionsClient.NewListFeaturesPager +// method. +type FeaturesetVersionsClientListFeaturesOptions struct { + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string } -// IdentityConfiguration - Base definition for identity configuration. -type IdentityConfiguration struct { - // REQUIRED; [Required] Specifies the type of identity framework. - IdentityType *IdentityConfigurationType `json:"identityType,omitempty"` +// FeaturesetVersionsClientListMaterializationJobsOptions contains the optional parameters for the FeaturesetVersionsClient.NewListMaterializationJobsPager +// method. +type FeaturesetVersionsClientListMaterializationJobsOptions struct { + // End time of the feature window to filter materialization jobs. + FeatureWindowEnd *string + // Start time of the feature window to filter materialization jobs. + FeatureWindowStart *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Filters *string + // Continuation token for pagination. + Skip *string } -// GetIdentityConfiguration implements the IdentityConfigurationClassification interface for type IdentityConfiguration. -func (i *IdentityConfiguration) GetIdentityConfiguration() *IdentityConfiguration { return i } +// FeaturesetVersionsClientListOptions contains the optional parameters for the FeaturesetVersionsClient.NewListPager method. +type FeaturesetVersionsClientListOptions struct { + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string +} -// IdentityForCmk - Identity that will be used to access key vault for encryption at rest -type IdentityForCmk struct { - // The ArmId of the user assigned identity that will be used to access the customer managed key vault - UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty"` +// FeaturestoreEntityContainer - Azure Resource Manager resource envelope. +type FeaturestoreEntityContainer struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturestoreEntityContainerProperties `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"` } -// 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"` +// FeaturestoreEntityContainerProperties - Dto object representing feature entity +type FeaturestoreEntityContainerProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` - // REQUIRED; [Required] Task type for AutoMLJob. - TaskType *TaskType `json:"taskType,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // REQUIRED; [Required] Training data input. - TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // Log verbosity for the job. - LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // Settings used for training the model. - ModelSettings *ImageModelSettingsClassification `json:"modelSettings,omitempty"` + // READ-ONLY; The latest version inside this container. + LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` - // Primary metric to optimize for this task. - PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty"` + // READ-ONLY; The next auto incremental version + NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` - // Search space for sampling different combinations of models and their hyperparameters. - SearchSpace []*ImageModelDistributionSettingsClassification `json:"searchSpace,omitempty"` + // READ-ONLY; Provisioning state for the featurestore entity container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} - // Model sweeping and hyperparameter sweeping related settings. - SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` +// FeaturestoreEntityContainerResourceArmPaginatedResult - A paginated list of FeaturestoreEntityContainer entities. +type FeaturestoreEntityContainerResourceArmPaginatedResult struct { + // The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,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"` + // An array of objects of type FeaturestoreEntityContainer. + Value []*FeaturestoreEntityContainer `json:"value,omitempty"` +} - // Validation data inputs. - ValidationData *MLTableJobInput `json:"validationData,omitempty"` +// FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginCreateOrUpdate +// method. +type FeaturestoreEntityContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // 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"` +// FeaturestoreEntityContainersClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityContainersClient.BeginDelete +// method. +type FeaturestoreEntityContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// 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, - } +// FeaturestoreEntityContainersClientGetEntityOptions contains the optional parameters for the FeaturestoreEntityContainersClient.GetEntity +// method. +type FeaturestoreEntityContainersClientGetEntityOptions struct { + // placeholder for future optional parameters } -type ImageClassificationBase struct { - // REQUIRED; [Required] Limit settings for the AutoML job. - LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` +// FeaturestoreEntityContainersClientListOptions contains the optional parameters for the FeaturestoreEntityContainersClient.NewListPager +// method. +type FeaturestoreEntityContainersClientListOptions struct { + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string +} - // Settings used for training the model. - ModelSettings *ImageModelSettingsClassification `json:"modelSettings,omitempty"` +// FeaturestoreEntityVersion - Azure Resource Manager resource envelope. +type FeaturestoreEntityVersion struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *FeaturestoreEntityVersionProperties `json:"properties,omitempty"` - // Search space for sampling different combinations of models and their hyperparameters. - SearchSpace []*ImageModelDistributionSettingsClassification `json:"searchSpace,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"` - // Model sweeping and hyperparameter sweeping related settings. - SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // Validation data inputs. - ValidationData *MLTableJobInput `json:"validationData,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // 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"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` } -// 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"` +// FeaturestoreEntityVersionProperties - Dto object representing feature entity version +type FeaturestoreEntityVersionProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` - // REQUIRED; [Required] Task type for AutoMLJob. - TaskType *TaskType `json:"taskType,omitempty"` + // Specifies index columns + IndexColumns []*IndexColumn `json:"indexColumns,omitempty"` - // REQUIRED; [Required] Training data input. - TrainingData *MLTableJobInput `json:"trainingData,omitempty"` + // If the name version are system generated (anonymous registration). + IsAnonymous *bool `json:"isAnonymous,omitempty"` - // Log verbosity for the job. - LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Settings used for training the model. - ModelSettings *ImageModelSettingsClassification `json:"modelSettings,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // Primary metric to optimize for this task. - PrimaryMetric *ClassificationMultilabelPrimaryMetrics `json:"primaryMetric,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // Search space for sampling different combinations of models and their hyperparameters. - SearchSpace []*ImageModelDistributionSettingsClassification `json:"searchSpace,omitempty"` + // READ-ONLY; Provisioning state for the featurestore entity version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} - // Model sweeping and hyperparameter sweeping related settings. - SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` +// FeaturestoreEntityVersionResourceArmPaginatedResult - A paginated list of FeaturestoreEntityVersion entities. +type FeaturestoreEntityVersionResourceArmPaginatedResult struct { + // The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,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"` + // An array of objects of type FeaturestoreEntityVersion. + Value []*FeaturestoreEntityVersion `json:"value,omitempty"` +} - // Validation data inputs. - ValidationData *MLTableJobInput `json:"validationData,omitempty"` +// FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginCreateOrUpdate +// method. +type FeaturestoreEntityVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // 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"` +// FeaturestoreEntityVersionsClientBeginDeleteOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.BeginDelete +// method. +type FeaturestoreEntityVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// 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, - } +// FeaturestoreEntityVersionsClientGetOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.Get +// method. +type FeaturestoreEntityVersionsClientGetOptions struct { + // placeholder for future optional parameters } -// 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"` +// FeaturestoreEntityVersionsClientListOptions contains the optional parameters for the FeaturestoreEntityVersionsClient.NewListPager +// method. +type FeaturestoreEntityVersionsClientListOptions struct { + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string +} + +// 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"` - // Log verbosity for the job. - LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + // Columns to use for CVSplit data. + CvSplitColumnNames []*string `json:"cvSplitColumnNames,omitempty"` - // Settings used for training the model. - ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,omitempty"` + // Featurization inputs needed for AutoML job. + FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` - // Primary metric to optimize for this task. - PrimaryMetric *InstanceSegmentationPrimaryMetrics `json:"primaryMetric,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` - // Search space for sampling different combinations of models and their hyperparameters. - SearchSpace []*ImageModelDistributionSettingsObjectDetection `json:"searchSpace,omitempty"` + // Forecasting task specific inputs. + ForecastingSettings *ForecastingSettings `json:"forecastingSettings,omitempty"` - // Model sweeping and hyperparameter sweeping related settings. - SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + // Execution constraints for AutoMLJob. + LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` - // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + // Log verbosity for the job. + LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + + // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. + NCrossValidations NCrossValidationsClassification `json:"nCrossValidations,omitempty"` + + // Primary metric for forecasting task. + PrimaryMetric *ForecastingPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. TargetColumnName *string `json:"targetColumnName,omitempty"` + // Test data input. + TestData *MLTableJobInput `json:"testData,omitempty"` + + // The fraction of test dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when + // validation dataset is not provided. + TestDataSize *float64 `json:"testDataSize,omitempty"` + + // Inputs for training phase for an AutoML Job. + TrainingSettings *ForecastingTrainingSettings `json:"trainingSettings,omitempty"` + // Validation data inputs. ValidationData *MLTableJobInput `json:"validationData,omitempty"` // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied // when validation dataset is not provided. ValidationDataSize *float64 `json:"validationDataSize,omitempty"` + + // The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to + // be weighted up or down. + WeightColumnName *string `json:"weightColumnName,omitempty"` } -// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type ImageInstanceSegmentation. -func (i *ImageInstanceSegmentation) GetAutoMLVertical() *AutoMLVertical { +// GetAutoMLVertical implements the AutoMLVerticalClassification interface for type Forecasting. +func (f *Forecasting) GetAutoMLVertical() *AutoMLVertical { return &AutoMLVertical{ - LogVerbosity: i.LogVerbosity, - TargetColumnName: i.TargetColumnName, - TaskType: i.TaskType, - TrainingData: i.TrainingData, + LogVerbosity: f.LogVerbosity, + TargetColumnName: f.TargetColumnName, + TaskType: f.TaskType, + TrainingData: f.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"` +// 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"` - // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta2 *string `json:"beta2,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"` - // Whether to use distributer training. - Distributed *string `json:"distributed,omitempty"` + // Flag for generating lags for the numeric features with 'auto' or null. + FeatureLags *FeatureLags `json:"featureLags,omitempty"` - // Enable early stopping logic during training. - EarlyStopping *string `json:"earlyStopping,omitempty"` + // The desired maximum forecast horizon in units of time-series frequency. + ForecastHorizon ForecastHorizonClassification `json:"forecastHorizon,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"` + // 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"` - // 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"` + // 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"` - // Enable normalization when exporting ONNX model. - EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` + // The parameter defining how if AutoML should handle short time series. + ShortSeriesHandlingConfig *ShortSeriesHandlingConfiguration `json:"shortSeriesHandlingConfig,omitempty"` - // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - EvaluationFrequency *string `json:"evaluationFrequency,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"` - // 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"` + // The number of past periods to lag from the target column. + TargetLags TargetLagsClassification `json:"targetLags,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"` + // The number of past periods used to create a rolling window average of the target column. + TargetRollingWindowSize TargetRollingWindowSizeClassification `json:"targetRollingWindowSize,omitempty"` - // Initial learning rate. Must be a float in the range [0, 1]. - LearningRate *string `json:"learningRate,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"` - // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - LearningRateScheduler *string `json:"learningRateScheduler,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"` - // 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"` + // Configure STL Decomposition of the time-series target column. + UseStl *UseStl `json:"useStl,omitempty"` +} - // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - Momentum *string `json:"momentum,omitempty"` +// ForecastingTrainingSettings - Forecasting Training related configuration. +type ForecastingTrainingSettings struct { + // Allowed models for forecasting task. + AllowedTrainingAlgorithms []*ForecastingModels `json:"allowedTrainingAlgorithms,omitempty"` - // Enable nesterov when optimizer is 'sgd'. - Nesterov *string `json:"nesterov,omitempty"` + // Blocked models for forecasting task. + BlockedTrainingAlgorithms []*ForecastingModels `json:"blockedTrainingAlgorithms,omitempty"` - // Number of training epochs. Must be a positive integer. - NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` + // Enable recommendation of DNN models. + EnableDnnTraining *bool `json:"enableDnnTraining,omitempty"` - // Number of data loader workers. Must be a non-negative integer. - NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` + // Flag to turn on explainability on best model. + EnableModelExplainability *bool `json:"enableModelExplainability,omitempty"` - // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - Optimizer *string `json:"optimizer,omitempty"` + // Flag for enabling onnx compatible models. + EnableOnnxCompatibleModels *bool `json:"enableOnnxCompatibleModels,omitempty"` - // Random seed to be used when using deterministic training. - RandomSeed *string `json:"randomSeed,omitempty"` + // Enable stack ensemble run. + EnableStackEnsemble *bool `json:"enableStackEnsemble,omitempty"` - // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - StepLRGamma *string `json:"stepLRGamma,omitempty"` + // Enable voting ensemble run. + EnableVoteEnsemble *bool `json:"enableVoteEnsemble,omitempty"` - // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - StepLRStepSize *string `json:"stepLRStepSize,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"` - // Training batch size. Must be a positive integer. - TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` + // Stack ensemble settings for stack ensemble run. + StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` - // Validation batch size. Must be a positive integer. - ValidationBatchSize *string `json:"validationBatchSize,omitempty"` + // TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result + // in mixed mode or heuristics based mode selection. Default is 'auto'. If + // 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. If 'NonDistributed' then + // only non distributed algorithms are chosen. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` +} - // 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"` +// GetFeatureRequest - Request payload to retrieve feature information from a given feature set version +type GetFeatureRequest struct { + // Specifies name of the feature. + FeatureName *string `json:"featureName,omitempty"` +} - // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - WarmupCosineLRWarmupEpochs *string `json:"warmupCosineLRWarmupEpochs,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 + SamplingAlgorithmType *SamplingAlgorithmType `json:"samplingAlgorithmType,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"` +// GetSamplingAlgorithm implements the SamplingAlgorithmClassification interface for type GridSamplingAlgorithm. +func (g *GridSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { + return &SamplingAlgorithm{ + SamplingAlgorithmType: g.SamplingAlgorithmType, + } } -// 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"` +// HDInsight - A HDInsight compute. +type HDInsight struct { + // REQUIRED; The type of compute + ComputeType *ComputeType `json:"computeType,omitempty"` - // Settings for using Augmentations. - Augmentations *string `json:"augmentations,omitempty"` + // Location for the underlying compute + ComputeLocation *string `json:"computeLocation,omitempty"` - // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta1 *string `json:"beta1,omitempty"` + // The description of the Machine Learning compute. + Description *string `json:"description,omitempty"` - // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta2 *string `json:"beta2,omitempty"` + // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // Whether to use distributer training. - Distributed *string `json:"distributed,omitempty"` + // HDInsight compute properties + Properties *HDInsightProperties `json:"properties,omitempty"` - // Enable early stopping logic during training. - EarlyStopping *string `json:"earlyStopping,omitempty"` + // ARM resource id of the underlying compute + ResourceID *string `json:"resourceId,omitempty"` - // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. - // Must be a positive integer. - EarlyStoppingDelay *string `json:"earlyStoppingDelay,omitempty"` + // READ-ONLY; The time at which the compute was created. + CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` - // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be - // a positive integer. - EarlyStoppingPatience *string `json:"earlyStoppingPatience,omitempty"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning + // service provisioned it if false. + IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` - // Enable normalization when exporting ONNX model. - EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` + // READ-ONLY; The time at which the compute was last modified. + ModifiedOn *time.Time `json:"modifiedOn,omitempty" azure:"ro"` - // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + // READ-ONLY; Errors during provisioning + ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` - // 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"` + // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} - // 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 +// GetCompute implements the ComputeClassification interface for type HDInsight. +func (h *HDInsight) GetCompute() *Compute { + return &Compute{ + ComputeType: h.ComputeType, + ComputeLocation: h.ComputeLocation, + ProvisioningState: h.ProvisioningState, + Description: h.Description, + CreatedOn: h.CreatedOn, + ModifiedOn: h.ModifiedOn, + ResourceID: h.ResourceID, + ProvisioningErrors: h.ProvisioningErrors, + IsAttachedCompute: h.IsAttachedCompute, + DisableLocalAuth: h.DisableLocalAuth, + } +} + +// HDInsightProperties - HDInsight compute properties +type HDInsightProperties struct { + // Public IP address of the master node of the cluster. + Address *string `json:"address,omitempty"` + + // Admin credentials for master node of the cluster + AdministratorAccount *VirtualMachineSSHCredentials `json:"administratorAccount,omitempty"` + + // Port open for ssh connections on the master node of the cluster. + SSHPort *int32 `json:"sshPort,omitempty"` +} + +type HDInsightSchema struct { + // HDInsight compute properties + 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. + AssetID *string `json:"assetId,omitempty"` + + // REQUIRED; [Required] Specifies the type of asset reference. + ReferenceType *ReferenceType `json:"referenceType,omitempty"` +} + +// GetAssetReferenceBase implements the AssetReferenceBaseClassification interface for type IDAssetReference. +func (i *IDAssetReference) GetAssetReferenceBase() *AssetReferenceBase { + return &AssetReferenceBase{ + ReferenceType: i.ReferenceType, + } +} + +// IdentityConfigurationClassification provides polymorphic access to related types. +// Call the interface's GetIdentityConfiguration() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AmlToken, *IdentityConfiguration, *ManagedIdentity, *UserIdentity +type IdentityConfigurationClassification interface { + // GetIdentityConfiguration returns the IdentityConfiguration content of the underlying type. + GetIdentityConfiguration() *IdentityConfiguration +} + +// IdentityConfiguration - Base definition for identity configuration. +type IdentityConfiguration struct { + // REQUIRED; [Required] Specifies the type of identity framework. + IdentityType *IdentityConfigurationType `json:"identityType,omitempty"` +} + +// GetIdentityConfiguration implements the IdentityConfigurationClassification interface for type IdentityConfiguration. +func (i *IdentityConfiguration) GetIdentityConfiguration() *IdentityConfiguration { return i } + +// IdentityForCmk - Identity that will be used to access key vault for encryption at rest +type IdentityForCmk struct { + // The ArmId of the user assigned identity that will be used to access the customer managed key vault + UserAssignedIdentity *string `json:"userAssignedIdentity,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"` +} + +type Image struct { + // OPTIONAL; Contains additional key/value pairs not defined in the schema. + AdditionalProperties map[string]any + + // 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"` +} + +// 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"` + + // 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 *ImageModelSettingsClassification `json:"modelSettings,omitempty"` + + // Primary metric to optimize for this task. + PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsClassification `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 ImageClassification. +func (i *ImageClassification) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: i.LogVerbosity, + TargetColumnName: i.TargetColumnName, + TaskType: i.TaskType, + TrainingData: i.TrainingData, + } +} + +type ImageClassificationBase struct { + // REQUIRED; [Required] Limit settings for the AutoML job. + LimitSettings *ImageLimitSettings `json:"limitSettings,omitempty"` + + // Settings used for training the model. + ModelSettings *ImageModelSettingsClassification `json:"modelSettings,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsClassification `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"` +} + +// 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"` + + // 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 *ImageModelSettingsClassification `json:"modelSettings,omitempty"` + + // Primary metric to optimize for this task. + PrimaryMetric *ClassificationMultilabelPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsClassification `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 ImageClassificationMultilabel. +func (i *ImageClassificationMultilabel) GetAutoMLVertical() *AutoMLVertical { + return &AutoMLVertical{ + LogVerbosity: i.LogVerbosity, + TargetColumnName: i.TargetColumnName, + TaskType: i.TaskType, + TrainingData: i.TrainingData, + } +} + +// 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"` + + // 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 *InstanceSegmentationPrimaryMetrics `json:"primaryMetric,omitempty"` + + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*ImageModelDistributionSettingsObjectDetection `json:"searchSpace,omitempty"` + + // Model sweeping and hyperparameter sweeping related settings. + SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. + TargetColumnName *string `json:"targetColumnName,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` + + // The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied + // when validation dataset is not provided. + ValidationDataSize *float64 `json:"validationDataSize,omitempty"` +} + +// 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"` +} + +// ImageMetadata - Returns metadata about the operating system image for this compute instance. +type ImageMetadata struct { + // Specifies the current operating system image version this compute instance is running on. + CurrentImageVersion *string `json:"currentImageVersion,omitempty"` + + // Specifies whether this compute instance is running on the latest operating system image. + IsLatestOsImageVersion *bool `json:"isLatestOsImageVersion,omitempty"` + + // Specifies the latest available operating system image version. + LatestImageVersion *string `json:"latestImageVersion,omitempty"` +} + +// 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 *string `json:"layersToFreeze,omitempty"` + 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"` +} + +// ImageSweepSettings - Model sweeping and hyperparameter sweeping related settings. +type ImageSweepSettings struct { + // 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"` +} + +// IndexColumn - Dto object representing index column +type IndexColumn struct { + // Specifies the column name + ColumnName *string `json:"columnName,omitempty"` + + // Specifies the data type + DataType *FeatureDataType `json:"dataType,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"` +} + +// InferencingServerClassification provides polymorphic access to related types. +// Call the interface's GetInferencingServer() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AzureMLBatchInferencingServer, *AzureMLOnlineInferencingServer, *CustomInferencingServer, *InferencingServer, *TritonInferencingServer +type InferencingServerClassification interface { + // GetInferencingServer returns the InferencingServer content of the underlying type. + GetInferencingServer() *InferencingServer +} + +type InferencingServer struct { + // REQUIRED; [Required] Inferencing server type for various targets. + ServerType *InferencingServerType `json:"serverType,omitempty"` +} + +// GetInferencingServer implements the InferencingServerClassification interface for type InferencingServer. +func (i *InferencingServer) GetInferencingServer() *InferencingServer { return i } + +// 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"` - // Initial learning rate. Must be a float in the range [0, 1]. - LearningRate *string `json:"learningRate,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"` - // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - LearningRateScheduler *string `json:"learningRateScheduler,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // Name of the model to use for training. For more information on the available models please visit the official documentation: - // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - ModelName *string `json:"modelName,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - Momentum *string `json:"momentum,omitempty"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} - // Enable nesterov when optimizer is 'sgd'. - Nesterov *string `json:"nesterov,omitempty"` +// JobBasePropertiesClassification provides polymorphic access to related types. +// Call the interface's GetJobBaseProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AutoMLJob, *CommandJob, *JobBaseProperties, *LabelingJobProperties, *PipelineJob, *SparkJob, *SweepJob +type JobBasePropertiesClassification interface { + // GetJobBaseProperties returns the JobBaseProperties content of the underlying type. + GetJobBaseProperties() *JobBaseProperties +} - // Number of training epochs. Must be a positive integer. - NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` +// JobBaseProperties - Base definition for a job. +type JobBaseProperties struct { + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` - // Number of data loader workers. Must be a non-negative integer. - NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` - // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - Optimizer *string `json:"optimizer,omitempty"` + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,omitempty"` - // Random seed to be used when using deterministic training. - RandomSeed *string `json:"randomSeed,omitempty"` + // The asset description text. + Description *string `json:"description,omitempty"` - // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - StepLRGamma *string `json:"stepLRGamma,omitempty"` + // Display name of job. + DisplayName *string `json:"displayName,omitempty"` - // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - StepLRStepSize *string `json:"stepLRStepSize,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"` - // Training batch size. Must be a positive integer. - TrainingBatchSize *string `json:"trainingBatchSize,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"` - // Image crop size that is input to the neural network for the training dataset. Must be a positive integer. - TrainingCropSize *string `json:"trainingCropSize,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Validation batch size. Must be a positive integer. - ValidationBatchSize *string `json:"validationBatchSize,omitempty"` + // Notification setting for the job + NotificationSetting *NotificationSetting `json:"notificationSetting,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"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // Image size to which to resize before cropping for validation dataset. Must be a positive integer. - ValidationResizeSize *string `json:"validationResizeSize,omitempty"` + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,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"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - WarmupCosineLRWarmupEpochs *string `json:"warmupCosineLRWarmupEpochs,omitempty"` + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` +} - // Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. - WeightDecay *string `json:"weightDecay,omitempty"` +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type JobBaseProperties. +func (j *JobBaseProperties) GetJobBaseProperties() *JobBaseProperties { return j } - // 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"` +// 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"` } -// 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"` +// 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"` + + // Locations where the job can run. + Locations []*string `json:"locations,omitempty"` + + // Additional properties bag. + Properties map[string]any `json:"properties,omitempty"` + + // Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be + // greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), + // or g(gigabytes). + ShmSize *string `json:"shmSize,omitempty"` +} + +type JobScheduleAction struct { + // REQUIRED; [Required] Specifies the action type of the schedule + ActionType *ScheduleActionType `json:"actionType,omitempty"` + + // REQUIRED; [Required] Defines Schedule action definition details. + JobDefinition JobBasePropertiesClassification `json:"jobDefinition,omitempty"` +} + +// GetScheduleActionBase implements the ScheduleActionBaseClassification interface for type JobScheduleAction. +func (j *JobScheduleAction) GetScheduleActionBase() *ScheduleActionBase { + return &ScheduleActionBase{ + ActionType: j.ActionType, + } +} + +// JobService - Job endpoint definition +type JobService struct { + // Url for endpoint. + Endpoint *string `json:"endpoint,omitempty"` + + // Endpoint type. + JobServiceType *string `json:"jobServiceType,omitempty"` + + // Nodes that user would like to start the service on. If Nodes is not set or set to null, the service will only be started + // on leader node. + Nodes NodesClassification `json:"nodes,omitempty"` + + // Port for endpoint set by user. + Port *int32 `json:"port,omitempty"` + + // Additional properties to set on the endpoint. + Properties map[string]*string `json:"properties,omitempty"` + + // READ-ONLY; Any error in the service. + ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` + + // READ-ONLY; Status of endpoint. + Status *string `json:"status,omitempty" azure:"ro"` +} + +// JobsClientBeginCancelOptions contains the optional parameters for the JobsClient.BeginCancel method. +type JobsClientBeginCancelOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. +type JobsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. +type JobsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. +type JobsClientGetOptions struct { + // placeholder for future optional parameters +} + +// JobsClientListOptions contains the optional parameters for the JobsClient.NewListPager method. +type JobsClientListOptions struct { + // Asset name the job's named output is registered with + AssetName *string + // Type of job to be returned. + JobType *string + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // The scheduled id for listing the job triggered from + ScheduleID *string + // Indicator whether the job is scheduled job. + Scheduled *bool + // Continuation token for pagination. + Skip *string + // Jobs returned will have this tag key. + Tag *string +} - // Settings for using Augmentations. - Augmentations *string `json:"augmentations,omitempty"` +type KerberosCredentials struct { + // REQUIRED; [Required] IP Address or DNS HostName. + KerberosKdcAddress *string `json:"kerberosKdcAddress,omitempty"` - // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta1 *string `json:"beta1,omitempty"` + // REQUIRED; [Required] Kerberos Username + KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta2 *string `json:"beta2,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"` +} - // 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"` +type KerberosKeytabCredentials struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialsType *CredentialsType `json:"credentialsType,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"` + // REQUIRED; [Required] IP Address or DNS HostName. + KerberosKdcAddress *string `json:"kerberosKdcAddress,omitempty"` - // Whether to use distributer training. - Distributed *string `json:"distributed,omitempty"` + // REQUIRED; [Required] Kerberos Username + KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - // Enable early stopping logic during training. - EarlyStopping *string `json:"earlyStopping,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"` - // 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"` + // REQUIRED; [Required] Keytab secrets. + Secrets *KerberosKeytabSecrets `json:"secrets,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"` +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type KerberosKeytabCredentials. +func (k *KerberosKeytabCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: k.CredentialsType, + } +} - // Enable normalization when exporting ONNX model. - EnableOnnxNormalization *string `json:"enableOnnxNormalization,omitempty"` +type KerberosKeytabSecrets struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + SecretsType *SecretsType `json:"secretsType,omitempty"` - // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - EvaluationFrequency *string `json:"evaluationFrequency,omitempty"` + // Kerberos keytab secret. + KerberosKeytab *string `json:"kerberosKeytab,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"` +// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type KerberosKeytabSecrets. +func (k *KerberosKeytabSecrets) GetDatastoreSecrets() *DatastoreSecrets { + return &DatastoreSecrets{ + SecretsType: k.SecretsType, + } +} - // 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"` +type KerberosPasswordCredentials struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialsType *CredentialsType `json:"credentialsType,omitempty"` - // Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' - // means freezing layer0 and layer1. For a full list of models supported and details - // on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - LayersToFreeze *string `json:"layersToFreeze,omitempty"` + // REQUIRED; [Required] IP Address or DNS HostName. + KerberosKdcAddress *string `json:"kerberosKdcAddress,omitempty"` - // Initial learning rate. Must be a float in the range [0, 1]. - LearningRate *string `json:"learningRate,omitempty"` + // REQUIRED; [Required] Kerberos Username + KerberosPrincipal *string `json:"kerberosPrincipal,omitempty"` - // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - LearningRateScheduler *string `json:"learningRateScheduler,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"` - // 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"` + // REQUIRED; [Required] Kerberos password secrets. + Secrets *KerberosPasswordSecrets `json:"secrets,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"` +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type KerberosPasswordCredentials. +func (k *KerberosPasswordCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: k.CredentialsType, + } +} - // 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"` +type KerberosPasswordSecrets struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + SecretsType *SecretsType `json:"secretsType,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"` + // Kerberos password secret. + KerberosPassword *string `json:"kerberosPassword,omitempty"` +} - // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - Momentum *string `json:"momentum,omitempty"` +// GetDatastoreSecrets implements the DatastoreSecretsClassification interface for type KerberosPasswordSecrets. +func (k *KerberosPasswordSecrets) GetDatastoreSecrets() *DatastoreSecrets { + return &DatastoreSecrets{ + SecretsType: k.SecretsType, + } +} - // 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"` +// Kubernetes - A Machine Learning compute based on Kubernetes Compute. +type Kubernetes struct { + // REQUIRED; The type of compute + ComputeType *ComputeType `json:"computeType,omitempty"` - // Enable nesterov when optimizer is 'sgd'. - Nesterov *string `json:"nesterov,omitempty"` + // Location for the underlying compute + ComputeLocation *string `json:"computeLocation,omitempty"` - // IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. - NmsIouThreshold *string `json:"nmsIouThreshold,omitempty"` + // The description of the Machine Learning compute. + Description *string `json:"description,omitempty"` - // Number of training epochs. Must be a positive integer. - NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` + // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` - // Number of data loader workers. Must be a non-negative integer. - NumberOfWorkers *string `json:"numberOfWorkers,omitempty"` + // Properties of Kubernetes + Properties *KubernetesProperties `json:"properties,omitempty"` - // Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - Optimizer *string `json:"optimizer,omitempty"` + // ARM resource id of the underlying compute + ResourceID *string `json:"resourceId,omitempty"` - // Random seed to be used when using deterministic training. - RandomSeed *string `json:"randomSeed,omitempty"` + // READ-ONLY; The time at which the compute was created. + CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` - // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - StepLRGamma *string `json:"stepLRGamma,omitempty"` + // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning + // service provisioned it if false. + IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` - // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - StepLRStepSize *string `json:"stepLRStepSize,omitempty"` + // READ-ONLY; The time at which the compute was last modified. + ModifiedOn *time.Time `json:"modifiedOn,omitempty" azure:"ro"` - // 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"` + // READ-ONLY; Errors during provisioning + ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` - // 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"` + // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} - // 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"` +// GetCompute implements the ComputeClassification interface for type Kubernetes. +func (k *Kubernetes) GetCompute() *Compute { + return &Compute{ + ComputeType: k.ComputeType, + ComputeLocation: k.ComputeLocation, + ProvisioningState: k.ProvisioningState, + Description: k.Description, + CreatedOn: k.CreatedOn, + ModifiedOn: k.ModifiedOn, + ResourceID: k.ResourceID, + ProvisioningErrors: k.ProvisioningErrors, + IsAttachedCompute: k.IsAttachedCompute, + DisableLocalAuth: k.DisableLocalAuth, + } +} - // Training batch size. Must be a positive integer. - TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` +// KubernetesOnlineDeployment - Properties specific to a KubernetesOnlineDeployment. +type KubernetesOnlineDeployment struct { + // REQUIRED; [Required] The compute type of the endpoint. + EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` - // Validation batch size. Must be a positive integer. - ValidationBatchSize *string `json:"validationBatchSize,omitempty"` + // If true, enables Application Insights logging. + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` - // IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. - ValidationIouThreshold *string `json:"validationIouThreshold,omitempty"` + // Code configuration for the endpoint deployment. + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` - // Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. - ValidationMetricType *string `json:"validationMetricType,omitempty"` + // The resource requirements for the container (cpu and memory). + ContainerResourceRequirements *ContainerResourceRequirements `json:"containerResourceRequirements,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"` + // Description of the endpoint deployment. + Description *string `json:"description,omitempty"` - // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - WarmupCosineLRWarmupEpochs *string `json:"warmupCosineLRWarmupEpochs,omitempty"` + // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,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"` -} + // ARM resource ID of the environment specification for the endpoint deployment. + EnvironmentID *string `json:"environmentId,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"` + // Environment variables configuration for the deployment. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` - // Enable AMSGrad when optimizer is 'adam' or 'adamw'. - AmsGradient *bool `json:"amsGradient,omitempty"` + // Compute instance type. + InstanceType *string `json:"instanceType,omitempty"` - // Settings for using Augmentations. - Augmentations *string `json:"augmentations,omitempty"` + // Liveness probe monitors the health of the container regularly. + LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` - // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta1 *float32 `json:"beta1,omitempty"` + // The URI path to the model. + Model *string `json:"model,omitempty"` - // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta2 *float32 `json:"beta2,omitempty"` + // The path to mount the model in custom container. + ModelMountPath *string `json:"modelMountPath,omitempty"` - // Frequency to store model checkpoints. Must be a positive integer. - CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string `json:"properties,omitempty"` - // The pretrained checkpoint model for incremental training. - CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,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"` - // The id of a previous run that has a pretrained checkpoint for incremental training. - CheckpointRunID *string `json:"checkpointRunId,omitempty"` + // Request settings for the deployment. + RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` - // Whether to use distributed training. - Distributed *bool `json:"distributed,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"` - // Enable early stopping logic during training. - EarlyStopping *bool `json:"earlyStopping,omitempty"` + // READ-ONLY; Provisioning state for the endpoint deployment. + ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +} - // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. - // Must be a positive integer. - EarlyStoppingDelay *int32 `json:"earlyStoppingDelay,omitempty"` +// 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, + } +} - // 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"` +// KubernetesProperties - Kubernetes properties +type KubernetesProperties struct { + // Default instance type + DefaultInstanceType *string `json:"defaultInstanceType,omitempty"` - // Enable normalization when exporting ONNX model. - EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` + // Extension instance release train. + ExtensionInstanceReleaseTrain *string `json:"extensionInstanceReleaseTrain,omitempty"` - // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - EvaluationFrequency *int32 `json:"evaluationFrequency,omitempty"` + // Extension principal-id. + ExtensionPrincipalID *string `json:"extensionPrincipalId,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"` + // Instance Type Schema + InstanceTypes map[string]*InstanceTypeSchema `json:"instanceTypes,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"` + // Compute namespace + Namespace *string `json:"namespace,omitempty"` - // Initial learning rate. Must be a float in the range [0, 1]. - LearningRate *float32 `json:"learningRate,omitempty"` + // Relay connection string. + RelayConnectionString *string `json:"relayConnectionString,omitempty"` - // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,omitempty"` + // ServiceBus connection string. + ServiceBusConnectionString *string `json:"serviceBusConnectionString,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"` + // VC name. + VcName *string `json:"vcName,omitempty"` +} - // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - Momentum *float32 `json:"momentum,omitempty"` +// KubernetesSchema - Kubernetes Compute Schema +type KubernetesSchema struct { + // Properties of Kubernetes + Properties *KubernetesProperties `json:"properties,omitempty"` +} - // Enable nesterov when optimizer is 'sgd'. - Nesterov *bool `json:"nesterov,omitempty"` +// LabelCategory - Label category definition +type LabelCategory struct { + // Dictionary of label classes in this category. + Classes map[string]*LabelClass `json:"classes,omitempty"` - // Number of training epochs. Must be a positive integer. - NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` + // Display name of the label category. + DisplayName *string `json:"displayName,omitempty"` - // Number of data loader workers. Must be a non-negative integer. - NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + // Indicates whether it is allowed to select multiple classes in this category. + MultiSelect *MultiSelect `json:"multiSelect,omitempty"` +} - // Type of optimizer. - Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` +// LabelClass - Label class definition +type LabelClass struct { + // Display name of the label class. + DisplayName *string `json:"displayName,omitempty"` - // Random seed to be used when using deterministic training. - RandomSeed *int32 `json:"randomSeed,omitempty"` + // Dictionary of subclasses of the label class. + Subclasses map[string]*LabelClass `json:"subclasses,omitempty"` +} - // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - StepLRGamma *float32 `json:"stepLRGamma,omitempty"` +// LabelingDataConfiguration - Labeling data configuration definition +type LabelingDataConfiguration struct { + // Resource Id of the data asset to perform labeling. + DataID *string `json:"dataId,omitempty"` - // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` + // Indicates whether to enable incremental data refresh. + IncrementalDataRefresh *IncrementalDataRefresh `json:"incrementalDataRefresh,omitempty"` +} - // Training batch size. Must be a positive integer. - TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` +// LabelingJob - Azure Resource Manager resource envelope. +type LabelingJob struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *LabelingJobProperties `json:"properties,omitempty"` - // Validation batch size. Must be a positive integer. - ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` - // Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - WarmupCosineLRCycles *float32 `json:"warmupCosineLRCycles,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - WarmupCosineLRWarmupEpochs *int32 `json:"warmupCosineLRWarmupEpochs,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // 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"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` } -// 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"` +// LabelingJobImageProperties - Properties of a labeling job for image data +type LabelingJobImageProperties struct { + // REQUIRED; [Required] Media type of the job. + MediaType *MediaType `json:"mediaType,omitempty"` - // Settings for using Augmentations. - Augmentations *string `json:"augmentations,omitempty"` + // Annotation type of image labeling job. + AnnotationType *ImageAnnotationType `json:"annotationType,omitempty"` +} - // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta1 *float32 `json:"beta1,omitempty"` +// GetLabelingJobMediaProperties implements the LabelingJobMediaPropertiesClassification interface for type LabelingJobImageProperties. +func (l *LabelingJobImageProperties) GetLabelingJobMediaProperties() *LabelingJobMediaProperties { + return &LabelingJobMediaProperties{ + MediaType: l.MediaType, + } +} - // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta2 *float32 `json:"beta2,omitempty"` +// LabelingJobInstructions - Instructions for labeling job +type LabelingJobInstructions struct { + // The link to a page with detailed labeling instructions for labelers. + URI *string `json:"uri,omitempty"` +} - // Frequency to store model checkpoints. Must be a positive integer. - CheckpointFrequency *int32 `json:"checkpointFrequency,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 +} - // The pretrained checkpoint model for incremental training. - CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` +// LabelingJobMediaProperties - Properties of a labeling job +type LabelingJobMediaProperties struct { + // REQUIRED; [Required] Media type of the job. + MediaType *MediaType `json:"mediaType,omitempty"` +} - // The id of a previous run that has a pretrained checkpoint for incremental training. - CheckpointRunID *string `json:"checkpointRunId,omitempty"` +// GetLabelingJobMediaProperties implements the LabelingJobMediaPropertiesClassification interface for type LabelingJobMediaProperties. +func (l *LabelingJobMediaProperties) GetLabelingJobMediaProperties() *LabelingJobMediaProperties { + return l +} - // Whether to use distributed training. - Distributed *bool `json:"distributed,omitempty"` +// LabelingJobProperties - Labeling job definition +type LabelingJobProperties struct { + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` - // Enable early stopping logic during training. - EarlyStopping *bool `json:"earlyStopping,omitempty"` + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,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"` + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,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"` + // Configuration of data used in the job. + DataConfiguration *LabelingDataConfiguration `json:"dataConfiguration,omitempty"` - // Enable normalization when exporting ONNX model. - EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` + // The asset description text. + Description *string `json:"description,omitempty"` - // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - EvaluationFrequency *int32 `json:"evaluationFrequency,omitempty"` + // Display name of job. + DisplayName *string `json:"displayName,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"` + // 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"` - // 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"` + // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken + // if null. + Identity IdentityConfigurationClassification `json:"identity,omitempty"` - // Initial learning rate. Must be a float in the range [0, 1]. - LearningRate *float32 `json:"learningRate,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,omitempty"` + // Labeling instructions of the job. + JobInstructions *LabelingJobInstructions `json:"jobInstructions,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"` + // Label categories of the job. + LabelCategories map[string]*LabelCategory `json:"labelCategories,omitempty"` - // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - Momentum *float32 `json:"momentum,omitempty"` + // Media type specific properties in the job. + LabelingJobMediaProperties LabelingJobMediaPropertiesClassification `json:"labelingJobMediaProperties,omitempty"` - // Enable nesterov when optimizer is 'sgd'. - Nesterov *bool `json:"nesterov,omitempty"` + // Configuration of MLAssist feature in the job. + MlAssistConfiguration MLAssistConfigurationClassification `json:"mlAssistConfiguration,omitempty"` - // Number of training epochs. Must be a positive integer. - NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` + // Notification setting for the job + NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` - // Number of data loader workers. Must be a non-negative integer. - NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // Type of optimizer. - Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` - // Random seed to be used when using deterministic training. - RandomSeed *int32 `json:"randomSeed,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - StepLRGamma *float32 `json:"stepLRGamma,omitempty"` + // READ-ONLY; Created time of the job in UTC timezone. + CreatedDateTime *time.Time `json:"createdDateTime,omitempty" azure:"ro"` - // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` + // READ-ONLY; Progress metrics of the job. + ProgressMetrics *ProgressMetrics `json:"progressMetrics,omitempty" azure:"ro"` - // Training batch size. Must be a positive integer. - TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` + // READ-ONLY; Internal id of the job(Previously called project). + ProjectID *string `json:"projectId,omitempty" azure:"ro"` - // Image crop size that is input to the neural network for the training dataset. Must be a positive integer. - TrainingCropSize *int32 `json:"trainingCropSize,omitempty"` + // READ-ONLY; Specifies the labeling job provisioning state. + ProvisioningState *JobProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - // Validation batch size. Must be a positive integer. - ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` - // Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. - ValidationCropSize *int32 `json:"validationCropSize,omitempty"` + // READ-ONLY; Status messages of the job. + StatusMessages []*StatusMessage `json:"statusMessages,omitempty" azure:"ro"` +} - // Image size to which to resize before cropping for validation dataset. Must be a positive integer. - ValidationResizeSize *int32 `json:"validationResizeSize,omitempty"` +// 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, + NotificationSetting: l.NotificationSetting, + Services: l.Services, + Status: l.Status, + Description: l.Description, + Properties: l.Properties, + Tags: l.Tags, + } +} - // 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"` +// 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"` - // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - WarmupCosineLRWarmupEpochs *int32 `json:"warmupCosineLRWarmupEpochs,omitempty"` + // An array of objects of type LabelingJob. + Value []*LabelingJob `json:"value,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"` +// LabelingJobTextProperties - Properties of a labeling job for text data +type LabelingJobTextProperties struct { + // REQUIRED; [Required] Media type of the job. + MediaType *MediaType `json:"mediaType,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"` + // Annotation type of text labeling job. + AnnotationType *TextAnnotationType `json:"annotationType,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"` +// GetLabelingJobMediaProperties implements the LabelingJobMediaPropertiesClassification interface for type LabelingJobTextProperties. +func (l *LabelingJobTextProperties) GetLabelingJobMediaProperties() *LabelingJobMediaProperties { + return &LabelingJobMediaProperties{ + MediaType: l.MediaType, + } +} - // Settings for using Augmentations. - Augmentations *string `json:"augmentations,omitempty"` +// LabelingJobsClientBeginCreateOrUpdateOptions contains the optional parameters for the LabelingJobsClient.BeginCreateOrUpdate +// method. +type LabelingJobsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta1 *float32 `json:"beta1,omitempty"` +// LabelingJobsClientBeginExportLabelsOptions contains the optional parameters for the LabelingJobsClient.BeginExportLabels +// method. +type LabelingJobsClientBeginExportLabelsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. - Beta2 *float32 `json:"beta2,omitempty"` +// LabelingJobsClientBeginResumeOptions contains the optional parameters for the LabelingJobsClient.BeginResume method. +type LabelingJobsClientBeginResumeOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // 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"` +// LabelingJobsClientDeleteOptions contains the optional parameters for the LabelingJobsClient.Delete method. +type LabelingJobsClientDeleteOptions struct { + // placeholder for future optional parameters +} - // 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"` +// 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 +} - // Frequency to store model checkpoints. Must be a positive integer. - CheckpointFrequency *int32 `json:"checkpointFrequency,omitempty"` +// LabelingJobsClientListOptions contains the optional parameters for the LabelingJobsClient.NewListPager method. +type LabelingJobsClientListOptions struct { + // Continuation token for pagination. + Skip *string + // Number of labeling jobs to return. + Top *int32 +} - // The pretrained checkpoint model for incremental training. - CheckpointModel *MLFlowModelJobInput `json:"checkpointModel,omitempty"` +// LabelingJobsClientPauseOptions contains the optional parameters for the LabelingJobsClient.Pause method. +type LabelingJobsClientPauseOptions struct { + // placeholder for future optional parameters +} - // The id of a previous run that has a pretrained checkpoint for incremental training. - CheckpointRunID *string `json:"checkpointRunId,omitempty"` +// ListAmlUserFeatureResult - The List Aml user feature operation response. +type ListAmlUserFeatureResult struct { + // READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next + // page of AML user features information. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` - // Whether to use distributed training. - Distributed *bool `json:"distributed,omitempty"` + // READ-ONLY; The list of AML user facing features. + Value []*AmlUserFeature `json:"value,omitempty" azure:"ro"` +} - // Enable early stopping logic during training. - EarlyStopping *bool `json:"earlyStopping,omitempty"` +type ListNotebookKeysResult struct { + // READ-ONLY + PrimaryAccessKey *string `json:"primaryAccessKey,omitempty" azure:"ro"` - // Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. - // Must be a positive integer. - EarlyStoppingDelay *int32 `json:"earlyStoppingDelay,omitempty"` + // READ-ONLY + SecondaryAccessKey *string `json:"secondaryAccessKey,omitempty" azure:"ro"` +} - // Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be - // a positive integer. - EarlyStoppingPatience *int32 `json:"earlyStoppingPatience,omitempty"` +type ListStorageAccountKeysResult struct { + // READ-ONLY + UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` +} - // Enable normalization when exporting ONNX model. - EnableOnnxNormalization *bool `json:"enableOnnxNormalization,omitempty"` +// ListUsagesResult - The List Usages operation response. +type ListUsagesResult struct { + // READ-ONLY; The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next + // page of AML resource usage information. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` - // Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. - EvaluationFrequency *int32 `json:"evaluationFrequency,omitempty"` + // READ-ONLY; The list of AML resource usages. + Value []*Usage `json:"value,omitempty" azure:"ro"` +} - // 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"` +type ListWorkspaceKeysResult struct { + // READ-ONLY + AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty" azure:"ro"` - // 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"` + // READ-ONLY + ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty" azure:"ro"` - // 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"` + // READ-ONLY + NotebookAccessKeys *ListNotebookKeysResult `json:"notebookAccessKeys,omitempty" azure:"ro"` - // Initial learning rate. Must be a float in the range [0, 1]. - LearningRate *float32 `json:"learningRate,omitempty"` + // READ-ONLY + UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` - // Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - LearningRateScheduler *LearningRateScheduler `json:"learningRateScheduler,omitempty"` + // READ-ONLY + UserStorageResourceID *string `json:"userStorageResourceId,omitempty" azure:"ro"` +} - // Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training - // run may get into CUDA OOM if the size is too big. Note: This settings is not - // supported for the 'yolov5' algorithm. - MaxSize *int32 `json:"maxSize,omitempty"` +// ListWorkspaceQuotas - The List WorkspaceQuotasByVMFamily operation response. +type ListWorkspaceQuotas struct { + // READ-ONLY; The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch + // the next page of Workspace Quota information. + NextLink *string `json:"nextLink,omitempty" azure:"ro"` - // Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training - // run may get into CUDA OOM if the size is too big. Note: This settings is not - // supported for the 'yolov5' algorithm. - MinSize *int32 `json:"minSize,omitempty"` + // READ-ONLY; The list of Workspace Quotas by VM Family + Value []*ResourceQuota `json:"value,omitempty" azure:"ro"` +} - // Name of the model to use for training. For more information on the available models please visit the official documentation: - // https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - ModelName *string `json:"modelName,omitempty"` +// LiteralJobInput - Literal input type. +type LiteralJobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,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"` + // REQUIRED; [Required] Literal value for the input. + Value *string `json:"value,omitempty"` - // Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - Momentum *float32 `json:"momentum,omitempty"` + // Description for the input. + Description *string `json:"description,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"` +// GetJobInput implements the JobInputClassification interface for type LiteralJobInput. +func (l *LiteralJobInput) GetJobInput() *JobInput { + return &JobInput{ + Description: l.Description, + JobInputType: l.JobInputType, + } +} - // Enable nesterov when optimizer is 'sgd'. - Nesterov *bool `json:"nesterov,omitempty"` +// 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 +} - // IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. - NmsIouThreshold *float32 `json:"nmsIouThreshold,omitempty"` +// MLAssistConfiguration - Labeling MLAssist configuration definition +type MLAssistConfiguration struct { + // REQUIRED; [Required] Indicates whether MLAssist feature is enabled. + MlAssist *MLAssistConfigurationType `json:"mlAssist,omitempty"` +} - // Number of training epochs. Must be a positive integer. - NumberOfEpochs *int32 `json:"numberOfEpochs,omitempty"` +// GetMLAssistConfiguration implements the MLAssistConfigurationClassification interface for type MLAssistConfiguration. +func (m *MLAssistConfiguration) GetMLAssistConfiguration() *MLAssistConfiguration { return m } - // Number of data loader workers. Must be a non-negative integer. - NumberOfWorkers *int32 `json:"numberOfWorkers,omitempty"` +// 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"` +} - // Type of optimizer. - Optimizer *StochasticOptimizer `json:"optimizer,omitempty"` +// GetMLAssistConfiguration implements the MLAssistConfigurationClassification interface for type MLAssistConfigurationDisabled. +func (m *MLAssistConfigurationDisabled) GetMLAssistConfiguration() *MLAssistConfiguration { + return &MLAssistConfiguration{ + MlAssist: m.MlAssist, + } +} - // Random seed to be used when using deterministic training. - RandomSeed *int32 `json:"randomSeed,omitempty"` +// 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"` - // Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - StepLRGamma *float32 `json:"stepLRGamma,omitempty"` + // REQUIRED; [Required] Indicates whether MLAssist feature is enabled. + MlAssist *MLAssistConfigurationType `json:"mlAssist,omitempty"` - // Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - StepLRStepSize *int32 `json:"stepLRStepSize,omitempty"` + // REQUIRED; [Required] AML compute binding used in training. + TrainingComputeBinding *string `json:"trainingComputeBinding,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"` +// GetMLAssistConfiguration implements the MLAssistConfigurationClassification interface for type MLAssistConfigurationEnabled. +func (m *MLAssistConfigurationEnabled) GetMLAssistConfiguration() *MLAssistConfiguration { + return &MLAssistConfiguration{ + MlAssist: m.MlAssist, + } +} - // 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"` +type MLFlowModelJobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,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"` + // REQUIRED; [Required] Input Asset URI. + URI *string `json:"uri,omitempty"` - // Training batch size. Must be a positive integer. - TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` + // Description for the input. + Description *string `json:"description,omitempty"` - // Validation batch size. Must be a positive integer. - ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` + // Input Asset Delivery Mode. + Mode *InputDeliveryMode `json:"mode,omitempty"` +} - // IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. - ValidationIouThreshold *float32 `json:"validationIouThreshold,omitempty"` +// GetJobInput implements the JobInputClassification interface for type MLFlowModelJobInput. +func (m *MLFlowModelJobInput) GetJobInput() *JobInput { + return &JobInput{ + Description: m.Description, + JobInputType: m.JobInputType, + } +} - // Metric computation method to use for validation metrics. - ValidationMetricType *ValidationMetricType `json:"validationMetricType,omitempty"` +type MLFlowModelJobOutput struct { + // REQUIRED; [Required] Specifies the type of job. + JobOutputType *JobOutputType `json:"jobOutputType,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"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` - // Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. - WarmupCosineLRWarmupEpochs *int32 `json:"warmupCosineLRWarmupEpochs,omitempty"` + // Output Asset Version. + AssetVersion *string `json:"assetVersion,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"` -} + // Description for the output. + Description *string `json:"description,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"` + // Output Asset Delivery Mode. + Mode *OutputDeliveryMode `json:"mode,omitempty"` - // REQUIRED; [Required] Task type for AutoMLJob. - TaskType *TaskType `json:"taskType,omitempty"` + // Output Asset URI. + URI *string `json:"uri,omitempty"` +} - // REQUIRED; [Required] Training data input. - TrainingData *MLTableJobInput `json:"trainingData,omitempty"` +// GetJobOutput implements the JobOutputClassification interface for type MLFlowModelJobOutput. +func (m *MLFlowModelJobOutput) GetJobOutput() *JobOutput { + return &JobOutput{ + Description: m.Description, + JobOutputType: m.JobOutputType, + } +} - // Log verbosity for the job. - LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` +// MLTableData - MLTable data definition +type MLTableData struct { + // REQUIRED; [Required] Specifies the type of data. + DataType *DataType `json:"dataType,omitempty"` - // Settings used for training the model. - ModelSettings *ImageModelSettingsObjectDetection `json:"modelSettings,omitempty"` + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 + DataURI *string `json:"dataUri,omitempty"` - // Primary metric to optimize for this task. - PrimaryMetric *ObjectDetectionPrimaryMetrics `json:"primaryMetric,omitempty"` + // The asset description text. + Description *string `json:"description,omitempty"` - // Search space for sampling different combinations of models and their hyperparameters. - SearchSpace []*ImageModelDistributionSettingsObjectDetection `json:"searchSpace,omitempty"` + // If the name version are system generated (anonymous registration). + IsAnonymous *bool `json:"isAnonymous,omitempty"` - // Model sweeping and hyperparameter sweeping related settings. - SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. - TargetColumnName *string `json:"targetColumnName,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // Validation data inputs. - ValidationData *MLTableJobInput `json:"validationData,omitempty"` + // Uris referenced in the MLTable definition (required for lineage) + ReferencedUris []*string `json:"referencedUris,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"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,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, +// GetDataVersionBaseProperties implements the DataVersionBasePropertiesClassification interface for type MLTableData. +func (m *MLTableData) GetDataVersionBaseProperties() *DataVersionBaseProperties { + return &DataVersionBaseProperties{ + DataType: m.DataType, + DataURI: m.DataURI, + IsAnonymous: m.IsAnonymous, + IsArchived: m.IsArchived, + Description: m.Description, + Properties: m.Properties, + Tags: m.Tags, } } -type 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"` +type MLTableJobInput struct { + // REQUIRED; [Required] Specifies the type of job. + JobInputType *JobInputType `json:"jobInputType,omitempty"` - // Model sweeping and hyperparameter sweeping related settings. - SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + // REQUIRED; [Required] Input Asset URI. + URI *string `json:"uri,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"` + // Input Asset Delivery Mode. + Mode *InputDeliveryMode `json:"mode,omitempty"` } -// ImageSweepSettings - Model sweeping and hyperparameter sweeping related settings. -type ImageSweepSettings struct { - // REQUIRED; [Required] Type of the hyperparameter sampling algorithms. - SamplingAlgorithm *SamplingAlgorithmType `json:"samplingAlgorithm,omitempty"` - - // Type of early termination policy. - EarlyTermination EarlyTerminationPolicyClassification `json:"earlyTermination,omitempty"` +// GetJobInput implements the JobInputClassification interface for type MLTableJobInput. +func (m *MLTableJobInput) GetJobInput() *JobInput { + return &JobInput{ + Description: m.Description, + JobInputType: m.JobInputType, + } } -// 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"` +type MLTableJobOutput struct { + // REQUIRED; [Required] Specifies the type of job. + JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` - // Model sweeping and hyperparameter sweeping related settings. - SweepSettings *ImageSweepSettings `json:"sweepSettings,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` - // Validation data inputs. - ValidationData *MLTableJobInput `json:"validationData,omitempty"` + // Output Asset Version. + AssetVersion *string `json:"assetVersion,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"` -} + // Description for the output. + Description *string `json:"description,omitempty"` -type InferenceContainerProperties struct { - // The route to check the liveness of the inference server container. - LivenessRoute *Route `json:"livenessRoute,omitempty"` + // Output Asset Delivery Mode. + Mode *OutputDeliveryMode `json:"mode,omitempty"` - // The route to check the readiness of the inference server container. - ReadinessRoute *Route `json:"readinessRoute,omitempty"` + // Output Asset URI. + URI *string `json:"uri,omitempty"` +} - // The port to send the scoring requests to, within the inference server container. - ScoringRoute *Route `json:"scoringRoute,omitempty"` +// GetJobOutput implements the JobOutputClassification interface for type MLTableJobOutput. +func (m *MLTableJobOutput) GetJobOutput() *JobOutput { + return &JobOutput{ + Description: m.Description, + JobOutputType: m.JobOutputType, + } } -// InstanceTypeSchema - Instance type schema. -type InstanceTypeSchema struct { - // Node Selector - NodeSelector map[string]*string `json:"nodeSelector,omitempty"` +// ManagedIdentity - Managed identity configuration. +type ManagedIdentity struct { + // REQUIRED; [Required] Specifies the type of identity framework. + IdentityType *IdentityConfigurationType `json:"identityType,omitempty"` - // Resource requests/limits for this instance type - Resources *InstanceTypeSchemaResources `json:"resources,omitempty"` -} + // Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. + ClientID *string `json:"clientId,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"` + // Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. + ObjectID *string `json:"objectId,omitempty"` - // Resource requests for this instance type - Requests map[string]*string `json:"requests,omitempty"` + // Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. + ResourceID *string `json:"resourceId,omitempty"` } -// JobBase - Azure Resource Manager resource envelope. -type JobBase struct { - // REQUIRED; [Required] Additional attributes of the entity. - Properties JobBasePropertiesClassification `json:"properties,omitempty"` +// GetIdentityConfiguration implements the IdentityConfigurationClassification interface for type ManagedIdentity. +func (m *ManagedIdentity) GetIdentityConfiguration() *IdentityConfiguration { + return &IdentityConfiguration{ + IdentityType: m.IdentityType, + } +} - // 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"` +type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + // Category of the connection + Category *ConnectionCategory `json:"category,omitempty"` + Credentials *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } -// JobBasePropertiesClassification provides polymorphic access to related types. -// Call the interface's GetJobBaseProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AutoMLJob, *CommandJob, *JobBaseProperties, *PipelineJob, *SweepJob -type JobBasePropertiesClassification interface { - // GetJobBaseProperties returns the JobBaseProperties content of the underlying type. - GetJobBaseProperties() *JobBaseProperties +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. +func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: m.AuthType, + Category: m.Category, + Target: m.Target, + Value: m.Value, + ValueFormat: m.ValueFormat, + } } -// JobBaseProperties - Base definition for a job. -type JobBaseProperties struct { - // REQUIRED; [Required] Specifies the type of job. - JobType *JobType `json:"jobType,omitempty"` +// ManagedOnlineDeployment - Properties specific to a ManagedOnlineDeployment. +type ManagedOnlineDeployment struct { + // REQUIRED; [Required] The compute type of the endpoint. + EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` - // ARM resource ID of the component resource. - ComponentID *string `json:"componentId,omitempty"` + // If true, enables Application Insights logging. + AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` - // ARM resource ID of the compute resource. - ComputeID *string `json:"computeId,omitempty"` + // Code configuration for the endpoint deployment. + CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` - // The asset description text. + // Description of the endpoint deployment. Description *string `json:"description,omitempty"` - // Display name of job. - DisplayName *string `json:"displayName,omitempty"` + // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,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"` + // ARM resource ID of the environment specification for the endpoint deployment. + EnvironmentID *string `json:"environmentId,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"` + // Environment variables configuration for the deployment. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // Compute instance type. + InstanceType *string `json:"instanceType,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // Liveness probe monitors the health of the container regularly. + LivenessProbe *ProbeSettings `json:"livenessProbe,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 URI path to the model. + Model *string `json:"model,omitempty"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` + // The path to mount the model in custom container. + ModelMountPath *string `json:"modelMountPath,omitempty"` - // READ-ONLY; Status of the job. - Status *JobStatus `json:"status,omitempty" azure:"ro"` -} + // Property dictionary. Properties can be added, but not removed or altered. + Properties map[string]*string `json:"properties,omitempty"` -// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type JobBaseProperties. -func (j *JobBaseProperties) GetJobBaseProperties() *JobBaseProperties { return j } + // 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"` -// 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"` + // Request settings for the deployment. + RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` - // An array of objects of type JobBase. - Value []*JobBase `json:"value,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"` } -// 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 +// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type ManagedOnlineDeployment. +func (m *ManagedOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { + return &OnlineDeploymentProperties{ + AppInsightsEnabled: m.AppInsightsEnabled, + EgressPublicNetworkAccess: m.EgressPublicNetworkAccess, + EndpointComputeType: m.EndpointComputeType, + InstanceType: m.InstanceType, + LivenessProbe: m.LivenessProbe, + Model: m.Model, + ModelMountPath: m.ModelMountPath, + ProvisioningState: m.ProvisioningState, + ReadinessProbe: m.ReadinessProbe, + RequestSettings: m.RequestSettings, + ScaleSettings: m.ScaleSettings, + CodeConfiguration: m.CodeConfiguration, + Description: m.Description, + EnvironmentID: m.EnvironmentID, + EnvironmentVariables: m.EnvironmentVariables, + Properties: m.Properties, + } } -// JobInput - Command job definition. -type JobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` +// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type ManagedServiceIdentity struct { + // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + Type *ManagedServiceIdentityType `json:"type,omitempty"` + + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` - // Description for the input. - Description *string `json:"description,omitempty"` -} + // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned + // identity. + PrincipalID *string `json:"principalId,omitempty" azure:"ro"` -// GetJobInput implements the JobInputClassification interface for type JobInput. -func (j *JobInput) GetJobInput() *JobInput { return j } + // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + TenantID *string `json:"tenantId,omitempty" azure:"ro"` +} -// 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 +// MaterializationComputeResource - Dto object representing compute resource +type MaterializationComputeResource struct { + // Specifies the instance type + InstanceType *string `json:"instanceType,omitempty"` } -type JobLimits struct { - // REQUIRED; [Required] JobLimit type. - JobLimitsType *JobLimitsType `json:"jobLimitsType,omitempty"` +type MaterializationSettings struct { + // Specifies the notification details + Notification *NotificationSetting `json:"notification,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"` -} + // Specifies the compute resource settings + Resource *MaterializationComputeResource `json:"resource,omitempty"` -// GetJobLimits implements the JobLimitsClassification interface for type JobLimits. -func (j *JobLimits) GetJobLimits() *JobLimits { return j } + // Specifies the schedule details + Schedule *RecurrenceTrigger `json:"schedule,omitempty"` -// JobOutputClassification provides polymorphic access to related types. -// Call the interface's GetJobOutput() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *CustomModelJobOutput, *JobOutput, *MLFlowModelJobOutput, *MLTableJobOutput, *TritonModelJobOutput, *URIFileJobOutput, -// - *URIFolderJobOutput -type JobOutputClassification interface { - // GetJobOutput returns the JobOutput content of the underlying type. - GetJobOutput() *JobOutput + // Specifies the spark compute settings + SparkConfiguration map[string]*string `json:"sparkConfiguration,omitempty"` + + // Specifies the stores to which materialization should happen + StoreType *MaterializationStoreType `json:"storeType,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"` +// MedianStoppingPolicy - Defines an early termination policy based on running averages of the primary metric of all runs +type MedianStoppingPolicy struct { + // REQUIRED; [Required] Name of policy configuration + PolicyType *EarlyTerminationPolicyType `json:"policyType,omitempty"` - // Description for the output. - Description *string `json:"description,omitempty"` + // Number of intervals by which to delay the first evaluation. + DelayEvaluation *int32 `json:"delayEvaluation,omitempty"` + + // Interval (number of runs) between policy evaluations. + EvaluationInterval *int32 `json:"evaluationInterval,omitempty"` } -// GetJobOutput implements the JobOutputClassification interface for type JobOutput. -func (j *JobOutput) GetJobOutput() *JobOutput { return j } +// GetEarlyTerminationPolicy implements the EarlyTerminationPolicyClassification interface for type MedianStoppingPolicy. +func (m *MedianStoppingPolicy) GetEarlyTerminationPolicy() *EarlyTerminationPolicy { + return &EarlyTerminationPolicy{ + DelayEvaluation: m.DelayEvaluation, + EvaluationInterval: m.EvaluationInterval, + PolicyType: m.PolicyType, + } +} -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"` +// ModelConfiguration - Model configuration options. +type ModelConfiguration struct { + // Input delivery mode for the model. + Mode *PackageInputDeliveryMode `json:"mode,omitempty"` - // Optional number of instances or nodes used by the compute target. - InstanceCount *int32 `json:"instanceCount,omitempty"` + // Relative mounting path of the model in the target image. + MountPath *string `json:"mountPath,omitempty"` +} - // Optional type of VM used as supported by the compute target. - InstanceType *string `json:"instanceType,omitempty"` +// ModelContainer - Azure Resource Manager resource envelope. +type ModelContainer struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *ModelContainerProperties `json:"properties,omitempty"` - // Additional properties bag. - Properties map[string]interface{} `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"` - // 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"` -} + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` -type JobScheduleAction struct { - // REQUIRED; [Required] Specifies the action type of the schedule - ActionType *ScheduleActionType `json:"actionType,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // REQUIRED; [Required] Defines Schedule action definition details. - JobDefinition JobBasePropertiesClassification `json:"jobDefinition,omitempty"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` } -// GetScheduleActionBase implements the ScheduleActionBaseClassification interface for type JobScheduleAction. -func (j *JobScheduleAction) GetScheduleActionBase() *ScheduleActionBase { - return &ScheduleActionBase{ - ActionType: j.ActionType, - } -} +type ModelContainerProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` -// JobService - Job endpoint definition -type JobService struct { - // Url for endpoint. - Endpoint *string `json:"endpoint,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Endpoint type. - JobServiceType *string `json:"jobServiceType,omitempty"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // Port for endpoint. - Port *int32 `json:"port,omitempty"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // Additional properties to set on the endpoint. - Properties map[string]*string `json:"properties,omitempty"` + // READ-ONLY; The latest version inside this container. + LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` - // READ-ONLY; Any error in the service. - ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` + // READ-ONLY; The next auto incremental version + NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` - // READ-ONLY; Status of endpoint. - Status *string `json:"status,omitempty" azure:"ro"` + // READ-ONLY; Provisioning state for the model container. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// JobsClientBeginCancelOptions contains the optional parameters for the JobsClient.BeginCancel method. -type JobsClientBeginCancelOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string +// ModelContainerResourceArmPaginatedResult - A paginated list of ModelContainer entities. +type ModelContainerResourceArmPaginatedResult struct { + // The link to the next page of ModelContainer objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type ModelContainer. + Value []*ModelContainer `json:"value,omitempty"` } -// JobsClientBeginDeleteOptions contains the optional parameters for the JobsClient.BeginDelete method. -type JobsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string +// ModelContainersClientCreateOrUpdateOptions contains the optional parameters for the ModelContainersClient.CreateOrUpdate +// method. +type ModelContainersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters } -// JobsClientCreateOrUpdateOptions contains the optional parameters for the JobsClient.CreateOrUpdate method. -type JobsClientCreateOrUpdateOptions struct { +// ModelContainersClientDeleteOptions contains the optional parameters for the ModelContainersClient.Delete method. +type ModelContainersClientDeleteOptions struct { // placeholder for future optional parameters } -// JobsClientGetOptions contains the optional parameters for the JobsClient.Get method. -type JobsClientGetOptions struct { +// ModelContainersClientGetOptions contains the optional parameters for the ModelContainersClient.Get method. +type ModelContainersClientGetOptions struct { // placeholder for future optional parameters } -// JobsClientListOptions contains the optional parameters for the JobsClient.List method. -type JobsClientListOptions struct { - // Type of job to be returned. - JobType *string +// ModelContainersClientListOptions contains the optional parameters for the ModelContainersClient.NewListPager method. +type ModelContainersClientListOptions struct { + // Maximum number of results to return. + Count *int32 // View type for including/excluding (for example) archived entities. ListViewType *ListViewType // Continuation token for pagination. Skip *string - // Jobs returned will have this tag key. - Tag *string } -// Kubernetes - A Machine Learning compute based on Kubernetes Compute. -type Kubernetes struct { - // REQUIRED; The type of compute - ComputeType *ComputeType `json:"computeType,omitempty"` +// ModelPackageInput - Model package input options. +type ModelPackageInput struct { + // REQUIRED; [Required] Type of the input included in the target image. + InputType *PackageInputType `json:"inputType,omitempty"` - // Location for the underlying compute - ComputeLocation *string `json:"computeLocation,omitempty"` + // REQUIRED; [Required] Location of the input. + Path PackageInputPathBaseClassification `json:"path,omitempty"` - // The description of the Machine Learning compute. + // Input delivery mode of the input. + Mode *PackageInputDeliveryMode `json:"mode,omitempty"` + + // Relative mount path of the input in the target image. + MountPath *string `json:"mountPath,omitempty"` +} + +// ModelVersion - Azure Resource Manager resource envelope. +type ModelVersion struct { + // REQUIRED; [Required] Additional attributes of the entity. + Properties *ModelVersionProperties `json:"properties,omitempty"` + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` + + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` +} + +// ModelVersionProperties - Model asset version details. +type ModelVersionProperties struct { + // The asset description text. Description *string `json:"description,omitempty"` - // Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + // Mapping of model flavors to their properties. + Flavors map[string]*FlavorData `json:"flavors,omitempty"` - // Properties of Kubernetes - Properties *KubernetesProperties `json:"properties,omitempty"` + // If the name version are system generated (anonymous registration). + IsAnonymous *bool `json:"isAnonymous,omitempty"` - // ARM resource id of the underlying compute - ResourceID *string `json:"resourceId,omitempty"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // READ-ONLY; The time at which the compute was created. - CreatedOn *time.Time `json:"createdOn,omitempty" azure:"ro"` + // Name of the training job which produced this model + JobName *string `json:"jobName,omitempty"` - // READ-ONLY; Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - // service provisioned it if false. - IsAttachedCompute *bool `json:"isAttachedCompute,omitempty" azure:"ro"` + // The storage format for this entity. Used for NCD. + ModelType *string `json:"modelType,omitempty"` - // READ-ONLY; The time at which the compute was last modified. - ModifiedOn *time.Time `json:"modifiedOn,omitempty" azure:"ro"` + // The URI path to the model contents. + ModelURI *string `json:"modelUri,omitempty"` - // READ-ONLY; Errors during provisioning - ProvisioningErrors []*ErrorResponse `json:"provisioningErrors,omitempty" azure:"ro"` + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` - // READ-ONLY; The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` + + // READ-ONLY; Provisioning state for the model version. + ProvisioningState *AssetProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// GetCompute implements the ComputeClassification interface for type Kubernetes. -func (k *Kubernetes) GetCompute() *Compute { - return &Compute{ - ComputeType: k.ComputeType, - ComputeLocation: k.ComputeLocation, - ProvisioningState: k.ProvisioningState, - Description: k.Description, - CreatedOn: k.CreatedOn, - ModifiedOn: k.ModifiedOn, - ResourceID: k.ResourceID, - ProvisioningErrors: k.ProvisioningErrors, - IsAttachedCompute: k.IsAttachedCompute, - DisableLocalAuth: k.DisableLocalAuth, - } +// ModelVersionResourceArmPaginatedResult - A paginated list of ModelVersion entities. +type ModelVersionResourceArmPaginatedResult struct { + // The link to the next page of ModelVersion objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` + + // An array of objects of type ModelVersion. + Value []*ModelVersion `json:"value,omitempty"` +} + +// ModelVersionsClientBeginPackageOptions contains the optional parameters for the ModelVersionsClient.BeginPackage method. +type ModelVersionsClientBeginPackageOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// KubernetesOnlineDeployment - Properties specific to a KubernetesOnlineDeployment. -type KubernetesOnlineDeployment struct { - // REQUIRED; [Required] The compute type of the endpoint. - EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` +// ModelVersionsClientCreateOrUpdateOptions contains the optional parameters for the ModelVersionsClient.CreateOrUpdate method. +type ModelVersionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} - // If true, enables Application Insights logging. - AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` +// ModelVersionsClientDeleteOptions contains the optional parameters for the ModelVersionsClient.Delete method. +type ModelVersionsClientDeleteOptions struct { + // placeholder for future optional parameters +} - // Code configuration for the endpoint deployment. - CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` +// ModelVersionsClientGetOptions contains the optional parameters for the ModelVersionsClient.Get method. +type ModelVersionsClientGetOptions struct { + // placeholder for future optional parameters +} - // The resource requirements for the container (cpu and memory). - ContainerResourceRequirements *ContainerResourceRequirements `json:"containerResourceRequirements,omitempty"` +// ModelVersionsClientListOptions contains the optional parameters for the ModelVersionsClient.NewListPager method. +type ModelVersionsClientListOptions struct { + // Model description. + Description *string + // Name of the feed. + Feed *string + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Number of initial results to skip. + Offset *int32 + // Ordering of list. + OrderBy *string + // Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + Properties *string + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + // Maximum number of records to return. + Top *int32 + // Model version. + Version *string +} - // Description of the endpoint deployment. - Description *string `json:"description,omitempty"` +// Mpi - MPI distribution configuration. +type Mpi struct { + // REQUIRED; [Required] Specifies the type of distribution framework. + DistributionType *DistributionType `json:"distributionType,omitempty"` - // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` + // Number of processes per MPI node. + ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` +} - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. - EnvironmentID *string `json:"environmentId,omitempty"` +// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type Mpi. +func (m *Mpi) GetDistributionConfiguration() *DistributionConfiguration { + return &DistributionConfiguration{ + DistributionType: m.DistributionType, + } +} - // Environment variables configuration for the deployment. - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` +// 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 +} - // Compute instance type. - InstanceType *string `json:"instanceType,omitempty"` +// NCrossValidations - N-Cross validations value. +type NCrossValidations struct { + // REQUIRED; [Required] Mode for determining N-Cross validations. + Mode *NCrossValidationsMode `json:"mode,omitempty"` +} - // Liveness probe monitors the health of the container regularly. - LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` +// GetNCrossValidations implements the NCrossValidationsClassification interface for type NCrossValidations. +func (n *NCrossValidations) GetNCrossValidations() *NCrossValidations { return n } - // The URI path to the model. - Model *string `json:"model,omitempty"` +// NlpFixedParameters - Fixed training parameters that won't be swept over during AutoML NLP training. +type NlpFixedParameters struct { + // Number of steps to accumulate gradients over before running a backward pass. + GradientAccumulationSteps *int32 `json:"gradientAccumulationSteps,omitempty"` - // The path to mount the model in custom container. - ModelMountPath *string `json:"modelMountPath,omitempty"` + // The learning rate for the training procedure. + LearningRate *float32 `json:"learningRate,omitempty"` - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` + // The type of learning rate schedule to use during the training procedure. + LearningRateScheduler *NlpLearningRateScheduler `json:"learningRateScheduler,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"` + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` - // Request settings for the deployment. - RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + // Number of training epochs. + NumberOfEpochs *int32 `json:"numberOfEpochs,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"` + // The batch size for the training procedure. + TrainingBatchSize *int32 `json:"trainingBatchSize,omitempty"` - // READ-ONLY; Provisioning state for the endpoint deployment. - ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // The batch size to be used during evaluation. + ValidationBatchSize *int32 `json:"validationBatchSize,omitempty"` -// 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, - } + // The warmup ratio, used alongside LrSchedulerType. + WarmupRatio *float32 `json:"warmupRatio,omitempty"` + + // The weight decay for the training procedure. + WeightDecay *float32 `json:"weightDecay,omitempty"` } -// KubernetesProperties - Kubernetes properties -type KubernetesProperties struct { - // Default instance type - DefaultInstanceType *string `json:"defaultInstanceType,omitempty"` +// NlpParameterSubspace - Stringified search spaces for each parameter. See below examples. +type NlpParameterSubspace struct { + // Number of steps to accumulate gradients over before running a backward pass. + GradientAccumulationSteps *string `json:"gradientAccumulationSteps,omitempty"` - // Extension instance release train. - ExtensionInstanceReleaseTrain *string `json:"extensionInstanceReleaseTrain,omitempty"` + // The learning rate for the training procedure. + LearningRate *string `json:"learningRate,omitempty"` - // Extension principal-id. - ExtensionPrincipalID *string `json:"extensionPrincipalId,omitempty"` + // The type of learning rate schedule to use during the training procedure. + LearningRateScheduler *string `json:"learningRateScheduler,omitempty"` - // Instance Type Schema - InstanceTypes map[string]*InstanceTypeSchema `json:"instanceTypes,omitempty"` + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` - // Compute namespace - Namespace *string `json:"namespace,omitempty"` + // Number of training epochs. + NumberOfEpochs *string `json:"numberOfEpochs,omitempty"` - // Relay connection string. - RelayConnectionString *string `json:"relayConnectionString,omitempty"` + // The batch size for the training procedure. + TrainingBatchSize *string `json:"trainingBatchSize,omitempty"` - // ServiceBus connection string. - ServiceBusConnectionString *string `json:"serviceBusConnectionString,omitempty"` + // The batch size to be used during evaluation. + ValidationBatchSize *string `json:"validationBatchSize,omitempty"` - // VC name. - VcName *string `json:"vcName,omitempty"` -} + // The warmup ratio, used alongside LrSchedulerType. + WarmupRatio *string `json:"warmupRatio,omitempty"` -// KubernetesSchema - Kubernetes Compute Schema -type KubernetesSchema struct { - // Properties of Kubernetes - Properties *KubernetesProperties `json:"properties,omitempty"` + // The weight decay for the training procedure. + WeightDecay *string `json:"weightDecay,omitempty"` } -// ListAmlUserFeatureResult - The List Aml user feature operation response. -type ListAmlUserFeatureResult struct { - // READ-ONLY; The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next - // page of AML user features information. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` +// NlpSweepSettings - Model sweeping and hyperparameter tuning related settings. +type NlpSweepSettings struct { + // REQUIRED; [Required] Type of sampling algorithm. + SamplingAlgorithm *SamplingAlgorithmType `json:"samplingAlgorithm,omitempty"` - // READ-ONLY; The list of AML user facing features. - Value []*AmlUserFeature `json:"value,omitempty" azure:"ro"` + // Type of early termination policy for the sweeping job. + EarlyTermination EarlyTerminationPolicyClassification `json:"earlyTermination,omitempty"` } -type ListNotebookKeysResult struct { - // READ-ONLY - PrimaryAccessKey *string `json:"primaryAccessKey,omitempty" azure:"ro"` +// 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"` - // READ-ONLY - SecondaryAccessKey *string `json:"secondaryAccessKey,omitempty" azure:"ro"` -} + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` -type ListStorageAccountKeysResult struct { - // READ-ONLY - UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` -} + // Execution constraints for AutoMLJob. + LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` -// ListUsagesResult - The List Usages operation response. -type ListUsagesResult struct { - // READ-ONLY; The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next - // page of AML resource usage information. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` - // READ-ONLY; The list of AML resource usages. - Value []*Usage `json:"value,omitempty" azure:"ro"` + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + + // Validation data inputs. + ValidationData *MLTableJobInput `json:"validationData,omitempty"` } -type ListWorkspaceKeysResult struct { - // READ-ONLY - AppInsightsInstrumentationKey *string `json:"appInsightsInstrumentationKey,omitempty" azure:"ro"` +type NlpVerticalFeaturizationSettings struct { + // Dataset language, useful for the text data. + DatasetLanguage *string `json:"datasetLanguage,omitempty"` +} - // READ-ONLY - ContainerRegistryCredentials *RegistryListCredentialsResult `json:"containerRegistryCredentials,omitempty" azure:"ro"` +// NlpVerticalLimitSettings - Job execution constraints. +type NlpVerticalLimitSettings struct { + // Maximum Concurrent AutoML iterations. + MaxConcurrentTrials *int32 `json:"maxConcurrentTrials,omitempty"` - // READ-ONLY - NotebookAccessKeys *ListNotebookKeysResult `json:"notebookAccessKeys,omitempty" azure:"ro"` + // Maximum nodes to use for the experiment. + MaxNodes *int32 `json:"maxNodes,omitempty"` - // READ-ONLY - UserStorageKey *string `json:"userStorageKey,omitempty" azure:"ro"` + // Number of AutoML iterations. + MaxTrials *int32 `json:"maxTrials,omitempty"` - // READ-ONLY - UserStorageResourceID *string `json:"userStorageResourceId,omitempty" azure:"ro"` + // AutoML job timeout. + Timeout *string `json:"timeout,omitempty"` + + // Timeout for individual HD trials. + TrialTimeout *string `json:"trialTimeout,omitempty"` } -// ListWorkspaceQuotas - The List WorkspaceQuotasByVMFamily operation response. -type ListWorkspaceQuotas struct { - // READ-ONLY; The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch - // the next page of Workspace Quota information. - NextLink *string `json:"nextLink,omitempty" azure:"ro"` +// NodeStateCounts - Counts of various compute node states on the amlCompute. +type NodeStateCounts struct { + // READ-ONLY; Number of compute nodes in idle state. + IdleNodeCount *int32 `json:"idleNodeCount,omitempty" azure:"ro"` - // READ-ONLY; The list of Workspace Quotas by VM Family - Value []*ResourceQuota `json:"value,omitempty" azure:"ro"` -} + // READ-ONLY; Number of compute nodes which are leaving the amlCompute. + LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty" azure:"ro"` -// LiteralJobInput - Literal input type. -type LiteralJobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` + // READ-ONLY; Number of compute nodes which are in preempted state. + PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty" azure:"ro"` - // REQUIRED; [Required] Literal value for the input. - Value *string `json:"value,omitempty"` + // READ-ONLY; Number of compute nodes which are being prepared. + PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty" azure:"ro"` - // Description for the input. - Description *string `json:"description,omitempty"` -} + // READ-ONLY; Number of compute nodes which are running jobs. + RunningNodeCount *int32 `json:"runningNodeCount,omitempty" azure:"ro"` -// GetJobInput implements the JobInputClassification interface for type LiteralJobInput. -func (l *LiteralJobInput) GetJobInput() *JobInput { - return &JobInput{ - Description: l.Description, - JobInputType: l.JobInputType, - } + // READ-ONLY; Number of compute nodes which are in unusable state. + UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty" azure:"ro"` +} + +// NodesClassification provides polymorphic access to related types. +// Call the interface's GetNodes() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AllNodes, *Nodes +type NodesClassification interface { + // GetNodes returns the Nodes content of the underlying type. + GetNodes() *Nodes } -type MLFlowModelJobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` +// Nodes - Abstract Nodes definition +type Nodes struct { + // REQUIRED; [Required] Type of the Nodes value + NodesValueType *NodesValueType `json:"nodesValueType,omitempty"` +} - // REQUIRED; [Required] Input Asset URI. - URI *string `json:"uri,omitempty"` +// GetNodes implements the NodesClassification interface for type Nodes. +func (n *Nodes) GetNodes() *Nodes { return n } - // Description for the input. - Description *string `json:"description,omitempty"` +type NoneAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` - // Input Asset Delivery Mode. - Mode *InputDeliveryMode `json:"mode,omitempty"` + // Category of the connection + Category *ConnectionCategory `json:"category,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } -// GetJobInput implements the JobInputClassification interface for type MLFlowModelJobInput. -func (m *MLFlowModelJobInput) GetJobInput() *JobInput { - return &JobInput{ - Description: m.Description, - JobInputType: m.JobInputType, +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type NoneAuthTypeWorkspaceConnectionProperties. +func (n *NoneAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: n.AuthType, + Category: n.Category, + Target: n.Target, + Value: n.Value, + ValueFormat: n.ValueFormat, } } -type MLFlowModelJobOutput struct { - // REQUIRED; [Required] Specifies the type of job. - JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` - - // Description for the output. - Description *string `json:"description,omitempty"` - - // Output Asset Delivery Mode. - Mode *OutputDeliveryMode `json:"mode,omitempty"` - - // Output Asset URI. - URI *string `json:"uri,omitempty"` +// NoneDatastoreCredentials - Empty/none datastore credentials. +type NoneDatastoreCredentials struct { + // REQUIRED; [Required] Credential type used to authentication with storage. + CredentialsType *CredentialsType `json:"credentialsType,omitempty"` } -// GetJobOutput implements the JobOutputClassification interface for type MLFlowModelJobOutput. -func (m *MLFlowModelJobOutput) GetJobOutput() *JobOutput { - return &JobOutput{ - Description: m.Description, - JobOutputType: m.JobOutputType, +// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type NoneDatastoreCredentials. +func (n *NoneDatastoreCredentials) GetDatastoreCredentials() *DatastoreCredentials { + return &DatastoreCredentials{ + CredentialsType: n.CredentialsType, } } -// MLTableData - MLTable data definition -type MLTableData struct { - // REQUIRED; [Required] Specifies the type of data. - DataType *DataType `json:"dataType,omitempty"` +type NotebookAccessTokenResult struct { + // READ-ONLY + AccessToken *string `json:"accessToken,omitempty" azure:"ro"` - // REQUIRED; [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType - DataURI *string `json:"dataUri,omitempty"` + // READ-ONLY + ExpiresIn *int32 `json:"expiresIn,omitempty" azure:"ro"` - // The asset description text. - Description *string `json:"description,omitempty"` + // READ-ONLY + HostName *string `json:"hostName,omitempty" azure:"ro"` - // If the name version are system generated (anonymous registration). - IsAnonymous *bool `json:"isAnonymous,omitempty"` + // READ-ONLY + NotebookResourceID *string `json:"notebookResourceId,omitempty" azure:"ro"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // READ-ONLY + PublicDNS *string `json:"publicDns,omitempty" azure:"ro"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // READ-ONLY + RefreshToken *string `json:"refreshToken,omitempty" azure:"ro"` - // Uris referenced in the MLTable definition (required for lineage) - ReferencedUris []*string `json:"referencedUris,omitempty"` + // READ-ONLY + Scope *string `json:"scope,omitempty" azure:"ro"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` + // READ-ONLY + TokenType *string `json:"tokenType,omitempty" azure:"ro"` } -// GetDataVersionBaseProperties implements the DataVersionBasePropertiesClassification interface for type MLTableData. -func (m *MLTableData) GetDataVersionBaseProperties() *DataVersionBaseProperties { - return &DataVersionBaseProperties{ - DataType: m.DataType, - DataURI: m.DataURI, - IsAnonymous: m.IsAnonymous, - IsArchived: m.IsArchived, - Description: m.Description, - Properties: m.Properties, - Tags: m.Tags, - } +type NotebookPreparationError struct { + ErrorMessage *string `json:"errorMessage,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` } -type MLTableJobInput struct { - // REQUIRED; [Required] Specifies the type of job. - JobInputType *JobInputType `json:"jobInputType,omitempty"` - - // REQUIRED; [Required] Input Asset URI. - URI *string `json:"uri,omitempty"` - - // Description for the input. - Description *string `json:"description,omitempty"` +type NotebookResourceInfo struct { + Fqdn *string `json:"fqdn,omitempty"` - // Input Asset Delivery Mode. - Mode *InputDeliveryMode `json:"mode,omitempty"` -} + // The error that occurs when preparing notebook. + NotebookPreparationError *NotebookPreparationError `json:"notebookPreparationError,omitempty"` -// GetJobInput implements the JobInputClassification interface for type MLTableJobInput. -func (m *MLTableJobInput) GetJobInput() *JobInput { - return &JobInput{ - Description: m.Description, - JobInputType: m.JobInputType, - } + // the data plane resourceId that used to initialize notebook component + ResourceID *string `json:"resourceId,omitempty"` } -type MLTableJobOutput struct { - // REQUIRED; [Required] Specifies the type of job. - JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` +// NotificationSetting - Configuration for notification. +type NotificationSetting struct { + // Send email notification to user on specified notification type + EmailOn []*EmailNotificationEnableType `json:"emailOn,omitempty"` - // Description for the output. - Description *string `json:"description,omitempty"` + // This is the email recipient list which has a limitation of 499 characters in total concat with comma separator + Emails []*string `json:"emails,omitempty"` +} - // Output Asset Delivery Mode. - Mode *OutputDeliveryMode `json:"mode,omitempty"` +// Objective - Optimization objective. +type Objective struct { + // REQUIRED; [Required] Defines supported metric goals for hyperparameter tuning + Goal *Goal `json:"goal,omitempty"` - // Output Asset URI. - URI *string `json:"uri,omitempty"` + // REQUIRED; [Required] Name of the metric to optimize. + PrimaryMetric *string `json:"primaryMetric,omitempty"` } -// GetJobOutput implements the JobOutputClassification interface for type MLTableJobOutput. -func (m *MLTableJobOutput) GetJobOutput() *JobOutput { - return &JobOutput{ - Description: m.Description, - JobOutputType: m.JobOutputType, - } -} +type OnlineDeployment struct { + // REQUIRED; The geo-location where the resource lives + Location *string `json:"location,omitempty"` -// ManagedIdentity - Managed identity configuration. -type ManagedIdentity struct { - // REQUIRED; [Required] Specifies the type of identity framework. - IdentityType *IdentityConfigurationType `json:"identityType,omitempty"` + // REQUIRED; [Required] Additional attributes of the entity. + Properties OnlineDeploymentPropertiesClassification `json:"properties,omitempty"` - // Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. - ClientID *string `json:"clientId,omitempty"` + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. - ObjectID *string `json:"objectId,omitempty"` + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string `json:"kind,omitempty"` - // Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. - ResourceID *string `json:"resourceId,omitempty"` -} + // Sku details required for ARM contract for Autoscaling. + SKU *SKU `json:"sku,omitempty"` -// GetIdentityConfiguration implements the IdentityConfigurationClassification interface for type ManagedIdentity. -func (m *ManagedIdentity) GetIdentityConfiguration() *IdentityConfiguration { - return &IdentityConfiguration{ - IdentityType: m.IdentityType, - } -} + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` -type ManagedIdentityAuthTypeWorkspaceConnectionProperties struct { - // REQUIRED; Authentication type of the connection target - AuthType *ConnectionAuthType `json:"authType,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"` - // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` - Credentials *WorkspaceConnectionManagedIdentity `json:"credentials,omitempty"` - Target *string `json:"target,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // Value details of the workspace connection. - Value *string `json:"value,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // format for the workspace connection value - ValueFormat *ValueFormat `json:"valueFormat,omitempty"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` } -// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. -func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { - return &WorkspaceConnectionPropertiesV2{ - AuthType: m.AuthType, - Category: m.Category, - Target: m.Target, - Value: m.Value, - ValueFormat: m.ValueFormat, - } +// OnlineDeploymentPropertiesClassification provides polymorphic access to related types. +// Call the interface's GetOnlineDeploymentProperties() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *KubernetesOnlineDeployment, *ManagedOnlineDeployment, *OnlineDeploymentProperties +type OnlineDeploymentPropertiesClassification interface { + // GetOnlineDeploymentProperties returns the OnlineDeploymentProperties content of the underlying type. + GetOnlineDeploymentProperties() *OnlineDeploymentProperties } -// ManagedOnlineDeployment - Properties specific to a ManagedOnlineDeployment. -type ManagedOnlineDeployment struct { +type OnlineDeploymentProperties struct { // REQUIRED; [Required] The compute type of the endpoint. EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` @@ -5388,7 +7614,7 @@ type ManagedOnlineDeployment struct { // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,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. @@ -5424,73 +7650,88 @@ type ManagedOnlineDeployment struct { ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type ManagedOnlineDeployment. -func (m *ManagedOnlineDeployment) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { - return &OnlineDeploymentProperties{ - AppInsightsEnabled: m.AppInsightsEnabled, - EgressPublicNetworkAccess: m.EgressPublicNetworkAccess, - EndpointComputeType: m.EndpointComputeType, - InstanceType: m.InstanceType, - LivenessProbe: m.LivenessProbe, - Model: m.Model, - ModelMountPath: m.ModelMountPath, - ProvisioningState: m.ProvisioningState, - ReadinessProbe: m.ReadinessProbe, - RequestSettings: m.RequestSettings, - ScaleSettings: m.ScaleSettings, - CodeConfiguration: m.CodeConfiguration, - Description: m.Description, - EnvironmentID: m.EnvironmentID, - EnvironmentVariables: m.EnvironmentVariables, - Properties: m.Properties, - } +// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type OnlineDeploymentProperties. +func (o *OnlineDeploymentProperties) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { + return o } -// ManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) -type ManagedServiceIdentity struct { - // REQUIRED; Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - Type *ManagedServiceIdentityType `json:"type,omitempty"` +// OnlineDeploymentTrackedResourceArmPaginatedResult - A paginated list of OnlineDeployment entities. +type OnlineDeploymentTrackedResourceArmPaginatedResult struct { + // The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` - // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM - // resource ids in the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - // The dictionary values can be empty objects ({}) in - // requests. - UserAssignedIdentities map[string]*UserAssignedIdentity `json:"userAssignedIdentities,omitempty"` + // An array of objects of type OnlineDeployment. + Value []*OnlineDeployment `json:"value,omitempty"` +} - // READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned - // identity. - PrincipalID *string `json:"principalId,omitempty" azure:"ro"` +// OnlineDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginCreateOrUpdate +// method. +type OnlineDeploymentsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - TenantID *string `json:"tenantId,omitempty" azure:"ro"` +// OnlineDeploymentsClientBeginDeleteOptions contains the optional parameters for the OnlineDeploymentsClient.BeginDelete +// method. +type OnlineDeploymentsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// MedianStoppingPolicy - Defines an early termination policy based on running averages of the primary metric of all runs -type MedianStoppingPolicy struct { - // REQUIRED; [Required] Name of policy configuration - PolicyType *EarlyTerminationPolicyType `json:"policyType,omitempty"` +// OnlineDeploymentsClientBeginUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginUpdate +// method. +type OnlineDeploymentsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Number of intervals by which to delay the first evaluation. - DelayEvaluation *int32 `json:"delayEvaluation,omitempty"` +// OnlineDeploymentsClientGetLogsOptions contains the optional parameters for the OnlineDeploymentsClient.GetLogs method. +type OnlineDeploymentsClientGetLogsOptions struct { + // placeholder for future optional parameters +} - // Interval (number of runs) between policy evaluations. - EvaluationInterval *int32 `json:"evaluationInterval,omitempty"` +// OnlineDeploymentsClientGetOptions contains the optional parameters for the OnlineDeploymentsClient.Get method. +type OnlineDeploymentsClientGetOptions struct { + // placeholder for future optional parameters } -// GetEarlyTerminationPolicy implements the EarlyTerminationPolicyClassification interface for type MedianStoppingPolicy. -func (m *MedianStoppingPolicy) GetEarlyTerminationPolicy() *EarlyTerminationPolicy { - return &EarlyTerminationPolicy{ - DelayEvaluation: m.DelayEvaluation, - EvaluationInterval: m.EvaluationInterval, - PolicyType: m.PolicyType, - } +// OnlineDeploymentsClientListOptions contains the optional parameters for the OnlineDeploymentsClient.NewListPager method. +type OnlineDeploymentsClientListOptions struct { + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Top of list. + Top *int32 } -// ModelContainer - Azure Resource Manager resource envelope. -type ModelContainer struct { +// OnlineDeploymentsClientListSKUsOptions contains the optional parameters for the OnlineDeploymentsClient.NewListSKUsPager +// method. +type OnlineDeploymentsClientListSKUsOptions struct { + // Number of Skus to be retrieved in a page of results. + Count *int32 + // Continuation token for pagination. + Skip *string +} + +type OnlineEndpoint struct { + // REQUIRED; The geo-location where the resource lives + Location *string `json:"location,omitempty"` + // REQUIRED; [Required] Additional attributes of the entity. - Properties *ModelContainerProperties `json:"properties,omitempty"` + Properties *OnlineEndpointProperties `json:"properties,omitempty"` + + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string `json:"kind,omitempty"` + + // Sku details required for ARM contract for Autoscaling. + SKU *SKU `json:"sku,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` @@ -5505,503 +7746,562 @@ type ModelContainer struct { Type *string `json:"type,omitempty" azure:"ro"` } -type ModelContainerProperties struct { - // The asset description text. +// OnlineEndpointProperties - Online endpoint configuration +type OnlineEndpointProperties struct { + // REQUIRED; [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. + // 'Key' doesn't expire but 'AMLToken' does. + AuthMode *EndpointAuthMode `json:"authMode,omitempty"` + + // ARM resource ID of the compute if it exists. optional + Compute *string `json:"compute,omitempty"` + + // Description of the inference endpoint. Description *string `json:"description,omitempty"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // EndpointAuthKeys to set initially on an Endpoint. This property will always be returned as null. AuthKey values must be + // retrieved using the ListKeys API. + Keys *EndpointAuthKeys `json:"keys,omitempty"` - // The asset property dictionary. + // 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"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` + // Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"` - // READ-ONLY; The latest version inside this container. - LatestVersion *string `json:"latestVersion,omitempty" azure:"ro"` + // Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + Traffic map[string]*int32 `json:"traffic,omitempty"` - // READ-ONLY; The next auto incremental version - NextVersion *string `json:"nextVersion,omitempty" azure:"ro"` + // READ-ONLY; Provisioning state for the endpoint. + ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` + + // READ-ONLY; Endpoint URI. + ScoringURI *string `json:"scoringUri,omitempty" azure:"ro"` + + // READ-ONLY; Endpoint Swagger URI. + SwaggerURI *string `json:"swaggerUri,omitempty" azure:"ro"` } -// ModelContainerResourceArmPaginatedResult - A paginated list of ModelContainer entities. -type ModelContainerResourceArmPaginatedResult struct { - // The link to the next page of ModelContainer objects. If null, there are no additional pages. +// OnlineEndpointTrackedResourceArmPaginatedResult - A paginated list of OnlineEndpoint entities. +type OnlineEndpointTrackedResourceArmPaginatedResult struct { + // The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. NextLink *string `json:"nextLink,omitempty"` - // An array of objects of type ModelContainer. - Value []*ModelContainer `json:"value,omitempty"` + // An array of objects of type OnlineEndpoint. + Value []*OnlineEndpoint `json:"value,omitempty"` } -// ModelContainersClientCreateOrUpdateOptions contains the optional parameters for the ModelContainersClient.CreateOrUpdate +// OnlineEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginCreateOrUpdate // method. -type ModelContainersClientCreateOrUpdateOptions struct { +type OnlineEndpointsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientBeginDeleteOptions contains the optional parameters for the OnlineEndpointsClient.BeginDelete method. +type OnlineEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the OnlineEndpointsClient.BeginRegenerateKeys +// method. +type OnlineEndpointsClientBeginRegenerateKeysOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientBeginUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginUpdate method. +type OnlineEndpointsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// OnlineEndpointsClientGetOptions contains the optional parameters for the OnlineEndpointsClient.Get method. +type OnlineEndpointsClientGetOptions struct { // placeholder for future optional parameters } -// ModelContainersClientDeleteOptions contains the optional parameters for the ModelContainersClient.Delete method. -type ModelContainersClientDeleteOptions struct { +// OnlineEndpointsClientGetTokenOptions contains the optional parameters for the OnlineEndpointsClient.GetToken method. +type OnlineEndpointsClientGetTokenOptions struct { // placeholder for future optional parameters } -// ModelContainersClientGetOptions contains the optional parameters for the ModelContainersClient.Get method. -type ModelContainersClientGetOptions struct { +// OnlineEndpointsClientListKeysOptions contains the optional parameters for the OnlineEndpointsClient.ListKeys method. +type OnlineEndpointsClientListKeysOptions struct { // placeholder for future optional parameters } -// ModelContainersClientListOptions contains the optional parameters for the ModelContainersClient.List method. -type ModelContainersClientListOptions struct { - // Maximum number of results to return. +// OnlineEndpointsClientListOptions contains the optional parameters for the OnlineEndpointsClient.NewListPager method. +type OnlineEndpointsClientListOptions struct { + // EndpointComputeType to be filtered by. + ComputeType *EndpointComputeType + // Number of endpoints to be retrieved in a page of results. Count *int32 - // View type for including/excluding (for example) archived entities. - ListViewType *ListViewType + // Name of the endpoint. + Name *string + // The option to order the response. + OrderBy *OrderString + // A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties + // key=value Example: propKey1,propKey2,propKey3=value3 . + Properties *string // Continuation token for pagination. Skip *string + // A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: + // tagKey1,tagKey2,tagKey3=value3 . + Tags *string } -// ModelVersion - Azure Resource Manager resource envelope. -type ModelVersion struct { - // REQUIRED; [Required] Additional attributes of the entity. - Properties *ModelVersionProperties `json:"properties,omitempty"` +// OnlineInferenceConfiguration - Online inference configuration options. +type OnlineInferenceConfiguration struct { + // Additional configurations + Configurations map[string]*string `json:"configurations,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"` + // Entry script or command to invoke. + EntryScript *string `json:"entryScript,omitempty"` - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + // The route to check the liveness of the inference server container. + LivenessRoute *Route `json:"livenessRoute,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // The route to check the readiness of the inference server container. + ReadinessRoute *Route `json:"readinessRoute,omitempty"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` + // The port to send the scoring requests to, within the inference server container. + ScoringRoute *Route `json:"scoringRoute,omitempty"` } -// ModelVersionProperties - Model asset version details. -type ModelVersionProperties struct { - // The asset description text. - Description *string `json:"description,omitempty"` +// OnlineRequestSettings - Online deployment scoring requests configuration. +type OnlineRequestSettings struct { + // The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + MaxConcurrentRequestsPerInstance *int32 `json:"maxConcurrentRequestsPerInstance,omitempty"` - // Mapping of model flavors to their properties. - Flavors map[string]*FlavorData `json:"flavors,omitempty"` + // The maximum amount of time a request will stay in the queue in ISO 8601 format. Defaults to 500ms. + MaxQueueWait *string `json:"maxQueueWait,omitempty"` - // If the name version are system generated (anonymous registration). - IsAnonymous *bool `json:"isAnonymous,omitempty"` + // The scoring timeout in ISO 8601 format. Defaults to 5000ms. + RequestTimeout *string `json:"requestTimeout,omitempty"` +} - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` +// OnlineScaleSettingsClassification provides polymorphic access to related types. +// Call the interface's GetOnlineScaleSettings() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *DefaultScaleSettings, *OnlineScaleSettings, *TargetUtilizationScaleSettings +type OnlineScaleSettingsClassification interface { + // GetOnlineScaleSettings returns the OnlineScaleSettings content of the underlying type. + GetOnlineScaleSettings() *OnlineScaleSettings +} - // Name of the training job which produced this model - JobName *string `json:"jobName,omitempty"` +// OnlineScaleSettings - Online deployment scaling configuration. +type OnlineScaleSettings struct { + // REQUIRED; [Required] Type of deployment scaling algorithm + ScaleType *ScaleType `json:"scaleType,omitempty"` +} - // The storage format for this entity. Used for NCD. - ModelType *string `json:"modelType,omitempty"` +// GetOnlineScaleSettings implements the OnlineScaleSettingsClassification interface for type OnlineScaleSettings. +func (o *OnlineScaleSettings) GetOnlineScaleSettings() *OnlineScaleSettings { return o } + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// OutputPathAssetReference - Reference to an asset via its path in a job output. +type OutputPathAssetReference struct { + // REQUIRED; [Required] Specifies the type of asset reference. + ReferenceType *ReferenceType `json:"referenceType,omitempty"` - // The URI path to the model contents. - ModelURI *string `json:"modelUri,omitempty"` + // ARM resource ID of the job. + JobID *string `json:"jobId,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // The path of the file/directory in the job output. + Path *string `json:"path,omitempty"` +} - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` +// GetAssetReferenceBase implements the AssetReferenceBaseClassification interface for type OutputPathAssetReference. +func (o *OutputPathAssetReference) GetAssetReferenceBase() *AssetReferenceBase { + return &AssetReferenceBase{ + ReferenceType: o.ReferenceType, + } } -// ModelVersionResourceArmPaginatedResult - A paginated list of ModelVersion entities. -type ModelVersionResourceArmPaginatedResult struct { - // The link to the next page of ModelVersion objects. If null, there are no additional pages. - NextLink *string `json:"nextLink,omitempty"` +type PATAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` - // An array of objects of type ModelVersion. - Value []*ModelVersion `json:"value,omitempty"` -} + // Category of the connection + Category *ConnectionCategory `json:"category,omitempty"` + Credentials *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` -// ModelVersionsClientCreateOrUpdateOptions contains the optional parameters for the ModelVersionsClient.CreateOrUpdate method. -type ModelVersionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` } -// ModelVersionsClientDeleteOptions contains the optional parameters for the ModelVersionsClient.Delete method. -type ModelVersionsClientDeleteOptions struct { - // placeholder for future optional parameters +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type PATAuthTypeWorkspaceConnectionProperties. +func (p *PATAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: p.AuthType, + Category: p.Category, + Target: p.Target, + Value: p.Value, + ValueFormat: p.ValueFormat, + } } -// ModelVersionsClientGetOptions contains the optional parameters for the ModelVersionsClient.Get method. -type ModelVersionsClientGetOptions struct { - // placeholder for future optional parameters +// PackageInputPathBaseClassification provides polymorphic access to related types. +// Call the interface's GetPackageInputPathBase() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *PackageInputPathBase, *PackageInputPathID, *PackageInputPathURL, *PackageInputPathVersion +type PackageInputPathBaseClassification interface { + // GetPackageInputPathBase returns the PackageInputPathBase content of the underlying type. + GetPackageInputPathBase() *PackageInputPathBase } -// ModelVersionsClientListOptions contains the optional parameters for the ModelVersionsClient.List method. -type ModelVersionsClientListOptions struct { - // Model description. - Description *string - // Name of the feed. - Feed *string - // View type for including/excluding (for example) archived entities. - ListViewType *ListViewType - // Number of initial results to skip. - Offset *int32 - // Ordering of list. - OrderBy *string - // Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 - Properties *string - // Continuation token for pagination. - Skip *string - // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 - Tags *string - // Maximum number of records to return. - Top *int32 - // Model version. - Version *string +type PackageInputPathBase struct { + // REQUIRED; [Required] Input path type for package inputs. + InputPathType *InputPathType `json:"inputPathType,omitempty"` } -// Mpi - MPI distribution configuration. -type Mpi struct { - // REQUIRED; [Required] Specifies the type of distribution framework. - DistributionType *DistributionType `json:"distributionType,omitempty"` +// GetPackageInputPathBase implements the PackageInputPathBaseClassification interface for type PackageInputPathBase. +func (p *PackageInputPathBase) GetPackageInputPathBase() *PackageInputPathBase { return p } - // Number of processes per MPI node. - ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` +// PackageInputPathID - Package input path specified with a resource id. +type PackageInputPathID struct { + // REQUIRED; [Required] Input path type for package inputs. + InputPathType *InputPathType `json:"inputPathType,omitempty"` + + // Input resource id. + ResourceID *string `json:"resourceId,omitempty"` } -// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type Mpi. -func (m *Mpi) GetDistributionConfiguration() *DistributionConfiguration { - return &DistributionConfiguration{ - DistributionType: m.DistributionType, +// GetPackageInputPathBase implements the PackageInputPathBaseClassification interface for type PackageInputPathID. +func (p *PackageInputPathID) GetPackageInputPathBase() *PackageInputPathBase { + return &PackageInputPathBase{ + InputPathType: p.InputPathType, } } -// 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 -} +// PackageInputPathURL - Package input path specified as an url. +type PackageInputPathURL struct { + // REQUIRED; [Required] Input path type for package inputs. + InputPathType *InputPathType `json:"inputPathType,omitempty"` -// NCrossValidations - N-Cross validations value. -type NCrossValidations struct { - // REQUIRED; [Required] Mode for determining N-Cross validations. - Mode *NCrossValidationsMode `json:"mode,omitempty"` + // Input path url. + URL *string `json:"url,omitempty"` } -// GetNCrossValidations implements the NCrossValidationsClassification interface for type NCrossValidations. -func (n *NCrossValidations) GetNCrossValidations() *NCrossValidations { return n } +// GetPackageInputPathBase implements the PackageInputPathBaseClassification interface for type PackageInputPathURL. +func (p *PackageInputPathURL) GetPackageInputPathBase() *PackageInputPathBase { + return &PackageInputPathBase{ + InputPathType: p.InputPathType, + } +} -// 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"` +// PackageInputPathVersion - Package input path specified with name and version. +type PackageInputPathVersion struct { + // REQUIRED; [Required] Input path type for package inputs. + InputPathType *InputPathType `json:"inputPathType,omitempty"` - // Execution constraints for AutoMLJob. - LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` + // Input resource name. + ResourceName *string `json:"resourceName,omitempty"` - // Validation data inputs. - ValidationData *MLTableJobInput `json:"validationData,omitempty"` + // Input resource version. + ResourceVersion *string `json:"resourceVersion,omitempty"` } -type NlpVerticalFeaturizationSettings struct { - // Dataset language, useful for the text data. - DatasetLanguage *string `json:"datasetLanguage,omitempty"` +// GetPackageInputPathBase implements the PackageInputPathBaseClassification interface for type PackageInputPathVersion. +func (p *PackageInputPathVersion) GetPackageInputPathBase() *PackageInputPathBase { + return &PackageInputPathBase{ + InputPathType: p.InputPathType, + } } -// 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"` +// PackageRequest - Model package operation request properties. +type PackageRequest struct { + // REQUIRED; [Required] Inferencing server configurations. + InferencingServer InferencingServerClassification `json:"inferencingServer,omitempty"` - // AutoML job timeout. - Timeout *string `json:"timeout,omitempty"` -} + // REQUIRED; [Required] Target environment name to be generated by package. + TargetEnvironmentName *string `json:"targetEnvironmentName,omitempty"` -// NodeStateCounts - Counts of various compute node states on the amlCompute. -type NodeStateCounts struct { - // READ-ONLY; Number of compute nodes in idle state. - IdleNodeCount *int32 `json:"idleNodeCount,omitempty" azure:"ro"` + // Base environment to start with. + BaseEnvironmentSource BaseEnvironmentSourceClassification `json:"baseEnvironmentSource,omitempty"` - // READ-ONLY; Number of compute nodes which are leaving the amlCompute. - LeavingNodeCount *int32 `json:"leavingNodeCount,omitempty" azure:"ro"` + // Collection of environment variables. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` - // READ-ONLY; Number of compute nodes which are in preempted state. - PreemptedNodeCount *int32 `json:"preemptedNodeCount,omitempty" azure:"ro"` + // Collection of inputs. + Inputs []*ModelPackageInput `json:"inputs,omitempty"` - // READ-ONLY; Number of compute nodes which are being prepared. - PreparingNodeCount *int32 `json:"preparingNodeCount,omitempty" azure:"ro"` + // Model configuration including the mount mode. + ModelConfiguration *ModelConfiguration `json:"modelConfiguration,omitempty"` - // READ-ONLY; Number of compute nodes which are running jobs. - RunningNodeCount *int32 `json:"runningNodeCount,omitempty" azure:"ro"` + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` - // READ-ONLY; Number of compute nodes which are in unusable state. - UnusableNodeCount *int32 `json:"unusableNodeCount,omitempty" azure:"ro"` + // Target environment version to be generated by package. + TargetEnvironmentVersion *string `json:"targetEnvironmentVersion,omitempty"` } -type NoneAuthTypeWorkspaceConnectionProperties struct { - // REQUIRED; Authentication type of the connection target - AuthType *ConnectionAuthType `json:"authType,omitempty"` +// PackageResponse - Package response returned after async package operation completes successfully. +type PackageResponse struct { + // READ-ONLY; Base environment to start with. + BaseEnvironmentSource BaseEnvironmentSourceClassification `json:"baseEnvironmentSource,omitempty" azure:"ro"` - // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` - Target *string `json:"target,omitempty"` + // READ-ONLY; Build id of the image build operation. + BuildID *string `json:"buildId,omitempty" azure:"ro"` - // Value details of the workspace connection. - Value *string `json:"value,omitempty"` + // READ-ONLY; Build state of the image build operation. + BuildState *PackageBuildState `json:"buildState,omitempty" azure:"ro"` - // format for the workspace connection value - ValueFormat *ValueFormat `json:"valueFormat,omitempty"` -} + // READ-ONLY; Collection of environment variables. + EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty" azure:"ro"` -// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type NoneAuthTypeWorkspaceConnectionProperties. -func (n *NoneAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { - return &WorkspaceConnectionPropertiesV2{ - AuthType: n.AuthType, - Category: n.Category, - Target: n.Target, - Value: n.Value, - ValueFormat: n.ValueFormat, - } -} + // READ-ONLY; Inferencing server configurations. + InferencingServer InferencingServerClassification `json:"inferencingServer,omitempty" azure:"ro"` -// NoneDatastoreCredentials - Empty/none datastore credentials. -type NoneDatastoreCredentials struct { - // REQUIRED; [Required] Credential type used to authentication with storage. - CredentialsType *CredentialsType `json:"credentialsType,omitempty"` -} + // READ-ONLY; Collection of inputs. + Inputs []*ModelPackageInput `json:"inputs,omitempty" azure:"ro"` -// GetDatastoreCredentials implements the DatastoreCredentialsClassification interface for type NoneDatastoreCredentials. -func (n *NoneDatastoreCredentials) GetDatastoreCredentials() *DatastoreCredentials { - return &DatastoreCredentials{ - CredentialsType: n.CredentialsType, - } -} + // READ-ONLY; Log url of the image build operation. + LogURL *string `json:"logUrl,omitempty" azure:"ro"` -type NotebookAccessTokenResult struct { - // READ-ONLY - AccessToken *string `json:"accessToken,omitempty" azure:"ro"` + // READ-ONLY; Model configuration including the mount mode. + ModelConfiguration *ModelConfiguration `json:"modelConfiguration,omitempty" azure:"ro"` - // READ-ONLY - ExpiresIn *int32 `json:"expiresIn,omitempty" azure:"ro"` + // READ-ONLY; Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty" azure:"ro"` - // READ-ONLY - HostName *string `json:"hostName,omitempty" azure:"ro"` + // READ-ONLY; Asset ID of the target environment created by package operation. + TargetEnvironmentID *string `json:"targetEnvironmentId,omitempty" azure:"ro"` - // READ-ONLY - NotebookResourceID *string `json:"notebookResourceId,omitempty" azure:"ro"` + // READ-ONLY; Target environment name to be generated by package. + TargetEnvironmentName *string `json:"targetEnvironmentName,omitempty" azure:"ro"` - // READ-ONLY - PublicDNS *string `json:"publicDns,omitempty" azure:"ro"` + // READ-ONLY; Target environment version to be generated by package. + TargetEnvironmentVersion *string `json:"targetEnvironmentVersion,omitempty" azure:"ro"` +} - // READ-ONLY - RefreshToken *string `json:"refreshToken,omitempty" azure:"ro"` +// PaginatedComputeResourcesList - Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. +type PaginatedComputeResourcesList struct { + // A continuation link (absolute URI) to the next page of results in the list. + NextLink *string `json:"nextLink,omitempty"` - // READ-ONLY - Scope *string `json:"scope,omitempty" azure:"ro"` + // An array of Machine Learning compute objects wrapped in ARM resource envelope. + Value []*ComputeResource `json:"value,omitempty"` +} - // READ-ONLY - TokenType *string `json:"tokenType,omitempty" azure:"ro"` +// PartialBatchDeployment - Mutable batch inference settings per deployment. +type PartialBatchDeployment struct { + // Description of the endpoint deployment. + Description *string `json:"description,omitempty"` } -type NotebookPreparationError struct { - ErrorMessage *string `json:"errorMessage,omitempty"` - StatusCode *int32 `json:"statusCode,omitempty"` +// PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties - Strictly used in update requests. +type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties struct { + // Additional attributes of the entity. + Properties *PartialBatchDeployment `json:"properties,omitempty"` + + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` } -type NotebookResourceInfo struct { - Fqdn *string `json:"fqdn,omitempty"` +// PartialManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) +type PartialManagedServiceIdentity struct { + // Managed service identity (system assigned and/or user assigned identities) + Type *ManagedServiceIdentityType `json:"type,omitempty"` - // The error that occurs when preparing notebook. - NotebookPreparationError *NotebookPreparationError `json:"notebookPreparationError,omitempty"` + // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + // resource ids in the form: + // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + // The dictionary values can be empty objects ({}) in + // requests. + UserAssignedIdentities map[string]any `json:"userAssignedIdentities,omitempty"` +} - // the data plane resourceId that used to initialize notebook component - ResourceID *string `json:"resourceId,omitempty"` +// PartialMinimalTrackedResource - Strictly used in update requests. +type PartialMinimalTrackedResource struct { + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` } -// Objective - Optimization objective. -type Objective struct { - // REQUIRED; [Required] Defines supported metric goals for hyperparameter tuning - Goal *Goal `json:"goal,omitempty"` +// PartialMinimalTrackedResourceWithIdentity - Strictly used in update requests. +type PartialMinimalTrackedResourceWithIdentity struct { + // Managed service identity (system assigned and/or user assigned identities) + Identity *PartialManagedServiceIdentity `json:"identity,omitempty"` - // REQUIRED; [Required] Name of the metric to optimize. - PrimaryMetric *string `json:"primaryMetric,omitempty"` + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` } -type OnlineDeployment struct { - // REQUIRED; The geo-location where the resource lives - Location *string `json:"location,omitempty"` +// PartialMinimalTrackedResourceWithSKU - Strictly used in update requests. +type PartialMinimalTrackedResourceWithSKU struct { + // Sku details required for ARM contract for Autoscaling. + SKU *PartialSKU `json:"sku,omitempty"` - // REQUIRED; [Required] Additional attributes of the entity. - Properties OnlineDeploymentPropertiesClassification `json:"properties,omitempty"` + // Resource tags. + Tags map[string]*string `json:"tags,omitempty"` +} +// PartialRegistryPartialTrackedResource - Strictly used in update requests. +type PartialRegistryPartialTrackedResource struct { // Managed service identity (system assigned and/or user assigned identities) - Identity *ManagedServiceIdentity `json:"identity,omitempty"` + Identity *PartialManagedServiceIdentity `json:"identity,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. Kind *string `json:"kind,omitempty"` + // Additional attributes of the entity. + Properties any `json:"properties,omitempty"` + // Sku details required for ARM contract for Autoscaling. - SKU *SKU `json:"sku,omitempty"` + SKU *PartialSKU `json:"sku,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` +} - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` +// PartialSKU - Common SKU definition. +type PartialSKU struct { + // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + // resource this may be omitted. + Capacity *int32 `json:"capacity,omitempty"` - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` + // If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string `json:"family,omitempty"` - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` + // The name of the SKU. Ex - P3. It is typically a letter+number code. + Name *string `json:"name,omitempty"` - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` -} + // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + Size *string `json:"size,omitempty"` -// OnlineDeploymentPropertiesClassification provides polymorphic access to related types. -// Call the interface's GetOnlineDeploymentProperties() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *KubernetesOnlineDeployment, *ManagedOnlineDeployment, *OnlineDeploymentProperties -type OnlineDeploymentPropertiesClassification interface { - // GetOnlineDeploymentProperties returns the OnlineDeploymentProperties content of the underlying type. - GetOnlineDeploymentProperties() *OnlineDeploymentProperties + // This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + // on a PUT. + Tier *SKUTier `json:"tier,omitempty"` } -type OnlineDeploymentProperties struct { - // REQUIRED; [Required] The compute type of the endpoint. - EndpointComputeType *EndpointComputeType `json:"endpointComputeType,omitempty"` - - // If true, enables Application Insights logging. - AppInsightsEnabled *bool `json:"appInsightsEnabled,omitempty"` +type Password struct { + // READ-ONLY + Name *string `json:"name,omitempty" azure:"ro"` - // Code configuration for the endpoint deployment. - CodeConfiguration *CodeConfiguration `json:"codeConfiguration,omitempty"` + // READ-ONLY + Value *string `json:"value,omitempty" azure:"ro"` +} - // Description of the endpoint deployment. - Description *string `json:"description,omitempty"` +// PersonalComputeInstanceSettings - Settings for a personal compute instance. +type PersonalComputeInstanceSettings struct { + // A user explicitly assigned to a personal compute instance. + AssignedUser *AssignedUser `json:"assignedUser,omitempty"` +} - // If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - EgressPublicNetworkAccess *EgressPublicNetworkAccessType `json:"egressPublicNetworkAccess,omitempty"` +// PipelineJob - Pipeline Job definition: defines generic to MFE attributes. +type PipelineJob struct { + // REQUIRED; [Required] Specifies the type of job. + JobType *JobType `json:"jobType,omitempty"` - // ARM resource ID or AssetId of the environment specification for the endpoint deployment. - EnvironmentID *string `json:"environmentId,omitempty"` + // ARM resource ID of the component resource. + ComponentID *string `json:"componentId,omitempty"` - // Environment variables configuration for the deployment. - EnvironmentVariables map[string]*string `json:"environmentVariables,omitempty"` + // ARM resource ID of the compute resource. + ComputeID *string `json:"computeId,omitempty"` - // Compute instance type. - InstanceType *string `json:"instanceType,omitempty"` + // The asset description text. + Description *string `json:"description,omitempty"` - // Liveness probe monitors the health of the container regularly. - LivenessProbe *ProbeSettings `json:"livenessProbe,omitempty"` + // Display name of job. + DisplayName *string `json:"displayName,omitempty"` - // The URI path to the model. - Model *string `json:"model,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"` - // The path to mount the model in custom container. - ModelMountPath *string `json:"modelMountPath,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"` - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` + // Inputs for the pipeline job. + Inputs map[string]JobInputClassification `json:"inputs,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"` + // Is the asset archived? + IsArchived *bool `json:"isArchived,omitempty"` - // Request settings for the deployment. - RequestSettings *OnlineRequestSettings `json:"requestSettings,omitempty"` + // Jobs construct the Pipeline Job. + Jobs map[string]any `json:"jobs,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"` + // Notification setting for the job + NotificationSetting *NotificationSetting `json:"notificationSetting,omitempty"` - // READ-ONLY; Provisioning state for the endpoint deployment. - ProvisioningState *DeploymentProvisioningState `json:"provisioningState,omitempty" azure:"ro"` -} + // Outputs for the pipeline job + Outputs map[string]JobOutputClassification `json:"outputs,omitempty"` -// GetOnlineDeploymentProperties implements the OnlineDeploymentPropertiesClassification interface for type OnlineDeploymentProperties. -func (o *OnlineDeploymentProperties) GetOnlineDeploymentProperties() *OnlineDeploymentProperties { - return o -} + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` -// OnlineDeploymentTrackedResourceArmPaginatedResult - A paginated list of OnlineDeployment entities. -type OnlineDeploymentTrackedResourceArmPaginatedResult struct { - // The link to the next page of OnlineDeployment objects. If null, there are no additional pages. - NextLink *string `json:"nextLink,omitempty"` + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + Services map[string]*JobService `json:"services,omitempty"` - // An array of objects of type OnlineDeployment. - Value []*OnlineDeployment `json:"value,omitempty"` -} + // Pipeline settings, for things like ContinueRunOnStepFailure etc. + Settings any `json:"settings,omitempty"` -// OnlineDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginCreateOrUpdate -// method. -type OnlineDeploymentsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // ARM resource ID of source job. + SourceJobID *string `json:"sourceJobId,omitempty"` -// OnlineDeploymentsClientBeginDeleteOptions contains the optional parameters for the OnlineDeploymentsClient.BeginDelete -// method. -type OnlineDeploymentsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` -// OnlineDeploymentsClientBeginUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginUpdate -// method. -type OnlineDeploymentsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // READ-ONLY; Status of the job. + Status *JobStatus `json:"status,omitempty" azure:"ro"` } -// OnlineDeploymentsClientGetLogsOptions contains the optional parameters for the OnlineDeploymentsClient.GetLogs method. -type OnlineDeploymentsClientGetLogsOptions struct { - // placeholder for future optional parameters +// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type PipelineJob. +func (p *PipelineJob) GetJobBaseProperties() *JobBaseProperties { + return &JobBaseProperties{ + ComponentID: p.ComponentID, + ComputeID: p.ComputeID, + DisplayName: p.DisplayName, + ExperimentName: p.ExperimentName, + Identity: p.Identity, + IsArchived: p.IsArchived, + JobType: p.JobType, + NotificationSetting: p.NotificationSetting, + Services: p.Services, + Status: p.Status, + Description: p.Description, + Properties: p.Properties, + Tags: p.Tags, + } } -// OnlineDeploymentsClientGetOptions contains the optional parameters for the OnlineDeploymentsClient.Get method. -type OnlineDeploymentsClientGetOptions struct { - // placeholder for future optional parameters -} +// PrivateEndpoint - The Private Endpoint resource. +type PrivateEndpoint struct { + // READ-ONLY; The ARM identifier for Private Endpoint + ID *string `json:"id,omitempty" azure:"ro"` -// OnlineDeploymentsClientListOptions contains the optional parameters for the OnlineDeploymentsClient.List method. -type OnlineDeploymentsClientListOptions struct { - // Ordering of list. - OrderBy *string - // Continuation token for pagination. - Skip *string - // Top of list. - Top *int32 + // READ-ONLY; The ARM identifier for Subnet resource that private endpoint links to + SubnetArmID *string `json:"subnetArmId,omitempty" azure:"ro"` } -// OnlineDeploymentsClientListSKUsOptions contains the optional parameters for the OnlineDeploymentsClient.ListSKUs method. -type OnlineDeploymentsClientListSKUsOptions struct { - // Number of Skus to be retrieved in a page of results. - Count *int32 - // Continuation token for pagination. - Skip *string -} +// PrivateEndpointConnection - The Private Endpoint Connection resource. +type PrivateEndpointConnection struct { + // The identity of the resource. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` -type OnlineEndpoint struct { - // REQUIRED; The geo-location where the resource lives + // Specifies the location of the resource. Location *string `json:"location,omitempty"` - // REQUIRED; [Required] Additional attributes of the entity. - Properties *OnlineEndpointProperties `json:"properties,omitempty"` - - // Managed service identity (system assigned and/or user assigned identities) - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - Kind *string `json:"kind,omitempty"` + // Resource properties. + Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` - // Sku details required for ARM contract for Autoscaling. + // The sku of the workspace. SKU *SKU `json:"sku,omitempty"` - // Resource tags. + // Contains resource tags defined as key/value pairs. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -6017,384 +8317,339 @@ type OnlineEndpoint struct { Type *string `json:"type,omitempty" azure:"ro"` } -// OnlineEndpointProperties - Online endpoint configuration -type OnlineEndpointProperties struct { - // REQUIRED; [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. - // 'Key' doesn't expire but 'AMLToken' does. - AuthMode *EndpointAuthMode `json:"authMode,omitempty"` - - // ARM resource ID of the compute if it exists. optional - Compute *string `json:"compute,omitempty"` - - // Description of the inference endpoint. - Description *string `json:"description,omitempty"` - - // EndpointAuthKeys to set initially on an Endpoint. This property will always be returned as null. AuthKey values must be - // retrieved using the ListKeys API. - Keys *EndpointAuthKeys `json:"keys,omitempty"` - - // Property dictionary. Properties can be added, but not removed or altered. - Properties map[string]*string `json:"properties,omitempty"` - - // Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. - PublicNetworkAccess *PublicNetworkAccessType `json:"publicNetworkAccess,omitempty"` - - // Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. - Traffic map[string]*int32 `json:"traffic,omitempty"` - - // READ-ONLY; Provisioning state for the endpoint. - ProvisioningState *EndpointProvisioningState `json:"provisioningState,omitempty" azure:"ro"` - - // READ-ONLY; Endpoint URI. - ScoringURI *string `json:"scoringUri,omitempty" azure:"ro"` - - // READ-ONLY; Endpoint Swagger URI. - SwaggerURI *string `json:"swaggerUri,omitempty" azure:"ro"` -} - -// OnlineEndpointTrackedResourceArmPaginatedResult - A paginated list of OnlineEndpoint entities. -type OnlineEndpointTrackedResourceArmPaginatedResult struct { - // The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. - NextLink *string `json:"nextLink,omitempty"` - - // An array of objects of type OnlineEndpoint. - Value []*OnlineEndpoint `json:"value,omitempty"` -} - -// OnlineEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginCreateOrUpdate -// method. -type OnlineEndpointsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OnlineEndpointsClientBeginDeleteOptions contains the optional parameters for the OnlineEndpointsClient.BeginDelete method. -type OnlineEndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// OnlineEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the OnlineEndpointsClient.BeginRegenerateKeys -// method. -type OnlineEndpointsClientBeginRegenerateKeysOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string +// PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified workspace +type PrivateEndpointConnectionListResult struct { + // Array of private endpoint connections + Value []*PrivateEndpointConnection `json:"value,omitempty"` } -// OnlineEndpointsClientBeginUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginUpdate method. -type OnlineEndpointsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string +// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // REQUIRED; A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + + // The resource of private end point. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + + // READ-ONLY; The provisioning state of the private endpoint connection resource. + ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// OnlineEndpointsClientGetOptions contains the optional parameters for the OnlineEndpointsClient.Get method. -type OnlineEndpointsClientGetOptions struct { +// PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate +// method. +type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct { // placeholder for future optional parameters } -// OnlineEndpointsClientGetTokenOptions contains the optional parameters for the OnlineEndpointsClient.GetToken method. -type OnlineEndpointsClientGetTokenOptions struct { +// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// method. +type PrivateEndpointConnectionsClientDeleteOptions struct { // placeholder for future optional parameters } -// OnlineEndpointsClientListKeysOptions contains the optional parameters for the OnlineEndpointsClient.ListKeys method. -type OnlineEndpointsClientListKeysOptions struct { +// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. +type PrivateEndpointConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// OnlineEndpointsClientListOptions contains the optional parameters for the OnlineEndpointsClient.List method. -type OnlineEndpointsClientListOptions struct { - // EndpointComputeType to be filtered by. - ComputeType *EndpointComputeType - // Number of endpoints to be retrieved in a page of results. - Count *int32 - // Name of the endpoint. - Name *string - // The option to order the response. - OrderBy *OrderString - // A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties - // key=value Example: propKey1,propKey2,propKey3=value3 . - Properties *string - // Continuation token for pagination. - Skip *string - // A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: - // tagKey1,tagKey2,tagKey3=value3 . - Tags *string +// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListPager +// method. +type PrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters } -// OnlineRequestSettings - Online deployment scoring requests configuration. -type OnlineRequestSettings struct { - // The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. - MaxConcurrentRequestsPerInstance *int32 `json:"maxConcurrentRequestsPerInstance,omitempty"` - - // The maximum amount of time a request will stay in the queue in ISO 8601 format. Defaults to 500ms. - MaxQueueWait *string `json:"maxQueueWait,omitempty"` +// PrivateLinkResource - A private link resource +type PrivateLinkResource struct { + // The identity of the resource. + Identity *ManagedServiceIdentity `json:"identity,omitempty"` - // The scoring timeout in ISO 8601 format. Defaults to 5000ms. - RequestTimeout *string `json:"requestTimeout,omitempty"` -} + // Specifies the location of the resource. + Location *string `json:"location,omitempty"` -// OnlineScaleSettingsClassification provides polymorphic access to related types. -// Call the interface's GetOnlineScaleSettings() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *DefaultScaleSettings, *OnlineScaleSettings, *TargetUtilizationScaleSettings -type OnlineScaleSettingsClassification interface { - // GetOnlineScaleSettings returns the OnlineScaleSettings content of the underlying type. - GetOnlineScaleSettings() *OnlineScaleSettings -} + // Resource properties. + Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` -// OnlineScaleSettings - Online deployment scaling configuration. -type OnlineScaleSettings struct { - // REQUIRED; [Required] Type of deployment scaling algorithm - ScaleType *ScaleType `json:"scaleType,omitempty"` -} + // The sku of the workspace. + SKU *SKU `json:"sku,omitempty"` -// GetOnlineScaleSettings implements the OnlineScaleSettingsClassification interface for type OnlineScaleSettings. -func (o *OnlineScaleSettings) GetOnlineScaleSettings() *OnlineScaleSettings { return o } + // Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags,omitempty"` -// OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty" azure:"ro"` -// OutputPathAssetReference - Reference to an asset via its path in a job output. -type OutputPathAssetReference struct { - // REQUIRED; [Required] Specifies the type of asset reference. - ReferenceType *ReferenceType `json:"referenceType,omitempty"` + // READ-ONLY; The name of the resource + Name *string `json:"name,omitempty" azure:"ro"` - // ARM resource ID of the job. - JobID *string `json:"jobId,omitempty"` + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` - // The path of the file/directory in the job output. - Path *string `json:"path,omitempty"` + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty" azure:"ro"` } -// GetAssetReferenceBase implements the AssetReferenceBaseClassification interface for type OutputPathAssetReference. -func (o *OutputPathAssetReference) GetAssetReferenceBase() *AssetReferenceBase { - return &AssetReferenceBase{ - ReferenceType: o.ReferenceType, - } +// PrivateLinkResourceListResult - A list of private link resources +type PrivateLinkResourceListResult struct { + // Array of private link resources + Value []*PrivateLinkResource `json:"value,omitempty"` } -type PATAuthTypeWorkspaceConnectionProperties struct { - // REQUIRED; Authentication type of the connection target - AuthType *ConnectionAuthType `json:"authType,omitempty"` - - // Category of the connection - Category *ConnectionCategory `json:"category,omitempty"` - Credentials *WorkspaceConnectionPersonalAccessToken `json:"credentials,omitempty"` - Target *string `json:"target,omitempty"` +// PrivateLinkResourceProperties - Properties of a private link resource. +type PrivateLinkResourceProperties struct { + // The private link resource Private link DNS zone name. + RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` - // Value details of the workspace connection. - Value *string `json:"value,omitempty"` + // READ-ONLY; The private link resource group id. + GroupID *string `json:"groupId,omitempty" azure:"ro"` - // format for the workspace connection value - ValueFormat *ValueFormat `json:"valueFormat,omitempty"` + // READ-ONLY; The private link resource required member names. + RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` } -// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type PATAuthTypeWorkspaceConnectionProperties. -func (p *PATAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { - return &WorkspaceConnectionPropertiesV2{ - AuthType: p.AuthType, - Category: p.Category, - Target: p.Target, - Value: p.Value, - ValueFormat: p.ValueFormat, - } +// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. +type PrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters } -// PaginatedComputeResourcesList - Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. -type PaginatedComputeResourcesList struct { - // A continuation link (absolute URI) to the next page of results in the list. - NextLink *string `json:"nextLink,omitempty"` - - // An array of Machine Learning compute objects wrapped in ARM resource envelope. - Value []*ComputeResource `json:"value,omitempty"` -} +// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer +// and provider. +type PrivateLinkServiceConnectionState struct { + // A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string `json:"actionsRequired,omitempty"` -// PartialBatchDeployment - Mutable batch inference settings per deployment. -type PartialBatchDeployment struct { - // Description of the endpoint deployment. + // The reason for approval/rejection of the connection. Description *string `json:"description,omitempty"` + + // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` } -// PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties - Strictly used in update requests. -type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties struct { - // Additional attributes of the entity. - Properties *PartialBatchDeployment `json:"properties,omitempty"` +// ProbeSettings - Deployment container liveness/readiness probe configuration. +type ProbeSettings struct { + // The number of failures to allow before returning an unhealthy status. + FailureThreshold *int32 `json:"failureThreshold,omitempty"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` -} + // The delay before the first probe in ISO 8601 format. + InitialDelay *string `json:"initialDelay,omitempty"` -// PartialManagedServiceIdentity - Managed service identity (system assigned and/or user assigned identities) -type PartialManagedServiceIdentity struct { - // Managed service identity (system assigned and/or user assigned identities) - Type *ManagedServiceIdentityType `json:"type,omitempty"` + // The length of time between probes in ISO 8601 format. + Period *string `json:"period,omitempty"` - // The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM - // resource ids in the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - // The dictionary values can be empty objects ({}) in - // requests. - UserAssignedIdentities map[string]interface{} `json:"userAssignedIdentities,omitempty"` -} + // The number of successful probes before returning a healthy status. + SuccessThreshold *int32 `json:"successThreshold,omitempty"` -// PartialMinimalTrackedResource - Strictly used in update requests. -type PartialMinimalTrackedResource struct { - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + // The probe timeout in ISO 8601 format. + Timeout *string `json:"timeout,omitempty"` } -// PartialMinimalTrackedResourceWithIdentity - Strictly used in update requests. -type PartialMinimalTrackedResourceWithIdentity struct { - // Managed service identity (system assigned and/or user assigned identities) - Identity *PartialManagedServiceIdentity `json:"identity,omitempty"` +// ProgressMetrics - Progress metrics definition +type ProgressMetrics struct { + // READ-ONLY; The completed datapoint count. + CompletedDatapointCount *int64 `json:"completedDatapointCount,omitempty" azure:"ro"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + // 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"` } -// PartialMinimalTrackedResourceWithSKU - Strictly used in update requests. -type PartialMinimalTrackedResourceWithSKU struct { - // Sku details required for ARM contract for Autoscaling. - SKU *PartialSKU `json:"sku,omitempty"` +// PyTorch distribution configuration. +type PyTorch struct { + // REQUIRED; [Required] Specifies the type of distribution framework. + DistributionType *DistributionType `json:"distributionType,omitempty"` - // Resource tags. - Tags map[string]*string `json:"tags,omitempty"` + // Number of processes per node. + ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` } -// PartialSKU - Common SKU definition. -type PartialSKU struct { - // If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - // resource this may be omitted. - Capacity *int32 `json:"capacity,omitempty"` +// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type PyTorch. +func (p *PyTorch) GetDistributionConfiguration() *DistributionConfiguration { + return &DistributionConfiguration{ + DistributionType: p.DistributionType, + } +} - // If the service has different generations of hardware, for the same SKU, then that can be captured here. - Family *string `json:"family,omitempty"` +type QueueSettings struct { + // Enum to determine the job tier. + JobTier *JobTier `json:"jobTier,omitempty"` - // The name of the SKU. Ex - P3. It is typically a letter+number code. - Name *string `json:"name,omitempty"` + // Controls the priority of the job on a compute. + Priority *int32 `json:"priority,omitempty"` +} - // The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - Size *string `json:"size,omitempty"` +// QuotaBaseProperties - The properties for Quota update or retrieval. +type QuotaBaseProperties struct { + // Specifies the resource ID. + ID *string `json:"id,omitempty"` + + // The maximum permitted quota of the resource. + Limit *int64 `json:"limit,omitempty"` + + // Specifies the resource type. + Type *string `json:"type,omitempty"` - // This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - // on a PUT. - Tier *SKUTier `json:"tier,omitempty"` + // An enum describing the unit of quota measurement. + Unit *QuotaUnit `json:"unit,omitempty"` } -type Password struct { - // READ-ONLY - Name *string `json:"name,omitempty" azure:"ro"` +// QuotaUpdateParameters - Quota update parameters. +type QuotaUpdateParameters struct { + // Region of workspace quota to be updated. + Location *string `json:"location,omitempty"` - // READ-ONLY - Value *string `json:"value,omitempty" azure:"ro"` + // The list for update quota. + Value []*QuotaBaseProperties `json:"value,omitempty"` } -// PersonalComputeInstanceSettings - Settings for a personal compute instance. -type PersonalComputeInstanceSettings struct { - // A user explicitly assigned to a personal compute instance. - AssignedUser *AssignedUser `json:"assignedUser,omitempty"` +// QuotasClientListOptions contains the optional parameters for the QuotasClient.NewListPager method. +type QuotasClientListOptions struct { + // placeholder for future optional parameters } -// PipelineJob - Pipeline Job definition: defines generic to MFE attributes. -type PipelineJob struct { - // REQUIRED; [Required] Specifies the type of job. - JobType *JobType `json:"jobType,omitempty"` +// QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. +type QuotasClientUpdateOptions struct { + // placeholder for future optional parameters +} - // ARM resource ID of the component resource. - ComponentID *string `json:"componentId,omitempty"` +// RandomSamplingAlgorithm - Defines a Sampling Algorithm that generates values randomly +type RandomSamplingAlgorithm struct { + // REQUIRED; [Required] The algorithm used for generating hyperparameter values, along with configuration properties + SamplingAlgorithmType *SamplingAlgorithmType `json:"samplingAlgorithmType,omitempty"` - // ARM resource ID of the compute resource. - ComputeID *string `json:"computeId,omitempty"` + // An optional positive number or e in string format to be used as base for log based random sampling + Logbase *string `json:"logbase,omitempty"` - // The asset description text. - Description *string `json:"description,omitempty"` + // The specific type of random algorithm + Rule *RandomSamplingAlgorithmRule `json:"rule,omitempty"` - // Display name of job. - DisplayName *string `json:"displayName,omitempty"` + // An optional integer to use as the seed for random number generation + Seed *int32 `json:"seed,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"` +// GetSamplingAlgorithm implements the SamplingAlgorithmClassification interface for type RandomSamplingAlgorithm. +func (r *RandomSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { + return &SamplingAlgorithm{ + SamplingAlgorithmType: r.SamplingAlgorithmType, + } +} - // Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. Defaults to AmlToken - // if null. - Identity IdentityConfigurationClassification `json:"identity,omitempty"` +type RecurrenceSchedule struct { + // REQUIRED; [Required] List of hours for the schedule. + Hours []*int32 `json:"hours,omitempty"` - // Inputs for the pipeline job. - Inputs map[string]JobInputClassification `json:"inputs,omitempty"` + // REQUIRED; [Required] List of minutes for the schedule. + Minutes []*int32 `json:"minutes,omitempty"` - // Is the asset archived? - IsArchived *bool `json:"isArchived,omitempty"` + // List of month days for the schedule + MonthDays []*int32 `json:"monthDays,omitempty"` - // Jobs construct the Pipeline Job. - Jobs map[string]interface{} `json:"jobs,omitempty"` + // List of days for the schedule. + WeekDays []*WeekDay `json:"weekDays,omitempty"` +} - // Outputs for the pipeline job - Outputs map[string]JobOutputClassification `json:"outputs,omitempty"` +type RecurrenceTrigger struct { + // REQUIRED; [Required] The frequency to trigger schedule. + Frequency *RecurrenceFrequency `json:"frequency,omitempty"` - // The asset property dictionary. - Properties map[string]*string `json:"properties,omitempty"` + // REQUIRED; [Required] Specifies schedule interval in conjunction with frequency + Interval *int32 `json:"interval,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] + TriggerType *TriggerType `json:"triggerType,omitempty"` - // Pipeline settings, for things like ContinueRunOnStepFailure etc. - Settings interface{} `json:"settings,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"` - // ARM resource ID of source job. - SourceJobID *string `json:"sourceJobId,omitempty"` + // The recurrence schedule. + Schedule *RecurrenceSchedule `json:"schedule,omitempty"` - // Tag dictionary. Tags can be added, removed, and updated. - Tags map[string]*string `json:"tags,omitempty"` + // Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + StartTime *string `json:"startTime,omitempty"` - // READ-ONLY; Status of the job. - Status *JobStatus `json:"status,omitempty" azure:"ro"` + // 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"` } -// GetJobBaseProperties implements the JobBasePropertiesClassification interface for type PipelineJob. -func (p *PipelineJob) GetJobBaseProperties() *JobBaseProperties { - return &JobBaseProperties{ - ComponentID: p.ComponentID, - ComputeID: p.ComputeID, - DisplayName: p.DisplayName, - ExperimentName: p.ExperimentName, - Identity: p.Identity, - IsArchived: p.IsArchived, - JobType: p.JobType, - Services: p.Services, - Status: p.Status, - Description: p.Description, - Properties: p.Properties, - Tags: p.Tags, +// 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, } } -// PrivateEndpoint - The Private Endpoint resource. -type PrivateEndpoint struct { - // READ-ONLY; The ARM identifier for Private Endpoint - ID *string `json:"id,omitempty" azure:"ro"` +type RegenerateEndpointKeysRequest struct { + // REQUIRED; [Required] Specification for which type of key to generate. Primary or Secondary. + KeyType *KeyType `json:"keyType,omitempty"` - // READ-ONLY; The ARM identifier for Subnet resource that private endpoint links to - SubnetArmID *string `json:"subnetArmId,omitempty" azure:"ro"` + // The value the key is set to. + KeyValue *string `json:"keyValue,omitempty"` } -// PrivateEndpointConnection - The Private Endpoint Connection resource. -type PrivateEndpointConnection struct { - // The identity of the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` +// RegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistriesClient.BeginCreateOrUpdate +// method. +type RegistriesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Specifies the location of the resource. +// RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method. +type RegistriesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistriesClientBeginUpdateOptions contains the optional parameters for the RegistriesClient.BeginUpdate method. +type RegistriesClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method. +type RegistriesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RegistriesClientListBySubscriptionOptions contains the optional parameters for the RegistriesClient.NewListBySubscriptionPager +// method. +type RegistriesClientListBySubscriptionOptions struct { + // Continuation token for pagination. + Skip *string +} + +// RegistriesClientListOptions contains the optional parameters for the RegistriesClient.NewListPager method. +type RegistriesClientListOptions struct { + // Continuation token for pagination. + Skip *string +} + +type Registry struct { + // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` - // Resource properties. - Properties *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + // REQUIRED; [Required] Additional attributes of the entity. + Properties *RegistryProperties `json:"properties,omitempty"` - // The sku of the workspace. + // Managed service identity (system assigned and/or user assigned identities) + Identity *ManagedServiceIdentity `json:"identity,omitempty"` + + // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + Kind *string `json:"kind,omitempty"` + + // Sku details required for ARM contract for Autoscaling. SKU *SKU `json:"sku,omitempty"` - // Contains resource tags defined as key/value pairs. + // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -6410,267 +8665,369 @@ type PrivateEndpointConnection struct { Type *string `json:"type,omitempty" azure:"ro"` } -// PrivateEndpointConnectionListResult - List of private endpoint connection associated with the specified workspace -type PrivateEndpointConnectionListResult struct { - // Array of private endpoint connections - Value []*PrivateEndpointConnection `json:"value,omitempty"` +// RegistryCodeContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeContainersClient.BeginCreateOrUpdate +// method. +type RegistryCodeContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. -type PrivateEndpointConnectionProperties struct { - // REQUIRED; A collection of information about the state of the connection between service consumer and provider. - PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` - - // The resource of private end point. - PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` - - // READ-ONLY; The provisioning state of the private endpoint connection resource. - ProvisioningState *PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty" azure:"ro"` +// RegistryCodeContainersClientBeginDeleteOptions contains the optional parameters for the RegistryCodeContainersClient.BeginDelete +// method. +type RegistryCodeContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate -// method. -type PrivateEndpointConnectionsClientCreateOrUpdateOptions struct { +// RegistryCodeContainersClientGetOptions contains the optional parameters for the RegistryCodeContainersClient.Get method. +type RegistryCodeContainersClientGetOptions struct { // placeholder for future optional parameters } -// PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// RegistryCodeContainersClientListOptions contains the optional parameters for the RegistryCodeContainersClient.NewListPager // method. -type PrivateEndpointConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters +type RegistryCodeContainersClientListOptions struct { + // Continuation token for pagination. + Skip *string } -// PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// RegistryCodeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginCreateOrUpdate // method. -type PrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters +type RegistryCodeVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List +// RegistryCodeVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginDelete // method. -type PrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters +type RegistryCodeVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateLinkResource - A private link resource -type PrivateLinkResource struct { - // The identity of the resource. - Identity *ManagedServiceIdentity `json:"identity,omitempty"` - - // Specifies the location of the resource. - Location *string `json:"location,omitempty"` - - // Resource properties. - Properties *PrivateLinkResourceProperties `json:"properties,omitempty"` - - // The sku of the workspace. - SKU *SKU `json:"sku,omitempty"` - - // Contains resource tags defined as key/value pairs. - Tags map[string]*string `json:"tags,omitempty"` +// RegistryCodeVersionsClientGetOptions contains the optional parameters for the RegistryCodeVersionsClient.Get method. +type RegistryCodeVersionsClientGetOptions struct { + // placeholder for future optional parameters +} - // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - ID *string `json:"id,omitempty" azure:"ro"` +// RegistryCodeVersionsClientListOptions contains the optional parameters for the RegistryCodeVersionsClient.NewListPager +// method. +type RegistryCodeVersionsClientListOptions struct { + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Maximum number of records to return. + Top *int32 +} - // READ-ONLY; The name of the resource - Name *string `json:"name,omitempty" azure:"ro"` +// RegistryComponentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentContainersClient.BeginCreateOrUpdate +// method. +type RegistryComponentContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` +// RegistryComponentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryComponentContainersClient.BeginDelete +// method. +type RegistryComponentContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string `json:"type,omitempty" azure:"ro"` +// RegistryComponentContainersClientGetOptions contains the optional parameters for the RegistryComponentContainersClient.Get +// method. +type RegistryComponentContainersClientGetOptions struct { + // placeholder for future optional parameters } -// PrivateLinkResourceListResult - A list of private link resources -type PrivateLinkResourceListResult struct { - // Array of private link resources - Value []*PrivateLinkResource `json:"value,omitempty"` +// RegistryComponentContainersClientListOptions contains the optional parameters for the RegistryComponentContainersClient.NewListPager +// method. +type RegistryComponentContainersClientListOptions struct { + // Continuation token for pagination. + Skip *string } -// PrivateLinkResourceProperties - Properties of a private link resource. -type PrivateLinkResourceProperties struct { - // The private link resource Private link DNS zone name. - RequiredZoneNames []*string `json:"requiredZoneNames,omitempty"` - - // READ-ONLY; The private link resource group id. - GroupID *string `json:"groupId,omitempty" azure:"ro"` +// RegistryComponentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginCreateOrUpdate +// method. +type RegistryComponentVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // READ-ONLY; The private link resource required member names. - RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` +// RegistryComponentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginDelete +// method. +type RegistryComponentVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List method. -type PrivateLinkResourcesClientListOptions struct { +// RegistryComponentVersionsClientGetOptions contains the optional parameters for the RegistryComponentVersionsClient.Get +// method. +type RegistryComponentVersionsClientGetOptions struct { // placeholder for future optional parameters } -// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer -// and provider. -type PrivateLinkServiceConnectionState struct { - // A message indicating if changes on the service provider require any updates on the consumer. - ActionsRequired *string `json:"actionsRequired,omitempty"` - - // The reason for approval/rejection of the connection. - Description *string `json:"description,omitempty"` - - // Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - Status *PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` +// RegistryComponentVersionsClientListOptions contains the optional parameters for the RegistryComponentVersionsClient.NewListPager +// method. +type RegistryComponentVersionsClientListOptions struct { + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Maximum number of records to return. + Top *int32 } -// ProbeSettings - Deployment container liveness/readiness probe configuration. -type ProbeSettings struct { - // The number of failures to allow before returning an unhealthy status. - FailureThreshold *int32 `json:"failureThreshold,omitempty"` +// RegistryDataContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataContainersClient.BeginCreateOrUpdate +// method. +type RegistryDataContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // The delay before the first probe in ISO 8601 format. - InitialDelay *string `json:"initialDelay,omitempty"` +// RegistryDataContainersClientBeginDeleteOptions contains the optional parameters for the RegistryDataContainersClient.BeginDelete +// method. +type RegistryDataContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // The length of time between probes in ISO 8601 format. - Period *string `json:"period,omitempty"` +// RegistryDataContainersClientGetOptions contains the optional parameters for the RegistryDataContainersClient.Get method. +type RegistryDataContainersClientGetOptions struct { + // placeholder for future optional parameters +} - // The number of successful probes before returning a healthy status. - SuccessThreshold *int32 `json:"successThreshold,omitempty"` +// RegistryDataContainersClientListOptions contains the optional parameters for the RegistryDataContainersClient.NewListPager +// method. +type RegistryDataContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string +} - // The probe timeout in ISO 8601 format. - Timeout *string `json:"timeout,omitempty"` +// RegistryDataVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataVersionsClient.BeginCreateOrUpdate +// method. +type RegistryDataVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// PyTorch distribution configuration. -type PyTorch struct { - // REQUIRED; [Required] Specifies the type of distribution framework. - DistributionType *DistributionType `json:"distributionType,omitempty"` +// RegistryDataVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryDataVersionsClient.BeginDelete +// method. +type RegistryDataVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Number of processes per node. - ProcessCountPerInstance *int32 `json:"processCountPerInstance,omitempty"` +// RegistryDataVersionsClientGetOptions contains the optional parameters for the RegistryDataVersionsClient.Get method. +type RegistryDataVersionsClientGetOptions struct { + // placeholder for future optional parameters } -// GetDistributionConfiguration implements the DistributionConfigurationClassification interface for type PyTorch. -func (p *PyTorch) GetDistributionConfiguration() *DistributionConfiguration { - return &DistributionConfiguration{ - DistributionType: p.DistributionType, - } +// RegistryDataVersionsClientListOptions contains the optional parameters for the RegistryDataVersionsClient.NewListPager +// method. +type RegistryDataVersionsClientListOptions struct { + // [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived + // entities. + ListViewType *ListViewType + // Please choose OrderBy value from ['createdtime', 'modifiedtime'] + OrderBy *string + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + // Top count of results, top count cannot be greater than the page size. If topCount > page size, results with be default + // page size count will be returned + Top *int32 } -// QuotaBaseProperties - The properties for Quota update or retrieval. -type QuotaBaseProperties struct { - // Specifies the resource ID. - ID *string `json:"id,omitempty"` +// RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginCreateOrUpdate +// method. +type RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // The maximum permitted quota of the resource. - Limit *int64 `json:"limit,omitempty"` +// RegistryEnvironmentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginDelete +// method. +type RegistryEnvironmentContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // Specifies the resource type. - Type *string `json:"type,omitempty"` +// RegistryEnvironmentContainersClientGetOptions contains the optional parameters for the RegistryEnvironmentContainersClient.Get +// method. +type RegistryEnvironmentContainersClientGetOptions struct { + // placeholder for future optional parameters +} - // An enum describing the unit of quota measurement. - Unit *QuotaUnit `json:"unit,omitempty"` +// RegistryEnvironmentContainersClientListOptions contains the optional parameters for the RegistryEnvironmentContainersClient.NewListPager +// method. +type RegistryEnvironmentContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string } -// QuotaUpdateParameters - Quota update parameters. -type QuotaUpdateParameters struct { - // Region of workspace quota to be updated. - Location *string `json:"location,omitempty"` +// RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginCreateOrUpdate +// method. +type RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // The list for update quota. - Value []*QuotaBaseProperties `json:"value,omitempty"` +// RegistryEnvironmentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginDelete +// method. +type RegistryEnvironmentVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -// QuotasClientListOptions contains the optional parameters for the QuotasClient.List method. -type QuotasClientListOptions struct { +// RegistryEnvironmentVersionsClientGetOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.Get +// method. +type RegistryEnvironmentVersionsClientGetOptions struct { // placeholder for future optional parameters } -// QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. -type QuotasClientUpdateOptions struct { - // placeholder for future optional parameters +// RegistryEnvironmentVersionsClientListOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.NewListPager +// method. +type RegistryEnvironmentVersionsClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Ordering of list. + OrderBy *string + // Continuation token for pagination. + Skip *string + // Maximum number of records to return. + Top *int32 } -// RandomSamplingAlgorithm - Defines a Sampling Algorithm that generates values randomly -type RandomSamplingAlgorithm struct { - // REQUIRED; [Required] The algorithm used for generating hyperparameter values, along with configuration properties - SamplingAlgorithmType *SamplingAlgorithmType `json:"samplingAlgorithmType,omitempty"` +type RegistryListCredentialsResult struct { + Passwords []*Password `json:"passwords,omitempty"` - // The specific type of random algorithm - Rule *RandomSamplingAlgorithmRule `json:"rule,omitempty"` + // READ-ONLY + Location *string `json:"location,omitempty" azure:"ro"` - // An optional integer to use as the seed for random number generation - Seed *int32 `json:"seed,omitempty"` + // READ-ONLY + Username *string `json:"username,omitempty" azure:"ro"` } -// GetSamplingAlgorithm implements the SamplingAlgorithmClassification interface for type RandomSamplingAlgorithm. -func (r *RandomSamplingAlgorithm) GetSamplingAlgorithm() *SamplingAlgorithm { - return &SamplingAlgorithm{ - SamplingAlgorithmType: r.SamplingAlgorithmType, - } +// RegistryModelContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelContainersClient.BeginCreateOrUpdate +// method. +type RegistryModelContainersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -type RecurrenceSchedule struct { - // REQUIRED; [Required] List of hours for the schedule. - Hours []*int32 `json:"hours,omitempty"` +// RegistryModelContainersClientBeginDeleteOptions contains the optional parameters for the RegistryModelContainersClient.BeginDelete +// method. +type RegistryModelContainersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // REQUIRED; [Required] List of minutes for the schedule. - Minutes []*int32 `json:"minutes,omitempty"` +// RegistryModelContainersClientGetOptions contains the optional parameters for the RegistryModelContainersClient.Get method. +type RegistryModelContainersClientGetOptions struct { + // placeholder for future optional parameters +} - // List of month days for the schedule - MonthDays []*int32 `json:"monthDays,omitempty"` +// RegistryModelContainersClientListOptions contains the optional parameters for the RegistryModelContainersClient.NewListPager +// method. +type RegistryModelContainersClientListOptions struct { + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Continuation token for pagination. + Skip *string +} - // List of days for the schedule. - WeekDays []*WeekDay `json:"weekDays,omitempty"` +// RegistryModelVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelVersionsClient.BeginCreateOrUpdate +// method. +type RegistryModelVersionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string } -type RecurrenceTrigger struct { - // REQUIRED; [Required] The frequency to trigger schedule. - Frequency *RecurrenceFrequency `json:"frequency,omitempty"` +// RegistryModelVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryModelVersionsClient.BeginDelete +// method. +type RegistryModelVersionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} - // REQUIRED; [Required] Specifies schedule interval in conjunction with frequency - Interval *int32 `json:"interval,omitempty"` +// RegistryModelVersionsClientGetOptions contains the optional parameters for the RegistryModelVersionsClient.Get method. +type RegistryModelVersionsClientGetOptions struct { + // placeholder for future optional parameters +} - // REQUIRED; [Required] - TriggerType *TriggerType `json:"triggerType,omitempty"` +// RegistryModelVersionsClientListOptions contains the optional parameters for the RegistryModelVersionsClient.NewListPager +// method. +type RegistryModelVersionsClientListOptions struct { + // Model description. + Description *string + // View type for including/excluding (for example) archived entities. + ListViewType *ListViewType + // Ordering of list. + OrderBy *string + // Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + Properties *string + // Continuation token for pagination. + Skip *string + // Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + Tags *string + // Maximum number of records to return. + Top *int32 + // Version identifier. + Version *string +} - // 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"` +// RegistryProperties - Details of the Registry +type RegistryProperties struct { + // The asset description text. + Description *string `json:"description,omitempty"` + DiscoveryURL *string `json:"discoveryUrl,omitempty"` + IntellectualPropertyPublisher *string `json:"intellectualPropertyPublisher,omitempty"` - // The recurrence schedule. - Schedule *RecurrenceSchedule `json:"schedule,omitempty"` + // Managed resource group created for the registry + ManagedResourceGroup *ArmResourceID `json:"managedResourceGroup,omitempty"` - // Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - StartTime *string `json:"startTime,omitempty"` + // Tags to be applied to the managed resource group associated with this registry. + ManagedResourceGroupTags map[string]*string `json:"managedResourceGroupTags,omitempty"` + MlFlowRegistryURI *string `json:"mlFlowRegistryUri,omitempty"` + PrivateLinkCount *int32 `json:"privateLinkCount,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"` -} + // The asset property dictionary. + Properties map[string]*string `json:"properties,omitempty"` + PublicNetworkAccess *string `json:"publicNetworkAccess,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, - } + // Details of each region the registry is in + RegionDetails []*RegistryRegionArmDetails `json:"regionDetails,omitempty"` + + // Tag dictionary. Tags can be added, removed, and updated. + Tags map[string]*string `json:"tags,omitempty"` } -type RegenerateEndpointKeysRequest struct { - // REQUIRED; [Required] Specification for which type of key to generate. Primary or Secondary. - KeyType *KeyType `json:"keyType,omitempty"` +// RegistryRegionArmDetails - Details for each region the registry is in +type RegistryRegionArmDetails struct { + // List of ACR accounts + AcrDetails []*AcrDetails `json:"acrDetails,omitempty"` + + // The location where the registry exists + Location *string `json:"location,omitempty"` - // The value the key is set to. - KeyValue *string `json:"keyValue,omitempty"` + // List of storage accounts + StorageAccountDetails []*StorageAccountDetails `json:"storageAccountDetails,omitempty"` } -type RegistryListCredentialsResult struct { - Passwords []*Password `json:"passwords,omitempty"` - - // READ-ONLY - Location *string `json:"location,omitempty" azure:"ro"` +// RegistryTrackedResourceArmPaginatedResult - A paginated list of Registry entities. +type RegistryTrackedResourceArmPaginatedResult struct { + // The link to the next page of Registry objects. If null, there are no additional pages. + NextLink *string `json:"nextLink,omitempty"` - // READ-ONLY - Username *string `json:"username,omitempty" azure:"ro"` + // An array of objects of type Registry. + Value []*Registry `json:"value,omitempty"` } // Regression task in AutoML Table vertical. @@ -6687,6 +9044,9 @@ type Regression struct { // Featurization inputs needed for AutoML job. FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` + // Execution constraints for AutoMLJob. LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` @@ -6699,6 +9059,12 @@ type Regression struct { // Primary metric for regression task. PrimaryMetric *RegressionPrimaryMetrics `json:"primaryMetric,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. TargetColumnName *string `json:"targetColumnName,omitempty"` @@ -6764,6 +9130,12 @@ type RegressionTrainingSettings struct { // Stack ensemble settings for stack ensemble run. StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` + + // TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result + // in mixed mode or heuristics based mode selection. Default is 'auto'. If + // 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. If 'NonDistributed' then + // only non distributed algorithms are chosen. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` } // Resource - Common fields that are returned in the response for all Azure Resource Manager resources @@ -6799,8 +9171,11 @@ type ResourceConfiguration struct { // Optional type of VM used as supported by the compute target. InstanceType *string `json:"instanceType,omitempty"` + // Locations where the job can run. + Locations []*string `json:"locations,omitempty"` + // Additional properties bag. - Properties map[string]interface{} `json:"properties,omitempty"` + Properties map[string]any `json:"properties,omitempty"` } // ResourceID - Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. @@ -7130,7 +9505,7 @@ type SchedulesClientGetOptions struct { // placeholder for future optional parameters } -// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.List method. +// SchedulesClientListOptions contains the optional parameters for the SchedulesClient.NewListPager method. type SchedulesClientListOptions struct { // Status filter for schedule. ListViewType *ScheduleListViewType @@ -7146,7 +9521,7 @@ type ScriptReference struct { // The location of scripts in the mounted volume. ScriptData *string `json:"scriptData,omitempty"` - // The storage source of the script: workspace. + // The storage source of the script: inline, workspace. ScriptSource *string `json:"scriptSource,omitempty"` // Optional time period passed to timeout command. @@ -7185,6 +9560,33 @@ type ServiceManagedResourcesSettings struct { CosmosDb *CosmosDbSettings `json:"cosmosDb,omitempty"` } +type ServicePrincipalAuthTypeWorkspaceConnectionProperties struct { + // REQUIRED; Authentication type of the connection target + AuthType *ConnectionAuthType `json:"authType,omitempty"` + + // Category of the connection + Category *ConnectionCategory `json:"category,omitempty"` + Credentials *WorkspaceConnectionServicePrincipal `json:"credentials,omitempty"` + Target *string `json:"target,omitempty"` + + // Value details of the workspace connection. + Value *string `json:"value,omitempty"` + + // format for the workspace connection value + ValueFormat *ValueFormat `json:"valueFormat,omitempty"` +} + +// GetWorkspaceConnectionPropertiesV2 implements the WorkspaceConnectionPropertiesV2Classification interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s *ServicePrincipalAuthTypeWorkspaceConnectionProperties) GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 { + return &WorkspaceConnectionPropertiesV2{ + AuthType: s.AuthType, + Category: s.Category, + Target: s.Target, + Value: s.Value, + ValueFormat: s.ValueFormat, + } +} + // ServicePrincipalDatastoreCredentials - Service Principal datastore credentials configuration. type ServicePrincipalDatastoreCredentials struct { // REQUIRED; [Required] Service principal client ID. @@ -7258,10 +9660,167 @@ 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"` + + // Notification setting for the job + NotificationSetting *NotificationSetting `json:"notificationSetting,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"` + + // Queue settings for the job + QueueSettings *QueueSettings `json:"queueSettings,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, + NotificationSetting: s.NotificationSetting, + Services: s.Services, + Status: s.Status, + Description: s.Description, + Properties: s.Properties, + Tags: s.Tags, + } +} + +// SparkJobEntryClassification provides polymorphic access to related types. +// Call the interface's GetSparkJobEntry() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *SparkJobEntry, *SparkJobPythonEntry, *SparkJobScalaEntry +type SparkJobEntryClassification interface { + // GetSparkJobEntry returns the SparkJobEntry content of the underlying type. + GetSparkJobEntry() *SparkJobEntry +} + +// 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"` + StackMetaLearnerKWargs any `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. @@ -7271,6 +9830,27 @@ type StackEnsembleSettings struct { 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"` +} + +// StorageAccountDetails - Details of storage account to be used for the Registry +type StorageAccountDetails struct { + SystemCreatedStorageAccount *SystemCreatedStorageAccount `json:"systemCreatedStorageAccount,omitempty"` + UserCreatedStorageAccount *UserCreatedStorageAccount `json:"userCreatedStorageAccount,omitempty"` +} + // SweepJob - Sweep job definition. type SweepJob struct { // REQUIRED; [Required] Specifies the type of job. @@ -7284,7 +9864,7 @@ type SweepJob struct { // REQUIRED; [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the // parameter - SearchSpace interface{} `json:"searchSpace,omitempty"` + SearchSpace any `json:"searchSpace,omitempty"` // REQUIRED; [Required] Trial component definition. Trial *TrialComponent `json:"trial,omitempty"` @@ -7320,12 +9900,18 @@ type SweepJob struct { // Sweep Job limit. Limits *SweepJobLimits `json:"limits,omitempty"` + // Notification setting for the job + NotificationSetting *NotificationSetting `json:"notificationSetting,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"` + // Queue settings for the job + QueueSettings *QueueSettings `json:"queueSettings,omitempty"` + // List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of FileStreamObject. Services map[string]*JobService `json:"services,omitempty"` @@ -7339,18 +9925,19 @@ 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, - Identity: s.Identity, - IsArchived: s.IsArchived, - JobType: s.JobType, - Services: s.Services, - Status: s.Status, - Description: s.Description, - Properties: s.Properties, - Tags: s.Tags, + ComponentID: s.ComponentID, + ComputeID: s.ComputeID, + DisplayName: s.DisplayName, + ExperimentName: s.ExperimentName, + Identity: s.Identity, + IsArchived: s.IsArchived, + JobType: s.JobType, + NotificationSetting: s.NotificationSetting, + Services: s.Services, + Status: s.Status, + Description: s.Description, + Properties: s.Properties, + Tags: s.Tags, } } @@ -7464,6 +10051,25 @@ type SynapseSparkProperties struct { WorkspaceName *string `json:"workspaceName,omitempty"` } +type SystemCreatedAcrAccount struct { + AcrAccountSKU *string `json:"acrAccountSku,omitempty"` + + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` +} + +type SystemCreatedStorageAccount struct { + AllowBlobPublicAccess *bool `json:"allowBlobPublicAccess,omitempty"` + + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` + StorageAccountHnsEnabled *bool `json:"storageAccountHnsEnabled,omitempty"` + + // Allowed values: "StandardLRS", "StandardGRS", "StandardRAGRS", "StandardZRS", "StandardGZRS", "StandardRAGZRS", "PremiumLRS", + // "PremiumZRS" + StorageAccountType *string `json:"storageAccountType,omitempty"` +} + // SystemData - Metadata pertaining to creation and last modification of the resource. type SystemData struct { // The timestamp of resource creation (UTC). @@ -7497,6 +10103,139 @@ type SystemService struct { Version *string `json:"version,omitempty" azure:"ro"` } +// TableFixedParameters - Fixed training parameters that won't be swept over during AutoML Table training. +type TableFixedParameters struct { + // Specify the boosting type, e.g gbdt for XGBoost. + Booster *string `json:"booster,omitempty"` + + // Specify the boosting type, e.g gbdt for LightGBM. + BoostingType *string `json:"boostingType,omitempty"` + + // Specify the grow policy, which controls the way new nodes are added to the tree. + GrowPolicy *string `json:"growPolicy,omitempty"` + + // The learning rate for the training procedure. + LearningRate *float64 `json:"learningRate,omitempty"` + + // Specify the Maximum number of discrete bins to bucket continuous features . + MaxBin *int32 `json:"maxBin,omitempty"` + + // Specify the max depth to limit the tree depth explicitly. + MaxDepth *int32 `json:"maxDepth,omitempty"` + + // Specify the max leaves to limit the tree leaves explicitly. + MaxLeaves *int32 `json:"maxLeaves,omitempty"` + + // The minimum number of data per leaf. + MinDataInLeaf *int32 `json:"minDataInLeaf,omitempty"` + + // Minimum loss reduction required to make a further partition on a leaf node of the tree. + MinSplitGain *float64 `json:"minSplitGain,omitempty"` + + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` + + // Specify the number of trees (or rounds) in an model. + NEstimators *int32 `json:"nEstimators,omitempty"` + + // Specify the number of leaves. + NumLeaves *int32 `json:"numLeaves,omitempty"` + + // The name of the preprocessor to use. + PreprocessorName *string `json:"preprocessorName,omitempty"` + + // L1 regularization term on weights. + RegAlpha *float64 `json:"regAlpha,omitempty"` + + // L2 regularization term on weights. + RegLambda *float64 `json:"regLambda,omitempty"` + + // Subsample ratio of the training instance. + Subsample *float64 `json:"subsample,omitempty"` + + // Frequency of subsample. + SubsampleFreq *float64 `json:"subsampleFreq,omitempty"` + + // Specify the tree method. + TreeMethod *string `json:"treeMethod,omitempty"` + + // If true, center before scaling the data with StandardScalar. + WithMean *bool `json:"withMean,omitempty"` + + // If true, scaling the data with Unit Variance with StandardScalar. + WithStd *bool `json:"withStd,omitempty"` +} + +type TableParameterSubspace struct { + // Specify the boosting type, e.g gbdt for XGBoost. + Booster *string `json:"booster,omitempty"` + + // Specify the boosting type, e.g gbdt for LightGBM. + BoostingType *string `json:"boostingType,omitempty"` + + // Specify the grow policy, which controls the way new nodes are added to the tree. + GrowPolicy *string `json:"growPolicy,omitempty"` + + // The learning rate for the training procedure. + LearningRate *string `json:"learningRate,omitempty"` + + // Specify the Maximum number of discrete bins to bucket continuous features . + MaxBin *string `json:"maxBin,omitempty"` + + // Specify the max depth to limit the tree depth explicitly. + MaxDepth *string `json:"maxDepth,omitempty"` + + // Specify the max leaves to limit the tree leaves explicitly. + MaxLeaves *string `json:"maxLeaves,omitempty"` + + // The minimum number of data per leaf. + MinDataInLeaf *string `json:"minDataInLeaf,omitempty"` + + // Minimum loss reduction required to make a further partition on a leaf node of the tree. + MinSplitGain *string `json:"minSplitGain,omitempty"` + + // The name of the model to train. + ModelName *string `json:"modelName,omitempty"` + + // Specify the number of trees (or rounds) in an model. + NEstimators *string `json:"nEstimators,omitempty"` + + // Specify the number of leaves. + NumLeaves *string `json:"numLeaves,omitempty"` + + // The name of the preprocessor to use. + PreprocessorName *string `json:"preprocessorName,omitempty"` + + // L1 regularization term on weights. + RegAlpha *string `json:"regAlpha,omitempty"` + + // L2 regularization term on weights. + RegLambda *string `json:"regLambda,omitempty"` + + // Subsample ratio of the training instance. + Subsample *string `json:"subsample,omitempty"` + + // Frequency of subsample + SubsampleFreq *string `json:"subsampleFreq,omitempty"` + + // Specify the tree method. + TreeMethod *string `json:"treeMethod,omitempty"` + + // If true, center before scaling the data with StandardScalar. + WithMean *string `json:"withMean,omitempty"` + + // If true, scaling the data with Unit Variance with StandardScalar. + WithStd *string `json:"withStd,omitempty"` +} + +type TableSweepSettings struct { + // REQUIRED; [Required] Type of sampling algorithm. + SamplingAlgorithm *SamplingAlgorithmType `json:"samplingAlgorithm,omitempty"` + + // Type of early termination policy for the sweeping job. + EarlyTermination EarlyTerminationPolicyClassification `json:"earlyTermination,omitempty"` +} + // TableVertical - Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. type TableVertical struct { // Columns to use for CVSplit data. @@ -7505,12 +10244,21 @@ type TableVertical struct { // Featurization inputs needed for AutoML job. FeaturizationSettings *TableVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *TableFixedParameters `json:"fixedParameters,omitempty"` + // Execution constraints for AutoMLJob. LimitSettings *TableVerticalLimitSettings `json:"limitSettings,omitempty"` // Number of cross validation folds to be applied on training dataset when validation dataset is not provided. NCrossValidations NCrossValidationsClassification `json:"nCrossValidations,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*TableParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *TableSweepSettings `json:"sweepSettings,omitempty"` + // Test data input. TestData *MLTableJobInput `json:"testData,omitempty"` @@ -7569,9 +10317,18 @@ type TableVerticalLimitSettings struct { // Max cores per iteration. MaxCoresPerTrial *int32 `json:"maxCoresPerTrial,omitempty"` + // Maximum nodes to use for the experiment. + MaxNodes *int32 `json:"maxNodes,omitempty"` + // Number of iterations. MaxTrials *int32 `json:"maxTrials,omitempty"` + // Number of concurrent sweeping runs that user wants to trigger. + SweepConcurrentTrials *int32 `json:"sweepConcurrentTrials,omitempty"` + + // Number of sweeping runs that user wants to trigger. + SweepTrials *int32 `json:"sweepTrials,omitempty"` + // AutoML job timeout. Timeout *string `json:"timeout,omitempty"` @@ -7669,6 +10426,9 @@ type TextClassification struct { // Featurization inputs needed for AutoML job. FeaturizationSettings *NlpVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` + // Execution constraints for AutoMLJob. LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` @@ -7678,6 +10438,12 @@ type TextClassification struct { // Primary metric for Text-Classification task. PrimaryMetric *ClassificationPrimaryMetrics `json:"primaryMetric,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. TargetColumnName *string `json:"targetColumnName,omitempty"` @@ -7706,12 +10472,21 @@ type TextClassificationMultilabel struct { // Featurization inputs needed for AutoML job. FeaturizationSettings *NlpVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` + // Execution constraints for AutoMLJob. LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` // Log verbosity for the job. LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. TargetColumnName *string `json:"targetColumnName,omitempty"` @@ -7744,12 +10519,21 @@ type TextNer struct { // Featurization inputs needed for AutoML job. FeaturizationSettings *NlpVerticalFeaturizationSettings `json:"featurizationSettings,omitempty"` + // Model/training parameters that will remain constant throughout training. + FixedParameters *NlpFixedParameters `json:"fixedParameters,omitempty"` + // Execution constraints for AutoMLJob. LimitSettings *NlpVerticalLimitSettings `json:"limitSettings,omitempty"` // Log verbosity for the job. LogVerbosity *LogVerbosity `json:"logVerbosity,omitempty"` + // Search space for sampling different combinations of models and their hyperparameters. + SearchSpace []*NlpParameterSubspace `json:"searchSpace,omitempty"` + + // Settings for model sweeping and hyperparameter tuning. + SweepSettings *NlpSweepSettings `json:"sweepSettings,omitempty"` + // Target column name: This is prediction values column. Also known as label column name in context of classification tasks. TargetColumnName *string `json:"targetColumnName,omitempty"` @@ -7770,6 +10554,11 @@ func (t *TextNer) GetAutoMLVertical() *AutoMLVertical { } } +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 { @@ -7816,6 +10605,12 @@ type TrainingSettings struct { // Stack ensemble settings for stack ensemble run. StackEnsembleSettings *StackEnsembleSettings `json:"stackEnsembleSettings,omitempty"` + + // TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result + // in mixed mode or heuristics based mode selection. Default is 'auto'. If + // 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. If 'NonDistributed' then + // only non distributed algorithms are chosen. + TrainingMode *TrainingMode `json:"trainingMode,omitempty"` } // TrialComponent - Trial component definition. @@ -7868,6 +10663,22 @@ type TriggerBase struct { // GetTriggerBase implements the TriggerBaseClassification interface for type TriggerBase. func (t *TriggerBase) GetTriggerBase() *TriggerBase { return t } +// TritonInferencingServer - Triton inferencing server configurations. +type TritonInferencingServer struct { + // REQUIRED; [Required] Inferencing server type for various targets. + ServerType *InferencingServerType `json:"serverType,omitempty"` + + // Inference configuration for Triton. + InferenceConfiguration *OnlineInferenceConfiguration `json:"inferenceConfiguration,omitempty"` +} + +// GetInferencingServer implements the InferencingServerClassification interface for type TritonInferencingServer. +func (t *TritonInferencingServer) GetInferencingServer() *InferencingServer { + return &InferencingServer{ + ServerType: t.ServerType, + } +} + type TritonModelJobInput struct { // REQUIRED; [Required] Specifies the type of job. JobInputType *JobInputType `json:"jobInputType,omitempty"` @@ -7894,6 +10705,12 @@ type TritonModelJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -7942,7 +10759,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.V20221001.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -8000,6 +10817,12 @@ type URIFileJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -8023,7 +10846,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.V20221001.Assets.DataVersionBase.DataType + // REQUIRED; [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 DataURI *string `json:"dataUri,omitempty"` // The asset description text. @@ -8081,6 +10904,12 @@ type URIFolderJobOutput struct { // REQUIRED; [Required] Specifies the type of job. JobOutputType *JobOutputType `json:"jobOutputType,omitempty"` + // Output Asset Name. + AssetName *string `json:"assetName,omitempty"` + + // Output Asset Version. + AssetVersion *string `json:"assetVersion,omitempty"` + // Description for the output. Description *string `json:"description,omitempty"` @@ -8160,7 +10989,7 @@ type UsageName struct { Value *string `json:"value,omitempty" azure:"ro"` } -// UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. +// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. type UsagesClientListOptions struct { // placeholder for future optional parameters } @@ -8186,6 +11015,16 @@ type UserAssignedIdentity struct { PrincipalID *string `json:"principalId,omitempty" azure:"ro"` } +type UserCreatedAcrAccount struct { + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` +} + +type UserCreatedStorageAccount struct { + // ARM ResourceId of a resource + ArmResourceID *ArmResourceID `json:"armResourceId,omitempty"` +} + // UserIdentity - User identity configuration. type UserIdentity struct { // REQUIRED; [Required] Specifies the type of identity framework. @@ -8390,10 +11229,42 @@ 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. Identity *ManagedServiceIdentity `json:"identity,omitempty"` + Kind *string `json:"kind,omitempty"` // Specifies the location of the resource. Location *string `json:"location,omitempty"` @@ -8420,6 +11291,11 @@ type Workspace struct { Type *string `json:"type,omitempty" azure:"ro"` } +type WorkspaceConnectionAccessKey struct { + AccessKeyID *string `json:"accessKeyId,omitempty"` + SecretAccessKey *string `json:"secretAccessKey,omitempty"` +} + type WorkspaceConnectionManagedIdentity struct { ClientID *string `json:"clientId,omitempty"` ResourceID *string `json:"resourceId,omitempty"` @@ -8432,8 +11308,9 @@ type WorkspaceConnectionPersonalAccessToken struct { // WorkspaceConnectionPropertiesV2Classification provides polymorphic access to related types. // Call the interface's GetWorkspaceConnectionPropertiesV2() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *ManagedIdentityAuthTypeWorkspaceConnectionProperties, *NoneAuthTypeWorkspaceConnectionProperties, *PATAuthTypeWorkspaceConnectionProperties, -// - *SASAuthTypeWorkspaceConnectionProperties, *UsernamePasswordAuthTypeWorkspaceConnectionProperties, *WorkspaceConnectionPropertiesV2 +// - *AccessKeyAuthTypeWorkspaceConnectionProperties, *ManagedIdentityAuthTypeWorkspaceConnectionProperties, *NoneAuthTypeWorkspaceConnectionProperties, +// - *PATAuthTypeWorkspaceConnectionProperties, *SASAuthTypeWorkspaceConnectionProperties, *ServicePrincipalAuthTypeWorkspaceConnectionProperties, +// - *UsernamePasswordAuthTypeWorkspaceConnectionProperties, *WorkspaceConnectionPropertiesV2 type WorkspaceConnectionPropertiesV2Classification interface { // GetWorkspaceConnectionPropertiesV2 returns the WorkspaceConnectionPropertiesV2 content of the underlying type. GetWorkspaceConnectionPropertiesV2() *WorkspaceConnectionPropertiesV2 @@ -8483,6 +11360,12 @@ type WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } +type WorkspaceConnectionServicePrincipal struct { + ClientID *string `json:"clientId,omitempty"` + ClientSecret *string `json:"clientSecret,omitempty"` + TenantID *string `json:"tenantId,omitempty"` +} + type WorkspaceConnectionSharedAccessSignature struct { Sas *string `json:"sas,omitempty"` } @@ -8507,7 +11390,8 @@ type WorkspaceConnectionsClientGetOptions struct { // placeholder for future optional parameters } -// WorkspaceConnectionsClientListOptions contains the optional parameters for the WorkspaceConnectionsClient.List method. +// WorkspaceConnectionsClientListOptions contains the optional parameters for the WorkspaceConnectionsClient.NewListPager +// method. type WorkspaceConnectionsClientListOptions struct { // Category of the workspace connection. Category *string @@ -8515,7 +11399,7 @@ type WorkspaceConnectionsClientListOptions struct { Target *string } -// WorkspaceFeaturesClientListOptions contains the optional parameters for the WorkspaceFeaturesClient.List method. +// WorkspaceFeaturesClientListOptions contains the optional parameters for the WorkspaceFeaturesClient.NewListPager method. type WorkspaceFeaturesClientListOptions struct { // placeholder for future optional parameters } @@ -8550,6 +11434,9 @@ type WorkspaceProperties struct { // The encryption settings of Azure ML workspace. Encryption *EncryptionProperty `json:"encryption,omitempty"` + // Settings for feature store type workspace. + FeatureStoreSettings *FeatureStoreSettings `json:"featureStoreSettings,omitempty"` + // The friendly name for this workspace. This name in mutable FriendlyName *string `json:"friendlyName,omitempty"` @@ -8574,9 +11461,15 @@ type WorkspaceProperties struct { // The list of shared private link resources in this workspace. SharedPrivateLinkResources []*SharedPrivateLinkResource `json:"sharedPrivateLinkResources,omitempty"` + // Retention time in days after workspace get soft deleted. + SoftDeleteRetentionInDays *int32 `json:"softDeleteRetentionInDays,omitempty"` + // ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created StorageAccount *string `json:"storageAccount,omitempty"` + // The auth mode used for accessing the system datastores of the workspace + SystemDatastoresAuthMode *string `json:"systemDatastoresAuthMode,omitempty"` + // Enabling v1legacymode may prevent you from using features provided by the v2 API. V1LegacyMode *bool `json:"v1LegacyMode,omitempty"` @@ -8596,10 +11489,16 @@ type WorkspaceProperties struct { // provisioning. ProvisioningState *ProvisioningState `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"` @@ -8621,6 +11520,12 @@ type WorkspacePropertiesUpdateParameters struct { // The description of this workspace. Description *string `json:"description,omitempty"` + // The encryption settings of the workspace. + Encryption *EncryptionUpdateProperties `json:"encryption,omitempty"` + + // Settings for feature store type workspace. + FeatureStoreSettings *FeatureStoreSettings `json:"featureStoreSettings,omitempty"` + // The friendly name for this workspace. FriendlyName *string `json:"friendlyName,omitempty"` @@ -8661,6 +11566,8 @@ type WorkspacesClientBeginCreateOrUpdateOptions struct { // WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method. type WorkspacesClientBeginDeleteOptions struct { + // Flag to indicate delete is a purge request. + ForceToPurge *bool // Resumes the LRO from the provided token. ResumeToken string } @@ -8697,16 +11604,20 @@ type WorkspacesClientGetOptions struct { // placeholder for future optional parameters } -// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup +// WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager // method. type WorkspacesClientListByResourceGroupOptions struct { + // Kind of workspace. + Kind *string // Continuation token for pagination. Skip *string } -// WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription +// WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager // method. type WorkspacesClientListBySubscriptionOptions struct { + // Kind of workspace. + Kind *string // Continuation token for pagination. Skip *string } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go b/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go index ca1b3f9aa7e5..26ce91af761f 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/models_serde.go @@ -18,7 +18,7 @@ import ( // MarshalJSON implements the json.Marshaller interface for type AKS. func (a AKS) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", a.ComputeLocation) objectMap["computeType"] = ComputeTypeAKS populateTimeRFC3339(objectMap, "createdOn", a.CreatedOn) @@ -85,7 +85,7 @@ func (a *AKS) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AKSSchema. func (a AKSSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", a.Properties) return json.Marshal(objectMap) } @@ -112,7 +112,7 @@ func (a *AKSSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AKSSchemaProperties. func (a AKSSchemaProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "agentCount", a.AgentCount) populate(objectMap, "agentVmSize", a.AgentVMSize) populate(objectMap, "aksNetworkingConfiguration", a.AksNetworkingConfiguration) @@ -169,9 +169,56 @@ func (a *AKSSchemaProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a AccessKeyAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = ConnectionAuthTypeAccessKey + populate(objectMap, "category", a.Category) + populate(objectMap, "credentials", a.Credentials) + populate(objectMap, "target", a.Target) + populate(objectMap, "value", a.Value) + populate(objectMap, "valueFormat", a.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AccessKeyAuthTypeWorkspaceConnectionProperties. +func (a *AccessKeyAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &a.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &a.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &a.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &a.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &a.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &a.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AccountKeyDatastoreCredentials. func (a AccountKeyDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["credentialsType"] = CredentialsTypeAccountKey populate(objectMap, "secrets", a.Secrets) return json.Marshal(objectMap) @@ -202,7 +249,7 @@ func (a *AccountKeyDatastoreCredentials) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AccountKeyDatastoreSecrets. func (a AccountKeyDatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "key", a.Key) objectMap["secretsType"] = SecretsTypeAccountKey return json.Marshal(objectMap) @@ -231,9 +278,40 @@ func (a *AccountKeyDatastoreSecrets) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AcrDetails. +func (a AcrDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "systemCreatedAcrAccount", a.SystemCreatedAcrAccount) + populate(objectMap, "userCreatedAcrAccount", a.UserCreatedAcrAccount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AcrDetails. +func (a *AcrDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "systemCreatedAcrAccount": + err = unpopulate(val, "SystemCreatedAcrAccount", &a.SystemCreatedAcrAccount) + delete(rawMsg, key) + case "userCreatedAcrAccount": + err = unpopulate(val, "UserCreatedAcrAccount", &a.UserCreatedAcrAccount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AksComputeSecrets. func (a AksComputeSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "adminKubeConfig", a.AdminKubeConfig) objectMap["computeType"] = ComputeTypeAKS populate(objectMap, "imagePullSecretName", a.ImagePullSecretName) @@ -272,7 +350,7 @@ func (a *AksComputeSecrets) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AksComputeSecretsProperties. func (a AksComputeSecretsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "adminKubeConfig", a.AdminKubeConfig) populate(objectMap, "imagePullSecretName", a.ImagePullSecretName) populate(objectMap, "userKubeConfig", a.UserKubeConfig) @@ -307,7 +385,7 @@ func (a *AksComputeSecretsProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AksNetworkingConfiguration. func (a AksNetworkingConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dnsServiceIP", a.DNSServiceIP) populate(objectMap, "dockerBridgeCidr", a.DockerBridgeCidr) populate(objectMap, "serviceCidr", a.ServiceCidr) @@ -344,9 +422,36 @@ func (a *AksNetworkingConfiguration) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AllNodes. +func (a AllNodes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["nodesValueType"] = NodesValueTypeAll + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AllNodes. +func (a *AllNodes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodesValueType": + err = unpopulate(val, "NodesValueType", &a.NodesValueType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AmlCompute. func (a AmlCompute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", a.ComputeLocation) objectMap["computeType"] = ComputeTypeAmlCompute populateTimeRFC3339(objectMap, "createdOn", a.CreatedOn) @@ -413,7 +518,7 @@ func (a *AmlCompute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlComputeNodeInformation. func (a AmlComputeNodeInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nodeId", a.NodeID) populate(objectMap, "nodeState", a.NodeState) populate(objectMap, "port", a.Port) @@ -460,7 +565,7 @@ func (a *AmlComputeNodeInformation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlComputeNodesInformation. func (a AmlComputeNodesInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", a.NextLink) populate(objectMap, "nodes", a.Nodes) return json.Marshal(objectMap) @@ -491,7 +596,7 @@ func (a *AmlComputeNodesInformation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlComputeProperties. func (a AmlComputeProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allocationState", a.AllocationState) populateTimeRFC3339(objectMap, "allocationStateTransitionTime", a.AllocationStateTransitionTime) populate(objectMap, "currentNodeCount", a.CurrentNodeCount) @@ -582,7 +687,7 @@ func (a *AmlComputeProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlComputeSchema. func (a AmlComputeSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", a.Properties) return json.Marshal(objectMap) } @@ -609,7 +714,7 @@ func (a *AmlComputeSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlOperation. func (a AmlOperation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "display", a.Display) populate(objectMap, "isDataAction", a.IsDataAction) populate(objectMap, "name", a.Name) @@ -644,7 +749,7 @@ func (a *AmlOperation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlOperationDisplay. func (a AmlOperationDisplay) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "operation", a.Operation) populate(objectMap, "provider", a.Provider) @@ -683,7 +788,7 @@ func (a *AmlOperationDisplay) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlOperationListResult. func (a AmlOperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", a.Value) return json.Marshal(objectMap) } @@ -710,7 +815,7 @@ func (a *AmlOperationListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlToken. func (a AmlToken) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["identityType"] = IdentityConfigurationTypeAMLToken return json.Marshal(objectMap) } @@ -737,7 +842,7 @@ func (a *AmlToken) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AmlUserFeature. func (a AmlUserFeature) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "displayName", a.DisplayName) populate(objectMap, "id", a.ID) @@ -770,9 +875,36 @@ func (a *AmlUserFeature) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ArmResourceID. +func (a ArmResourceID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "resourceId", a.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ArmResourceID. +func (a *ArmResourceID) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "resourceId": + err = unpopulate(val, "ResourceID", &a.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AssetBase. func (a AssetBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "isAnonymous", a.IsAnonymous) populate(objectMap, "isArchived", a.IsArchived) @@ -815,7 +947,7 @@ func (a *AssetBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AssetContainer. func (a AssetContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", a.Description) populate(objectMap, "isArchived", a.IsArchived) populate(objectMap, "latestVersion", a.LatestVersion) @@ -862,7 +994,7 @@ func (a *AssetContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AssetJobInput. func (a AssetJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "mode", a.Mode) populate(objectMap, "uri", a.URI) return json.Marshal(objectMap) @@ -893,7 +1025,9 @@ func (a *AssetJobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AssetJobOutput. func (a AssetJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "assetName", a.AssetName) + populate(objectMap, "assetVersion", a.AssetVersion) populate(objectMap, "mode", a.Mode) populate(objectMap, "uri", a.URI) return json.Marshal(objectMap) @@ -908,6 +1042,12 @@ func (a *AssetJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "assetName": + err = unpopulate(val, "AssetName", &a.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &a.AssetVersion) + delete(rawMsg, key) case "mode": err = unpopulate(val, "Mode", &a.Mode) delete(rawMsg, key) @@ -924,7 +1064,7 @@ func (a *AssetJobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AssetReferenceBase. func (a AssetReferenceBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["referenceType"] = a.ReferenceType return json.Marshal(objectMap) } @@ -951,7 +1091,7 @@ func (a *AssetReferenceBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AssignedUser. func (a AssignedUser) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "objectId", a.ObjectID) populate(objectMap, "tenantId", a.TenantID) return json.Marshal(objectMap) @@ -982,7 +1122,7 @@ func (a *AssignedUser) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoForecastHorizon. func (a AutoForecastHorizon) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = ForecastHorizonModeAuto return json.Marshal(objectMap) } @@ -1009,7 +1149,7 @@ func (a *AutoForecastHorizon) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoMLJob. func (a AutoMLJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "componentId", a.ComponentID) populate(objectMap, "computeId", a.ComputeID) populate(objectMap, "description", a.Description) @@ -1020,8 +1160,10 @@ func (a AutoMLJob) MarshalJSON() ([]byte, error) { populate(objectMap, "identity", a.Identity) populate(objectMap, "isArchived", a.IsArchived) objectMap["jobType"] = JobTypeAutoML + populate(objectMap, "notificationSetting", a.NotificationSetting) populate(objectMap, "outputs", a.Outputs) populate(objectMap, "properties", a.Properties) + populate(objectMap, "queueSettings", a.QueueSettings) populate(objectMap, "resources", a.Resources) populate(objectMap, "services", a.Services) populate(objectMap, "status", a.Status) @@ -1069,12 +1211,18 @@ func (a *AutoMLJob) UnmarshalJSON(data []byte) error { case "jobType": err = unpopulate(val, "JobType", &a.JobType) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &a.NotificationSetting) + 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 "queueSettings": + err = unpopulate(val, "QueueSettings", &a.QueueSettings) + delete(rawMsg, key) case "resources": err = unpopulate(val, "Resources", &a.Resources) delete(rawMsg, key) @@ -1100,7 +1248,7 @@ func (a *AutoMLJob) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoMLVertical. func (a AutoMLVertical) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "logVerbosity", a.LogVerbosity) populate(objectMap, "targetColumnName", a.TargetColumnName) objectMap["taskType"] = a.TaskType @@ -1139,7 +1287,7 @@ func (a *AutoMLVertical) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoNCrossValidations. func (a AutoNCrossValidations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = NCrossValidationsModeAuto return json.Marshal(objectMap) } @@ -1166,7 +1314,7 @@ func (a *AutoNCrossValidations) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoPauseProperties. func (a AutoPauseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "delayInMinutes", a.DelayInMinutes) populate(objectMap, "enabled", a.Enabled) return json.Marshal(objectMap) @@ -1197,7 +1345,7 @@ func (a *AutoPauseProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoScaleProperties. func (a AutoScaleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enabled", a.Enabled) populate(objectMap, "maxNodeCount", a.MaxNodeCount) populate(objectMap, "minNodeCount", a.MinNodeCount) @@ -1232,7 +1380,7 @@ func (a *AutoScaleProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoSeasonality. func (a AutoSeasonality) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = SeasonalityModeAuto return json.Marshal(objectMap) } @@ -1259,7 +1407,7 @@ func (a *AutoSeasonality) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoTargetLags. func (a AutoTargetLags) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = TargetLagsModeAuto return json.Marshal(objectMap) } @@ -1286,7 +1434,7 @@ func (a *AutoTargetLags) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AutoTargetRollingWindowSize. func (a AutoTargetRollingWindowSize) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = TargetRollingWindowSizeModeAuto return json.Marshal(objectMap) } @@ -1311,9 +1459,36 @@ func (a *AutoTargetRollingWindowSize) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AutologgerSettings. +func (a AutologgerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mlflowAutologger", a.MlflowAutologger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AutologgerSettings. +func (a *AutologgerSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mlflowAutologger": + err = unpopulate(val, "MlflowAutologger", &a.MlflowAutologger) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AzureBlobDatastore. func (a AzureBlobDatastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "accountName", a.AccountName) populate(objectMap, "containerName", a.ContainerName) populate(objectMap, "credentials", a.Credentials) @@ -1323,7 +1498,9 @@ func (a AzureBlobDatastore) MarshalJSON() ([]byte, error) { 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) } @@ -1364,9 +1541,15 @@ func (a *AzureBlobDatastore) UnmarshalJSON(data []byte) error { 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) @@ -1380,14 +1563,16 @@ func (a *AzureBlobDatastore) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureDataLakeGen1Datastore. func (a AzureDataLakeGen1Datastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) 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) } @@ -1416,12 +1601,18 @@ func (a *AzureDataLakeGen1Datastore) UnmarshalJSON(data []byte) error { 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) @@ -1435,7 +1626,7 @@ func (a *AzureDataLakeGen1Datastore) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AzureDataLakeGen2Datastore. func (a AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "accountName", a.AccountName) populate(objectMap, "credentials", a.Credentials) objectMap["datastoreType"] = DatastoreTypeAzureDataLakeGen2 @@ -1445,7 +1636,9 @@ func (a AzureDataLakeGen2Datastore) MarshalJSON() ([]byte, error) { 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) } @@ -1486,9 +1679,15 @@ func (a *AzureDataLakeGen2Datastore) UnmarshalJSON(data []byte) error { 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) @@ -1500,9 +1699,40 @@ func (a *AzureDataLakeGen2Datastore) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AzureDatastore. +func (a AzureDatastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "accountName", a.AccountName) populate(objectMap, "credentials", a.Credentials) objectMap["datastoreType"] = DatastoreTypeAzureFile @@ -1512,7 +1742,9 @@ func (a AzureFileDatastore) MarshalJSON() ([]byte, error) { 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) } @@ -1553,9 +1785,15 @@ func (a *AzureFileDatastore) UnmarshalJSON(data []byte) error { 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) @@ -1567,9 +1805,71 @@ func (a *AzureFileDatastore) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AzureMLBatchInferencingServer. +func (a AzureMLBatchInferencingServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "codeConfiguration", a.CodeConfiguration) + objectMap["serverType"] = InferencingServerTypeAzureMLBatch + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureMLBatchInferencingServer. +func (a *AzureMLBatchInferencingServer) UnmarshalJSON(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 "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &a.CodeConfiguration) + delete(rawMsg, key) + case "serverType": + err = unpopulate(val, "ServerType", &a.ServerType) + 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 AzureMLOnlineInferencingServer. +func (a AzureMLOnlineInferencingServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "codeConfiguration", a.CodeConfiguration) + objectMap["serverType"] = InferencingServerTypeAzureMLOnline + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureMLOnlineInferencingServer. +func (a *AzureMLOnlineInferencingServer) UnmarshalJSON(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 "codeConfiguration": + err = unpopulate(val, "CodeConfiguration", &a.CodeConfiguration) + delete(rawMsg, key) + case "serverType": + err = unpopulate(val, "ServerType", &a.ServerType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "delayEvaluation", b.DelayEvaluation) populate(objectMap, "evaluationInterval", b.EvaluationInterval) objectMap["policyType"] = EarlyTerminationPolicyTypeBandit @@ -1610,9 +1910,67 @@ func (b *BanditPolicy) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BaseEnvironmentID. +func (b BaseEnvironmentID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["baseEnvironmentSourceType"] = BaseEnvironmentSourceTypeEnvironmentAsset + populate(objectMap, "resourceId", b.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseEnvironmentID. +func (b *BaseEnvironmentID) UnmarshalJSON(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 "baseEnvironmentSourceType": + err = unpopulate(val, "BaseEnvironmentSourceType", &b.BaseEnvironmentSourceType) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &b.ResourceID) + 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 BaseEnvironmentSource. +func (b BaseEnvironmentSource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["baseEnvironmentSourceType"] = b.BaseEnvironmentSourceType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BaseEnvironmentSource. +func (b *BaseEnvironmentSource) UnmarshalJSON(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 "baseEnvironmentSourceType": + err = unpopulate(val, "BaseEnvironmentSourceType", &b.BaseEnvironmentSourceType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "identity", b.Identity) populate(objectMap, "kind", b.Kind) @@ -1673,11 +2031,39 @@ func (b *BatchDeployment) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BatchDeploymentConfiguration. +func (b BatchDeploymentConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["deploymentConfigurationType"] = b.DeploymentConfigurationType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchDeploymentConfiguration. +func (b *BatchDeploymentConfiguration) UnmarshalJSON(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 "deploymentConfigurationType": + err = unpopulate(val, "DeploymentConfigurationType", &b.DeploymentConfigurationType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "codeConfiguration", b.CodeConfiguration) populate(objectMap, "compute", b.Compute) + populate(objectMap, "deploymentConfiguration", b.DeploymentConfiguration) populate(objectMap, "description", b.Description) populate(objectMap, "environmentId", b.EnvironmentID) populate(objectMap, "environmentVariables", b.EnvironmentVariables) @@ -1710,6 +2096,9 @@ func (b *BatchDeploymentProperties) UnmarshalJSON(data []byte) error { case "compute": err = unpopulate(val, "Compute", &b.Compute) delete(rawMsg, key) + case "deploymentConfiguration": + b.DeploymentConfiguration, err = unmarshalBatchDeploymentConfigurationClassification(val) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &b.Description) delete(rawMsg, key) @@ -1762,7 +2151,7 @@ func (b *BatchDeploymentProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BatchDeploymentTrackedResourceArmPaginatedResult. func (b BatchDeploymentTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -1793,7 +2182,7 @@ func (b *BatchDeploymentTrackedResourceArmPaginatedResult) UnmarshalJSON(data [] // MarshalJSON implements the json.Marshaller interface for type BatchEndpoint. func (b BatchEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", b.ID) populate(objectMap, "identity", b.Identity) populate(objectMap, "kind", b.Kind) @@ -1856,7 +2245,7 @@ func (b *BatchEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BatchEndpointDefaults. func (b BatchEndpointDefaults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "deploymentName", b.DeploymentName) return json.Marshal(objectMap) } @@ -1883,7 +2272,7 @@ func (b *BatchEndpointDefaults) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BatchEndpointProperties. func (b BatchEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authMode", b.AuthMode) populate(objectMap, "defaults", b.Defaults) populate(objectMap, "description", b.Description) @@ -1938,7 +2327,7 @@ func (b *BatchEndpointProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BatchEndpointTrackedResourceArmPaginatedResult. func (b BatchEndpointTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", b.NextLink) populate(objectMap, "value", b.Value) return json.Marshal(objectMap) @@ -1967,9 +2356,52 @@ func (b *BatchEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []by return nil } +// MarshalJSON implements the json.Marshaller interface for type BatchPipelineComponentDeploymentConfiguration. +func (b BatchPipelineComponentDeploymentConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "componentId", b.ComponentID) + objectMap["deploymentConfigurationType"] = BatchDeploymentConfigurationTypePipelineComponent + populate(objectMap, "description", b.Description) + populate(objectMap, "settings", b.Settings) + populate(objectMap, "tags", b.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type BatchPipelineComponentDeploymentConfiguration. +func (b *BatchPipelineComponentDeploymentConfiguration) UnmarshalJSON(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 "componentId": + err = unpopulate(val, "ComponentID", &b.ComponentID) + delete(rawMsg, key) + case "deploymentConfigurationType": + err = unpopulate(val, "DeploymentConfigurationType", &b.DeploymentConfigurationType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &b.Description) + delete(rawMsg, key) + case "settings": + err = unpopulate(val, "Settings", &b.Settings) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &b.Tags) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "maxRetries", b.MaxRetries) populate(objectMap, "timeout", b.Timeout) return json.Marshal(objectMap) @@ -2000,7 +2432,7 @@ func (b *BatchRetrySettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type BayesianSamplingAlgorithm. func (b BayesianSamplingAlgorithm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeBayesian return json.Marshal(objectMap) } @@ -2025,9 +2457,44 @@ func (b *BayesianSamplingAlgorithm) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type BindOptions. +func (b BindOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "contextUri", b.ContextURI) populate(objectMap, "dockerfilePath", b.DockerfilePath) return json.Marshal(objectMap) @@ -2056,9 +2523,60 @@ func (b *BuildContext) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CSVExportSummary. +func (c CSVExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "authorityUrl", c.AuthorityURL) populate(objectMap, "clientId", c.ClientID) objectMap["credentialsType"] = CredentialsTypeCertificate @@ -2109,7 +2627,7 @@ func (c *CertificateDatastoreCredentials) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CertificateDatastoreSecrets. func (c CertificateDatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "certificate", c.Certificate) objectMap["secretsType"] = SecretsTypeCertificate return json.Marshal(objectMap) @@ -2140,14 +2658,17 @@ func (c *CertificateDatastoreSecrets) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Classification. func (c Classification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cvSplitColumnNames", c.CvSplitColumnNames) populate(objectMap, "featurizationSettings", c.FeaturizationSettings) + populate(objectMap, "fixedParameters", c.FixedParameters) populate(objectMap, "limitSettings", c.LimitSettings) populate(objectMap, "logVerbosity", c.LogVerbosity) populate(objectMap, "nCrossValidations", c.NCrossValidations) populate(objectMap, "positiveLabel", c.PositiveLabel) populate(objectMap, "primaryMetric", c.PrimaryMetric) + populate(objectMap, "searchSpace", c.SearchSpace) + populate(objectMap, "sweepSettings", c.SweepSettings) populate(objectMap, "targetColumnName", c.TargetColumnName) objectMap["taskType"] = TaskTypeClassification populate(objectMap, "testData", c.TestData) @@ -2175,6 +2696,9 @@ func (c *Classification) UnmarshalJSON(data []byte) error { case "featurizationSettings": err = unpopulate(val, "FeaturizationSettings", &c.FeaturizationSettings) delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &c.FixedParameters) + delete(rawMsg, key) case "limitSettings": err = unpopulate(val, "LimitSettings", &c.LimitSettings) delete(rawMsg, key) @@ -2190,6 +2714,12 @@ func (c *Classification) UnmarshalJSON(data []byte) error { case "primaryMetric": err = unpopulate(val, "PrimaryMetric", &c.PrimaryMetric) delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &c.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &c.SweepSettings) + delete(rawMsg, key) case "targetColumnName": err = unpopulate(val, "TargetColumnName", &c.TargetColumnName) delete(rawMsg, key) @@ -2227,7 +2757,7 @@ func (c *Classification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ClassificationTrainingSettings. func (c ClassificationTrainingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowedTrainingAlgorithms", c.AllowedTrainingAlgorithms) populate(objectMap, "blockedTrainingAlgorithms", c.BlockedTrainingAlgorithms) populate(objectMap, "enableDnnTraining", c.EnableDnnTraining) @@ -2237,6 +2767,7 @@ func (c ClassificationTrainingSettings) MarshalJSON() ([]byte, error) { populate(objectMap, "enableVoteEnsemble", c.EnableVoteEnsemble) populate(objectMap, "ensembleModelDownloadTimeout", c.EnsembleModelDownloadTimeout) populate(objectMap, "stackEnsembleSettings", c.StackEnsembleSettings) + populate(objectMap, "trainingMode", c.TrainingMode) return json.Marshal(objectMap) } @@ -2276,6 +2807,9 @@ func (c *ClassificationTrainingSettings) UnmarshalJSON(data []byte) error { case "stackEnsembleSettings": err = unpopulate(val, "StackEnsembleSettings", &c.StackEnsembleSettings) delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &c.TrainingMode) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -2286,7 +2820,7 @@ func (c *ClassificationTrainingSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ClusterUpdateParameters. func (c ClusterUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", c.Properties) return json.Marshal(objectMap) } @@ -2313,7 +2847,7 @@ func (c *ClusterUpdateParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ClusterUpdateProperties. func (c ClusterUpdateProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", c.Properties) return json.Marshal(objectMap) } @@ -2338,9 +2872,60 @@ func (c *ClusterUpdateProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CocoExportSummary. +func (c CocoExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "codeId", c.CodeID) populate(objectMap, "scoringScript", c.ScoringScript) return json.Marshal(objectMap) @@ -2371,7 +2956,7 @@ func (c *CodeConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CodeContainer. func (c CodeContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -2414,12 +2999,13 @@ func (c *CodeContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CodeContainerProperties. func (c CodeContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", c.Description) populate(objectMap, "isArchived", c.IsArchived) populate(objectMap, "latestVersion", c.LatestVersion) populate(objectMap, "nextVersion", c.NextVersion) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2448,6 +3034,9 @@ func (c *CodeContainerProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -2461,7 +3050,7 @@ func (c *CodeContainerProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CodeContainerResourceArmPaginatedResult. func (c CodeContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -2492,7 +3081,7 @@ func (c *CodeContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type CodeVersion. func (c CodeVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -2535,12 +3124,13 @@ func (c *CodeVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CodeVersionProperties. func (c CodeVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "codeUri", c.CodeURI) populate(objectMap, "description", c.Description) populate(objectMap, "isAnonymous", c.IsAnonymous) populate(objectMap, "isArchived", c.IsArchived) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2569,6 +3159,9 @@ func (c *CodeVersionProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -2582,7 +3175,7 @@ func (c *CodeVersionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CodeVersionResourceArmPaginatedResult. func (c CodeVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -2613,7 +3206,7 @@ func (c *CodeVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ColumnTransformer. func (c ColumnTransformer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fields", c.Fields) populate(objectMap, "parameters", &c.Parameters) return json.Marshal(objectMap) @@ -2644,7 +3237,8 @@ func (c *ColumnTransformer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CommandJob. func (c CommandJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "autologgerSettings", c.AutologgerSettings) populate(objectMap, "codeId", c.CodeID) populate(objectMap, "command", c.Command) populate(objectMap, "componentId", c.ComponentID) @@ -2660,9 +3254,11 @@ func (c CommandJob) MarshalJSON() ([]byte, error) { populate(objectMap, "isArchived", c.IsArchived) objectMap["jobType"] = JobTypeCommand populate(objectMap, "limits", c.Limits) + populate(objectMap, "notificationSetting", c.NotificationSetting) populate(objectMap, "outputs", c.Outputs) populate(objectMap, "parameters", &c.Parameters) populate(objectMap, "properties", c.Properties) + populate(objectMap, "queueSettings", c.QueueSettings) populate(objectMap, "resources", c.Resources) populate(objectMap, "services", c.Services) populate(objectMap, "status", c.Status) @@ -2679,6 +3275,9 @@ func (c *CommandJob) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "autologgerSettings": + err = unpopulate(val, "AutologgerSettings", &c.AutologgerSettings) + delete(rawMsg, key) case "codeId": err = unpopulate(val, "CodeID", &c.CodeID) delete(rawMsg, key) @@ -2724,6 +3323,9 @@ func (c *CommandJob) UnmarshalJSON(data []byte) error { case "limits": err = unpopulate(val, "Limits", &c.Limits) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &c.NotificationSetting) + delete(rawMsg, key) case "outputs": c.Outputs, err = unmarshalJobOutputClassificationMap(val) delete(rawMsg, key) @@ -2733,6 +3335,9 @@ func (c *CommandJob) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "queueSettings": + err = unpopulate(val, "QueueSettings", &c.QueueSettings) + delete(rawMsg, key) case "resources": err = unpopulate(val, "Resources", &c.Resources) delete(rawMsg, key) @@ -2755,7 +3360,7 @@ func (c *CommandJob) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CommandJobLimits. func (c CommandJobLimits) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["jobLimitsType"] = JobLimitsTypeCommand populate(objectMap, "timeout", c.Timeout) return json.Marshal(objectMap) @@ -2786,7 +3391,7 @@ func (c *CommandJobLimits) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComponentContainer. func (c ComponentContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -2829,12 +3434,13 @@ func (c *ComponentContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComponentContainerProperties. func (c ComponentContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", c.Description) populate(objectMap, "isArchived", c.IsArchived) populate(objectMap, "latestVersion", c.LatestVersion) populate(objectMap, "nextVersion", c.NextVersion) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2863,6 +3469,9 @@ func (c *ComponentContainerProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -2876,7 +3485,7 @@ func (c *ComponentContainerProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComponentContainerResourceArmPaginatedResult. func (c ComponentContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -2907,7 +3516,7 @@ func (c *ComponentContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ComponentVersion. func (c ComponentVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "name", c.Name) populate(objectMap, "properties", c.Properties) @@ -2950,12 +3559,13 @@ func (c *ComponentVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComponentVersionProperties. func (c ComponentVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "componentSpec", &c.ComponentSpec) populate(objectMap, "description", c.Description) populate(objectMap, "isAnonymous", c.IsAnonymous) populate(objectMap, "isArchived", c.IsArchived) populate(objectMap, "properties", c.Properties) + populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "tags", c.Tags) return json.Marshal(objectMap) } @@ -2984,6 +3594,9 @@ func (c *ComponentVersionProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &c.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &c.Tags) delete(rawMsg, key) @@ -2997,7 +3610,7 @@ func (c *ComponentVersionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComponentVersionResourceArmPaginatedResult. func (c ComponentVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", c.NextLink) populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -3028,7 +3641,7 @@ func (c *ComponentVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type Compute. func (c Compute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", c.ComputeLocation) objectMap["computeType"] = c.ComputeType populateTimeRFC3339(objectMap, "createdOn", c.CreatedOn) @@ -3091,7 +3704,7 @@ func (c *Compute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstance. func (c ComputeInstance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", c.ComputeLocation) objectMap["computeType"] = ComputeTypeComputeInstance populateTimeRFC3339(objectMap, "createdOn", c.CreatedOn) @@ -3158,7 +3771,7 @@ func (c *ComputeInstance) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceApplication. func (c ComputeInstanceApplication) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "displayName", c.DisplayName) populate(objectMap, "endpointUri", c.EndpointURI) return json.Marshal(objectMap) @@ -3187,9 +3800,36 @@ func (c *ComputeInstanceApplication) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ComputeInstanceAutologgerSettings. +func (c ComputeInstanceAutologgerSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mlflowAutologger", c.MlflowAutologger) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeInstanceAutologgerSettings. +func (c *ComputeInstanceAutologgerSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mlflowAutologger": + err = unpopulate(val, "MlflowAutologger", &c.MlflowAutologger) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceConnectivityEndpoints. func (c ComputeInstanceConnectivityEndpoints) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateIpAddress", c.PrivateIPAddress) populate(objectMap, "publicIpAddress", c.PublicIPAddress) return json.Marshal(objectMap) @@ -3220,7 +3860,7 @@ func (c *ComputeInstanceConnectivityEndpoints) UnmarshalJSON(data []byte) error // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceContainer. func (c ComputeInstanceContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "autosave", c.Autosave) populate(objectMap, "environment", c.Environment) populate(objectMap, "gpu", c.Gpu) @@ -3267,7 +3907,7 @@ func (c *ComputeInstanceContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceCreatedBy. func (c ComputeInstanceCreatedBy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "userId", c.UserID) populate(objectMap, "userName", c.UserName) populate(objectMap, "userOrgId", c.UserOrgID) @@ -3302,7 +3942,7 @@ func (c *ComputeInstanceCreatedBy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceDataDisk. func (c ComputeInstanceDataDisk) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "caching", c.Caching) populate(objectMap, "diskSizeGB", c.DiskSizeGB) populate(objectMap, "lun", c.Lun) @@ -3341,7 +3981,7 @@ func (c *ComputeInstanceDataDisk) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceDataMount. func (c ComputeInstanceDataMount) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "createdBy", c.CreatedBy) populate(objectMap, "error", c.Error) populate(objectMap, "mountAction", c.MountAction) @@ -3400,7 +4040,7 @@ func (c *ComputeInstanceDataMount) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceEnvironmentInfo. func (c ComputeInstanceEnvironmentInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", c.Name) populate(objectMap, "version", c.Version) return json.Marshal(objectMap) @@ -3431,7 +4071,7 @@ func (c *ComputeInstanceEnvironmentInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceLastOperation. func (c ComputeInstanceLastOperation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "operationName", c.OperationName) populate(objectMap, "operationStatus", c.OperationStatus) populateTimeRFC3339(objectMap, "operationTime", c.OperationTime) @@ -3470,18 +4110,22 @@ func (c *ComputeInstanceLastOperation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceProperties. func (c ComputeInstanceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationSharingPolicy", c.ApplicationSharingPolicy) populate(objectMap, "applications", c.Applications) + populate(objectMap, "autologgerSettings", c.AutologgerSettings) populate(objectMap, "computeInstanceAuthorizationType", c.ComputeInstanceAuthorizationType) populate(objectMap, "connectivityEndpoints", c.ConnectivityEndpoints) populate(objectMap, "containers", c.Containers) populate(objectMap, "createdBy", c.CreatedBy) + populate(objectMap, "customServices", c.CustomServices) populate(objectMap, "dataDisks", c.DataDisks) populate(objectMap, "dataMounts", c.DataMounts) populate(objectMap, "enableNodePublicIp", c.EnableNodePublicIP) populate(objectMap, "errors", c.Errors) + populate(objectMap, "idleTimeBeforeShutdown", c.IdleTimeBeforeShutdown) populate(objectMap, "lastOperation", c.LastOperation) + populate(objectMap, "osImageMetadata", c.OSImageMetadata) populate(objectMap, "personalComputeInstanceSettings", c.PersonalComputeInstanceSettings) populate(objectMap, "sshSettings", c.SSHSettings) populate(objectMap, "schedules", c.Schedules) @@ -3508,6 +4152,9 @@ func (c *ComputeInstanceProperties) UnmarshalJSON(data []byte) error { case "applications": err = unpopulate(val, "Applications", &c.Applications) delete(rawMsg, key) + case "autologgerSettings": + err = unpopulate(val, "AutologgerSettings", &c.AutologgerSettings) + delete(rawMsg, key) case "computeInstanceAuthorizationType": err = unpopulate(val, "ComputeInstanceAuthorizationType", &c.ComputeInstanceAuthorizationType) delete(rawMsg, key) @@ -3520,6 +4167,9 @@ func (c *ComputeInstanceProperties) UnmarshalJSON(data []byte) error { 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) @@ -3532,9 +4182,15 @@ func (c *ComputeInstanceProperties) UnmarshalJSON(data []byte) error { case "errors": err = unpopulate(val, "Errors", &c.Errors) delete(rawMsg, key) + case "idleTimeBeforeShutdown": + err = unpopulate(val, "IdleTimeBeforeShutdown", &c.IdleTimeBeforeShutdown) + delete(rawMsg, key) case "lastOperation": err = unpopulate(val, "LastOperation", &c.LastOperation) delete(rawMsg, key) + case "osImageMetadata": + err = unpopulate(val, "OSImageMetadata", &c.OSImageMetadata) + delete(rawMsg, key) case "personalComputeInstanceSettings": err = unpopulate(val, "PersonalComputeInstanceSettings", &c.PersonalComputeInstanceSettings) delete(rawMsg, key) @@ -3569,7 +4225,7 @@ func (c *ComputeInstanceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceSSHSettings. func (c ComputeInstanceSSHSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "adminPublicKey", c.AdminPublicKey) populate(objectMap, "adminUserName", c.AdminUserName) populate(objectMap, "sshPort", c.SSHPort) @@ -3608,7 +4264,7 @@ func (c *ComputeInstanceSSHSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceSchema. func (c ComputeInstanceSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", c.Properties) return json.Marshal(objectMap) } @@ -3635,7 +4291,7 @@ func (c *ComputeInstanceSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeInstanceVersion. func (c ComputeInstanceVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "runtime", c.Runtime) return json.Marshal(objectMap) } @@ -3662,7 +4318,7 @@ func (c *ComputeInstanceVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeResource. func (c ComputeResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", c.ID) populate(objectMap, "identity", c.Identity) populate(objectMap, "location", c.Location) @@ -3721,7 +4377,7 @@ func (c *ComputeResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeResourceSchema. func (c ComputeResourceSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", c.Properties) return json.Marshal(objectMap) } @@ -3746,9 +4402,36 @@ func (c *ComputeResourceSchema) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ComputeRuntimeDto. +func (c ComputeRuntimeDto) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sparkRuntimeVersion", c.SparkRuntimeVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ComputeRuntimeDto. +func (c *ComputeRuntimeDto) UnmarshalJSON(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 "sparkRuntimeVersion": + err = unpopulate(val, "SparkRuntimeVersion", &c.SparkRuntimeVersion) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "computeStartStop", c.ComputeStartStop) return json.Marshal(objectMap) } @@ -3775,7 +4458,7 @@ func (c *ComputeSchedules) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeSecrets. func (c ComputeSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["computeType"] = c.ComputeType return json.Marshal(objectMap) } @@ -3802,7 +4485,7 @@ func (c *ComputeSecrets) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ComputeStartStopSchedule. func (c ComputeStartStopSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", c.Action) populate(objectMap, "cron", c.Cron) populate(objectMap, "id", c.ID) @@ -3857,7 +4540,7 @@ func (c *ComputeStartStopSchedule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ContainerResourceRequirements. func (c ContainerResourceRequirements) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "containerResourceLimits", c.ContainerResourceLimits) populate(objectMap, "containerResourceRequests", c.ContainerResourceRequests) return json.Marshal(objectMap) @@ -3888,7 +4571,7 @@ func (c *ContainerResourceRequirements) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ContainerResourceSettings. func (c ContainerResourceSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cpu", c.CPU) populate(objectMap, "gpu", c.Gpu) populate(objectMap, "memory", c.Memory) @@ -3923,7 +4606,7 @@ func (c *ContainerResourceSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CosmosDbSettings. func (c CosmosDbSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "collectionsThroughput", c.CollectionsThroughput) return json.Marshal(objectMap) } @@ -3950,7 +4633,7 @@ func (c *CosmosDbSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CronTrigger. func (c CronTrigger) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "endTime", c.EndTime) populate(objectMap, "expression", c.Expression) populate(objectMap, "startTime", c.StartTime) @@ -3993,7 +4676,7 @@ func (c *CronTrigger) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomForecastHorizon. func (c CustomForecastHorizon) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = ForecastHorizonModeCustom populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -4022,9 +4705,40 @@ func (c *CustomForecastHorizon) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CustomInferencingServer. +func (c CustomInferencingServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inferenceConfiguration", c.InferenceConfiguration) + objectMap["serverType"] = InferencingServerTypeCustom + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CustomInferencingServer. +func (c *CustomInferencingServer) UnmarshalJSON(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 "inferenceConfiguration": + err = unpopulate(val, "InferenceConfiguration", &c.InferenceConfiguration) + delete(rawMsg, key) + case "serverType": + err = unpopulate(val, "ServerType", &c.ServerType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "description", c.Description) objectMap["jobInputType"] = JobInputTypeCustomModel populate(objectMap, "mode", c.Mode) @@ -4063,7 +4777,9 @@ func (c *CustomModelJobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomModelJobOutput. func (c CustomModelJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "assetName", c.AssetName) + populate(objectMap, "assetVersion", c.AssetVersion) populate(objectMap, "description", c.Description) objectMap["jobOutputType"] = JobOutputTypeCustomModel populate(objectMap, "mode", c.Mode) @@ -4080,6 +4796,12 @@ func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "assetName": + err = unpopulate(val, "AssetName", &c.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &c.AssetVersion) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &c.Description) delete(rawMsg, key) @@ -4102,7 +4824,7 @@ func (c *CustomModelJobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomNCrossValidations. func (c CustomNCrossValidations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = NCrossValidationsModeCustom populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -4133,7 +4855,7 @@ func (c *CustomNCrossValidations) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomSeasonality. func (c CustomSeasonality) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = SeasonalityModeCustom populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -4162,9 +4884,71 @@ func (c *CustomSeasonality) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CustomService. +func (c CustomService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any{} + } + if val != nil { + var aux any + 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 := make(map[string]any) objectMap["mode"] = TargetLagsModeCustom populate(objectMap, "values", c.Values) return json.Marshal(objectMap) @@ -4195,7 +4979,7 @@ func (c *CustomTargetLags) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type CustomTargetRollingWindowSize. func (c CustomTargetRollingWindowSize) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = TargetRollingWindowSizeModeCustom populate(objectMap, "value", c.Value) return json.Marshal(objectMap) @@ -4226,7 +5010,7 @@ func (c *CustomTargetRollingWindowSize) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataContainer. func (d DataContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) @@ -4269,7 +5053,7 @@ func (d *DataContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataContainerProperties. func (d DataContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dataType", d.DataType) populate(objectMap, "description", d.Description) populate(objectMap, "isArchived", d.IsArchived) @@ -4320,7 +5104,7 @@ func (d *DataContainerProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataContainerResourceArmPaginatedResult. func (d DataContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -4351,7 +5135,7 @@ func (d *DataContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) err // MarshalJSON implements the json.Marshaller interface for type DataFactory. func (d DataFactory) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", d.ComputeLocation) objectMap["computeType"] = ComputeTypeDataFactory populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) @@ -4414,7 +5198,7 @@ func (d *DataFactory) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataLakeAnalytics. func (d DataLakeAnalytics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", d.ComputeLocation) objectMap["computeType"] = ComputeTypeDataLakeAnalytics populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) @@ -4481,7 +5265,7 @@ func (d *DataLakeAnalytics) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataLakeAnalyticsSchema. func (d DataLakeAnalyticsSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", d.Properties) return json.Marshal(objectMap) } @@ -4508,7 +5292,7 @@ func (d *DataLakeAnalyticsSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataLakeAnalyticsSchemaProperties. func (d DataLakeAnalyticsSchemaProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dataLakeStoreAccountName", d.DataLakeStoreAccountName) return json.Marshal(objectMap) } @@ -4535,7 +5319,7 @@ func (d *DataLakeAnalyticsSchemaProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataPathAssetReference. func (d DataPathAssetReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "datastoreId", d.DatastoreID) populate(objectMap, "path", d.Path) objectMap["referenceType"] = ReferenceTypeDataPath @@ -4570,7 +5354,7 @@ func (d *DataPathAssetReference) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataVersionBase. func (d DataVersionBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) @@ -4613,7 +5397,7 @@ func (d *DataVersionBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataVersionBaseProperties. func (d DataVersionBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["dataType"] = d.DataType populate(objectMap, "dataUri", d.DataURI) populate(objectMap, "description", d.Description) @@ -4664,7 +5448,7 @@ func (d *DataVersionBaseProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DataVersionBaseResourceArmPaginatedResult. func (d DataVersionBaseResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -4695,7 +5479,7 @@ func (d *DataVersionBaseResourceArmPaginatedResult) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type Databricks. func (d Databricks) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", d.ComputeLocation) objectMap["computeType"] = ComputeTypeDatabricks populateTimeRFC3339(objectMap, "createdOn", d.CreatedOn) @@ -4762,7 +5546,7 @@ func (d *Databricks) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatabricksComputeSecrets. func (d DatabricksComputeSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["computeType"] = ComputeTypeDatabricks populate(objectMap, "databricksAccessToken", d.DatabricksAccessToken) return json.Marshal(objectMap) @@ -4793,7 +5577,7 @@ func (d *DatabricksComputeSecrets) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatabricksComputeSecretsProperties. func (d DatabricksComputeSecretsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "databricksAccessToken", d.DatabricksAccessToken) return json.Marshal(objectMap) } @@ -4820,7 +5604,7 @@ func (d *DatabricksComputeSecretsProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatabricksProperties. func (d DatabricksProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "databricksAccessToken", d.DatabricksAccessToken) populate(objectMap, "workspaceUrl", d.WorkspaceURL) return json.Marshal(objectMap) @@ -4851,7 +5635,7 @@ func (d *DatabricksProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatabricksSchema. func (d DatabricksSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", d.Properties) return json.Marshal(objectMap) } @@ -4876,9 +5660,56 @@ func (d *DatabricksSchema) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DatasetExportSummary. +func (d DatasetExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "id", d.ID) populate(objectMap, "name", d.Name) populate(objectMap, "properties", d.Properties) @@ -4921,7 +5752,7 @@ func (d *Datastore) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatastoreCredentials. func (d DatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["credentialsType"] = d.CredentialsType return json.Marshal(objectMap) } @@ -4948,7 +5779,7 @@ func (d *DatastoreCredentials) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatastoreProperties. func (d DatastoreProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "credentials", d.Credentials) objectMap["datastoreType"] = d.DatastoreType populate(objectMap, "description", d.Description) @@ -4995,7 +5826,7 @@ func (d *DatastoreProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatastoreResourceArmPaginatedResult. func (d DatastoreResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", d.NextLink) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) @@ -5026,7 +5857,7 @@ func (d *DatastoreResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DatastoreSecrets. func (d DatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["secretsType"] = d.SecretsType return json.Marshal(objectMap) } @@ -5053,7 +5884,7 @@ func (d *DatastoreSecrets) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DefaultScaleSettings. func (d DefaultScaleSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["scaleType"] = ScaleTypeDefault return json.Marshal(objectMap) } @@ -5080,7 +5911,7 @@ func (d *DefaultScaleSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentLogs. func (d DeploymentLogs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "content", d.Content) return json.Marshal(objectMap) } @@ -5107,7 +5938,7 @@ func (d *DeploymentLogs) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentLogsRequest. func (d DeploymentLogsRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "containerType", d.ContainerType) populate(objectMap, "tail", d.Tail) return json.Marshal(objectMap) @@ -5138,9 +5969,10 @@ func (d *DeploymentLogsRequest) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DeploymentResourceConfiguration. func (d DeploymentResourceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instanceCount", d.InstanceCount) populate(objectMap, "instanceType", d.InstanceType) + populate(objectMap, "locations", d.Locations) populate(objectMap, "properties", d.Properties) return json.Marshal(objectMap) } @@ -5160,6 +5992,9 @@ func (d *DeploymentResourceConfiguration) UnmarshalJSON(data []byte) error { case "instanceType": err = unpopulate(val, "InstanceType", &d.InstanceType) delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &d.Locations) + delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &d.Properties) delete(rawMsg, key) @@ -5173,7 +6008,7 @@ func (d *DeploymentResourceConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnoseRequestProperties. func (d DiagnoseRequestProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationInsights", d.ApplicationInsights) populate(objectMap, "containerRegistry", d.ContainerRegistry) populate(objectMap, "dnsResolution", d.DNSResolution) @@ -5232,7 +6067,7 @@ func (d *DiagnoseRequestProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnoseResponseResult. func (d DiagnoseResponseResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } @@ -5259,7 +6094,7 @@ func (d *DiagnoseResponseResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnoseResponseResultValue. func (d DiagnoseResponseResultValue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationInsightsResults", d.ApplicationInsightsResults) populate(objectMap, "containerRegistryResults", d.ContainerRegistryResults) populate(objectMap, "dnsResolutionResults", d.DNSResolutionResults) @@ -5318,7 +6153,7 @@ func (d *DiagnoseResponseResultValue) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnoseResult. func (d DiagnoseResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "code", d.Code) populate(objectMap, "level", d.Level) populate(objectMap, "message", d.Message) @@ -5353,7 +6188,7 @@ func (d *DiagnoseResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DiagnoseWorkspaceParameters. func (d DiagnoseWorkspaceParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", d.Value) return json.Marshal(objectMap) } @@ -5380,7 +6215,7 @@ func (d *DiagnoseWorkspaceParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type DistributionConfiguration. func (d DistributionConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["distributionType"] = d.DistributionType return json.Marshal(objectMap) } @@ -5405,9 +6240,51 @@ func (d *DistributionConfiguration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type EarlyTerminationPolicy. -func (e EarlyTerminationPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// MarshalJSON implements the json.Marshaller interface for type Docker. +func (d Docker) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any{} + } + if val != nil { + var aux any + 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]any) populate(objectMap, "delayEvaluation", e.DelayEvaluation) populate(objectMap, "evaluationInterval", e.EvaluationInterval) objectMap["policyType"] = e.PolicyType @@ -5442,7 +6319,7 @@ func (e *EarlyTerminationPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EncryptionKeyVaultProperties. func (e EncryptionKeyVaultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "identityClientId", e.IdentityClientID) populate(objectMap, "keyIdentifier", e.KeyIdentifier) populate(objectMap, "keyVaultArmId", e.KeyVaultArmID) @@ -5475,9 +6352,36 @@ func (e *EncryptionKeyVaultProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EncryptionKeyVaultUpdateProperties. +func (e EncryptionKeyVaultUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "identity", e.Identity) populate(objectMap, "keyVaultProperties", e.KeyVaultProperties) populate(objectMap, "status", e.Status) @@ -5510,9 +6414,79 @@ func (e *EncryptionProperty) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type EncryptionUpdateProperties. +func (e EncryptionUpdateProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "primaryKey", e.PrimaryKey) populate(objectMap, "secondaryKey", e.SecondaryKey) return json.Marshal(objectMap) @@ -5543,7 +6517,7 @@ func (e *EndpointAuthKeys) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointAuthToken. func (e EndpointAuthToken) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "accessToken", e.AccessToken) populate(objectMap, "expiryTimeUtc", e.ExpiryTimeUTC) populate(objectMap, "refreshAfterTimeUtc", e.RefreshAfterTimeUTC) @@ -5582,7 +6556,7 @@ func (e *EndpointAuthToken) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointDeploymentPropertiesBase. func (e EndpointDeploymentPropertiesBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "codeConfiguration", e.CodeConfiguration) populate(objectMap, "description", e.Description) populate(objectMap, "environmentId", e.EnvironmentID) @@ -5625,7 +6599,7 @@ func (e *EndpointDeploymentPropertiesBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointPropertiesBase. func (e EndpointPropertiesBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authMode", e.AuthMode) populate(objectMap, "description", e.Description) populate(objectMap, "keys", e.Keys) @@ -5672,7 +6646,7 @@ func (e *EndpointPropertiesBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EndpointScheduleAction. func (e EndpointScheduleAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["actionType"] = ScheduleActionTypeInvokeBatchEndpoint populate(objectMap, "endpointInvocationDefinition", &e.EndpointInvocationDefinition) return json.Marshal(objectMap) @@ -5703,7 +6677,7 @@ func (e *EndpointScheduleAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EnvironmentContainer. func (e EnvironmentContainer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) populate(objectMap, "properties", e.Properties) @@ -5746,12 +6720,13 @@ func (e *EnvironmentContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EnvironmentContainerProperties. func (e EnvironmentContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", e.Description) populate(objectMap, "isArchived", e.IsArchived) populate(objectMap, "latestVersion", e.LatestVersion) populate(objectMap, "nextVersion", e.NextVersion) populate(objectMap, "properties", e.Properties) + populate(objectMap, "provisioningState", e.ProvisioningState) populate(objectMap, "tags", e.Tags) return json.Marshal(objectMap) } @@ -5780,6 +6755,9 @@ func (e *EnvironmentContainerProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &e.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) @@ -5793,7 +6771,7 @@ func (e *EnvironmentContainerProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EnvironmentContainerResourceArmPaginatedResult. func (e EnvironmentContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -5822,9 +6800,55 @@ func (e *EnvironmentContainerResourceArmPaginatedResult) UnmarshalJSON(data []by return nil } +// MarshalJSON implements the json.Marshaller interface for type EnvironmentVariable. +func (e EnvironmentVariable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any{} + } + if val != nil { + var aux any + 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{}) + objectMap := make(map[string]any) populate(objectMap, "id", e.ID) populate(objectMap, "name", e.Name) populate(objectMap, "properties", e.Properties) @@ -5867,7 +6891,7 @@ func (e *EnvironmentVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EnvironmentVersionProperties. func (e EnvironmentVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "autoRebuild", e.AutoRebuild) populate(objectMap, "build", e.Build) populate(objectMap, "condaFile", e.CondaFile) @@ -5879,6 +6903,7 @@ func (e EnvironmentVersionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "isArchived", e.IsArchived) populate(objectMap, "osType", e.OSType) populate(objectMap, "properties", e.Properties) + populate(objectMap, "provisioningState", e.ProvisioningState) populate(objectMap, "tags", e.Tags) return json.Marshal(objectMap) } @@ -5925,6 +6950,9 @@ func (e *EnvironmentVersionProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &e.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &e.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &e.Tags) delete(rawMsg, key) @@ -5938,7 +6966,7 @@ func (e *EnvironmentVersionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EnvironmentVersionResourceArmPaginatedResult. func (e EnvironmentVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", e.NextLink) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) @@ -5969,7 +6997,7 @@ func (e *EnvironmentVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "info", &e.Info) populate(objectMap, "type", e.Type) return json.Marshal(objectMap) @@ -6000,7 +7028,7 @@ func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorDetail. func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "additionalInfo", e.AdditionalInfo) populate(objectMap, "code", e.Code) populate(objectMap, "details", e.Details) @@ -6043,7 +7071,7 @@ func (e *ErrorDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ErrorResponse. func (e ErrorResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "error", e.Error) return json.Marshal(objectMap) } @@ -6070,7 +7098,7 @@ func (e *ErrorResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EstimatedVMPrice. func (e EstimatedVMPrice) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "osType", e.OSType) populate(objectMap, "retailPrice", e.RetailPrice) populate(objectMap, "vmTier", e.VMTier) @@ -6105,7 +7133,7 @@ func (e *EstimatedVMPrice) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type EstimatedVMPrices. func (e EstimatedVMPrices) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "billingCurrency", e.BillingCurrency) populate(objectMap, "unitOfMeasure", e.UnitOfMeasure) populate(objectMap, "values", e.Values) @@ -6138,9 +7166,52 @@ func (e *EstimatedVMPrices) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ExportSummary. +func (e ExportSummary) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "value", e.Value) return json.Marshal(objectMap) } @@ -6167,7 +7238,7 @@ func (e *ExternalFQDNResponse) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FQDNEndpoint. func (f FQDNEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "domainName", f.DomainName) populate(objectMap, "endpointDetails", f.EndpointDetails) return json.Marshal(objectMap) @@ -6198,7 +7269,7 @@ func (f *FQDNEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FQDNEndpointDetail. func (f FQDNEndpointDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "port", f.Port) return json.Marshal(objectMap) } @@ -6225,7 +7296,7 @@ func (f *FQDNEndpointDetail) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FQDNEndpoints. func (f FQDNEndpoints) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", f.Properties) return json.Marshal(objectMap) } @@ -6252,7 +7323,7 @@ func (f *FQDNEndpoints) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type FQDNEndpointsProperties. func (f FQDNEndpointsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "category", f.Category) populate(objectMap, "endpoints", f.Endpoints) return json.Marshal(objectMap) @@ -6281,15 +7352,18 @@ func (f *FQDNEndpointsProperties) UnmarshalJSON(data []byte) error { 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) +// MarshalJSON implements the json.Marshaller interface for type Feature. +func (f Feature) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dataType", f.DataType) + populate(objectMap, "description", f.Description) + populate(objectMap, "featureName", f.FeatureName) + populate(objectMap, "tags", f.Tags) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturizationSettings. -func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Feature. +func (f *Feature) UnmarshalJSON(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) @@ -6297,8 +7371,17 @@ func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "datasetLanguage": - err = unpopulate(val, "DatasetLanguage", &f.DatasetLanguage) + case "dataType": + err = unpopulate(val, "DataType", &f.DataType) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "featureName": + err = unpopulate(val, "FeatureName", &f.FeatureName) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) delete(rawMsg, key) } if err != nil { @@ -6308,15 +7391,16 @@ func (f *FeaturizationSettings) UnmarshalJSON(data []byte) error { 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) +// MarshalJSON implements the json.Marshaller interface for type FeatureArmPaginatedResult. +func (f FeatureArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type FlavorData. -func (f *FlavorData) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureArmPaginatedResult. +func (f *FeatureArmPaginatedResult) UnmarshalJSON(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) @@ -6324,8 +7408,11 @@ func (f *FlavorData) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "data": - err = unpopulate(val, "Data", &f.Data) + case "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) delete(rawMsg, key) } if err != nil { @@ -6335,15 +7422,17 @@ func (f *FlavorData) UnmarshalJSON(data []byte) error { 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 +// MarshalJSON implements the json.Marshaller interface for type FeatureStoreSettings. +func (f FeatureStoreSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "computeRuntime", f.ComputeRuntime) + populate(objectMap, "offlineStoreConnectionName", f.OfflineStoreConnectionName) + populate(objectMap, "onlineStoreConnectionName", f.OnlineStoreConnectionName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ForecastHorizon. -func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureStoreSettings. +func (f *FeatureStoreSettings) UnmarshalJSON(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) @@ -6351,8 +7440,14 @@ func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "mode": - err = unpopulate(val, "Mode", &f.Mode) + case "computeRuntime": + err = unpopulate(val, "ComputeRuntime", &f.ComputeRuntime) + delete(rawMsg, key) + case "offlineStoreConnectionName": + err = unpopulate(val, "OfflineStoreConnectionName", &f.OfflineStoreConnectionName) + delete(rawMsg, key) + case "onlineStoreConnectionName": + err = unpopulate(val, "OnlineStoreConnectionName", &f.OnlineStoreConnectionName) delete(rawMsg, key) } if err != nil { @@ -6362,30 +7457,16 @@ func (f *ForecastHorizon) UnmarshalJSON(data []byte) error { 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) +// MarshalJSON implements the json.Marshaller interface for type FeatureWindow. +func (f FeatureWindow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "featureWindowEnd", f.FeatureWindowEnd) + populateTimeRFC3339(objectMap, "featureWindowStart", f.FeatureWindowStart) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type Forecasting. -func (f *Forecasting) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type FeatureWindow. +func (f *FeatureWindow) UnmarshalJSON(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) @@ -6393,53 +7474,11 @@ func (f *Forecasting) UnmarshalJSON(data []byte) error { 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) + case "featureWindowEnd": + err = unpopulateTimeRFC3339(val, "FeatureWindowEnd", &f.FeatureWindowEnd) delete(rawMsg, key) - case "weightColumnName": - err = unpopulate(val, "WeightColumnName", &f.WeightColumnName) + case "featureWindowStart": + err = unpopulateTimeRFC3339(val, "FeatureWindowStart", &f.FeatureWindowStart) delete(rawMsg, key) } if err != nil { @@ -6449,11 +7488,894 @@ func (f *Forecasting) UnmarshalJSON(data []byte) error { 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) +// MarshalJSON implements the json.Marshaller interface for type FeaturesetContainer. +func (f FeaturesetContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetContainer. +func (f *FeaturesetContainer) UnmarshalJSON(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 "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + 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 FeaturesetContainerProperties. +func (f FeaturesetContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "latestVersion", f.LatestVersion) + populate(objectMap, "nextVersion", f.NextVersion) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetContainerProperties. +func (f *FeaturesetContainerProperties) UnmarshalJSON(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 "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &f.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &f.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + 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 FeaturesetContainerResourceArmPaginatedResult. +func (f FeaturesetContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetContainerResourceArmPaginatedResult. +func (f *FeaturesetContainerResourceArmPaginatedResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + 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 FeaturesetJob. +func (f FeaturesetJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTimeRFC3339(objectMap, "createdDate", f.CreatedDate) + populate(objectMap, "displayName", f.DisplayName) + populate(objectMap, "duration", f.Duration) + populate(objectMap, "experimentId", f.ExperimentID) + populate(objectMap, "featureWindow", f.FeatureWindow) + populate(objectMap, "jobId", f.JobID) + populate(objectMap, "status", f.Status) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetJob. +func (f *FeaturesetJob) UnmarshalJSON(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 "createdDate": + err = unpopulateTimeRFC3339(val, "CreatedDate", &f.CreatedDate) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &f.DisplayName) + delete(rawMsg, key) + case "duration": + err = unpopulate(val, "Duration", &f.Duration) + delete(rawMsg, key) + case "experimentId": + err = unpopulate(val, "ExperimentID", &f.ExperimentID) + delete(rawMsg, key) + case "featureWindow": + err = unpopulate(val, "FeatureWindow", &f.FeatureWindow) + delete(rawMsg, key) + case "jobId": + err = unpopulate(val, "JobID", &f.JobID) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &f.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + 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 FeaturesetJobArmPaginatedResult. +func (f FeaturesetJobArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetJobArmPaginatedResult. +func (f *FeaturesetJobArmPaginatedResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + 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 FeaturesetSpecification. +func (f FeaturesetSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "path", f.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetSpecification. +func (f *FeaturesetSpecification) UnmarshalJSON(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 "path": + err = unpopulate(val, "Path", &f.Path) + 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 FeaturesetVersion. +func (f FeaturesetVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersion. +func (f *FeaturesetVersion) UnmarshalJSON(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 "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + 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 FeaturesetVersionBackfillRequest. +func (f FeaturesetVersionBackfillRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "displayName", f.DisplayName) + populate(objectMap, "featureWindow", f.FeatureWindow) + populate(objectMap, "resource", f.Resource) + populate(objectMap, "sparkConfiguration", f.SparkConfiguration) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionBackfillRequest. +func (f *FeaturesetVersionBackfillRequest) UnmarshalJSON(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 "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &f.DisplayName) + delete(rawMsg, key) + case "featureWindow": + err = unpopulate(val, "FeatureWindow", &f.FeatureWindow) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &f.Resource) + delete(rawMsg, key) + case "sparkConfiguration": + err = unpopulate(val, "SparkConfiguration", &f.SparkConfiguration) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + 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 FeaturesetVersionBackfillResponse. +func (f FeaturesetVersionBackfillResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobId", f.JobID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionBackfillResponse. +func (f *FeaturesetVersionBackfillResponse) UnmarshalJSON(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 "jobId": + err = unpopulate(val, "JobID", &f.JobID) + 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 FeaturesetVersionProperties. +func (f FeaturesetVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "entities", f.Entities) + populate(objectMap, "isAnonymous", f.IsAnonymous) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "materializationSettings", f.MaterializationSettings) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "specification", f.Specification) + populate(objectMap, "stage", f.Stage) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionProperties. +func (f *FeaturesetVersionProperties) UnmarshalJSON(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 "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "entities": + err = unpopulate(val, "Entities", &f.Entities) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &f.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) + delete(rawMsg, key) + case "materializationSettings": + err = unpopulate(val, "MaterializationSettings", &f.MaterializationSettings) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "specification": + err = unpopulate(val, "Specification", &f.Specification) + delete(rawMsg, key) + case "stage": + err = unpopulate(val, "Stage", &f.Stage) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + 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 FeaturesetVersionResourceArmPaginatedResult. +func (f FeaturesetVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturesetVersionResourceArmPaginatedResult. +func (f *FeaturesetVersionResourceArmPaginatedResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + 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 FeaturestoreEntityContainer. +func (f FeaturestoreEntityContainer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityContainer. +func (f *FeaturestoreEntityContainer) UnmarshalJSON(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 "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + 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 FeaturestoreEntityContainerProperties. +func (f FeaturestoreEntityContainerProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "latestVersion", f.LatestVersion) + populate(objectMap, "nextVersion", f.NextVersion) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityContainerProperties. +func (f *FeaturestoreEntityContainerProperties) UnmarshalJSON(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 "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) + delete(rawMsg, key) + case "latestVersion": + err = unpopulate(val, "LatestVersion", &f.LatestVersion) + delete(rawMsg, key) + case "nextVersion": + err = unpopulate(val, "NextVersion", &f.NextVersion) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + 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 FeaturestoreEntityContainerResourceArmPaginatedResult. +func (f FeaturestoreEntityContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityContainerResourceArmPaginatedResult. +func (f *FeaturestoreEntityContainerResourceArmPaginatedResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + 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 FeaturestoreEntityVersion. +func (f FeaturestoreEntityVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "systemData", f.SystemData) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityVersion. +func (f *FeaturestoreEntityVersion) UnmarshalJSON(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 "id": + err = unpopulate(val, "ID", &f.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &f.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &f.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &f.Type) + 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 FeaturestoreEntityVersionProperties. +func (f FeaturestoreEntityVersionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", f.Description) + populate(objectMap, "indexColumns", f.IndexColumns) + populate(objectMap, "isAnonymous", f.IsAnonymous) + populate(objectMap, "isArchived", f.IsArchived) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "tags", f.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityVersionProperties. +func (f *FeaturestoreEntityVersionProperties) UnmarshalJSON(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 "description": + err = unpopulate(val, "Description", &f.Description) + delete(rawMsg, key) + case "indexColumns": + err = unpopulate(val, "IndexColumns", &f.IndexColumns) + delete(rawMsg, key) + case "isAnonymous": + err = unpopulate(val, "IsAnonymous", &f.IsAnonymous) + delete(rawMsg, key) + case "isArchived": + err = unpopulate(val, "IsArchived", &f.IsArchived) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &f.Properties) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &f.ProvisioningState) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &f.Tags) + 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 FeaturestoreEntityVersionResourceArmPaginatedResult. +func (f FeaturestoreEntityVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FeaturestoreEntityVersionResourceArmPaginatedResult. +func (f *FeaturestoreEntityVersionResourceArmPaginatedResult) UnmarshalJSON(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 "nextLink": + err = unpopulate(val, "NextLink", &f.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &f.Value) + 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]any) + 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]any) + 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]any) + 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]any) + populate(objectMap, "cvSplitColumnNames", f.CvSplitColumnNames) + populate(objectMap, "featurizationSettings", f.FeaturizationSettings) + populate(objectMap, "fixedParameters", f.FixedParameters) + populate(objectMap, "forecastingSettings", f.ForecastingSettings) + populate(objectMap, "limitSettings", f.LimitSettings) + populate(objectMap, "logVerbosity", f.LogVerbosity) + populate(objectMap, "nCrossValidations", f.NCrossValidations) + populate(objectMap, "primaryMetric", f.PrimaryMetric) + populate(objectMap, "searchSpace", f.SearchSpace) + populate(objectMap, "sweepSettings", f.SweepSettings) + populate(objectMap, "targetColumnName", f.TargetColumnName) + objectMap["taskType"] = TaskTypeForecasting + populate(objectMap, "testData", f.TestData) + populate(objectMap, "testDataSize", f.TestDataSize) + populate(objectMap, "trainingData", f.TrainingData) + populate(objectMap, "trainingSettings", f.TrainingSettings) + populate(objectMap, "validationData", f.ValidationData) + populate(objectMap, "validationDataSize", f.ValidationDataSize) + populate(objectMap, "weightColumnName", f.WeightColumnName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Forecasting. +func (f *Forecasting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "cvSplitColumnNames": + err = unpopulate(val, "CvSplitColumnNames", &f.CvSplitColumnNames) + delete(rawMsg, key) + case "featurizationSettings": + err = unpopulate(val, "FeaturizationSettings", &f.FeaturizationSettings) + delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &f.FixedParameters) + delete(rawMsg, key) + case "forecastingSettings": + err = unpopulate(val, "ForecastingSettings", &f.ForecastingSettings) + delete(rawMsg, key) + case "limitSettings": + err = unpopulate(val, "LimitSettings", &f.LimitSettings) + delete(rawMsg, key) + case "logVerbosity": + err = unpopulate(val, "LogVerbosity", &f.LogVerbosity) + delete(rawMsg, key) + case "nCrossValidations": + f.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) + delete(rawMsg, key) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &f.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &f.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &f.SweepSettings) + delete(rawMsg, key) + case "targetColumnName": + err = unpopulate(val, "TargetColumnName", &f.TargetColumnName) + delete(rawMsg, key) + case "taskType": + err = unpopulate(val, "TaskType", &f.TaskType) + delete(rawMsg, key) + case "testData": + err = unpopulate(val, "TestData", &f.TestData) + delete(rawMsg, key) + case "testDataSize": + err = unpopulate(val, "TestDataSize", &f.TestDataSize) + delete(rawMsg, key) + case "trainingData": + err = unpopulate(val, "TrainingData", &f.TrainingData) + delete(rawMsg, key) + case "trainingSettings": + err = unpopulate(val, "TrainingSettings", &f.TrainingSettings) + delete(rawMsg, key) + case "validationData": + err = unpopulate(val, "ValidationData", &f.ValidationData) + delete(rawMsg, key) + case "validationDataSize": + err = unpopulate(val, "ValidationDataSize", &f.ValidationDataSize) + delete(rawMsg, key) + case "weightColumnName": + err = unpopulate(val, "WeightColumnName", &f.WeightColumnName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", f, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ForecastingSettings. +func (f ForecastingSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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) @@ -6526,7 +8448,7 @@ func (f *ForecastingSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ForecastingTrainingSettings. func (f ForecastingTrainingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowedTrainingAlgorithms", f.AllowedTrainingAlgorithms) populate(objectMap, "blockedTrainingAlgorithms", f.BlockedTrainingAlgorithms) populate(objectMap, "enableDnnTraining", f.EnableDnnTraining) @@ -6536,6 +8458,7 @@ func (f ForecastingTrainingSettings) MarshalJSON() ([]byte, error) { populate(objectMap, "enableVoteEnsemble", f.EnableVoteEnsemble) populate(objectMap, "ensembleModelDownloadTimeout", f.EnsembleModelDownloadTimeout) populate(objectMap, "stackEnsembleSettings", f.StackEnsembleSettings) + populate(objectMap, "trainingMode", f.TrainingMode) return json.Marshal(objectMap) } @@ -6575,6 +8498,9 @@ func (f *ForecastingTrainingSettings) UnmarshalJSON(data []byte) error { case "stackEnsembleSettings": err = unpopulate(val, "StackEnsembleSettings", &f.StackEnsembleSettings) delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &f.TrainingMode) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", f, err) @@ -6583,9 +8509,36 @@ func (f *ForecastingTrainingSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type GetFeatureRequest. +func (g GetFeatureRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "featureName", g.FeatureName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GetFeatureRequest. +func (g *GetFeatureRequest) UnmarshalJSON(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 "featureName": + err = unpopulate(val, "FeatureName", &g.FeatureName) + 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 GridSamplingAlgorithm. func (g GridSamplingAlgorithm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeGrid return json.Marshal(objectMap) } @@ -6612,7 +8565,7 @@ func (g *GridSamplingAlgorithm) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HDInsight. func (h HDInsight) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", h.ComputeLocation) objectMap["computeType"] = ComputeTypeHDInsight populateTimeRFC3339(objectMap, "createdOn", h.CreatedOn) @@ -6679,15 +8632,48 @@ func (h *HDInsight) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type HDInsightProperties. func (h HDInsightProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) 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 { +// 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]any) + 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) @@ -6695,14 +8681,8 @@ func (h *HDInsightProperties) UnmarshalJSON(data []byte) error { 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) + case "properties": + err = unpopulate(val, "Properties", &h.Properties) delete(rawMsg, key) } if err != nil { @@ -6712,15 +8692,23 @@ func (h *HDInsightProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type HDInsightSchema. -func (h HDInsightSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) +// MarshalJSON implements the json.Marshaller interface for type HdfsDatastore. +func (h HdfsDatastore) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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 HDInsightSchema. -func (h *HDInsightSchema) UnmarshalJSON(data []byte) error { +// 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) @@ -6728,9 +8716,33 @@ func (h *HDInsightSchema) UnmarshalJSON(data []byte) error { 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) @@ -6741,7 +8753,7 @@ func (h *HDInsightSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IDAssetReference. func (i IDAssetReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "assetId", i.AssetID) objectMap["referenceType"] = ReferenceTypeID return json.Marshal(objectMap) @@ -6772,7 +8784,7 @@ func (i *IDAssetReference) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IdentityConfiguration. func (i IdentityConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["identityType"] = i.IdentityType return json.Marshal(objectMap) } @@ -6799,7 +8811,7 @@ func (i *IdentityConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type IdentityForCmk. func (i IdentityForCmk) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "userAssignedIdentity", i.UserAssignedIdentity) return json.Marshal(objectMap) } @@ -6824,9 +8836,82 @@ func (i *IdentityForCmk) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type IdleShutdownSetting. +func (i IdleShutdownSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any) + 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]any{} + } + if val != nil { + var aux any + 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{}) + objectMap := make(map[string]any) populate(objectMap, "limitSettings", i.LimitSettings) populate(objectMap, "logVerbosity", i.LogVerbosity) populate(objectMap, "modelSettings", i.ModelSettings) @@ -6893,7 +8978,7 @@ func (i *ImageClassification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageClassificationBase. func (i ImageClassificationBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limitSettings", i.LimitSettings) populate(objectMap, "modelSettings", i.ModelSettings) populate(objectMap, "searchSpace", i.SearchSpace) @@ -6940,7 +9025,7 @@ func (i *ImageClassificationBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageClassificationMultilabel. func (i ImageClassificationMultilabel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limitSettings", i.LimitSettings) populate(objectMap, "logVerbosity", i.LogVerbosity) populate(objectMap, "modelSettings", i.ModelSettings) @@ -7007,7 +9092,7 @@ func (i *ImageClassificationMultilabel) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageInstanceSegmentation. func (i ImageInstanceSegmentation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limitSettings", i.LimitSettings) populate(objectMap, "logVerbosity", i.LogVerbosity) populate(objectMap, "modelSettings", i.ModelSettings) @@ -7074,7 +9159,7 @@ func (i *ImageInstanceSegmentation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageLimitSettings. func (i ImageLimitSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "maxConcurrentTrials", i.MaxConcurrentTrials) populate(objectMap, "maxTrials", i.MaxTrials) populate(objectMap, "timeout", i.Timeout) @@ -7107,9 +9192,44 @@ func (i *ImageLimitSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ImageMetadata. +func (i ImageMetadata) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "currentImageVersion", i.CurrentImageVersion) + populate(objectMap, "isLatestOsImageVersion", i.IsLatestOsImageVersion) + populate(objectMap, "latestImageVersion", i.LatestImageVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ImageMetadata. +func (i *ImageMetadata) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "currentImageVersion": + err = unpopulate(val, "CurrentImageVersion", &i.CurrentImageVersion) + delete(rawMsg, key) + case "isLatestOsImageVersion": + err = unpopulate(val, "IsLatestOsImageVersion", &i.IsLatestOsImageVersion) + delete(rawMsg, key) + case "latestImageVersion": + err = unpopulate(val, "LatestImageVersion", &i.LatestImageVersion) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettings. func (i ImageModelDistributionSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "amsGradient", i.AmsGradient) populate(objectMap, "augmentations", i.Augmentations) populate(objectMap, "beta1", i.Beta1) @@ -7244,7 +9364,7 @@ func (i *ImageModelDistributionSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsClassification. func (i ImageModelDistributionSettingsClassification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "amsGradient", i.AmsGradient) populate(objectMap, "augmentations", i.Augmentations) populate(objectMap, "beta1", i.Beta1) @@ -7395,7 +9515,7 @@ func (i *ImageModelDistributionSettingsClassification) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type ImageModelDistributionSettingsObjectDetection. func (i ImageModelDistributionSettingsObjectDetection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "amsGradient", i.AmsGradient) populate(objectMap, "augmentations", i.Augmentations) populate(objectMap, "beta1", i.Beta1) @@ -7582,7 +9702,7 @@ func (i *ImageModelDistributionSettingsObjectDetection) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type ImageModelSettings. func (i ImageModelSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "advancedSettings", i.AdvancedSettings) populate(objectMap, "amsGradient", i.AmsGradient) populate(objectMap, "augmentations", i.Augmentations) @@ -7733,7 +9853,7 @@ func (i *ImageModelSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsClassification. func (i ImageModelSettingsClassification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "advancedSettings", i.AdvancedSettings) populate(objectMap, "amsGradient", i.AmsGradient) populate(objectMap, "augmentations", i.Augmentations) @@ -7900,7 +10020,7 @@ func (i *ImageModelSettingsClassification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageModelSettingsObjectDetection. func (i ImageModelSettingsObjectDetection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "advancedSettings", i.AdvancedSettings) populate(objectMap, "amsGradient", i.AmsGradient) populate(objectMap, "augmentations", i.Augmentations) @@ -8103,7 +10223,7 @@ func (i *ImageModelSettingsObjectDetection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageObjectDetection. func (i ImageObjectDetection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limitSettings", i.LimitSettings) populate(objectMap, "logVerbosity", i.LogVerbosity) populate(objectMap, "modelSettings", i.ModelSettings) @@ -8170,7 +10290,7 @@ func (i *ImageObjectDetection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageObjectDetectionBase. func (i ImageObjectDetectionBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limitSettings", i.LimitSettings) populate(objectMap, "modelSettings", i.ModelSettings) populate(objectMap, "searchSpace", i.SearchSpace) @@ -8217,7 +10337,7 @@ func (i *ImageObjectDetectionBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageSweepSettings. func (i ImageSweepSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "earlyTermination", i.EarlyTermination) populate(objectMap, "samplingAlgorithm", i.SamplingAlgorithm) return json.Marshal(objectMap) @@ -8248,7 +10368,7 @@ func (i *ImageSweepSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ImageVertical. func (i ImageVertical) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limitSettings", i.LimitSettings) populate(objectMap, "sweepSettings", i.SweepSettings) populate(objectMap, "validationData", i.ValidationData) @@ -8285,9 +10405,40 @@ func (i *ImageVertical) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type IndexColumn. +func (i IndexColumn) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "columnName", i.ColumnName) + populate(objectMap, "dataType", i.DataType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IndexColumn. +func (i *IndexColumn) UnmarshalJSON(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 "columnName": + err = unpopulate(val, "ColumnName", &i.ColumnName) + delete(rawMsg, key) + case "dataType": + err = unpopulate(val, "DataType", &i.DataType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "livenessRoute", i.LivenessRoute) populate(objectMap, "readinessRoute", i.ReadinessRoute) populate(objectMap, "scoringRoute", i.ScoringRoute) @@ -8320,9 +10471,36 @@ func (i *InferenceContainerProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type InferencingServer. +func (i InferencingServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["serverType"] = i.ServerType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type InferencingServer. +func (i *InferencingServer) UnmarshalJSON(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 "serverType": + err = unpopulate(val, "ServerType", &i.ServerType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "nodeSelector", i.NodeSelector) populate(objectMap, "resources", i.Resources) return json.Marshal(objectMap) @@ -8353,7 +10531,7 @@ func (i *InstanceTypeSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type InstanceTypeSchemaResources. func (i InstanceTypeSchemaResources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "limits", i.Limits) populate(objectMap, "requests", i.Requests) return json.Marshal(objectMap) @@ -8384,7 +10562,7 @@ func (i *InstanceTypeSchemaResources) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobBase. func (j JobBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", j.ID) populate(objectMap, "name", j.Name) populate(objectMap, "properties", j.Properties) @@ -8427,7 +10605,7 @@ func (j *JobBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobBaseProperties. func (j JobBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "componentId", j.ComponentID) populate(objectMap, "computeId", j.ComputeID) populate(objectMap, "description", j.Description) @@ -8436,6 +10614,7 @@ func (j JobBaseProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "identity", j.Identity) populate(objectMap, "isArchived", j.IsArchived) objectMap["jobType"] = j.JobType + populate(objectMap, "notificationSetting", j.NotificationSetting) populate(objectMap, "properties", j.Properties) populate(objectMap, "services", j.Services) populate(objectMap, "status", j.Status) @@ -8476,6 +10655,9 @@ func (j *JobBaseProperties) UnmarshalJSON(data []byte) error { case "jobType": err = unpopulate(val, "JobType", &j.JobType) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &j.NotificationSetting) + delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &j.Properties) delete(rawMsg, key) @@ -8498,7 +10680,7 @@ func (j *JobBaseProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobBaseResourceArmPaginatedResult. func (j JobBaseResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", j.NextLink) populate(objectMap, "value", j.Value) return json.Marshal(objectMap) @@ -8529,7 +10711,7 @@ func (j *JobBaseResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobInput. func (j JobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", j.Description) objectMap["jobInputType"] = j.JobInputType return json.Marshal(objectMap) @@ -8560,7 +10742,7 @@ func (j *JobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobLimits. func (j JobLimits) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["jobLimitsType"] = j.JobLimitsType populate(objectMap, "timeout", j.Timeout) return json.Marshal(objectMap) @@ -8591,7 +10773,7 @@ func (j *JobLimits) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobOutput. func (j JobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", j.Description) objectMap["jobOutputType"] = j.JobOutputType return json.Marshal(objectMap) @@ -8622,10 +10804,11 @@ func (j *JobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobResourceConfiguration. func (j JobResourceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "dockerArgs", j.DockerArgs) populate(objectMap, "instanceCount", j.InstanceCount) populate(objectMap, "instanceType", j.InstanceType) + populate(objectMap, "locations", j.Locations) populate(objectMap, "properties", j.Properties) populate(objectMap, "shmSize", j.ShmSize) return json.Marshal(objectMap) @@ -8649,6 +10832,9 @@ func (j *JobResourceConfiguration) UnmarshalJSON(data []byte) error { case "instanceType": err = unpopulate(val, "InstanceType", &j.InstanceType) delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &j.Locations) + delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &j.Properties) delete(rawMsg, key) @@ -8665,7 +10851,7 @@ func (j *JobResourceConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobScheduleAction. func (j JobScheduleAction) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["actionType"] = ScheduleActionTypeCreateJob populate(objectMap, "jobDefinition", j.JobDefinition) return json.Marshal(objectMap) @@ -8696,10 +10882,11 @@ func (j *JobScheduleAction) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type JobService. func (j JobService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "endpoint", j.Endpoint) populate(objectMap, "errorMessage", j.ErrorMessage) populate(objectMap, "jobServiceType", j.JobServiceType) + populate(objectMap, "nodes", j.Nodes) populate(objectMap, "port", j.Port) populate(objectMap, "properties", j.Properties) populate(objectMap, "status", j.Status) @@ -8724,18 +10911,204 @@ func (j *JobService) UnmarshalJSON(data []byte) error { case "jobServiceType": err = unpopulate(val, "JobServiceType", &j.JobServiceType) delete(rawMsg, key) + case "nodes": + j.Nodes, err = unmarshalNodesClassification(val) + delete(rawMsg, key) case "port": err = unpopulate(val, "Port", &j.Port) delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &j.Properties) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &j.Status) + 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]any) + 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]any) + 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]any) + 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]any) + 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]any) + 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil @@ -8743,7 +11116,7 @@ func (j *JobService) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Kubernetes. func (k Kubernetes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", k.ComputeLocation) objectMap["computeType"] = ComputeTypeKubernetes populateTimeRFC3339(objectMap, "createdOn", k.CreatedOn) @@ -8810,7 +11183,7 @@ func (k *Kubernetes) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KubernetesOnlineDeployment. func (k KubernetesOnlineDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInsightsEnabled", k.AppInsightsEnabled) populate(objectMap, "codeConfiguration", k.CodeConfiguration) populate(objectMap, "containerResourceRequirements", k.ContainerResourceRequirements) @@ -8901,7 +11274,7 @@ func (k *KubernetesOnlineDeployment) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KubernetesProperties. func (k KubernetesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "defaultInstanceType", k.DefaultInstanceType) populate(objectMap, "extensionInstanceReleaseTrain", k.ExtensionInstanceReleaseTrain) populate(objectMap, "extensionPrincipalId", k.ExtensionPrincipalID) @@ -8956,7 +11329,7 @@ func (k *KubernetesProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KubernetesSchema. func (k KubernetesSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", k.Properties) return json.Marshal(objectMap) } @@ -8975,7 +11348,409 @@ func (k *KubernetesSchema) UnmarshalJSON(data []byte) error { delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + 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]any) + populate(objectMap, "classes", l.Classes) + populate(objectMap, "displayName", l.DisplayName) + populate(objectMap, "multiSelect", l.MultiSelect) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelCategory. +func (l *LabelCategory) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "classes": + err = unpopulate(val, "Classes", &l.Classes) + delete(rawMsg, key) + case "displayName": + err = unpopulate(val, "DisplayName", &l.DisplayName) + delete(rawMsg, key) + case "multiSelect": + err = unpopulate(val, "MultiSelect", &l.MultiSelect) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelClass. +func (l LabelClass) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any) + populate(objectMap, "dataId", l.DataID) + populate(objectMap, "incrementalDataRefresh", l.IncrementalDataRefresh) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LabelingDataConfiguration. +func (l *LabelingDataConfiguration) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dataId": + err = unpopulate(val, "DataID", &l.DataID) + delete(rawMsg, key) + case "incrementalDataRefresh": + err = unpopulate(val, "IncrementalDataRefresh", &l.IncrementalDataRefresh) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LabelingJob. +func (l LabelingJob) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any) + 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]any) + 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]any) + 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]any) + 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, "notificationSetting", l.NotificationSetting) + 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 "notificationSetting": + err = unpopulate(val, "NotificationSetting", &l.NotificationSetting) + 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]any) + 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]any) + 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 @@ -8983,7 +11758,7 @@ func (k *KubernetesSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListAmlUserFeatureResult. func (l ListAmlUserFeatureResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -9014,7 +11789,7 @@ func (l *ListAmlUserFeatureResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListNotebookKeysResult. func (l ListNotebookKeysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "primaryAccessKey", l.PrimaryAccessKey) populate(objectMap, "secondaryAccessKey", l.SecondaryAccessKey) return json.Marshal(objectMap) @@ -9045,7 +11820,7 @@ func (l *ListNotebookKeysResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListStorageAccountKeysResult. func (l ListStorageAccountKeysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "userStorageKey", l.UserStorageKey) return json.Marshal(objectMap) } @@ -9072,7 +11847,7 @@ func (l *ListStorageAccountKeysResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListUsagesResult. func (l ListUsagesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -9103,7 +11878,7 @@ func (l *ListUsagesResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListWorkspaceKeysResult. func (l ListWorkspaceKeysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInsightsInstrumentationKey", l.AppInsightsInstrumentationKey) populate(objectMap, "containerRegistryCredentials", l.ContainerRegistryCredentials) populate(objectMap, "notebookAccessKeys", l.NotebookAccessKeys) @@ -9146,7 +11921,7 @@ func (l *ListWorkspaceKeysResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ListWorkspaceQuotas. func (l ListWorkspaceQuotas) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", l.NextLink) populate(objectMap, "value", l.Value) return json.Marshal(objectMap) @@ -9177,7 +11952,7 @@ func (l *ListWorkspaceQuotas) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type LiteralJobInput. func (l LiteralJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", l.Description) objectMap["jobInputType"] = JobInputTypeLiteral populate(objectMap, "value", l.Value) @@ -9210,9 +11985,98 @@ func (l *LiteralJobInput) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type MLAssistConfiguration. +func (m MLAssistConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any) + 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]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "description", m.Description) objectMap["jobInputType"] = JobInputTypeMlflowModel populate(objectMap, "mode", m.Mode) @@ -9251,7 +12115,9 @@ func (m *MLFlowModelJobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MLFlowModelJobOutput. func (m MLFlowModelJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "assetName", m.AssetName) + populate(objectMap, "assetVersion", m.AssetVersion) populate(objectMap, "description", m.Description) objectMap["jobOutputType"] = JobOutputTypeMlflowModel populate(objectMap, "mode", m.Mode) @@ -9268,6 +12134,12 @@ func (m *MLFlowModelJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "assetName": + err = unpopulate(val, "AssetName", &m.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &m.AssetVersion) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &m.Description) delete(rawMsg, key) @@ -9290,7 +12162,7 @@ func (m *MLFlowModelJobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MLTableData. func (m MLTableData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["dataType"] = DataTypeMltable populate(objectMap, "dataUri", m.DataURI) populate(objectMap, "description", m.Description) @@ -9345,7 +12217,7 @@ func (m *MLTableData) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MLTableJobInput. func (m MLTableJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", m.Description) objectMap["jobInputType"] = JobInputTypeMltable populate(objectMap, "mode", m.Mode) @@ -9384,7 +12256,9 @@ func (m *MLTableJobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type MLTableJobOutput. func (m MLTableJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "assetName", m.AssetName) + populate(objectMap, "assetVersion", m.AssetVersion) populate(objectMap, "description", m.Description) objectMap["jobOutputType"] = JobOutputTypeMltable populate(objectMap, "mode", m.Mode) @@ -9401,6 +12275,12 @@ func (m *MLTableJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "assetName": + err = unpopulate(val, "AssetName", &m.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &m.AssetVersion) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &m.Description) delete(rawMsg, key) @@ -9423,7 +12303,7 @@ func (m *MLTableJobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedIdentity. func (m ManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", m.ClientID) objectMap["identityType"] = IdentityConfigurationTypeManaged populate(objectMap, "objectId", m.ObjectID) @@ -9462,7 +12342,7 @@ func (m *ManagedIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedIdentityAuthTypeWorkspaceConnectionProperties. func (m ManagedIdentityAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = ConnectionAuthTypeManagedIdentity populate(objectMap, "category", m.Category) populate(objectMap, "credentials", m.Credentials) @@ -9509,7 +12389,7 @@ func (m *ManagedIdentityAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(dat // MarshalJSON implements the json.Marshaller interface for type ManagedOnlineDeployment. func (m ManagedOnlineDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInsightsEnabled", m.AppInsightsEnabled) populate(objectMap, "codeConfiguration", m.CodeConfiguration) populate(objectMap, "description", m.Description) @@ -9596,7 +12476,7 @@ func (m *ManagedOnlineDeployment) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "principalId", m.PrincipalID) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) @@ -9633,9 +12513,79 @@ func (m *ManagedServiceIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type MaterializationComputeResource. +func (m MaterializationComputeResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", m.InstanceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializationComputeResource. +func (m *MaterializationComputeResource) UnmarshalJSON(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 "instanceType": + err = unpopulate(val, "InstanceType", &m.InstanceType) + 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 MaterializationSettings. +func (m MaterializationSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "notification", m.Notification) + populate(objectMap, "resource", m.Resource) + populate(objectMap, "schedule", m.Schedule) + populate(objectMap, "sparkConfiguration", m.SparkConfiguration) + populate(objectMap, "storeType", m.StoreType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaterializationSettings. +func (m *MaterializationSettings) UnmarshalJSON(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 "notification": + err = unpopulate(val, "Notification", &m.Notification) + delete(rawMsg, key) + case "resource": + err = unpopulate(val, "Resource", &m.Resource) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &m.Schedule) + delete(rawMsg, key) + case "sparkConfiguration": + err = unpopulate(val, "SparkConfiguration", &m.SparkConfiguration) + delete(rawMsg, key) + case "storeType": + err = unpopulate(val, "StoreType", &m.StoreType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "delayEvaluation", m.DelayEvaluation) populate(objectMap, "evaluationInterval", m.EvaluationInterval) objectMap["policyType"] = EarlyTerminationPolicyTypeMedianStopping @@ -9668,9 +12618,40 @@ func (m *MedianStoppingPolicy) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ModelConfiguration. +func (m ModelConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "mode", m.Mode) + populate(objectMap, "mountPath", m.MountPath) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelConfiguration. +func (m *ModelConfiguration) UnmarshalJSON(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 "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "mountPath": + err = unpopulate(val, "MountPath", &m.MountPath) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "id", m.ID) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -9713,12 +12694,13 @@ func (m *ModelContainer) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ModelContainerProperties. func (m ModelContainerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", m.Description) populate(objectMap, "isArchived", m.IsArchived) populate(objectMap, "latestVersion", m.LatestVersion) populate(objectMap, "nextVersion", m.NextVersion) populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "tags", m.Tags) return json.Marshal(objectMap) } @@ -9747,6 +12729,9 @@ func (m *ModelContainerProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &m.Tags) delete(rawMsg, key) @@ -9760,7 +12745,7 @@ func (m *ModelContainerProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ModelContainerResourceArmPaginatedResult. func (m ModelContainerResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", m.NextLink) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) @@ -9789,9 +12774,48 @@ func (m *ModelContainerResourceArmPaginatedResult) UnmarshalJSON(data []byte) er return nil } +// MarshalJSON implements the json.Marshaller interface for type ModelPackageInput. +func (m ModelPackageInput) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inputType", m.InputType) + populate(objectMap, "mode", m.Mode) + populate(objectMap, "mountPath", m.MountPath) + populate(objectMap, "path", m.Path) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ModelPackageInput. +func (m *ModelPackageInput) UnmarshalJSON(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 "inputType": + err = unpopulate(val, "InputType", &m.InputType) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "mountPath": + err = unpopulate(val, "MountPath", &m.MountPath) + delete(rawMsg, key) + case "path": + m.Path, err = unmarshalPackageInputPathBaseClassification(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 ModelVersion. func (m ModelVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", m.ID) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) @@ -9834,7 +12858,7 @@ func (m *ModelVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ModelVersionProperties. func (m ModelVersionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", m.Description) populate(objectMap, "flavors", m.Flavors) populate(objectMap, "isAnonymous", m.IsAnonymous) @@ -9843,6 +12867,7 @@ func (m ModelVersionProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "modelType", m.ModelType) populate(objectMap, "modelUri", m.ModelURI) populate(objectMap, "properties", m.Properties) + populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "tags", m.Tags) return json.Marshal(objectMap) } @@ -9880,6 +12905,9 @@ func (m *ModelVersionProperties) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) case "tags": err = unpopulate(val, "Tags", &m.Tags) delete(rawMsg, key) @@ -9893,7 +12921,7 @@ func (m *ModelVersionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ModelVersionResourceArmPaginatedResult. func (m ModelVersionResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", m.NextLink) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) @@ -9924,44 +12952,190 @@ func (m *ModelVersionResourceArmPaginatedResult) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type Mpi. func (m Mpi) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) 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 { +// 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]any) + objectMap["mode"] = n.Mode + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NCrossValidations. +func (n *NCrossValidations) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "mode": + err = unpopulate(val, "Mode", &n.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpFixedParameters. +func (n NlpFixedParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gradientAccumulationSteps", n.GradientAccumulationSteps) + populate(objectMap, "learningRate", n.LearningRate) + populate(objectMap, "learningRateScheduler", n.LearningRateScheduler) + populate(objectMap, "modelName", n.ModelName) + populate(objectMap, "numberOfEpochs", n.NumberOfEpochs) + populate(objectMap, "trainingBatchSize", n.TrainingBatchSize) + populate(objectMap, "validationBatchSize", n.ValidationBatchSize) + populate(objectMap, "warmupRatio", n.WarmupRatio) + populate(objectMap, "weightDecay", n.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpFixedParameters. +func (n *NlpFixedParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "gradientAccumulationSteps": + err = unpopulate(val, "GradientAccumulationSteps", &n.GradientAccumulationSteps) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &n.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &n.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &n.ModelName) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &n.NumberOfEpochs) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &n.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &n.ValidationBatchSize) + delete(rawMsg, key) + case "warmupRatio": + err = unpopulate(val, "WarmupRatio", &n.WarmupRatio) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &n.WeightDecay) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type NlpParameterSubspace. +func (n NlpParameterSubspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "gradientAccumulationSteps", n.GradientAccumulationSteps) + populate(objectMap, "learningRate", n.LearningRate) + populate(objectMap, "learningRateScheduler", n.LearningRateScheduler) + populate(objectMap, "modelName", n.ModelName) + populate(objectMap, "numberOfEpochs", n.NumberOfEpochs) + populate(objectMap, "trainingBatchSize", n.TrainingBatchSize) + populate(objectMap, "validationBatchSize", n.ValidationBatchSize) + populate(objectMap, "warmupRatio", n.WarmupRatio) + populate(objectMap, "weightDecay", n.WeightDecay) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpParameterSubspace. +func (n *NlpParameterSubspace) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "distributionType": - err = unpopulate(val, "DistributionType", &m.DistributionType) + case "gradientAccumulationSteps": + err = unpopulate(val, "GradientAccumulationSteps", &n.GradientAccumulationSteps) delete(rawMsg, key) - case "processCountPerInstance": - err = unpopulate(val, "ProcessCountPerInstance", &m.ProcessCountPerInstance) + case "learningRate": + err = unpopulate(val, "LearningRate", &n.LearningRate) + delete(rawMsg, key) + case "learningRateScheduler": + err = unpopulate(val, "LearningRateScheduler", &n.LearningRateScheduler) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &n.ModelName) + delete(rawMsg, key) + case "numberOfEpochs": + err = unpopulate(val, "NumberOfEpochs", &n.NumberOfEpochs) + delete(rawMsg, key) + case "trainingBatchSize": + err = unpopulate(val, "TrainingBatchSize", &n.TrainingBatchSize) + delete(rawMsg, key) + case "validationBatchSize": + err = unpopulate(val, "ValidationBatchSize", &n.ValidationBatchSize) + delete(rawMsg, key) + case "warmupRatio": + err = unpopulate(val, "WarmupRatio", &n.WarmupRatio) + delete(rawMsg, key) + case "weightDecay": + err = unpopulate(val, "WeightDecay", &n.WeightDecay) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, 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 +// MarshalJSON implements the json.Marshaller interface for type NlpSweepSettings. +func (n NlpSweepSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "earlyTermination", n.EarlyTermination) + populate(objectMap, "samplingAlgorithm", n.SamplingAlgorithm) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NCrossValidations. -func (n *NCrossValidations) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NlpSweepSettings. +func (n *NlpSweepSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", n, err) @@ -9969,8 +13143,11 @@ func (n *NCrossValidations) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "mode": - err = unpopulate(val, "Mode", &n.Mode) + case "earlyTermination": + n.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) + delete(rawMsg, key) + case "samplingAlgorithm": + err = unpopulate(val, "SamplingAlgorithm", &n.SamplingAlgorithm) delete(rawMsg, key) } if err != nil { @@ -9982,9 +13159,12 @@ func (n *NCrossValidations) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NlpVertical. func (n NlpVertical) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "featurizationSettings", n.FeaturizationSettings) + populate(objectMap, "fixedParameters", n.FixedParameters) populate(objectMap, "limitSettings", n.LimitSettings) + populate(objectMap, "searchSpace", n.SearchSpace) + populate(objectMap, "sweepSettings", n.SweepSettings) populate(objectMap, "validationData", n.ValidationData) return json.Marshal(objectMap) } @@ -10001,9 +13181,18 @@ func (n *NlpVertical) UnmarshalJSON(data []byte) error { case "featurizationSettings": err = unpopulate(val, "FeaturizationSettings", &n.FeaturizationSettings) delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &n.FixedParameters) + delete(rawMsg, key) case "limitSettings": err = unpopulate(val, "LimitSettings", &n.LimitSettings) delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &n.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &n.SweepSettings) + delete(rawMsg, key) case "validationData": err = unpopulate(val, "ValidationData", &n.ValidationData) delete(rawMsg, key) @@ -10017,7 +13206,7 @@ func (n *NlpVertical) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NlpVerticalFeaturizationSettings. func (n NlpVerticalFeaturizationSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "datasetLanguage", n.DatasetLanguage) return json.Marshal(objectMap) } @@ -10044,10 +13233,12 @@ func (n *NlpVerticalFeaturizationSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NlpVerticalLimitSettings. func (n NlpVerticalLimitSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "maxConcurrentTrials", n.MaxConcurrentTrials) + populate(objectMap, "maxNodes", n.MaxNodes) populate(objectMap, "maxTrials", n.MaxTrials) populate(objectMap, "timeout", n.Timeout) + populate(objectMap, "trialTimeout", n.TrialTimeout) return json.Marshal(objectMap) } @@ -10063,12 +13254,18 @@ func (n *NlpVerticalLimitSettings) UnmarshalJSON(data []byte) error { case "maxConcurrentTrials": err = unpopulate(val, "MaxConcurrentTrials", &n.MaxConcurrentTrials) delete(rawMsg, key) + case "maxNodes": + err = unpopulate(val, "MaxNodes", &n.MaxNodes) + delete(rawMsg, key) case "maxTrials": err = unpopulate(val, "MaxTrials", &n.MaxTrials) delete(rawMsg, key) case "timeout": err = unpopulate(val, "Timeout", &n.Timeout) delete(rawMsg, key) + case "trialTimeout": + err = unpopulate(val, "TrialTimeout", &n.TrialTimeout) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", n, err) @@ -10079,7 +13276,7 @@ func (n *NlpVerticalLimitSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NodeStateCounts. func (n NodeStateCounts) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "idleNodeCount", n.IdleNodeCount) populate(objectMap, "leavingNodeCount", n.LeavingNodeCount) populate(objectMap, "preemptedNodeCount", n.PreemptedNodeCount) @@ -10124,9 +13321,36 @@ func (n *NodeStateCounts) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Nodes. +func (n Nodes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["nodesValueType"] = n.NodesValueType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Nodes. +func (n *Nodes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodesValueType": + err = unpopulate(val, "NodesValueType", &n.NodesValueType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", n, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type NoneAuthTypeWorkspaceConnectionProperties. func (n NoneAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = ConnectionAuthTypeNone populate(objectMap, "category", n.Category) populate(objectMap, "target", n.Target) @@ -10169,7 +13393,7 @@ func (n *NoneAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type NoneDatastoreCredentials. func (n NoneDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["credentialsType"] = CredentialsTypeNone return json.Marshal(objectMap) } @@ -10196,7 +13420,7 @@ func (n *NoneDatastoreCredentials) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NotebookAccessTokenResult. func (n NotebookAccessTokenResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "accessToken", n.AccessToken) populate(objectMap, "expiresIn", n.ExpiresIn) populate(objectMap, "hostName", n.HostName) @@ -10251,7 +13475,7 @@ func (n *NotebookAccessTokenResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NotebookPreparationError. func (n NotebookPreparationError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "errorMessage", n.ErrorMessage) populate(objectMap, "statusCode", n.StatusCode) return json.Marshal(objectMap) @@ -10282,7 +13506,7 @@ func (n *NotebookPreparationError) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NotebookResourceInfo. func (n NotebookResourceInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "fqdn", n.Fqdn) populate(objectMap, "notebookPreparationError", n.NotebookPreparationError) populate(objectMap, "resourceId", n.ResourceID) @@ -10315,9 +13539,40 @@ func (n *NotebookResourceInfo) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type NotificationSetting. +func (n NotificationSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "emailOn", n.EmailOn) + populate(objectMap, "emails", n.Emails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NotificationSetting. +func (n *NotificationSetting) UnmarshalJSON(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 "emailOn": + err = unpopulate(val, "EmailOn", &n.EmailOn) + delete(rawMsg, key) + case "emails": + err = unpopulate(val, "Emails", &n.Emails) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "goal", o.Goal) populate(objectMap, "primaryMetric", o.PrimaryMetric) return json.Marshal(objectMap) @@ -10348,7 +13603,7 @@ func (o *Objective) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OnlineDeployment. func (o OnlineDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", o.ID) populate(objectMap, "identity", o.Identity) populate(objectMap, "kind", o.Kind) @@ -10411,7 +13666,7 @@ func (o *OnlineDeployment) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentProperties. func (o OnlineDeploymentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "appInsightsEnabled", o.AppInsightsEnabled) populate(objectMap, "codeConfiguration", o.CodeConfiguration) populate(objectMap, "description", o.Description) @@ -10498,7 +13753,7 @@ func (o *OnlineDeploymentProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OnlineDeploymentTrackedResourceArmPaginatedResult. func (o OnlineDeploymentTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", o.NextLink) populate(objectMap, "value", o.Value) return json.Marshal(objectMap) @@ -10529,7 +13784,7 @@ func (o *OnlineDeploymentTrackedResourceArmPaginatedResult) UnmarshalJSON(data [ // MarshalJSON implements the json.Marshaller interface for type OnlineEndpoint. func (o OnlineEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", o.ID) populate(objectMap, "identity", o.Identity) populate(objectMap, "kind", o.Kind) @@ -10592,11 +13847,12 @@ func (o *OnlineEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OnlineEndpointProperties. func (o OnlineEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) 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) @@ -10627,6 +13883,9 @@ func (o *OnlineEndpointProperties) UnmarshalJSON(data []byte) error { 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) @@ -10655,7 +13914,7 @@ func (o *OnlineEndpointProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OnlineEndpointTrackedResourceArmPaginatedResult. func (o OnlineEndpointTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", o.NextLink) populate(objectMap, "value", o.Value) return json.Marshal(objectMap) @@ -10684,9 +13943,52 @@ func (o *OnlineEndpointTrackedResourceArmPaginatedResult) UnmarshalJSON(data []b return nil } +// MarshalJSON implements the json.Marshaller interface for type OnlineInferenceConfiguration. +func (o OnlineInferenceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "configurations", o.Configurations) + populate(objectMap, "entryScript", o.EntryScript) + populate(objectMap, "livenessRoute", o.LivenessRoute) + populate(objectMap, "readinessRoute", o.ReadinessRoute) + populate(objectMap, "scoringRoute", o.ScoringRoute) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type OnlineInferenceConfiguration. +func (o *OnlineInferenceConfiguration) UnmarshalJSON(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 "configurations": + err = unpopulate(val, "Configurations", &o.Configurations) + delete(rawMsg, key) + case "entryScript": + err = unpopulate(val, "EntryScript", &o.EntryScript) + delete(rawMsg, key) + case "livenessRoute": + err = unpopulate(val, "LivenessRoute", &o.LivenessRoute) + delete(rawMsg, key) + case "readinessRoute": + err = unpopulate(val, "ReadinessRoute", &o.ReadinessRoute) + delete(rawMsg, key) + case "scoringRoute": + err = unpopulate(val, "ScoringRoute", &o.ScoringRoute) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "maxConcurrentRequestsPerInstance", o.MaxConcurrentRequestsPerInstance) populate(objectMap, "maxQueueWait", o.MaxQueueWait) populate(objectMap, "requestTimeout", o.RequestTimeout) @@ -10721,7 +14023,7 @@ func (o *OnlineRequestSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OnlineScaleSettings. func (o OnlineScaleSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["scaleType"] = o.ScaleType return json.Marshal(objectMap) } @@ -10748,7 +14050,7 @@ func (o *OnlineScaleSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type OutputPathAssetReference. func (o OutputPathAssetReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "jobId", o.JobID) populate(objectMap, "path", o.Path) objectMap["referenceType"] = ReferenceTypeOutputPath @@ -10783,7 +14085,7 @@ func (o *OutputPathAssetReference) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PATAuthTypeWorkspaceConnectionProperties. func (p PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = ConnectionAuthTypePAT populate(objectMap, "category", p.Category) populate(objectMap, "credentials", p.Credentials) @@ -10793,8 +14095,240 @@ func (p PATAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PATAuthTypeWorkspaceConnectionProperties. -func (p *PATAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { +// 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 PackageInputPathBase. +func (p PackageInputPathBase) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["inputPathType"] = p.InputPathType + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PackageInputPathBase. +func (p *PackageInputPathBase) UnmarshalJSON(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 "inputPathType": + err = unpopulate(val, "InputPathType", &p.InputPathType) + 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 PackageInputPathID. +func (p PackageInputPathID) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["inputPathType"] = InputPathTypePathID + populate(objectMap, "resourceId", p.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PackageInputPathID. +func (p *PackageInputPathID) UnmarshalJSON(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 "inputPathType": + err = unpopulate(val, "InputPathType", &p.InputPathType) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &p.ResourceID) + 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 PackageInputPathURL. +func (p PackageInputPathURL) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["inputPathType"] = InputPathTypeURL + populate(objectMap, "url", p.URL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PackageInputPathURL. +func (p *PackageInputPathURL) UnmarshalJSON(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 "inputPathType": + err = unpopulate(val, "InputPathType", &p.InputPathType) + delete(rawMsg, key) + case "url": + err = unpopulate(val, "URL", &p.URL) + 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 PackageInputPathVersion. +func (p PackageInputPathVersion) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["inputPathType"] = InputPathTypePathVersion + populate(objectMap, "resourceName", p.ResourceName) + populate(objectMap, "resourceVersion", p.ResourceVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PackageInputPathVersion. +func (p *PackageInputPathVersion) UnmarshalJSON(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 "inputPathType": + err = unpopulate(val, "InputPathType", &p.InputPathType) + delete(rawMsg, key) + case "resourceName": + err = unpopulate(val, "ResourceName", &p.ResourceName) + delete(rawMsg, key) + case "resourceVersion": + err = unpopulate(val, "ResourceVersion", &p.ResourceVersion) + 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 PackageRequest. +func (p PackageRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "baseEnvironmentSource", p.BaseEnvironmentSource) + populate(objectMap, "environmentVariables", p.EnvironmentVariables) + populate(objectMap, "inferencingServer", p.InferencingServer) + populate(objectMap, "inputs", p.Inputs) + populate(objectMap, "modelConfiguration", p.ModelConfiguration) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "targetEnvironmentName", p.TargetEnvironmentName) + populate(objectMap, "targetEnvironmentVersion", p.TargetEnvironmentVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PackageRequest. +func (p *PackageRequest) UnmarshalJSON(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 "baseEnvironmentSource": + p.BaseEnvironmentSource, err = unmarshalBaseEnvironmentSourceClassification(val) + delete(rawMsg, key) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &p.EnvironmentVariables) + delete(rawMsg, key) + case "inferencingServer": + p.InferencingServer, err = unmarshalInferencingServerClassification(val) + delete(rawMsg, key) + case "inputs": + err = unpopulate(val, "Inputs", &p.Inputs) + delete(rawMsg, key) + case "modelConfiguration": + err = unpopulate(val, "ModelConfiguration", &p.ModelConfiguration) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "targetEnvironmentName": + err = unpopulate(val, "TargetEnvironmentName", &p.TargetEnvironmentName) + delete(rawMsg, key) + case "targetEnvironmentVersion": + err = unpopulate(val, "TargetEnvironmentVersion", &p.TargetEnvironmentVersion) + 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 PackageResponse. +func (p PackageResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "baseEnvironmentSource", p.BaseEnvironmentSource) + populate(objectMap, "buildId", p.BuildID) + populate(objectMap, "buildState", p.BuildState) + populate(objectMap, "environmentVariables", p.EnvironmentVariables) + populate(objectMap, "inferencingServer", p.InferencingServer) + populate(objectMap, "inputs", p.Inputs) + populate(objectMap, "logUrl", p.LogURL) + populate(objectMap, "modelConfiguration", p.ModelConfiguration) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "targetEnvironmentId", p.TargetEnvironmentID) + populate(objectMap, "targetEnvironmentName", p.TargetEnvironmentName) + populate(objectMap, "targetEnvironmentVersion", p.TargetEnvironmentVersion) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PackageResponse. +func (p *PackageResponse) UnmarshalJSON(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) @@ -10802,23 +14336,41 @@ func (p *PATAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) er for key, val := range rawMsg { var err error switch key { - case "authType": - err = unpopulate(val, "AuthType", &p.AuthType) + case "baseEnvironmentSource": + p.BaseEnvironmentSource, err = unmarshalBaseEnvironmentSourceClassification(val) delete(rawMsg, key) - case "category": - err = unpopulate(val, "Category", &p.Category) + case "buildId": + err = unpopulate(val, "BuildID", &p.BuildID) delete(rawMsg, key) - case "credentials": - err = unpopulate(val, "Credentials", &p.Credentials) + case "buildState": + err = unpopulate(val, "BuildState", &p.BuildState) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &p.Target) + case "environmentVariables": + err = unpopulate(val, "EnvironmentVariables", &p.EnvironmentVariables) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) + case "inferencingServer": + p.InferencingServer, err = unmarshalInferencingServerClassification(val) delete(rawMsg, key) - case "valueFormat": - err = unpopulate(val, "ValueFormat", &p.ValueFormat) + case "inputs": + err = unpopulate(val, "Inputs", &p.Inputs) + delete(rawMsg, key) + case "logUrl": + err = unpopulate(val, "LogURL", &p.LogURL) + delete(rawMsg, key) + case "modelConfiguration": + err = unpopulate(val, "ModelConfiguration", &p.ModelConfiguration) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + case "targetEnvironmentId": + err = unpopulate(val, "TargetEnvironmentID", &p.TargetEnvironmentID) + delete(rawMsg, key) + case "targetEnvironmentName": + err = unpopulate(val, "TargetEnvironmentName", &p.TargetEnvironmentName) + delete(rawMsg, key) + case "targetEnvironmentVersion": + err = unpopulate(val, "TargetEnvironmentVersion", &p.TargetEnvironmentVersion) delete(rawMsg, key) } if err != nil { @@ -10830,7 +14382,7 @@ func (p *PATAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type PaginatedComputeResourcesList. func (p PaginatedComputeResourcesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", p.NextLink) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -10861,7 +14413,7 @@ func (p *PaginatedComputeResourcesList) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PartialBatchDeployment. func (p PartialBatchDeployment) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", p.Description) return json.Marshal(objectMap) } @@ -10888,7 +14440,7 @@ func (p *PartialBatchDeployment) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties. func (p PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", p.Properties) populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) @@ -10919,7 +14471,7 @@ func (p *PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties) Unma // MarshalJSON implements the json.Marshaller interface for type PartialManagedServiceIdentity. func (p PartialManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "type", p.Type) populate(objectMap, "userAssignedIdentities", p.UserAssignedIdentities) return json.Marshal(objectMap) @@ -10950,7 +14502,7 @@ func (p *PartialManagedServiceIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResource. func (p PartialMinimalTrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) } @@ -10977,7 +14529,7 @@ func (p *PartialMinimalTrackedResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithIdentity. func (p PartialMinimalTrackedResourceWithIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "identity", p.Identity) populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) @@ -11008,7 +14560,7 @@ func (p *PartialMinimalTrackedResourceWithIdentity) UnmarshalJSON(data []byte) e // MarshalJSON implements the json.Marshaller interface for type PartialMinimalTrackedResourceWithSKU. func (p PartialMinimalTrackedResourceWithSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sku", p.SKU) populate(objectMap, "tags", p.Tags) return json.Marshal(objectMap) @@ -11037,9 +14589,52 @@ func (p *PartialMinimalTrackedResourceWithSKU) UnmarshalJSON(data []byte) error return nil } +// MarshalJSON implements the json.Marshaller interface for type PartialRegistryPartialTrackedResource. +func (p PartialRegistryPartialTrackedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "identity", p.Identity) + populate(objectMap, "kind", p.Kind) + populate(objectMap, "properties", &p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PartialRegistryPartialTrackedResource. +func (p *PartialRegistryPartialTrackedResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "identity": + err = unpopulate(val, "Identity", &p.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &p.Kind) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &p.SKU) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &p.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type PartialSKU. func (p PartialSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", p.Capacity) populate(objectMap, "family", p.Family) populate(objectMap, "name", p.Name) @@ -11082,7 +14677,7 @@ func (p *PartialSKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Password. func (p Password) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", p.Name) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) @@ -11113,7 +14708,7 @@ func (p *Password) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PersonalComputeInstanceSettings. func (p PersonalComputeInstanceSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "assignedUser", p.AssignedUser) return json.Marshal(objectMap) } @@ -11140,7 +14735,7 @@ func (p *PersonalComputeInstanceSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PipelineJob. func (p PipelineJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "componentId", p.ComponentID) populate(objectMap, "computeId", p.ComputeID) populate(objectMap, "description", p.Description) @@ -11151,6 +14746,7 @@ func (p PipelineJob) MarshalJSON() ([]byte, error) { populate(objectMap, "isArchived", p.IsArchived) objectMap["jobType"] = JobTypePipeline populate(objectMap, "jobs", p.Jobs) + populate(objectMap, "notificationSetting", p.NotificationSetting) populate(objectMap, "outputs", p.Outputs) populate(objectMap, "properties", p.Properties) populate(objectMap, "services", p.Services) @@ -11200,6 +14796,9 @@ func (p *PipelineJob) UnmarshalJSON(data []byte) error { case "jobs": err = unpopulate(val, "Jobs", &p.Jobs) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &p.NotificationSetting) + delete(rawMsg, key) case "outputs": p.Outputs, err = unmarshalJobOutputClassificationMap(val) delete(rawMsg, key) @@ -11231,7 +14830,7 @@ func (p *PipelineJob) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "subnetArmId", p.SubnetArmID) return json.Marshal(objectMap) @@ -11262,7 +14861,7 @@ func (p *PrivateEndpoint) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection. func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "identity", p.Identity) populate(objectMap, "location", p.Location) @@ -11321,7 +14920,7 @@ func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } @@ -11348,7 +14947,7 @@ func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties. func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "privateEndpoint", p.PrivateEndpoint) populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) populate(objectMap, "provisioningState", p.ProvisioningState) @@ -11383,7 +14982,7 @@ func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource. func (p PrivateLinkResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", p.ID) populate(objectMap, "identity", p.Identity) populate(objectMap, "location", p.Location) @@ -11442,7 +15041,7 @@ func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult. func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", p.Value) return json.Marshal(objectMap) } @@ -11469,7 +15068,7 @@ func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties. func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "groupId", p.GroupID) populate(objectMap, "requiredMembers", p.RequiredMembers) populate(objectMap, "requiredZoneNames", p.RequiredZoneNames) @@ -11504,7 +15103,7 @@ func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionState. func (p PrivateLinkServiceConnectionState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "actionsRequired", p.ActionsRequired) populate(objectMap, "description", p.Description) populate(objectMap, "status", p.Status) @@ -11539,7 +15138,7 @@ func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProbeSettings. func (p ProbeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "failureThreshold", p.FailureThreshold) populate(objectMap, "initialDelay", p.InitialDelay) populate(objectMap, "period", p.Period) @@ -11580,9 +15179,48 @@ func (p *ProbeSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ProgressMetrics. +func (p ProgressMetrics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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 := make(map[string]any) objectMap["distributionType"] = DistributionTypePyTorch populate(objectMap, "processCountPerInstance", p.ProcessCountPerInstance) return json.Marshal(objectMap) @@ -11611,9 +15249,40 @@ func (p *PyTorch) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type QueueSettings. +func (q QueueSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "jobTier", q.JobTier) + populate(objectMap, "priority", q.Priority) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type QueueSettings. +func (q *QueueSettings) UnmarshalJSON(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 "jobTier": + err = unpopulate(val, "JobTier", &q.JobTier) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, "Priority", &q.Priority) + 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 QuotaBaseProperties. func (q QuotaBaseProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", q.ID) populate(objectMap, "limit", q.Limit) populate(objectMap, "type", q.Type) @@ -11652,7 +15321,7 @@ func (q *QuotaBaseProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type QuotaUpdateParameters. func (q QuotaUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "location", q.Location) populate(objectMap, "value", q.Value) return json.Marshal(objectMap) @@ -11683,7 +15352,8 @@ func (q *QuotaUpdateParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RandomSamplingAlgorithm. func (r RandomSamplingAlgorithm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "logbase", r.Logbase) populate(objectMap, "rule", r.Rule) objectMap["samplingAlgorithmType"] = SamplingAlgorithmTypeRandom populate(objectMap, "seed", r.Seed) @@ -11699,6 +15369,9 @@ func (r *RandomSamplingAlgorithm) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "logbase": + err = unpopulate(val, "Logbase", &r.Logbase) + delete(rawMsg, key) case "rule": err = unpopulate(val, "Rule", &r.Rule) delete(rawMsg, key) @@ -11718,7 +15391,7 @@ func (r *RandomSamplingAlgorithm) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RecurrenceSchedule. func (r RecurrenceSchedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "hours", r.Hours) populate(objectMap, "minutes", r.Minutes) populate(objectMap, "monthDays", r.MonthDays) @@ -11757,7 +15430,7 @@ func (r *RecurrenceSchedule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RecurrenceTrigger. func (r RecurrenceTrigger) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "endTime", r.EndTime) populate(objectMap, "frequency", r.Frequency) populate(objectMap, "interval", r.Interval) @@ -11808,7 +15481,7 @@ func (r *RecurrenceTrigger) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RegenerateEndpointKeysRequest. func (r RegenerateEndpointKeysRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "keyType", r.KeyType) populate(objectMap, "keyValue", r.KeyValue) return json.Marshal(objectMap) @@ -11837,9 +15510,72 @@ func (r *RegenerateEndpointKeysRequest) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type Registry. +func (r Registry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", r.ID) + populate(objectMap, "identity", r.Identity) + populate(objectMap, "kind", r.Kind) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "sku", r.SKU) + populate(objectMap, "systemData", r.SystemData) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Registry. +func (r *Registry) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &r.ID) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &r.Identity) + delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &r.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &r.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &r.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &r.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &r.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type RegistryListCredentialsResult. func (r RegistryListCredentialsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "location", r.Location) populate(objectMap, "passwords", r.Passwords) populate(objectMap, "username", r.Username) @@ -11872,15 +15608,151 @@ func (r *RegistryListCredentialsResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type RegistryProperties. +func (r RegistryProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "description", r.Description) + populate(objectMap, "discoveryUrl", r.DiscoveryURL) + populate(objectMap, "intellectualPropertyPublisher", r.IntellectualPropertyPublisher) + populate(objectMap, "managedResourceGroup", r.ManagedResourceGroup) + populate(objectMap, "managedResourceGroupTags", r.ManagedResourceGroupTags) + populate(objectMap, "mlFlowRegistryUri", r.MlFlowRegistryURI) + populate(objectMap, "privateLinkCount", r.PrivateLinkCount) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "publicNetworkAccess", r.PublicNetworkAccess) + populate(objectMap, "regionDetails", r.RegionDetails) + populate(objectMap, "tags", r.Tags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryProperties. +func (r *RegistryProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, "Description", &r.Description) + delete(rawMsg, key) + case "discoveryUrl": + err = unpopulate(val, "DiscoveryURL", &r.DiscoveryURL) + delete(rawMsg, key) + case "intellectualPropertyPublisher": + err = unpopulate(val, "IntellectualPropertyPublisher", &r.IntellectualPropertyPublisher) + delete(rawMsg, key) + case "managedResourceGroup": + err = unpopulate(val, "ManagedResourceGroup", &r.ManagedResourceGroup) + delete(rawMsg, key) + case "managedResourceGroupTags": + err = unpopulate(val, "ManagedResourceGroupTags", &r.ManagedResourceGroupTags) + delete(rawMsg, key) + case "mlFlowRegistryUri": + err = unpopulate(val, "MlFlowRegistryURI", &r.MlFlowRegistryURI) + delete(rawMsg, key) + case "privateLinkCount": + err = unpopulate(val, "PrivateLinkCount", &r.PrivateLinkCount) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &r.Properties) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &r.PublicNetworkAccess) + delete(rawMsg, key) + case "regionDetails": + err = unpopulate(val, "RegionDetails", &r.RegionDetails) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &r.Tags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistryRegionArmDetails. +func (r RegistryRegionArmDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acrDetails", r.AcrDetails) + populate(objectMap, "location", r.Location) + populate(objectMap, "storageAccountDetails", r.StorageAccountDetails) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryRegionArmDetails. +func (r *RegistryRegionArmDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acrDetails": + err = unpopulate(val, "AcrDetails", &r.AcrDetails) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &r.Location) + delete(rawMsg, key) + case "storageAccountDetails": + err = unpopulate(val, "StorageAccountDetails", &r.StorageAccountDetails) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type RegistryTrackedResourceArmPaginatedResult. +func (r RegistryTrackedResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type RegistryTrackedResourceArmPaginatedResult. +func (r *RegistryTrackedResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &r.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &r.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", r, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Regression. func (r Regression) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cvSplitColumnNames", r.CvSplitColumnNames) populate(objectMap, "featurizationSettings", r.FeaturizationSettings) + populate(objectMap, "fixedParameters", r.FixedParameters) populate(objectMap, "limitSettings", r.LimitSettings) populate(objectMap, "logVerbosity", r.LogVerbosity) populate(objectMap, "nCrossValidations", r.NCrossValidations) populate(objectMap, "primaryMetric", r.PrimaryMetric) + populate(objectMap, "searchSpace", r.SearchSpace) + populate(objectMap, "sweepSettings", r.SweepSettings) populate(objectMap, "targetColumnName", r.TargetColumnName) objectMap["taskType"] = TaskTypeRegression populate(objectMap, "testData", r.TestData) @@ -11908,6 +15780,9 @@ func (r *Regression) UnmarshalJSON(data []byte) error { case "featurizationSettings": err = unpopulate(val, "FeaturizationSettings", &r.FeaturizationSettings) delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &r.FixedParameters) + delete(rawMsg, key) case "limitSettings": err = unpopulate(val, "LimitSettings", &r.LimitSettings) delete(rawMsg, key) @@ -11917,8 +15792,14 @@ func (r *Regression) UnmarshalJSON(data []byte) error { case "nCrossValidations": r.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) delete(rawMsg, key) - case "primaryMetric": - err = unpopulate(val, "PrimaryMetric", &r.PrimaryMetric) + case "primaryMetric": + err = unpopulate(val, "PrimaryMetric", &r.PrimaryMetric) + delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &r.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &r.SweepSettings) delete(rawMsg, key) case "targetColumnName": err = unpopulate(val, "TargetColumnName", &r.TargetColumnName) @@ -11957,7 +15838,7 @@ func (r *Regression) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type RegressionTrainingSettings. func (r RegressionTrainingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "allowedTrainingAlgorithms", r.AllowedTrainingAlgorithms) populate(objectMap, "blockedTrainingAlgorithms", r.BlockedTrainingAlgorithms) populate(objectMap, "enableDnnTraining", r.EnableDnnTraining) @@ -11967,6 +15848,7 @@ func (r RegressionTrainingSettings) MarshalJSON() ([]byte, error) { populate(objectMap, "enableVoteEnsemble", r.EnableVoteEnsemble) populate(objectMap, "ensembleModelDownloadTimeout", r.EnsembleModelDownloadTimeout) populate(objectMap, "stackEnsembleSettings", r.StackEnsembleSettings) + populate(objectMap, "trainingMode", r.TrainingMode) return json.Marshal(objectMap) } @@ -12006,6 +15888,9 @@ func (r *RegressionTrainingSettings) UnmarshalJSON(data []byte) error { case "stackEnsembleSettings": err = unpopulate(val, "StackEnsembleSettings", &r.StackEnsembleSettings) delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &r.TrainingMode) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", r, err) @@ -12016,7 +15901,7 @@ func (r *RegressionTrainingSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Resource. func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) populate(objectMap, "name", r.Name) populate(objectMap, "systemData", r.SystemData) @@ -12055,7 +15940,7 @@ func (r *Resource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceBase. func (r ResourceBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", r.Description) populate(objectMap, "properties", r.Properties) populate(objectMap, "tags", r.Tags) @@ -12090,9 +15975,10 @@ func (r *ResourceBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceConfiguration. func (r ResourceConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "instanceCount", r.InstanceCount) populate(objectMap, "instanceType", r.InstanceType) + populate(objectMap, "locations", r.Locations) populate(objectMap, "properties", r.Properties) return json.Marshal(objectMap) } @@ -12112,6 +15998,9 @@ func (r *ResourceConfiguration) UnmarshalJSON(data []byte) error { case "instanceType": err = unpopulate(val, "InstanceType", &r.InstanceType) delete(rawMsg, key) + case "locations": + err = unpopulate(val, "Locations", &r.Locations) + delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &r.Properties) delete(rawMsg, key) @@ -12125,7 +16014,7 @@ func (r *ResourceConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceID. func (r ResourceID) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", r.ID) return json.Marshal(objectMap) } @@ -12152,7 +16041,7 @@ func (r *ResourceID) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceName. func (r ResourceName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "localizedValue", r.LocalizedValue) populate(objectMap, "value", r.Value) return json.Marshal(objectMap) @@ -12183,7 +16072,7 @@ func (r *ResourceName) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ResourceQuota. func (r ResourceQuota) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "amlWorkspaceLocation", r.AmlWorkspaceLocation) populate(objectMap, "id", r.ID) populate(objectMap, "limit", r.Limit) @@ -12230,7 +16119,7 @@ func (r *ResourceQuota) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Route. func (r Route) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "path", r.Path) populate(objectMap, "port", r.Port) return json.Marshal(objectMap) @@ -12261,7 +16150,7 @@ func (r *Route) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SASAuthTypeWorkspaceConnectionProperties. func (s SASAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = ConnectionAuthTypeSAS populate(objectMap, "category", s.Category) populate(objectMap, "credentials", s.Credentials) @@ -12308,7 +16197,7 @@ func (s *SASAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type SKU. func (s SKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", s.Capacity) populate(objectMap, "family", s.Family) populate(objectMap, "name", s.Name) @@ -12351,7 +16240,7 @@ func (s *SKU) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKUCapacity. func (s SKUCapacity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "default", s.Default) populate(objectMap, "maximum", s.Maximum) populate(objectMap, "minimum", s.Minimum) @@ -12390,7 +16279,7 @@ func (s *SKUCapacity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKUResource. func (s SKUResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "capacity", s.Capacity) populate(objectMap, "resourceType", s.ResourceType) populate(objectMap, "sku", s.SKU) @@ -12425,7 +16314,7 @@ func (s *SKUResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKUResourceArmPaginatedResult. func (s SKUResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -12456,7 +16345,7 @@ func (s *SKUResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SKUSetting. func (s SKUSetting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "name", s.Name) populate(objectMap, "tier", s.Tier) return json.Marshal(objectMap) @@ -12487,7 +16376,7 @@ func (s *SKUSetting) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SSLConfiguration. func (s SSLConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cert", s.Cert) populate(objectMap, "cname", s.Cname) populate(objectMap, "key", s.Key) @@ -12534,7 +16423,7 @@ func (s *SSLConfiguration) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SamplingAlgorithm. func (s SamplingAlgorithm) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["samplingAlgorithmType"] = s.SamplingAlgorithmType return json.Marshal(objectMap) } @@ -12561,7 +16450,7 @@ func (s *SamplingAlgorithm) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SasDatastoreCredentials. func (s SasDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["credentialsType"] = CredentialsTypeSas populate(objectMap, "secrets", s.Secrets) return json.Marshal(objectMap) @@ -12592,7 +16481,7 @@ func (s *SasDatastoreCredentials) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SasDatastoreSecrets. func (s SasDatastoreSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sasToken", s.SasToken) objectMap["secretsType"] = SecretsTypeSas return json.Marshal(objectMap) @@ -12623,7 +16512,7 @@ func (s *SasDatastoreSecrets) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScaleSettings. func (s ScaleSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "maxNodeCount", s.MaxNodeCount) populate(objectMap, "minNodeCount", s.MinNodeCount) populate(objectMap, "nodeIdleTimeBeforeScaleDown", s.NodeIdleTimeBeforeScaleDown) @@ -12658,7 +16547,7 @@ func (s *ScaleSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScaleSettingsInformation. func (s ScaleSettingsInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "scaleSettings", s.ScaleSettings) return json.Marshal(objectMap) } @@ -12685,7 +16574,7 @@ func (s *ScaleSettingsInformation) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Schedule. func (s Schedule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "name", s.Name) populate(objectMap, "properties", s.Properties) @@ -12728,7 +16617,7 @@ func (s *Schedule) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScheduleActionBase. func (s ScheduleActionBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["actionType"] = s.ActionType return json.Marshal(objectMap) } @@ -12755,7 +16644,7 @@ func (s *ScheduleActionBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScheduleBase. func (s ScheduleBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", s.ID) populate(objectMap, "provisioningStatus", s.ProvisioningStatus) populate(objectMap, "status", s.Status) @@ -12790,7 +16679,7 @@ func (s *ScheduleBase) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScheduleProperties. func (s ScheduleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "action", s.Action) populate(objectMap, "description", s.Description) populate(objectMap, "displayName", s.DisplayName) @@ -12845,7 +16734,7 @@ func (s *ScheduleProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScheduleResourceArmPaginatedResult. func (s ScheduleResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", s.NextLink) populate(objectMap, "value", s.Value) return json.Marshal(objectMap) @@ -12876,7 +16765,7 @@ func (s *ScheduleResourceArmPaginatedResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScriptReference. func (s ScriptReference) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "scriptArguments", s.ScriptArguments) populate(objectMap, "scriptData", s.ScriptData) populate(objectMap, "scriptSource", s.ScriptSource) @@ -12915,7 +16804,7 @@ func (s *ScriptReference) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ScriptsToExecute. func (s ScriptsToExecute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "creationScript", s.CreationScript) populate(objectMap, "startupScript", s.StartupScript) return json.Marshal(objectMap) @@ -12946,7 +16835,7 @@ func (s *ScriptsToExecute) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Seasonality. func (s Seasonality) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = s.Mode return json.Marshal(objectMap) } @@ -12973,7 +16862,7 @@ func (s *Seasonality) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ServiceManagedResourcesSettings. func (s ServiceManagedResourcesSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cosmosDb", s.CosmosDb) return json.Marshal(objectMap) } @@ -12998,9 +16887,56 @@ func (s *ServiceManagedResourcesSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s ServicePrincipalAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + objectMap["authType"] = ConnectionAuthTypeServicePrincipal + populate(objectMap, "category", s.Category) + populate(objectMap, "credentials", s.Credentials) + populate(objectMap, "target", s.Target) + populate(objectMap, "value", s.Value) + populate(objectMap, "valueFormat", s.ValueFormat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalAuthTypeWorkspaceConnectionProperties. +func (s *ServicePrincipalAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authType": + err = unpopulate(val, "AuthType", &s.AuthType) + delete(rawMsg, key) + case "category": + err = unpopulate(val, "Category", &s.Category) + delete(rawMsg, key) + case "credentials": + err = unpopulate(val, "Credentials", &s.Credentials) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &s.Target) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &s.Value) + delete(rawMsg, key) + case "valueFormat": + err = unpopulate(val, "ValueFormat", &s.ValueFormat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreCredentials. func (s ServicePrincipalDatastoreCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "authorityUrl", s.AuthorityURL) populate(objectMap, "clientId", s.ClientID) objectMap["credentialsType"] = CredentialsTypeServicePrincipal @@ -13045,16 +16981,270 @@ func (s *ServicePrincipalDatastoreCredentials) UnmarshalJSON(data []byte) error 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 +// MarshalJSON implements the json.Marshaller interface for type ServicePrincipalDatastoreSecrets. +func (s ServicePrincipalDatastoreSecrets) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any) + 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]any) + 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]any) + 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]any) + 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, "notificationSetting", s.NotificationSetting) + populate(objectMap, "outputs", s.Outputs) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "pyFiles", s.PyFiles) + populate(objectMap, "queueSettings", s.QueueSettings) + 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 "notificationSetting": + err = unpopulate(val, "NotificationSetting", &s.NotificationSetting) + 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 "queueSettings": + err = unpopulate(val, "QueueSettings", &s.QueueSettings) + 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]any) + objectMap["sparkJobEntryType"] = s.SparkJobEntryType return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrincipalDatastoreSecrets. -func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { +// 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) @@ -13062,11 +17252,8 @@ func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { 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) + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) delete(rawMsg, key) } if err != nil { @@ -13076,15 +17263,16 @@ func (s *ServicePrincipalDatastoreSecrets) UnmarshalJSON(data []byte) error { 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) +// MarshalJSON implements the json.Marshaller interface for type SparkJobPythonEntry. +func (s SparkJobPythonEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "file", s.File) + objectMap["sparkJobEntryType"] = SparkJobEntryTypeSparkJobPythonEntry return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SetupScripts. -func (s *SetupScripts) UnmarshalJSON(data []byte) error { +// 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) @@ -13092,8 +17280,11 @@ func (s *SetupScripts) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "scripts": - err = unpopulate(val, "Scripts", &s.Scripts) + 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 { @@ -13103,16 +17294,16 @@ func (s *SetupScripts) UnmarshalJSON(data []byte) error { 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) +// MarshalJSON implements the json.Marshaller interface for type SparkJobScalaEntry. +func (s SparkJobScalaEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "className", s.ClassName) + objectMap["sparkJobEntryType"] = SparkJobEntryTypeSparkJobScalaEntry return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResource. -func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { +// 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) @@ -13120,11 +17311,11 @@ func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &s.Name) + case "className": + err = unpopulate(val, "ClassName", &s.ClassName) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) + case "sparkJobEntryType": + err = unpopulate(val, "SparkJobEntryType", &s.SparkJobEntryType) delete(rawMsg, key) } if err != nil { @@ -13134,18 +17325,16 @@ func (s *SharedPrivateLinkResource) UnmarshalJSON(data []byte) error { 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) +// MarshalJSON implements the json.Marshaller interface for type SparkResourceConfiguration. +func (s SparkResourceConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instanceType", s.InstanceType) + populate(objectMap, "runtimeVersion", s.RuntimeVersion) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SharedPrivateLinkResourceProperty. -func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { +// 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) @@ -13153,17 +17342,11 @@ func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { 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) + case "instanceType": + err = unpopulate(val, "InstanceType", &s.InstanceType) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &s.Status) + case "runtimeVersion": + err = unpopulate(val, "RuntimeVersion", &s.RuntimeVersion) delete(rawMsg, key) } if err != nil { @@ -13175,7 +17358,7 @@ func (s *SharedPrivateLinkResourceProperty) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type StackEnsembleSettings. func (s StackEnsembleSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "stackMetaLearnerKWargs", &s.StackMetaLearnerKWargs) populate(objectMap, "stackMetaLearnerTrainPercentage", s.StackMetaLearnerTrainPercentage) populate(objectMap, "stackMetaLearnerType", s.StackMetaLearnerType) @@ -13208,9 +17391,79 @@ func (s *StackEnsembleSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type StatusMessage. +func (s StatusMessage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", s.Code) + populateTimeRFC3339(objectMap, "createdDateTime", s.CreatedDateTime) + populate(objectMap, "level", s.Level) + populate(objectMap, "message", s.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StatusMessage. +func (s *StatusMessage) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &s.Code) + delete(rawMsg, key) + case "createdDateTime": + err = unpopulateTimeRFC3339(val, "CreatedDateTime", &s.CreatedDateTime) + delete(rawMsg, key) + case "level": + err = unpopulate(val, "Level", &s.Level) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &s.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageAccountDetails. +func (s StorageAccountDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "systemCreatedStorageAccount", s.SystemCreatedStorageAccount) + populate(objectMap, "userCreatedStorageAccount", s.UserCreatedStorageAccount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageAccountDetails. +func (s *StorageAccountDetails) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "systemCreatedStorageAccount": + err = unpopulate(val, "SystemCreatedStorageAccount", &s.SystemCreatedStorageAccount) + delete(rawMsg, key) + case "userCreatedStorageAccount": + err = unpopulate(val, "UserCreatedStorageAccount", &s.UserCreatedStorageAccount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SweepJob. func (s SweepJob) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "componentId", s.ComponentID) populate(objectMap, "computeId", s.ComputeID) populate(objectMap, "description", s.Description) @@ -13222,9 +17475,11 @@ func (s SweepJob) MarshalJSON() ([]byte, error) { populate(objectMap, "isArchived", s.IsArchived) objectMap["jobType"] = JobTypeSweep populate(objectMap, "limits", s.Limits) + populate(objectMap, "notificationSetting", s.NotificationSetting) populate(objectMap, "objective", s.Objective) populate(objectMap, "outputs", s.Outputs) populate(objectMap, "properties", s.Properties) + populate(objectMap, "queueSettings", s.QueueSettings) populate(objectMap, "samplingAlgorithm", s.SamplingAlgorithm) populate(objectMap, "searchSpace", &s.SearchSpace) populate(objectMap, "services", s.Services) @@ -13276,6 +17531,9 @@ func (s *SweepJob) UnmarshalJSON(data []byte) error { case "limits": err = unpopulate(val, "Limits", &s.Limits) delete(rawMsg, key) + case "notificationSetting": + err = unpopulate(val, "NotificationSetting", &s.NotificationSetting) + delete(rawMsg, key) case "objective": err = unpopulate(val, "Objective", &s.Objective) delete(rawMsg, key) @@ -13285,6 +17543,9 @@ func (s *SweepJob) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &s.Properties) delete(rawMsg, key) + case "queueSettings": + err = unpopulate(val, "QueueSettings", &s.QueueSettings) + delete(rawMsg, key) case "samplingAlgorithm": s.SamplingAlgorithm, err = unmarshalSamplingAlgorithmClassification(val) delete(rawMsg, key) @@ -13313,7 +17574,7 @@ func (s *SweepJob) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SweepJobLimits. func (s SweepJobLimits) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["jobLimitsType"] = JobLimitsTypeSweep populate(objectMap, "maxConcurrentTrials", s.MaxConcurrentTrials) populate(objectMap, "maxTotalTrials", s.MaxTotalTrials) @@ -13356,7 +17617,7 @@ func (s *SweepJobLimits) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SynapseSpark. func (s SynapseSpark) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", s.ComputeLocation) objectMap["computeType"] = ComputeTypeSynapseSpark populateTimeRFC3339(objectMap, "createdOn", s.CreatedOn) @@ -13423,7 +17684,7 @@ func (s *SynapseSpark) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type SynapseSparkProperties. func (s SynapseSparkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "autoPauseProperties", s.AutoPauseProperties) populate(objectMap, "autoScaleProperties", s.AutoScaleProperties) populate(objectMap, "nodeCount", s.NodeCount) @@ -13484,9 +17745,79 @@ func (s *SynapseSparkProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SystemCreatedAcrAccount. +func (s SystemCreatedAcrAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "acrAccountSku", s.AcrAccountSKU) + populate(objectMap, "armResourceId", s.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemCreatedAcrAccount. +func (s *SystemCreatedAcrAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "acrAccountSku": + err = unpopulate(val, "AcrAccountSKU", &s.AcrAccountSKU) + delete(rawMsg, key) + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &s.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SystemCreatedStorageAccount. +func (s SystemCreatedStorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowBlobPublicAccess", s.AllowBlobPublicAccess) + populate(objectMap, "armResourceId", s.ArmResourceID) + populate(objectMap, "storageAccountHnsEnabled", s.StorageAccountHnsEnabled) + populate(objectMap, "storageAccountType", s.StorageAccountType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemCreatedStorageAccount. +func (s *SystemCreatedStorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowBlobPublicAccess": + err = unpopulate(val, "AllowBlobPublicAccess", &s.AllowBlobPublicAccess) + delete(rawMsg, key) + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &s.ArmResourceID) + delete(rawMsg, key) + case "storageAccountHnsEnabled": + err = unpopulate(val, "StorageAccountHnsEnabled", &s.StorageAccountHnsEnabled) + delete(rawMsg, key) + case "storageAccountType": + err = unpopulate(val, "StorageAccountType", &s.StorageAccountType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SystemData. func (s SystemData) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populateTimeRFC3339(objectMap, "createdAt", s.CreatedAt) populate(objectMap, "createdBy", s.CreatedBy) populate(objectMap, "createdByType", s.CreatedByType) @@ -13508,59 +17839,296 @@ func (s *SystemData) UnmarshalJSON(data []byte) error { case "createdAt": err = unpopulateTimeRFC3339(val, "CreatedAt", &s.CreatedAt) delete(rawMsg, key) - case "createdBy": - err = unpopulate(val, "CreatedBy", &s.CreatedBy) + 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]any) + populate(objectMap, "publicIpAddress", s.PublicIPAddress) + populate(objectMap, "systemServiceType", s.SystemServiceType) + populate(objectMap, "version", s.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SystemService. +func (s *SystemService) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicIpAddress": + err = unpopulate(val, "PublicIPAddress", &s.PublicIPAddress) + delete(rawMsg, key) + case "systemServiceType": + err = unpopulate(val, "SystemServiceType", &s.SystemServiceType) + delete(rawMsg, key) + case "version": + err = unpopulate(val, "Version", &s.Version) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableFixedParameters. +func (t TableFixedParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "booster", t.Booster) + populate(objectMap, "boostingType", t.BoostingType) + populate(objectMap, "growPolicy", t.GrowPolicy) + populate(objectMap, "learningRate", t.LearningRate) + populate(objectMap, "maxBin", t.MaxBin) + populate(objectMap, "maxDepth", t.MaxDepth) + populate(objectMap, "maxLeaves", t.MaxLeaves) + populate(objectMap, "minDataInLeaf", t.MinDataInLeaf) + populate(objectMap, "minSplitGain", t.MinSplitGain) + populate(objectMap, "modelName", t.ModelName) + populate(objectMap, "nEstimators", t.NEstimators) + populate(objectMap, "numLeaves", t.NumLeaves) + populate(objectMap, "preprocessorName", t.PreprocessorName) + populate(objectMap, "regAlpha", t.RegAlpha) + populate(objectMap, "regLambda", t.RegLambda) + populate(objectMap, "subsample", t.Subsample) + populate(objectMap, "subsampleFreq", t.SubsampleFreq) + populate(objectMap, "treeMethod", t.TreeMethod) + populate(objectMap, "withMean", t.WithMean) + populate(objectMap, "withStd", t.WithStd) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableFixedParameters. +func (t *TableFixedParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "booster": + err = unpopulate(val, "Booster", &t.Booster) + delete(rawMsg, key) + case "boostingType": + err = unpopulate(val, "BoostingType", &t.BoostingType) + delete(rawMsg, key) + case "growPolicy": + err = unpopulate(val, "GrowPolicy", &t.GrowPolicy) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &t.LearningRate) + delete(rawMsg, key) + case "maxBin": + err = unpopulate(val, "MaxBin", &t.MaxBin) + delete(rawMsg, key) + case "maxDepth": + err = unpopulate(val, "MaxDepth", &t.MaxDepth) + delete(rawMsg, key) + case "maxLeaves": + err = unpopulate(val, "MaxLeaves", &t.MaxLeaves) + delete(rawMsg, key) + case "minDataInLeaf": + err = unpopulate(val, "MinDataInLeaf", &t.MinDataInLeaf) + delete(rawMsg, key) + case "minSplitGain": + err = unpopulate(val, "MinSplitGain", &t.MinSplitGain) + delete(rawMsg, key) + case "modelName": + err = unpopulate(val, "ModelName", &t.ModelName) + delete(rawMsg, key) + case "nEstimators": + err = unpopulate(val, "NEstimators", &t.NEstimators) + delete(rawMsg, key) + case "numLeaves": + err = unpopulate(val, "NumLeaves", &t.NumLeaves) + delete(rawMsg, key) + case "preprocessorName": + err = unpopulate(val, "PreprocessorName", &t.PreprocessorName) + delete(rawMsg, key) + case "regAlpha": + err = unpopulate(val, "RegAlpha", &t.RegAlpha) + delete(rawMsg, key) + case "regLambda": + err = unpopulate(val, "RegLambda", &t.RegLambda) + delete(rawMsg, key) + case "subsample": + err = unpopulate(val, "Subsample", &t.Subsample) + delete(rawMsg, key) + case "subsampleFreq": + err = unpopulate(val, "SubsampleFreq", &t.SubsampleFreq) + delete(rawMsg, key) + case "treeMethod": + err = unpopulate(val, "TreeMethod", &t.TreeMethod) + delete(rawMsg, key) + case "withMean": + err = unpopulate(val, "WithMean", &t.WithMean) + delete(rawMsg, key) + case "withStd": + err = unpopulate(val, "WithStd", &t.WithStd) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TableParameterSubspace. +func (t TableParameterSubspace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "booster", t.Booster) + populate(objectMap, "boostingType", t.BoostingType) + populate(objectMap, "growPolicy", t.GrowPolicy) + populate(objectMap, "learningRate", t.LearningRate) + populate(objectMap, "maxBin", t.MaxBin) + populate(objectMap, "maxDepth", t.MaxDepth) + populate(objectMap, "maxLeaves", t.MaxLeaves) + populate(objectMap, "minDataInLeaf", t.MinDataInLeaf) + populate(objectMap, "minSplitGain", t.MinSplitGain) + populate(objectMap, "modelName", t.ModelName) + populate(objectMap, "nEstimators", t.NEstimators) + populate(objectMap, "numLeaves", t.NumLeaves) + populate(objectMap, "preprocessorName", t.PreprocessorName) + populate(objectMap, "regAlpha", t.RegAlpha) + populate(objectMap, "regLambda", t.RegLambda) + populate(objectMap, "subsample", t.Subsample) + populate(objectMap, "subsampleFreq", t.SubsampleFreq) + populate(objectMap, "treeMethod", t.TreeMethod) + populate(objectMap, "withMean", t.WithMean) + populate(objectMap, "withStd", t.WithStd) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TableParameterSubspace. +func (t *TableParameterSubspace) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "booster": + err = unpopulate(val, "Booster", &t.Booster) + delete(rawMsg, key) + case "boostingType": + err = unpopulate(val, "BoostingType", &t.BoostingType) + delete(rawMsg, key) + case "growPolicy": + err = unpopulate(val, "GrowPolicy", &t.GrowPolicy) + delete(rawMsg, key) + case "learningRate": + err = unpopulate(val, "LearningRate", &t.LearningRate) + delete(rawMsg, key) + case "maxBin": + err = unpopulate(val, "MaxBin", &t.MaxBin) + delete(rawMsg, key) + case "maxDepth": + err = unpopulate(val, "MaxDepth", &t.MaxDepth) + delete(rawMsg, key) + case "maxLeaves": + err = unpopulate(val, "MaxLeaves", &t.MaxLeaves) + delete(rawMsg, key) + case "minDataInLeaf": + err = unpopulate(val, "MinDataInLeaf", &t.MinDataInLeaf) + delete(rawMsg, key) + case "minSplitGain": + err = unpopulate(val, "MinSplitGain", &t.MinSplitGain) delete(rawMsg, key) - case "createdByType": - err = unpopulate(val, "CreatedByType", &s.CreatedByType) + case "modelName": + err = unpopulate(val, "ModelName", &t.ModelName) delete(rawMsg, key) - case "lastModifiedAt": - err = unpopulateTimeRFC3339(val, "LastModifiedAt", &s.LastModifiedAt) + case "nEstimators": + err = unpopulate(val, "NEstimators", &t.NEstimators) delete(rawMsg, key) - case "lastModifiedBy": - err = unpopulate(val, "LastModifiedBy", &s.LastModifiedBy) + case "numLeaves": + err = unpopulate(val, "NumLeaves", &t.NumLeaves) delete(rawMsg, key) - case "lastModifiedByType": - err = unpopulate(val, "LastModifiedByType", &s.LastModifiedByType) + case "preprocessorName": + err = unpopulate(val, "PreprocessorName", &t.PreprocessorName) + delete(rawMsg, key) + case "regAlpha": + err = unpopulate(val, "RegAlpha", &t.RegAlpha) + delete(rawMsg, key) + case "regLambda": + err = unpopulate(val, "RegLambda", &t.RegLambda) + delete(rawMsg, key) + case "subsample": + err = unpopulate(val, "Subsample", &t.Subsample) + delete(rawMsg, key) + case "subsampleFreq": + err = unpopulate(val, "SubsampleFreq", &t.SubsampleFreq) + delete(rawMsg, key) + case "treeMethod": + err = unpopulate(val, "TreeMethod", &t.TreeMethod) + delete(rawMsg, key) + case "withMean": + err = unpopulate(val, "WithMean", &t.WithMean) + delete(rawMsg, key) + case "withStd": + err = unpopulate(val, "WithStd", &t.WithStd) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, 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) +// MarshalJSON implements the json.Marshaller interface for type TableSweepSettings. +func (t TableSweepSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "earlyTermination", t.EarlyTermination) + populate(objectMap, "samplingAlgorithm", t.SamplingAlgorithm) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type SystemService. -func (s *SystemService) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type TableSweepSettings. +func (t *TableSweepSettings) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, 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) + case "earlyTermination": + t.EarlyTermination, err = unmarshalEarlyTerminationPolicyClassification(val) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) + case "samplingAlgorithm": + err = unpopulate(val, "SamplingAlgorithm", &t.SamplingAlgorithm) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) + return fmt.Errorf("unmarshalling type %T: %v", t, err) } } return nil @@ -13568,11 +18136,14 @@ func (s *SystemService) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TableVertical. func (t TableVertical) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "cvSplitColumnNames", t.CvSplitColumnNames) populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) populate(objectMap, "limitSettings", t.LimitSettings) populate(objectMap, "nCrossValidations", t.NCrossValidations) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) populate(objectMap, "testData", t.TestData) populate(objectMap, "testDataSize", t.TestDataSize) populate(objectMap, "validationData", t.ValidationData) @@ -13596,12 +18167,21 @@ func (t *TableVertical) UnmarshalJSON(data []byte) error { case "featurizationSettings": err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) case "limitSettings": err = unpopulate(val, "LimitSettings", &t.LimitSettings) delete(rawMsg, key) case "nCrossValidations": t.NCrossValidations, err = unmarshalNCrossValidationsClassification(val) delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) case "testData": err = unpopulate(val, "TestData", &t.TestData) delete(rawMsg, key) @@ -13627,7 +18207,7 @@ func (t *TableVertical) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TableVerticalFeaturizationSettings. func (t TableVerticalFeaturizationSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "blockedTransformers", t.BlockedTransformers) populate(objectMap, "columnNameAndTypes", t.ColumnNameAndTypes) populate(objectMap, "datasetLanguage", t.DatasetLanguage) @@ -13674,12 +18254,15 @@ func (t *TableVerticalFeaturizationSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TableVerticalLimitSettings. func (t TableVerticalLimitSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enableEarlyTermination", t.EnableEarlyTermination) populate(objectMap, "exitScore", t.ExitScore) populate(objectMap, "maxConcurrentTrials", t.MaxConcurrentTrials) populate(objectMap, "maxCoresPerTrial", t.MaxCoresPerTrial) + populate(objectMap, "maxNodes", t.MaxNodes) populate(objectMap, "maxTrials", t.MaxTrials) + populate(objectMap, "sweepConcurrentTrials", t.SweepConcurrentTrials) + populate(objectMap, "sweepTrials", t.SweepTrials) populate(objectMap, "timeout", t.Timeout) populate(objectMap, "trialTimeout", t.TrialTimeout) return json.Marshal(objectMap) @@ -13706,9 +18289,18 @@ func (t *TableVerticalLimitSettings) UnmarshalJSON(data []byte) error { case "maxCoresPerTrial": err = unpopulate(val, "MaxCoresPerTrial", &t.MaxCoresPerTrial) delete(rawMsg, key) + case "maxNodes": + err = unpopulate(val, "MaxNodes", &t.MaxNodes) + delete(rawMsg, key) case "maxTrials": err = unpopulate(val, "MaxTrials", &t.MaxTrials) delete(rawMsg, key) + case "sweepConcurrentTrials": + err = unpopulate(val, "SweepConcurrentTrials", &t.SweepConcurrentTrials) + delete(rawMsg, key) + case "sweepTrials": + err = unpopulate(val, "SweepTrials", &t.SweepTrials) + delete(rawMsg, key) case "timeout": err = unpopulate(val, "Timeout", &t.Timeout) delete(rawMsg, key) @@ -13725,7 +18317,7 @@ func (t *TableVerticalLimitSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TargetLags. func (t TargetLags) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = t.Mode return json.Marshal(objectMap) } @@ -13752,7 +18344,7 @@ func (t *TargetLags) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TargetRollingWindowSize. func (t TargetRollingWindowSize) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["mode"] = t.Mode return json.Marshal(objectMap) } @@ -13779,7 +18371,7 @@ func (t *TargetRollingWindowSize) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TargetUtilizationScaleSettings. func (t TargetUtilizationScaleSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "maxInstances", t.MaxInstances) populate(objectMap, "minInstances", t.MinInstances) populate(objectMap, "pollingInterval", t.PollingInterval) @@ -13822,7 +18414,7 @@ func (t *TargetUtilizationScaleSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TensorFlow. func (t TensorFlow) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["distributionType"] = DistributionTypeTensorFlow populate(objectMap, "parameterServerCount", t.ParameterServerCount) populate(objectMap, "workerCount", t.WorkerCount) @@ -13857,11 +18449,14 @@ func (t *TensorFlow) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TextClassification. func (t TextClassification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) populate(objectMap, "limitSettings", t.LimitSettings) populate(objectMap, "logVerbosity", t.LogVerbosity) populate(objectMap, "primaryMetric", t.PrimaryMetric) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) populate(objectMap, "targetColumnName", t.TargetColumnName) objectMap["taskType"] = TaskTypeTextClassification populate(objectMap, "trainingData", t.TrainingData) @@ -13881,6 +18476,9 @@ func (t *TextClassification) UnmarshalJSON(data []byte) error { case "featurizationSettings": err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) case "limitSettings": err = unpopulate(val, "LimitSettings", &t.LimitSettings) delete(rawMsg, key) @@ -13890,6 +18488,12 @@ func (t *TextClassification) UnmarshalJSON(data []byte) error { case "primaryMetric": err = unpopulate(val, "PrimaryMetric", &t.PrimaryMetric) delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) case "targetColumnName": err = unpopulate(val, "TargetColumnName", &t.TargetColumnName) delete(rawMsg, key) @@ -13912,11 +18516,14 @@ func (t *TextClassification) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TextClassificationMultilabel. func (t TextClassificationMultilabel) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) populate(objectMap, "limitSettings", t.LimitSettings) populate(objectMap, "logVerbosity", t.LogVerbosity) populate(objectMap, "primaryMetric", t.PrimaryMetric) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) populate(objectMap, "targetColumnName", t.TargetColumnName) objectMap["taskType"] = TaskTypeTextClassificationMultilabel populate(objectMap, "trainingData", t.TrainingData) @@ -13936,6 +18543,9 @@ func (t *TextClassificationMultilabel) UnmarshalJSON(data []byte) error { case "featurizationSettings": err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) case "limitSettings": err = unpopulate(val, "LimitSettings", &t.LimitSettings) delete(rawMsg, key) @@ -13945,6 +18555,12 @@ func (t *TextClassificationMultilabel) UnmarshalJSON(data []byte) error { case "primaryMetric": err = unpopulate(val, "PrimaryMetric", &t.PrimaryMetric) delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) case "targetColumnName": err = unpopulate(val, "TargetColumnName", &t.TargetColumnName) delete(rawMsg, key) @@ -13967,11 +18583,14 @@ func (t *TextClassificationMultilabel) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TextNer. func (t TextNer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "featurizationSettings", t.FeaturizationSettings) + populate(objectMap, "fixedParameters", t.FixedParameters) populate(objectMap, "limitSettings", t.LimitSettings) populate(objectMap, "logVerbosity", t.LogVerbosity) populate(objectMap, "primaryMetric", t.PrimaryMetric) + populate(objectMap, "searchSpace", t.SearchSpace) + populate(objectMap, "sweepSettings", t.SweepSettings) populate(objectMap, "targetColumnName", t.TargetColumnName) objectMap["taskType"] = TaskTypeTextNER populate(objectMap, "trainingData", t.TrainingData) @@ -13991,6 +18610,9 @@ func (t *TextNer) UnmarshalJSON(data []byte) error { case "featurizationSettings": err = unpopulate(val, "FeaturizationSettings", &t.FeaturizationSettings) delete(rawMsg, key) + case "fixedParameters": + err = unpopulate(val, "FixedParameters", &t.FixedParameters) + delete(rawMsg, key) case "limitSettings": err = unpopulate(val, "LimitSettings", &t.LimitSettings) delete(rawMsg, key) @@ -14000,6 +18622,12 @@ func (t *TextNer) UnmarshalJSON(data []byte) error { case "primaryMetric": err = unpopulate(val, "PrimaryMetric", &t.PrimaryMetric) delete(rawMsg, key) + case "searchSpace": + err = unpopulate(val, "SearchSpace", &t.SearchSpace) + delete(rawMsg, key) + case "sweepSettings": + err = unpopulate(val, "SweepSettings", &t.SweepSettings) + delete(rawMsg, key) case "targetColumnName": err = unpopulate(val, "TargetColumnName", &t.TargetColumnName) delete(rawMsg, key) @@ -14020,9 +18648,36 @@ func (t *TextNer) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type TmpfsOptions. +func (t TmpfsOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "id", t.ID) populate(objectMap, "location", t.Location) populate(objectMap, "name", t.Name) @@ -14069,7 +18724,7 @@ func (t *TrackedResource) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrainingSettings. func (t TrainingSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "enableDnnTraining", t.EnableDnnTraining) populate(objectMap, "enableModelExplainability", t.EnableModelExplainability) populate(objectMap, "enableOnnxCompatibleModels", t.EnableOnnxCompatibleModels) @@ -14077,6 +18732,7 @@ func (t TrainingSettings) MarshalJSON() ([]byte, error) { populate(objectMap, "enableVoteEnsemble", t.EnableVoteEnsemble) populate(objectMap, "ensembleModelDownloadTimeout", t.EnsembleModelDownloadTimeout) populate(objectMap, "stackEnsembleSettings", t.StackEnsembleSettings) + populate(objectMap, "trainingMode", t.TrainingMode) return json.Marshal(objectMap) } @@ -14110,6 +18766,9 @@ func (t *TrainingSettings) UnmarshalJSON(data []byte) error { case "stackEnsembleSettings": err = unpopulate(val, "StackEnsembleSettings", &t.StackEnsembleSettings) delete(rawMsg, key) + case "trainingMode": + err = unpopulate(val, "TrainingMode", &t.TrainingMode) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", t, err) @@ -14120,7 +18779,7 @@ func (t *TrainingSettings) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TrialComponent. func (t TrialComponent) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "codeId", t.CodeID) populate(objectMap, "command", t.Command) populate(objectMap, "distribution", t.Distribution) @@ -14167,7 +18826,7 @@ func (t *TrialComponent) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TriggerBase. func (t TriggerBase) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "endTime", t.EndTime) populate(objectMap, "startTime", t.StartTime) populate(objectMap, "timeZone", t.TimeZone) @@ -14204,9 +18863,40 @@ func (t *TriggerBase) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type TritonInferencingServer. +func (t TritonInferencingServer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "inferenceConfiguration", t.InferenceConfiguration) + objectMap["serverType"] = InferencingServerTypeTriton + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TritonInferencingServer. +func (t *TritonInferencingServer) UnmarshalJSON(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 "inferenceConfiguration": + err = unpopulate(val, "InferenceConfiguration", &t.InferenceConfiguration) + delete(rawMsg, key) + case "serverType": + err = unpopulate(val, "ServerType", &t.ServerType) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "description", t.Description) objectMap["jobInputType"] = JobInputTypeTritonModel populate(objectMap, "mode", t.Mode) @@ -14245,7 +18935,9 @@ func (t *TritonModelJobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TritonModelJobOutput. func (t TritonModelJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "assetName", t.AssetName) + populate(objectMap, "assetVersion", t.AssetVersion) populate(objectMap, "description", t.Description) objectMap["jobOutputType"] = JobOutputTypeTritonModel populate(objectMap, "mode", t.Mode) @@ -14262,6 +18954,12 @@ func (t *TritonModelJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "assetName": + err = unpopulate(val, "AssetName", &t.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &t.AssetVersion) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &t.Description) delete(rawMsg, key) @@ -14284,7 +18982,7 @@ func (t *TritonModelJobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type TruncationSelectionPolicy. func (t TruncationSelectionPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "delayEvaluation", t.DelayEvaluation) populate(objectMap, "evaluationInterval", t.EvaluationInterval) objectMap["policyType"] = EarlyTerminationPolicyTypeTruncationSelection @@ -14323,7 +19021,7 @@ func (t *TruncationSelectionPolicy) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type URIFileDataVersion. func (u URIFileDataVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["dataType"] = DataTypeURIFile populate(objectMap, "dataUri", u.DataURI) populate(objectMap, "description", u.Description) @@ -14374,7 +19072,7 @@ func (u *URIFileDataVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type URIFileJobInput. func (u URIFileJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", u.Description) objectMap["jobInputType"] = JobInputTypeURIFile populate(objectMap, "mode", u.Mode) @@ -14413,7 +19111,9 @@ func (u *URIFileJobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type URIFileJobOutput. func (u URIFileJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "assetName", u.AssetName) + populate(objectMap, "assetVersion", u.AssetVersion) populate(objectMap, "description", u.Description) objectMap["jobOutputType"] = JobOutputTypeURIFile populate(objectMap, "mode", u.Mode) @@ -14430,6 +19130,12 @@ func (u *URIFileJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "assetName": + err = unpopulate(val, "AssetName", &u.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &u.AssetVersion) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &u.Description) delete(rawMsg, key) @@ -14452,7 +19158,7 @@ func (u *URIFileJobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type URIFolderDataVersion. func (u URIFolderDataVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["dataType"] = DataTypeURIFolder populate(objectMap, "dataUri", u.DataURI) populate(objectMap, "description", u.Description) @@ -14503,7 +19209,7 @@ func (u *URIFolderDataVersion) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type URIFolderJobInput. func (u URIFolderJobInput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "description", u.Description) objectMap["jobInputType"] = JobInputTypeURIFolder populate(objectMap, "mode", u.Mode) @@ -14542,7 +19248,9 @@ func (u *URIFolderJobInput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type URIFolderJobOutput. func (u URIFolderJobOutput) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) + populate(objectMap, "assetName", u.AssetName) + populate(objectMap, "assetVersion", u.AssetVersion) populate(objectMap, "description", u.Description) objectMap["jobOutputType"] = JobOutputTypeURIFolder populate(objectMap, "mode", u.Mode) @@ -14559,6 +19267,12 @@ func (u *URIFolderJobOutput) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "assetName": + err = unpopulate(val, "AssetName", &u.AssetName) + delete(rawMsg, key) + case "assetVersion": + err = unpopulate(val, "AssetVersion", &u.AssetVersion) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &u.Description) delete(rawMsg, key) @@ -14581,7 +19295,7 @@ func (u *URIFolderJobOutput) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UpdateWorkspaceQuotas. func (u UpdateWorkspaceQuotas) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", u.ID) populate(objectMap, "limit", u.Limit) populate(objectMap, "status", u.Status) @@ -14624,7 +19338,7 @@ func (u *UpdateWorkspaceQuotas) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UpdateWorkspaceQuotasResult. func (u UpdateWorkspaceQuotasResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", u.NextLink) populate(objectMap, "value", u.Value) return json.Marshal(objectMap) @@ -14655,7 +19369,7 @@ func (u *UpdateWorkspaceQuotasResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type Usage. func (u Usage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "amlWorkspaceLocation", u.AmlWorkspaceLocation) populate(objectMap, "currentValue", u.CurrentValue) populate(objectMap, "id", u.ID) @@ -14706,7 +19420,7 @@ func (u *Usage) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UsageName. func (u UsageName) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "localizedValue", u.LocalizedValue) populate(objectMap, "value", u.Value) return json.Marshal(objectMap) @@ -14737,7 +19451,7 @@ func (u *UsageName) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserAccountCredentials. func (u UserAccountCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "adminUserName", u.AdminUserName) populate(objectMap, "adminUserPassword", u.AdminUserPassword) populate(objectMap, "adminUserSshPublicKey", u.AdminUserSSHPublicKey) @@ -14772,7 +19486,7 @@ func (u *UserAccountCredentials) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", u.ClientID) populate(objectMap, "principalId", u.PrincipalID) return json.Marshal(objectMap) @@ -14801,9 +19515,63 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UserCreatedAcrAccount. +func (u UserCreatedAcrAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "armResourceId", u.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreatedAcrAccount. +func (u *UserCreatedAcrAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &u.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UserCreatedStorageAccount. +func (u UserCreatedStorageAccount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "armResourceId", u.ArmResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UserCreatedStorageAccount. +func (u *UserCreatedStorageAccount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "armResourceId": + err = unpopulate(val, "ArmResourceID", &u.ArmResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UserIdentity. func (u UserIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["identityType"] = IdentityConfigurationTypeUserIdentity return json.Marshal(objectMap) } @@ -14830,7 +19598,7 @@ func (u *UserIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type UsernamePasswordAuthTypeWorkspaceConnectionProperties. func (u UsernamePasswordAuthTypeWorkspaceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = ConnectionAuthTypeUsernamePassword populate(objectMap, "category", u.Category) populate(objectMap, "credentials", u.Credentials) @@ -14877,7 +19645,7 @@ func (u *UsernamePasswordAuthTypeWorkspaceConnectionProperties) UnmarshalJSON(da // MarshalJSON implements the json.Marshaller interface for type VirtualMachine. func (v VirtualMachine) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "computeLocation", v.ComputeLocation) objectMap["computeType"] = ComputeTypeVirtualMachine populateTimeRFC3339(objectMap, "createdOn", v.CreatedOn) @@ -14944,7 +19712,7 @@ func (v *VirtualMachine) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineImage. func (v VirtualMachineImage) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", v.ID) return json.Marshal(objectMap) } @@ -14971,7 +19739,7 @@ func (v *VirtualMachineImage) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineSSHCredentials. func (v VirtualMachineSSHCredentials) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "password", v.Password) populate(objectMap, "privateKeyData", v.PrivateKeyData) populate(objectMap, "publicKeyData", v.PublicKeyData) @@ -15010,7 +19778,7 @@ func (v *VirtualMachineSSHCredentials) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineSchema. func (v VirtualMachineSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "properties", v.Properties) return json.Marshal(objectMap) } @@ -15037,7 +19805,7 @@ func (v *VirtualMachineSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineSchemaProperties. func (v VirtualMachineSchemaProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "address", v.Address) populate(objectMap, "administratorAccount", v.AdministratorAccount) populate(objectMap, "isNotebookInstanceCompute", v.IsNotebookInstanceCompute) @@ -15084,7 +19852,7 @@ func (v *VirtualMachineSchemaProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineSecrets. func (v VirtualMachineSecrets) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "administratorAccount", v.AdministratorAccount) objectMap["computeType"] = ComputeTypeVirtualMachine return json.Marshal(objectMap) @@ -15115,7 +19883,7 @@ func (v *VirtualMachineSecrets) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineSecretsSchema. func (v VirtualMachineSecretsSchema) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "administratorAccount", v.AdministratorAccount) return json.Marshal(objectMap) } @@ -15142,7 +19910,7 @@ func (v *VirtualMachineSecretsSchema) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineSize. func (v VirtualMachineSize) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "estimatedVMPrices", v.EstimatedVMPrices) populate(objectMap, "family", v.Family) populate(objectMap, "gpus", v.Gpus) @@ -15209,7 +19977,7 @@ func (v *VirtualMachineSize) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type VirtualMachineSizeListResult. func (v VirtualMachineSizeListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "value", v.Value) return json.Marshal(objectMap) } @@ -15234,11 +20002,94 @@ func (v *VirtualMachineSizeListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type VolumeDefinition. +func (v VolumeDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + 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]any) + 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{}) + objectMap := make(map[string]any) populate(objectMap, "id", w.ID) populate(objectMap, "identity", w.Identity) + populate(objectMap, "kind", w.Kind) populate(objectMap, "location", w.Location) populate(objectMap, "name", w.Name) populate(objectMap, "properties", w.Properties) @@ -15264,6 +20115,9 @@ func (w *Workspace) UnmarshalJSON(data []byte) error { case "identity": err = unpopulate(val, "Identity", &w.Identity) delete(rawMsg, key) + case "kind": + err = unpopulate(val, "Kind", &w.Kind) + delete(rawMsg, key) case "location": err = unpopulate(val, "Location", &w.Location) delete(rawMsg, key) @@ -15293,9 +20147,40 @@ func (w *Workspace) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionAccessKey. +func (w WorkspaceConnectionAccessKey) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "accessKeyId", w.AccessKeyID) + populate(objectMap, "secretAccessKey", w.SecretAccessKey) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionAccessKey. +func (w *WorkspaceConnectionAccessKey) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "accessKeyId": + err = unpopulate(val, "AccessKeyID", &w.AccessKeyID) + delete(rawMsg, key) + case "secretAccessKey": + err = unpopulate(val, "SecretAccessKey", &w.SecretAccessKey) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionManagedIdentity. func (w WorkspaceConnectionManagedIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "clientId", w.ClientID) populate(objectMap, "resourceId", w.ResourceID) return json.Marshal(objectMap) @@ -15326,7 +20211,7 @@ func (w *WorkspaceConnectionManagedIdentity) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPersonalAccessToken. func (w WorkspaceConnectionPersonalAccessToken) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "pat", w.Pat) return json.Marshal(objectMap) } @@ -15353,7 +20238,7 @@ func (w *WorkspaceConnectionPersonalAccessToken) UnmarshalJSON(data []byte) erro // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPropertiesV2. func (w WorkspaceConnectionPropertiesV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) objectMap["authType"] = w.AuthType populate(objectMap, "category", w.Category) populate(objectMap, "target", w.Target) @@ -15396,7 +20281,7 @@ func (w *WorkspaceConnectionPropertiesV2) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPropertiesV2BasicResource. func (w WorkspaceConnectionPropertiesV2BasicResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "id", w.ID) populate(objectMap, "name", w.Name) populate(objectMap, "properties", w.Properties) @@ -15439,7 +20324,7 @@ func (w *WorkspaceConnectionPropertiesV2BasicResource) UnmarshalJSON(data []byte // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. func (w WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", w.NextLink) populate(objectMap, "value", w.Value) return json.Marshal(objectMap) @@ -15468,9 +20353,44 @@ func (w *WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult) Unmarsh return nil } +// MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionServicePrincipal. +func (w WorkspaceConnectionServicePrincipal) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", w.ClientID) + populate(objectMap, "clientSecret", w.ClientSecret) + populate(objectMap, "tenantId", w.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type WorkspaceConnectionServicePrincipal. +func (w *WorkspaceConnectionServicePrincipal) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &w.ClientID) + delete(rawMsg, key) + case "clientSecret": + err = unpopulate(val, "ClientSecret", &w.ClientSecret) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &w.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", w, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionSharedAccessSignature. func (w WorkspaceConnectionSharedAccessSignature) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "sas", w.Sas) return json.Marshal(objectMap) } @@ -15497,7 +20417,7 @@ func (w *WorkspaceConnectionSharedAccessSignature) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type WorkspaceConnectionUsernamePassword. func (w WorkspaceConnectionUsernamePassword) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "password", w.Password) populate(objectMap, "username", w.Username) return json.Marshal(objectMap) @@ -15528,7 +20448,7 @@ func (w *WorkspaceConnectionUsernamePassword) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkspaceListResult. func (w WorkspaceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "nextLink", w.NextLink) populate(objectMap, "value", w.Value) return json.Marshal(objectMap) @@ -15559,13 +20479,14 @@ func (w *WorkspaceListResult) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkspaceProperties. func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) 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, "featureStoreSettings", w.FeatureStoreSettings) populate(objectMap, "friendlyName", w.FriendlyName) populate(objectMap, "hbiWorkspace", w.HbiWorkspace) populate(objectMap, "imageBuildCompute", w.ImageBuildCompute) @@ -15577,11 +20498,15 @@ func (w WorkspaceProperties) MarshalJSON() ([]byte, error) { 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, "softDeleteRetentionInDays", w.SoftDeleteRetentionInDays) + populate(objectMap, "softDeletedAt", w.SoftDeletedAt) populate(objectMap, "storageAccount", w.StorageAccount) populate(objectMap, "storageHnsEnabled", w.StorageHnsEnabled) + populate(objectMap, "systemDatastoresAuthMode", w.SystemDatastoresAuthMode) populate(objectMap, "tenantId", w.TenantID) populate(objectMap, "v1LegacyMode", w.V1LegacyMode) populate(objectMap, "workspaceId", w.WorkspaceID) @@ -15615,6 +20540,9 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { case "encryption": err = unpopulate(val, "Encryption", &w.Encryption) delete(rawMsg, key) + case "featureStoreSettings": + err = unpopulate(val, "FeatureStoreSettings", &w.FeatureStoreSettings) + delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &w.FriendlyName) delete(rawMsg, key) @@ -15648,6 +20576,9 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { 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) @@ -15657,12 +20588,21 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { case "sharedPrivateLinkResources": err = unpopulate(val, "SharedPrivateLinkResources", &w.SharedPrivateLinkResources) delete(rawMsg, key) + case "softDeleteRetentionInDays": + err = unpopulate(val, "SoftDeleteRetentionInDays", &w.SoftDeleteRetentionInDays) + 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 "systemDatastoresAuthMode": + err = unpopulate(val, "SystemDatastoresAuthMode", &w.SystemDatastoresAuthMode) + delete(rawMsg, key) case "tenantId": err = unpopulate(val, "TenantID", &w.TenantID) delete(rawMsg, key) @@ -15682,10 +20622,12 @@ func (w *WorkspaceProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkspacePropertiesUpdateParameters. func (w WorkspacePropertiesUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "applicationInsights", w.ApplicationInsights) populate(objectMap, "containerRegistry", w.ContainerRegistry) populate(objectMap, "description", w.Description) + populate(objectMap, "encryption", w.Encryption) + populate(objectMap, "featureStoreSettings", w.FeatureStoreSettings) populate(objectMap, "friendlyName", w.FriendlyName) populate(objectMap, "imageBuildCompute", w.ImageBuildCompute) populate(objectMap, "primaryUserAssignedIdentity", w.PrimaryUserAssignedIdentity) @@ -15712,6 +20654,12 @@ func (w *WorkspacePropertiesUpdateParameters) UnmarshalJSON(data []byte) error { case "description": err = unpopulate(val, "Description", &w.Description) delete(rawMsg, key) + case "encryption": + err = unpopulate(val, "Encryption", &w.Encryption) + delete(rawMsg, key) + case "featureStoreSettings": + err = unpopulate(val, "FeatureStoreSettings", &w.FeatureStoreSettings) + delete(rawMsg, key) case "friendlyName": err = unpopulate(val, "FriendlyName", &w.FriendlyName) delete(rawMsg, key) @@ -15737,7 +20685,7 @@ func (w *WorkspacePropertiesUpdateParameters) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type WorkspaceUpdateParameters. func (w WorkspaceUpdateParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) + objectMap := make(map[string]any) populate(objectMap, "identity", w.Identity) populate(objectMap, "properties", w.Properties) populate(objectMap, "sku", w.SKU) @@ -15774,7 +20722,7 @@ func (w *WorkspaceUpdateParameters) UnmarshalJSON(data []byte) error { return nil } -func populate(m map[string]interface{}, k string, v interface{}) { +func populate(m map[string]any, k string, v any) { if v == nil { return } else if azcore.IsNullValue(v) { @@ -15784,7 +20732,7 @@ func populate(m map[string]interface{}, k string, v interface{}) { } } -func unpopulate(data json.RawMessage, fn string, v interface{}) error { +func unpopulate(data json.RawMessage, fn string, v any) error { if data == nil { return nil } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go index 818a7fa54222..1658d106d992 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client.go @@ -33,9 +33,9 @@ type ModelVersionsClient struct { } // NewModelVersionsClient creates a new instance of ModelVersionsClient 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. +// - 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 NewModelVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ModelVersionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,14 +58,15 @@ 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-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// body - Version entity to create or update. -// options - ModelVersionsClientCreateOrUpdateOptions contains the optional parameters for the ModelVersionsClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - body - Version entity to create or update. +// - options - ModelVersionsClientCreateOrUpdateOptions contains the optional parameters for the ModelVersionsClient.CreateOrUpdate +// method. func (client *ModelVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body ModelVersion, options *ModelVersionsClientCreateOrUpdateOptions) (ModelVersionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) if err != nil { @@ -109,7 +110,7 @@ func (client *ModelVersionsClient) createOrUpdateCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,12 +127,13 @@ 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-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// options - ModelVersionsClientDeleteOptions contains the optional parameters for the ModelVersionsClient.Delete method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - ModelVersionsClientDeleteOptions contains the optional parameters for the ModelVersionsClient.Delete method. func (client *ModelVersionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *ModelVersionsClientDeleteOptions) (ModelVersionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -175,7 +177,7 @@ func (client *ModelVersionsClient) deleteCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,12 +185,13 @@ 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-10-01 -// 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. -// version - Version identifier. This is case-sensitive. -// options - ModelVersionsClientGetOptions contains the optional parameters for the ModelVersionsClient.Get method. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - options - ModelVersionsClientGetOptions contains the optional parameters for the ModelVersionsClient.Get method. func (client *ModelVersionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, options *ModelVersionsClientGetOptions) (ModelVersionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, name, version, options) if err != nil { @@ -232,7 +235,7 @@ func (client *ModelVersionsClient) getCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -248,11 +251,12 @@ func (client *ModelVersionsClient) getHandleResponse(resp *http.Response) (Model } // NewListPager - List model versions. -// Generated from API version 2022-10-01 -// 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. -// options - ModelVersionsClientListOptions contains the optional parameters for the ModelVersionsClient.List method. +// +// Generated from API version 2023-02-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. +// - options - ModelVersionsClientListOptions contains the optional parameters for the ModelVersionsClient.NewListPager method. func (client *ModelVersionsClient) NewListPager(resourceGroupName string, workspaceName string, name string, options *ModelVersionsClientListOptions) *runtime.Pager[ModelVersionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[ModelVersionsClientListResponse]{ More: func(page ModelVersionsClientListResponse) bool { @@ -305,7 +309,7 @@ func (client *ModelVersionsClient) listCreateRequest(ctx context.Context, resour return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } @@ -349,3 +353,81 @@ func (client *ModelVersionsClient) listHandleResponse(resp *http.Response) (Mode } return result, nil } + +// BeginPackage - Model Version Package operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-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. +// - version - Version identifier. This is case-sensitive. +// - body - Package operation request body. +// - options - ModelVersionsClientBeginPackageOptions contains the optional parameters for the ModelVersionsClient.BeginPackage +// method. +func (client *ModelVersionsClient) BeginPackage(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body PackageRequest, options *ModelVersionsClientBeginPackageOptions) (*runtime.Poller[ModelVersionsClientPackageResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.packageOperation(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[ModelVersionsClientPackageResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[ModelVersionsClientPackageResponse](options.ResumeToken, client.pl, nil) + } +} + +// Package - Model Version Package operation. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *ModelVersionsClient) packageOperation(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body PackageRequest, options *ModelVersionsClientBeginPackageOptions) (*http.Response, error) { + req, err := client.packageCreateRequest(ctx, resourceGroupName, workspaceName, name, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// packageCreateRequest creates the Package request. +func (client *ModelVersionsClient) packageCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, name string, version string, body PackageRequest, options *ModelVersionsClientBeginPackageOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package" + 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)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-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/modelversions_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client_example_test.go deleted file mode 100644 index 0b653feb8174..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/modelversions_client_example_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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/onlinedeployments_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go index dded0fc721c2..54db47a4afb5 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client.go @@ -33,9 +33,9 @@ type OnlineDeploymentsClient struct { } // NewOnlineDeploymentsClient creates a new instance of OnlineDeploymentsClient 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. +// - 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 NewOnlineDeploymentsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OnlineDeploymentsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,21 +58,24 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name. -// deploymentName - Inference Endpoint Deployment name. -// body - Inference Endpoint entity to apply during operation. -// options - OnlineDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - deploymentName - Inference Endpoint Deployment name. +// - body - Inference Endpoint entity to apply during operation. +// - options - OnlineDeploymentsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginCreateOrUpdate +// method. func (client *OnlineDeploymentsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body OnlineDeployment, options *OnlineDeploymentsClientBeginCreateOrUpdateOptions) (*runtime.Poller[OnlineDeploymentsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) if err != nil { return nil, err } - return runtime.NewPoller[OnlineDeploymentsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[OnlineDeploymentsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) } else { return runtime.NewPollerFromResumeToken[OnlineDeploymentsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } @@ -80,7 +83,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -124,7 +128,7 @@ func (client *OnlineDeploymentsClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -132,20 +136,23 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name. -// deploymentName - Inference Endpoint Deployment name. -// options - OnlineDeploymentsClientBeginDeleteOptions contains the optional parameters for the OnlineDeploymentsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-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. +// - deploymentName - Inference Endpoint Deployment name. +// - options - OnlineDeploymentsClientBeginDeleteOptions contains the optional parameters for the OnlineDeploymentsClient.BeginDelete +// method. func (client *OnlineDeploymentsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *OnlineDeploymentsClientBeginDeleteOptions) (*runtime.Poller[OnlineDeploymentsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, options) if err != nil { return nil, err } - return runtime.NewPoller[OnlineDeploymentsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[OnlineDeploymentsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[OnlineDeploymentsClientDeleteResponse](options.ResumeToken, client.pl, nil) } @@ -153,7 +160,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -197,7 +205,7 @@ func (client *OnlineDeploymentsClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -205,12 +213,13 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name. -// deploymentName - Inference Endpoint Deployment name. -// options - OnlineDeploymentsClientGetOptions contains the optional parameters for the OnlineDeploymentsClient.Get method. +// +// Generated from API version 2023-02-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. +// - deploymentName - Inference Endpoint Deployment name. +// - options - OnlineDeploymentsClientGetOptions contains the optional parameters for the OnlineDeploymentsClient.Get method. func (client *OnlineDeploymentsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *OnlineDeploymentsClientGetOptions) (OnlineDeploymentsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, options) if err != nil { @@ -254,7 +263,7 @@ func (client *OnlineDeploymentsClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -271,14 +280,15 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name. -// deploymentName - The name and identifier for the endpoint. -// body - The request containing parameters for retrieving logs. -// options - OnlineDeploymentsClientGetLogsOptions contains the optional parameters for the OnlineDeploymentsClient.GetLogs -// method. +// +// Generated from API version 2023-02-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. +// - deploymentName - The name and identifier for the endpoint. +// - body - The request containing parameters for retrieving logs. +// - options - OnlineDeploymentsClientGetLogsOptions contains the optional parameters for the OnlineDeploymentsClient.GetLogs +// method. func (client *OnlineDeploymentsClient) GetLogs(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body DeploymentLogsRequest, options *OnlineDeploymentsClientGetLogsOptions) (OnlineDeploymentsClientGetLogsResponse, error) { req, err := client.getLogsCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) if err != nil { @@ -322,7 +332,7 @@ func (client *OnlineDeploymentsClient) getLogsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -338,11 +348,13 @@ func (client *OnlineDeploymentsClient) getLogsHandleResponse(resp *http.Response } // NewListPager - List Inference Endpoint Deployments. -// Generated from API version 2022-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name. -// options - OnlineDeploymentsClientListOptions contains the optional parameters for the OnlineDeploymentsClient.List method. +// +// Generated from API version 2023-02-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. +// - options - OnlineDeploymentsClientListOptions contains the optional parameters for the OnlineDeploymentsClient.NewListPager +// method. func (client *OnlineDeploymentsClient) NewListPager(resourceGroupName string, workspaceName string, endpointName string, options *OnlineDeploymentsClientListOptions) *runtime.Pager[OnlineDeploymentsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OnlineDeploymentsClientListResponse]{ More: func(page OnlineDeploymentsClientListResponse) bool { @@ -395,7 +407,7 @@ func (client *OnlineDeploymentsClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.OrderBy != nil { reqQP.Set("$orderBy", *options.OrderBy) } @@ -420,13 +432,14 @@ func (client *OnlineDeploymentsClient) listHandleResponse(resp *http.Response) ( } // NewListSKUsPager - List Inference Endpoint Deployment Skus. -// Generated from API version 2022-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Inference endpoint name. -// deploymentName - Inference Endpoint Deployment name. -// options - OnlineDeploymentsClientListSKUsOptions contains the optional parameters for the OnlineDeploymentsClient.ListSKUs -// method. +// +// Generated from API version 2023-02-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. +// - deploymentName - Inference Endpoint Deployment name. +// - options - OnlineDeploymentsClientListSKUsOptions contains the optional parameters for the OnlineDeploymentsClient.NewListSKUsPager +// method. func (client *OnlineDeploymentsClient) NewListSKUsPager(resourceGroupName string, workspaceName string, endpointName string, deploymentName string, options *OnlineDeploymentsClientListSKUsOptions) *runtime.Pager[OnlineDeploymentsClientListSKUsResponse] { return runtime.NewPager(runtime.PagingHandler[OnlineDeploymentsClientListSKUsResponse]{ More: func(page OnlineDeploymentsClientListSKUsResponse) bool { @@ -483,7 +496,7 @@ func (client *OnlineDeploymentsClient) listSKUsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Count != nil { reqQP.Set("count", strconv.FormatInt(int64(*options.Count), 10)) } @@ -506,14 +519,15 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// deploymentName - Inference Endpoint Deployment name. -// body - Online Endpoint entity to apply during operation. -// options - OnlineDeploymentsClientBeginUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginUpdate -// method. +// +// Generated from API version 2023-02-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. +// - deploymentName - Inference Endpoint Deployment name. +// - body - Online Endpoint entity to apply during operation. +// - options - OnlineDeploymentsClientBeginUpdateOptions contains the optional parameters for the OnlineDeploymentsClient.BeginUpdate +// method. func (client *OnlineDeploymentsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, deploymentName string, body PartialMinimalTrackedResourceWithSKU, options *OnlineDeploymentsClientBeginUpdateOptions) (*runtime.Poller[OnlineDeploymentsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, endpointName, deploymentName, body, options) @@ -528,7 +542,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -572,7 +587,7 @@ func (client *OnlineDeploymentsClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/onlinedeployments_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client_example_test.go deleted file mode 100644 index 531ea7e570dd..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlinedeployments_client_example_test.go +++ /dev/null @@ -1,409 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json -func ExampleOnlineDeploymentsClient_Get_getKubernetesOnlineDeployment() { - 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-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json -func ExampleOnlineDeploymentsClient_Get_getManagedOnlineDeployment() { - 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-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json -func ExampleOnlineDeploymentsClient_BeginUpdate_updateKubernetesOnlineDeployment() { - 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-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json -func ExampleOnlineDeploymentsClient_BeginUpdate_updateManagedOnlineDeployment() { - 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-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json -func ExampleOnlineDeploymentsClient_BeginCreateOrUpdate_createOrUpdateKubernetesOnlineDeployment() { - 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-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json -func ExampleOnlineDeploymentsClient_BeginCreateOrUpdate_createOrUpdateManagedOnlineDeployment() { - 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.ManagedOnlineDeployment{ - 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.EndpointComputeTypeManaged), - 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"), - ReadinessProbe: &armmachinelearning.ProbeSettings{ - FailureThreshold: to.Ptr[int32](30), - InitialDelay: to.Ptr("PT1S"), - Period: to.Ptr("PT10S"), - SuccessThreshold: to.Ptr[int32](1), - Timeout: to.Ptr("PT2S"), - }, - RequestSettings: &armmachinelearning.OnlineRequestSettings{ - MaxConcurrentRequestsPerInstance: to.Ptr[int32](1), - MaxQueueWait: to.Ptr("PT5M"), - RequestTimeout: to.Ptr("PT5M"), - }, - ScaleSettings: &armmachinelearning.DefaultScaleSettings{ - ScaleType: to.Ptr(armmachinelearning.ScaleTypeDefault), - }, - }, - 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-10-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 -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json -func ExampleOnlineDeploymentsClient_NewListSKUsPager_listKubernetesOnlineDeploymentSkus() { - 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.NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{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-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json -func ExampleOnlineDeploymentsClient_NewListSKUsPager_listManagedOnlineDeploymentSkus() { - 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.NewListSKUsPager("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", &armmachinelearning.OnlineDeploymentsClientListSKUsOptions{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 - } - } -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go index d24a6f1c0b2c..5e0d23a8b084 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client.go @@ -33,9 +33,9 @@ type OnlineEndpointsClient struct { } // NewOnlineEndpointsClient creates a new instance of OnlineEndpointsClient 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. +// - 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 NewOnlineEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OnlineEndpointsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -58,20 +58,23 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// body - Online Endpoint entity to apply during operation. -// options - OnlineEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - body - Online Endpoint entity to apply during operation. +// - options - OnlineEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginCreateOrUpdate +// method. func (client *OnlineEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body OnlineEndpoint, options *OnlineEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[OnlineEndpointsClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, endpointName, body, options) if err != nil { return nil, err } - return runtime.NewPoller[OnlineEndpointsClientCreateOrUpdateResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[OnlineEndpointsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) } else { return runtime.NewPollerFromResumeToken[OnlineEndpointsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } @@ -79,7 +82,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -119,7 +123,7 @@ func (client *OnlineEndpointsClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -127,19 +131,22 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// options - OnlineEndpointsClientBeginDeleteOptions contains the optional parameters for the OnlineEndpointsClient.BeginDelete -// method. +// +// Generated from API version 2023-02-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. +// - options - OnlineEndpointsClientBeginDeleteOptions contains the optional parameters for the OnlineEndpointsClient.BeginDelete +// method. func (client *OnlineEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *OnlineEndpointsClientBeginDeleteOptions) (*runtime.Poller[OnlineEndpointsClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { return nil, err } - return runtime.NewPoller[OnlineEndpointsClientDeleteResponse](resp, client.pl, nil) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[OnlineEndpointsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[OnlineEndpointsClientDeleteResponse](options.ResumeToken, client.pl, nil) } @@ -147,7 +154,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -187,7 +195,7 @@ func (client *OnlineEndpointsClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -195,11 +203,12 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// options - OnlineEndpointsClientGetOptions contains the optional parameters for the OnlineEndpointsClient.Get method. +// +// Generated from API version 2023-02-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. +// - options - OnlineEndpointsClientGetOptions contains the optional parameters for the OnlineEndpointsClient.Get method. func (client *OnlineEndpointsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *OnlineEndpointsClientGetOptions) (OnlineEndpointsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { @@ -239,7 +248,7 @@ func (client *OnlineEndpointsClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -256,12 +265,13 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// options - OnlineEndpointsClientGetTokenOptions contains the optional parameters for the OnlineEndpointsClient.GetToken -// method. +// +// Generated from API version 2023-02-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. +// - options - OnlineEndpointsClientGetTokenOptions contains the optional parameters for the OnlineEndpointsClient.GetToken +// method. func (client *OnlineEndpointsClient) GetToken(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *OnlineEndpointsClientGetTokenOptions) (OnlineEndpointsClientGetTokenResponse, error) { req, err := client.getTokenCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { @@ -301,7 +311,7 @@ func (client *OnlineEndpointsClient) getTokenCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -317,10 +327,12 @@ func (client *OnlineEndpointsClient) getTokenHandleResponse(resp *http.Response) } // NewListPager - List Online Endpoints. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager +// method. func (client *OnlineEndpointsClient) NewListPager(resourceGroupName string, workspaceName string, options *OnlineEndpointsClientListOptions) *runtime.Pager[OnlineEndpointsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OnlineEndpointsClientListResponse]{ More: func(page OnlineEndpointsClientListResponse) bool { @@ -369,7 +381,7 @@ func (client *OnlineEndpointsClient) listCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Name != nil { reqQP.Set("name", *options.Name) } @@ -407,12 +419,13 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// options - OnlineEndpointsClientListKeysOptions contains the optional parameters for the OnlineEndpointsClient.ListKeys -// method. +// +// Generated from API version 2023-02-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. +// - options - OnlineEndpointsClientListKeysOptions contains the optional parameters for the OnlineEndpointsClient.ListKeys +// method. func (client *OnlineEndpointsClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, options *OnlineEndpointsClientListKeysOptions) (OnlineEndpointsClientListKeysResponse, error) { req, err := client.listKeysCreateRequest(ctx, resourceGroupName, workspaceName, endpointName, options) if err != nil { @@ -452,7 +465,7 @@ func (client *OnlineEndpointsClient) listKeysCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -469,13 +482,14 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// body - RegenerateKeys request . -// options - OnlineEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the OnlineEndpointsClient.BeginRegenerateKeys -// method. +// +// Generated from API version 2023-02-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. +// - body - RegenerateKeys request . +// - options - OnlineEndpointsClientBeginRegenerateKeysOptions contains the optional parameters for the OnlineEndpointsClient.BeginRegenerateKeys +// method. func (client *OnlineEndpointsClient) BeginRegenerateKeys(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body RegenerateEndpointKeysRequest, options *OnlineEndpointsClientBeginRegenerateKeysOptions) (*runtime.Poller[OnlineEndpointsClientRegenerateKeysResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.regenerateKeys(ctx, resourceGroupName, workspaceName, endpointName, body, options) @@ -492,7 +506,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 +547,7 @@ func (client *OnlineEndpointsClient) regenerateKeysCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -540,13 +555,14 @@ 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-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// workspaceName - Name of Azure Machine Learning workspace. -// endpointName - Online Endpoint name. -// body - Online Endpoint entity to apply during operation. -// options - OnlineEndpointsClientBeginUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginUpdate -// method. +// +// Generated from API version 2023-02-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. +// - body - Online Endpoint entity to apply during operation. +// - options - OnlineEndpointsClientBeginUpdateOptions contains the optional parameters for the OnlineEndpointsClient.BeginUpdate +// method. func (client *OnlineEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, endpointName string, body PartialMinimalTrackedResourceWithIdentity, options *OnlineEndpointsClientBeginUpdateOptions) (*runtime.Poller[OnlineEndpointsClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, endpointName, body, options) @@ -561,7 +577,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 +618,7 @@ func (client *OnlineEndpointsClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/onlineendpoints_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client_example_test.go deleted file mode 100644 index 41eb79a84378..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/onlineendpoints_client_example_test.go +++ /dev/null @@ -1,233 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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/operations_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go index ab9765694a73..73c263d3da02 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client.go @@ -28,8 +28,8 @@ type OperationsClient struct { } // NewOperationsClient creates a new instance of OperationsClient with the specified values. -// credential - used to authorize requests. Usually a credential from azidentity. -// options - pass nil to accept the default values. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -49,9 +49,10 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return client, nil } -// NewListPager - Lists all of the available Azure Machine Learning Workspaces REST API operations. -// Generated from API version 2022-10-01 -// options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. +// NewListPager - Lists all of the available Azure Machine Learning Services REST API operations. +// +// Generated from API version 2023-02-01-preview +// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ More: func(page OperationsClientListResponse) bool { @@ -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-10-01") + reqQP.Set("api-version", "2023-02-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/operations_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client_example_test.go deleted file mode 100644 index 61899fc58c65..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/operations_client_example_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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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/polymorphic_helpers.go b/sdk/resourcemanager/machinelearning/armmachinelearning/polymorphic_helpers.go index 4836fbf50241..1ff3589cc72b 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/polymorphic_helpers.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/polymorphic_helpers.go @@ -15,7 +15,7 @@ func unmarshalAssetReferenceBaseClassification(rawMsg json.RawMessage) (AssetRef if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -37,7 +37,7 @@ func unmarshalAutoMLVerticalClassification(rawMsg json.RawMessage) (AutoMLVertic if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -69,11 +69,47 @@ func unmarshalAutoMLVerticalClassification(rawMsg json.RawMessage) (AutoMLVertic return b, json.Unmarshal(rawMsg, b) } +func unmarshalBaseEnvironmentSourceClassification(rawMsg json.RawMessage) (BaseEnvironmentSourceClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BaseEnvironmentSourceClassification + switch m["baseEnvironmentSourceType"] { + case string(BaseEnvironmentSourceTypeEnvironmentAsset): + b = &BaseEnvironmentID{} + default: + b = &BaseEnvironmentSource{} + } + return b, json.Unmarshal(rawMsg, b) +} + +func unmarshalBatchDeploymentConfigurationClassification(rawMsg json.RawMessage) (BatchDeploymentConfigurationClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b BatchDeploymentConfigurationClassification + switch m["deploymentConfigurationType"] { + case string(BatchDeploymentConfigurationTypePipelineComponent): + b = &BatchPipelineComponentDeploymentConfiguration{} + default: + b = &BatchDeploymentConfiguration{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalComputeClassification(rawMsg json.RawMessage) (ComputeClassification, error) { if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -109,7 +145,7 @@ func unmarshalComputeSecretsClassification(rawMsg json.RawMessage) (ComputeSecre if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -131,7 +167,7 @@ func unmarshalDataVersionBasePropertiesClassification(rawMsg json.RawMessage) (D if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -153,7 +189,7 @@ func unmarshalDatastoreCredentialsClassification(rawMsg json.RawMessage) (Datast if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -163,6 +199,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): @@ -179,7 +219,7 @@ func unmarshalDatastorePropertiesClassification(rawMsg json.RawMessage) (Datasto if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -193,6 +233,8 @@ func unmarshalDatastorePropertiesClassification(rawMsg json.RawMessage) (Datasto b = &AzureDataLakeGen2Datastore{} case string(DatastoreTypeAzureFile): b = &AzureFileDatastore{} + case string(DatastoreTypeHdfs): + b = &HdfsDatastore{} default: b = &DatastoreProperties{} } @@ -203,7 +245,7 @@ func unmarshalDatastoreSecretsClassification(rawMsg json.RawMessage) (DatastoreS if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -213,6 +255,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): @@ -227,7 +273,7 @@ func unmarshalDistributionConfigurationClassification(rawMsg json.RawMessage) (D if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -249,7 +295,7 @@ func unmarshalEarlyTerminationPolicyClassification(rawMsg json.RawMessage) (Earl if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -267,11 +313,33 @@ 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]any + 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{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -291,7 +359,7 @@ func unmarshalIdentityConfigurationClassification(rawMsg json.RawMessage) (Ident if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -309,11 +377,35 @@ func unmarshalIdentityConfigurationClassification(rawMsg json.RawMessage) (Ident return b, json.Unmarshal(rawMsg, b) } +func unmarshalInferencingServerClassification(rawMsg json.RawMessage) (InferencingServerClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b InferencingServerClassification + switch m["serverType"] { + case string(InferencingServerTypeAzureMLBatch): + b = &AzureMLBatchInferencingServer{} + case string(InferencingServerTypeAzureMLOnline): + b = &AzureMLOnlineInferencingServer{} + case string(InferencingServerTypeCustom): + b = &CustomInferencingServer{} + case string(InferencingServerTypeTriton): + b = &TritonInferencingServer{} + default: + b = &InferencingServer{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalJobBasePropertiesClassification(rawMsg json.RawMessage) (JobBasePropertiesClassification, error) { if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -323,8 +415,12 @@ func unmarshalJobBasePropertiesClassification(rawMsg json.RawMessage) (JobBasePr 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: @@ -337,7 +433,7 @@ func unmarshalJobInputClassification(rawMsg json.RawMessage) (JobInputClassifica if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -386,7 +482,7 @@ func unmarshalJobOutputClassification(rawMsg json.RawMessage) (JobOutputClassifi if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -429,11 +525,51 @@ 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]any + 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]any + 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{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -449,11 +585,29 @@ func unmarshalNCrossValidationsClassification(rawMsg json.RawMessage) (NCrossVal return b, json.Unmarshal(rawMsg, b) } +func unmarshalNodesClassification(rawMsg json.RawMessage) (NodesClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b NodesClassification + switch m["nodesValueType"] { + case string(NodesValueTypeAll): + b = &AllNodes{} + default: + b = &Nodes{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalOnlineDeploymentPropertiesClassification(rawMsg json.RawMessage) (OnlineDeploymentPropertiesClassification, error) { if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -473,7 +627,7 @@ func unmarshalOnlineScaleSettingsClassification(rawMsg json.RawMessage) (OnlineS if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -489,11 +643,33 @@ func unmarshalOnlineScaleSettingsClassification(rawMsg json.RawMessage) (OnlineS return b, json.Unmarshal(rawMsg, b) } +func unmarshalPackageInputPathBaseClassification(rawMsg json.RawMessage) (PackageInputPathBaseClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b PackageInputPathBaseClassification + switch m["inputPathType"] { + case string(InputPathTypePathID): + b = &PackageInputPathID{} + case string(InputPathTypePathVersion): + b = &PackageInputPathVersion{} + case string(InputPathTypeURL): + b = &PackageInputPathURL{} + default: + b = &PackageInputPathBase{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalSamplingAlgorithmClassification(rawMsg json.RawMessage) (SamplingAlgorithmClassification, error) { if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -515,7 +691,7 @@ func unmarshalScheduleActionBaseClassification(rawMsg json.RawMessage) (Schedule if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -535,7 +711,7 @@ func unmarshalSeasonalityClassification(rawMsg json.RawMessage) (SeasonalityClas if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -551,11 +727,31 @@ func unmarshalSeasonalityClassification(rawMsg json.RawMessage) (SeasonalityClas return b, json.Unmarshal(rawMsg, b) } +func unmarshalSparkJobEntryClassification(rawMsg json.RawMessage) (SparkJobEntryClassification, error) { + if rawMsg == nil { + return nil, nil + } + var m map[string]any + if err := json.Unmarshal(rawMsg, &m); err != nil { + return nil, err + } + var b SparkJobEntryClassification + switch m["sparkJobEntryType"] { + case string(SparkJobEntryTypeSparkJobPythonEntry): + b = &SparkJobPythonEntry{} + case string(SparkJobEntryTypeSparkJobScalaEntry): + b = &SparkJobScalaEntry{} + default: + b = &SparkJobEntry{} + } + return b, json.Unmarshal(rawMsg, b) +} + func unmarshalTargetLagsClassification(rawMsg json.RawMessage) (TargetLagsClassification, error) { if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -575,7 +771,7 @@ func unmarshalTargetRollingWindowSizeClassification(rawMsg json.RawMessage) (Tar if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -595,7 +791,7 @@ func unmarshalTriggerBaseClassification(rawMsg json.RawMessage) (TriggerBaseClas if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } @@ -615,12 +811,14 @@ func unmarshalWorkspaceConnectionPropertiesV2Classification(rawMsg json.RawMessa if rawMsg == nil { return nil, nil } - var m map[string]interface{} + var m map[string]any if err := json.Unmarshal(rawMsg, &m); err != nil { return nil, err } var b WorkspaceConnectionPropertiesV2Classification switch m["authType"] { + case string(ConnectionAuthTypeAccessKey): + b = &AccessKeyAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeManagedIdentity): b = &ManagedIdentityAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeNone): @@ -629,6 +827,8 @@ func unmarshalWorkspaceConnectionPropertiesV2Classification(rawMsg json.RawMessa b = &PATAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeSAS): b = &SASAuthTypeWorkspaceConnectionProperties{} + case string(ConnectionAuthTypeServicePrincipal): + b = &ServicePrincipalAuthTypeWorkspaceConnectionProperties{} case string(ConnectionAuthTypeUsernamePassword): b = &UsernamePasswordAuthTypeWorkspaceConnectionProperties{} default: diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go index e8c872f1ddec..a36a11e686dd 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client.go @@ -32,9 +32,9 @@ type PrivateEndpointConnectionsClient struct { } // NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient 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. +// - 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 NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ 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-10-01 -// 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 -// properties - The private endpoint connection properties. -// options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate -// method. +// +// Generated from API version 2023-02-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 +// - properties - The private endpoint connection properties. +// - options - PrivateEndpointConnectionsClientCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.CreateOrUpdate +// method. func (client *PrivateEndpointConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, properties PrivateEndpointConnection, options *PrivateEndpointConnectionsClientCreateOrUpdateOptions) (PrivateEndpointConnectionsClientCreateOrUpdateResponse, error) { req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, properties, options) if err != nil { @@ -103,7 +104,7 @@ func (client *PrivateEndpointConnectionsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, properties) @@ -120,12 +121,13 @@ 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-10-01 -// 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 -// options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete -// method. +// +// Generated from API version 2023-02-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 +// - options - PrivateEndpointConnectionsClientDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Delete +// method. func (client *PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientDeleteOptions) (PrivateEndpointConnectionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) if err != nil { @@ -165,7 +167,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,12 +175,13 @@ 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-10-01 -// 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 -// options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get -// method. +// +// Generated from API version 2023-02-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 +// - options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get +// method. func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, privateEndpointConnectionName, options) if err != nil { @@ -218,7 +221,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -234,11 +237,12 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res } // NewListPager - List all the private endpoint connections associated with the workspace. -// Generated from API version 2022-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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.NewListPager +// method. func (client *PrivateEndpointConnectionsClient) NewListPager(resourceGroupName string, workspaceName string, options *PrivateEndpointConnectionsClientListOptions) *runtime.Pager[PrivateEndpointConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[PrivateEndpointConnectionsClientListResponse]{ More: func(page PrivateEndpointConnectionsClientListResponse) bool { @@ -281,7 +285,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client_example_test.go deleted file mode 100644 index 83397fe650be..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,104 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/privatelinkresources_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go index f1593053df57..6a142067a326 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client.go @@ -32,9 +32,9 @@ type PrivateLinkResourcesClient struct { } // NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient 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. +// - 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 NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,11 +57,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, workspaceName string, options *PrivateLinkResourcesClientListOptions) (PrivateLinkResourcesClientListResponse, error) { req, err := client.listCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -97,7 +98,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/privatelinkresources_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client_example_test.go deleted file mode 100644 index caaec8fc3076..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,36 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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/quotas_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go index 45b438b25c3c..50eee1e80866 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client.go @@ -32,9 +32,9 @@ type QuotasClient struct { } // NewQuotasClient creates a new instance of QuotasClient 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. +// - 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 NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*QuotasClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,9 +56,10 @@ func NewQuotasClient(subscriptionID string, credential azcore.TokenCredential, o } // NewListPager - Gets the currently assigned Workspace Quotas based on VMFamily. -// Generated from API version 2022-10-01 -// location - The location for which resource usage is queried. -// options - QuotasClientListOptions contains the optional parameters for the QuotasClient.List method. +// +// Generated from API version 2023-02-01-preview +// - location - The location for which resource usage is queried. +// - options - QuotasClientListOptions contains the optional parameters for the QuotasClient.NewListPager method. func (client *QuotasClient) NewListPager(location string, options *QuotasClientListOptions) *runtime.Pager[QuotasClientListResponse] { return runtime.NewPager(runtime.PagingHandler[QuotasClientListResponse]{ More: func(page QuotasClientListResponse) bool { @@ -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-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,10 +121,11 @@ 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-10-01 -// location - The location for update quota is queried. -// parameters - Quota update parameters. -// options - QuotasClientUpdateOptions contains the optional parameters for the QuotasClient.Update method. +// +// Generated from API version 2023-02-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. func (client *QuotasClient) Update(ctx context.Context, location string, parameters QuotaUpdateParameters, options *QuotasClientUpdateOptions) (QuotasClientUpdateResponse, error) { req, err := client.updateCreateRequest(ctx, location, parameters, options) if err != nil { @@ -155,7 +157,7 @@ func (client *QuotasClient) updateCreateRequest(ctx context.Context, location st return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/quotas_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client_example_test.go deleted file mode 100644 index ec0e07e0c755..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/quotas_client_example_test.go +++ /dev/null @@ -1,75 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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/registries_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go new file mode 100644 index 000000000000..b711339583de --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registries_client.go @@ -0,0 +1,444 @@ +//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" +) + +// RegistriesClient contains the methods for the Registries group. +// Don't use this type directly, use NewRegistriesClient() instead. +type RegistriesClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistriesClient creates a new instance of RegistriesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistriesClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistriesClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of registry. This is case-insensitive +// - body - Details required to create the registry. +// - options - RegistriesClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistriesClient.BeginCreateOrUpdate +// method. +func (client *RegistriesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistriesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistriesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaAzureAsyncOp, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistriesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistriesClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistriesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, body Registry, options *RegistriesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of registry. This is case-insensitive +// - options - RegistriesClientBeginDeleteOptions contains the optional parameters for the RegistriesClient.BeginDelete method. +func (client *RegistriesClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*runtime.Poller[RegistriesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistriesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistriesClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete registry. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistriesClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistriesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get registry +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of registry. This is case-insensitive +// - options - RegistriesClientGetOptions contains the optional parameters for the RegistriesClient.Get method. +func (client *RegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientGetOptions) (RegistriesClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, options) + if err != nil { + return RegistriesClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistriesClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistriesClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistriesClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistriesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistriesClient) getHandleResponse(resp *http.Response) (RegistriesClientGetResponse, error) { + result := RegistriesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Registry); err != nil { + return RegistriesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List registries +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - RegistriesClientListOptions contains the optional parameters for the RegistriesClient.NewListPager method. +func (client *RegistriesClient) NewListPager(resourceGroupName string, options *RegistriesClientListOptions) *runtime.Pager[RegistriesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistriesClientListResponse]{ + More: func(page RegistriesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistriesClientListResponse) (RegistriesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistriesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistriesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistriesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistriesClient) listCreateRequest(ctx context.Context, resourceGroupName string, options *RegistriesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistriesClient) listHandleResponse(resp *http.Response) (RegistriesClientListResponse, error) { + result := RegistriesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistryTrackedResourceArmPaginatedResult); err != nil { + return RegistriesClientListResponse{}, err + } + return result, nil +} + +// NewListBySubscriptionPager - List registries by subscription +// +// Generated from API version 2023-02-01-preview +// - options - RegistriesClientListBySubscriptionOptions contains the optional parameters for the RegistriesClient.NewListBySubscriptionPager +// method. +func (client *RegistriesClient) NewListBySubscriptionPager(options *RegistriesClientListBySubscriptionOptions) *runtime.Pager[RegistriesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistriesClientListBySubscriptionResponse]{ + More: func(page RegistriesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistriesClientListBySubscriptionResponse) (RegistriesClientListBySubscriptionResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listBySubscriptionCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistriesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + } + return client.listBySubscriptionHandleResponse(resp) + }, + }) +} + +// listBySubscriptionCreateRequest creates the ListBySubscription request. +func (client *RegistriesClient) listBySubscriptionCreateRequest(ctx context.Context, options *RegistriesClientListBySubscriptionOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listBySubscriptionHandleResponse handles the ListBySubscription response. +func (client *RegistriesClient) listBySubscriptionHandleResponse(resp *http.Response) (RegistriesClientListBySubscriptionResponse, error) { + result := RegistriesClientListBySubscriptionResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.RegistryTrackedResourceArmPaginatedResult); err != nil { + return RegistriesClientListBySubscriptionResponse{}, err + } + return result, nil +} + +// BeginUpdate - Update tags +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of registry. This is case-insensitive +// - body - Details required to create the registry. +// - options - RegistriesClientBeginUpdateOptions contains the optional parameters for the RegistriesClient.BeginUpdate method. +func (client *RegistriesClient) BeginUpdate(ctx context.Context, resourceGroupName string, registryName string, body PartialRegistryPartialTrackedResource, options *RegistriesClientBeginUpdateOptions) (*runtime.Poller[RegistriesClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistriesClientUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistriesClientUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// Update - Update tags +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistriesClient) update(ctx context.Context, resourceGroupName string, registryName string, body PartialRegistryPartialTrackedResource, options *RegistriesClientBeginUpdateOptions) (*http.Response, error) { + req, err := client.updateCreateRequest(ctx, resourceGroupName, registryName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// updateCreateRequest creates the Update request. +func (client *RegistriesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, body PartialRegistryPartialTrackedResource, options *RegistriesClientBeginUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-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/registrycodecontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go new file mode 100644 index 000000000000..f4db66a3ce3f --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodecontainers_client.go @@ -0,0 +1,337 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryCodeContainersClient contains the methods for the RegistryCodeContainers group. +// Don't use this type directly, use NewRegistryCodeContainersClient() instead. +type RegistryCodeContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryCodeContainersClient creates a new instance of RegistryCodeContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryCodeContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryCodeContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryCodeContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - codeName - Container name. +// - body - Container entity to create or update. +// - options - RegistryCodeContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryCodeContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, codeName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryCodeContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, codeName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryCodeContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, body CodeContainer, options *RegistryCodeContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - codeName - Container name. +// - options - RegistryCodeContainersClientBeginDeleteOptions contains the optional parameters for the RegistryCodeContainersClient.BeginDelete +// method. +func (client *RegistryCodeContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryCodeContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryCodeContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - codeName - Container name. +// - options - RegistryCodeContainersClientGetOptions contains the optional parameters for the RegistryCodeContainersClient.Get +// method. +func (client *RegistryCodeContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientGetOptions) (RegistryCodeContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + if err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryCodeContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryCodeContainersClient) getHandleResponse(resp *http.Response) (RegistryCodeContainersClientGetResponse, error) { + result := RegistryCodeContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeContainer); err != nil { + return RegistryCodeContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - options - RegistryCodeContainersClientListOptions contains the optional parameters for the RegistryCodeContainersClient.NewListPager +// method. +func (client *RegistryCodeContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryCodeContainersClientListOptions) *runtime.Pager[RegistryCodeContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryCodeContainersClientListResponse]{ + More: func(page RegistryCodeContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryCodeContainersClientListResponse) (RegistryCodeContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryCodeContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryCodeContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryCodeContainersClient) listHandleResponse(resp *http.Response) (RegistryCodeContainersClientListResponse, error) { + result := RegistryCodeContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeContainerResourceArmPaginatedResult); err != nil { + return RegistryCodeContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go new file mode 100644 index 000000000000..9ccd5af3fec1 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycodeversions_client.go @@ -0,0 +1,364 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryCodeVersionsClient contains the methods for the RegistryCodeVersions group. +// Don't use this type directly, use NewRegistryCodeVersionsClient() instead. +type RegistryCodeVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryCodeVersionsClient creates a new instance of RegistryCodeVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryCodeVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryCodeVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryCodeVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - codeName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryCodeVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryCodeVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryCodeVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, codeName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryCodeVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, codeName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryCodeVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, body CodeVersion, options *RegistryCodeVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - codeName - Container name. +// - version - Version identifier. +// - options - RegistryCodeVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryCodeVersionsClient.BeginDelete +// method. +func (client *RegistryCodeVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryCodeVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryCodeVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryCodeVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryCodeVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryCodeVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - codeName - Container name. +// - version - Version identifier. +// - options - RegistryCodeVersionsClientGetOptions contains the optional parameters for the RegistryCodeVersionsClient.Get +// method. +func (client *RegistryCodeVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientGetOptions) (RegistryCodeVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, codeName, version, options) + if err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryCodeVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, version string, options *RegistryCodeVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryCodeVersionsClient) getHandleResponse(resp *http.Response) (RegistryCodeVersionsClientGetResponse, error) { + result := RegistryCodeVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeVersion); err != nil { + return RegistryCodeVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - codeName - Container name. +// - options - RegistryCodeVersionsClientListOptions contains the optional parameters for the RegistryCodeVersionsClient.NewListPager +// method. +func (client *RegistryCodeVersionsClient) NewListPager(resourceGroupName string, registryName string, codeName string, options *RegistryCodeVersionsClientListOptions) *runtime.Pager[RegistryCodeVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryCodeVersionsClientListResponse]{ + More: func(page RegistryCodeVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryCodeVersionsClientListResponse) (RegistryCodeVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, codeName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryCodeVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryCodeVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, codeName string, options *RegistryCodeVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if codeName == "" { + return nil, errors.New("parameter codeName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{codeName}", url.PathEscape(codeName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryCodeVersionsClient) listHandleResponse(resp *http.Response) (RegistryCodeVersionsClientListResponse, error) { + result := RegistryCodeVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.CodeVersionResourceArmPaginatedResult); err != nil { + return RegistryCodeVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go new file mode 100644 index 000000000000..2914f462a748 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentcontainers_client.go @@ -0,0 +1,337 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryComponentContainersClient contains the methods for the RegistryComponentContainers group. +// Don't use this type directly, use NewRegistryComponentContainersClient() instead. +type RegistryComponentContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryComponentContainersClient creates a new instance of RegistryComponentContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryComponentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryComponentContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryComponentContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - componentName - Container name. +// - body - Container entity to create or update. +// - options - RegistryComponentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryComponentContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, componentName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryComponentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, componentName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryComponentContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, body ComponentContainer, options *RegistryComponentContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - componentName - Container name. +// - options - RegistryComponentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryComponentContainersClient.BeginDelete +// method. +func (client *RegistryComponentContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryComponentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryComponentContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - componentName - Container name. +// - options - RegistryComponentContainersClientGetOptions contains the optional parameters for the RegistryComponentContainersClient.Get +// method. +func (client *RegistryComponentContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientGetOptions) (RegistryComponentContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + if err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryComponentContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryComponentContainersClient) getHandleResponse(resp *http.Response) (RegistryComponentContainersClientGetResponse, error) { + result := RegistryComponentContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentContainer); err != nil { + return RegistryComponentContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - options - RegistryComponentContainersClientListOptions contains the optional parameters for the RegistryComponentContainersClient.NewListPager +// method. +func (client *RegistryComponentContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryComponentContainersClientListOptions) *runtime.Pager[RegistryComponentContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryComponentContainersClientListResponse]{ + More: func(page RegistryComponentContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryComponentContainersClientListResponse) (RegistryComponentContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryComponentContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryComponentContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryComponentContainersClient) listHandleResponse(resp *http.Response) (RegistryComponentContainersClientListResponse, error) { + result := RegistryComponentContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentContainerResourceArmPaginatedResult); err != nil { + return RegistryComponentContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go new file mode 100644 index 000000000000..02ff085aa75c --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrycomponentversions_client.go @@ -0,0 +1,364 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryComponentVersionsClient contains the methods for the RegistryComponentVersions group. +// Don't use this type directly, use NewRegistryComponentVersionsClient() instead. +type RegistryComponentVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryComponentVersionsClient creates a new instance of RegistryComponentVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryComponentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryComponentVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryComponentVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - componentName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryComponentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryComponentVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryComponentVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, componentName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryComponentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, componentName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryComponentVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, body ComponentVersion, options *RegistryComponentVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - componentName - Container name. +// - version - Version identifier. +// - options - RegistryComponentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryComponentVersionsClient.BeginDelete +// method. +func (client *RegistryComponentVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryComponentVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryComponentVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryComponentVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryComponentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryComponentVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - componentName - Container name. +// - version - Version identifier. +// - options - RegistryComponentVersionsClientGetOptions contains the optional parameters for the RegistryComponentVersionsClient.Get +// method. +func (client *RegistryComponentVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientGetOptions) (RegistryComponentVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, componentName, version, options) + if err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryComponentVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, version string, options *RegistryComponentVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryComponentVersionsClient) getHandleResponse(resp *http.Response) (RegistryComponentVersionsClientGetResponse, error) { + result := RegistryComponentVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentVersion); err != nil { + return RegistryComponentVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - componentName - Container name. +// - options - RegistryComponentVersionsClientListOptions contains the optional parameters for the RegistryComponentVersionsClient.NewListPager +// method. +func (client *RegistryComponentVersionsClient) NewListPager(resourceGroupName string, registryName string, componentName string, options *RegistryComponentVersionsClientListOptions) *runtime.Pager[RegistryComponentVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryComponentVersionsClientListResponse]{ + More: func(page RegistryComponentVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryComponentVersionsClientListResponse) (RegistryComponentVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, componentName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryComponentVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryComponentVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, componentName string, options *RegistryComponentVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if componentName == "" { + return nil, errors.New("parameter componentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{componentName}", url.PathEscape(componentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryComponentVersionsClient) listHandleResponse(resp *http.Response) (RegistryComponentVersionsClientListResponse, error) { + result := RegistryComponentVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ComponentVersionResourceArmPaginatedResult); err != nil { + return RegistryComponentVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client.go new file mode 100644 index 000000000000..b7796a10aaa3 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydatacontainers_client.go @@ -0,0 +1,340 @@ +//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" +) + +// RegistryDataContainersClient contains the methods for the RegistryDataContainers group. +// Don't use this type directly, use NewRegistryDataContainersClient() instead. +type RegistryDataContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryDataContainersClient creates a new instance of RegistryDataContainersClient 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 NewRegistryDataContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryDataContainersClient, 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 := &RegistryDataContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - name - Container name. +// - body - Container entity to create or update. +// - options - RegistryDataContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryDataContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, body DataContainer, options *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, name, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryDataContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryDataContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryDataContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, body DataContainer, options *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, 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 *RegistryDataContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, body DataContainer, options *RegistryDataContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{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 registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + 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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - name - Container name. +// - options - RegistryDataContainersClientBeginDeleteOptions contains the optional parameters for the RegistryDataContainersClient.BeginDelete +// method. +func (client *RegistryDataContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryDataContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, name, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryDataContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryDataContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryDataContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, 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 *RegistryDataContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{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 registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + 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", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - name - Container name. +// - options - RegistryDataContainersClientGetOptions contains the optional parameters for the RegistryDataContainersClient.Get +// method. +func (client *RegistryDataContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientGetOptions) (RegistryDataContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, name, options) + if err != nil { + return RegistryDataContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryDataContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryDataContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryDataContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{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 registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + 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", "2023-02-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 *RegistryDataContainersClient) getHandleResponse(resp *http.Response) (RegistryDataContainersClientGetResponse, error) { + result := RegistryDataContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataContainer); err != nil { + return RegistryDataContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List containers. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - options - RegistryDataContainersClientListOptions contains the optional parameters for the RegistryDataContainersClient.NewListPager +// method. +func (client *RegistryDataContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryDataContainersClientListOptions) *runtime.Pager[RegistryDataContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryDataContainersClientListResponse]{ + More: func(page RegistryDataContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryDataContainersClientListResponse) (RegistryDataContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryDataContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryDataContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryDataContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryDataContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryDataContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryDataContainersClient) listHandleResponse(resp *http.Response) (RegistryDataContainersClientListResponse, error) { + result := RegistryDataContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataContainerResourceArmPaginatedResult); err != nil { + return RegistryDataContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client.go new file mode 100644 index 000000000000..ef95bc8963cc --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrydataversions_client.go @@ -0,0 +1,370 @@ +//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" +) + +// RegistryDataVersionsClient contains the methods for the RegistryDataVersions group. +// Don't use this type directly, use NewRegistryDataVersionsClient() instead. +type RegistryDataVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryDataVersionsClient creates a new instance of RegistryDataVersionsClient 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 NewRegistryDataVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryDataVersionsClient, 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 := &RegistryDataVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - name - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryDataVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryDataVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryDataVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body DataVersionBase, options *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryDataVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, name, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryDataVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryDataVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryDataVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body DataVersionBase, options *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, name, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryDataVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, body DataVersionBase, options *RegistryDataVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - name - Container name. +// - version - Version identifier. +// - options - RegistryDataVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryDataVersionsClient.BeginDelete +// method. +func (client *RegistryDataVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryDataVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, name, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryDataVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryDataVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryDataVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, name, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryDataVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - name - Container name. +// - version - Version identifier. +// - options - RegistryDataVersionsClientGetOptions contains the optional parameters for the RegistryDataVersionsClient.Get +// method. +func (client *RegistryDataVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientGetOptions) (RegistryDataVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, name, version, options) + if err != nil { + return RegistryDataVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryDataVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryDataVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryDataVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, version string, options *RegistryDataVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if name == "" { + return nil, errors.New("parameter name cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{name}", url.PathEscape(name)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-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 *RegistryDataVersionsClient) getHandleResponse(resp *http.Response) (RegistryDataVersionsClientGetResponse, error) { + result := RegistryDataVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataVersionBase); err != nil { + return RegistryDataVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List data versions in the data container +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - name - Data container's name +// - options - RegistryDataVersionsClientListOptions contains the optional parameters for the RegistryDataVersionsClient.NewListPager +// method. +func (client *RegistryDataVersionsClient) NewListPager(resourceGroupName string, registryName string, name string, options *RegistryDataVersionsClientListOptions) *runtime.Pager[RegistryDataVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryDataVersionsClientListResponse]{ + More: func(page RegistryDataVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryDataVersionsClientListResponse) (RegistryDataVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, name, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryDataVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryDataVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryDataVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryDataVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, name string, options *RegistryDataVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if 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", "2023-02-01-preview") + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.Tags != nil { + reqQP.Set("$tags", *options.Tags) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryDataVersionsClient) listHandleResponse(resp *http.Response) (RegistryDataVersionsClientListResponse, error) { + result := RegistryDataVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.DataVersionBaseResourceArmPaginatedResult); err != nil { + return RegistryDataVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go new file mode 100644 index 000000000000..ac0b4807f84a --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentcontainers_client.go @@ -0,0 +1,340 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryEnvironmentContainersClient contains the methods for the RegistryEnvironmentContainers group. +// Don't use this type directly, use NewRegistryEnvironmentContainersClient() instead. +type RegistryEnvironmentContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryEnvironmentContainersClient creates a new instance of RegistryEnvironmentContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryEnvironmentContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryEnvironmentContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryEnvironmentContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - environmentName - Container name. +// - body - Container entity to create or update. +// - options - RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryEnvironmentContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, environmentName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryEnvironmentContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, environmentName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryEnvironmentContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, body EnvironmentContainer, options *RegistryEnvironmentContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - environmentName - Container name. +// - options - RegistryEnvironmentContainersClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentContainersClient.BeginDelete +// method. +func (client *RegistryEnvironmentContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryEnvironmentContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryEnvironmentContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - environmentName - Container name. This is case-sensitive. +// - options - RegistryEnvironmentContainersClientGetOptions contains the optional parameters for the RegistryEnvironmentContainersClient.Get +// method. +func (client *RegistryEnvironmentContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientGetOptions) (RegistryEnvironmentContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + if err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryEnvironmentContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryEnvironmentContainersClient) getHandleResponse(resp *http.Response) (RegistryEnvironmentContainersClientGetResponse, error) { + result := RegistryEnvironmentContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentContainer); err != nil { + return RegistryEnvironmentContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List environment containers. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - options - RegistryEnvironmentContainersClientListOptions contains the optional parameters for the RegistryEnvironmentContainersClient.NewListPager +// method. +func (client *RegistryEnvironmentContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryEnvironmentContainersClientListOptions) *runtime.Pager[RegistryEnvironmentContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryEnvironmentContainersClientListResponse]{ + More: func(page RegistryEnvironmentContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryEnvironmentContainersClientListResponse) (RegistryEnvironmentContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryEnvironmentContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryEnvironmentContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryEnvironmentContainersClient) listHandleResponse(resp *http.Response) (RegistryEnvironmentContainersClientListResponse, error) { + result := RegistryEnvironmentContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentContainerResourceArmPaginatedResult); err != nil { + return RegistryEnvironmentContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go new file mode 100644 index 000000000000..e7e8416434fa --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registryenvironmentversions_client.go @@ -0,0 +1,367 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryEnvironmentVersionsClient contains the methods for the RegistryEnvironmentVersions group. +// Don't use this type directly, use NewRegistryEnvironmentVersionsClient() instead. +type RegistryEnvironmentVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryEnvironmentVersionsClient creates a new instance of RegistryEnvironmentVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryEnvironmentVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryEnvironmentVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryEnvironmentVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - environmentName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryEnvironmentVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, environmentName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryEnvironmentVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryEnvironmentVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, body EnvironmentVersion, options *RegistryEnvironmentVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - environmentName - Container name. +// - version - Version identifier. +// - options - RegistryEnvironmentVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.BeginDelete +// method. +func (client *RegistryEnvironmentVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryEnvironmentVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryEnvironmentVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryEnvironmentVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryEnvironmentVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryEnvironmentVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - environmentName - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - RegistryEnvironmentVersionsClientGetOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.Get +// method. +func (client *RegistryEnvironmentVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientGetOptions) (RegistryEnvironmentVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, environmentName, version, options) + if err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryEnvironmentVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, version string, options *RegistryEnvironmentVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryEnvironmentVersionsClient) getHandleResponse(resp *http.Response) (RegistryEnvironmentVersionsClientGetResponse, error) { + result := RegistryEnvironmentVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentVersion); err != nil { + return RegistryEnvironmentVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - environmentName - Container name. This is case-sensitive. +// - options - RegistryEnvironmentVersionsClientListOptions contains the optional parameters for the RegistryEnvironmentVersionsClient.NewListPager +// method. +func (client *RegistryEnvironmentVersionsClient) NewListPager(resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentVersionsClientListOptions) *runtime.Pager[RegistryEnvironmentVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryEnvironmentVersionsClientListResponse]{ + More: func(page RegistryEnvironmentVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryEnvironmentVersionsClientListResponse) (RegistryEnvironmentVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, environmentName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryEnvironmentVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryEnvironmentVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, environmentName string, options *RegistryEnvironmentVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if environmentName == "" { + return nil, errors.New("parameter environmentName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{environmentName}", url.PathEscape(environmentName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryEnvironmentVersionsClient) listHandleResponse(resp *http.Response) (RegistryEnvironmentVersionsClientListResponse, error) { + result := RegistryEnvironmentVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.EnvironmentVersionResourceArmPaginatedResult); err != nil { + return RegistryEnvironmentVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go new file mode 100644 index 000000000000..9c8747fc73a2 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelcontainers_client.go @@ -0,0 +1,340 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// RegistryModelContainersClient contains the methods for the RegistryModelContainers group. +// Don't use this type directly, use NewRegistryModelContainersClient() instead. +type RegistryModelContainersClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryModelContainersClient creates a new instance of RegistryModelContainersClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryModelContainersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryModelContainersClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryModelContainersClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update model container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - modelName - Container name. +// - body - Container entity to create or update. +// - options - RegistryModelContainersClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelContainersClient.BeginCreateOrUpdate +// method. +func (client *RegistryModelContainersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelContainersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, modelName, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelContainersClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelContainersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update model container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryModelContainersClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, modelName, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryModelContainersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, body ModelContainer, options *RegistryModelContainersClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - modelName - Container name. +// - options - RegistryModelContainersClientBeginDeleteOptions contains the optional parameters for the RegistryModelContainersClient.BeginDelete +// method. +func (client *RegistryModelContainersClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*runtime.Poller[RegistryModelContainersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelContainersClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelContainersClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryModelContainersClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryModelContainersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get container. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - modelName - Container name. This is case-sensitive. +// - options - RegistryModelContainersClientGetOptions contains the optional parameters for the RegistryModelContainersClient.Get +// method. +func (client *RegistryModelContainersClient) Get(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientGetOptions) (RegistryModelContainersClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + if err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelContainersClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryModelContainersClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelContainersClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryModelContainersClient) getHandleResponse(resp *http.Response) (RegistryModelContainersClientGetResponse, error) { + result := RegistryModelContainersClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelContainer); err != nil { + return RegistryModelContainersClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List model containers. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - options - RegistryModelContainersClientListOptions contains the optional parameters for the RegistryModelContainersClient.NewListPager +// method. +func (client *RegistryModelContainersClient) NewListPager(resourceGroupName string, registryName string, options *RegistryModelContainersClientListOptions) *runtime.Pager[RegistryModelContainersClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryModelContainersClientListResponse]{ + More: func(page RegistryModelContainersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryModelContainersClientListResponse) (RegistryModelContainersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryModelContainersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelContainersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelContainersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryModelContainersClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, options *RegistryModelContainersClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryModelContainersClient) listHandleResponse(resp *http.Response) (RegistryModelContainersClientListResponse, error) { + result := RegistryModelContainersClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelContainerResourceArmPaginatedResult); err != nil { + return RegistryModelContainersClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go new file mode 100644 index 000000000000..791ff0100f94 --- /dev/null +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/registrymodelversions_client.go @@ -0,0 +1,379 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// DO NOT EDIT. + +package armmachinelearning + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strconv" + "strings" +) + +// RegistryModelVersionsClient contains the methods for the RegistryModelVersions group. +// Don't use this type directly, use NewRegistryModelVersionsClient() instead. +type RegistryModelVersionsClient struct { + host string + subscriptionID string + pl runtime.Pipeline +} + +// NewRegistryModelVersionsClient creates a new instance of RegistryModelVersionsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewRegistryModelVersionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegistryModelVersionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} + } + ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err + } + client := &RegistryModelVersionsClient{ + subscriptionID: subscriptionID, + host: ep, + pl: pl, + } + return client, nil +} + +// BeginCreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - modelName - Container name. +// - version - Version identifier. +// - body - Version entity to create or update. +// - options - RegistryModelVersionsClientBeginCreateOrUpdateOptions contains the optional parameters for the RegistryModelVersionsClient.BeginCreateOrUpdate +// method. +func (client *RegistryModelVersionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[RegistryModelVersionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, registryName, modelName, version, body, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelVersionsClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelVersionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) + } +} + +// CreateOrUpdate - Create or update version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryModelVersionsClient) createOrUpdate(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*http.Response, error) { + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, registryName, modelName, version, body, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *RegistryModelVersionsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, body ModelVersion, options *RegistryModelVersionsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, runtime.MarshalAsJSON(req, body) +} + +// BeginDelete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - modelName - Container name. +// - version - Version identifier. +// - options - RegistryModelVersionsClientBeginDeleteOptions contains the optional parameters for the RegistryModelVersionsClient.BeginDelete +// method. +func (client *RegistryModelVersionsClient) BeginDelete(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*runtime.Poller[RegistryModelVersionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return nil, err + } + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[RegistryModelVersionsClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) + } else { + return runtime.NewPollerFromResumeToken[RegistryModelVersionsClientDeleteResponse](options.ResumeToken, client.pl, nil) + } +} + +// Delete - Delete version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +func (client *RegistryModelVersionsClient) deleteOperation(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*http.Response, error) { + req, err := client.deleteCreateRequest(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return nil, err + } + resp, err := client.pl.Do(req) + if err != nil { + return nil, err + } + if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) { + return nil, runtime.NewResponseError(resp) + } + return resp, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *RegistryModelVersionsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientBeginDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - modelName - Container name. This is case-sensitive. +// - version - Version identifier. This is case-sensitive. +// - options - RegistryModelVersionsClientGetOptions contains the optional parameters for the RegistryModelVersionsClient.Get +// method. +func (client *RegistryModelVersionsClient) Get(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientGetOptions) (RegistryModelVersionsClientGetResponse, error) { + req, err := client.getCreateRequest(ctx, resourceGroupName, registryName, modelName, version, options) + if err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelVersionsClientGetResponse{}, runtime.NewResponseError(resp) + } + return client.getHandleResponse(resp) +} + +// getCreateRequest creates the Get request. +func (client *RegistryModelVersionsClient) getCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, version string, options *RegistryModelVersionsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *RegistryModelVersionsClient) getHandleResponse(resp *http.Response) (RegistryModelVersionsClientGetResponse, error) { + result := RegistryModelVersionsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelVersion); err != nil { + return RegistryModelVersionsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List versions. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - registryName - Name of Azure Machine Learning registry. +// - modelName - Container name. This is case-sensitive. +// - options - RegistryModelVersionsClientListOptions contains the optional parameters for the RegistryModelVersionsClient.NewListPager +// method. +func (client *RegistryModelVersionsClient) NewListPager(resourceGroupName string, registryName string, modelName string, options *RegistryModelVersionsClientListOptions) *runtime.Pager[RegistryModelVersionsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[RegistryModelVersionsClientListResponse]{ + More: func(page RegistryModelVersionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *RegistryModelVersionsClientListResponse) (RegistryModelVersionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, registryName, modelName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RegistryModelVersionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *RegistryModelVersionsClient) listCreateRequest(ctx context.Context, resourceGroupName string, registryName string, modelName string, options *RegistryModelVersionsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if registryName == "" { + return nil, errors.New("parameter registryName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{registryName}", url.PathEscape(registryName)) + if modelName == "" { + return nil, errors.New("parameter modelName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{modelName}", url.PathEscape(modelName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.Skip != nil { + reqQP.Set("$skip", *options.Skip) + } + if options != nil && options.OrderBy != nil { + reqQP.Set("$orderBy", *options.OrderBy) + } + if options != nil && options.Top != nil { + reqQP.Set("$top", strconv.FormatInt(int64(*options.Top), 10)) + } + if options != nil && options.Version != nil { + reqQP.Set("version", *options.Version) + } + if options != nil && options.Description != nil { + reqQP.Set("description", *options.Description) + } + if options != nil && options.Tags != nil { + reqQP.Set("tags", *options.Tags) + } + if options != nil && options.Properties != nil { + reqQP.Set("properties", *options.Properties) + } + if options != nil && options.ListViewType != nil { + reqQP.Set("listViewType", string(*options.ListViewType)) + } + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *RegistryModelVersionsClient) listHandleResponse(resp *http.Response) (RegistryModelVersionsClientListResponse, error) { + result := RegistryModelVersionsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ModelVersionResourceArmPaginatedResult); err != nil { + return RegistryModelVersionsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go b/sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go index 82f1b0c8eadf..3b966ee1acdb 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/response_types.go @@ -9,12 +9,12 @@ package armmachinelearning -// BatchDeploymentsClientCreateOrUpdateResponse contains the response from method BatchDeploymentsClient.CreateOrUpdate. +// BatchDeploymentsClientCreateOrUpdateResponse contains the response from method BatchDeploymentsClient.BeginCreateOrUpdate. type BatchDeploymentsClientCreateOrUpdateResponse struct { BatchDeployment } -// BatchDeploymentsClientDeleteResponse contains the response from method BatchDeploymentsClient.Delete. +// BatchDeploymentsClientDeleteResponse contains the response from method BatchDeploymentsClient.BeginDelete. type BatchDeploymentsClientDeleteResponse struct { // placeholder for future response values } @@ -24,22 +24,22 @@ type BatchDeploymentsClientGetResponse struct { BatchDeployment } -// BatchDeploymentsClientListResponse contains the response from method BatchDeploymentsClient.List. +// BatchDeploymentsClientListResponse contains the response from method BatchDeploymentsClient.NewListPager. type BatchDeploymentsClientListResponse struct { BatchDeploymentTrackedResourceArmPaginatedResult } -// BatchDeploymentsClientUpdateResponse contains the response from method BatchDeploymentsClient.Update. +// BatchDeploymentsClientUpdateResponse contains the response from method BatchDeploymentsClient.BeginUpdate. type BatchDeploymentsClientUpdateResponse struct { BatchDeployment } -// BatchEndpointsClientCreateOrUpdateResponse contains the response from method BatchEndpointsClient.CreateOrUpdate. +// BatchEndpointsClientCreateOrUpdateResponse contains the response from method BatchEndpointsClient.BeginCreateOrUpdate. type BatchEndpointsClientCreateOrUpdateResponse struct { BatchEndpoint } -// BatchEndpointsClientDeleteResponse contains the response from method BatchEndpointsClient.Delete. +// BatchEndpointsClientDeleteResponse contains the response from method BatchEndpointsClient.BeginDelete. type BatchEndpointsClientDeleteResponse struct { // placeholder for future response values } @@ -54,12 +54,12 @@ type BatchEndpointsClientListKeysResponse struct { EndpointAuthKeys } -// BatchEndpointsClientListResponse contains the response from method BatchEndpointsClient.List. +// BatchEndpointsClientListResponse contains the response from method BatchEndpointsClient.NewListPager. type BatchEndpointsClientListResponse struct { BatchEndpointTrackedResourceArmPaginatedResult } -// BatchEndpointsClientUpdateResponse contains the response from method BatchEndpointsClient.Update. +// BatchEndpointsClientUpdateResponse contains the response from method BatchEndpointsClient.BeginUpdate. type BatchEndpointsClientUpdateResponse struct { BatchEndpoint } @@ -79,7 +79,7 @@ type CodeContainersClientGetResponse struct { CodeContainer } -// CodeContainersClientListResponse contains the response from method CodeContainersClient.List. +// CodeContainersClientListResponse contains the response from method CodeContainersClient.NewListPager. type CodeContainersClientListResponse struct { CodeContainerResourceArmPaginatedResult } @@ -99,7 +99,7 @@ type CodeVersionsClientGetResponse struct { CodeVersion } -// CodeVersionsClientListResponse contains the response from method CodeVersionsClient.List. +// CodeVersionsClientListResponse contains the response from method CodeVersionsClient.NewListPager. type CodeVersionsClientListResponse struct { CodeVersionResourceArmPaginatedResult } @@ -119,7 +119,7 @@ type ComponentContainersClientGetResponse struct { ComponentContainer } -// ComponentContainersClientListResponse contains the response from method ComponentContainersClient.List. +// ComponentContainersClientListResponse contains the response from method ComponentContainersClient.NewListPager. type ComponentContainersClientListResponse struct { ComponentContainerResourceArmPaginatedResult } @@ -139,17 +139,17 @@ type ComponentVersionsClientGetResponse struct { ComponentVersion } -// ComponentVersionsClientListResponse contains the response from method ComponentVersionsClient.List. +// ComponentVersionsClientListResponse contains the response from method ComponentVersionsClient.NewListPager. type ComponentVersionsClientListResponse struct { ComponentVersionResourceArmPaginatedResult } -// ComputeClientCreateOrUpdateResponse contains the response from method ComputeClient.CreateOrUpdate. +// ComputeClientCreateOrUpdateResponse contains the response from method ComputeClient.BeginCreateOrUpdate. type ComputeClientCreateOrUpdateResponse struct { ComputeResource } -// ComputeClientDeleteResponse contains the response from method ComputeClient.Delete. +// ComputeClientDeleteResponse contains the response from method ComputeClient.BeginDelete. type ComputeClientDeleteResponse struct { // placeholder for future response values } @@ -174,32 +174,42 @@ func (c *ComputeClientListKeysResponse) UnmarshalJSON(data []byte) error { return nil } -// ComputeClientListNodesResponse contains the response from method ComputeClient.ListNodes. +// ComputeClientListNodesResponse contains the response from method ComputeClient.NewListNodesPager. type ComputeClientListNodesResponse struct { AmlComputeNodesInformation } -// ComputeClientListResponse contains the response from method ComputeClient.List. +// ComputeClientListResponse contains the response from method ComputeClient.NewListPager. type ComputeClientListResponse struct { PaginatedComputeResourcesList } -// ComputeClientRestartResponse contains the response from method ComputeClient.Restart. +// ComputeClientRestartResponse contains the response from method ComputeClient.BeginRestart. type ComputeClientRestartResponse struct { // placeholder for future response values } -// ComputeClientStartResponse contains the response from method ComputeClient.Start. +// ComputeClientStartResponse contains the response from method ComputeClient.BeginStart. type ComputeClientStartResponse struct { // placeholder for future response values } -// ComputeClientStopResponse contains the response from method ComputeClient.Stop. +// ComputeClientStopResponse contains the response from method ComputeClient.BeginStop. type ComputeClientStopResponse struct { // placeholder for future response values } -// ComputeClientUpdateResponse contains the response from method ComputeClient.Update. +// 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.BeginUpdate. type ComputeClientUpdateResponse struct { ComputeResource } @@ -219,7 +229,7 @@ type DataContainersClientGetResponse struct { DataContainer } -// DataContainersClientListResponse contains the response from method DataContainersClient.List. +// DataContainersClientListResponse contains the response from method DataContainersClient.NewListPager. type DataContainersClientListResponse struct { DataContainerResourceArmPaginatedResult } @@ -239,7 +249,7 @@ type DataVersionsClientGetResponse struct { DataVersionBase } -// DataVersionsClientListResponse contains the response from method DataVersionsClient.List. +// DataVersionsClientListResponse contains the response from method DataVersionsClient.NewListPager. type DataVersionsClientListResponse struct { DataVersionBaseResourceArmPaginatedResult } @@ -259,7 +269,7 @@ type DatastoresClientGetResponse struct { Datastore } -// DatastoresClientListResponse contains the response from method DatastoresClient.List. +// DatastoresClientListResponse contains the response from method DatastoresClient.NewListPager. type DatastoresClientListResponse struct { DatastoreResourceArmPaginatedResult } @@ -294,7 +304,7 @@ type EnvironmentContainersClientGetResponse struct { EnvironmentContainer } -// EnvironmentContainersClientListResponse contains the response from method EnvironmentContainersClient.List. +// EnvironmentContainersClientListResponse contains the response from method EnvironmentContainersClient.NewListPager. type EnvironmentContainersClientListResponse struct { EnvironmentContainerResourceArmPaginatedResult } @@ -314,12 +324,112 @@ type EnvironmentVersionsClientGetResponse struct { EnvironmentVersion } -// EnvironmentVersionsClientListResponse contains the response from method EnvironmentVersionsClient.List. +// EnvironmentVersionsClientListResponse contains the response from method EnvironmentVersionsClient.NewListPager. type EnvironmentVersionsClientListResponse struct { EnvironmentVersionResourceArmPaginatedResult } -// JobsClientCancelResponse contains the response from method JobsClient.Cancel. +// FeaturesetContainersClientCreateOrUpdateResponse contains the response from method FeaturesetContainersClient.BeginCreateOrUpdate. +type FeaturesetContainersClientCreateOrUpdateResponse struct { + FeaturesetContainer +} + +// FeaturesetContainersClientDeleteResponse contains the response from method FeaturesetContainersClient.BeginDelete. +type FeaturesetContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturesetContainersClientGetEntityResponse contains the response from method FeaturesetContainersClient.GetEntity. +type FeaturesetContainersClientGetEntityResponse struct { + FeaturesetContainer +} + +// FeaturesetContainersClientListResponse contains the response from method FeaturesetContainersClient.NewListPager. +type FeaturesetContainersClientListResponse struct { + FeaturesetContainerResourceArmPaginatedResult +} + +// FeaturesetVersionsClientBackfillResponse contains the response from method FeaturesetVersionsClient.BeginBackfill. +type FeaturesetVersionsClientBackfillResponse struct { + FeaturesetVersionBackfillResponse +} + +// FeaturesetVersionsClientCreateOrUpdateResponse contains the response from method FeaturesetVersionsClient.BeginCreateOrUpdate. +type FeaturesetVersionsClientCreateOrUpdateResponse struct { + FeaturesetVersion +} + +// FeaturesetVersionsClientDeleteResponse contains the response from method FeaturesetVersionsClient.BeginDelete. +type FeaturesetVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturesetVersionsClientGetFeatureResponse contains the response from method FeaturesetVersionsClient.GetFeature. +type FeaturesetVersionsClientGetFeatureResponse struct { + Feature +} + +// FeaturesetVersionsClientGetResponse contains the response from method FeaturesetVersionsClient.Get. +type FeaturesetVersionsClientGetResponse struct { + FeaturesetVersion +} + +// FeaturesetVersionsClientListFeaturesResponse contains the response from method FeaturesetVersionsClient.NewListFeaturesPager. +type FeaturesetVersionsClientListFeaturesResponse struct { + FeatureArmPaginatedResult +} + +// FeaturesetVersionsClientListMaterializationJobsResponse contains the response from method FeaturesetVersionsClient.NewListMaterializationJobsPager. +type FeaturesetVersionsClientListMaterializationJobsResponse struct { + FeaturesetJobArmPaginatedResult +} + +// FeaturesetVersionsClientListResponse contains the response from method FeaturesetVersionsClient.NewListPager. +type FeaturesetVersionsClientListResponse struct { + FeaturesetVersionResourceArmPaginatedResult +} + +// FeaturestoreEntityContainersClientCreateOrUpdateResponse contains the response from method FeaturestoreEntityContainersClient.BeginCreateOrUpdate. +type FeaturestoreEntityContainersClientCreateOrUpdateResponse struct { + FeaturestoreEntityContainer +} + +// FeaturestoreEntityContainersClientDeleteResponse contains the response from method FeaturestoreEntityContainersClient.BeginDelete. +type FeaturestoreEntityContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturestoreEntityContainersClientGetEntityResponse contains the response from method FeaturestoreEntityContainersClient.GetEntity. +type FeaturestoreEntityContainersClientGetEntityResponse struct { + FeaturestoreEntityContainer +} + +// FeaturestoreEntityContainersClientListResponse contains the response from method FeaturestoreEntityContainersClient.NewListPager. +type FeaturestoreEntityContainersClientListResponse struct { + FeaturestoreEntityContainerResourceArmPaginatedResult +} + +// FeaturestoreEntityVersionsClientCreateOrUpdateResponse contains the response from method FeaturestoreEntityVersionsClient.BeginCreateOrUpdate. +type FeaturestoreEntityVersionsClientCreateOrUpdateResponse struct { + FeaturestoreEntityVersion +} + +// FeaturestoreEntityVersionsClientDeleteResponse contains the response from method FeaturestoreEntityVersionsClient.BeginDelete. +type FeaturestoreEntityVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// FeaturestoreEntityVersionsClientGetResponse contains the response from method FeaturestoreEntityVersionsClient.Get. +type FeaturestoreEntityVersionsClientGetResponse struct { + FeaturestoreEntityVersion +} + +// FeaturestoreEntityVersionsClientListResponse contains the response from method FeaturestoreEntityVersionsClient.NewListPager. +type FeaturestoreEntityVersionsClientListResponse struct { + FeaturestoreEntityVersionResourceArmPaginatedResult +} + +// JobsClientCancelResponse contains the response from method JobsClient.BeginCancel. type JobsClientCancelResponse struct { // placeholder for future response values } @@ -329,7 +439,7 @@ type JobsClientCreateOrUpdateResponse struct { JobBase } -// JobsClientDeleteResponse contains the response from method JobsClient.Delete. +// JobsClientDeleteResponse contains the response from method JobsClient.BeginDelete. type JobsClientDeleteResponse struct { // placeholder for future response values } @@ -339,11 +449,56 @@ type JobsClientGetResponse struct { JobBase } -// JobsClientListResponse contains the response from method JobsClient.List. +// JobsClientListResponse contains the response from method JobsClient.NewListPager. type JobsClientListResponse struct { JobBaseResourceArmPaginatedResult } +// LabelingJobsClientCreateOrUpdateResponse contains the response from method LabelingJobsClient.BeginCreateOrUpdate. +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.BeginExportLabels. +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.NewListPager. +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.BeginResume. +type LabelingJobsClientResumeResponse struct { + // placeholder for future response values +} + // ModelContainersClientCreateOrUpdateResponse contains the response from method ModelContainersClient.CreateOrUpdate. type ModelContainersClientCreateOrUpdateResponse struct { ModelContainer @@ -359,7 +514,7 @@ type ModelContainersClientGetResponse struct { ModelContainer } -// ModelContainersClientListResponse contains the response from method ModelContainersClient.List. +// ModelContainersClientListResponse contains the response from method ModelContainersClient.NewListPager. type ModelContainersClientListResponse struct { ModelContainerResourceArmPaginatedResult } @@ -379,17 +534,22 @@ type ModelVersionsClientGetResponse struct { ModelVersion } -// ModelVersionsClientListResponse contains the response from method ModelVersionsClient.List. +// ModelVersionsClientListResponse contains the response from method ModelVersionsClient.NewListPager. type ModelVersionsClientListResponse struct { ModelVersionResourceArmPaginatedResult } -// OnlineDeploymentsClientCreateOrUpdateResponse contains the response from method OnlineDeploymentsClient.CreateOrUpdate. +// ModelVersionsClientPackageResponse contains the response from method ModelVersionsClient.BeginPackage. +type ModelVersionsClientPackageResponse struct { + PackageResponse +} + +// OnlineDeploymentsClientCreateOrUpdateResponse contains the response from method OnlineDeploymentsClient.BeginCreateOrUpdate. type OnlineDeploymentsClientCreateOrUpdateResponse struct { OnlineDeployment } -// OnlineDeploymentsClientDeleteResponse contains the response from method OnlineDeploymentsClient.Delete. +// OnlineDeploymentsClientDeleteResponse contains the response from method OnlineDeploymentsClient.BeginDelete. type OnlineDeploymentsClientDeleteResponse struct { // placeholder for future response values } @@ -404,27 +564,27 @@ type OnlineDeploymentsClientGetResponse struct { OnlineDeployment } -// OnlineDeploymentsClientListResponse contains the response from method OnlineDeploymentsClient.List. +// OnlineDeploymentsClientListResponse contains the response from method OnlineDeploymentsClient.NewListPager. type OnlineDeploymentsClientListResponse struct { OnlineDeploymentTrackedResourceArmPaginatedResult } -// OnlineDeploymentsClientListSKUsResponse contains the response from method OnlineDeploymentsClient.ListSKUs. +// OnlineDeploymentsClientListSKUsResponse contains the response from method OnlineDeploymentsClient.NewListSKUsPager. type OnlineDeploymentsClientListSKUsResponse struct { SKUResourceArmPaginatedResult } -// OnlineDeploymentsClientUpdateResponse contains the response from method OnlineDeploymentsClient.Update. +// OnlineDeploymentsClientUpdateResponse contains the response from method OnlineDeploymentsClient.BeginUpdate. type OnlineDeploymentsClientUpdateResponse struct { OnlineDeployment } -// OnlineEndpointsClientCreateOrUpdateResponse contains the response from method OnlineEndpointsClient.CreateOrUpdate. +// OnlineEndpointsClientCreateOrUpdateResponse contains the response from method OnlineEndpointsClient.BeginCreateOrUpdate. type OnlineEndpointsClientCreateOrUpdateResponse struct { OnlineEndpoint } -// OnlineEndpointsClientDeleteResponse contains the response from method OnlineEndpointsClient.Delete. +// OnlineEndpointsClientDeleteResponse contains the response from method OnlineEndpointsClient.BeginDelete. type OnlineEndpointsClientDeleteResponse struct { // placeholder for future response values } @@ -444,22 +604,22 @@ type OnlineEndpointsClientListKeysResponse struct { EndpointAuthKeys } -// OnlineEndpointsClientListResponse contains the response from method OnlineEndpointsClient.List. +// OnlineEndpointsClientListResponse contains the response from method OnlineEndpointsClient.NewListPager. type OnlineEndpointsClientListResponse struct { OnlineEndpointTrackedResourceArmPaginatedResult } -// OnlineEndpointsClientRegenerateKeysResponse contains the response from method OnlineEndpointsClient.RegenerateKeys. +// OnlineEndpointsClientRegenerateKeysResponse contains the response from method OnlineEndpointsClient.BeginRegenerateKeys. type OnlineEndpointsClientRegenerateKeysResponse struct { // placeholder for future response values } -// OnlineEndpointsClientUpdateResponse contains the response from method OnlineEndpointsClient.Update. +// OnlineEndpointsClientUpdateResponse contains the response from method OnlineEndpointsClient.BeginUpdate. type OnlineEndpointsClientUpdateResponse struct { OnlineEndpoint } -// OperationsClientListResponse contains the response from method OperationsClient.List. +// OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { AmlOperationListResult } @@ -479,7 +639,7 @@ type PrivateEndpointConnectionsClientGetResponse struct { PrivateEndpointConnection } -// PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.List. +// PrivateEndpointConnectionsClientListResponse contains the response from method PrivateEndpointConnectionsClient.NewListPager. type PrivateEndpointConnectionsClientListResponse struct { PrivateEndpointConnectionListResult } @@ -489,7 +649,7 @@ type PrivateLinkResourcesClientListResponse struct { PrivateLinkResourceListResult } -// QuotasClientListResponse contains the response from method QuotasClient.List. +// QuotasClientListResponse contains the response from method QuotasClient.NewListPager. type QuotasClientListResponse struct { ListWorkspaceQuotas } @@ -499,12 +659,242 @@ type QuotasClientUpdateResponse struct { UpdateWorkspaceQuotasResult } -// SchedulesClientCreateOrUpdateResponse contains the response from method SchedulesClient.CreateOrUpdate. +// RegistriesClientCreateOrUpdateResponse contains the response from method RegistriesClient.BeginCreateOrUpdate. +type RegistriesClientCreateOrUpdateResponse struct { + Registry +} + +// RegistriesClientDeleteResponse contains the response from method RegistriesClient.BeginDelete. +type RegistriesClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistriesClientGetResponse contains the response from method RegistriesClient.Get. +type RegistriesClientGetResponse struct { + Registry +} + +// RegistriesClientListBySubscriptionResponse contains the response from method RegistriesClient.NewListBySubscriptionPager. +type RegistriesClientListBySubscriptionResponse struct { + RegistryTrackedResourceArmPaginatedResult +} + +// RegistriesClientListResponse contains the response from method RegistriesClient.NewListPager. +type RegistriesClientListResponse struct { + RegistryTrackedResourceArmPaginatedResult +} + +// RegistriesClientUpdateResponse contains the response from method RegistriesClient.BeginUpdate. +type RegistriesClientUpdateResponse struct { + Registry +} + +// RegistryCodeContainersClientCreateOrUpdateResponse contains the response from method RegistryCodeContainersClient.BeginCreateOrUpdate. +type RegistryCodeContainersClientCreateOrUpdateResponse struct { + CodeContainer +} + +// RegistryCodeContainersClientDeleteResponse contains the response from method RegistryCodeContainersClient.BeginDelete. +type RegistryCodeContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryCodeContainersClientGetResponse contains the response from method RegistryCodeContainersClient.Get. +type RegistryCodeContainersClientGetResponse struct { + CodeContainer +} + +// RegistryCodeContainersClientListResponse contains the response from method RegistryCodeContainersClient.NewListPager. +type RegistryCodeContainersClientListResponse struct { + CodeContainerResourceArmPaginatedResult +} + +// RegistryCodeVersionsClientCreateOrUpdateResponse contains the response from method RegistryCodeVersionsClient.BeginCreateOrUpdate. +type RegistryCodeVersionsClientCreateOrUpdateResponse struct { + CodeVersion +} + +// RegistryCodeVersionsClientDeleteResponse contains the response from method RegistryCodeVersionsClient.BeginDelete. +type RegistryCodeVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryCodeVersionsClientGetResponse contains the response from method RegistryCodeVersionsClient.Get. +type RegistryCodeVersionsClientGetResponse struct { + CodeVersion +} + +// RegistryCodeVersionsClientListResponse contains the response from method RegistryCodeVersionsClient.NewListPager. +type RegistryCodeVersionsClientListResponse struct { + CodeVersionResourceArmPaginatedResult +} + +// RegistryComponentContainersClientCreateOrUpdateResponse contains the response from method RegistryComponentContainersClient.BeginCreateOrUpdate. +type RegistryComponentContainersClientCreateOrUpdateResponse struct { + ComponentContainer +} + +// RegistryComponentContainersClientDeleteResponse contains the response from method RegistryComponentContainersClient.BeginDelete. +type RegistryComponentContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryComponentContainersClientGetResponse contains the response from method RegistryComponentContainersClient.Get. +type RegistryComponentContainersClientGetResponse struct { + ComponentContainer +} + +// RegistryComponentContainersClientListResponse contains the response from method RegistryComponentContainersClient.NewListPager. +type RegistryComponentContainersClientListResponse struct { + ComponentContainerResourceArmPaginatedResult +} + +// RegistryComponentVersionsClientCreateOrUpdateResponse contains the response from method RegistryComponentVersionsClient.BeginCreateOrUpdate. +type RegistryComponentVersionsClientCreateOrUpdateResponse struct { + ComponentVersion +} + +// RegistryComponentVersionsClientDeleteResponse contains the response from method RegistryComponentVersionsClient.BeginDelete. +type RegistryComponentVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryComponentVersionsClientGetResponse contains the response from method RegistryComponentVersionsClient.Get. +type RegistryComponentVersionsClientGetResponse struct { + ComponentVersion +} + +// RegistryComponentVersionsClientListResponse contains the response from method RegistryComponentVersionsClient.NewListPager. +type RegistryComponentVersionsClientListResponse struct { + ComponentVersionResourceArmPaginatedResult +} + +// RegistryDataContainersClientCreateOrUpdateResponse contains the response from method RegistryDataContainersClient.BeginCreateOrUpdate. +type RegistryDataContainersClientCreateOrUpdateResponse struct { + DataContainer +} + +// RegistryDataContainersClientDeleteResponse contains the response from method RegistryDataContainersClient.BeginDelete. +type RegistryDataContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryDataContainersClientGetResponse contains the response from method RegistryDataContainersClient.Get. +type RegistryDataContainersClientGetResponse struct { + DataContainer +} + +// RegistryDataContainersClientListResponse contains the response from method RegistryDataContainersClient.NewListPager. +type RegistryDataContainersClientListResponse struct { + DataContainerResourceArmPaginatedResult +} + +// RegistryDataVersionsClientCreateOrUpdateResponse contains the response from method RegistryDataVersionsClient.BeginCreateOrUpdate. +type RegistryDataVersionsClientCreateOrUpdateResponse struct { + DataVersionBase +} + +// RegistryDataVersionsClientDeleteResponse contains the response from method RegistryDataVersionsClient.BeginDelete. +type RegistryDataVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryDataVersionsClientGetResponse contains the response from method RegistryDataVersionsClient.Get. +type RegistryDataVersionsClientGetResponse struct { + DataVersionBase +} + +// RegistryDataVersionsClientListResponse contains the response from method RegistryDataVersionsClient.NewListPager. +type RegistryDataVersionsClientListResponse struct { + DataVersionBaseResourceArmPaginatedResult +} + +// RegistryEnvironmentContainersClientCreateOrUpdateResponse contains the response from method RegistryEnvironmentContainersClient.BeginCreateOrUpdate. +type RegistryEnvironmentContainersClientCreateOrUpdateResponse struct { + EnvironmentContainer +} + +// RegistryEnvironmentContainersClientDeleteResponse contains the response from method RegistryEnvironmentContainersClient.BeginDelete. +type RegistryEnvironmentContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryEnvironmentContainersClientGetResponse contains the response from method RegistryEnvironmentContainersClient.Get. +type RegistryEnvironmentContainersClientGetResponse struct { + EnvironmentContainer +} + +// RegistryEnvironmentContainersClientListResponse contains the response from method RegistryEnvironmentContainersClient.NewListPager. +type RegistryEnvironmentContainersClientListResponse struct { + EnvironmentContainerResourceArmPaginatedResult +} + +// RegistryEnvironmentVersionsClientCreateOrUpdateResponse contains the response from method RegistryEnvironmentVersionsClient.BeginCreateOrUpdate. +type RegistryEnvironmentVersionsClientCreateOrUpdateResponse struct { + EnvironmentVersion +} + +// RegistryEnvironmentVersionsClientDeleteResponse contains the response from method RegistryEnvironmentVersionsClient.BeginDelete. +type RegistryEnvironmentVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryEnvironmentVersionsClientGetResponse contains the response from method RegistryEnvironmentVersionsClient.Get. +type RegistryEnvironmentVersionsClientGetResponse struct { + EnvironmentVersion +} + +// RegistryEnvironmentVersionsClientListResponse contains the response from method RegistryEnvironmentVersionsClient.NewListPager. +type RegistryEnvironmentVersionsClientListResponse struct { + EnvironmentVersionResourceArmPaginatedResult +} + +// RegistryModelContainersClientCreateOrUpdateResponse contains the response from method RegistryModelContainersClient.BeginCreateOrUpdate. +type RegistryModelContainersClientCreateOrUpdateResponse struct { + ModelContainer +} + +// RegistryModelContainersClientDeleteResponse contains the response from method RegistryModelContainersClient.BeginDelete. +type RegistryModelContainersClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryModelContainersClientGetResponse contains the response from method RegistryModelContainersClient.Get. +type RegistryModelContainersClientGetResponse struct { + ModelContainer +} + +// RegistryModelContainersClientListResponse contains the response from method RegistryModelContainersClient.NewListPager. +type RegistryModelContainersClientListResponse struct { + ModelContainerResourceArmPaginatedResult +} + +// RegistryModelVersionsClientCreateOrUpdateResponse contains the response from method RegistryModelVersionsClient.BeginCreateOrUpdate. +type RegistryModelVersionsClientCreateOrUpdateResponse struct { + ModelVersion +} + +// RegistryModelVersionsClientDeleteResponse contains the response from method RegistryModelVersionsClient.BeginDelete. +type RegistryModelVersionsClientDeleteResponse struct { + // placeholder for future response values +} + +// RegistryModelVersionsClientGetResponse contains the response from method RegistryModelVersionsClient.Get. +type RegistryModelVersionsClientGetResponse struct { + ModelVersion +} + +// RegistryModelVersionsClientListResponse contains the response from method RegistryModelVersionsClient.NewListPager. +type RegistryModelVersionsClientListResponse struct { + ModelVersionResourceArmPaginatedResult +} + +// SchedulesClientCreateOrUpdateResponse contains the response from method SchedulesClient.BeginCreateOrUpdate. type SchedulesClientCreateOrUpdateResponse struct { Schedule } -// SchedulesClientDeleteResponse contains the response from method SchedulesClient.Delete. +// SchedulesClientDeleteResponse contains the response from method SchedulesClient.BeginDelete. type SchedulesClientDeleteResponse struct { // placeholder for future response values } @@ -514,12 +904,12 @@ type SchedulesClientGetResponse struct { Schedule } -// SchedulesClientListResponse contains the response from method SchedulesClient.List. +// SchedulesClientListResponse contains the response from method SchedulesClient.NewListPager. type SchedulesClientListResponse struct { ScheduleResourceArmPaginatedResult } -// UsagesClientListResponse contains the response from method UsagesClient.List. +// UsagesClientListResponse contains the response from method UsagesClient.NewListPager. type UsagesClientListResponse struct { ListUsagesResult } @@ -544,27 +934,27 @@ type WorkspaceConnectionsClientGetResponse struct { WorkspaceConnectionPropertiesV2BasicResource } -// WorkspaceConnectionsClientListResponse contains the response from method WorkspaceConnectionsClient.List. +// WorkspaceConnectionsClientListResponse contains the response from method WorkspaceConnectionsClient.NewListPager. type WorkspaceConnectionsClientListResponse struct { WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult } -// WorkspaceFeaturesClientListResponse contains the response from method WorkspaceFeaturesClient.List. +// WorkspaceFeaturesClientListResponse contains the response from method WorkspaceFeaturesClient.NewListPager. type WorkspaceFeaturesClientListResponse struct { ListAmlUserFeatureResult } -// WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.CreateOrUpdate. +// WorkspacesClientCreateOrUpdateResponse contains the response from method WorkspacesClient.BeginCreateOrUpdate. type WorkspacesClientCreateOrUpdateResponse struct { Workspace } -// WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.Delete. +// WorkspacesClientDeleteResponse contains the response from method WorkspacesClient.BeginDelete. type WorkspacesClientDeleteResponse struct { // placeholder for future response values } -// WorkspacesClientDiagnoseResponse contains the response from method WorkspacesClient.Diagnose. +// WorkspacesClientDiagnoseResponse contains the response from method WorkspacesClient.BeginDiagnose. type WorkspacesClientDiagnoseResponse struct { DiagnoseResponseResult } @@ -574,12 +964,12 @@ type WorkspacesClientGetResponse struct { Workspace } -// WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.ListByResourceGroup. +// WorkspacesClientListByResourceGroupResponse contains the response from method WorkspacesClient.NewListByResourceGroupPager. type WorkspacesClientListByResourceGroupResponse struct { WorkspaceListResult } -// WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.ListBySubscription. +// WorkspacesClientListBySubscriptionResponse contains the response from method WorkspacesClient.NewListBySubscriptionPager. type WorkspacesClientListBySubscriptionResponse struct { WorkspaceListResult } @@ -609,17 +999,17 @@ type WorkspacesClientListStorageAccountKeysResponse struct { ListStorageAccountKeysResult } -// WorkspacesClientPrepareNotebookResponse contains the response from method WorkspacesClient.PrepareNotebook. +// WorkspacesClientPrepareNotebookResponse contains the response from method WorkspacesClient.BeginPrepareNotebook. type WorkspacesClientPrepareNotebookResponse struct { NotebookResourceInfo } -// WorkspacesClientResyncKeysResponse contains the response from method WorkspacesClient.ResyncKeys. +// WorkspacesClientResyncKeysResponse contains the response from method WorkspacesClient.BeginResyncKeys. type WorkspacesClientResyncKeysResponse struct { // placeholder for future response values } -// WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.Update. +// WorkspacesClientUpdateResponse contains the response from method WorkspacesClient.BeginUpdate. type WorkspacesClientUpdateResponse struct { Workspace } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go index 2be6e204abdd..15b3dc271674 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client.go @@ -32,9 +32,9 @@ type SchedulesClient struct { } // 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. +// - 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{} @@ -57,20 +57,23 @@ func NewSchedulesClient(subscriptionID string, credential azcore.TokenCredential // BeginCreateOrUpdate - Create or update schedule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SchedulesClientCreateOrUpdateResponse]{ + FinalStateVia: runtime.FinalStateViaOriginalURI, + }) } else { return runtime.NewPollerFromResumeToken[SchedulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } @@ -78,7 +81,8 @@ func (client *SchedulesClient) BeginCreateOrUpdate(ctx context.Context, resource // CreateOrUpdate - Create or update schedule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 +// +// Generated from API version 2023-02-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 { @@ -118,7 +122,7 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, body) @@ -126,18 +130,21 @@ func (client *SchedulesClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Delete schedule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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) + return runtime.NewPoller(resp, client.pl, &runtime.NewPollerOptions[SchedulesClientDeleteResponse]{ + FinalStateVia: runtime.FinalStateViaLocation, + }) } else { return runtime.NewPollerFromResumeToken[SchedulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } @@ -145,7 +152,8 @@ func (client *SchedulesClient) BeginDelete(ctx context.Context, resourceGroupNam // Delete - Delete schedule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 +// +// Generated from API version 2023-02-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 { @@ -185,7 +193,7 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,11 +201,12 @@ func (client *SchedulesClient) deleteCreateRequest(ctx context.Context, resource // Get - Get schedule. // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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 { @@ -237,7 +246,7 @@ func (client *SchedulesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -253,10 +262,11 @@ func (client *SchedulesClient) getHandleResponse(resp *http.Response) (Schedules } // NewListPager - List schedules in specified workspace. -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager 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 { @@ -305,7 +315,7 @@ func (client *SchedulesClient) listCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client_example_test.go deleted file mode 100644 index cebc779c7d5c..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/schedules_client_example_test.go +++ /dev/null @@ -1,132 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/list.json -func ExampleSchedulesClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("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.SchedulesClientListOptions{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-10-01/examples/Schedule/delete.json -func ExampleSchedulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("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-10-01/examples/Schedule/get.json -func ExampleSchedulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("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-10-01/examples/Schedule/createOrUpdate.json -func ExampleSchedulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client, err := armmachinelearning.NewSchedulesClient("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", "string", armmachinelearning.Schedule{ - Properties: &armmachinelearning.ScheduleProperties{ - Description: to.Ptr("string"), - Properties: map[string]*string{ - "string": to.Ptr("string"), - }, - Tags: map[string]*string{ - "string": to.Ptr("string"), - }, - Action: &armmachinelearning.EndpointScheduleAction{ - ActionType: to.Ptr(armmachinelearning.ScheduleActionTypeInvokeBatchEndpoint), - EndpointInvocationDefinition: map[string]interface{}{ - "9965593e-526f-4b89-bb36-761138cf2794": nil, - }, - }, - DisplayName: to.Ptr("string"), - IsEnabled: to.Ptr(false), - Trigger: &armmachinelearning.CronTrigger{ - EndTime: to.Ptr("string"), - StartTime: to.Ptr("string"), - TimeZone: to.Ptr("string"), - TriggerType: to.Ptr(armmachinelearning.TriggerTypeCron), - Expression: to.Ptr("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 -} diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/time_rfc3339.go b/sdk/resourcemanager/machinelearning/armmachinelearning/time_rfc3339.go index 7ce1982bab3f..f420dc3b6cea 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/time_rfc3339.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/time_rfc3339.go @@ -62,7 +62,7 @@ func (t *timeRFC3339) Parse(layout, value string) error { return err } -func populateTimeRFC3339(m map[string]interface{}, k string, t *time.Time) { +func populateTimeRFC3339(m map[string]any, k string, t *time.Time) { if t == nil { return } else if azcore.IsNullValue(t) { diff --git a/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go index e956d99e6aa9..b77e8f263085 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client.go @@ -32,9 +32,9 @@ type UsagesClient struct { } // NewUsagesClient creates a new instance of UsagesClient 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. +// - 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 NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,9 +56,10 @@ 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. -// Generated from API version 2022-10-01 -// location - The location for which resource usage is queried. -// options - UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. +// +// Generated from API version 2023-02-01-preview +// - location - The location for which resource usage is queried. +// - options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. func (client *UsagesClient) NewListPager(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[UsagesClientListResponse]{ More: func(page UsagesClientListResponse) bool { @@ -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-10-01") + reqQP.Set("api-version", "2023-02-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/usages_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client_example_test.go deleted file mode 100644 index 5bd2aa7695fa..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/usages_client_example_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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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/virtualmachinesizes_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go index ac8e33d56bab..87dfed0b21aa 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client.go @@ -32,9 +32,9 @@ type VirtualMachineSizesClient struct { } // NewVirtualMachineSizesClient creates a new instance of VirtualMachineSizesClient 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. +// - 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 NewVirtualMachineSizesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineSizesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,10 +57,11 @@ 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-10-01 -// location - The location upon which virtual-machine-sizes is queried. -// options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List -// method. +// +// Generated from API version 2023-02-01-preview +// - location - The location upon which virtual-machine-sizes is queried. +// - options - VirtualMachineSizesClientListOptions contains the optional parameters for the VirtualMachineSizesClient.List +// method. func (client *VirtualMachineSizesClient) List(ctx context.Context, location string, options *VirtualMachineSizesClientListOptions) (VirtualMachineSizesClientListResponse, error) { req, err := client.listCreateRequest(ctx, location, options) if err != nil { @@ -92,7 +93,7 @@ func (client *VirtualMachineSizesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/virtualmachinesizes_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client_example_test.go deleted file mode 100644 index f72a2011df1e..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/virtualmachinesizes_client_example_test.go +++ /dev/null @@ -1,36 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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/workspaceconnections_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go index 0ba94d5e4296..5f27e66b5410 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client.go @@ -32,9 +32,9 @@ type WorkspaceConnectionsClient struct { } // NewWorkspaceConnectionsClient creates a new instance of WorkspaceConnectionsClient 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. +// - 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 NewWorkspaceConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceConnectionsClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,13 +57,14 @@ func NewWorkspaceConnectionsClient(subscriptionID string, credential azcore.Toke // Create - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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 -// parameters - The object for creating or updating a new workspace connection -// options - WorkspaceConnectionsClientCreateOptions contains the optional parameters for the WorkspaceConnectionsClient.Create -// method. +// +// Generated from API version 2023-02-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 +// - parameters - The object for creating or updating a new workspace connection +// - options - WorkspaceConnectionsClientCreateOptions contains the optional parameters for the WorkspaceConnectionsClient.Create +// method. func (client *WorkspaceConnectionsClient) Create(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, parameters WorkspaceConnectionPropertiesV2BasicResource, options *WorkspaceConnectionsClientCreateOptions) (WorkspaceConnectionsClientCreateResponse, error) { req, err := client.createCreateRequest(ctx, resourceGroupName, workspaceName, connectionName, parameters, options) if err != nil { @@ -103,7 +104,7 @@ func (client *WorkspaceConnectionsClient) createCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -120,12 +121,13 @@ func (client *WorkspaceConnectionsClient) createHandleResponse(resp *http.Respon // Delete - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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 -// options - WorkspaceConnectionsClientDeleteOptions contains the optional parameters for the WorkspaceConnectionsClient.Delete -// method. +// +// Generated from API version 2023-02-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 +// - options - WorkspaceConnectionsClientDeleteOptions contains the optional parameters for the WorkspaceConnectionsClient.Delete +// method. func (client *WorkspaceConnectionsClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *WorkspaceConnectionsClientDeleteOptions) (WorkspaceConnectionsClientDeleteResponse, error) { req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, connectionName, options) if err != nil { @@ -165,7 +167,7 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -173,12 +175,13 @@ func (client *WorkspaceConnectionsClient) deleteCreateRequest(ctx context.Contex // Get - // If the operation fails it returns an *azcore.ResponseError type. -// Generated from API version 2022-10-01 -// 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 -// options - WorkspaceConnectionsClientGetOptions contains the optional parameters for the WorkspaceConnectionsClient.Get -// method. +// +// Generated from API version 2023-02-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 +// - options - WorkspaceConnectionsClientGetOptions contains the optional parameters for the WorkspaceConnectionsClient.Get +// method. func (client *WorkspaceConnectionsClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, connectionName string, options *WorkspaceConnectionsClientGetOptions) (WorkspaceConnectionsClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, connectionName, options) if err != nil { @@ -218,7 +221,7 @@ func (client *WorkspaceConnectionsClient) getCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -233,10 +236,10 @@ func (client *WorkspaceConnectionsClient) getHandleResponse(resp *http.Response) return result, nil } -// 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 -// method. +// - 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.NewListPager +// method. func (client *WorkspaceConnectionsClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceConnectionsClientListOptions) *runtime.Pager[WorkspaceConnectionsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceConnectionsClientListResponse]{ More: func(page WorkspaceConnectionsClientListResponse) bool { @@ -291,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-10-01") + reqQP.Set("api-version", "2023-02-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/workspaceconnections_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client_example_test.go deleted file mode 100644 index afa2d91f2e65..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaceconnections_client_example_test.go +++ /dev/null @@ -1,105 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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/workspacefeatures_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go index d499a1fe4948..0a873f2f7917 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client.go @@ -32,9 +32,9 @@ type WorkspaceFeaturesClient struct { } // NewWorkspaceFeaturesClient creates a new instance of WorkspaceFeaturesClient 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. +// - 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 NewWorkspaceFeaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspaceFeaturesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -56,10 +56,12 @@ func NewWorkspaceFeaturesClient(subscriptionID string, credential azcore.TokenCr } // NewListPager - Lists all enabled features for a workspace -// Generated from API version 2022-10-01 -// 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. +// +// Generated from API version 2023-02-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.NewListPager +// method. func (client *WorkspaceFeaturesClient) NewListPager(resourceGroupName string, workspaceName string, options *WorkspaceFeaturesClientListOptions) *runtime.Pager[WorkspaceFeaturesClientListResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspaceFeaturesClientListResponse]{ More: func(page WorkspaceFeaturesClientListResponse) bool { @@ -108,7 +110,7 @@ func (client *WorkspaceFeaturesClient) listCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/workspacefeatures_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client_example_test.go deleted file mode 100644 index ca2e9b65b668..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspacefeatures_client_example_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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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/workspaces_client.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go index af01dde88cc9..d42678ec3108 100644 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go +++ b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client.go @@ -20,6 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -32,9 +33,9 @@ type WorkspacesClient struct { } // NewWorkspacesClient creates a new instance of WorkspacesClient 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. +// - 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 NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error) { if options == nil { options = &arm.ClientOptions{} @@ -57,12 +58,13 @@ 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-10-01 -// 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. -// options - WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate -// method. +// +// Generated from API version 2023-02-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. +// - options - WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate +// method. func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspacesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, parameters, options) @@ -77,7 +79,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -113,7 +116,7 @@ func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, runtime.MarshalAsJSON(req, parameters) @@ -121,10 +124,11 @@ 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-10-01 -// 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. +// +// Generated from API version 2023-02-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. func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*runtime.Poller[WorkspacesClientDeleteResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, options) @@ -139,7 +143,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -175,7 +180,10 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") + if options != nil && options.ForceToPurge != nil { + reqQP.Set("forceToPurge", strconv.FormatBool(*options.ForceToPurge)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -183,11 +191,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *WorkspacesClient) BeginDiagnose(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDiagnoseOptions) (*runtime.Poller[WorkspacesClientDiagnoseResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.diagnose(ctx, resourceGroupName, workspaceName, options) @@ -204,7 +213,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -240,7 +250,7 @@ func (client *WorkspacesClient) diagnoseCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.Parameters != nil { @@ -251,10 +261,11 @@ 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-10-01 -// 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. +// +// Generated from API version 2023-02-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. func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error) { req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -290,7 +301,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -306,10 +317,11 @@ func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (Workspac } // NewListByResourceGroupPager - Lists all the available machine learning workspaces under the specified resource group. -// Generated from API version 2022-10-01 -// resourceGroupName - The name of the resource group. The name is case insensitive. -// options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup -// method. +// +// Generated from API version 2023-02-01-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.NewListByResourceGroupPager +// method. func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListByResourceGroupResponse]{ More: func(page WorkspacesClientListByResourceGroupResponse) bool { @@ -354,10 +366,13 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + if options != nil && options.Kind != nil { + reqQP.Set("kind", *options.Kind) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -373,9 +388,10 @@ func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Res } // NewListBySubscriptionPager - Lists all the available machine learning workspaces under the specified subscription. -// Generated from API version 2022-10-01 -// options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.ListBySubscription -// method. +// +// Generated from API version 2023-02-01-preview +// - options - WorkspacesClientListBySubscriptionOptions contains the optional parameters for the WorkspacesClient.NewListBySubscriptionPager +// method. func (client *WorkspacesClient) NewListBySubscriptionPager(options *WorkspacesClientListBySubscriptionOptions) *runtime.Pager[WorkspacesClientListBySubscriptionResponse] { return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListBySubscriptionResponse]{ More: func(page WorkspacesClientListBySubscriptionResponse) bool { @@ -416,10 +432,13 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") if options != nil && options.Skip != nil { reqQP.Set("$skip", *options.Skip) } + if options != nil && options.Kind != nil { + reqQP.Set("kind", *options.Kind) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -437,10 +456,11 @@ 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-10-01 -// 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. +// +// Generated from API version 2023-02-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. func (client *WorkspacesClient) ListKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientListKeysOptions) (WorkspacesClientListKeysResponse, error) { req, err := client.listKeysCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -476,7 +496,7 @@ func (client *WorkspacesClient) listKeysCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -493,11 +513,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *WorkspacesClient) ListNotebookAccessToken(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientListNotebookAccessTokenOptions) (WorkspacesClientListNotebookAccessTokenResponse, error) { req, err := client.listNotebookAccessTokenCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -533,7 +554,7 @@ func (client *WorkspacesClient) listNotebookAccessTokenCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -550,11 +571,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *WorkspacesClient) ListNotebookKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientListNotebookKeysOptions) (WorkspacesClientListNotebookKeysResponse, error) { req, err := client.listNotebookKeysCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -590,7 +612,7 @@ func (client *WorkspacesClient) listNotebookKeysCreateRequest(ctx context.Contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -608,11 +630,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *WorkspacesClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientListOutboundNetworkDependenciesEndpointsOptions) (WorkspacesClientListOutboundNetworkDependenciesEndpointsResponse, error) { req, err := client.listOutboundNetworkDependenciesEndpointsCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -648,7 +671,7 @@ func (client *WorkspacesClient) listOutboundNetworkDependenciesEndpointsCreateRe return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -665,11 +688,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *WorkspacesClient) ListStorageAccountKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientListStorageAccountKeysOptions) (WorkspacesClientListStorageAccountKeysResponse, error) { req, err := client.listStorageAccountKeysCreateRequest(ctx, resourceGroupName, workspaceName, options) if err != nil { @@ -705,7 +729,7 @@ func (client *WorkspacesClient) listStorageAccountKeysCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -722,11 +746,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *WorkspacesClient) BeginPrepareNotebook(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginPrepareNotebookOptions) (*runtime.Poller[WorkspacesClientPrepareNotebookResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.prepareNotebook(ctx, resourceGroupName, workspaceName, options) @@ -743,7 +768,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -779,7 +805,7 @@ func (client *WorkspacesClient) prepareNotebookCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -788,11 +814,12 @@ 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-10-01 -// 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 -// method. +// +// Generated from API version 2023-02-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 +// method. func (client *WorkspacesClient) BeginResyncKeys(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginResyncKeysOptions) (*runtime.Poller[WorkspacesClientResyncKeysResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.resyncKeys(ctx, resourceGroupName, workspaceName, options) @@ -808,7 +835,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -844,7 +872,7 @@ func (client *WorkspacesClient) resyncKeysCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-01-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -852,11 +880,12 @@ 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-10-01 -// 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. -// options - WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method. +// +// Generated from API version 2023-02-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. +// - options - WorkspacesClientBeginUpdateOptions contains the optional parameters for the WorkspacesClient.BeginUpdate method. func (client *WorkspacesClient) BeginUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspaceUpdateParameters, options *WorkspacesClientBeginUpdateOptions) (*runtime.Poller[WorkspacesClientUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.update(ctx, resourceGroupName, workspaceName, parameters, options) @@ -871,7 +900,8 @@ 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-10-01 +// +// Generated from API version 2023-02-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 { @@ -907,7 +937,7 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2022-10-01") + reqQP.Set("api-version", "2023-02-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/workspaces_client_example_test.go b/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client_example_test.go deleted file mode 100644 index 8ee155bf2aaa..000000000000 --- a/sdk/resourcemanager/machinelearning/armmachinelearning/workspaces_client_example_test.go +++ /dev/null @@ -1,371 +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/v3" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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-10-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 -}