// 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 armweightsandbiases_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/weightsandbiases/armweightsandbiases"
	"log"
)

// Generated from example definition: 2024-09-18/Instances_CreateOrUpdate_MaximumSet_Gen.json
func ExampleInstancesClient_BeginCreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewInstancesClient().BeginCreateOrUpdate(ctx, "rgopenapi", "myinstance", armweightsandbiases.InstanceResource{
		Properties: &armweightsandbiases.InstanceProperties{
			Marketplace: &armweightsandbiases.MarketplaceDetails{
				SubscriptionID:     to.Ptr("00000000-0000-0000-0000-000000000000"),
				SubscriptionStatus: to.Ptr(armweightsandbiases.MarketplaceSubscriptionStatusPendingFulfillmentStart),
				OfferDetails: &armweightsandbiases.OfferDetails{
					PublisherID: to.Ptr("kf"),
					OfferID:     to.Ptr("rfgoevxeke"),
					PlanID:      to.Ptr("ufopn"),
					PlanName:    to.Ptr("adysakgqlryufffz"),
					TermUnit:    to.Ptr("dgrkojow"),
					TermID:      to.Ptr("kklscqq"),
				},
			},
			User: &armweightsandbiases.UserDetails{
				FirstName:    to.Ptr("kiiehcojcldrlndoid"),
				LastName:     to.Ptr("zhkvsfqvthwkfkvgxcruyud"),
				EmailAddress: to.Ptr("user@outlook.com"),
				Upn:          to.Ptr("rmjpgqchpbw"),
				PhoneNumber:  to.Ptr("cogmqmuwfcpstkwbzgkgo"),
			},
			PartnerProperties: &armweightsandbiases.PartnerProperties{
				Region:    to.Ptr(armweightsandbiases.RegionEastus),
				Subdomain: to.Ptr("xkecokwnwtkwnkxfgucmzybzzb"),
			},
			SingleSignOnProperties: &armweightsandbiases.SingleSignOnPropertiesV2{
				Type:            to.Ptr(armweightsandbiases.SingleSignOnTypeSaml),
				State:           to.Ptr(armweightsandbiases.SingleSignOnStatesInitial),
				EnterpriseAppID: to.Ptr("hkxtmpv"),
				URL:             to.Ptr("iqlemoksqdygqyxpp"),
				AADDomains: []*string{
					to.Ptr("mxnw"),
				},
			},
		},
		Identity: &armweightsandbiases.ManagedServiceIdentity{
			Type:                   to.Ptr(armweightsandbiases.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armweightsandbiases.UserAssignedIdentity{},
		},
		Tags:     map[string]*string{},
		Location: to.Ptr("pudewmshbcvbt"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res = armweightsandbiases.InstancesClientCreateOrUpdateResponse{
	// 	InstanceResource: armweightsandbiases.InstanceResource{
	// 		Properties: &armweightsandbiases.InstanceProperties{
	// 			Marketplace: &armweightsandbiases.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				SubscriptionStatus: to.Ptr(armweightsandbiases.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armweightsandbiases.OfferDetails{
	// 					PublisherID: to.Ptr("kf"),
	// 					OfferID: to.Ptr("rfgoevxeke"),
	// 					PlanID: to.Ptr("ufopn"),
	// 					PlanName: to.Ptr("adysakgqlryufffz"),
	// 					TermUnit: to.Ptr("dgrkojow"),
	// 					TermID: to.Ptr("kklscqq"),
	// 				},
	// 			},
	// 			User: &armweightsandbiases.UserDetails{
	// 				FirstName: to.Ptr("kiiehcojcldrlndoid"),
	// 				LastName: to.Ptr("zhkvsfqvthwkfkvgxcruyud"),
	// 				EmailAddress: to.Ptr("user@outlook.com"),
	// 				Upn: to.Ptr("rmjpgqchpbw"),
	// 				PhoneNumber: to.Ptr("cogmqmuwfcpstkwbzgkgo"),
	// 			},
	// 			PartnerProperties: &armweightsandbiases.PartnerProperties{
	// 				Region: to.Ptr(armweightsandbiases.RegionEastus),
	// 				Subdomain: to.Ptr("xkecokwnwtkwnkxfgucmzybzzb"),
	// 			},
	// 			ProvisioningState: to.Ptr(armweightsandbiases.ResourceProvisioningStateSucceeded),
	// 			SingleSignOnProperties: &armweightsandbiases.SingleSignOnPropertiesV2{
	// 				Type: to.Ptr(armweightsandbiases.SingleSignOnTypeSaml),
	// 				State: to.Ptr(armweightsandbiases.SingleSignOnStatesInitial),
	// 				EnterpriseAppID: to.Ptr("hkxtmpv"),
	// 				URL: to.Ptr("iqlemoksqdygqyxpp"),
	// 				AADDomains: []*string{
	// 					to.Ptr("mxnw"),
	// 				},
	// 			},
	// 		},
	// 		Identity: &armweightsandbiases.ManagedServiceIdentity{
	// 			Type: to.Ptr(armweightsandbiases.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armweightsandbiases.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
	// 			TenantID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("pudewmshbcvbt"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.WeightsAndBiases/instance/myinstance"),
	// 		Name: to.Ptr("khwxivnjhglqlobab"),
	// 		Type: to.Ptr("xulngwcujdafqwmdbjdkwo"),
	// 		SystemData: &armweightsandbiases.SystemData{
	// 			CreatedBy: to.Ptr("lhixxxtbajbjlaytguxuewxe"),
	// 			CreatedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("qqyff"),
	// 			LastModifiedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-09-18/Instances_Delete_MaximumSet_Gen.json
func ExampleInstancesClient_BeginDelete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewInstancesClient().BeginDelete(ctx, "rgopenapi", "myinstance", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to poll the result: %v", err)
	}
}

// Generated from example definition: 2024-09-18/Instances_Get_MaximumSet_Gen.json
func ExampleInstancesClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInstancesClient().Get(ctx, "rgopenapi", "myinstance", 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 = armweightsandbiases.InstancesClientGetResponse{
	// 	InstanceResource: armweightsandbiases.InstanceResource{
	// 		Properties: &armweightsandbiases.InstanceProperties{
	// 			Marketplace: &armweightsandbiases.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				SubscriptionStatus: to.Ptr(armweightsandbiases.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armweightsandbiases.OfferDetails{
	// 					PublisherID: to.Ptr("kf"),
	// 					OfferID: to.Ptr("rfgoevxeke"),
	// 					PlanID: to.Ptr("ufopn"),
	// 					PlanName: to.Ptr("adysakgqlryufffz"),
	// 					TermUnit: to.Ptr("dgrkojow"),
	// 					TermID: to.Ptr("kklscqq"),
	// 				},
	// 			},
	// 			User: &armweightsandbiases.UserDetails{
	// 				FirstName: to.Ptr("kiiehcojcldrlndoid"),
	// 				LastName: to.Ptr("zhkvsfqvthwkfkvgxcruyud"),
	// 				EmailAddress: to.Ptr("user@outlook.com"),
	// 				Upn: to.Ptr("rmjpgqchpbw"),
	// 				PhoneNumber: to.Ptr("cogmqmuwfcpstkwbzgkgo"),
	// 			},
	// 			PartnerProperties: &armweightsandbiases.PartnerProperties{
	// 				Region: to.Ptr(armweightsandbiases.RegionEastus),
	// 				Subdomain: to.Ptr("xkecokwnwtkwnkxfgucmzybzzb"),
	// 			},
	// 			ProvisioningState: to.Ptr(armweightsandbiases.ResourceProvisioningStateSucceeded),
	// 			SingleSignOnProperties: &armweightsandbiases.SingleSignOnPropertiesV2{
	// 				Type: to.Ptr(armweightsandbiases.SingleSignOnTypeSaml),
	// 				State: to.Ptr(armweightsandbiases.SingleSignOnStatesInitial),
	// 				EnterpriseAppID: to.Ptr("hkxtmpv"),
	// 				URL: to.Ptr("iqlemoksqdygqyxpp"),
	// 				AADDomains: []*string{
	// 					to.Ptr("mxnw"),
	// 				},
	// 			},
	// 		},
	// 		Identity: &armweightsandbiases.ManagedServiceIdentity{
	// 			Type: to.Ptr(armweightsandbiases.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armweightsandbiases.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
	// 			TenantID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("pudewmshbcvbt"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.WeightsAndBiases/instance/myinstance"),
	// 		Name: to.Ptr("khwxivnjhglqlobab"),
	// 		Type: to.Ptr("xulngwcujdafqwmdbjdkwo"),
	// 		SystemData: &armweightsandbiases.SystemData{
	// 			CreatedBy: to.Ptr("lhixxxtbajbjlaytguxuewxe"),
	// 			CreatedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("qqyff"),
	// 			LastModifiedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2024-09-18/Instances_ListByResourceGroup_MaximumSet_Gen.json
func ExampleInstancesClient_NewListByResourceGroupPager_instancesListByResourceGroupGeneratedByMaximumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewInstancesClient().NewListByResourceGroupPager("rgopenapi", 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 = armweightsandbiases.InstancesClientListByResourceGroupResponse{
		// 	InstanceResourceListResult: armweightsandbiases.InstanceResourceListResult{
		// 		Value: []*armweightsandbiases.InstanceResource{
		// 			{
		// 				Properties: &armweightsandbiases.InstanceProperties{
		// 					Marketplace: &armweightsandbiases.MarketplaceDetails{
		// 						SubscriptionID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 						SubscriptionStatus: to.Ptr(armweightsandbiases.MarketplaceSubscriptionStatusPendingFulfillmentStart),
		// 						OfferDetails: &armweightsandbiases.OfferDetails{
		// 							PublisherID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 							OfferID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 							PlanID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 							PlanName: to.Ptr("adysakgqlryufffz"),
		// 							TermUnit: to.Ptr("dgrkojow"),
		// 							TermID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 						},
		// 					},
		// 					User: &armweightsandbiases.UserDetails{
		// 						FirstName: to.Ptr("kiiehcojcldrlndoid"),
		// 						LastName: to.Ptr("zhkvsfqvthwkfkvgxcruyud"),
		// 						EmailAddress: to.Ptr("user@outlook.com"),
		// 						Upn: to.Ptr("rmjpgqchpbw"),
		// 						PhoneNumber: to.Ptr("cogmqmuwfcpstkwbzgkgo"),
		// 					},
		// 					ProvisioningState: to.Ptr(armweightsandbiases.ResourceProvisioningStateSucceeded),
		// 					PartnerProperties: &armweightsandbiases.PartnerProperties{
		// 						Region: to.Ptr(armweightsandbiases.RegionEastus),
		// 						Subdomain: to.Ptr("xkecokwnwtkwnkxfgucmzybzzb"),
		// 					},
		// 					SingleSignOnProperties: &armweightsandbiases.SingleSignOnPropertiesV2{
		// 						Type: to.Ptr(armweightsandbiases.SingleSignOnTypeSaml),
		// 						State: to.Ptr(armweightsandbiases.SingleSignOnStatesInitial),
		// 						EnterpriseAppID: to.Ptr("hkxtmpv"),
		// 						URL: to.Ptr("iqlemoksqdygqyxpp"),
		// 						AADDomains: []*string{
		// 							to.Ptr("mxnw"),
		// 						},
		// 					},
		// 				},
		// 				Identity: &armweightsandbiases.ManagedServiceIdentity{
		// 					PrincipalID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 					TenantID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 					Type: to.Ptr(armweightsandbiases.ManagedServiceIdentityTypeNone),
		// 					UserAssignedIdentities: map[string]*armweightsandbiases.UserAssignedIdentity{
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("pudewmshbcvbt"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.WeightsAndBiases/instance/myinstance"),
		// 				Name: to.Ptr("khwxivnjhglqlobab"),
		// 				Type: to.Ptr("xulngwcujdafqwmdbjdkwo"),
		// 				SystemData: &armweightsandbiases.SystemData{
		// 					CreatedBy: to.Ptr("lhixxxtbajbjlaytguxuewxe"),
		// 					CreatedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("qqyff"),
		// 					LastModifiedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-18/Instances_ListByResourceGroup_MinimumSet_Gen.json
func ExampleInstancesClient_NewListByResourceGroupPager_instancesListByResourceGroupGeneratedByMinimumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewInstancesClient().NewListByResourceGroupPager("rgopenapi", 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 = armweightsandbiases.InstancesClientListByResourceGroupResponse{
		// 	InstanceResourceListResult: armweightsandbiases.InstanceResourceListResult{
		// 		Value: []*armweightsandbiases.InstanceResource{
		// 			{
		// 				ID: to.Ptr("/subscriptions/0BCB047F-CB71-4DFE-B0BD-88519F411C2F/resourceGroups/myResourceGroup/providers/Microsoft.WeightsAndBiases/instance/myinstance"),
		// 				Location: to.Ptr("pudewmshbcvbt"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-18/Instances_ListBySubscription_MaximumSet_Gen.json
func ExampleInstancesClient_NewListBySubscriptionPager_instancesListBySubscriptionGeneratedByMaximumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewInstancesClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armweightsandbiases.InstancesClientListBySubscriptionResponse{
		// 	InstanceResourceListResult: armweightsandbiases.InstanceResourceListResult{
		// 		Value: []*armweightsandbiases.InstanceResource{
		// 			{
		// 				Properties: &armweightsandbiases.InstanceProperties{
		// 					Marketplace: &armweightsandbiases.MarketplaceDetails{
		// 						SubscriptionID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 						SubscriptionStatus: to.Ptr(armweightsandbiases.MarketplaceSubscriptionStatusPendingFulfillmentStart),
		// 						OfferDetails: &armweightsandbiases.OfferDetails{
		// 							PublisherID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 							OfferID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 							PlanID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 							PlanName: to.Ptr("adysakgqlryufffz"),
		// 							TermUnit: to.Ptr("dgrkojow"),
		// 							TermID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 						},
		// 					},
		// 					User: &armweightsandbiases.UserDetails{
		// 						FirstName: to.Ptr("kiiehcojcldrlndoid"),
		// 						LastName: to.Ptr("zhkvsfqvthwkfkvgxcruyud"),
		// 						EmailAddress: to.Ptr("user@outlook.com"),
		// 						Upn: to.Ptr("rmjpgqchpbw"),
		// 						PhoneNumber: to.Ptr("cogmqmuwfcpstkwbzgkgo"),
		// 					},
		// 					ProvisioningState: to.Ptr(armweightsandbiases.ResourceProvisioningStateSucceeded),
		// 					PartnerProperties: &armweightsandbiases.PartnerProperties{
		// 						Region: to.Ptr(armweightsandbiases.RegionEastus),
		// 						Subdomain: to.Ptr("xkecokwnwtkwnkxfgucmzybzzb"),
		// 					},
		// 					SingleSignOnProperties: &armweightsandbiases.SingleSignOnPropertiesV2{
		// 						Type: to.Ptr(armweightsandbiases.SingleSignOnTypeSaml),
		// 						State: to.Ptr(armweightsandbiases.SingleSignOnStatesInitial),
		// 						EnterpriseAppID: to.Ptr("hkxtmpv"),
		// 						URL: to.Ptr("iqlemoksqdygqyxpp"),
		// 						AADDomains: []*string{
		// 							to.Ptr("mxnw"),
		// 						},
		// 					},
		// 				},
		// 				Identity: &armweightsandbiases.ManagedServiceIdentity{
		// 					PrincipalID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 					TenantID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
		// 					Type: to.Ptr(armweightsandbiases.ManagedServiceIdentityTypeNone),
		// 					UserAssignedIdentities: map[string]*armweightsandbiases.UserAssignedIdentity{
		// 					},
		// 				},
		// 				Tags: map[string]*string{
		// 				},
		// 				Location: to.Ptr("pudewmshbcvbt"),
		// 				ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.WeightsAndBiases/instance/myinstance"),
		// 				Name: to.Ptr("khwxivnjhglqlobab"),
		// 				Type: to.Ptr("xulngwcujdafqwmdbjdkwo"),
		// 				SystemData: &armweightsandbiases.SystemData{
		// 					CreatedBy: to.Ptr("lhixxxtbajbjlaytguxuewxe"),
		// 					CreatedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("qqyff"),
		// 					LastModifiedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-18/Instances_ListBySubscription_MinimumSet_Gen.json
func ExampleInstancesClient_NewListBySubscriptionPager_instancesListBySubscriptionGeneratedByMinimumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewInstancesClient().NewListBySubscriptionPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page = armweightsandbiases.InstancesClientListBySubscriptionResponse{
		// 	InstanceResourceListResult: armweightsandbiases.InstanceResourceListResult{
		// 		Value: []*armweightsandbiases.InstanceResource{
		// 			{
		// 				ID: to.Ptr("/subscriptions/0BCB047F-CB71-4DFE-B0BD-88519F411C2F/resourceGroups/myResourceGroup/providers/Microsoft.WeightsAndBiases/instance/myinstance"),
		// 				Location: to.Ptr("pudewmshbcvbt"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2024-09-18/Instances_Update_MaximumSet_Gen.json
func ExampleInstancesClient_Update() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armweightsandbiases.NewClientFactory("0BCB047F-CB71-4DFE-B0BD-88519F411C2F", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInstancesClient().Update(ctx, "rgopenapi", "myinstance", armweightsandbiases.InstanceResourceUpdate{
		Tags: map[string]*string{},
		Identity: &armweightsandbiases.ManagedServiceIdentity{
			Type:                   to.Ptr(armweightsandbiases.ManagedServiceIdentityTypeNone),
			UserAssignedIdentities: map[string]*armweightsandbiases.UserAssignedIdentity{},
		},
	}, 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 = armweightsandbiases.InstancesClientUpdateResponse{
	// 	InstanceResource: armweightsandbiases.InstanceResource{
	// 		Properties: &armweightsandbiases.InstanceProperties{
	// 			Marketplace: &armweightsandbiases.MarketplaceDetails{
	// 				SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 				SubscriptionStatus: to.Ptr(armweightsandbiases.MarketplaceSubscriptionStatusPendingFulfillmentStart),
	// 				OfferDetails: &armweightsandbiases.OfferDetails{
	// 					PublisherID: to.Ptr("kf"),
	// 					OfferID: to.Ptr("rfgoevxeke"),
	// 					PlanID: to.Ptr("ufopn"),
	// 					PlanName: to.Ptr("adysakgqlryufffz"),
	// 					TermUnit: to.Ptr("dgrkojow"),
	// 					TermID: to.Ptr("kklscqq"),
	// 				},
	// 			},
	// 			User: &armweightsandbiases.UserDetails{
	// 				FirstName: to.Ptr("kiiehcojcldrlndoid"),
	// 				LastName: to.Ptr("zhkvsfqvthwkfkvgxcruyud"),
	// 				EmailAddress: to.Ptr("user@outlook.com"),
	// 				Upn: to.Ptr("rmjpgqchpbw"),
	// 				PhoneNumber: to.Ptr("cogmqmuwfcpstkwbzgkgo"),
	// 			},
	// 			PartnerProperties: &armweightsandbiases.PartnerProperties{
	// 				Region: to.Ptr(armweightsandbiases.RegionEastus),
	// 				Subdomain: to.Ptr("xkecokwnwtkwnkxfgucmzybzzb"),
	// 			},
	// 			ProvisioningState: to.Ptr(armweightsandbiases.ResourceProvisioningStateSucceeded),
	// 			SingleSignOnProperties: &armweightsandbiases.SingleSignOnPropertiesV2{
	// 				Type: to.Ptr(armweightsandbiases.SingleSignOnTypeSaml),
	// 				State: to.Ptr(armweightsandbiases.SingleSignOnStatesInitial),
	// 				EnterpriseAppID: to.Ptr("hkxtmpv"),
	// 				URL: to.Ptr("iqlemoksqdygqyxpp"),
	// 				AADDomains: []*string{
	// 					to.Ptr("mxnw"),
	// 				},
	// 			},
	// 		},
	// 		Identity: &armweightsandbiases.ManagedServiceIdentity{
	// 			Type: to.Ptr(armweightsandbiases.ManagedServiceIdentityTypeNone),
	// 			UserAssignedIdentities: map[string]*armweightsandbiases.UserAssignedIdentity{
	// 			},
	// 			PrincipalID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
	// 			TenantID: to.Ptr("0BCB047F-CB71-4DFE-B0BD-88519F411C2F"),
	// 		},
	// 		Tags: map[string]*string{
	// 		},
	// 		Location: to.Ptr("pudewmshbcvbt"),
	// 		ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/myResourceGroup/providers/Microsoft.WeightsAndBiases/instance/myinstance"),
	// 		Name: to.Ptr("khwxivnjhglqlobab"),
	// 		Type: to.Ptr("xulngwcujdafqwmdbjdkwo"),
	// 		SystemData: &armweightsandbiases.SystemData{
	// 			CreatedBy: to.Ptr("lhixxxtbajbjlaytguxuewxe"),
	// 			CreatedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("qqyff"),
	// 			LastModifiedByType: to.Ptr(armweightsandbiases.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-09-18T18:08:48.680Z"); return t}()),
	// 		},
	// 	},
	// }
}
