// 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) Go Code Generator. DO NOT EDIT.

package armdatamigration_test

import (
	"context"
	"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/datamigration/armdatamigration/v3"
	"log"
)

// Generated from example definition: 2025-09-01-preview/CosmosDbMongoCreateOrUpdateDatabaseMigrationMAX1.json
func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginCreate_createMongoToCosmosDbMongoVCoreDatabaseMigrationResourceWithMaximumParameters() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatamigration.NewClientFactory("00000000-1111-2222-3333-444444444444", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient().BeginCreate(ctx, "testrg", "targetCosmosDbClusterName", "migrationRequest", armdatamigration.DatabaseMigrationCosmosDbMongo{
		Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
			CollectionList: []*armdatamigration.MongoMigrationCollection{
				{
					SourceCollection: to.Ptr("sourceCol1"),
					SourceDatabase:   to.Ptr("sourceDb1"),
					TargetCollection: to.Ptr("targetCol1"),
					TargetDatabase:   to.Ptr("targetDb1"),
				},
				{
					SourceCollection: to.Ptr("sourceCol2"),
					SourceDatabase:   to.Ptr("sourceDb2"),
					TargetCollection: to.Ptr("sourceCol2"),
					TargetDatabase:   to.Ptr("sourceDb2"),
				},
			},
			Kind:             to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
			MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/MigrationServices/testMigrationService"),
			Scope:            to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
			SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
				Host:     to.Ptr("abc.mongodb.com"),
				Password: to.Ptr("placeholder"),
				Port:     to.Ptr[int32](88),
				UseSSL:   to.Ptr(true),
				UserName: to.Ptr("abc"),
			},
			TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
				Host:     to.Ptr("xyz.mongocluster.cosmos.azure.com"),
				Password: to.Ptr("placeholder"),
				Port:     to.Ptr[int32](10255),
				UseSSL:   to.Ptr(true),
				UserName: to.Ptr("def"),
			},
		},
	}, 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 poll the result: %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 = armdatamigration.DatabaseMigrationsMongoToCosmosDbvCoreMongoClientCreateResponse{
	// 	DatabaseMigrationCosmosDbMongo: armdatamigration.DatabaseMigrationCosmosDbMongo{
	// 		Name: to.Ptr("migrationRequest"),
	// 		Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
	// 		ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest"),
	// 		Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
	// 			CollectionList: []*armdatamigration.MongoMigrationCollection{
	// 				{
	// 					SourceCollection: to.Ptr("sourceCol1"),
	// 					SourceDatabase: to.Ptr("sourceDb1"),
	// 					TargetCollection: to.Ptr("targetCol1"),
	// 					TargetDatabase: to.Ptr("targetDb1"),
	// 				},
	// 				{
	// 					SourceCollection: to.Ptr("sourceCol2"),
	// 					SourceDatabase: to.Ptr("sourceDb2"),
	// 					TargetCollection: to.Ptr("sourceCol2"),
	// 					TargetDatabase: to.Ptr("sourceDb2"),
	// 				},
	// 			},
	// 			Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
	// 			MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
	// 			ProvisioningState: to.Ptr(armdatamigration.ProvisioningState("Creating")),
	// 			Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
	// 			SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("abc.mongodb.com"),
	// 				Port: to.Ptr[int32](88),
	// 			},
	// 			TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("xyz.mongocluster.cosmos.azure.com"),
	// 				Port: to.Ptr[int32](10255),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-09-01-preview/CosmosDbMongoCreateOrUpdateDatabaseMigrationMIN1.json
func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginCreate_createMongoToCosmosDbMongoVCoreDatabaseMigrationResourceWithMinimumParameters() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatamigration.NewClientFactory("00000000-1111-2222-3333-444444444444", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient().BeginCreate(ctx, "testrg", "targetCosmosDbClusterName", "migrationRequest", armdatamigration.DatabaseMigrationCosmosDbMongo{
		Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
			CollectionList: []*armdatamigration.MongoMigrationCollection{
				{
					SourceCollection: to.Ptr("sourceCol1"),
					SourceDatabase:   to.Ptr("sourceDb1"),
					TargetCollection: to.Ptr("targetCol1"),
					TargetDatabase:   to.Ptr("targetDb1"),
				},
				{
					SourceCollection: to.Ptr("sourceCol2"),
					SourceDatabase:   to.Ptr("sourceDb2"),
				},
			},
			Kind:             to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
			MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/MigrationServices/testMigrationService"),
			Scope:            to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
			SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
				Host:     to.Ptr("abc.mongodb.com"),
				Password: to.Ptr("placeholder"),
				Port:     to.Ptr[int32](88),
				UseSSL:   to.Ptr(true),
				UserName: to.Ptr("abc"),
			},
			TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
				ConnectionString: to.Ptr("placeholder"),
			},
		},
	}, 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 poll the result: %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 = armdatamigration.DatabaseMigrationsMongoToCosmosDbvCoreMongoClientCreateResponse{
	// 	DatabaseMigrationCosmosDbMongo: armdatamigration.DatabaseMigrationCosmosDbMongo{
	// 		Name: to.Ptr("migrationRequest"),
	// 		Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
	// 		ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest"),
	// 		Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
	// 			CollectionList: []*armdatamigration.MongoMigrationCollection{
	// 				{
	// 					SourceCollection: to.Ptr("sourceCol1"),
	// 					SourceDatabase: to.Ptr("sourceDb1"),
	// 					TargetCollection: to.Ptr("targetCol1"),
	// 					TargetDatabase: to.Ptr("targetDb1"),
	// 				},
	// 				{
	// 					SourceCollection: to.Ptr("sourceCol2"),
	// 					SourceDatabase: to.Ptr("sourceDb2"),
	// 					TargetCollection: to.Ptr("sourceCol2"),
	// 					TargetDatabase: to.Ptr("sourceDb2"),
	// 				},
	// 			},
	// 			Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
	// 			MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
	// 			ProvisioningState: to.Ptr(armdatamigration.ProvisioningState("Creating")),
	// 			Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
	// 			SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("abc.mongodb.com"),
	// 				Port: to.Ptr[int32](88),
	// 			},
	// 			TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("xyz.mongo.cosmos.azure.com"),
	// 				Port: to.Ptr[int32](10255),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-09-01-preview/CosmosDbMongoDeleteDatabaseMigration1.json
func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatamigration.NewClientFactory("00000000-1111-2222-3333-444444444444", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient().BeginDelete(ctx, "testrg", "targetCosmosDbClusterName", "migrationRequest", 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 poll the result: %v", err)
	}
}

// Generated from example definition: 2025-09-01-preview/CosmosDbMongoGetDatabaseMigration1.json
func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_Get_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithoutTheExpandParameter() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatamigration.NewClientFactory("00000000-1111-2222-3333-444444444444", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient().Get(ctx, "testrg", "targetCosmosDbClusterName", "migrationRequest", 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 = armdatamigration.DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetResponse{
	// 	DatabaseMigrationCosmosDbMongo: armdatamigration.DatabaseMigrationCosmosDbMongo{
	// 		Name: to.Ptr("migrationRequest"),
	// 		Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
	// 		ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest"),
	// 		Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
	// 			CollectionList: []*armdatamigration.MongoMigrationCollection{
	// 				{
	// 					SourceCollection: to.Ptr("sourceCol1"),
	// 					SourceDatabase: to.Ptr("sourceDb1"),
	// 					TargetCollection: to.Ptr("targetCol1"),
	// 					TargetDatabase: to.Ptr("targetDb1"),
	// 				},
	// 				{
	// 					SourceCollection: to.Ptr("sourceCol2"),
	// 					SourceDatabase: to.Ptr("sourceDb2"),
	// 					TargetCollection: to.Ptr("sourceCol2"),
	// 					TargetDatabase: to.Ptr("sourceDb2"),
	// 				},
	// 			},
	// 			Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
	// 			MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
	// 			MigrationStatus: to.Ptr("Creating"),
	// 			ProvisioningState: to.Ptr(armdatamigration.ProvisioningState("Creating")),
	// 			Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
	// 			SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("abc.mongodb.com"),
	// 				Port: to.Ptr[int32](88),
	// 			},
	// 			TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("xyz.mongocluster.cosmos.azure.com"),
	// 				Port: to.Ptr[int32](10255),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-09-01-preview/CosmosDbMongoGetDatabaseMigrationExpanded1.json
func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_Get_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithTheExpandParameter() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatamigration.NewClientFactory("00000000-1111-2222-3333-444444444444", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient().Get(ctx, "testrg", "targetCosmosDbClusterName", "migrationRequest", 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 = armdatamigration.DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetResponse{
	// 	DatabaseMigrationCosmosDbMongo: armdatamigration.DatabaseMigrationCosmosDbMongo{
	// 		Name: to.Ptr("migrationRequest"),
	// 		Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
	// 		ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest"),
	// 		Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
	// 			CollectionList: []*armdatamigration.MongoMigrationCollection{
	// 				{
	// 					MigrationProgressDetails: &armdatamigration.MongoMigrationProgressDetails{
	// 						DurationInSeconds: to.Ptr[int32](400),
	// 						MigrationStatus: to.Ptr(armdatamigration.MongoMigrationStatusCompleted),
	// 						ProcessedDocumentCount: to.Ptr[int64](25544),
	// 						SourceDocumentCount: to.Ptr[int64](25544),
	// 					},
	// 					SourceCollection: to.Ptr("sourceCol1"),
	// 					SourceDatabase: to.Ptr("sourceDb1"),
	// 					TargetCollection: to.Ptr("targetCol1"),
	// 					TargetDatabase: to.Ptr("targetDb1"),
	// 				},
	// 				{
	// 					MigrationProgressDetails: &armdatamigration.MongoMigrationProgressDetails{
	// 						DurationInSeconds: to.Ptr[int32](100),
	// 						MigrationStatus: to.Ptr(armdatamigration.MongoMigrationStatusCompleted),
	// 						ProcessedDocumentCount: to.Ptr[int64](255),
	// 						SourceDocumentCount: to.Ptr[int64](255),
	// 					},
	// 					SourceCollection: to.Ptr("sourceCol2"),
	// 					SourceDatabase: to.Ptr("sourceDb2"),
	// 					TargetCollection: to.Ptr("sourceCol2"),
	// 					TargetDatabase: to.Ptr("sourceDb2"),
	// 				},
	// 			},
	// 			EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T09:00:00Z"); return t}()),
	// 			Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
	// 			MigrationOperationID: to.Ptr("858ba109-5ab7-4fa1-8aea-bea487cacdcd"),
	// 			MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
	// 			MigrationStatus: to.Ptr("Succeeded"),
	// 			ProvisioningState: to.Ptr(armdatamigration.ProvisioningStateSucceeded),
	// 			Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
	// 			SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("abc.mongodb.com"),
	// 				Port: to.Ptr[int32](88),
	// 			},
	// 			StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T08:00:00Z"); return t}()),
	// 			TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
	// 				Host: to.Ptr("xyz.mongocluster.cosmos.azure.com"),
	// 				Port: to.Ptr[int32](10255),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-09-01-preview/CosmosDbMongoListByScopeDatabaseMigration2.json
func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_NewGetForScopePager_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithoutTheExpandParameter() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatamigration.NewClientFactory("00000000-1111-2222-3333-444444444444", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient().NewGetForScopePager("testrg", "targetCosmosDbClusterName", 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 = armdatamigration.DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetForScopeResponse{
		// 	DatabaseMigrationCosmosDbMongoListResult: armdatamigration.DatabaseMigrationCosmosDbMongoListResult{
		// 		Value: []*armdatamigration.DatabaseMigrationCosmosDbMongo{
		// 			{
		// 				Name: to.Ptr("migrationRequest1"),
		// 				Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
		// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest1"),
		// 				Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
		// 					Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
		// 					MigrationOperationID: to.Ptr("858ba109-5ab7-4fa1-8aea-bea487cacdcd"),
		// 					MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
		// 					MigrationStatus: to.Ptr("InProgress"),
		// 					ProvisioningState: to.Ptr(armdatamigration.ProvisioningStateSucceeded),
		// 					Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
		// 					SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("abc.mongodb.com"),
		// 						Port: to.Ptr[int32](88),
		// 					},
		// 					StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T08:00:00Z"); return t}()),
		// 					TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("xyz.mongocluster.cosmos.azure.com"),
		// 						Port: to.Ptr[int32](10255),
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("migrationRequest2"),
		// 				Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
		// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest2"),
		// 				Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
		// 					EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T08:01:00Z"); return t}()),
		// 					Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
		// 					MigrationFailureError: &armdatamigration.ErrorInfo{
		// 						Code: to.Ptr("400"),
		// 						Message: to.Ptr("Source or Target database connectivity could not be validated."),
		// 					},
		// 					MigrationOperationID: to.Ptr("858ba109-5ab7-4fa1-8aea-bea487cacdcd"),
		// 					MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
		// 					MigrationStatus: to.Ptr("Failed"),
		// 					ProvisioningState: to.Ptr(armdatamigration.ProvisioningStateSucceeded),
		// 					Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
		// 					SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("abc.mongodb.com"),
		// 						Port: to.Ptr[int32](88),
		// 					},
		// 					StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T08:00:00Z"); return t}()),
		// 					TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("xyz.mongocluster.cosmos.azure.com"),
		// 						Port: to.Ptr[int32](10255),
		// 					},
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-09-01-preview/CosmosDbMongoListByScopeDatabaseMigration3.json
func ExampleDatabaseMigrationsMongoToCosmosDbvCoreMongoClient_NewGetForScopePager_getMongoToCosmosDbMongoVCoreDatabaseMigrationWithTheExpandParameter() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdatamigration.NewClientFactory("00000000-1111-2222-3333-444444444444", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDatabaseMigrationsMongoToCosmosDbvCoreMongoClient().NewGetForScopePager("testrg", "targetCosmosDbClusterName", 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 = armdatamigration.DatabaseMigrationsMongoToCosmosDbvCoreMongoClientGetForScopeResponse{
		// 	DatabaseMigrationCosmosDbMongoListResult: armdatamigration.DatabaseMigrationCosmosDbMongoListResult{
		// 		Value: []*armdatamigration.DatabaseMigrationCosmosDbMongo{
		// 			{
		// 				Name: to.Ptr("migrationRequest1"),
		// 				Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
		// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest1"),
		// 				Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
		// 					Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
		// 					MigrationOperationID: to.Ptr("858ba109-5ab7-4fa1-8aea-bea487cacdcd"),
		// 					MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
		// 					MigrationStatus: to.Ptr("InProgress"),
		// 					ProvisioningState: to.Ptr(armdatamigration.ProvisioningStateSucceeded),
		// 					Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
		// 					SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("abc.mongodb.com"),
		// 						Port: to.Ptr[int32](88),
		// 					},
		// 					StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T08:00:00Z"); return t}()),
		// 					TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("xyz.mongocluster.cosmos.azure.com"),
		// 						Port: to.Ptr[int32](10255),
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("migrationRequest2"),
		// 				Type: to.Ptr("Microsoft.DataMigration/databaseMigrations"),
		// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest2"),
		// 				Properties: &armdatamigration.DatabaseMigrationPropertiesCosmosDbMongo{
		// 					EndedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T08:01:00Z"); return t}()),
		// 					Kind: to.Ptr(armdatamigration.ResourceTypeMongoToCosmosDbMongo),
		// 					MigrationFailureError: &armdatamigration.ErrorInfo{
		// 						Code: to.Ptr("400"),
		// 						Message: to.Ptr("Source or Target database connectivity could not be validated."),
		// 					},
		// 					MigrationOperationID: to.Ptr("858ba109-5ab7-4fa1-8aea-bea487cacdcd"),
		// 					MigrationService: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService"),
		// 					MigrationStatus: to.Ptr("Failed"),
		// 					ProvisioningState: to.Ptr(armdatamigration.ProvisioningStateSucceeded),
		// 					Scope: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName"),
		// 					SourceMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("abc.mongodb.com"),
		// 						Port: to.Ptr[int32](88),
		// 					},
		// 					StartedOn: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "0001-01-01T08:00:00Z"); return t}()),
		// 					TargetMongoConnection: &armdatamigration.MongoConnectionInformation{
		// 						Host: to.Ptr("xyz.mongocluster.cosmos.azure.com"),
		// 						Port: to.Ptr[int32](10255),
		// 					},
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}
