// Code generated by protoc-gen-volcengine-sdk
// source: RelaySourceService
// 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_UpdateRelaySourceV2(t *testing.T) {
	instance := live.NewInstance()
	instance.SetCredential(base.Credentials{
		AccessKeyID:     "your ak",
		SecretAccessKey: "your sk",
	})

	query := &request.UpdateRelaySourceRequest{
		Vhost:                 "your Vhost",
		App:                   "your App",
		RelaySourceDomainList: []string{"your RelaySourceDomainList"},
		RelaySourceProtocol:   "your RelaySourceProtocol",
	}

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

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

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

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

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

	query := &request.DescribeRelaySourceRequest{
		Vhost: "your Vhost",
	}

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