// 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 armavs_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/avs/armavs/v2"
	"log"
)

// Generated from example definition: 2024-09-01/WorkloadNetworks_CreateDnsService.json
func ExampleWorkloadNetworksClient_BeginCreateDNSService() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateDNSService(ctx, "group1", "cloud1", "dnsService1", armavs.WorkloadNetworkDNSService{
		Properties: &armavs.WorkloadNetworkDNSServiceProperties{
			DisplayName:    to.Ptr("dnsService1"),
			DNSServiceIP:   to.Ptr("5.5.5.5"),
			DefaultDNSZone: to.Ptr("defaultDnsZone1"),
			FqdnZones: []*string{
				to.Ptr("fqdnZone1"),
			},
			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientCreateDNSServiceResponse{
	// 	WorkloadNetworkDNSService: &armavs.WorkloadNetworkDNSService{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
	// 		Name: to.Ptr("dnsService1"),
	// 		Properties: &armavs.WorkloadNetworkDNSServiceProperties{
	// 			DisplayName: to.Ptr("dnsService1"),
	// 			DNSServiceIP: to.Ptr("5.5.5.5"),
	// 			DefaultDNSZone: to.Ptr("defaultDnsZone1"),
	// 			FqdnZones: []*string{
	// 				to.Ptr("fqdnZone1"),
	// 			},
	// 			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
	// 			Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_CreateDnsZone.json
func ExampleWorkloadNetworksClient_BeginCreateDNSZone() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateDNSZone(ctx, "group1", "cloud1", "dnsZone1", armavs.WorkloadNetworkDNSZone{
		Properties: &armavs.WorkloadNetworkDNSZoneProperties{
			DisplayName: to.Ptr("dnsZone1"),
			Domain:      []*string{},
			DNSServerIPs: []*string{
				to.Ptr("1.1.1.1"),
			},
			SourceIP: to.Ptr("8.8.8.8"),
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientCreateDNSZoneResponse{
	// 	WorkloadNetworkDNSZone: &armavs.WorkloadNetworkDNSZone{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
	// 		Name: to.Ptr("dnsZone1"),
	// 		Properties: &armavs.WorkloadNetworkDNSZoneProperties{
	// 			DisplayName: to.Ptr("dnsZone1"),
	// 			Domain: []*string{
	// 			},
	// 			DNSServerIPs: []*string{
	// 				to.Ptr("1.1.1.1"),
	// 			},
	// 			SourceIP: to.Ptr("8.8.8.8"),
	// 			DNSServices: to.Ptr[int64](0),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_CreateDhcp.json
func ExampleWorkloadNetworksClient_BeginCreateDhcp() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateDhcp(ctx, "group1", "cloud1", "dhcp1", armavs.WorkloadNetworkDhcp{
		Properties: &armavs.WorkloadNetworkDhcpServer{
			DhcpType:      to.Ptr(armavs.DhcpTypeEnumSERVER),
			DisplayName:   to.Ptr("dhcpConfigurations1"),
			ServerAddress: to.Ptr("40.1.5.1/24"),
			LeaseTime:     to.Ptr[int64](86400),
			Revision:      to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientCreateDhcpResponse{
	// 	WorkloadNetworkDhcp: &armavs.WorkloadNetworkDhcp{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
	// 		Name: to.Ptr("dhcp1"),
	// 		Properties: &armavs.WorkloadNetworkDhcpServer{
	// 			DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
	// 			DisplayName: to.Ptr("dhcpConfigurations1"),
	// 			Segments: []*string{
	// 				to.Ptr("segment1"),
	// 				to.Ptr("segment2"),
	// 			},
	// 			ServerAddress: to.Ptr("40.1.5.1/24"),
	// 			LeaseTime: to.Ptr[int64](86400),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_CreatePortMirroring.json
func ExampleWorkloadNetworksClient_BeginCreatePortMirroring() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreatePortMirroring(ctx, "group1", "cloud1", "portMirroring1", armavs.WorkloadNetworkPortMirroring{
		Properties: &armavs.WorkloadNetworkPortMirroringProperties{
			DisplayName: to.Ptr("portMirroring1"),
			Direction:   to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
			Source:      to.Ptr("vmGroup1"),
			Destination: to.Ptr("vmGroup2"),
			Revision:    to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientCreatePortMirroringResponse{
	// 	WorkloadNetworkPortMirroring: &armavs.WorkloadNetworkPortMirroring{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
	// 		Name: to.Ptr("portMirroring1"),
	// 		Properties: &armavs.WorkloadNetworkPortMirroringProperties{
	// 			DisplayName: to.Ptr("portMirroring1"),
	// 			Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
	// 			Source: to.Ptr("vmGroup1"),
	// 			Destination: to.Ptr("vmGroup2"),
	// 			Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_CreatePublicIP.json
func ExampleWorkloadNetworksClient_BeginCreatePublicIP() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreatePublicIP(ctx, "group1", "cloud1", "publicIP1", armavs.WorkloadNetworkPublicIP{
		Properties: &armavs.WorkloadNetworkPublicIPProperties{
			DisplayName:       to.Ptr("publicIP1"),
			NumberOfPublicIPs: to.Ptr[int64](32),
		},
	}, 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 = armavs.WorkloadNetworksClientCreatePublicIPResponse{
	// 	WorkloadNetworkPublicIP: &armavs.WorkloadNetworkPublicIP{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1"),
	// 		Name: to.Ptr("publicIP1"),
	// 		Properties: &armavs.WorkloadNetworkPublicIPProperties{
	// 			DisplayName: to.Ptr("publicIP1"),
	// 			PublicIPBlock: to.Ptr("20.20.40.50/32"),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/publicIPs"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_CreateSegments.json
func ExampleWorkloadNetworksClient_BeginCreateSegments() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateSegments(ctx, "group1", "cloud1", "segment1", armavs.WorkloadNetworkSegment{
		Properties: &armavs.WorkloadNetworkSegmentProperties{
			DisplayName:      to.Ptr("segment1"),
			ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
			Subnet: &armavs.WorkloadNetworkSegmentSubnet{
				DhcpRanges: []*string{
					to.Ptr("40.20.0.0-40.20.0.1"),
				},
				GatewayAddress: to.Ptr("40.20.20.20/16"),
			},
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientCreateSegmentsResponse{
	// 	WorkloadNetworkSegment: &armavs.WorkloadNetworkSegment{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
	// 		Name: to.Ptr("segment1"),
	// 		Properties: &armavs.WorkloadNetworkSegmentProperties{
	// 			DisplayName: to.Ptr("segment1"),
	// 			ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
	// 			Subnet: &armavs.WorkloadNetworkSegmentSubnet{
	// 				DhcpRanges: []*string{
	// 					to.Ptr("40.20.0.0-40.20.0.1"),
	// 				},
	// 				GatewayAddress: to.Ptr("40.20.20.20/16"),
	// 			},
	// 			PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
	// 			},
	// 			Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_CreateVMGroup.json
func ExampleWorkloadNetworksClient_BeginCreateVMGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginCreateVMGroup(ctx, "group1", "cloud1", "vmGroup1", armavs.WorkloadNetworkVMGroup{
		Properties: &armavs.WorkloadNetworkVMGroupProperties{
			DisplayName: to.Ptr("vmGroup1"),
			Members: []*string{
				to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50"),
			},
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientCreateVMGroupResponse{
	// 	WorkloadNetworkVMGroup: &armavs.WorkloadNetworkVMGroup{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
	// 		Name: to.Ptr("vmGroup1"),
	// 		Properties: &armavs.WorkloadNetworkVMGroupProperties{
	// 			DisplayName: to.Ptr("vmGroup1"),
	// 			Members: []*string{
	// 				to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50"),
	// 			},
	// 			Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteDnsService.json
func ExampleWorkloadNetworksClient_BeginDeleteDNSService() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteDNSService(ctx, "group1", "dnsService1", "cloud1", 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 = armavs.WorkloadNetworksClientDeleteDNSServiceResponse{
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteDnsZone.json
func ExampleWorkloadNetworksClient_BeginDeleteDNSZone() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteDNSZone(ctx, "group1", "dnsZone1", "cloud1", 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 = armavs.WorkloadNetworksClientDeleteDNSZoneResponse{
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteDhcp.json
func ExampleWorkloadNetworksClient_BeginDeleteDhcp() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteDhcp(ctx, "group1", "cloud1", "dhcp1", 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 = armavs.WorkloadNetworksClientDeleteDhcpResponse{
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_DeletePortMirroring.json
func ExampleWorkloadNetworksClient_BeginDeletePortMirroring() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeletePortMirroring(ctx, "group1", "portMirroring1", "cloud1", 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 = armavs.WorkloadNetworksClientDeletePortMirroringResponse{
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_DeletePublicIP.json
func ExampleWorkloadNetworksClient_BeginDeletePublicIP() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeletePublicIP(ctx, "group1", "publicIP1", "cloud1", 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 = armavs.WorkloadNetworksClientDeletePublicIPResponse{
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteSegment.json
func ExampleWorkloadNetworksClient_BeginDeleteSegment() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteSegment(ctx, "group1", "cloud1", "segment1", 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 = armavs.WorkloadNetworksClientDeleteSegmentResponse{
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteVMGroup.json
func ExampleWorkloadNetworksClient_BeginDeleteVMGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginDeleteVMGroup(ctx, "group1", "vmGroup1", "cloud1", 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 = armavs.WorkloadNetworksClientDeleteVMGroupResponse{
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_Get.json
func ExampleWorkloadNetworksClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().Get(ctx, "group1", "cloud1", 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 = armavs.WorkloadNetworksClientGetResponse{
	// 	WorkloadNetwork: &armavs.WorkloadNetwork{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default"),
	// 		Name: to.Ptr("default"),
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetDnsService.json
func ExampleWorkloadNetworksClient_GetDNSService() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetDNSService(ctx, "group1", "cloud1", "dnsService1", 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 = armavs.WorkloadNetworksClientGetDNSServiceResponse{
	// 	WorkloadNetworkDNSService: &armavs.WorkloadNetworkDNSService{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
	// 		Name: to.Ptr("portMirroring1"),
	// 		Properties: &armavs.WorkloadNetworkDNSServiceProperties{
	// 			DisplayName: to.Ptr("dnsService1"),
	// 			DNSServiceIP: to.Ptr("5.5.5.5"),
	// 			DefaultDNSZone: to.Ptr("defaultDnsZone1"),
	// 			FqdnZones: []*string{
	// 				to.Ptr("fqdnZone1"),
	// 			},
	// 			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
	// 			Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetDnsZone.json
func ExampleWorkloadNetworksClient_GetDNSZone() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetDNSZone(ctx, "group1", "cloud1", "dnsZone1", 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 = armavs.WorkloadNetworksClientGetDNSZoneResponse{
	// 	WorkloadNetworkDNSZone: &armavs.WorkloadNetworkDNSZone{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
	// 		Name: to.Ptr("portMirroring1"),
	// 		Properties: &armavs.WorkloadNetworkDNSZoneProperties{
	// 			DisplayName: to.Ptr("dnsZone1"),
	// 			Domain: []*string{
	// 			},
	// 			DNSServerIPs: []*string{
	// 				to.Ptr("1.1.1.1"),
	// 			},
	// 			SourceIP: to.Ptr("8.8.8.8"),
	// 			DNSServices: to.Ptr[int64](0),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetDhcp.json
func ExampleWorkloadNetworksClient_GetDhcp() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetDhcp(ctx, "group1", "dhcp1", "cloud1", 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 = armavs.WorkloadNetworksClientGetDhcpResponse{
	// 	WorkloadNetworkDhcp: &armavs.WorkloadNetworkDhcp{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
	// 		Name: to.Ptr("dhcp1"),
	// 		Properties: &armavs.WorkloadNetworkDhcpServer{
	// 			DisplayName: to.Ptr("dhcpConfigurations1"),
	// 			DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
	// 			Segments: []*string{
	// 				to.Ptr("segment1"),
	// 				to.Ptr("segment2"),
	// 			},
	// 			ServerAddress: to.Ptr("40.1.5.1/24"),
	// 			LeaseTime: to.Ptr[int64](86400),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetGateway.json
func ExampleWorkloadNetworksClient_GetGateway() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetGateway(ctx, "group1", "cloud1", "gateway1", 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 = armavs.WorkloadNetworksClientGetGatewayResponse{
	// 	WorkloadNetworkGateway: &armavs.WorkloadNetworkGateway{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways/gateway1"),
	// 		Name: to.Ptr("gateway1"),
	// 		Properties: &armavs.WorkloadNetworkGatewayProperties{
	// 			DisplayName: to.Ptr("gateway1"),
	// 			Path: to.Ptr("/infra/tier-1s/gateway1"),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/gateways"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetPortMirroring.json
func ExampleWorkloadNetworksClient_GetPortMirroring() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetPortMirroring(ctx, "group1", "cloud1", "portMirroring1", 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 = armavs.WorkloadNetworksClientGetPortMirroringResponse{
	// 	WorkloadNetworkPortMirroring: &armavs.WorkloadNetworkPortMirroring{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
	// 		Name: to.Ptr("portMirroring1"),
	// 		Properties: &armavs.WorkloadNetworkPortMirroringProperties{
	// 			DisplayName: to.Ptr("portMirroring1"),
	// 			Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
	// 			Source: to.Ptr("vmGroup1"),
	// 			Destination: to.Ptr("vmGroup2"),
	// 			Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetPublicIP.json
func ExampleWorkloadNetworksClient_GetPublicIP() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetPublicIP(ctx, "group1", "cloud1", "publicIP1", 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 = armavs.WorkloadNetworksClientGetPublicIPResponse{
	// 	WorkloadNetworkPublicIP: &armavs.WorkloadNetworkPublicIP{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1"),
	// 		Name: to.Ptr("publicIP1"),
	// 		Properties: &armavs.WorkloadNetworkPublicIPProperties{
	// 			DisplayName: to.Ptr("publicIP1"),
	// 			PublicIPBlock: to.Ptr("20.20.40.50/32"),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/publicIPs"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetSegment.json
func ExampleWorkloadNetworksClient_GetSegment() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetSegment(ctx, "group1", "cloud1", "segment1", 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 = armavs.WorkloadNetworksClientGetSegmentResponse{
	// 	WorkloadNetworkSegment: &armavs.WorkloadNetworkSegment{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
	// 		Name: to.Ptr("segment1"),
	// 		Properties: &armavs.WorkloadNetworkSegmentProperties{
	// 			DisplayName: to.Ptr("segment1"),
	// 			ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
	// 			Subnet: &armavs.WorkloadNetworkSegmentSubnet{
	// 				DhcpRanges: []*string{
	// 					to.Ptr("40.20.0.0-40.20.0.1"),
	// 				},
	// 				GatewayAddress: to.Ptr("40.20.20.20/16"),
	// 			},
	// 			PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
	// 				{
	// 					PortName: to.Ptr("vm1"),
	// 				},
	// 			},
	// 			Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetVMGroup.json
func ExampleWorkloadNetworksClient_GetVMGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetVMGroup(ctx, "group1", "cloud1", "vmGroup1", 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 = armavs.WorkloadNetworksClientGetVMGroupResponse{
	// 	WorkloadNetworkVMGroup: &armavs.WorkloadNetworkVMGroup{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
	// 		Name: to.Ptr("cloud1"),
	// 		Properties: &armavs.WorkloadNetworkVMGroupProperties{
	// 			DisplayName: to.Ptr("vmGroup1"),
	// 			Members: []*string{
	// 				to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50"),
	// 			},
	// 			Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json
func ExampleWorkloadNetworksClient_GetVirtualMachine() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewWorkloadNetworksClient().GetVirtualMachine(ctx, "group1", "cloud1", "vm1", 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 = armavs.WorkloadNetworksClientGetVirtualMachineResponse{
	// 	WorkloadNetworkVirtualMachine: &armavs.WorkloadNetworkVirtualMachine{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines/vm1"),
	// 		Name: to.Ptr("vm1"),
	// 		Properties: &armavs.WorkloadNetworkVirtualMachineProperties{
	// 			DisplayName: to.Ptr("vm1"),
	// 			VMType: to.Ptr(armavs.VMTypeEnumREGULAR),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/virtualMachines"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_List.json
func ExampleWorkloadNetworksClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListResponse{
		// 	WorkloadNetworkList: armavs.WorkloadNetworkList{
		// 		Value: []*armavs.WorkloadNetwork{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default"),
		// 				Name: to.Ptr("default"),
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListDnsServices.json
func ExampleWorkloadNetworksClient_NewListDNSServicesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListDNSServicesPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListDNSServicesResponse{
		// 	WorkloadNetworkDNSServicesList: armavs.WorkloadNetworkDNSServicesList{
		// 		Value: []*armavs.WorkloadNetworkDNSService{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
		// 				Name: to.Ptr("portMirroring1"),
		// 				Properties: &armavs.WorkloadNetworkDNSServiceProperties{
		// 					DisplayName: to.Ptr("dnsService1"),
		// 					DNSServiceIP: to.Ptr("5.5.5.5"),
		// 					DefaultDNSZone: to.Ptr("defaultDnsZone1"),
		// 					FqdnZones: []*string{
		// 						to.Ptr("fqdnZone1"),
		// 					},
		// 					LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
		// 					Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
		// 					Revision: to.Ptr[int64](1),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListDnsZones.json
func ExampleWorkloadNetworksClient_NewListDNSZonesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListDNSZonesPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListDNSZonesResponse{
		// 	WorkloadNetworkDNSZonesList: armavs.WorkloadNetworkDNSZonesList{
		// 		Value: []*armavs.WorkloadNetworkDNSZone{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
		// 				Name: to.Ptr("portMirroring1"),
		// 				Properties: &armavs.WorkloadNetworkDNSZoneProperties{
		// 					DisplayName: to.Ptr("dnsZone1"),
		// 					Domain: []*string{
		// 					},
		// 					DNSServerIPs: []*string{
		// 						to.Ptr("1.1.1.1"),
		// 					},
		// 					SourceIP: to.Ptr("8.8.8.8"),
		// 					DNSServices: to.Ptr[int64](0),
		// 					Revision: to.Ptr[int64](1),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListDhcp.json
func ExampleWorkloadNetworksClient_NewListDhcpPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListDhcpPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListDhcpResponse{
		// 	WorkloadNetworkDhcpList: armavs.WorkloadNetworkDhcpList{
		// 		Value: []*armavs.WorkloadNetworkDhcp{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
		// 				Name: to.Ptr("dhcp1"),
		// 				Properties: &armavs.WorkloadNetworkDhcpServer{
		// 					DisplayName: to.Ptr("dhcpConfigurations1"),
		// 					DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
		// 					Segments: []*string{
		// 						to.Ptr("segment1"),
		// 						to.Ptr("segment2"),
		// 					},
		// 					ServerAddress: to.Ptr("40.1.5.1/24"),
		// 					LeaseTime: to.Ptr[int64](86400),
		// 					Revision: to.Ptr[int64](1),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListGateways.json
func ExampleWorkloadNetworksClient_NewListGatewaysPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListGatewaysPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListGatewaysResponse{
		// 	WorkloadNetworkGatewayList: armavs.WorkloadNetworkGatewayList{
		// 		Value: []*armavs.WorkloadNetworkGateway{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/gateways/gateway1"),
		// 				Name: to.Ptr("gateway1"),
		// 				Properties: &armavs.WorkloadNetworkGatewayProperties{
		// 					DisplayName: to.Ptr("gateway1"),
		// 					Path: to.Ptr("/infra/tier-1s/gateway1"),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListPortMirroring.json
func ExampleWorkloadNetworksClient_NewListPortMirroringPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListPortMirroringPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListPortMirroringResponse{
		// 	WorkloadNetworkPortMirroringList: armavs.WorkloadNetworkPortMirroringList{
		// 		Value: []*armavs.WorkloadNetworkPortMirroring{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
		// 				Name: to.Ptr("cloud1"),
		// 				Properties: &armavs.WorkloadNetworkPortMirroringProperties{
		// 					DisplayName: to.Ptr("portMirroring1"),
		// 					Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
		// 					Source: to.Ptr("vmGroup1"),
		// 					Destination: to.Ptr("vmGroup2"),
		// 					Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
		// 					Revision: to.Ptr[int64](1),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListPublicIPs.json
func ExampleWorkloadNetworksClient_NewListPublicIPsPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListPublicIPsPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListPublicIPsResponse{
		// 	WorkloadNetworkPublicIPsList: armavs.WorkloadNetworkPublicIPsList{
		// 		Value: []*armavs.WorkloadNetworkPublicIP{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/publicIPs/publicIP1"),
		// 				Name: to.Ptr("publicIP1"),
		// 				Properties: &armavs.WorkloadNetworkPublicIPProperties{
		// 					DisplayName: to.Ptr("publicIP1"),
		// 					PublicIPBlock: to.Ptr("20.20.40.50/32"),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/publicIPs"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListSegments.json
func ExampleWorkloadNetworksClient_NewListSegmentsPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListSegmentsPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListSegmentsResponse{
		// 	WorkloadNetworkSegmentsList: armavs.WorkloadNetworkSegmentsList{
		// 		Value: []*armavs.WorkloadNetworkSegment{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
		// 				Name: to.Ptr("segment1"),
		// 				Properties: &armavs.WorkloadNetworkSegmentProperties{
		// 					DisplayName: to.Ptr("segment1"),
		// 					ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
		// 					Subnet: &armavs.WorkloadNetworkSegmentSubnet{
		// 						DhcpRanges: []*string{
		// 							to.Ptr("40.20.0.0-40.20.0.1"),
		// 						},
		// 						GatewayAddress: to.Ptr("40.20.20.20/16"),
		// 					},
		// 					PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
		// 						{
		// 							PortName: to.Ptr("vm1"),
		// 						},
		// 					},
		// 					Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
		// 					Revision: to.Ptr[int64](1),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListVMGroups.json
func ExampleWorkloadNetworksClient_NewListVMGroupsPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListVMGroupsPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListVMGroupsResponse{
		// 	WorkloadNetworkVMGroupsList: armavs.WorkloadNetworkVMGroupsList{
		// 		Value: []*armavs.WorkloadNetworkVMGroup{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
		// 				Name: to.Ptr("cloud1"),
		// 				Properties: &armavs.WorkloadNetworkVMGroupProperties{
		// 					DisplayName: to.Ptr("vmGroup1"),
		// 					Members: []*string{
		// 						to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50"),
		// 					},
		// 					Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
		// 					Revision: to.Ptr[int64](1),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_ListVirtualMachines.json
func ExampleWorkloadNetworksClient_NewListVirtualMachinesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewWorkloadNetworksClient().NewListVirtualMachinesPager("group1", "cloud1", 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 = armavs.WorkloadNetworksClientListVirtualMachinesResponse{
		// 	WorkloadNetworkVirtualMachinesList: armavs.WorkloadNetworkVirtualMachinesList{
		// 		Value: []*armavs.WorkloadNetworkVirtualMachine{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/virtualMachines/vm1"),
		// 				Name: to.Ptr("vm1"),
		// 				Properties: &armavs.WorkloadNetworkVirtualMachineProperties{
		// 					DisplayName: to.Ptr("vm1"),
		// 					VMType: to.Ptr(armavs.VMTypeEnumREGULAR),
		// 				},
		// 				Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/virtualMachines"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateDnsService.json
func ExampleWorkloadNetworksClient_BeginUpdateDNSService() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateDNSService(ctx, "group1", "cloud1", "dnsService1", armavs.WorkloadNetworkDNSService{
		Properties: &armavs.WorkloadNetworkDNSServiceProperties{
			DisplayName:    to.Ptr("dnsService1"),
			DNSServiceIP:   to.Ptr("5.5.5.5"),
			DefaultDNSZone: to.Ptr("defaultDnsZone1"),
			FqdnZones: []*string{
				to.Ptr("fqdnZone1"),
			},
			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientUpdateDNSServiceResponse{
	// 	WorkloadNetworkDNSService: &armavs.WorkloadNetworkDNSService{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsServices/dnsService1"),
	// 		Name: to.Ptr("dnsService1"),
	// 		Properties: &armavs.WorkloadNetworkDNSServiceProperties{
	// 			DisplayName: to.Ptr("dnsService1"),
	// 			DNSServiceIP: to.Ptr("5.5.5.5"),
	// 			DefaultDNSZone: to.Ptr("defaultDnsZone1"),
	// 			FqdnZones: []*string{
	// 				to.Ptr("fqdnZone1"),
	// 			},
	// 			LogLevel: to.Ptr(armavs.DNSServiceLogLevelEnumINFO),
	// 			Status: to.Ptr(armavs.DNSServiceStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsServices"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateDnsZone.json
func ExampleWorkloadNetworksClient_BeginUpdateDNSZone() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateDNSZone(ctx, "group1", "cloud1", "dnsZone1", armavs.WorkloadNetworkDNSZone{
		Properties: &armavs.WorkloadNetworkDNSZoneProperties{
			DisplayName: to.Ptr("dnsZone1"),
			Domain:      []*string{},
			DNSServerIPs: []*string{
				to.Ptr("1.1.1.1"),
			},
			SourceIP: to.Ptr("8.8.8.8"),
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientUpdateDNSZoneResponse{
	// 	WorkloadNetworkDNSZone: &armavs.WorkloadNetworkDNSZone{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dnsZones/dnsZone1"),
	// 		Name: to.Ptr("dnsZone1"),
	// 		Properties: &armavs.WorkloadNetworkDNSZoneProperties{
	// 			DisplayName: to.Ptr("dnsZone1"),
	// 			Domain: []*string{
	// 			},
	// 			DNSServerIPs: []*string{
	// 				to.Ptr("1.1.1.1"),
	// 			},
	// 			SourceIP: to.Ptr("8.8.8.8"),
	// 			DNSServices: to.Ptr[int64](0),
	// 			Revision: to.Ptr[int64](1),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dnsZones"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateDhcp.json
func ExampleWorkloadNetworksClient_BeginUpdateDhcp() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateDhcp(ctx, "group1", "cloud1", "dhcp1", armavs.WorkloadNetworkDhcp{
		Properties: &armavs.WorkloadNetworkDhcpServer{
			DhcpType:      to.Ptr(armavs.DhcpTypeEnumSERVER),
			ServerAddress: to.Ptr("40.1.5.1/24"),
			LeaseTime:     to.Ptr[int64](86400),
			Revision:      to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientUpdateDhcpResponse{
	// 	WorkloadNetworkDhcp: &armavs.WorkloadNetworkDhcp{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/dhcpConfigurations/dhcpConfigurations1"),
	// 		Name: to.Ptr("dhcp1"),
	// 		Properties: &armavs.WorkloadNetworkDhcpServer{
	// 			DisplayName: to.Ptr("dhcpConfigurations1"),
	// 			DhcpType: to.Ptr(armavs.DhcpTypeEnumSERVER),
	// 			Segments: []*string{
	// 				to.Ptr("segment1"),
	// 				to.Ptr("segment2"),
	// 			},
	// 			ServerAddress: to.Ptr("40.1.5.1/24"),
	// 			LeaseTime: to.Ptr[int64](86400),
	// 			Revision: to.Ptr[int64](2),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/dhcpConfigurations"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_UpdatePortMirroring.json
func ExampleWorkloadNetworksClient_BeginUpdatePortMirroring() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdatePortMirroring(ctx, "group1", "cloud1", "portMirroring1", armavs.WorkloadNetworkPortMirroring{
		Properties: &armavs.WorkloadNetworkPortMirroringProperties{
			Direction:   to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
			Source:      to.Ptr("vmGroup1"),
			Destination: to.Ptr("vmGroup2"),
			Revision:    to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientUpdatePortMirroringResponse{
	// 	WorkloadNetworkPortMirroring: &armavs.WorkloadNetworkPortMirroring{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/portMirroringProfiles/portMirroring1"),
	// 		Name: to.Ptr("portMirroring1"),
	// 		Properties: &armavs.WorkloadNetworkPortMirroringProperties{
	// 			DisplayName: to.Ptr("portMirroring1"),
	// 			Direction: to.Ptr(armavs.PortMirroringDirectionEnumBIDIRECTIONAL),
	// 			Source: to.Ptr("vmGroup1"),
	// 			Destination: to.Ptr("vmGroup2"),
	// 			Status: to.Ptr(armavs.PortMirroringStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](2),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/portMirroringProfiles"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateSegments.json
func ExampleWorkloadNetworksClient_BeginUpdateSegments() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateSegments(ctx, "group1", "cloud1", "segment1", armavs.WorkloadNetworkSegment{
		Properties: &armavs.WorkloadNetworkSegmentProperties{
			ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
			Subnet: &armavs.WorkloadNetworkSegmentSubnet{
				DhcpRanges: []*string{
					to.Ptr("40.20.0.0-40.20.0.1"),
				},
				GatewayAddress: to.Ptr("40.20.20.20/16"),
			},
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientUpdateSegmentsResponse{
	// 	WorkloadNetworkSegment: &armavs.WorkloadNetworkSegment{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/segments/segment1"),
	// 		Name: to.Ptr("segment1"),
	// 		Properties: &armavs.WorkloadNetworkSegmentProperties{
	// 			DisplayName: to.Ptr("segment1"),
	// 			ConnectedGateway: to.Ptr("/infra/tier-1s/gateway"),
	// 			Subnet: &armavs.WorkloadNetworkSegmentSubnet{
	// 				DhcpRanges: []*string{
	// 					to.Ptr("40.20.0.0-40.20.0.1"),
	// 				},
	// 				GatewayAddress: to.Ptr("40.20.20.20/16"),
	// 			},
	// 			PortVif: []*armavs.WorkloadNetworkSegmentPortVif{
	// 				{
	// 					PortName: to.Ptr("vm1"),
	// 				},
	// 			},
	// 			Status: to.Ptr(armavs.SegmentStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](2),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/segments"),
	// 	},
	// }
}

// Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateVMGroup.json
func ExampleWorkloadNetworksClient_BeginUpdateVMGroup() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armavs.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewWorkloadNetworksClient().BeginUpdateVMGroup(ctx, "group1", "cloud1", "vmGroup1", armavs.WorkloadNetworkVMGroup{
		Properties: &armavs.WorkloadNetworkVMGroupProperties{
			Members: []*string{
				to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50"),
			},
			Revision: to.Ptr[int64](1),
		},
	}, 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 = armavs.WorkloadNetworksClientUpdateVMGroupResponse{
	// 	WorkloadNetworkVMGroup: &armavs.WorkloadNetworkVMGroup{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/workloadNetworks/default/vmGroups/vmGroup1"),
	// 		Name: to.Ptr("cloud1"),
	// 		Properties: &armavs.WorkloadNetworkVMGroupProperties{
	// 			DisplayName: to.Ptr("vmGroup1"),
	// 			Members: []*string{
	// 				to.Ptr("564d43da-fefc-2a3b-1d92-42855622fa50"),
	// 			},
	// 			Status: to.Ptr(armavs.VMGroupStatusEnumSUCCESS),
	// 			Revision: to.Ptr[int64](2),
	// 		},
	// 		Type: to.Ptr("Microsoft.AVS/privateClouds/workloadNetworks/vmGroups"),
	// 	},
	// }
}
