// 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 armdiscovery_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/discovery/armdiscovery"
	"log"
)

// Generated from example definition: 2026-06-01/Workspaces_CreateOrUpdate_MaximumSet_Gen.json
func ExampleWorkspacesClient_BeginCreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdiscovery.NewClientFactory("A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginCreateOrUpdate(ctx, "rgdiscovery", "a55c900f32bf865be0", armdiscovery.Workspace{
		Properties: &armdiscovery.WorkspaceProperties{
			SupercomputerIDs: []*string{
				to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/supercomputers/supercomputer12"),
			},
			WorkspaceIdentity: &armdiscovery.Identity{
				ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedid1"),
			},
			CustomerManagedKeys: to.Ptr(armdiscovery.CustomerManagedKeysEnabled),
			KeyVaultProperties: &armdiscovery.KeyVaultProperties{
				KeyVaultURI: to.Ptr("https://microsoft.com/a"),
				KeyName:     to.Ptr("cdrnokqonyvfzot"),
				KeyVersion:  to.Ptr("pxfpvedkfuagtnk"),
			},
			LogAnalyticsClusterID:   to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.OperationalInsights/clusters/cluster1"),
			PublicNetworkAccess:     to.Ptr(armdiscovery.PublicNetworkAccessEnabled),
			AgentSubnetID:           to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/agentSubnet1"),
			PrivateEndpointSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/privateEndpointSubnet1"),
			WorkspaceSubnetID:       to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/workspaceSubnet1"),
		},
		Tags: map[string]*string{
			"key8931": to.Ptr("verirbmpdzupxkkeblzfq"),
		},
		Location: to.Ptr("uksouth"),
	}, 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 = armdiscovery.WorkspacesClientCreateOrUpdateResponse{
	// 	Workspace: armdiscovery.Workspace{
	// 		ID: to.Ptr("/subscriptions/A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/a55c900f32bf865be0"),
	// 		Name: to.Ptr("a55c900f32bf865be0"),
	// 		Tags: map[string]*string{
	// 			"key8931": to.Ptr("verirbmpdzupxkkeblzfq"),
	// 		},
	// 		Location: to.Ptr("uksouth"),
	// 		Type: to.Ptr("Microsoft.Discovery/workspaces"),
	// 		SystemData: &armdiscovery.SystemData{
	// 			CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
	// 			CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
	// 			LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 		},
	// 		Properties: &armdiscovery.WorkspaceProperties{
	// 			ProvisioningState: to.Ptr(armdiscovery.ProvisioningStateSucceeded),
	// 			SupercomputerIDs: []*string{
	// 				to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/supercomputers/supercomputer12"),
	// 			},
	// 			WorkspaceAPIURI: to.Ptr("https://microsoft.com/a"),
	// 			WorkspaceUIURI: to.Ptr("https://microsoft.com/aygn"),
	// 			WorkspaceIdentity: &armdiscovery.Identity{
	// 				ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedid1"),
	// 			},
	// 			CustomerManagedKeys: to.Ptr(armdiscovery.CustomerManagedKeysEnabled),
	// 			KeyVaultProperties: &armdiscovery.KeyVaultProperties{
	// 				KeyVaultURI: to.Ptr("https://microsoft.com/a"),
	// 				KeyName: to.Ptr("cdrnokqonyvfzot"),
	// 				KeyVersion: to.Ptr("pxfpvedkfuagtnk"),
	// 			},
	// 			LogAnalyticsClusterID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.OperationalInsights/clusters/cluster1"),
	// 			PrivateEndpointConnections: []*armdiscovery.PrivateEndpointConnection{
	// 				{
	// 					Properties: &armdiscovery.PrivateEndpointConnectionProperties{
	// 						GroupIDs: []*string{
	// 							to.Ptr("bpyliugtuio"),
	// 						},
	// 						PrivateEndpoint: &armdiscovery.PrivateEndpoint{
	// 							ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Network/privateEndpoints/privateEndpoint1"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armdiscovery.PrivateLinkServiceConnectionState{
	// 							Status: to.Ptr(armdiscovery.PrivateEndpointServiceConnectionStatusPending),
	// 							Description: to.Ptr("km"),
	// 							ActionsRequired: to.Ptr("xbshniighjomlygqk"),
	// 						},
	// 						ProvisioningState: to.Ptr(armdiscovery.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 					},
	// 					ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/workspaces1/privateEndpointConnections/privateEndpointConnection1"),
	// 					Name: to.Ptr("wdmo"),
	// 					Type: to.Ptr("qpcbcqayctbhbbtguk"),
	// 					SystemData: &armdiscovery.SystemData{
	// 						CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
	// 						CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
	// 						LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 					},
	// 				},
	// 			},
	// 			PublicNetworkAccess: to.Ptr(armdiscovery.PublicNetworkAccessEnabled),
	// 			AgentSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/agentSubnet1"),
	// 			PrivateEndpointSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/privateEndpointSubnet1"),
	// 			WorkspaceSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/workspaceSubnet1"),
	// 			ManagedResourceGroup: to.Ptr("nfsdgndlqwmeuhbadtztztggiybk"),
	// 			ManagedOnBehalfOfConfiguration: &armdiscovery.WithMoboBrokerResources{
	// 				MoboBrokerResources: []*armdiscovery.MoboBrokerResource{
	// 					{
	// 						ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Storage/storageAccounts/storage1"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-06-01/Workspaces_Delete_MaximumSet_Gen.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 := armdiscovery.NewClientFactory("A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginDelete(ctx, "rgdiscovery", "d70f215a9c483cbd5c", 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: 2026-06-01/Workspaces_Get_MaximumSet_Gen.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 := armdiscovery.NewClientFactory("A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkspacesClient().Get(ctx, "rgdiscovery", "7c14ca107f929876a0", 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 = armdiscovery.WorkspacesClientGetResponse{
	// 	Workspace: armdiscovery.Workspace{
	// 		ID: to.Ptr("/subscriptions/A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/7c14ca107f929876a0"),
	// 		Name: to.Ptr("7c14ca107f929876a0"),
	// 		Tags: map[string]*string{
	// 			"key8931": to.Ptr("verirbmpdzupxkkeblzfq"),
	// 		},
	// 		Location: to.Ptr("uksouth"),
	// 		Type: to.Ptr("Microsoft.Discovery/workspaces"),
	// 		SystemData: &armdiscovery.SystemData{
	// 			CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
	// 			CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
	// 			LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 		},
	// 		Properties: &armdiscovery.WorkspaceProperties{
	// 			ProvisioningState: to.Ptr(armdiscovery.ProvisioningStateSucceeded),
	// 			SupercomputerIDs: []*string{
	// 				to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/supercomputers/supercomputer12"),
	// 			},
	// 			WorkspaceAPIURI: to.Ptr("https://microsoft.com/a"),
	// 			WorkspaceUIURI: to.Ptr("https://microsoft.com/aygn"),
	// 			WorkspaceIdentity: &armdiscovery.Identity{
	// 				ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedid1"),
	// 			},
	// 			CustomerManagedKeys: to.Ptr(armdiscovery.CustomerManagedKeysEnabled),
	// 			KeyVaultProperties: &armdiscovery.KeyVaultProperties{
	// 				KeyVaultURI: to.Ptr("https://microsoft.com/a"),
	// 				KeyName: to.Ptr("cdrnokqonyvfzot"),
	// 				KeyVersion: to.Ptr("pxfpvedkfuagtnk"),
	// 			},
	// 			LogAnalyticsClusterID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.OperationalInsights/clusters/cluster1"),
	// 			PrivateEndpointConnections: []*armdiscovery.PrivateEndpointConnection{
	// 				{
	// 					Properties: &armdiscovery.PrivateEndpointConnectionProperties{
	// 						GroupIDs: []*string{
	// 							to.Ptr("bpyliugtuio"),
	// 						},
	// 						PrivateEndpoint: &armdiscovery.PrivateEndpoint{
	// 							ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Network/privateEndpoints/privateEndpoint1"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armdiscovery.PrivateLinkServiceConnectionState{
	// 							Status: to.Ptr(armdiscovery.PrivateEndpointServiceConnectionStatusPending),
	// 							Description: to.Ptr("km"),
	// 							ActionsRequired: to.Ptr("xbshniighjomlygqk"),
	// 						},
	// 						ProvisioningState: to.Ptr(armdiscovery.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 					},
	// 					ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/workspaces1/privateEndpointConnections/privateEndpointConnection1"),
	// 					Name: to.Ptr("wdmo"),
	// 					Type: to.Ptr("qpcbcqayctbhbbtguk"),
	// 					SystemData: &armdiscovery.SystemData{
	// 						CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
	// 						CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
	// 						LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 					},
	// 				},
	// 			},
	// 			PublicNetworkAccess: to.Ptr(armdiscovery.PublicNetworkAccessEnabled),
	// 			AgentSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/agentSubnet1"),
	// 			PrivateEndpointSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/privateEndpointSubnet1"),
	// 			WorkspaceSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/workspaceSubnet1"),
	// 			ManagedResourceGroup: to.Ptr("nfsdgndlqwmeuhbadtztztggiybk"),
	// 			ManagedOnBehalfOfConfiguration: &armdiscovery.WithMoboBrokerResources{
	// 				MoboBrokerResources: []*armdiscovery.MoboBrokerResource{
	// 					{
	// 						ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Storage/storageAccounts/storage1"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2026-06-01/Workspaces_ListByResourceGroup_MaximumSet_Gen.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 := armdiscovery.NewClientFactory("A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkspacesClient().NewListByResourceGroupPager("rgdiscovery", 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 = armdiscovery.WorkspacesClientListByResourceGroupResponse{
		// 	WorkspaceListResult: armdiscovery.WorkspaceListResult{
		// 		Value: []*armdiscovery.Workspace{
		// 			{
		// 				ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/Workspaces/czxofsezpcqwhqie"),
		// 				Name: to.Ptr("czxofsezpcqwhqie"),
		// 				Tags: map[string]*string{
		// 					"key8931": to.Ptr("verirbmpdzupxkkeblzfq"),
		// 				},
		// 				Location: to.Ptr("uksouth"),
		// 				Type: to.Ptr("Microsoft.Discovery/Workspaces"),
		// 				SystemData: &armdiscovery.SystemData{
		// 					CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
		// 					CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
		// 					LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 				},
		// 				Properties: &armdiscovery.WorkspaceProperties{
		// 					ProvisioningState: to.Ptr(armdiscovery.ProvisioningStateSucceeded),
		// 					SupercomputerIDs: []*string{
		// 						to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/supercomputers/supercomputer12"),
		// 					},
		// 					WorkspaceAPIURI: to.Ptr("https://microsoft.com/a"),
		// 					WorkspaceUIURI: to.Ptr("https://microsoft.com/aygn"),
		// 					WorkspaceIdentity: &armdiscovery.Identity{
		// 						ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedid1"),
		// 					},
		// 					CustomerManagedKeys: to.Ptr(armdiscovery.CustomerManagedKeysEnabled),
		// 					KeyVaultProperties: &armdiscovery.KeyVaultProperties{
		// 						KeyVaultURI: to.Ptr("https://microsoft.com/a"),
		// 						KeyName: to.Ptr("cdrnokqonyvfzot"),
		// 						KeyVersion: to.Ptr("pxfpvedkfuagtnk"),
		// 					},
		// 					LogAnalyticsClusterID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.OperationalInsights/clusters/cluster1"),
		// 					PrivateEndpointConnections: []*armdiscovery.PrivateEndpointConnection{
		// 						{
		// 							Properties: &armdiscovery.PrivateEndpointConnectionProperties{
		// 								GroupIDs: []*string{
		// 									to.Ptr("bpyliugtuio"),
		// 								},
		// 								PrivateEndpoint: &armdiscovery.PrivateEndpoint{
		// 									ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Network/privateEndpoints/privateEndpoint1"),
		// 								},
		// 								PrivateLinkServiceConnectionState: &armdiscovery.PrivateLinkServiceConnectionState{
		// 									Status: to.Ptr(armdiscovery.PrivateEndpointServiceConnectionStatusPending),
		// 									Description: to.Ptr("km"),
		// 									ActionsRequired: to.Ptr("xbshniighjomlygqk"),
		// 								},
		// 								ProvisioningState: to.Ptr(armdiscovery.PrivateEndpointConnectionProvisioningStateSucceeded),
		// 							},
		// 							ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/workspaces1/privateEndpointConnections/privateEndpointConnection1"),
		// 							Name: to.Ptr("wdmo"),
		// 							Type: to.Ptr("qpcbcqayctbhbbtguk"),
		// 							SystemData: &armdiscovery.SystemData{
		// 								CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
		// 								CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
		// 								LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 							},
		// 						},
		// 					},
		// 					PublicNetworkAccess: to.Ptr(armdiscovery.PublicNetworkAccessEnabled),
		// 					AgentSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/agentSubnet1"),
		// 					PrivateEndpointSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/privateEndpointSubnet1"),
		// 					WorkspaceSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/workspaceSubnet1"),
		// 					ManagedResourceGroup: to.Ptr("nfsdgndlqwmeuhbadtztztggiybk"),
		// 					ManagedOnBehalfOfConfiguration: &armdiscovery.WithMoboBrokerResources{
		// 						MoboBrokerResources: []*armdiscovery.MoboBrokerResource{
		// 							{
		// 								ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Storage/storageAccounts/storage1"),
		// 							},
		// 						},
		// 					},
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2026-06-01/Workspaces_ListBySubscription_MaximumSet_Gen.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 := armdiscovery.NewClientFactory("A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4", 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 = armdiscovery.WorkspacesClientListBySubscriptionResponse{
		// 	WorkspaceListResult: armdiscovery.WorkspaceListResult{
		// 		Value: []*armdiscovery.Workspace{
		// 			{
		// 				ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/Workspaces/czxofsezpcqwhqie"),
		// 				Name: to.Ptr("czxofsezpcqwhqie"),
		// 				Tags: map[string]*string{
		// 					"key8931": to.Ptr("verirbmpdzupxkkeblzfq"),
		// 				},
		// 				Location: to.Ptr("uksouth"),
		// 				Type: to.Ptr("Microsoft.Discovery/Workspaces"),
		// 				SystemData: &armdiscovery.SystemData{
		// 					CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
		// 					CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
		// 					LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 				},
		// 				Properties: &armdiscovery.WorkspaceProperties{
		// 					ProvisioningState: to.Ptr(armdiscovery.ProvisioningStateSucceeded),
		// 					SupercomputerIDs: []*string{
		// 						to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/supercomputers/supercomputer12"),
		// 					},
		// 					WorkspaceAPIURI: to.Ptr("https://microsoft.com/a"),
		// 					WorkspaceUIURI: to.Ptr("https://microsoft.com/aygn"),
		// 					WorkspaceIdentity: &armdiscovery.Identity{
		// 						ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedid1"),
		// 					},
		// 					CustomerManagedKeys: to.Ptr(armdiscovery.CustomerManagedKeysEnabled),
		// 					KeyVaultProperties: &armdiscovery.KeyVaultProperties{
		// 						KeyVaultURI: to.Ptr("https://microsoft.com/a"),
		// 						KeyName: to.Ptr("cdrnokqonyvfzot"),
		// 						KeyVersion: to.Ptr("pxfpvedkfuagtnk"),
		// 					},
		// 					LogAnalyticsClusterID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.OperationalInsights/clusters/cluster1"),
		// 					PrivateEndpointConnections: []*armdiscovery.PrivateEndpointConnection{
		// 						{
		// 							Properties: &armdiscovery.PrivateEndpointConnectionProperties{
		// 								GroupIDs: []*string{
		// 									to.Ptr("bpyliugtuio"),
		// 								},
		// 								PrivateEndpoint: &armdiscovery.PrivateEndpoint{
		// 									ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Network/privateEndpoints/privateEndpoint1"),
		// 								},
		// 								PrivateLinkServiceConnectionState: &armdiscovery.PrivateLinkServiceConnectionState{
		// 									Status: to.Ptr(armdiscovery.PrivateEndpointServiceConnectionStatusPending),
		// 									Description: to.Ptr("km"),
		// 									ActionsRequired: to.Ptr("xbshniighjomlygqk"),
		// 								},
		// 								ProvisioningState: to.Ptr(armdiscovery.PrivateEndpointConnectionProvisioningStateSucceeded),
		// 							},
		// 							ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/workspaces1/privateEndpointConnections/privateEndpointConnection1"),
		// 							Name: to.Ptr("wdmo"),
		// 							Type: to.Ptr("qpcbcqayctbhbbtguk"),
		// 							SystemData: &armdiscovery.SystemData{
		// 								CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
		// 								CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 								CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 								LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
		// 								LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
		// 								LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
		// 							},
		// 						},
		// 					},
		// 					PublicNetworkAccess: to.Ptr(armdiscovery.PublicNetworkAccessEnabled),
		// 					AgentSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/agentSubnet1"),
		// 					PrivateEndpointSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/privateEndpointSubnet1"),
		// 					WorkspaceSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/workspaceSubnet1"),
		// 					ManagedResourceGroup: to.Ptr("nfsdgndlqwmeuhbadtztztggiybk"),
		// 					ManagedOnBehalfOfConfiguration: &armdiscovery.WithMoboBrokerResources{
		// 						MoboBrokerResources: []*armdiscovery.MoboBrokerResource{
		// 							{
		// 								ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Storage/storageAccounts/storage1"),
		// 							},
		// 						},
		// 					},
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2026-06-01/Workspaces_Update_MaximumSet_Gen.json
func ExampleWorkspacesClient_BeginUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdiscovery.NewClientFactory("A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkspacesClient().BeginUpdate(ctx, "rgdiscovery", "0b14055ab26dbe3f27", armdiscovery.Workspace{
		Properties: &armdiscovery.WorkspaceProperties{
			SupercomputerIDs: []*string{
				to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/supercomputers/supercomputer12"),
			},
			KeyVaultProperties: &armdiscovery.KeyVaultProperties{
				KeyName:    to.Ptr("lcbvobtzwghifm"),
				KeyVersion: to.Ptr("vlwzjsyqztmmxdbc"),
			},
			PublicNetworkAccess: to.Ptr(armdiscovery.PublicNetworkAccessEnabled),
		},
		Tags: map[string]*string{
			"key133": to.Ptr("q"),
		},
	}, 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 = armdiscovery.WorkspacesClientUpdateResponse{
	// 	Workspace: armdiscovery.Workspace{
	// 		ID: to.Ptr("/subscriptions/A54D43BD-2F5F-4BB1-95D4-9A8D23CC7DD4/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/0b14055ab26dbe3f27"),
	// 		Name: to.Ptr("0b14055ab26dbe3f27"),
	// 		Tags: map[string]*string{
	// 			"key8931": to.Ptr("verirbmpdzupxkkeblzfq"),
	// 		},
	// 		Location: to.Ptr("uksouth"),
	// 		Type: to.Ptr("Microsoft.Discovery/workspaces"),
	// 		SystemData: &armdiscovery.SystemData{
	// 			CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
	// 			CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
	// 			LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 		},
	// 		Properties: &armdiscovery.WorkspaceProperties{
	// 			ProvisioningState: to.Ptr(armdiscovery.ProvisioningStateSucceeded),
	// 			SupercomputerIDs: []*string{
	// 				to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/supercomputers/supercomputer12"),
	// 			},
	// 			WorkspaceAPIURI: to.Ptr("https://microsoft.com/a"),
	// 			WorkspaceUIURI: to.Ptr("https://microsoft.com/aygn"),
	// 			WorkspaceIdentity: &armdiscovery.Identity{
	// 				ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.ManagedIdentity/userAssignedIdentities/managedid1"),
	// 			},
	// 			CustomerManagedKeys: to.Ptr(armdiscovery.CustomerManagedKeysEnabled),
	// 			KeyVaultProperties: &armdiscovery.KeyVaultProperties{
	// 				KeyVaultURI: to.Ptr("https://microsoft.com/a"),
	// 				KeyName: to.Ptr("lcbvobtzwghifm"),
	// 				KeyVersion: to.Ptr("vlwzjsyqztmmxdbc"),
	// 			},
	// 			LogAnalyticsClusterID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.OperationalInsights/clusters/cluster1"),
	// 			PrivateEndpointConnections: []*armdiscovery.PrivateEndpointConnection{
	// 				{
	// 					Properties: &armdiscovery.PrivateEndpointConnectionProperties{
	// 						GroupIDs: []*string{
	// 							to.Ptr("bpyliugtuio"),
	// 						},
	// 						PrivateEndpoint: &armdiscovery.PrivateEndpoint{
	// 							ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Network/privateEndpoints/privateEndpoint1"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armdiscovery.PrivateLinkServiceConnectionState{
	// 							Status: to.Ptr(armdiscovery.PrivateEndpointServiceConnectionStatusPending),
	// 							Description: to.Ptr("km"),
	// 							ActionsRequired: to.Ptr("xbshniighjomlygqk"),
	// 						},
	// 						ProvisioningState: to.Ptr(armdiscovery.PrivateEndpointConnectionProvisioningStateSucceeded),
	// 					},
	// 					ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/resourceGroups/rgdiscovery/providers/Microsoft.Discovery/workspaces/workspaces1/privateEndpointConnections/privateEndpointConnection1"),
	// 					Name: to.Ptr("wdmo"),
	// 					Type: to.Ptr("qpcbcqayctbhbbtguk"),
	// 					SystemData: &armdiscovery.SystemData{
	// 						CreatedBy: to.Ptr("uymdmmhvojuqtvvxokgefohqpcjw"),
	// 						CreatedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 						CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 						LastModifiedBy: to.Ptr("ucuttxilomgszapozsuit"),
	// 						LastModifiedByType: to.Ptr(armdiscovery.CreatedByTypeUser),
	// 						LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2026-05-04T11:59:49.804Z"); return t}()),
	// 					},
	// 				},
	// 			},
	// 			PublicNetworkAccess: to.Ptr(armdiscovery.PublicNetworkAccessEnabled),
	// 			AgentSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/agentSubnet1"),
	// 			PrivateEndpointSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/privateEndpointSubnet1"),
	// 			WorkspaceSubnetID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Network/virtualNetworks/virtualnetwork1/subnets/workspaceSubnet1"),
	// 			ManagedResourceGroup: to.Ptr("nfsdgndlqwmeuhbadtztztggiybk"),
	// 			ManagedOnBehalfOfConfiguration: &armdiscovery.WithMoboBrokerResources{
	// 				MoboBrokerResources: []*armdiscovery.MoboBrokerResource{
	// 					{
	// 						ID: to.Ptr("/subscriptions/31735C59-6307-4464-8B80-3675223F23D2/providers/Microsoft.Storage/storageAccounts/storage1"),
	// 					},
	// 				},
	// 			},
	// 		},
	// 	},
	// }
}
