// 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 armoracledatabase_test

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/oracledatabase/armoracledatabase/v2"
	"log"
)

// Generated from example definition: 2025-09-01/AutonomousDatabaseCharacterSets_Get_MaximumSet_Gen.json
func ExampleAutonomousDatabaseCharacterSetsClient_Get_getAutonomousDbCharacterSetGeneratedByMaximumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armoracledatabase.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutonomousDatabaseCharacterSetsClient().Get(ctx, "eastus", "Replace this value with a string matching RegExp .*", 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 = armoracledatabase.AutonomousDatabaseCharacterSetsClientGetResponse{
	// 	AutonomousDatabaseCharacterSet: armoracledatabase.AutonomousDatabaseCharacterSet{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
	// 		Type: to.Ptr("Oracle.Database/locations/autonomousDatabaseCharacterSets"),
	// 		Properties: &armoracledatabase.AutonomousDatabaseCharacterSetProperties{
	// 			CharacterSet: to.Ptr("AL32UTF8"),
	// 		},
	// 		Name: to.Ptr("jfdylilbunsed"),
	// 		SystemData: &armoracledatabase.SystemData{
	// 			CreatedBy: to.Ptr("sqehacivpuim"),
	// 			CreatedByType: to.Ptr(armoracledatabase.CreatedByTypeUser),
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-08-01T04:32:58.716Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("axrqfdkqylvjv"),
	// 			LastModifiedByType: to.Ptr(armoracledatabase.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-08-01T04:32:58.716Z"); return t}()),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-09-01/AutonomousDatabaseCharacterSets_Get_MinimumSet_Gen.json
func ExampleAutonomousDatabaseCharacterSetsClient_Get_getAutonomousDbCharacterSetGeneratedByMinimumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armoracledatabase.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutonomousDatabaseCharacterSetsClient().Get(ctx, "eastus", "Replace this value with a string matching RegExp .*", 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 = armoracledatabase.AutonomousDatabaseCharacterSetsClientGetResponse{
	// 	AutonomousDatabaseCharacterSet: armoracledatabase.AutonomousDatabaseCharacterSet{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
	// 	},
	// }
}

// Generated from example definition: 2025-09-01/autonomousDatabaseCharacterSet_get.json
func ExampleAutonomousDatabaseCharacterSetsClient_Get_autonomousDatabaseCharacterSetsGet() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armoracledatabase.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewAutonomousDatabaseCharacterSetsClient().Get(ctx, "eastus", "DATABASE", 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 = armoracledatabase.AutonomousDatabaseCharacterSetsClientGetResponse{
	// 	AutonomousDatabaseCharacterSet: armoracledatabase.AutonomousDatabaseCharacterSet{
	// 		ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
	// 		Type: to.Ptr("Oracle.Database/locations/autonomousDatabaseCharacterSets"),
	// 		Properties: &armoracledatabase.AutonomousDatabaseCharacterSetProperties{
	// 			CharacterSet: to.Ptr("AL32UTF8"),
	// 		},
	// 	},
	// }
}

// Generated from example definition: 2025-09-01/AutonomousDatabaseCharacterSets_ListByLocation_MaximumSet_Gen.json
func ExampleAutonomousDatabaseCharacterSetsClient_NewListByLocationPager_listAutonomousDbCharacterSetsByLocationGeneratedByMaximumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armoracledatabase.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutonomousDatabaseCharacterSetsClient().NewListByLocationPager("eastus", 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 = armoracledatabase.AutonomousDatabaseCharacterSetsClientListByLocationResponse{
		// 	AutonomousDatabaseCharacterSetListResult: armoracledatabase.AutonomousDatabaseCharacterSetListResult{
		// 		Value: []*armoracledatabase.AutonomousDatabaseCharacterSet{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
		// 				Type: to.Ptr("Oracle.Database/locations/autonomousDatabaseCharacterSets"),
		// 				Properties: &armoracledatabase.AutonomousDatabaseCharacterSetProperties{
		// 					CharacterSet: to.Ptr("AL32UTF8"),
		// 				},
		// 				Name: to.Ptr("jfdylilbunsed"),
		// 				SystemData: &armoracledatabase.SystemData{
		// 					CreatedBy: to.Ptr("sqehacivpuim"),
		// 					CreatedByType: to.Ptr(armoracledatabase.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-08-01T04:32:58.716Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("axrqfdkqylvjv"),
		// 					LastModifiedByType: to.Ptr(armoracledatabase.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-08-01T04:32:58.716Z"); return t}()),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
		// 				Type: to.Ptr("Oracle.Database/locations/autonomousDatabaseCharacterSets"),
		// 				Properties: &armoracledatabase.AutonomousDatabaseCharacterSetProperties{
		// 					CharacterSet: to.Ptr("UTF8"),
		// 				},
		// 				Name: to.Ptr("dxsmipakagszyubv"),
		// 				SystemData: &armoracledatabase.SystemData{
		// 					CreatedBy: to.Ptr("sqehacivpuim"),
		// 					CreatedByType: to.Ptr(armoracledatabase.CreatedByTypeUser),
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-08-01T04:32:58.716Z"); return t}()),
		// 					LastModifiedBy: to.Ptr("axrqfdkqylvjv"),
		// 					LastModifiedByType: to.Ptr(armoracledatabase.CreatedByTypeUser),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-08-01T04:32:58.716Z"); return t}()),
		// 				},
		// 			},
		// 		},
		// 		NextLink: to.Ptr("https://microsoft.com/a"),
		// 	},
		// }
	}
}

// Generated from example definition: 2025-09-01/AutonomousDatabaseCharacterSets_ListByLocation_MinimumSet_Gen.json
func ExampleAutonomousDatabaseCharacterSetsClient_NewListByLocationPager_listAutonomousDbCharacterSetsByLocationGeneratedByMinimumSetRule() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armoracledatabase.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutonomousDatabaseCharacterSetsClient().NewListByLocationPager("eastus", 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 = armoracledatabase.AutonomousDatabaseCharacterSetsClientListByLocationResponse{
		// 	AutonomousDatabaseCharacterSetListResult: armoracledatabase.AutonomousDatabaseCharacterSetListResult{
		// 		Value: []*armoracledatabase.AutonomousDatabaseCharacterSet{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
		// 			},
		// 		},
		// 	},
		// }
	}
}

// Generated from example definition: 2025-09-01/autonomousDatabaseCharacterSet_listByLocation.json
func ExampleAutonomousDatabaseCharacterSetsClient_NewListByLocationPager_autonomousDatabaseCharacterSetsListByLocation() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armoracledatabase.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewAutonomousDatabaseCharacterSetsClient().NewListByLocationPager("eastus", 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 = armoracledatabase.AutonomousDatabaseCharacterSetsClientListByLocationResponse{
		// 	AutonomousDatabaseCharacterSetListResult: armoracledatabase.AutonomousDatabaseCharacterSetListResult{
		// 		Value: []*armoracledatabase.AutonomousDatabaseCharacterSet{
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
		// 				Type: to.Ptr("Oracle.Database/locations/autonomousDatabaseCharacterSets"),
		// 				Properties: &armoracledatabase.AutonomousDatabaseCharacterSetProperties{
		// 					CharacterSet: to.Ptr("AL32UTF8"),
		// 				},
		// 			},
		// 			{
		// 				ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/DATABASE"),
		// 				Type: to.Ptr("Oracle.Database/locations/autonomousDatabaseCharacterSets"),
		// 				Properties: &armoracledatabase.AutonomousDatabaseCharacterSetProperties{
		// 					CharacterSet: to.Ptr("UTF8"),
		// 				},
		// 			},
		// 		},
		// 	},
		// }
	}
}
