// 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/contentPackages/GetProductPackageById.json
func ExampleProductPackageClient_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.NewProductPackageClient().Get(ctx, "myRg", "myWorkspace", "str.azure-sentinel-solution-str", 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.ProductPackageClientGetResponse{
	// 	ProductPackageModel: armsecurityinsights.ProductPackageModel{
	// 		Name: to.Ptr("str.azure-sentinel-solution-str"),
	// 		Type: to.Ptr("Microsoft.SecurityInsights/contentproductpackages"),
	// 		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/contentProductPackages/str.azure-sentinel-solution-str"),
	// 		Properties: &armsecurityinsights.ProductPackageProperties{
	// 			Author: &armsecurityinsights.MetadataAuthor{
	// 				Name: to.Ptr("Microsoft"),
	// 				Email: to.Ptr("support@microsoft.com"),
	// 			},
	// 			Categories: &armsecurityinsights.MetadataCategories{
	// 				Domains: []*string{
	// 					to.Ptr("Security - Cloud Security"),
	// 				},
	// 			},
	// 			ContentID: to.Ptr("str.azure-sentinel-solution-str"),
	// 			ContentKind: to.Ptr(armsecurityinsights.PackageKindSolution),
	// 			ContentProductID: to.Ptr("str.azure-sentinel-solution-str-sl-igl6jawr4gwmu"),
	// 			Dependencies: &armsecurityinsights.MetadataDependencies{
	// 				Criteria: []*armsecurityinsights.MetadataDependencies{
	// 					{
	// 						ContentID: to.Ptr("strDataConnector"),
	// 						Kind: to.Ptr(armsecurityinsights.KindDataConnector),
	// 						Version: to.Ptr("2.0.0"),
	// 					},
	// 					{
	// 						ContentID: to.Ptr("str-Parser"),
	// 						Kind: to.Ptr(armsecurityinsights.KindParser),
	// 						Version: to.Ptr("2.0.0"),
	// 					},
	// 				},
	// 				Operator: to.Ptr(armsecurityinsights.Operator("AND")),
	// 			},
	// 			DisplayName: to.Ptr("str"),
	// 			FirstPublishDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.DateOnly, "2022-04-01"); return t}()),
	// 			InstalledVersion: to.Ptr("2.0.0"),
	// 			Providers: []*string{
	// 				to.Ptr("Microsoft"),
	// 			},
	// 			Source: &armsecurityinsights.MetadataSource{
	// 				Name: to.Ptr("str"),
	// 				Kind: to.Ptr(armsecurityinsights.SourceKindSolution),
	// 				SourceID: to.Ptr("str.azure-sentinel-solution-str"),
	// 			},
	// 			Support: &armsecurityinsights.MetadataSupport{
	// 				Name: to.Ptr("Microsoft Corporation"),
	// 				Email: to.Ptr("support@microsoft.com"),
	// 				Link: to.Ptr("https://support.microsoft.com/"),
	// 				Tier: to.Ptr(armsecurityinsights.SupportTierMicrosoft),
	// 			},
	// 			Version: to.Ptr("2.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),
	// 		},
	// 	},
	// }
}
