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

package live

import (
	"fmt"
	"testing"

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

func Test_DescribeLiveStreamInfoByPage(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})

	query := &request.DescribeLiveStreamInfoByPageRequest{
		PageNum:    0,
		PageSize:   0,
		Vhost:      "your Vhost",
		Domain:     "your Domain",
		App:        "your App",
		Stream:     "your Stream",
		StreamType: "your StreamType",
		InfoType:   "your InfoType",
	}

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

func Test_KillStream(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})

	query := &request.KillStreamRequest{
		Vhost:  "your Vhost",
		App:    "your App",
		Stream: "your Stream",
	}

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

func Test_ForbidStream(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})

	//query := &request.ForbidStreamRequest{
	//	Vhost:   "your Vhost",
	//	Domain:  "your Domain",
	//	App:     "your App",
	//	Stream:  "your Stream",
	//	EndTime: "your EndTime",
	//}

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

func Test_DescribeClosedStreamInfoByPage(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})

	query := &request.DescribeClosedStreamInfoByPageRequest{
		PageNum:     0,
		PageSize:    0,
		Vhost:       "your Vhost",
		Domain:      "your Domain",
		App:         "your App",
		Stream:      "your Stream",
		Sort:        "your Sort",
		EndTimeFrom: "your EndTimeFrom",
		EndTimeTo:   "your EndTimeTo",
		SourceType:  "your SourceType",
	}

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

func Test_DescribeLiveStreamState(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})

	query := &request.DescribeLiveStreamStateRequest{
		Vhost:  "your Vhost",
		Domain: "your Domain",
		App:    "your App",
		Stream: "your Stream",
	}

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

func Test_DescribeForbiddenStreamInfoByPage(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})

	query := &request.DescribeForbiddenStreamInfoByPageRequest{
		PageNum:  0,
		PageSize: 0,
		Vhost:    "your Vhost",
		App:      "your App",
		Stream:   "your Stream",
		Sort:     "your Sort",
	}

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

func Test_ResumeStream(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})
	//
	//query := &request.ResumeStreamRequest{
	//	Vhost:  "your Vhost",
	//	Domain: "your Domain",
	//	App:    "your App",
	//	Stream: "your Stream",
	//}

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