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

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling/v2"
	"log"
)

// Generated from example definition: 2024-04-01/billingRoleDefinitionGetByBillingAccount.json
func ExampleRoleDefinitionClient_GetByBillingAccount() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoleDefinitionClient().GetByBillingAccount(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", "50000000-aaaa-bbbb-cccc-100000000000", 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 = armbilling.RoleDefinitionClientGetByBillingAccountResponse{
	// 	RoleDefinition: armbilling.RoleDefinition{
	// 		Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000000"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts/billingRoleDefinitions"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000000"),
	// 		Properties: &armbilling.RoleDefinitionProperties{
	// 			Permissions: []*armbilling.Permission{
	// 				{
	// 					Actions: []*string{
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000000"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000001"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000002"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000003"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000004"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000006"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000007"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000008"),
	// 						to.Ptr("10000000-aaaa-bbbb-cccc-200000000001"),
	// 						to.Ptr("10000000-aaaa-bbbb-cccc-200000000002"),
	// 						to.Ptr("10000000-aaaa-bbbb-cccc-200000000003"),
	// 						to.Ptr("10000000-aaaa-bbbb-cccc-200000000006"),
	// 						to.Ptr("10000000-aaaa-bbbb-cccc-200000000007"),
	// 						to.Ptr("50000000-aaaa-bbbb-cccc-200000000005"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000000"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000000"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000013"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000004"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000001"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000005"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000002"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000003"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000011"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
	// 					},
	// 				},
	// 			},
	// 			RoleName: to.Ptr("Billing account owner"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionGetByBillingProfile.json
