// 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 armrelay_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/relay/armrelay/v2"
	"log"
)

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceCheckNameAvailability.json
func ExampleNamespacesClient_CheckNameAvailability() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CheckNameAvailability(ctx, armrelay.CheckNameAvailability{
		Name: to.Ptr("example-RelayNamespace1321"),
	}, 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 = armrelay.NamespacesClientCheckNameAvailabilityResponse{
	// 	CheckNameAvailabilityResult: &armrelay.CheckNameAvailabilityResult{
	// 		Message: to.Ptr(""),
	// 		NameAvailable: to.Ptr(true),
	// 		Reason: to.Ptr(armrelay.UnavailableReasonNone),
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceCreate.json
func ExampleNamespacesClient_BeginCreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginCreateOrUpdate(ctx, "resourcegroup", "example-RelayNamespace-5849", armrelay.Namespace{
		Location: to.Ptr("South Central US"),
		SKU: &armrelay.SKU{
			Name: to.Ptr(armrelay.SKUNameStandard),
			Tier: to.Ptr(armrelay.SKUTierStandard),
		},
		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)
	}
	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 = armrelay.NamespacesClientCreateOrUpdateResponse{
	// 	Namespace: &armrelay.Namespace{
	// 		Name: to.Ptr("example-RelayNamespace-5849"),
	// 		Type: to.Ptr("Microsoft.Relay/Namespaces"),
	// 		ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-5849"),
	// 		Location: to.Ptr("South Central US"),
	// 		Properties: &armrelay.NamespaceProperties{
	// 			MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-5849"),
	// 			ProvisioningState: to.Ptr("Created"),
	// 			ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-5849.servicebus.windows-int.net:443/"),
	// 		},
	// 		SKU: &armrelay.SKU{
	// 			Name: to.Ptr(armrelay.SKUNameStandard),
	// 			Tier: to.Ptr(armrelay.SKUTierStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 			"tag1": to.Ptr("value1"),
	// 			"tag2": to.Ptr("value2"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceAuthorizationRuleCreate.json
func ExampleNamespacesClient_CreateOrUpdateAuthorizationRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", armrelay.AuthorizationRule{
		Properties: &armrelay.AuthorizationRuleProperties{
			Rights: []*armrelay.AccessRights{
				to.Ptr(armrelay.AccessRightsListen),
				to.Ptr(armrelay.AccessRightsSend),
			},
		},
	}, 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 = armrelay.NamespacesClientCreateOrUpdateAuthorizationRuleResponse{
	// 	AuthorizationRule: &armrelay.AuthorizationRule{
	// 		Name: to.Ptr("example-RelayAuthRules-01"),
	// 		Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
	// 		ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 		Properties: &armrelay.AuthorizationRuleProperties{
	// 			Rights: []*armrelay.AccessRights{
	// 				to.Ptr(armrelay.AccessRightsListen),
	// 				to.Ptr(armrelay.AccessRightsSend),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/VirtualNetworkRules/RelayNetworkRuleSetCreate.json
func ExampleNamespacesClient_CreateOrUpdateNetworkRuleSet() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("Subscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().CreateOrUpdateNetworkRuleSet(ctx, "ResourceGroup", "example-RelayNamespace-6019", armrelay.NetworkRuleSet{
		Properties: &armrelay.NetworkRuleSetProperties{
			DefaultAction: to.Ptr(armrelay.DefaultActionDeny),
			IPRules: []*armrelay.NWRuleSetIPRules{
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.1"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.2"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.3"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.4"),
				},
				{
					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
					IPMask: to.Ptr("1.1.1.5"),
				},
			},
			TrustedServiceAccessEnabled: to.Ptr(false),
		},
	}, 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 = armrelay.NamespacesClientCreateOrUpdateNetworkRuleSetResponse{
	// 	NetworkRuleSet: &armrelay.NetworkRuleSet{
	// 		Name: to.Ptr("default"),
	// 		Type: to.Ptr("Microsoft.Relay/Namespaces/NetworkRuleSet"),
	// 		ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroupid/providers/Microsoft.Relay/namespaces/example-RelayNamespace-9659/networkruleset/default"),
	// 		Properties: &armrelay.NetworkRuleSetProperties{
	// 			DefaultAction: to.Ptr(armrelay.DefaultActionDeny),
	// 			IPRules: []*armrelay.NWRuleSetIPRules{
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.1"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.2"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.3"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.4"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.5"),
	// 				},
	// 			},
	// 			TrustedServiceAccessEnabled: to.Ptr(false),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceDelete.json
func ExampleNamespacesClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewNamespacesClient().BeginDelete(ctx, "SouthCentralUS", "example-RelayNamespace-5849", 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 = armrelay.NamespacesClientDeleteResponse{
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceAuthorizationRuleDelete.json
func ExampleNamespacesClient_DeleteAuthorizationRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().DeleteAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", 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 = armrelay.NamespacesClientDeleteAuthorizationRuleResponse{
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceGet.json
func ExampleNamespacesClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Get(ctx, "RG-eg", "example-RelayRelayNamespace-01", 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 = armrelay.NamespacesClientGetResponse{
	// 	Namespace: &armrelay.Namespace{
	// 		Name: to.Ptr("example-RelayRelayNamespace-01"),
	// 		Type: to.Ptr("Microsoft.Relay/Namespaces"),
	// 		ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-01"),
	// 		Location: to.Ptr("West US"),
	// 		Properties: &armrelay.NamespaceProperties{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:38:12.46Z"); return t}()),
	// 			MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-RelayRelayNamespace-01"),
	// 			ProvisioningState: to.Ptr("Succeeded"),
	// 			ServiceBusEndpoint: to.Ptr("https://example-RelayRelayNamespace-01.servicebus.windows.net:443/"),
	// 			UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:38:34.533Z"); return t}()),
	// 		},
	// 		SKU: &armrelay.SKU{
	// 			Name: to.Ptr(armrelay.SKUNameStandard),
	// 			Tier: to.Ptr(armrelay.SKUTierStandard),
	// 		},
	// 		Tags: map[string]*string{
	// 			"tag1": to.Ptr("value1"),
	// 			"tag2": to.Ptr("value2"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceAuthorizationRuleGet.json
func ExampleNamespacesClient_GetAuthorizationRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetAuthorizationRule(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", 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 = armrelay.NamespacesClientGetAuthorizationRuleResponse{
	// 	AuthorizationRule: &armrelay.AuthorizationRule{
	// 		Name: to.Ptr("example-RelayAuthRules-01"),
	// 		Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
	// 		ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/example-RelayAuthRules-01"),
	// 		Properties: &armrelay.AuthorizationRuleProperties{
	// 			Rights: []*armrelay.AccessRights{
	// 				to.Ptr(armrelay.AccessRightsListen),
	// 			},
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/VirtualNetworkRules/RelayNetworkRuleSetGet.json
func ExampleNamespacesClient_GetNetworkRuleSet() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("Subscription", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().GetNetworkRuleSet(ctx, "ResourceGroup", "example-RelayNamespace-6019", 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 = armrelay.NamespacesClientGetNetworkRuleSetResponse{
	// 	NetworkRuleSet: &armrelay.NetworkRuleSet{
	// 		Name: to.Ptr("default"),
	// 		Type: to.Ptr("Microsoft.Relay/Namespaces/NetworkRuleSet"),
	// 		ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroupid/providers/Microsoft.Relay/namespaces/example-RelayNamespace-9659/networkruleset/default"),
	// 		Properties: &armrelay.NetworkRuleSetProperties{
	// 			DefaultAction: to.Ptr(armrelay.DefaultActionDeny),
	// 			IPRules: []*armrelay.NWRuleSetIPRules{
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.1"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.2"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.3"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.4"),
	// 				},
	// 				{
	// 					Action: to.Ptr(armrelay.NetworkRuleIPActionAllow),
	// 					IPMask: to.Ptr("1.1.1.5"),
	// 				},
	// 			},
	// 			TrustedServiceAccessEnabled: to.Ptr(false),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceListBySubscription.json
func ExampleNamespacesClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListPager(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 = armrelay.NamespacesClientListResponse{
		// 	NamespaceListResult: armrelay.NamespaceListResult{
		// 		Value: []*armrelay.Namespace{
		// 			{
		// 				Name: to.Ptr("example-RelayRelayNamespace-01"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-01"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.4131724Z"); return t}()),
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-RelayRelayNamespace-01"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayRelayNamespace-01.servicebus.windows.net:443/"),
		// 					UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:59.4131724Z"); return t}()),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 					"tag1": to.Ptr("value1"),
		// 					"tag2": to.Ptr("value2"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayRelayNamespace-02"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG1-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-02"),
		// 				Location: to.Ptr("West US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:39.4131724Z"); return t}()),
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-RelayRelayNamespace-02"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayRelayNamespace-02.servicebus.windows.net:443/"),
		// 					UpdatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-01-23T20:34:49.4131724Z"); return t}()),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 					"tag1": to.Ptr("value1"),
		// 					"tag2": to.Ptr("value2"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceAuthorizationRuleListAll.json
func ExampleNamespacesClient_NewListAuthorizationRulesPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListAuthorizationRulesPager("resourcegroup", "example-RelayNamespace-01", 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 = armrelay.NamespacesClientListAuthorizationRulesResponse{
		// 	AuthorizationRuleListResult: armrelay.AuthorizationRuleListResult{
		// 		Value: []*armrelay.AuthorizationRule{
		// 			{
		// 				Name: to.Ptr("RootManageSharedAccessKey"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/RootManageSharedAccessKey"),
		// 				Properties: &armrelay.AuthorizationRuleProperties{
		// 					Rights: []*armrelay.AccessRights{
		// 						to.Ptr(armrelay.AccessRightsListen),
		// 						to.Ptr(armrelay.AccessRightsManage),
		// 						to.Ptr(armrelay.AccessRightsSend),
		// 					},
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayAuthRules-01"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces/AuthorizationRules"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-01/AuthorizationRules/example-RelayAuthRules-01"),
		// 				Properties: &armrelay.AuthorizationRuleProperties{
		// 					Rights: []*armrelay.AccessRights{
		// 						to.Ptr(armrelay.AccessRightsListen),
		// 						to.Ptr(armrelay.AccessRightsSend),
		// 					},
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceListByResourceGroup.json
func ExampleNamespacesClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewNamespacesClient().NewListByResourceGroupPager("resourcegroup", 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 = armrelay.NamespacesClientListByResourceGroupResponse{
		// 	NamespaceListResult: armrelay.NamespaceListResult{
		// 		Value: []*armrelay.Namespace{
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-3054"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-3054"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-3054"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-3054.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("oaisdjfoiasdjfoiajsdfoijasd"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/oaisdjfoiasdjfoiajsdfoijasd"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:oaisdjfoiasdjfoiajsdfoijasd"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://oaisdjfoiasdjfoiajsdfoijasd.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("abc123"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/abc123"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:abc123"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://abc123.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-5849"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-5849"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-5849"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-5849.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 					"tag1": to.Ptr("value1"),
		// 					"tag2": to.Ptr("value2"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-4984"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-4984"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-4984"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-4984.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-5606"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-5606"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-5606"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-5606.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-7703"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-7703"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-7703"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-7703.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("zzzzzzzzzzzzzzzzzzzzzz-00001"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/zzzzzzzzzzzzzzzzzzzzzz-00001"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:zzzzzzzzzzzzzzzzzzzzzz-00001"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://zzzzzzzzzzzzzzzzzzzzzz-00001.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-3919"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-3919"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-3919"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-3919.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("aiosdjfaoidjasdoijasdfoijasdfofijsdf"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/aiosdjfaoidjasdoijasdfoijasdfofijsdf"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:aiosdjfaoidjasdoijasdfoijasdfofijsdf"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://aiosdjfaoidjasdoijasdfoijasdfofijsdf.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-3413"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-3413"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-3413"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-3413.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-8695"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-8695"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-8695"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-8695.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-4801"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-4801"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-4801"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-4801.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("example-RelayNamespace-2812"),
		// 				Type: to.Ptr("Microsoft.Relay/Namespaces"),
		// 				ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/resourcegroup/providers/Microsoft.Relay/namespaces/example-RelayNamespace-2812"),
		// 				Location: to.Ptr("South Central US"),
		// 				Properties: &armrelay.NamespaceProperties{
		// 					MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relaynamespace-2812"),
		// 					ProvisioningState: to.Ptr("Succeeded"),
		// 					ServiceBusEndpoint: to.Ptr("https://example-RelayNamespace-2812.servicebus.windows-int.net:443/"),
		// 				},
		// 				SKU: &armrelay.SKU{
		// 					Name: to.Ptr(armrelay.SKUNameStandard),
		// 					Tier: to.Ptr(armrelay.SKUTierStandard),
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceAuthorizationRuleListKey.json
func ExampleNamespacesClient_ListKeys() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().ListKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", 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 = armrelay.NamespacesClientListKeysResponse{
	// 	AccessKeys: &armrelay.AccessKeys{
	// 		KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 		PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 		PrimaryKey: to.Ptr("############################################"),
	// 		SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 		SecondaryKey: to.Ptr("############################################"),
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceAuthorizationRuleRegenerateKey.json
func ExampleNamespacesClient_RegenerateKeys() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().RegenerateKeys(ctx, "resourcegroup", "example-RelayNamespace-01", "example-RelayAuthRules-01", armrelay.RegenerateAccessKeyParameters{
		KeyType: to.Ptr(armrelay.KeyTypePrimaryKey),
	}, 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 = armrelay.NamespacesClientRegenerateKeysResponse{
	// 	AccessKeys: &armrelay.AccessKeys{
	// 		KeyName: to.Ptr("example-RelayAuthRules-01"),
	// 		PrimaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 		PrimaryKey: to.Ptr("############################################"),
	// 		SecondaryConnectionString: to.Ptr("Endpoint=sb://example-Relaynamespace-01.servicebus.windows.net/;SharedAccessKeyName=example-RelayAuthRules-01;SharedAccessKey=############################################"),
	// 		SecondaryKey: to.Ptr("############################################"),
	// 	},
	// }
}

// Generated from example definition: 2024-01-01/NameSpaces/RelayNameSpaceUpdate.json
func ExampleNamespacesClient_Update() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armrelay.NewClientFactory("ffffffff-ffff-ffff-ffff-ffffffffffff", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewNamespacesClient().Update(ctx, "RG-eg", "example-RelayRelayNamespace-01", armrelay.UpdateParameters{
		Tags: map[string]*string{
			"tag3": to.Ptr("value3"),
			"tag4": to.Ptr("value4"),
			"tag5": to.Ptr("value5"),
			"tag6": to.Ptr("value6"),
		},
	}, 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 = armrelay.NamespacesClientUpdateResponse{
	// 	Namespace: &armrelay.Namespace{
	// 		Name: to.Ptr("example-RelayRelayNamespace-01"),
	// 		Type: to.Ptr("Microsoft.Relay/Namespaces"),
	// 		ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/RG-eg/providers/Microsoft.Relay/namespaces/example-RelayRelayNamespace-01"),
	// 		Location: to.Ptr("West US"),
	// 		Properties: &armrelay.NamespaceProperties{
	// 			MetricID: to.Ptr("ffffffff-ffff-ffff-ffff-ffffffffffff:example-Relayrelaynamespace-01"),
	// 			ProvisioningState: to.Ptr("Succeeded"),
	// 		},
	// 		Tags: map[string]*string{
	// 			"tag3": to.Ptr("value3"),
	// 			"tag4": to.Ptr("value4"),
	// 			"tag5": to.Ptr("value5"),
	// 			"tag6": to.Ptr("value6"),
	// 		},
	// 	},
	// }
}
