// 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 armnetwork_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/network/armnetwork/v10"
	"log"
)

// Generated from example definition: 2025-07-01/PublicIpAddressCreateCustomizedValues.json
func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIPAddressAllocationMethod() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{
		Location: to.Ptr("eastus"),
		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
			IdleTimeoutInMinutes:     to.Ptr[int32](10),
			PublicIPAddressVersion:   to.Ptr(armnetwork.IPVersionIPv4),
			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic),
		},
		SKU: &armnetwork.PublicIPAddressSKU{
			Name: to.Ptr(armnetwork.PublicIPAddressSKUNameStandard),
			Tier: to.Ptr(armnetwork.PublicIPAddressSKUTierGlobal),
		},
	}, 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 = armnetwork.PublicIPAddressesClientCreateOrUpdateResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			DdosSettings: &armnetwork.DdosSettings{
	// 				ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
	// 			},
	// 			IdleTimeoutInMinutes: to.Ptr[int32](10),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic),
	// 		},
	// 		SKU: &armnetwork.PublicIPAddressSKU{
	// 			Name: to.Ptr(armnetwork.PublicIPAddressSKUNameStandard),
	// 			Tier: to.Ptr(armnetwork.PublicIPAddressSKUTierGlobal),
	// 		},
	// 		Zones: []*string{
	// 			to.Ptr("1"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressCreateDefaults.json
func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIPAddressDefaults() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{
		Location: to.Ptr("eastus"),
	}, 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 = armnetwork.PublicIPAddressesClientCreateOrUpdateResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
	// 		},
	// 		SKU: &armnetwork.PublicIPAddressSKU{
	// 			Name: to.Ptr(armnetwork.PublicIPAddressSKUNameBasic),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressCreateDefaultsStandardV2Sku.json
func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIPAddressDefaultsWithStandardV2Sku() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{
		Location: to.Ptr("eastus"),
	}, 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 = armnetwork.PublicIPAddressesClientCreateOrUpdateResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
	// 		},
	// 		SKU: &armnetwork.PublicIPAddressSKU{
	// 			Name: to.Ptr(armnetwork.PublicIPAddressSKUNameStandardV2),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressCreateDns.json
func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIPAddressDns() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{
		Location: to.Ptr("eastus"),
		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
			DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
				DomainNameLabel: to.Ptr("dnslbl"),
			},
		},
	}, 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 = armnetwork.PublicIPAddressesClientCreateOrUpdateResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
	// 				DomainNameLabel: to.Ptr("dnslbl"),
	// 				Fqdn: to.Ptr("dnslbl.westus.cloudapp.azure.com"),
	// 			},
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressCreateDnsWithDomainNameLabelScope.json
func ExamplePublicIPAddressesClient_BeginCreateOrUpdate_createPublicIPAddressDnsWithDomainNameLabelScope() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginCreateOrUpdate(ctx, "rg1", "test-ip", armnetwork.PublicIPAddress{
		Location: to.Ptr("eastus"),
		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
			DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
				DomainNameLabel:      to.Ptr("dnslbl"),
				DomainNameLabelScope: to.Ptr(armnetwork.PublicIPAddressDNSSettingsDomainNameLabelScopeTenantReuse),
			},
		},
	}, 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 = armnetwork.PublicIPAddressesClientCreateOrUpdateResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
	// 				DomainNameLabel: to.Ptr("dnslbl"),
	// 				DomainNameLabelScope: to.Ptr(armnetwork.PublicIPAddressDNSSettingsDomainNameLabelScopeTenantReuse),
	// 				Fqdn: to.Ptr("dnslbl.hxdwgjcdfgbhgebs.eastus.sysgen.cloudapp.azure.com"),
	// 			},
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressGetDdosProtectionStatus.json
func ExamplePublicIPAddressesClient_BeginDdosProtectionStatus() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginDdosProtectionStatus(ctx, "rg1", "test-pip", 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 = armnetwork.PublicIPAddressesClientDdosProtectionStatusResponse{
	// 	PublicIPDdosProtectionStatusResult: armnetwork.PublicIPDdosProtectionStatusResult{
	// 		DdosProtectionPlanID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/ddosProtectionPlans/test-plan"),
	// 		IsWorkloadProtected: to.Ptr(armnetwork.IsWorkloadProtectedTrue),
	// 		PublicIPAddress: to.Ptr("10.0.1.5"),
	// 		PublicIPAddressID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-pip"),
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressDelete.json
func ExamplePublicIPAddressesClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginDelete(ctx, "rg1", "test-ip", 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 = armnetwork.PublicIPAddressesClientDeleteResponse{
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressDisassociateCloudServiceReservedPublicIp.json
func ExamplePublicIPAddressesClient_BeginDisassociateCloudServiceReservedPublicIP() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginDisassociateCloudServiceReservedPublicIP(ctx, "rg1", "pip1", armnetwork.DisassociateCloudServicePublicIPRequest{
		PublicIPArmID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/publicIpAddresses/pip2"),
	}, 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 = armnetwork.PublicIPAddressesClientDisassociateCloudServiceReservedPublicIPResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("pip1"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/pip1"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic),
	// 		},
	// 		SKU: &armnetwork.PublicIPAddressSKU{
	// 			Name: to.Ptr(armnetwork.PublicIPAddressSKUNameBasic),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressGet.json
func ExamplePublicIPAddressesClient_Get_getPublicIPAddress() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPublicIPAddressesClient().Get(ctx, "rg1", "testDNS-ip", 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 = armnetwork.PublicIPAddressesClientGetResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/testDNS-ip"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			DdosSettings: &armnetwork.DdosSettings{
	// 				DdosProtectionPlan: &armnetwork.SubResource{
	// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/ddosProtectionPlans/test-plan"),
	// 				},
	// 				ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeEnabled),
	// 			},
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			IPTags: []*armnetwork.IPTag{
	// 				{
	// 					IPTagType: to.Ptr("FirstPartyUsage"),
	// 					Tag: to.Ptr("SQL"),
	// 				},
	// 				{
	// 					IPTagType: to.Ptr("FirstPartyUsage"),
	// 					Tag: to.Ptr("Storage"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressGetStandardV2Sku.json
func ExamplePublicIPAddressesClient_Get_getPublicIPAddressWithStandardV2Sku() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPublicIPAddressesClient().Get(ctx, "rg1", "testDNS-ip", 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 = armnetwork.PublicIPAddressesClientGetResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/testDNS-ip"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			DdosSettings: &armnetwork.DdosSettings{
	// 				DdosProtectionPlan: &armnetwork.SubResource{
	// 					ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/ddosProtectionPlans/test-plan"),
	// 				},
	// 				ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeEnabled),
	// 			},
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			IPTags: []*armnetwork.IPTag{
	// 				{
	// 					IPTagType: to.Ptr("FirstPartyUsage"),
	// 					Tag: to.Ptr("SQL"),
	// 				},
	// 				{
	// 					IPTagType: to.Ptr("FirstPartyUsage"),
	// 					Tag: to.Ptr("Storage"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
	// 		},
	// 		SKU: &armnetwork.PublicIPAddressSKU{
	// 			Name: to.Ptr(armnetwork.PublicIPAddressSKUNameStandardV2),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/CloudServicePublicIpGet.json
func ExamplePublicIPAddressesClient_GetCloudServicePublicIPAddress() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPublicIPAddressesClient().GetCloudServicePublicIPAddress(ctx, "cs-tester", "cs1", "Test_VM_0", "nic1", "ip1", "pub1", 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 = armnetwork.PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("pub1"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_0/networkInterfaces/nic1/ipConfigurations/ip1/publicIPAddresses/pub1"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
	// 				DomainNameLabel: to.Ptr("vm1.testvmssacc"),
	// 				Fqdn: to.Ptr("vm1.testvmssacc.southeastasia.cloudapp.azure.com"),
	// 			},
	// 			IdleTimeoutInMinutes: to.Ptr[int32](10),
	// 			IPAddress: to.Ptr("13.67.119.72"),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_0/networkInterfaces/nic1/ipConfigurations/ip1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressList.json
func ExamplePublicIPAddressesClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPublicIPAddressesClient().NewListPager("rg1", 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 = armnetwork.PublicIPAddressesClientListResponse{
		// 	PublicIPAddressListResult: armnetwork.PublicIPAddressListResult{
		// 		Value: []*armnetwork.PublicIPAddress{
		// 			{
		// 				Name: to.Ptr("testDNS-ip"),
		// 				Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/testDNS-ip"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DdosSettings: &armnetwork.DdosSettings{
		// 						ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](4),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
		// 					},
		// 					IPTags: []*armnetwork.IPTag{
		// 						{
		// 							IPTagType: to.Ptr("FirstPartyUsage"),
		// 							Tag: to.Ptr("SQL"),
		// 						},
		// 						{
		// 							IPTagType: to.Ptr("FirstPartyUsage"),
		// 							Tag: to.Ptr("Storage"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("ip03"),
		// 				Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/ip03"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DdosSettings: &armnetwork.DdosSettings{
		// 						ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
		// 					},
		// 					DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
		// 						DomainNameLabel: to.Ptr("testlbl"),
		// 						Fqdn: to.Ptr("testlbl.westus.cloudapp.azure.com"),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](4),
		// 					IPAddress: to.Ptr("40.85.154.247"),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/testLb/frontendIPConfigurations/LoadBalancerFrontEnd"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("ip04"),
		// 				Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/ip04"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DdosSettings: &armnetwork.DdosSettings{
		// 						ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
		// 					},
		// 					DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
		// 						DomainNameLabel: to.Ptr("testlbl"),
		// 						DomainNameLabelScope: to.Ptr(armnetwork.PublicIPAddressDNSSettingsDomainNameLabelScopeTenantReuse),
		// 						Fqdn: to.Ptr("testlbl.hxdwgjcdfgbhgebs.eastus.sysgen.cloudapp.azure.com"),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](4),
		// 					IPAddress: to.Ptr("40.85.154.248"),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/testLb/frontendIPConfigurations/LoadBalancerFrontEnd"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-07-01/PublicIpAddressListAll.json
func ExamplePublicIPAddressesClient_NewListAllPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPublicIPAddressesClient().NewListAllPager(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 = armnetwork.PublicIPAddressesClientListAllResponse{
		// 	PublicIPAddressListResult: armnetwork.PublicIPAddressListResult{
		// 		Value: []*armnetwork.PublicIPAddress{
		// 			{
		// 				Name: to.Ptr("testDNS-ip"),
		// 				Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/testDNS-ip"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DdosSettings: &armnetwork.DdosSettings{
		// 						ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](4),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("ip01"),
		// 				Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/ip01"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DdosSettings: &armnetwork.DdosSettings{
		// 						ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
		// 					},
		// 					DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
		// 						DomainNameLabel: to.Ptr("testlbl"),
		// 						Fqdn: to.Ptr("testlbl.westus.cloudapp.azure.com"),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](4),
		// 					IPAddress: to.Ptr("40.85.154.247"),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/testLb/frontendIPConfigurations/LoadBalancerFrontEnd"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("ip02"),
		// 				Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/publicIPAddresses/ip02"),
		// 				Location: to.Ptr("westus"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DdosSettings: &armnetwork.DdosSettings{
		// 						ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
		// 					},
		// 					DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
		// 						DomainNameLabel: to.Ptr("testlbl"),
		// 						DomainNameLabelScope: to.Ptr(armnetwork.PublicIPAddressDNSSettingsDomainNameLabelScopeTenantReuse),
		// 						Fqdn: to.Ptr("testlbl.hxdwgjcdfgbhgebs.eastus.sysgen.cloudapp.azure.com"),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](4),
		// 					IPAddress: to.Ptr("40.85.154.248"),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.Network/loadBalancers/testLb/frontendIPConfigurations/LoadBalancerFrontEnd"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-07-01/CloudServicePublicIpListAll.json
func ExamplePublicIPAddressesClient_NewListCloudServicePublicIPAddressesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPublicIPAddressesClient().NewListCloudServicePublicIPAddressesPager("cs-tester", "cs1", 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 = armnetwork.PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{
		// 	PublicIPAddressListResult: armnetwork.PublicIPAddressListResult{
		// 		Value: []*armnetwork.PublicIPAddress{
		// 			{
		// 				Name: to.Ptr("pub1"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_0/networkInterfaces/nic1/ipConfigurations/ip1/publicIPAddresses/pub1"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
		// 						DomainNameLabel: to.Ptr("vm1.testvmssacc"),
		// 						Fqdn: to.Ptr("vm1.testvmssacc.southeastasia.cloudapp.azure.com"),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](10),
		// 					IPAddress: to.Ptr("13.67.119.72"),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_0/networkInterfaces/nic1/ipConfigurations/ip1"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("pub1"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_3/networkInterfaces/nic1/ipConfigurations/ip1/publicIPAddresses/pub1"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
		// 						DomainNameLabel: to.Ptr("vm3.testvmssacc"),
		// 						Fqdn: to.Ptr("vm3.testvmssacc.southeastasia.cloudapp.azure.com"),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](10),
		// 					IPAddress: to.Ptr("13.67.118.216"),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_3/networkInterfaces/nic1/ipConfigurations/ip1"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-07-01/CloudServiceRoleInstancePublicIpList.json
func ExamplePublicIPAddressesClient_NewListCloudServiceRoleInstancePublicIPAddressesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPublicIPAddressesClient().NewListCloudServiceRoleInstancePublicIPAddressesPager("cs-tester", "cs1", "Test_VM_0", "nic1", "ip1", 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 = armnetwork.PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{
		// 	PublicIPAddressListResult: armnetwork.PublicIPAddressListResult{
		// 		Value: []*armnetwork.PublicIPAddress{
		// 			{
		// 				Name: to.Ptr("pub1"),
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_0/networkInterfaces/nic1/ipConfigurations/ip1/publicIPAddresses/pub1"),
		// 				Properties: &armnetwork.PublicIPAddressPropertiesFormat{
		// 					DNSSettings: &armnetwork.PublicIPAddressDNSSettings{
		// 						DomainNameLabel: to.Ptr("vm1.testvmssacc"),
		// 						Fqdn: to.Ptr("vm1.testvmssacc.southeastasia.cloudapp.azure.com"),
		// 					},
		// 					IdleTimeoutInMinutes: to.Ptr[int32](10),
		// 					IPAddress: to.Ptr("13.67.119.72"),
		// 					IPConfiguration: &armnetwork.IPConfiguration{
		// 						ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cs-tester/providers/Microsoft.Compute/cloudServices/cs1/roleInstances/Test_VM_0/networkInterfaces/nic1/ipConfigurations/ip1"),
		// 					},
		// 					ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
		// 					PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
		// 					PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodDynamic),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-07-01/PublicIpAddressReserve.json
func ExamplePublicIPAddressesClient_BeginReserveCloudServicePublicIPAddress() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPublicIPAddressesClient().BeginReserveCloudServicePublicIPAddress(ctx, "rg1", "test-ip", armnetwork.ReserveCloudServicePublicIPAddressRequest{
		IsRollback: to.Ptr(armnetwork.IsRollbackFalse),
	}, 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 = armnetwork.PublicIPAddressesClientReserveCloudServicePublicIPAddressResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("test-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
	// 		Location: to.Ptr("eastus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			IdleTimeoutInMinutes: to.Ptr[int32](4),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic),
	// 		},
	// 		SKU: &armnetwork.PublicIPAddressSKU{
	// 			Name: to.Ptr(armnetwork.PublicIPAddressSKUNameBasic),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-07-01/PublicIpAddressUpdateTags.json
func ExamplePublicIPAddressesClient_UpdateTags() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armnetwork.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPublicIPAddressesClient().UpdateTags(ctx, "rg1", "test-ip", armnetwork.TagsObject{
		Tags: map[string]*string{
			"tag1": to.Ptr("value1"),
			"tag2": to.Ptr("value2"),
		},
	}, 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 = armnetwork.PublicIPAddressesClientUpdateTagsResponse{
	// 	PublicIPAddress: armnetwork.PublicIPAddress{
	// 		Name: to.Ptr("testDNS-ip"),
	// 		Type: to.Ptr("Microsoft.Network/publicIPAddresses"),
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/test-ip"),
	// 		Location: to.Ptr("westus"),
	// 		Properties: &armnetwork.PublicIPAddressPropertiesFormat{
	// 			DdosSettings: &armnetwork.DdosSettings{
	// 				ProtectionMode: to.Ptr(armnetwork.DdosSettingsProtectionModeVirtualNetworkInherited),
	// 			},
	// 			IdleTimeoutInMinutes: to.Ptr[int32](10),
	// 			IPConfiguration: &armnetwork.IPConfiguration{
	// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/testDNS649/ipConfigurations/ipconfig1"),
	// 			},
	// 			ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
	// 			PublicIPAddressVersion: to.Ptr(armnetwork.IPVersionIPv4),
	// 			PublicIPAllocationMethod: to.Ptr(armnetwork.IPAllocationMethodStatic),
	// 		},
	// 		Tags: map[string]*string{
	// 			"tag1": to.Ptr("value1"),
	// 			"tag2": to.Ptr("value2"),
	// 		},
	// 	},
	// }
}
