// 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/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/billing/armbilling/v2"
	"log"
	"time"
)

// Generated from example definition: 2024-04-01/paymentTermsAdd.json
func ExampleAccountsClient_BeginAddPaymentTerms() {
	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)
	}
	poller, err := clientFactory.NewAccountsClient().BeginAddPaymentTerms(ctx, "00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", []*armbilling.PaymentTerm{
		{
			EndDate:   to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-25T22:39:34.2606750Z"); return t }()),
			StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t }()),
			Term:      to.Ptr("net10"),
		},
	}, 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 = armbilling.AccountsClientAddPaymentTermsResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/010000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
	// 			AccountType: to.Ptr(armbilling.AccountTypeBusiness),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
	// 			DisplayName: to.Ptr("Premier Business Account"),
	// 			HasReadAccess: to.Ptr(true),
	// 			PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/paymentTermsCancel.json
func ExampleAccountsClient_BeginCancelPaymentTerms() {
	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)
	}
	poller, err := clientFactory.NewAccountsClient().BeginCancelPaymentTerms(ctx, "00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t }(), 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 = armbilling.AccountsClientCancelPaymentTermsResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/010000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
	// 			AccountType: to.Ptr(armbilling.AccountTypeBusiness),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
	// 			DisplayName: to.Ptr("Premier Business Account"),
	// 			HasReadAccess: to.Ptr(true),
	// 			PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountsConfirmTransition.json
func ExampleAccountsClient_ConfirmTransition() {
	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.NewAccountsClient().ConfirmTransition(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", 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.AccountsClientConfirmTransitionResponse{
	// 	TransitionDetails: armbilling.TransitionDetails{
	// 		AnniversaryDay: to.Ptr[int32](12),
	// 		TransitionDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-17T00:00:00Z"); return t}()),
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountWithExpandForPONumber.json
func ExampleAccountsClient_Get_billingAccountWithExpandForPoNumber() {
	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.NewAccountsClient().Get(ctx, "8608480", 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.AccountsClientGetResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("6564892"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/6564892"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountType: to.Ptr(armbilling.AccountTypeEnterprise),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeEnterpriseAgreement),
	// 			DisplayName: to.Ptr("Enterprise Account"),
	// 			EnrollmentDetails: &armbilling.AccountPropertiesEnrollmentDetails{
	// 				BillingCycle: to.Ptr("Monthly"),
	// 				Channel: to.Ptr("EaDirect"),
	// 				Cloud: to.Ptr("Azure Commercial"),
	// 				CountryCode: to.Ptr("US"),
	// 				Currency: to.Ptr("USD"),
	// 				EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-31T17:32:28Z"); return t}()),
	// 				ExtendedTermOption: to.Ptr(armbilling.ExtendedTermOptionOptedOut),
	// 				PoNumber: to.Ptr("poNumber123"),
	// 				StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-01T17:32:28Z"); return t}()),
	// 				SupportCoverage: to.Ptr("1/26/2021 - 6/30/2021"),
	// 				SupportLevel: to.Ptr(armbilling.SupportLevelStandard),
	// 				Language: to.Ptr("en"),
	// 			},
	// 			HasReadAccess: to.Ptr(true),
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountWithRegistrationNumberWithDefaultType.json
func ExampleAccountsClient_Get_billingAccountWithRegistrationNumberWithDefaultType() {
	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.NewAccountsClient().Get(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", 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.AccountsClientGetResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
	// 			AccountType: to.Ptr(armbilling.AccountTypeBusiness),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
	// 			DisplayName: to.Ptr("Premier Business Account"),
	// 			HasReadAccess: to.Ptr(true),
	// 			PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
	// 			RegistrationNumber: &armbilling.AccountPropertiesRegistrationNumber{
	// 				Type: []*string{
	// 					to.Ptr("RegistrationNumber"),
	// 				},
	// 				ID: to.Ptr("RegistrationId"),
	// 			},
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountWithRegistrationNumberWithType.json
func ExampleAccountsClient_Get_billingAccountWithRegistrationNumberWithType() {
	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.NewAccountsClient().Get(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", 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.AccountsClientGetResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
	// 			AccountType: to.Ptr(armbilling.AccountTypeBusiness),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
	// 			DisplayName: to.Ptr("Premier Business Account"),
	// 			HasReadAccess: to.Ptr(true),
	// 			PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
	// 			RegistrationNumber: &armbilling.AccountPropertiesRegistrationNumber{
	// 				Type: []*string{
	// 					to.Ptr("TIN"),
	// 				},
	// 				ID: to.Ptr("SomeRegistrationId"),
	// 				Required: to.Ptr(true),
	// 			},
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountsGet.json
func ExampleAccountsClient_Get_billingAccountsGet() {
	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.NewAccountsClient().Get(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", 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.AccountsClientGetResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
	// 			AccountType: to.Ptr(armbilling.AccountTypeBusiness),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
	// 			DisplayName: to.Ptr("Premier Business Account"),
	// 			HasReadAccess: to.Ptr(true),
	// 			PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountsGetEA.json
func ExampleAccountsClient_Get_billingAccountsGetEa() {
	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.NewAccountsClient().Get(ctx, "6575495", 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.AccountsClientGetResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("6575495"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/6575495"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeEnterpriseAgreement),
	// 			EnrollmentDetails: &armbilling.AccountPropertiesEnrollmentDetails{
	// 				BillingCycle: to.Ptr("Monthly"),
	// 				Channel: to.Ptr("EaDirect"),
	// 				Cloud: to.Ptr("Azure Commercial"),
	// 				CountryCode: to.Ptr("US"),
	// 				Currency: to.Ptr("USD"),
	// 				EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-31T17:32:28Z"); return t}()),
	// 				ExtendedTermOption: to.Ptr(armbilling.ExtendedTermOptionOptedOut),
	// 				IndirectRelationshipInfo: &armbilling.EnrollmentDetailsIndirectRelationshipInfo{
	// 					BillingAccountName: to.Ptr("pcn.12345"),
	// 					BillingProfileName: to.Ptr(""),
	// 					DisplayName: to.Ptr("Test partner"),
	// 				},
	// 				InvoiceRecipient: to.Ptr("abc@contoso.com"),
	// 				MarkupStatus: to.Ptr(armbilling.MarkupStatusPublished),
	// 				StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-01T17:32:28Z"); return t}()),
	// 				SupportCoverage: to.Ptr("1/26/2021 - 6/30/2021"),
	// 				SupportLevel: to.Ptr(armbilling.SupportLevelStandard),
	// 				Language: to.Ptr("en"),
	// 			},
	// 			SoldTo: &armbilling.AccountPropertiesSoldTo{
	// 				AddressLine1: to.Ptr("Test Address"),
	// 				AddressLine2: to.Ptr("Test Address"),
	// 				AddressLine3: to.Ptr("Test Address"),
	// 				City: to.Ptr("City"),
	// 				Country: to.Ptr("US"),
	// 				PostalCode: to.Ptr("00000"),
	// 				Region: to.Ptr("WA"),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountsGetWithExpand.json
func ExampleAccountsClient_Get_billingAccountsGetWithExpand() {
	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.NewAccountsClient().Get(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", 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.AccountsClientGetResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
	// 			AccountType: to.Ptr(armbilling.AccountTypeBusiness),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
	// 			DisplayName: to.Ptr("Premier Business Account"),
	// 			HasReadAccess: to.Ptr(true),
	// 			PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
	// 			SoldTo: &armbilling.AccountPropertiesSoldTo{
	// 				AddressLine1: to.Ptr("1 Microsoft Way"),
	// 				City: to.Ptr("Redmond"),
	// 				CompanyName: to.Ptr("Contoso"),
	// 				Country: to.Ptr("US"),
	// 				IsValidAddress: to.Ptr(true),
	// 				PostalCode: to.Ptr("98052-8300"),
	// 				Region: to.Ptr("WA"),
	// 			},
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountForLegacyAccountDetails.json
func ExampleAccountsClient_NewListPager_billingAccountForLegacyAccountDetails() {
	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.NewAccountsClient().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 = armbilling.AccountsClientListResponse{
		// 	AccountListResult: armbilling.AccountListResult{
		// 		Value: []*armbilling.Account{
		// 			{
		// 				Name: to.Ptr("20000000-0000-0000-0000-000000000001"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/20000000-0000-0000-0000-000000000001"),
		// 				Properties: &armbilling.AccountProperties{
		// 					AccountStatus: to.Ptr(armbilling.AccountStatusActive),
		// 					AccountType: to.Ptr(armbilling.AccountTypeIndividual),
		// 					AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftOnlineServicesProgram),
		// 					DisplayName: to.Ptr("Individual Account 2"),
		// 					HasReadAccess: to.Ptr(true),
		// 					NotificationEmailAddress: to.Ptr("individual@domain.com"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingAccountsList.json
func ExampleAccountsClient_NewListPager_billingAccountsList() {
	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.NewAccountsClient().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 = armbilling.AccountsClientListResponse{
		// 	AccountListResult: armbilling.AccountListResult{
		// 		Value: []*armbilling.Account{
		// 			{
		// 				Name: to.Ptr("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Properties: &armbilling.AccountProperties{
		// 					AccountStatus: to.Ptr(armbilling.AccountStatusActive),
		// 					AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
		// 					AccountType: to.Ptr(armbilling.AccountTypeBusiness),
		// 					AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
		// 					DisplayName: to.Ptr("Premier Business Account"),
		// 					HasReadAccess: to.Ptr(true),
		// 					PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
		// 				},
		// 				SystemData: &armbilling.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("20000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/20000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Properties: &armbilling.AccountProperties{
		// 					AccountStatus: to.Ptr(armbilling.AccountStatusActive),
		// 					AccountSubType: to.Ptr(armbilling.AccountSubTypeProfessional),
		// 					AccountType: to.Ptr(armbilling.AccountTypeBusiness),
		// 					AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
		// 					DisplayName: to.Ptr("Standard Business Account"),
		// 					HasReadAccess: to.Ptr(true),
		// 					PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
		// 				},
		// 				SystemData: &armbilling.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("30000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/30000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Properties: &armbilling.AccountProperties{
		// 					AccountStatus: to.Ptr(armbilling.AccountStatusActive),
		// 					AccountSubType: to.Ptr(armbilling.AccountSubTypeIndividual),
		// 					AccountType: to.Ptr(armbilling.AccountTypeIndividual),
		// 					AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
		// 					DisplayName: to.Ptr("Individual Account"),
		// 					HasReadAccess: to.Ptr(true),
		// 					PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
		// 				},
		// 				SystemData: &armbilling.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("40000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/40000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
		// 				Properties: &armbilling.AccountProperties{
		// 					AccountStatus: to.Ptr(armbilling.AccountStatusActive),
		// 					AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
		// 					AccountType: to.Ptr(armbilling.AccountTypeBusiness),
		// 					AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftPartnerAgreement),
		// 					DisplayName: to.Ptr("Premier Business Account"),
		// 					HasReadAccess: to.Ptr(true),
		// 					PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
		// 				},
		// 				SystemData: &armbilling.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingAccountsListWithExpandForPONumber.json
func ExampleAccountsClient_NewListPager_billingAccountsListWithExpandForPoNumber() {
	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.NewAccountsClient().NewListPager(&armbilling.AccountsClientListOptions{
		Expand: to.Ptr("soldTo,enrollmentDetails/poNumber")})
	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.AccountsClientListResponse{
		// 	AccountListResult: armbilling.AccountListResult{
		// 		Value: []*armbilling.Account{
		// 			{
		// 				Name: to.Ptr("6564892"),
		// 				Type: to.Ptr("Microsoft.Billing/billingAccounts"),
		// 				ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/6564892"),
		// 				Properties: &armbilling.AccountProperties{
		// 					AccountStatus: to.Ptr(armbilling.AccountStatusActive),
		// 					AccountSubType: to.Ptr(armbilling.AccountSubTypeNone),
		// 					AccountType: to.Ptr(armbilling.AccountTypeEnterprise),
		// 					AgreementType: to.Ptr(armbilling.AgreementTypeEnterpriseAgreement),
		// 					DisplayName: to.Ptr("Enterprise Account"),
		// 					EnrollmentDetails: &armbilling.AccountPropertiesEnrollmentDetails{
		// 						BillingCycle: to.Ptr("Monthly"),
		// 						Channel: to.Ptr("EaDirect"),
		// 						Cloud: to.Ptr("Azure Commercial"),
		// 						CountryCode: to.Ptr("US"),
		// 						Currency: to.Ptr("USD"),
		// 						EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-31T17:32:28Z"); return t}()),
		// 						ExtendedTermOption: to.Ptr(armbilling.ExtendedTermOptionOptedOut),
		// 						PoNumber: to.Ptr("poNumber123"),
		// 						StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-01T17:32:28Z"); return t}()),
		// 						SupportCoverage: to.Ptr("1/26/2021 - 6/30/2021"),
		// 						SupportLevel: to.Ptr(armbilling.SupportLevelStandard),
		// 						Language: to.Ptr("en"),
		// 					},
		// 					HasReadAccess: to.Ptr(true),
		// 					SoldTo: &armbilling.AccountPropertiesSoldTo{
		// 						AddressLine1: to.Ptr("Test Address"),
		// 						City: to.Ptr("City"),
		// 						CompanyName: to.Ptr("Enterprise Company"),
		// 						Country: to.Ptr("US"),
		// 						PostalCode: to.Ptr("00000-1111"),
		// 						Region: to.Ptr("WA"),
		// 					},
		// 				},
		// 				SystemData: &armbilling.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/invoiceSectionsWithCreateSubscriptionPermissionList.json
func ExampleAccountsClient_NewListInvoiceSectionsByCreateSubscriptionPermissionPager() {
	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.NewAccountsClient().NewListInvoiceSectionsByCreateSubscriptionPermissionPager("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.AccountsClientListInvoiceSectionsByCreateSubscriptionPermissionResponse{
		// 	InvoiceSectionWithCreateSubPermissionListResult: armbilling.InvoiceSectionWithCreateSubPermissionListResult{
		// 		Value: []*armbilling.InvoiceSectionWithCreateSubPermission{
		// 			{
		// 				BillingProfileDisplayName: to.Ptr("Billing Profile Display Name"),
		// 				BillingProfileID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx"),
		// 				BillingProfileSpendingLimit: to.Ptr(armbilling.SpendingLimitOn),
		// 				BillingProfileStatus: to.Ptr(armbilling.BillingProfileStatusWarned),
		// 				BillingProfileStatusReasonCode: to.Ptr(armbilling.BillingProfileStatusReasonCodePastDue),
		// 				BillingProfileSystemID: to.Ptr("33000000-0000-0000-0000-000000000000"),
		// 				EnabledAzurePlans: []*armbilling.AzurePlan{
		// 					{
		// 						SKUDescription: to.Ptr("Microsoft Azure Plan"),
		// 						SKUID: to.Ptr("0001"),
		// 					},
		// 					{
		// 						SKUDescription: to.Ptr("Microsoft Azure Plan for DevTest"),
		// 						SKUID: to.Ptr("0002"),
		// 					},
		// 				},
		// 				InvoiceSectionDisplayName: to.Ptr("Invoice Section Display Name"),
		// 				InvoiceSectionID: 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"),
		// 				InvoiceSectionSystemID: to.Ptr("22000000-0000-0000-0000-000000000000"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-04-01/billingAccountUpdateWithPONumber.json
func ExampleAccountsClient_BeginUpdate_billingAccountUpdateWithPoNumber() {
	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)
	}
	poller, err := clientFactory.NewAccountsClient().BeginUpdate(ctx, "6575495", armbilling.AccountPatch{
		Properties: &armbilling.AccountProperties{
			EnrollmentDetails: &armbilling.AccountPropertiesEnrollmentDetails{
				PoNumber: to.Ptr("poNumber123"),
			},
		},
	}, 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 = armbilling.AccountsClientUpdateResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("6575495"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/6575495"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeNone),
	// 			AccountType: to.Ptr(armbilling.AccountTypeEnterprise),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeEnterpriseAgreement),
	// 			DisplayName: to.Ptr("Enterprise Account"),
	// 			EnrollmentDetails: &armbilling.AccountPropertiesEnrollmentDetails{
	// 				BillingCycle: to.Ptr("Monthly"),
	// 				Channel: to.Ptr("EaDirect"),
	// 				Cloud: to.Ptr("Azure Commercial"),
	// 				CountryCode: to.Ptr("US"),
	// 				Currency: to.Ptr("USD"),
	// 				EndDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-31T17:32:28Z"); return t}()),
	// 				ExtendedTermOption: to.Ptr(armbilling.ExtendedTermOptionOptedOut),
	// 				PoNumber: to.Ptr("poNumber123"),
	// 				StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-05-01T17:32:28Z"); return t}()),
	// 				SupportCoverage: to.Ptr("1/26/2021 - 6/30/2021"),
	// 				SupportLevel: to.Ptr(armbilling.SupportLevelStandard),
	// 				Language: to.Ptr("en"),
	// 			},
	// 			HasReadAccess: to.Ptr(true),
	// 			SoldTo: &armbilling.AccountPropertiesSoldTo{
	// 				AddressLine1: to.Ptr("Test Address"),
	// 				AddressLine2: to.Ptr("Test Address"),
	// 				AddressLine3: to.Ptr("Test Address"),
	// 				City: to.Ptr("City"),
	// 				Country: to.Ptr("US"),
	// 				PostalCode: to.Ptr("00000"),
	// 				Region: to.Ptr("WA"),
	// 			},
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/billingAccountsUpdate.json
func ExampleAccountsClient_BeginUpdate_billingAccountsUpdate() {
	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)
	}
	poller, err := clientFactory.NewAccountsClient().BeginUpdate(ctx, "10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", armbilling.AccountPatch{
		Properties: &armbilling.AccountProperties{
			DisplayName: to.Ptr("Test Account"),
			SoldTo: &armbilling.AccountPropertiesSoldTo{
				AddressLine1: to.Ptr("1 Microsoft Way"),
				City:         to.Ptr("Redmond"),
				CompanyName:  to.Ptr("Contoso"),
				Country:      to.Ptr("US"),
				PostalCode:   to.Ptr("98052-8300"),
				Region:       to.Ptr("WA"),
			},
		},
	}, 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 = armbilling.AccountsClientUpdateResponse{
	// 	Account: armbilling.Account{
	// 		Name: to.Ptr("10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Type: to.Ptr("Microsoft.Billing/billingAccounts"),
	// 		ID: to.Ptr("/providers/Microsoft.Billing/billingAccounts/10000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31"),
	// 		Properties: &armbilling.AccountProperties{
	// 			AccountStatus: to.Ptr(armbilling.AccountStatusActive),
	// 			AccountSubType: to.Ptr(armbilling.AccountSubTypeEnterprise),
	// 			AccountType: to.Ptr(armbilling.AccountTypeBusiness),
	// 			AgreementType: to.Ptr(armbilling.AgreementTypeMicrosoftCustomerAgreement),
	// 			DisplayName: to.Ptr("Premier Business Account"),
	// 			HasReadAccess: to.Ptr(true),
	// 			PrimaryBillingTenantID: to.Ptr("20000000-0000-0000-0000-000000000001"),
	// 			SoldTo: &armbilling.AccountPropertiesSoldTo{
	// 				AddressLine1: to.Ptr("1 Microsoft Way"),
	// 				City: to.Ptr("Redmond"),
	// 				CompanyName: to.Ptr("Contoso"),
	// 				Country: to.Ptr("US"),
	// 				IsValidAddress: to.Ptr(true),
	// 				PostalCode: to.Ptr("98052-8300"),
	// 				Region: to.Ptr("WA"),
	// 			},
	// 		},
	// 		SystemData: &armbilling.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-04T22:39:34.2606750Z"); return t}()),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/paymentTermInvalid.json
func ExampleAccountsClient_ValidatePaymentTerms_paymentTermInvalid() {
	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.NewAccountsClient().ValidatePaymentTerms(ctx, "00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", []*armbilling.PaymentTerm{
		{
			EndDate:   to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-25T22:39:34.2606750Z"); return t }()),
			StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-02-05T22:39:34.2606750Z"); return t }()),
			Term:      to.Ptr("net10"),
		},
	}, 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.AccountsClientValidatePaymentTermsResponse{
	// 	PaymentTermsEligibilityResult: armbilling.PaymentTermsEligibilityResult{
	// 		EligibilityDetails: []*armbilling.PaymentTermsEligibilityDetail{
	// 			{
	// 				Code: to.Ptr(armbilling.PaymentTermsEligibilityCodeInvalidDateRange),
	// 				Message: to.Ptr("The date range is invalid. The start date must be before the end date."),
	// 			},
	// 		},
	// 		EligibilityStatus: to.Ptr(armbilling.PaymentTermsEligibilityStatusInvalid),
	// 	},
	// }
}

// Generated from example definition: 2024-04-01/paymentTermValid.json
func ExampleAccountsClient_ValidatePaymentTerms_paymentTermValid() {
	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.NewAccountsClient().ValidatePaymentTerms(ctx, "00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31", []*armbilling.PaymentTerm{
		{
			EndDate:   to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-25T22:39:34.2606750Z"); return t }()),
			StartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-01-05T22:39:34.2606750Z"); return t }()),
			Term:      to.Ptr("net10"),
		},
	}, 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.AccountsClientValidatePaymentTermsResponse{
	// 	PaymentTermsEligibilityResult: armbilling.PaymentTermsEligibilityResult{
	// 		EligibilityStatus: to.Ptr(armbilling.PaymentTermsEligibilityStatusValid),
	// 	},
	// }
}
