//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_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/v4"
)

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil,
		JobType:      nil,
		Tag:          nil,
		ListViewType: nil,
		Properties:   nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{
		// 	Value: []*armmachinelearning.JobBase{
		// 		{
		// 			Name: to.Ptr("string"),
		// 			Type: to.Ptr("string"),
		// 			ID: to.Ptr("string"),
		// 			SystemData: &armmachinelearning.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity),
		// 			},
		// 			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": &armmachinelearning.JobService{
		// 						Endpoint: to.Ptr("string"),
		// 						ErrorMessage: to.Ptr("string"),
		// 						JobServiceType: to.Ptr("string"),
		// 						Port: to.Ptr[int32](1),
		// 						Properties: map[string]*string{
		// 							"string": to.Ptr("string"),
		// 						},
		// 						Status: to.Ptr("string"),
		// 					},
		// 				},
		// 				Status: to.Ptr(armmachinelearning.JobStatus("Scheduled")),
		// 				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]any{
		// 						"string": map[string]any{
		// 							"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)"),
		// 					}},
		// 				},
		// 			},
		// 	}},
		// }
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil,
		JobType:      to.Ptr("string"),
		Tag:          to.Ptr("string"),
		ListViewType: nil,
		Properties:   nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{
		// 	Value: []*armmachinelearning.JobBase{
		// 		{
		// 			Name: to.Ptr("string"),
		// 			Type: to.Ptr("string"),
		// 			ID: to.Ptr("string"),
		// 			SystemData: &armmachinelearning.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
		// 			},
		// 			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": &armmachinelearning.JobService{
		// 						Endpoint: to.Ptr("string"),
		// 						ErrorMessage: to.Ptr("string"),
		// 						JobServiceType: to.Ptr("string"),
		// 						Port: to.Ptr[int32](1),
		// 						Properties: map[string]*string{
		// 							"string": to.Ptr("string"),
		// 						},
		// 						Status: to.Ptr("string"),
		// 					},
		// 				},
		// 				Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
		// 				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),
		// 					},
		// 				},
		// 				Parameters: map[string]any{
		// 					"string": "string",
		// 				},
		// 				Resources: &armmachinelearning.JobResourceConfiguration{
		// 					InstanceCount: to.Ptr[int32](1),
		// 					InstanceType: to.Ptr("string"),
		// 					Properties: map[string]any{
		// 						"string": map[string]any{
		// 							"7aad5998-6c83-4ca9-b50a-b44dfc43f420": nil,
		// 						},
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil,
		JobType:      to.Ptr("string"),
		Tag:          to.Ptr("string"),
		ListViewType: nil,
		Properties:   nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{
		// 	Value: []*armmachinelearning.JobBase{
		// 		{
		// 			Name: to.Ptr("string"),
		// 			Type: to.Ptr("string"),
		// 			ID: to.Ptr("string"),
		// 			SystemData: &armmachinelearning.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
		// 			},
		// 			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": &armmachinelearning.JobService{
		// 						Endpoint: to.Ptr("string"),
		// 						ErrorMessage: to.Ptr("string"),
		// 						JobServiceType: to.Ptr("string"),
		// 						Port: to.Ptr[int32](1),
		// 						Properties: map[string]*string{
		// 							"string": to.Ptr("string"),
		// 						},
		// 						Status: to.Ptr("string"),
		// 					},
		// 				},
		// 				Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
		// 				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]any{
		// 				},
		// 			},
		// 	}},
		// }
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewJobsClient().NewListPager("test-rg", "my-aml-workspace", &armmachinelearning.JobsClientListOptions{Skip: nil,
		JobType:      to.Ptr("string"),
		Tag:          to.Ptr("string"),
		ListViewType: nil,
		Properties:   nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.JobBaseResourceArmPaginatedResult = armmachinelearning.JobBaseResourceArmPaginatedResult{
		// 	Value: []*armmachinelearning.JobBase{
		// 		{
		// 			Name: to.Ptr("string"),
		// 			Type: to.Ptr("string"),
		// 			ID: to.Ptr("string"),
		// 			SystemData: &armmachinelearning.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				CreatedBy: to.Ptr("string"),
		// 				CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
		// 				LastModifiedBy: to.Ptr("string"),
		// 				LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
		// 			},
		// 			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": &armmachinelearning.JobService{
		// 						Endpoint: to.Ptr("string"),
		// 						ErrorMessage: to.Ptr("string"),
		// 						JobServiceType: to.Ptr("string"),
		// 						Port: to.Ptr[int32](1),
		// 						Properties: map[string]*string{
		// 							"string": to.Ptr("string"),
		// 						},
		// 						Status: to.Ptr("string"),
		// 					},
		// 				},
		// 				Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
		// 				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]any{
		// 					"string":map[string]any{
		// 					},
		// 				},
		// 				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]any{
		// 							"string": map[string]any{
		// 								"e6b6493e-7d5e-4db3-be1e-306ec641327e": nil,
		// 							},
		// 						},
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewJobsClient().BeginDelete(ctx, "test-rg", "my-aml-workspace", "http://subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/my-favorite-aml-job", 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/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatus("Scheduled")),
	// 		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]any{
	// 				"string": map[string]any{
	// 					"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)"),
	// 			}},
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
	// 		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),
	// 			},
	// 		},
	// 		Parameters: map[string]any{
	// 			"string": "string",
	// 		},
	// 		Resources: &armmachinelearning.JobResourceConfiguration{
	// 			InstanceCount: to.Ptr[int32](1),
	// 			InstanceType: to.Ptr("string"),
	// 			Properties: map[string]any{
	// 				"string": map[string]any{
	// 					"8385cf05-78c0-41ef-b31d-36796a678e19": nil,
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
	// 		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]any{
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().Get(ctx, "test-rg", "my-aml-workspace", "string", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
	// 		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]any{
	// 			"string":map[string]any{
	// 			},
	// 		},
	// 		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]any{
	// 					"string": map[string]any{
	// 						"e6b6493e-7d5e-4db3-be1e-306ec641327e": nil,
	// 					},
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().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]any{
					"string": map[string]any{
						"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)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeManagedIdentity),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatus("Scheduled")),
	// 		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]any{
	// 				"string": map[string]any{
	// 					"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)"),
	// 			}},
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().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]any{
					"string": map[string]any{
						"e6b6493e-7d5e-4db3-be1e-306ec641327e": nil,
					},
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
	// 		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),
	// 			},
	// 		},
	// 		Parameters: map[string]any{
	// 			"string": "string",
	// 		},
	// 		Resources: &armmachinelearning.JobResourceConfiguration{
	// 			InstanceCount: to.Ptr[int32](1),
	// 			InstanceType: to.Ptr("string"),
	// 			Properties: map[string]any{
	// 				"string": map[string]any{
	// 					"a0847709-f5aa-4561-8ba5-d915d403fdcf": nil,
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().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]any{},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
	// 		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]any{
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewJobsClient().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]any{
				"string": map[string]any{},
			},
			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]any{
						"string": map[string]any{
							"e6b6493e-7d5e-4db3-be1e-306ec641327e": nil,
						},
					},
				},
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.JobBase = armmachinelearning.JobBase{
	// 	Name: to.Ptr("string"),
	// 	Type: to.Ptr("string"),
	// 	ID: to.Ptr("string"),
	// 	SystemData: &armmachinelearning.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		CreatedBy: to.Ptr("string"),
	// 		CreatedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T12:34:56.999Z"); return t}()),
	// 		LastModifiedBy: to.Ptr("string"),
	// 		LastModifiedByType: to.Ptr(armmachinelearning.CreatedByTypeUser),
	// 	},
	// 	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": &armmachinelearning.JobService{
	// 				Endpoint: to.Ptr("string"),
	// 				ErrorMessage: to.Ptr("string"),
	// 				JobServiceType: to.Ptr("string"),
	// 				Port: to.Ptr[int32](1),
	// 				Properties: map[string]*string{
	// 					"string": to.Ptr("string"),
	// 				},
	// 				Status: to.Ptr("string"),
	// 			},
	// 		},
	// 		Status: to.Ptr(armmachinelearning.JobStatusNotStarted),
	// 		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]any{
	// 			"string":map[string]any{
	// 			},
	// 		},
	// 		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]any{
	// 					"string": map[string]any{
	// 						"e6b6493e-7d5e-4db3-be1e-306ec641327e": nil,
	// 					},
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9778042723206fbc582306dcb407bddbd73df005/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-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()
	clientFactory, err := armmachinelearning.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewJobsClient().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)
	}
}
