// 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 armiotoperations_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/iotoperations/armiotoperations"
	"log"
)

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAdlsv2() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "adlsv2-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeDataLakeStorage),
			DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
				Host: to.Ptr("example.blob.core.windows.net"),
				Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
					Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodAccessToken),
					AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
						SecretRef: to.Ptr("my-secret"),
					},
				},
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeDataLakeStorage),
	// 			DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
	// 				Host: to.Ptr("example.blob.core.windows.net"),
	// 				Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
	// 					Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodAccessToken),
	// 					AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
	// 						SecretRef: to.Ptr("my-secret"),
	// 					},
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAdx() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "adx-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
			DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
				Host: to.Ptr("example.westeurope.kusto.windows.net"),
				Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
					Method:                                to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
				},
				Database: to.Ptr("example-database"),
				Batching: &armiotoperations.BatchingConfiguration{
					LatencySeconds: to.Ptr[int32](9312),
					MaxMessages:    to.Ptr[int32](9028),
				},
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
	// 			DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
	// 				Host: to.Ptr("example.westeurope.kusto.windows.net"),
	// 				Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
	// 					Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 					},
	// 				},
	// 				Database: to.Ptr("example-database"),
	// 				Batching: &armiotoperations.BatchingConfiguration{
	// 					LatencySeconds: to.Ptr[int32](9312),
	// 					MaxMessages: to.Ptr[int32](9028),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAio() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "aio-builtin-broker-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
				Host: to.Ptr("aio-broker:18883"),
				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
					ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
						Audience: to.Ptr("aio-internal"),
					},
				},
				TLS: &armiotoperations.TLSProperties{
					Mode:                             to.Ptr(armiotoperations.OperationalModeEnabled),
					TrustedCaCertificateConfigMapRef: to.Ptr("aio-ca-trust-bundle-test-only"),
				},
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
	// 			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
	// 				Host: to.Ptr("aio-broker:18883"),
	// 				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
	// 					ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
	// 						Audience: to.Ptr("aio-internal"),
	// 					},
	// 				},
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					TrustedCaCertificateConfigMapRef: to.Ptr("aio-ca-trust-bundle-test-only"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateEventGrid() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "event-grid-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
				Host: to.Ptr("example.westeurope-1.ts.eventgrid.azure.net:8883"),
				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
					Method:                                to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
				},
				TLS: &armiotoperations.TLSProperties{
					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
				},
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
	// 			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
	// 				Host: to.Ptr("example.westeurope-1.ts.eventgrid.azure.net:8883"),
	// 				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
	// 					Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 					},
	// 				},
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateEventHub() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "event-hub-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
			KafkaSettings: &armiotoperations.DataflowEndpointKafka{
				Host: to.Ptr("example.servicebus.windows.net:9093"),
				Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
					Method:                                to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
				},
				TLS: &armiotoperations.TLSProperties{
					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
				},
				ConsumerGroupID: to.Ptr("aiodataflows"),
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
	// 			KafkaSettings: &armiotoperations.DataflowEndpointKafka{
	// 				Host: to.Ptr("example.servicebus.windows.net:9093"),
	// 				Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
	// 					Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 					},
	// 				},
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 				},
	// 				ConsumerGroupID: to.Ptr("aiodataflows"),
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateFabric() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "fabric-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeFabricOneLake),
			FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
				Host: to.Ptr("onelake.dfs.fabric.microsoft.com"),
				Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
					Method:                                to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
				},
				Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
					WorkspaceName: to.Ptr("example-workspace"),
					LakehouseName: to.Ptr("example-lakehouse"),
				},
				OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeTables),
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeFabricOneLake),
	// 			FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
	// 				Host: to.Ptr("onelake.dfs.fabric.microsoft.com"),
	// 				Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
	// 					Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 					},
	// 				},
	// 				Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
	// 					WorkspaceName: to.Ptr("example-workspace"),
	// 					LakehouseName: to.Ptr("example-lakehouse"),
	// 				},
	// 				OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeTables),
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateKafka() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "generic-kafka-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
			KafkaSettings: &armiotoperations.DataflowEndpointKafka{
				Host: to.Ptr("example.kafka.local:9093"),
				Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
					Method: to.Ptr(armiotoperations.KafkaAuthMethodSasl),
					SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
						SaslType:  to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
						SecretRef: to.Ptr("my-secret"),
					},
				},
				TLS: &armiotoperations.TLSProperties{
					Mode:                             to.Ptr(armiotoperations.OperationalModeEnabled),
					TrustedCaCertificateConfigMapRef: to.Ptr("ca-certificates"),
				},
				ConsumerGroupID: to.Ptr("dataflows"),
				Compression:     to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionGzip),
				Batching: &armiotoperations.DataflowEndpointKafkaBatching{
					Mode:        to.Ptr(armiotoperations.OperationalModeEnabled),
					LatencyMs:   to.Ptr[int32](5),
					MaxBytes:    to.Ptr[int32](1000000),
					MaxMessages: to.Ptr[int32](100000),
				},
				PartitionStrategy:    to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
				KafkaAcks:            to.Ptr(armiotoperations.DataflowEndpointKafkaAcksAll),
				CopyMqttProperties:   to.Ptr(armiotoperations.OperationalModeEnabled),
				CloudEventAttributes: to.Ptr(armiotoperations.CloudEventAttributeTypePropagate),
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
	// 			KafkaSettings: &armiotoperations.DataflowEndpointKafka{
	// 				Host: to.Ptr("example.kafka.local:9093"),
	// 				Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
	// 					Method: to.Ptr(armiotoperations.KafkaAuthMethodSasl),
	// 					SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
	// 						SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
	// 						SecretRef: to.Ptr("my-secret"),
	// 					},
	// 				},
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					TrustedCaCertificateConfigMapRef: to.Ptr("ca-certificates"),
	// 				},
	// 				ConsumerGroupID: to.Ptr("dataflows"),
	// 				Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionGzip),
	// 				Batching: &armiotoperations.DataflowEndpointKafkaBatching{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					LatencyMs: to.Ptr[int32](5),
	// 					MaxBytes: to.Ptr[int32](1000000),
	// 					MaxMessages: to.Ptr[int32](100000),
	// 				},
	// 				PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
	// 				KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksAll),
	// 				CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 				CloudEventAttributes: to.Ptr(armiotoperations.CloudEventAttributeTypePropagate),
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateLocalStorage() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "local-storage-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeLocalStorage),
			LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
				PersistentVolumeClaimRef: to.Ptr("example-pvc"),
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeLocalStorage),
	// 			LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
	// 				PersistentVolumeClaimRef: to.Ptr("example-pvc"),
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
			DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
				Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
					Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
						Audience: to.Ptr("psxomrfbhoflycm"),
					},
					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
						Scope:    to.Ptr("zop"),
						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
					},
				},
				Database: to.Ptr("yqcdpjsifm"),
				Host:     to.Ptr("<cluster>.<region>.kusto.windows.net"),
				Batching: &armiotoperations.BatchingConfiguration{
					LatencySeconds: to.Ptr[int32](9312),
					MaxMessages:    to.Ptr[int32](9028),
				},
			},
			DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
				Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
					Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
					AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
						SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
					},
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
						Audience: to.Ptr("psxomrfbhoflycm"),
					},
					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
						Scope:    to.Ptr("zop"),
						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
					},
				},
				Host: to.Ptr("<account>.blob.core.windows.net"),
				Batching: &armiotoperations.BatchingConfiguration{
					LatencySeconds: to.Ptr[int32](9312),
					MaxMessages:    to.Ptr[int32](9028),
				},
			},
			FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
				Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
					Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
						Audience: to.Ptr("psxomrfbhoflycm"),
					},
					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
						Scope:    to.Ptr("zop"),
						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
					},
				},
				Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
					LakehouseName: to.Ptr("wpeathi"),
					WorkspaceName: to.Ptr("nwgmitkbljztgms"),
				},
				OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
				Host:            to.Ptr("https://<host>.fabric.microsoft.com"),
				Batching: &armiotoperations.BatchingConfiguration{
					LatencySeconds: to.Ptr[int32](9312),
					MaxMessages:    to.Ptr[int32](9028),
				},
			},
			KafkaSettings: &armiotoperations.DataflowEndpointKafka{
				Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
					Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
						Audience: to.Ptr("psxomrfbhoflycm"),
					},
					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
						Scope:    to.Ptr("zop"),
						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
					},
					SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
						SaslType:  to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
						SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
					},
					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
						SecretRef: to.Ptr("afwizrystfslkfqd"),
					},
				},
				ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
				Host:            to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
				Batching: &armiotoperations.DataflowEndpointKafkaBatching{
					Mode:        to.Ptr(armiotoperations.OperationalModeEnabled),
					LatencyMs:   to.Ptr[int32](3679),
					MaxBytes:    to.Ptr[int32](8887),
					MaxMessages: to.Ptr[int32](2174),
				},
				CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
				Compression:        to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
				KafkaAcks:          to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
				PartitionStrategy:  to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
				TLS: &armiotoperations.TLSProperties{
					Mode:                             to.Ptr(armiotoperations.OperationalModeEnabled),
					TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
				},
			},
			LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
				PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
			},
			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
					Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
						Audience: to.Ptr("psxomrfbhoflycm"),
					},
					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
						Scope:    to.Ptr("zop"),
						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
					},
					ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
						Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
					},
					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
						SecretRef: to.Ptr("afwizrystfslkfqd"),
					},
				},
				ClientIDPrefix:       to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
				Host:                 to.Ptr("nyhnxqnbspstctl"),
				Protocol:             to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
				KeepAliveSeconds:     to.Ptr[int32](0),
				Retain:               to.Ptr(armiotoperations.MqttRetainTypeKeep),
				MaxInflightMessages:  to.Ptr[int32](0),
				Qos:                  to.Ptr[int32](1),
				SessionExpirySeconds: to.Ptr[int32](0),
				TLS: &armiotoperations.TLSProperties{
					Mode:                             to.Ptr(armiotoperations.OperationalModeEnabled),
					TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
				},
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
	// 			DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
	// 				Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
	// 					Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 				},
	// 				Database: to.Ptr("yqcdpjsifm"),
	// 				Host: to.Ptr("<cluster>.<region>.kusto.windows.net"),
	// 				Batching: &armiotoperations.BatchingConfiguration{
	// 					LatencySeconds: to.Ptr[int32](1228),
	// 					MaxMessages: to.Ptr[int32](171),
	// 				},
	// 			},
	// 			DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
	// 				Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
	// 					Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
	// 					AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
	// 						SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
	// 					},
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 				},
	// 				Host: to.Ptr("<account>.blob.core.windows.net"),
	// 				Batching: &armiotoperations.BatchingConfiguration{
	// 					LatencySeconds: to.Ptr[int32](1228),
	// 					MaxMessages: to.Ptr[int32](171),
	// 				},
	// 			},
	// 			FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
	// 				Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
	// 					Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 				},
	// 				Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
	// 					LakehouseName: to.Ptr("wpeathi"),
	// 					WorkspaceName: to.Ptr("nwgmitkbljztgms"),
	// 				},
	// 				OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
	// 				Host: to.Ptr("https://<host>.fabric.microsoft.com"),
	// 				Batching: &armiotoperations.BatchingConfiguration{
	// 					LatencySeconds: to.Ptr[int32](1228),
	// 					MaxMessages: to.Ptr[int32](171),
	// 				},
	// 			},
	// 			KafkaSettings: &armiotoperations.DataflowEndpointKafka{
	// 				Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
	// 					Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 					SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
	// 						SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
	// 						SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
	// 					},
	// 					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
	// 						SecretRef: to.Ptr("afwizrystfslkfqd"),
	// 					},
	// 				},
	// 				ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
	// 				Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
	// 				Batching: &armiotoperations.DataflowEndpointKafkaBatching{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					LatencyMs: to.Ptr[int32](3679),
	// 					MaxBytes: to.Ptr[int32](8887),
	// 					MaxMessages: to.Ptr[int32](2174),
	// 				},
	// 				CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 				Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
	// 				KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
	// 				PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
	// 				},
	// 			},
	// 			LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
	// 				PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
	// 			},
	// 			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
	// 				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
	// 					Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 					ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
	// 						Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
	// 					},
	// 					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
	// 						SecretRef: to.Ptr("afwizrystfslkfqd"),
	// 					},
	// 				},
	// 				ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
	// 				Host: to.Ptr("nyhnxqnbspstctl"),
	// 				Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
	// 				KeepAliveSeconds: to.Ptr[int32](0),
	// 				Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
	// 				MaxInflightMessages: to.Ptr[int32](0),
	// 				Qos: to.Ptr[int32](1),
	// 				SessionExpirySeconds: to.Ptr[int32](0),
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateMqtt() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "generic-mqtt-broker-endpoint", armiotoperations.DataflowEndpointResource{
		Properties: &armiotoperations.DataflowEndpointProperties{
			EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
				Host: to.Ptr("example.broker.local:1883"),
				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
					Method: to.Ptr(armiotoperations.MqttAuthMethodX509Certificate),
					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
						SecretRef: to.Ptr("example-secret"),
					},
				},
				TLS: &armiotoperations.TLSProperties{
					Mode: to.Ptr(armiotoperations.OperationalModeDisabled),
				},
				ClientIDPrefix:       to.Ptr("factory-gateway"),
				Retain:               to.Ptr(armiotoperations.MqttRetainTypeKeep),
				SessionExpirySeconds: to.Ptr[int32](3600),
				Qos:                  to.Ptr[int32](1),
				Protocol:             to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
				MaxInflightMessages:  to.Ptr[int32](100),
				KeepAliveSeconds:     to.Ptr[int32](60),
			},
		},
		ExtendedLocation: &armiotoperations.ExtendedLocation{
			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		},
	}, 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 = armiotoperations.DataflowEndpointClientCreateOrUpdateResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
	// 			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
	// 				Host: to.Ptr("example.broker.local:1883"),
	// 				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
	// 					Method: to.Ptr(armiotoperations.MqttAuthMethodX509Certificate),
	// 					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
	// 						SecretRef: to.Ptr("example-secret"),
	// 					},
	// 				},
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeDisabled),
	// 				},
	// 				ClientIDPrefix: to.Ptr("factory-gateway"),
	// 				Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
	// 				SessionExpirySeconds: to.Ptr[int32](3600),
	// 				Qos: to.Ptr[int32](1),
	// 				Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
	// 				MaxInflightMessages: to.Ptr[int32](100),
	// 				KeepAliveSeconds: to.Ptr[int32](60),
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDataflowEndpointClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDataflowEndpointClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", 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 = armiotoperations.DataflowEndpointClientGetResponse{
	// 	DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
	// 		Properties: &armiotoperations.DataflowEndpointProperties{
	// 			EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
	// 			DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
	// 				Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
	// 					Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 				},
	// 				Database: to.Ptr("yqcdpjsifm"),
	// 				Host: to.Ptr("<cluster>.<region>.kusto.windows.net"),
	// 				Batching: &armiotoperations.BatchingConfiguration{
	// 					LatencySeconds: to.Ptr[int32](1228),
	// 					MaxMessages: to.Ptr[int32](171),
	// 				},
	// 			},
	// 			DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
	// 				Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
	// 					Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
	// 					AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
	// 						SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
	// 					},
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 				},
	// 				Host: to.Ptr("<account>.blob.core.windows.net"),
	// 				Batching: &armiotoperations.BatchingConfiguration{
	// 					LatencySeconds: to.Ptr[int32](1228),
	// 					MaxMessages: to.Ptr[int32](171),
	// 				},
	// 			},
	// 			FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
	// 				Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
	// 					Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 				},
	// 				Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
	// 					LakehouseName: to.Ptr("wpeathi"),
	// 					WorkspaceName: to.Ptr("nwgmitkbljztgms"),
	// 				},
	// 				OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
	// 				Host: to.Ptr("https://<host>.fabric.microsoft.com"),
	// 				Batching: &armiotoperations.BatchingConfiguration{
	// 					LatencySeconds: to.Ptr[int32](1228),
	// 					MaxMessages: to.Ptr[int32](171),
	// 				},
	// 			},
	// 			KafkaSettings: &armiotoperations.DataflowEndpointKafka{
	// 				Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
	// 					Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 					SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
	// 						SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
	// 						SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
	// 					},
	// 					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
	// 						SecretRef: to.Ptr("afwizrystfslkfqd"),
	// 					},
	// 				},
	// 				ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
	// 				Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
	// 				Batching: &armiotoperations.DataflowEndpointKafkaBatching{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					LatencyMs: to.Ptr[int32](3679),
	// 					MaxBytes: to.Ptr[int32](8887),
	// 					MaxMessages: to.Ptr[int32](2174),
	// 				},
	// 				CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 				Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
	// 				KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
	// 				PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
	// 				},
	// 			},
	// 			LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
	// 				PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
	// 			},
	// 			MqttSettings: &armiotoperations.DataflowEndpointMqtt{
	// 				Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
	// 					Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
	// 					SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
	// 						Audience: to.Ptr("psxomrfbhoflycm"),
	// 					},
	// 					UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
	// 						ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
	// 						Scope: to.Ptr("zop"),
	// 						TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
	// 					},
	// 					ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
	// 						Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
	// 					},
	// 					X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
	// 						SecretRef: to.Ptr("afwizrystfslkfqd"),
	// 					},
	// 				},
	// 				ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
	// 				Host: to.Ptr("nyhnxqnbspstctl"),
	// 				Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
	// 				KeepAliveSeconds: to.Ptr[int32](0),
	// 				Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
	// 				MaxInflightMessages: to.Ptr[int32](0),
	// 				Qos: to.Ptr[int32](1),
	// 				SessionExpirySeconds: to.Ptr[int32](0),
	// 				TLS: &armiotoperations.TLSProperties{
	// 					Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
	// 					TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
	// 				},
	// 			},
	// 			ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
	// 		},
	// 		ExtendedLocation: &armiotoperations.ExtendedLocation{
	// 			Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
	// 			Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
	// 		},
	// 		ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
	// 		Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
	// 		Type: to.Ptr("iay"),
	// 		SystemData: &armiotoperations.SystemData{
	// 			CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
	// 			CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("gnicpuszwd"),
	// 			LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDataflowEndpointClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", 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 = armiotoperations.DataflowEndpointClientListByResourceGroupResponse{
		// 	DataflowEndpointResourceListResult: armiotoperations.DataflowEndpointResourceListResult{
		// 		Value: []*armiotoperations.DataflowEndpointResource{
		// 			{
		// 				Properties: &armiotoperations.DataflowEndpointProperties{
		// 					EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
		// 					DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
		// 						Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
		// 							Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
		// 							SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
		// 								Audience: to.Ptr("psxomrfbhoflycm"),
		// 							},
		// 							UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
		// 								ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
		// 								Scope: to.Ptr("zop"),
		// 								TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
		// 							},
		// 						},
		// 						Database: to.Ptr("yqcdpjsifm"),
		// 						Host: to.Ptr("<cluster>.<region>.kusto.windows.net"),
		// 						Batching: &armiotoperations.BatchingConfiguration{
		// 							LatencySeconds: to.Ptr[int32](1228),
		// 							MaxMessages: to.Ptr[int32](171),
		// 						},
		// 					},
		// 					DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
		// 						Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
		// 							Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
		// 							AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
		// 								SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
		// 							},
		// 							SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
		// 								Audience: to.Ptr("psxomrfbhoflycm"),
		// 							},
		// 							UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
		// 								ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
		// 								Scope: to.Ptr("zop"),
		// 								TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
		// 							},
		// 						},
		// 						Host: to.Ptr("<account>.blob.core.windows.net"),
		// 						Batching: &armiotoperations.BatchingConfiguration{
		// 							LatencySeconds: to.Ptr[int32](1228),
		// 							MaxMessages: to.Ptr[int32](171),
		// 						},
		// 					},
		// 					FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
		// 						Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
		// 							Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
		// 							SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
		// 								Audience: to.Ptr("psxomrfbhoflycm"),
		// 							},
		// 							UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
		// 								ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
		// 								Scope: to.Ptr("zop"),
		// 								TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
		// 							},
		// 						},
		// 						Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
		// 							LakehouseName: to.Ptr("wpeathi"),
		// 							WorkspaceName: to.Ptr("nwgmitkbljztgms"),
		// 						},
		// 						OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
		// 						Host: to.Ptr("https://<host>.fabric.microsoft.com"),
		// 						Batching: &armiotoperations.BatchingConfiguration{
		// 							LatencySeconds: to.Ptr[int32](1228),
		// 							MaxMessages: to.Ptr[int32](171),
		// 						},
		// 					},
		// 					KafkaSettings: &armiotoperations.DataflowEndpointKafka{
		// 						Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
		// 							Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
		// 							SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
		// 								Audience: to.Ptr("psxomrfbhoflycm"),
		// 							},
		// 							UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
		// 								ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
		// 								Scope: to.Ptr("zop"),
		// 								TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
		// 							},
		// 							SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
		// 								SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
		// 								SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
		// 							},
		// 							X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
		// 								SecretRef: to.Ptr("afwizrystfslkfqd"),
		// 							},
		// 						},
		// 						ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
		// 						Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
		// 						Batching: &armiotoperations.DataflowEndpointKafkaBatching{
		// 							Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
		// 							LatencyMs: to.Ptr[int32](3679),
		// 							MaxBytes: to.Ptr[int32](8887),
		// 							MaxMessages: to.Ptr[int32](2174),
		// 						},
		// 						CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
		// 						Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
		// 						KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
		// 						PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
		// 						TLS: &armiotoperations.TLSProperties{
		// 							Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
		// 							TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
		// 						},
		// 					},
		// 					LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
		// 						PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
		// 					},
		// 					MqttSettings: &armiotoperations.DataflowEndpointMqtt{
		// 						Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
		// 							Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
		// 							SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
		// 								Audience: to.Ptr("psxomrfbhoflycm"),
		// 							},
		// 							UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
		// 								ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
		// 								Scope: to.Ptr("zop"),
		// 								TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
		// 							},
		// 							ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
		// 								Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
		// 							},
		// 							X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
		// 								SecretRef: to.Ptr("afwizrystfslkfqd"),
		// 							},
		// 						},
		// 						ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
		// 						Host: to.Ptr("nyhnxqnbspstctl"),
		// 						Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
		// 						KeepAliveSeconds: to.Ptr[int32](0),
		// 						Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
		// 						MaxInflightMessages: to.Ptr[int32](0),
		// 						Qos: to.Ptr[int32](1),
		// 						SessionExpirySeconds: to.Ptr[int32](0),
		// 						TLS: &armiotoperations.TLSProperties{
		// 							Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
		// 							TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
		// 						},
		// 					},
		// 					ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
		// 				},
		// 				ExtendedLocation: &armiotoperations.ExtendedLocation{
		// 					Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
		// 					Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
		// 				},
		// 				ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123"),
		// 				Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
		// 				Type: to.Ptr("iay"),
		// 				SystemData: &armiotoperations.SystemData{
		// 					CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
		// 					CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("gnicpuszwd"),
		// 					LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}