func ExampleRoleDefinitionClient_GetByBillingProfile() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoleDefinitionClient().GetByBillingProfile(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", "xxxx-xxxx-xxx-xxx", "40000000-aaaa-bbbb-cccc-100000000000", 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 = armbilling.RoleDefinitionClientGetByBillingProfileResponse{
	// 	RoleDefinition: armbilling.RoleDefinition{
	// 		Name: to.Ptr("40000000-aaaa-bbbb-cccc-100000000000"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/billingRoleDefinitions"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/billingRoleDefinitions/40000000-aaaa-bbbb-cccc-100000000000"),
	// 		Properties: &armbilling.RoleDefinitionProperties{
	// 			Description: to.Ptr("The Owner role gives the user all permissions including access management rights to the billing profile."),
	// 			Permissions: []*armbilling.Permission{
	// 				{
	// 					Actions: []*string{
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000000"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000001"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000002"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000003"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000004"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000005"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000011"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
	// 						to.Ptr("40000000-aaaa-bbbb-cccc-200000000013"),
	// 					},
	// 				},
	// 			},
	// 			RoleName: to.Ptr("Billing profile owner"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionGetByCustomer.json
func ExampleRoleDefinitionClient_GetByCustomer() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoleDefinitionClient().GetByCustomer(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", "xxxx-xxxx-xxx-xxx", "11111111-1111-1111-1111-111111111111", "30000000-aaaa-bbbb-cccc-100000000000", 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 = armbilling.RoleDefinitionClientGetByCustomerResponse{
	// 	RoleDefinition: armbilling.RoleDefinition{
	// 		Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000000"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/customers/billingRoleDefinitions"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/customers/11111111-1111-1111-1111-111111111111/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000000"),
	// 		Properties: &armbilling.RoleDefinitionProperties{
	// 			Description: to.Ptr("The Owner role gives the user all permissions including access management rights to the customer."),
	// 			Permissions: []*armbilling.Permission{
	// 				{
	// 					Actions: []*string{
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000000"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
	// 					},
	// 					NotActions: []*string{
	// 					},
	// 				},
	// 			},
	// 			RoleName: to.Ptr("Customer owner"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionGetByDepartment.json
func ExampleRoleDefinitionClient_GetByDepartment() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoleDefinitionClient().GetByDepartment(ctx, "123456", "7368531", "50000000-aaaa-bbbb-cccc-100000000000", 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 = armbilling.RoleDefinitionClientGetByDepartmentResponse{
	// 	RoleDefinition: armbilling.RoleDefinition{
	// 		Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000000"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts/departments/billingRoleDefinitions"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/123456/departments/7368531/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000000"),
	// 		Properties: &armbilling.RoleDefinitionProperties{
	// 			Permissions: []*armbilling.Permission{
	// 				{
	// 					Actions: []*string{
	// 						to.Ptr("Microsoft.Billing/billingAccounts/departments/read"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/departments/write"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/departments/action"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/departments/delete"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/read"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/write"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/action"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/delete"),
	// 					},
	// 				},
	// 			},
	// 			RoleName: to.Ptr("Department Admin"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionGetByEnrollmentAccount.json
func ExampleRoleDefinitionClient_GetByEnrollmentAccount() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoleDefinitionClient().GetByEnrollmentAccount(ctx, "123456", "4568789", "50000000-aaaa-bbbb-cccc-100000000000", 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 = armbilling.RoleDefinitionClientGetByEnrollmentAccountResponse{
	// 	RoleDefinition: armbilling.RoleDefinition{
	// 		Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000000"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingRoleDefinitions"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/123456/enrollmentAccounts/4568789/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000000"),
	// 		Properties: &armbilling.RoleDefinitionProperties{
	// 			Permissions: []*armbilling.Permission{
	// 				{
	// 					Actions: []*string{
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/read"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/write"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/action"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/delete"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/read"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/write"),
	// 						to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/action"),
	// 					},
	// 				},
	// 			},
	// 			RoleName: to.Ptr("Account Owner"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionGetByInvoiceSection.json
func ExampleRoleDefinitionClient_GetByInvoiceSection() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRoleDefinitionClient().GetByInvoiceSection(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", "xxxx-xxxx-xxx-xxx", "yyyy-yyyy-yyy-yyy", "30000000-aaaa-bbbb-cccc-100000000000", 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 = armbilling.RoleDefinitionClientGetByInvoiceSectionResponse{
	// 	RoleDefinition: armbilling.RoleDefinition{
	// 		Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000000"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingRoleDefinitions"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/yyyy-yyyy-yyy-yyy/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000000"),
	// 		Properties: &armbilling.RoleDefinitionProperties{
	// 			Description: to.Ptr("The Owner role gives the user all permissions including access management rights to the invoice section."),
	// 			Permissions: []*armbilling.Permission{
	// 				{
	// 					Actions: []*string{
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000000"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
	// 						to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
	// 					},
	// 				},
	// 			},
	// 			RoleName: to.Ptr("Invoice section owner"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionListByBillingAccount.json
func ExampleRoleDefinitionClient_NewListByBillingAccountPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoleDefinitionClient().NewListByBillingAccountPager("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", 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 = armbilling.RoleDefinitionClientListByBillingAccountResponse{
		// 	RoleDefinitionListResult: armbilling.RoleDefinitionListResult{
		// 		Value: []*armbilling.RoleDefinition{
		// 			{
		// 				Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000000"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000000"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000000"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000000"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000000"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Billing account owner"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000001"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000001"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Contributor role gives the user all permissions except access management on the organization."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Billing account contributor"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000002"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000002"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Reader role gives the user read permissions to an organization."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Billing account reader"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000002"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000002"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Reader role gives the user read permissions to an organization."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Billing account reader"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000003"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000003"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Purchaser role gives the user permissions to make purchases by creating new Projects and Billing Groups in an organization."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("10000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("50000000-aaaa-bbbb-cccc-200000000006"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Basic Purchaser"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionListByBillingProfile.json
func ExampleRoleDefinitionClient_NewListByBillingProfilePager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoleDefinitionClient().NewListByBillingProfilePager("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", "xxxx-xxxx-xxx-xxx", 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 = armbilling.RoleDefinitionClientListByBillingProfileResponse{
		// 	RoleDefinitionListResult: armbilling.RoleDefinitionListResult{
		// 		Value: []*armbilling.RoleDefinition{
		// 			{
		// 				Name: to.Ptr("40000000-aaaa-bbbb-cccc-100000000000"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/billingRoleDefinitions/40000000-aaaa-bbbb-cccc-100000000000"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Owner role gives the user all permissions including access management rights to the billing profile."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000000"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000013"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Billing profile owner"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("40000000-aaaa-bbbb-cccc-100000000001"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/billingRoleDefinitions/40000000-aaaa-bbbb-cccc-100000000001"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Contributor role gives the user all permissions except access management rights to the billing profile."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000002"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000013"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Billing profile contributor"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("40000000-aaaa-bbbb-cccc-100000000002"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/billingRoleDefinitions/40000000-aaaa-bbbb-cccc-100000000002"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Reader role gives the user read only access to the billing profile."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Billing profile reader"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("40000000-aaaa-bbbb-cccc-100000000004"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/billingRoleDefinitions/40000000-aaaa-bbbb-cccc-100000000004"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Invoice Manager role gives the user the ability to view and manage invoices."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("40000000-aaaa-bbbb-cccc-200000000013"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Invoice manager"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionListByCustomer.json
func ExampleRoleDefinitionClient_NewListByCustomerPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoleDefinitionClient().NewListByCustomerPager("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", "xxxx-xxxx-xxx-xxx", "11111111-1111-1111-1111-111111111111", 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 = armbilling.RoleDefinitionClientListByCustomerResponse{
		// 	RoleDefinitionListResult: armbilling.RoleDefinitionListResult{
		// 		Value: []*armbilling.RoleDefinition{
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000000"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/customers/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/customers/11111111-1111-1111-1111-111111111111/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000000"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Owner role gives the user all permissions including access management rights to the customer."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000000"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
		// 							},
		// 							NotActions: []*string{
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Customer owner"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000001"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/customers/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/customers/11111111-1111-1111-1111-111111111111/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000001"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Contributor role gives the user all permissions except access management rights to the customer."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
		// 							},
		// 							NotActions: []*string{
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Customer contributor"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000002"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/customers/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/customers/11111111-1111-1111-1111-111111111111/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000002"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The reader role gives the user read only access to the customer."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 							},
		// 							NotActions: []*string{
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Customer reader"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionListByDepartment.json
func ExampleRoleDefinitionClient_NewListByDepartmentPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoleDefinitionClient().NewListByDepartmentPager("123456", "7368531", 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 = armbilling.RoleDefinitionClientListByDepartmentResponse{
		// 	RoleDefinitionListResult: armbilling.RoleDefinitionListResult{
		// 		Value: []*armbilling.RoleDefinition{
		// 			{
		// 				Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000000"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/departments/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/123456/departments/7368531/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000000"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("Microsoft.Billing/billingAccounts/departments/read"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/departments/write"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/departments/action"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/departments/delete"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/read"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/write"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/action"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/delete"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/read"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Department Admin"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("50000000-aaaa-bbbb-cccc-100000000001"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/departments/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/123456/departments/7368531/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000001"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("Microsoft.Billing/billingAccounts/departments/read"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/read"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/read"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Department Reader"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionListByEnrollmentAccount.json
func ExampleRoleDefinitionClient_NewListByEnrollmentAccountPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoleDefinitionClient().NewListByEnrollmentAccountPager("123456", "4568789", 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 = armbilling.RoleDefinitionClientListByEnrollmentAccountResponse{
		// 	RoleDefinitionListResult: armbilling.RoleDefinitionListResult{
		// 		Value: []*armbilling.RoleDefinition{
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000000"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/123456/enrollmentAccounts/4568789/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000000"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The account owner role gives the user all permissions including access management rights to an accounts."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/read"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/write"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/action"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/delete"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/read"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/write"),
		// 								to.Ptr("Microsoft.Billing/billingAccounts/enrollmentAccounts/billingSubscriptions/action"),
		// 							},
		// 							NotActions: []*string{
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Account Owner"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingRoleDefinitionListByInvoiceSection.json
func ExampleRoleDefinitionClient_NewListByInvoiceSectionPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armbilling.NewClientFactory("<subscriptionID>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRoleDefinitionClient().NewListByInvoiceSectionPager("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", "xxxx-xxxx-xxx-xxx", "yyyy-yyyy-yyy-yyy", 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 = armbilling.RoleDefinitionClientListByInvoiceSectionResponse{
		// 	RoleDefinitionListResult: armbilling.RoleDefinitionListResult{
		// 		Value: []*armbilling.RoleDefinition{
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000000"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/yyyy-yyyy-yyy-yyy/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000000"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Owner role gives the user all permissions including access management rights to the invoice section."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000000"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Invoice section owner"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000001"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/yyyy-yyyy-yyy-yyy/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000001"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Contributor role gives the user all permissions except access management rights to the invoice section."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000003"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000005"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000006"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000008"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000009"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000010"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000011"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000012"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000016"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000018"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Invoice section contributor"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000002"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/yyyy-yyyy-yyy-yyy/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000002"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The reader role gives the user read only access to the invoice section."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000007"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000004"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000015"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000017"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Invoice section reader"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("30000000-aaaa-bbbb-cccc-100000000006"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingRoleDefinitions"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/yyyy-yyyy-yyy-yyy/billingRoleDefinitions/30000000-aaaa-bbbb-cccc-100000000006"),
		// 				Properties: &armbilling.RoleDefinitionProperties{
		// 					Description: to.Ptr("The Azure subscription creator role gives the user the ability to create an Azure subscription for the invoice section."),
		// 					Permissions: []*armbilling.Permission{
		// 						{
		// 							Actions: []*string{
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000001"),
		// 								to.Ptr("30000000-aaaa-bbbb-cccc-200000000013"),
		// 							},
		// 						},
		// 					},
		// 					RoleName: to.Ptr("Azure subscription creator"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}
