// 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 armappcontainers_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/appcontainers/armappcontainers/v5"
	"log"
)

// Generated from example definition: 2025-10-02-preview/Builders_CreateOrUpdate.json
func ExampleBuildersClient_BeginCreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcontainers.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildersClient().BeginCreateOrUpdate(ctx, "rg", "testBuilder", armappcontainers.BuilderResource{
		Identity: &armappcontainers.ManagedServiceIdentity{
			Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
			UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
				"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {},
			},
		},
		Location: to.Ptr("eastus"),
		Properties: &armappcontainers.BuilderProperties{
			ContainerRegistries: []*armappcontainers.ContainerRegistry{
				{
					ContainerRegistryServer: to.Ptr("test.azurecr.io"),
					IdentityResourceID:      to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
				},
				{
					ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
					IdentityResourceID:      to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
				},
			},
			EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
		},
		Tags: map[string]*string{
			"company": to.Ptr("Microsoft"),
		},
	}, 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 = armappcontainers.BuildersClientCreateOrUpdateResponse{
	// 	BuilderResource: armappcontainers.BuilderResource{
	// 		Name: to.Ptr("testBuilder"),
	// 		Type: to.Ptr("Microsoft.App/builders"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder"),
	// 		Identity: &armappcontainers.ManagedServiceIdentity{
	// 			Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
	// 			PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
	// 				"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armappcontainers.UserAssignedIdentity{
	// 					ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				},
	// 			},
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armappcontainers.BuilderProperties{
	// 			ContainerRegistries: []*armappcontainers.ContainerRegistry{
	// 				{
	// 					ContainerRegistryServer: to.Ptr("test.azurecr.io"),
	// 					IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
	// 				},
	// 				{
	// 					ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
	// 					IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
	// 				},
	// 			},
	// 			EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
	// 			ProvisioningState: to.Ptr(armappcontainers.BuilderProvisioningStateSucceeded),
	// 		},
	// 		SystemData: &armappcontainers.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
	// 			CreatedBy: to.Ptr("sample@microsoft.com"),
	// 			CreatedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("sample@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"company": to.Ptr("Microsoft"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-10-02-preview/Builders_Delete.json
func ExampleBuildersClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcontainers.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildersClient().BeginDelete(ctx, "rg", "testBuilder", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
}

// Generated from example definition: 2025-10-02-preview/Builders_Get.json
func ExampleBuildersClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcontainers.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewBuildersClient().Get(ctx, "rg", "testBuilder", 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 = armappcontainers.BuildersClientGetResponse{
	// 	BuilderResource: armappcontainers.BuilderResource{
	// 		Name: to.Ptr("testBuilder"),
	// 		Type: to.Ptr("Microsoft.App/builders"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder"),
	// 		Identity: &armappcontainers.ManagedServiceIdentity{
	// 			Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
	// 			PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
	// 				"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armappcontainers.UserAssignedIdentity{
	// 					ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				},
	// 			},
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armappcontainers.BuilderProperties{
	// 			ContainerRegistries: []*armappcontainers.ContainerRegistry{
	// 				{
	// 					ContainerRegistryServer: to.Ptr("test.azurecr.io"),
	// 					IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
	// 				},
	// 				{
	// 					ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
	// 					IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
	// 				},
	// 			},
	// 			EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
	// 			ProvisioningState: to.Ptr(armappcontainers.BuilderProvisioningStateSucceeded),
	// 		},
	// 		SystemData: &armappcontainers.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
	// 			CreatedBy: to.Ptr("sample@microsoft.com"),
	// 			CreatedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("sample@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"key": to.Ptr("value"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-10-02-preview/Builders_ListByResourceGroup.json
func ExampleBuildersClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcontainers.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildersClient().NewListByResourceGroupPager("rg", 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 = armappcontainers.BuildersClientListByResourceGroupResponse{
		// 	BuilderCollection: armappcontainers.BuilderCollection{
		// 		Value: []*armappcontainers.BuilderResource{
		// 			{
		// 				Name: to.Ptr("testBuilder1"),
		// 				Type: to.Ptr("Microsoft.App/builders"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder1"),
		// 				Identity: &armappcontainers.ManagedServiceIdentity{
		// 					Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
		// 					PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
		// 						"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armappcontainers.UserAssignedIdentity{
		// 							ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 							PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						},
		// 					},
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armappcontainers.BuilderProperties{
		// 					ContainerRegistries: []*armappcontainers.ContainerRegistry{
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 					},
		// 					EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
		// 					ProvisioningState: to.Ptr(armappcontainers.BuilderProvisioningStateSucceeded),
		// 				},
		// 				SystemData: &armappcontainers.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					CreatedBy: to.Ptr("sample@microsoft.com"),
		// 					CreatedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("sample@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key": to.Ptr("value"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("testBuilder2"),
		// 				Type: to.Ptr("Microsoft.App/builders"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder2"),
		// 				Identity: &armappcontainers.ManagedServiceIdentity{
		// 					Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
		// 					PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
		// 						"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armappcontainers.UserAssignedIdentity{
		// 							ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 							PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						},
		// 					},
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armappcontainers.BuilderProperties{
		// 					ContainerRegistries: []*armappcontainers.ContainerRegistry{
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 					},
		// 					EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
		// 					ProvisioningState: to.Ptr(armappcontainers.BuilderProvisioningStateSucceeded),
		// 				},
		// 				SystemData: &armappcontainers.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					CreatedBy: to.Ptr("sample@microsoft.com"),
		// 					CreatedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("sample@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key": to.Ptr("value"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-10-02-preview/Builders_ListBySubscription.json
func ExampleBuildersClient_NewListBySubscriptionPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcontainers.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewBuildersClient().NewListBySubscriptionPager(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 = armappcontainers.BuildersClientListBySubscriptionResponse{
		// 	BuilderCollection: armappcontainers.BuilderCollection{
		// 		Value: []*armappcontainers.BuilderResource{
		// 			{
		// 				Name: to.Ptr("testBuilder1"),
		// 				Type: to.Ptr("Microsoft.App/builders"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.App/builders/testBuilder1"),
		// 				Identity: &armappcontainers.ManagedServiceIdentity{
		// 					Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
		// 					PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
		// 						"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armappcontainers.UserAssignedIdentity{
		// 							ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 							PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						},
		// 					},
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armappcontainers.BuilderProperties{
		// 					ContainerRegistries: []*armappcontainers.ContainerRegistry{
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 					},
		// 					EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
		// 					ProvisioningState: to.Ptr(armappcontainers.BuilderProvisioningStateSucceeded),
		// 				},
		// 				SystemData: &armappcontainers.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					CreatedBy: to.Ptr("sample@microsoft.com"),
		// 					CreatedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("sample@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key": to.Ptr("value"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("testBuilder2"),
		// 				Type: to.Ptr("Microsoft.App/builders"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg2/providers/Microsoft.App/builders/testBuilder2"),
		// 				Identity: &armappcontainers.ManagedServiceIdentity{
		// 					Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
		// 					PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 					UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
		// 						"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armappcontainers.UserAssignedIdentity{
		// 							ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 							PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 						},
		// 					},
		// 				},
		// 				Location: to.Ptr("eastus"),
		// 				Properties: &armappcontainers.BuilderProperties{
		// 					ContainerRegistries: []*armappcontainers.ContainerRegistry{
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 						{
		// 							ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
		// 							IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
		// 						},
		// 					},
		// 					EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
		// 					ProvisioningState: to.Ptr(armappcontainers.BuilderProvisioningStateSucceeded),
		// 				},
		// 				SystemData: &armappcontainers.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					CreatedBy: to.Ptr("sample@microsoft.com"),
		// 					CreatedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("sample@microsoft.com"),
		// 					LastModifiedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
		// 				},
		// 				Tags: map[string]*string{
		// 					"key": to.Ptr("value"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-10-02-preview/Builders_Update.json
func ExampleBuildersClient_BeginUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armappcontainers.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewBuildersClient().BeginUpdate(ctx, "rg", "testBuilder", armappcontainers.BuilderResourceUpdate{
		Tags: map[string]*string{
			"mytag1": to.Ptr("myvalue1"),
		},
	}, 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 = armappcontainers.BuildersClientUpdateResponse{
	// 	BuilderResource: armappcontainers.BuilderResource{
	// 		Name: to.Ptr("testBuilder"),
	// 		Type: to.Ptr("Microsoft.App/builders"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/builders/testBuilder"),
	// 		Identity: &armappcontainers.ManagedServiceIdentity{
	// 			Type: to.Ptr(armappcontainers.ManagedServiceIdentityTypeSystemAssignedUserAssigned),
	// 			PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 			UserAssignedIdentities: map[string]*armappcontainers.UserAssignedIdentity{
	// 				"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armappcontainers.UserAssignedIdentity{
	// 					ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 					PrincipalID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				},
	// 			},
	// 		},
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armappcontainers.BuilderProperties{
	// 			ContainerRegistries: []*armappcontainers.ContainerRegistry{
	// 				{
	// 					ContainerRegistryServer: to.Ptr("test.azurecr.io"),
	// 					IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
	// 				},
	// 				{
	// 					ContainerRegistryServer: to.Ptr("test2.azurecr.io"),
	// 					IdentityResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"),
	// 				},
	// 			},
	// 			EnvironmentID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv"),
	// 			ProvisioningState: to.Ptr(armappcontainers.BuilderProvisioningStateSucceeded),
	// 		},
	// 		SystemData: &armappcontainers.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
	// 			CreatedBy: to.Ptr("sample@microsoft.com"),
	// 			CreatedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-10-11T11:05:51.4940669Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("sample@microsoft.com"),
	// 			LastModifiedByType: to.Ptr(armappcontainers.CreatedByTypeUser),
	// 		},
	// 		Tags: map[string]*string{
	// 			"mytag1": to.Ptr("myvalue1"),
	// 		},
	// 	},
	// }
}
