// Code generated by protoc-gen-volcengine-sdk
// source: VodPlayService
// DO NOT EDIT!

package vod

import (
	"fmt"
	"testing"

	"github.com/volcengine/volc-sdk-golang/service/vod"
	"github.com/volcengine/volc-sdk-golang/service/vod/models/request"
)

func Test_GetAllPlayInfo(t *testing.T) {
	// Create a VOD instance in the specified region.
	// instance := vod.NewInstanceWithRegion("cn-north-1")
	instance := vod.NewInstance()

	// Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see  https://www.volcengine.com/docs/4/65655.
	// The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed.
	// During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account.
	// instance.SetCredential(base.Credentials{
	// AccessKeyID:     "your ak",
	// SecretAccessKey: "your sk",
	//})

	query := &request.VodGetAllPlayInfoRequest{
		Vids:                     "your Vids",
		Formats:                  "your Formats",
		Codecs:                   "your Codecs",
		Definitions:              "your Definitions",
		FileTypes:                "your FileTypes",
		LogoTypes:                "your LogoTypes",
		NeedEncryptStream:        "your NeedEncryptStream",
		Ssl:                      "your Ssl",
		NeedThumbs:               "your NeedThumbs",
		NeedBarrageMask:          "your NeedBarrageMask",
		CdnType:                  "your CdnType",
		UnionInfo:                "your UnionInfo",
		PlayScene:                "your PlayScene",
		DrmExpireTimestamp:       "your DrmExpireTimestamp",
		HDRType:                  "your HDRType",
		KeyFrameAlignmentVersion: "your KeyFrameAlignmentVersion",
		UserAction:               "your UserAction",
		Quality:                  "your Quality",
	}

	resp, status, err := instance.GetAllPlayInfo(query)
	fmt.Println(status)
	fmt.Println(err)
	fmt.Println(resp.String())
}

func Test_GetPlayInfo(t *testing.T) {
	// Create a VOD instance in the specified region.
	// instance := vod.NewInstanceWithRegion("cn-north-1")
	instance := vod.NewInstance()

	// Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see  https://www.volcengine.com/docs/4/65655.
	// The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed.
	// During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account.
	// instance.SetCredential(base.Credentials{
	// AccessKeyID:     "your ak",
	// SecretAccessKey: "your sk",
	//})

	query := &request.VodGetPlayInfoRequest{
		Vid:                  "your Vid",
		Format:               "your Format",
		Codec:                "your Codec",
		Definition:           "your Definition",
		FileType:             "your FileType",
		LogoType:             "your LogoType",
		Base64:               "your Base64",
		Ssl:                  "your Ssl",
		NeedThumbs:           "your NeedThumbs",
		NeedBarrageMask:      "your NeedBarrageMask",
		CdnType:              "your CdnType",
		UnionInfo:            "your UnionInfo",
		HDRDefinition:        "your HDRDefinition",
		PlayScene:            "your PlayScene",
		DrmExpireTimestamp:   "your DrmExpireTimestamp",
		Quality:              "your Quality",
		PlayConfig:           "your PlayConfig",
		NeedOriginal:         "your NeedOriginal",
		ForceExpire:          "your ForceExpire",
		GetAll:               false,
		DigitalWatermarkType: "your DigitalWatermarkType",
		UserToken:            "your UserToken",
		DrmKEK:               "your DrmKEK",
		JSPlayer:             "your JSPlayer",
	}

	resp, status, err := instance.GetPlayInfo(query)
	fmt.Println(status)
	fmt.Println(err)
	fmt.Println(resp.String())
}

func Test_GetPrivateDrmPlayAuth(t *testing.T) {
	// Create a VOD instance in the specified region.
	// instance := vod.NewInstanceWithRegion("cn-north-1")
	instance := vod.NewInstance()

	// Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see  https://www.volcengine.com/docs/4/65655.
	// The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed.
	// During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account.
	// instance.SetCredential(base.Credentials{
	// AccessKeyID:     "your ak",
	// SecretAccessKey: "your sk",
	//})

	query := &request.VodGetPrivateDrmPlayAuthRequest{
		DrmType:     "your DrmType",
		Vid:         "your Vid",
		PlayAuthIds: "your PlayAuthIds",
		UnionInfo:   "your UnionInfo",
	}

	resp, status, err := instance.GetPrivateDrmPlayAuth(query)
	fmt.Println(status)
	fmt.Println(err)
	fmt.Println(resp.String())
}

func Test_GetHlsDecryptionKey(t *testing.T) {
	// Create a VOD instance in the specified region.
	// instance := vod.NewInstanceWithRegion("cn-north-1")
	instance := vod.NewInstance()

	// Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see  https://www.volcengine.com/docs/4/65655.
	// The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed.
	// During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account.
	// instance.SetCredential(base.Credentials{
	// AccessKeyID:     "your ak",
	// SecretAccessKey: "your sk",
	//})

	query := &request.VodGetHlsDecryptionKeyRequest{
		DrmAuthToken: "your DrmAuthToken",
		Ak:           "your Ak",
		Source:       "your Source",
	}

	resp, status, err := instance.GetHlsDecryptionKey(query)
	fmt.Println(status)
	fmt.Println(err)
	fmt.Println(resp.String())
}

func Test_CreateHlsDecryptionKey(t *testing.T) {
	// Create a VOD instance in the specified region.
	// instance := vod.NewInstanceWithRegion("cn-north-1")
	instance := vod.NewInstance()

	// Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see  https://www.volcengine.com/docs/4/65655.
	// The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed.
	// During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account.
	// instance.SetCredential(base.Credentials{
	// AccessKeyID:     "your ak",
	// SecretAccessKey: "your sk",
	//})

	query := &request.VodCreateHlsDecryptionKeyRequest{
		SpaceName: "your SpaceName",
	}

	resp, status, err := instance.CreateHlsDecryptionKey(query)
	fmt.Println(status)
	fmt.Println(err)
	fmt.Println(resp.String())
}

func Test_GetPlayInfoWithLiveTimeShiftScene(t *testing.T) {
	// Create a VOD instance in the specified region.
	// instance := vod.NewInstanceWithRegion("cn-north-1")
	instance := vod.NewInstance()

	// Configure your Access Key ID (AK) and Secret Access Key (SK) in the environment variables or in the local ~/.volc/config file. For detailed instructions, see  https://www.volcengine.com/docs/4/65655.
	// The SDK will automatically fetch the AK and SK from the environment variables or the ~/.volc/config file as needed.
	// During testing, you may use the following code snippet. However, do not store the AK and SK directly in your project code to prevent potential leakage and safeguard the security of all resources associated with your account.
	// instance.SetCredential(base.Credentials{
	// AccessKeyID:     "your ak",
	// SecretAccessKey: "your sk",
	//})

	query := &request.VodGetPlayInfoWithLiveTimeShiftSceneRequest{
		StoreUris:             "your StoreUris",
		SpaceName:             "your SpaceName",
		Ssl:                   "your Ssl",
		ExpireTimestamp:       "your ExpireTimestamp",
		NeedComposeBucketName: "your NeedComposeBucketName",
	}

	resp, status, err := instance.GetPlayInfoWithLiveTimeShiftScene(query)
	fmt.Println(status)
	fmt.Println(err)
	fmt.Println(resp.String())
}
