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

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

// Generated from example definition: 2025-07-01-preview/contentTemplates/GetProductTemplateById.json
func ExampleProductTemplateClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armsecurityinsights.NewClientFactory("d0cfeab2-9ae0-4464-9919-dccaee2e48f0", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewProductTemplateClient().Get(ctx, "myRg", "myWorkspace", "8365ebfe-a381-45b7-ad08-7d818070e11f", 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 = armsecurityinsights.ProductTemplateClientGetResponse{
	// 	ProductTemplateModel: armsecurityinsights.ProductTemplateModel{
	// 		Name: to.Ptr("8365ebfe-a381-45b7-ad08-7d818070e11f"),
	// 		Type: to.Ptr("Microsoft.SecurityInsights/contentproducttemplates"),
	// 		Etag: to.Ptr("\"0300bf09-0000-0000-0000-5c37296e0000\""),
	// 		ID: to.Ptr("/subscriptions/d0cfeab2-9ae0-4464-9919-dccaee2e48f0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/contentProductTemplates/8365ebfe-a381-45b7-ad08-7d818070e11f"),
	// 		Properties: &armsecurityinsights.ProductTemplateProperties{
	// 			ContentID: to.Ptr("contentId"),
	// 			ContentKind: to.Ptr(armsecurityinsights.Kind("Workbooks")),
	// 			ContentProductID: to.Ptr("packageId-wb-rimnsoeh4nt32"),
	// 			DisplayName: to.Ptr("My installed template"),
	// 			PackageID: to.Ptr("packageId"),
	// 			PackageKind: to.Ptr(armsecurityinsights.PackageKindStandalone),
	// 			PackageName: to.Ptr("package name"),
	// 			PackageVersion: to.Ptr("1.0.0"),
	// 			Source: &armsecurityinsights.MetadataSource{
	// 				Name: to.Ptr("Source name"),
	// 				Kind: to.Ptr(armsecurityinsights.SourceKind("Standalone")),
	// 			},
	// 			Version: to.Ptr("1.0.0"),
	// 		},
	// 		SystemData: &armsecurityinsights.SystemData{
	// 			CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.0928001Z"); return t}()),
	// 			CreatedBy: to.Ptr("string"),
	// 			CreatedByType: to.Ptr(armsecurityinsights.CreatedByTypeUser),
	// 			LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-04-27T21:53:29.0928001Z"); return t}()),
	// 			LastModifiedBy: to.Ptr("string"),
	// 			LastModifiedByType: to.Ptr(armsecurityinsights.CreatedByTypeUser),
	// 		},
	// 	},
	// }
}
