// 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 armcomputebulkactions_test

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/computebulkactions/armcomputebulkactions"
	"log"
)

// Generated from example definition: 2026-02-01-preview/Operations_List_MaximumSet_Gen.json
func ExampleOperationsClient_NewListPager_operationsListGeneratedByMaximumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcomputebulkactions.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(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 = armcomputebulkactions.OperationsClientListResponse{
		// 	OperationListResult: armcomputebulkactions.OperationListResult{
		// 		Value: []*armcomputebulkactions.Operation{
		// 			{
		// 				Name: to.Ptr("sgbqlnhrgmfpcddqyemvzhsbehs"),
		// 				IsDataAction: to.Ptr(true),
		// 				Display: &armcomputebulkactions.OperationDisplay{
		// 					Provider: to.Ptr("qiytxlivrxvlznpmtrq"),
		// 					Resource: to.Ptr("cejwsjrqtuvkxfunqutibpxsqjrph"),
		// 					Operation: to.Ptr("pcvvkqeuhctsp"),
		// 					Description: to.Ptr("eukcdvgrb"),
		// 				},
		// 				Origin: to.Ptr(armcomputebulkactions.OriginUser),
		// 				ActionType: to.Ptr(armcomputebulkactions.ActionTypeInternal),
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2026-02-01-preview/Operations_List_MinimumSet_Gen.json
func ExampleOperationsClient_NewListPager_operationsListGeneratedByMinimumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armcomputebulkactions.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationsClient().NewListPager(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 = armcomputebulkactions.OperationsClientListResponse{
		// 	OperationListResult: armcomputebulkactions.OperationListResult{
		// 	},
		// }
	}
}
