// 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 armonlineexperimentation_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/onlineexperimentation/armonlineexperimentation"
	"log"
)

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_CreateOrUpdate.json
func ExampleWorkspacesClient_BeginCreateOrUpdate_createOrUpdateAnOnlineExperimentationWorkspaceWithFreeSku() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "res9871", "expworkspace7", armonlineexperimentation.Workspace{
		Location: to.Ptr("eastus2"),
		Tags: map[string]*string{
			"newKey": to.Ptr("newVal"),
		},
		Properties: &armonlineexperimentation.WorkspaceProperties{
			LogAnalyticsWorkspaceResourceID:      to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
			AppConfigurationResourceID:           to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
		},
		Identity: &armonlineexperimentation.ManagedServiceIdentity{
			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
			},
		},
		SKU: &armonlineexperimentation.WorkspaceSKU{
			Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		},
	}, 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 pull 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 = armonlineexperimentation.WorkspacesClientCreateOrUpdateResponse{
	// 	Workspace: &armonlineexperimentation.Workspace{
	// 		ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace7"),
	// 		Name: to.Ptr("expworkspace7"),
	// 		Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
	// 		Location: to.Ptr("eastus2"),
	// 		Tags: map[string]*string{
	// 			"newKey": to.Ptr("newVal"),
	// 		},
	// 		Properties: &armonlineexperimentation.WorkspaceProperties{
	// 			WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c351"),
	// 			ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
	// 			LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
	// 			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
	// 			AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
	// 			Endpoint: to.Ptr("https://expworkspace7.eastus2.exp.azure.net"),
	// 		},
	// 		Identity: &armonlineexperimentation.ManagedServiceIdentity{
	// 			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 					PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 				},
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
	// 					PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armonlineexperimentation.WorkspaceSKU{
	// 			Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
	// 			Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_CreateOrUpdateWithEncryption.json
func ExampleWorkspacesClient_BeginCreateOrUpdate_createOrUpdateAnOnlineExperimentationWorkspaceWithFreeSkuAndCustomerManagedKey() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "res9871", "expworkspace7", armonlineexperimentation.Workspace{
		Location: to.Ptr("eastus2"),
		Tags: map[string]*string{
			"newKey": to.Ptr("newVal"),
		},
		Properties: &armonlineexperimentation.WorkspaceProperties{
			LogAnalyticsWorkspaceResourceID:      to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
			AppConfigurationResourceID:           to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
			Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
				CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
					KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
						IdentityType:                   to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
						UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
					},
					KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
				},
			},
		},
		Identity: &armonlineexperimentation.ManagedServiceIdentity{
			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
			},
		},
		SKU: &armonlineexperimentation.WorkspaceSKU{
			Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		},
	}, 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 pull 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 = armonlineexperimentation.WorkspacesClientCreateOrUpdateResponse{
	// 	Workspace: &armonlineexperimentation.Workspace{
	// 		ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace7"),
	// 		Name: to.Ptr("expworkspace7"),
	// 		Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
	// 		Location: to.Ptr("eastus2"),
	// 		Tags: map[string]*string{
	// 			"newKey": to.Ptr("newVal"),
	// 		},
	// 		Properties: &armonlineexperimentation.WorkspaceProperties{
	// 			WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c351"),
	// 			ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
	// 			LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
	// 			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
	// 			AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
	// 			Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
	// 				CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
	// 					KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
	// 						IdentityType: to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
	// 						UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
	// 					},
	// 					KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
	// 				},
	// 			},
	// 			Endpoint: to.Ptr("https://expworkspace7.eastus2.exp.azure.net"),
	// 		},
	// 		Identity: &armonlineexperimentation.ManagedServiceIdentity{
	// 			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 					PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 				},
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
	// 					PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armonlineexperimentation.WorkspaceSKU{
	// 			Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
	// 			Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_Delete.json
func ExampleWorkspacesClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginDelete(ctx, "res9871", "expworkspace3", 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 pull the result: %v", err)
	}
}

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_Get.json
func ExampleWorkspacesClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Get(ctx, "res9871", "expworkspace3", 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 = armonlineexperimentation.WorkspacesClientGetResponse{
	// 	Workspace: &armonlineexperimentation.Workspace{
	// 		ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
	// 		Name: to.Ptr("expworkspace3"),
	// 		Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
	// 		Location: to.Ptr("westus2"),
	// 		Properties: &armonlineexperimentation.WorkspaceProperties{
	// 			WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
	// 			ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
	// 			LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
	// 			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
	// 			AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
	// 			Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
	// 		},
	// 		Identity: &armonlineexperimentation.ManagedServiceIdentity{
	// 			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 					PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 				},
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
	// 					PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armonlineexperimentation.WorkspaceSKU{
	// 			Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
	// 			Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_ListByResourceGroup.json
func ExampleWorkspacesClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("res9871", 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 = armonlineexperimentation.WorkspacesClientListByResourceGroupResponse{
		// 	WorkspaceListResult: armonlineexperimentation.WorkspaceListResult{
		// 		Value: []*armonlineexperimentation.Workspace{
		// 			{
		// 				ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
		// 				Name: to.Ptr("expworkspace3"),
		// 				Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
		// 				Location: to.Ptr("westus2"),
		// 				Properties: &armonlineexperimentation.WorkspaceProperties{
		// 					WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
		// 					ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
		// 					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
		// 					LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
		// 					AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
		// 					Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
		// 				},
		// 				Identity: &armonlineexperimentation.ManagedServiceIdentity{
		// 					Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
		// 							PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
		// 						},
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
		// 							PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armonlineexperimentation.WorkspaceSKU{
		// 					Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		// 					Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace2"),
		// 				Name: to.Ptr("expworkspace2"),
		// 				Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
		// 				Location: to.Ptr("westus2"),
		// 				Properties: &armonlineexperimentation.WorkspaceProperties{
		// 					WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c357"),
		// 					ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
		// 					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
		// 					LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
		// 					AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
		// 					Endpoint: to.Ptr("https://expworkspace2.westus2.exp.azure.net"),
		// 				},
		// 				Identity: &armonlineexperimentation.ManagedServiceIdentity{
		// 					Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
		// 							PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
		// 						},
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
		// 							PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armonlineexperimentation.WorkspaceSKU{
		// 					Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		// 					Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_ListBySubscription.json
func ExampleWorkspacesClient_NewListBySubscriptionPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspacesClient().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 = armonlineexperimentation.WorkspacesClientListBySubscriptionResponse{
		// 	WorkspaceListResult: armonlineexperimentation.WorkspaceListResult{
		// 		Value: []*armonlineexperimentation.Workspace{
		// 			{
		// 				ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
		// 				Name: to.Ptr("expworkspace3"),
		// 				Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
		// 				Location: to.Ptr("westus2"),
		// 				Properties: &armonlineexperimentation.WorkspaceProperties{
		// 					WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c352"),
		// 					ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
		// 					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
		// 					LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
		// 					AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
		// 					Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
		// 				},
		// 				Identity: &armonlineexperimentation.ManagedServiceIdentity{
		// 					Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
		// 							PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
		// 						},
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
		// 							PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armonlineexperimentation.WorkspaceSKU{
		// 					Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		// 					Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace2"),
		// 				Name: to.Ptr("expworkspace2"),
		// 				Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
		// 				Location: to.Ptr("westus2"),
		// 				Properties: &armonlineexperimentation.WorkspaceProperties{
		// 					WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c353"),
		// 					ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
		// 					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
		// 					LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
		// 					AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
		// 					Endpoint: to.Ptr("https://expworkspace2.westus2.exp.azure.net"),
		// 				},
		// 				Identity: &armonlineexperimentation.ManagedServiceIdentity{
		// 					Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
		// 							PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
		// 						},
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
		// 							PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armonlineexperimentation.WorkspaceSKU{
		// 					Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		// 					Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace4"),
		// 				Name: to.Ptr("expworkspace4"),
		// 				Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
		// 				Location: to.Ptr("westus2"),
		// 				Properties: &armonlineexperimentation.WorkspaceProperties{
		// 					WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c354"),
		// 					ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
		// 					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
		// 					LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
		// 					AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
		// 					Endpoint: to.Ptr("https://expworkspace4.westus2.exp.azure.net"),
		// 				},
		// 				Identity: &armonlineexperimentation.ManagedServiceIdentity{
		// 					Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
		// 							PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
		// 						},
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
		// 							PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armonlineexperimentation.WorkspaceSKU{
		// 					Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		// 					Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace5"),
		// 				Name: to.Ptr("expworkspace5"),
		// 				Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
		// 				Location: to.Ptr("westus2"),
		// 				Properties: &armonlineexperimentation.WorkspaceProperties{
		// 					WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c354"),
		// 					ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
		// 					LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
		// 					LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
		// 					AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
		// 					Endpoint: to.Ptr("https://expworkspace5.westus2.exp.azure.net"),
		// 				},
		// 				Identity: &armonlineexperimentation.ManagedServiceIdentity{
		// 					Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
		// 					UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
		// 							PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
		// 						},
		// 						"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
		// 							ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
		// 							PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
		// 						},
		// 					},
		// 				},
		// 				SKU: &armonlineexperimentation.WorkspaceSKU{
		// 					Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
		// 					Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_Update.json
func ExampleWorkspacesClient_BeginUpdate_updateAnOnlineExperimentationWorkspace() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginUpdate(ctx, "res9871", "expworkspace3", armonlineexperimentation.WorkspacePatch{
		Tags: map[string]*string{
			"newKey": to.Ptr("newVal"),
		},
		Identity: &armonlineexperimentation.ManagedServiceIdentity{
			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
			},
		},
	}, 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 pull 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 = armonlineexperimentation.WorkspacesClientUpdateResponse{
	// 	Workspace: &armonlineexperimentation.Workspace{
	// 		ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
	// 		Name: to.Ptr("expworkspace3"),
	// 		Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
	// 		Location: to.Ptr("westus2"),
	// 		Tags: map[string]*string{
	// 			"supportTeam": to.Ptr("someteam@microsoft.com"),
	// 			"newKey": to.Ptr("newVal"),
	// 		},
	// 		Properties: &armonlineexperimentation.WorkspaceProperties{
	// 			WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
	// 			ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
	// 			LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
	// 			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
	// 			AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
	// 			Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
	// 		},
	// 		Identity: &armonlineexperimentation.ManagedServiceIdentity{
	// 			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 					PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 				},
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
	// 					PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armonlineexperimentation.WorkspaceSKU{
	// 			Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
	// 			Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-05-31-preview/OnlineExperimentationWorkspaces_UpdateWithEncryption.json
func ExampleWorkspacesClient_BeginUpdate_updateAnOnlineExperimentationWorkspaceWithCustomerManagedEncryptionKey() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armonlineexperimentation.NewClientFactory("fa5fc227-a624-475e-b696-cdd604c735bc", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginUpdate(ctx, "res9871", "expworkspace3", armonlineexperimentation.WorkspacePatch{
		Tags: map[string]*string{
			"newKey": to.Ptr("newVal"),
		},
		Identity: &armonlineexperimentation.ManagedServiceIdentity{
			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
			},
		},
		Properties: &armonlineexperimentation.WorkspacePatchProperties{
			LogAnalyticsWorkspaceResourceID:      to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
			Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
				CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
					KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
						IdentityType:                   to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
						UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
					},
					KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
				},
			},
		},
	}, 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 pull 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 = armonlineexperimentation.WorkspacesClientUpdateResponse{
	// 	Workspace: &armonlineexperimentation.Workspace{
	// 		ID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OnlineExperimentation/workspaces/expworkspace3"),
	// 		Name: to.Ptr("expworkspace3"),
	// 		Type: to.Ptr("Microsoft.OnlineExperimentation/workspaces"),
	// 		Location: to.Ptr("westus2"),
	// 		Tags: map[string]*string{
	// 			"supportTeam": to.Ptr("someteam@microsoft.com"),
	// 			"newKey": to.Ptr("newVal"),
	// 		},
	// 		Properties: &armonlineexperimentation.WorkspaceProperties{
	// 			WorkspaceID: to.Ptr("02270d43-f68a-401b-b526-86942525c350"),
	// 			ProvisioningState: to.Ptr(armonlineexperimentation.ResourceProvisioningStateSucceeded),
	// 			LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.OperationalInsights/workspaces/log9871"),
	// 			LogsExporterStorageAccountResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto9871"),
	// 			AppConfigurationResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/res9871/providers/Microsoft.AppConfiguration/configurationStores/appconfig9871"),
	// 			Encryption: &armonlineexperimentation.ResourceEncryptionConfiguration{
	// 				CustomerManagedKeyEncryption: &armonlineexperimentation.CustomerManagedKeyEncryption{
	// 					KeyEncryptionKeyIdentity: &armonlineexperimentation.KeyEncryptionKeyIdentity{
	// 						IdentityType: to.Ptr(armonlineexperimentation.KeyEncryptionKeyIdentityTypeUserAssignedIdentity),
	// 						UserAssignedIdentityResourceID: to.Ptr("/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
	// 					},
	// 					KeyEncryptionKeyURL: to.Ptr("https://contosovault.vault.azure.net/keys/contosokek"),
	// 				},
	// 			},
	// 			Endpoint: to.Ptr("https://expworkspace3.westus2.exp.azure.net"),
	// 		},
	// 		Identity: &armonlineexperimentation.ManagedServiceIdentity{
	// 			Type: to.Ptr(armonlineexperimentation.ManagedServiceIdentityTypeUserAssigned),
	// 			UserAssignedIdentities: map[string]*armonlineexperimentation.UserAssignedIdentity{
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("fbe75b66-01c5-4f87-a220-233af3270436"),
	// 					PrincipalID: to.Ptr("075a0ca6-43f6-4434-9abf-c9b1b79f9219"),
	// 				},
	// 				"/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/eu2cgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armonlineexperimentation.UserAssignedIdentity{
	// 					ClientID: to.Ptr("47429305-c0d3-40bc-8595-61946c4df3dc"),
	// 					PrincipalID: to.Ptr("bf9ebbc8-b92d-4752-8e66-c999000326e0"),
	// 				},
	// 			},
	// 		},
	// 		SKU: &armonlineexperimentation.WorkspaceSKU{
	// 			Name: to.Ptr(armonlineexperimentation.WorkspaceSKUNameF0),
	// 			Tier: to.Ptr(armonlineexperimentation.WorkspaceSKUTierFree),
	// 		},
	// 	},
	// }
}
