Преглед изворни кода

RTC SDK Auto Released By renrang.yl,Version:1.35.2

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy пре 7 година
родитељ
комит
099190cd54

+ 6 - 0
ChangeLog.txt

@@ -1,3 +1,9 @@
+2018-11-07 Version: 1.35.2
+1, Add API CreateTemplate,DeleteTemplate,GetAllTemplate,GetTemplateInfo.
+2, Add API  GetTaskStatus,StartTask,StopTask.
+3, Add API GetTaskParam,UpdateTaskParam.
+
+
 2018-11-02 Version: 1.35.1
 1, deviceName and productKey can be used instead of iotId.
 2, New productKey fields for queryauthentication output parameter.

+ 135 - 0
services/rtc/create_template.go

@@ -0,0 +1,135 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// CreateTemplate invokes the rtc.CreateTemplate API synchronously
+// api document: https://help.aliyun.com/api/rtc/createtemplate.html
+func (client *Client) CreateTemplate(request *CreateTemplateRequest) (response *CreateTemplateResponse, err error) {
+	response = CreateCreateTemplateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateTemplateWithChan invokes the rtc.CreateTemplate API asynchronously
+// api document: https://help.aliyun.com/api/rtc/createtemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTemplateWithChan(request *CreateTemplateRequest) (<-chan *CreateTemplateResponse, <-chan error) {
+	responseChan := make(chan *CreateTemplateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateTemplate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateTemplateWithCallback invokes the rtc.CreateTemplate API asynchronously
+// api document: https://help.aliyun.com/api/rtc/createtemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateTemplateWithCallback(request *CreateTemplateRequest, callback func(response *CreateTemplateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateTemplateResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateTemplate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateTemplateRequest is the request struct for api CreateTemplate
+type CreateTemplateRequest struct {
+	*requests.RpcRequest
+	ServiceMode       requests.Integer              `position:"Query" name:"ServiceMode"`
+	LiveConfig        *[]CreateTemplateLiveConfig   `position:"Query" name:"LiveConfig"  type:"Repeated"`
+	MediaConfig       requests.Integer              `position:"Query" name:"MediaConfig"`
+	MaxMixStreamCount requests.Integer              `position:"Query" name:"MaxMixStreamCount"`
+	RecordConfig      *[]CreateTemplateRecordConfig `position:"Query" name:"RecordConfig"  type:"Repeated"`
+	OwnerId           requests.Integer              `position:"Query" name:"OwnerId"`
+	LayOut            *[]CreateTemplateLayOut       `position:"Query" name:"LayOut"  type:"Repeated"`
+	AppId             string                        `position:"Query" name:"AppId"`
+	CallBack          string                        `position:"Query" name:"CallBack"`
+	MixMode           requests.Integer              `position:"Query" name:"MixMode"`
+}
+
+// CreateTemplateLiveConfig is a repeated param struct in CreateTemplateRequest
+type CreateTemplateLiveConfig struct {
+	DomainName string `name:"DomainName"`
+	AppName    string `name:"AppName"`
+}
+
+// CreateTemplateRecordConfig is a repeated param struct in CreateTemplateRequest
+type CreateTemplateRecordConfig struct {
+	StorageType         string `name:"StorageType"`
+	FileFormat          string `name:"FileFormat"`
+	OssEndPoint         string `name:"OssEndPoint"`
+	OssBucket           string `name:"OssBucket"`
+	VodTransCodeGroupId string `name:"VodTransCodeGroupId"`
+}
+
+// CreateTemplateLayOut is a repeated param struct in CreateTemplateRequest
+type CreateTemplateLayOut struct {
+	Color    string `name:"Color"`
+	CutMode  string `name:"CutMode"`
+	LayOutId string `name:"LayOutId"`
+}
+
+// CreateTemplateResponse is the response struct for api CreateTemplate
+type CreateTemplateResponse struct {
+	*responses.BaseResponse
+	RequestId  string `json:"RequestId" xml:"RequestId"`
+	TemplateId int    `json:"TemplateId" xml:"TemplateId"`
+}
+
+// CreateCreateTemplateRequest creates a request to invoke CreateTemplate API
+func CreateCreateTemplateRequest() (request *CreateTemplateRequest) {
+	request = &CreateTemplateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "CreateTemplate", "rtc", "openAPI")
+	return
+}
+
+// CreateCreateTemplateResponse creates a response to parse from CreateTemplate response
+func CreateCreateTemplateResponse() (response *CreateTemplateResponse) {
+	response = &CreateTemplateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/rtc/delete_template.go

@@ -0,0 +1,105 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// DeleteTemplate invokes the rtc.DeleteTemplate API synchronously
+// api document: https://help.aliyun.com/api/rtc/deletetemplate.html
+func (client *Client) DeleteTemplate(request *DeleteTemplateRequest) (response *DeleteTemplateResponse, err error) {
+	response = CreateDeleteTemplateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteTemplateWithChan invokes the rtc.DeleteTemplate API asynchronously
+// api document: https://help.aliyun.com/api/rtc/deletetemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTemplateWithChan(request *DeleteTemplateRequest) (<-chan *DeleteTemplateResponse, <-chan error) {
+	responseChan := make(chan *DeleteTemplateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteTemplate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteTemplateWithCallback invokes the rtc.DeleteTemplate API asynchronously
+// api document: https://help.aliyun.com/api/rtc/deletetemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteTemplateWithCallback(request *DeleteTemplateRequest, callback func(response *DeleteTemplateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteTemplateResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteTemplate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteTemplateRequest is the request struct for api DeleteTemplate
+type DeleteTemplateRequest struct {
+	*requests.RpcRequest
+	OwnerId    requests.Integer `position:"Query" name:"OwnerId"`
+	TemplateId requests.Integer `position:"Query" name:"TemplateId"`
+	AppId      string           `position:"Query" name:"AppId"`
+}
+
+// DeleteTemplateResponse is the response struct for api DeleteTemplate
+type DeleteTemplateResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteTemplateRequest creates a request to invoke DeleteTemplate API
+func CreateDeleteTemplateRequest() (request *DeleteTemplateRequest) {
+	request = &DeleteTemplateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "DeleteTemplate", "rtc", "openAPI")
+	return
+}
+
+// CreateDeleteTemplateResponse creates a response to parse from DeleteTemplate response
+func CreateDeleteTemplateResponse() (response *DeleteTemplateResponse) {
+	response = &DeleteTemplateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/rtc/get_all_template.go

@@ -0,0 +1,105 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetAllTemplate invokes the rtc.GetAllTemplate API synchronously
+// api document: https://help.aliyun.com/api/rtc/getalltemplate.html
+func (client *Client) GetAllTemplate(request *GetAllTemplateRequest) (response *GetAllTemplateResponse, err error) {
+	response = CreateGetAllTemplateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetAllTemplateWithChan invokes the rtc.GetAllTemplate API asynchronously
+// api document: https://help.aliyun.com/api/rtc/getalltemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetAllTemplateWithChan(request *GetAllTemplateRequest) (<-chan *GetAllTemplateResponse, <-chan error) {
+	responseChan := make(chan *GetAllTemplateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetAllTemplate(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetAllTemplateWithCallback invokes the rtc.GetAllTemplate API asynchronously
+// api document: https://help.aliyun.com/api/rtc/getalltemplate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetAllTemplateWithCallback(request *GetAllTemplateRequest, callback func(response *GetAllTemplateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetAllTemplateResponse
+		var err error
+		defer close(result)
+		response, err = client.GetAllTemplate(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetAllTemplateRequest is the request struct for api GetAllTemplate
+type GetAllTemplateRequest struct {
+	*requests.RpcRequest
+	OwnerId requests.Integer `position:"Query" name:"OwnerId"`
+	AppId   string           `position:"Query" name:"AppId"`
+}
+
+// GetAllTemplateResponse is the response struct for api GetAllTemplate
+type GetAllTemplateResponse struct {
+	*responses.BaseResponse
+	RequestId   string      `json:"RequestId" xml:"RequestId"`
+	TemplateIds TemplateIds `json:"TemplateIds" xml:"TemplateIds"`
+}
+
+// CreateGetAllTemplateRequest creates a request to invoke GetAllTemplate API
+func CreateGetAllTemplateRequest() (request *GetAllTemplateRequest) {
+	request = &GetAllTemplateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "GetAllTemplate", "rtc", "openAPI")
+	return
+}
+
+// CreateGetAllTemplateResponse creates a response to parse from GetAllTemplate response
+func CreateGetAllTemplateResponse() (response *GetAllTemplateResponse) {
+	response = &GetAllTemplateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/rtc/get_task_param.go

@@ -0,0 +1,108 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetTaskParam invokes the rtc.GetTaskParam API synchronously
+// api document: https://help.aliyun.com/api/rtc/gettaskparam.html
+func (client *Client) GetTaskParam(request *GetTaskParamRequest) (response *GetTaskParamResponse, err error) {
+	response = CreateGetTaskParamResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetTaskParamWithChan invokes the rtc.GetTaskParam API asynchronously
+// api document: https://help.aliyun.com/api/rtc/gettaskparam.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTaskParamWithChan(request *GetTaskParamRequest) (<-chan *GetTaskParamResponse, <-chan error) {
+	responseChan := make(chan *GetTaskParamResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetTaskParam(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetTaskParamWithCallback invokes the rtc.GetTaskParam API asynchronously
+// api document: https://help.aliyun.com/api/rtc/gettaskparam.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTaskParamWithCallback(request *GetTaskParamRequest, callback func(response *GetTaskParamResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetTaskParamResponse
+		var err error
+		defer close(result)
+		response, err = client.GetTaskParam(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetTaskParamRequest is the request struct for api GetTaskParam
+type GetTaskParamRequest struct {
+	*requests.RpcRequest
+	OwnerId requests.Integer `position:"Query" name:"OwnerId"`
+	AppId   string           `position:"Query" name:"AppId"`
+	TaskId  requests.Integer `position:"Query" name:"TaskId"`
+}
+
+// GetTaskParamResponse is the response struct for api GetTaskParam
+type GetTaskParamResponse struct {
+	*responses.BaseResponse
+	RequestId  string  `json:"RequestId" xml:"RequestId"`
+	ChannelId  string  `json:"ChannelId" xml:"ChannelId"`
+	TemplateId int     `json:"TemplateId" xml:"TemplateId"`
+	MixPane    MixPane `json:"MixPane" xml:"MixPane"`
+}
+
+// CreateGetTaskParamRequest creates a request to invoke GetTaskParam API
+func CreateGetTaskParamRequest() (request *GetTaskParamRequest) {
+	request = &GetTaskParamRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "GetTaskParam", "rtc", "openAPI")
+	return
+}
+
+// CreateGetTaskParamResponse creates a response to parse from GetTaskParam response
+func CreateGetTaskParamResponse() (response *GetTaskParamResponse) {
+	response = &GetTaskParamResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/rtc/get_task_status.go

@@ -0,0 +1,107 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetTaskStatus invokes the rtc.GetTaskStatus API synchronously
+// api document: https://help.aliyun.com/api/rtc/gettaskstatus.html
+func (client *Client) GetTaskStatus(request *GetTaskStatusRequest) (response *GetTaskStatusResponse, err error) {
+	response = CreateGetTaskStatusResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetTaskStatusWithChan invokes the rtc.GetTaskStatus API asynchronously
+// api document: https://help.aliyun.com/api/rtc/gettaskstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTaskStatusWithChan(request *GetTaskStatusRequest) (<-chan *GetTaskStatusResponse, <-chan error) {
+	responseChan := make(chan *GetTaskStatusResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetTaskStatus(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetTaskStatusWithCallback invokes the rtc.GetTaskStatus API asynchronously
+// api document: https://help.aliyun.com/api/rtc/gettaskstatus.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTaskStatusWithCallback(request *GetTaskStatusRequest, callback func(response *GetTaskStatusResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetTaskStatusResponse
+		var err error
+		defer close(result)
+		response, err = client.GetTaskStatus(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetTaskStatusRequest is the request struct for api GetTaskStatus
+type GetTaskStatusRequest struct {
+	*requests.RpcRequest
+	OwnerId   requests.Integer `position:"Query" name:"OwnerId"`
+	AppId     string           `position:"Query" name:"AppId"`
+	ChannelId string           `position:"Query" name:"ChannelId"`
+	TaskId    requests.Integer `position:"Query" name:"TaskId"`
+}
+
+// GetTaskStatusResponse is the response struct for api GetTaskStatus
+type GetTaskStatusResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Status    int    `json:"Status" xml:"Status"`
+}
+
+// CreateGetTaskStatusRequest creates a request to invoke GetTaskStatus API
+func CreateGetTaskStatusRequest() (request *GetTaskStatusRequest) {
+	request = &GetTaskStatusRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "GetTaskStatus", "rtc", "openAPI")
+	return
+}
+
+// CreateGetTaskStatusResponse creates a response to parse from GetTaskStatus response
+func CreateGetTaskStatusResponse() (response *GetTaskStatusResponse) {
+	response = &GetTaskStatusResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/rtc/get_template_info.go

@@ -0,0 +1,113 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// GetTemplateInfo invokes the rtc.GetTemplateInfo API synchronously
+// api document: https://help.aliyun.com/api/rtc/gettemplateinfo.html
+func (client *Client) GetTemplateInfo(request *GetTemplateInfoRequest) (response *GetTemplateInfoResponse, err error) {
+	response = CreateGetTemplateInfoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GetTemplateInfoWithChan invokes the rtc.GetTemplateInfo API asynchronously
+// api document: https://help.aliyun.com/api/rtc/gettemplateinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTemplateInfoWithChan(request *GetTemplateInfoRequest) (<-chan *GetTemplateInfoResponse, <-chan error) {
+	responseChan := make(chan *GetTemplateInfoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GetTemplateInfo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GetTemplateInfoWithCallback invokes the rtc.GetTemplateInfo API asynchronously
+// api document: https://help.aliyun.com/api/rtc/gettemplateinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GetTemplateInfoWithCallback(request *GetTemplateInfoRequest, callback func(response *GetTemplateInfoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GetTemplateInfoResponse
+		var err error
+		defer close(result)
+		response, err = client.GetTemplateInfo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GetTemplateInfoRequest is the request struct for api GetTemplateInfo
+type GetTemplateInfoRequest struct {
+	*requests.RpcRequest
+	OwnerId    requests.Integer `position:"Query" name:"OwnerId"`
+	TemplateId requests.Integer `position:"Query" name:"TemplateId"`
+	AppId      string           `position:"Query" name:"AppId"`
+}
+
+// GetTemplateInfoResponse is the response struct for api GetTemplateInfo
+type GetTemplateInfoResponse struct {
+	*responses.BaseResponse
+	RequestId         string       `json:"RequestId" xml:"RequestId"`
+	MixMode           int          `json:"MixMode" xml:"MixMode"`
+	ServiceMode       int          `json:"ServiceMode" xml:"ServiceMode"`
+	CallBack          string       `json:"CallBack" xml:"CallBack"`
+	MaxMixStreamCount int          `json:"MaxMixStreamCount" xml:"MaxMixStreamCount"`
+	MediaConfig       int          `json:"MediaConfig" xml:"MediaConfig"`
+	LayOut            LayOut       `json:"LayOut" xml:"LayOut"`
+	RecordConfig      RecordConfig `json:"RecordConfig" xml:"RecordConfig"`
+	LiveConfig        LiveConfig   `json:"LiveConfig" xml:"LiveConfig"`
+}
+
+// CreateGetTemplateInfoRequest creates a request to invoke GetTemplateInfo API
+func CreateGetTemplateInfoRequest() (request *GetTemplateInfoRequest) {
+	request = &GetTemplateInfoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "GetTemplateInfo", "rtc", "openAPI")
+	return
+}
+
+// CreateGetTemplateInfoResponse creates a response to parse from GetTemplateInfo response
+func CreateGetTemplateInfoResponse() (response *GetTemplateInfoResponse) {
+	response = &GetTemplateInfoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 116 - 0
services/rtc/start_task.go

@@ -0,0 +1,116 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StartTask invokes the rtc.StartTask API synchronously
+// api document: https://help.aliyun.com/api/rtc/starttask.html
+func (client *Client) StartTask(request *StartTaskRequest) (response *StartTaskResponse, err error) {
+	response = CreateStartTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StartTaskWithChan invokes the rtc.StartTask API asynchronously
+// api document: https://help.aliyun.com/api/rtc/starttask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartTaskWithChan(request *StartTaskRequest) (<-chan *StartTaskResponse, <-chan error) {
+	responseChan := make(chan *StartTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StartTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StartTaskWithCallback invokes the rtc.StartTask API asynchronously
+// api document: https://help.aliyun.com/api/rtc/starttask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StartTaskWithCallback(request *StartTaskRequest, callback func(response *StartTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StartTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.StartTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StartTaskRequest is the request struct for api StartTask
+type StartTaskRequest struct {
+	*requests.RpcRequest
+	MixPanes     *[]StartTaskMixPanes `position:"Query" name:"MixPanes"  type:"Repeated"`
+	IdempotentId string               `position:"Query" name:"IdempotentId"`
+	OwnerId      requests.Integer     `position:"Query" name:"OwnerId"`
+	TemplateId   requests.Integer     `position:"Query" name:"TemplateId"`
+	AppId        string               `position:"Query" name:"AppId"`
+	ChannelId    string               `position:"Query" name:"ChannelId"`
+}
+
+// StartTaskMixPanes is a repeated param struct in StartTaskRequest
+type StartTaskMixPanes struct {
+	PaneId     string `name:"PaneId"`
+	UserId     string `name:"UserId"`
+	SourceType string `name:"SourceType"`
+}
+
+// StartTaskResponse is the response struct for api StartTask
+type StartTaskResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	TaskId    int    `json:"TaskId" xml:"TaskId"`
+}
+
+// CreateStartTaskRequest creates a request to invoke StartTask API
+func CreateStartTaskRequest() (request *StartTaskRequest) {
+	request = &StartTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "StartTask", "rtc", "openAPI")
+	return
+}
+
+// CreateStartTaskResponse creates a response to parse from StartTask response
+func CreateStartTaskResponse() (response *StartTaskResponse) {
+	response = &StartTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/rtc/stop_task.go

@@ -0,0 +1,106 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// StopTask invokes the rtc.StopTask API synchronously
+// api document: https://help.aliyun.com/api/rtc/stoptask.html
+func (client *Client) StopTask(request *StopTaskRequest) (response *StopTaskResponse, err error) {
+	response = CreateStopTaskResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// StopTaskWithChan invokes the rtc.StopTask API asynchronously
+// api document: https://help.aliyun.com/api/rtc/stoptask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopTaskWithChan(request *StopTaskRequest) (<-chan *StopTaskResponse, <-chan error) {
+	responseChan := make(chan *StopTaskResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.StopTask(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// StopTaskWithCallback invokes the rtc.StopTask API asynchronously
+// api document: https://help.aliyun.com/api/rtc/stoptask.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) StopTaskWithCallback(request *StopTaskRequest, callback func(response *StopTaskResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *StopTaskResponse
+		var err error
+		defer close(result)
+		response, err = client.StopTask(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// StopTaskRequest is the request struct for api StopTask
+type StopTaskRequest struct {
+	*requests.RpcRequest
+	OwnerId   requests.Integer `position:"Query" name:"OwnerId"`
+	AppId     string           `position:"Query" name:"AppId"`
+	ChannelId string           `position:"Query" name:"ChannelId"`
+	TaskId    requests.Integer `position:"Query" name:"TaskId"`
+}
+
+// StopTaskResponse is the response struct for api StopTask
+type StopTaskResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateStopTaskRequest creates a request to invoke StopTask API
+func CreateStopTaskRequest() (request *StopTaskRequest) {
+	request = &StopTaskRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "StopTask", "rtc", "openAPI")
+	return
+}
+
+// CreateStopTaskResponse creates a response to parse from StopTask response
+func CreateStopTaskResponse() (response *StopTaskResponse) {
+	response = &StopTaskResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 23 - 0
services/rtc/struct_lay_out.go

@@ -0,0 +1,23 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// LayOut is a nested struct in rtc response
+type LayOut struct {
+	Color    string `json:"Color" xml:"Color"`
+	Cutmode  int    `json:"Cutmode" xml:"Cutmode"`
+	LayoutID int    `json:"LayoutID" xml:"LayoutID"`
+}

+ 22 - 0
services/rtc/struct_live_config.go

@@ -0,0 +1,22 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// LiveConfig is a nested struct in rtc response
+type LiveConfig struct {
+	DomainName string `json:"DomainName" xml:"DomainName"`
+	AppName    string `json:"AppName" xml:"AppName"`
+}

+ 21 - 0
services/rtc/struct_mix_pane.go

@@ -0,0 +1,21 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// MixPane is a nested struct in rtc response
+type MixPane struct {
+	MixPaneItem []MixPaneItem `json:"MixPaneItem" xml:"MixPaneItem"`
+}

+ 23 - 0
services/rtc/struct_mix_pane_item.go

@@ -0,0 +1,23 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// MixPaneItem is a nested struct in rtc response
+type MixPaneItem struct {
+	PaneId     int    `json:"PaneId" xml:"PaneId"`
+	UserId     string `json:"UserId" xml:"UserId"`
+	SourceType string `json:"SourceType" xml:"SourceType"`
+}

+ 25 - 0
services/rtc/struct_record_config.go

@@ -0,0 +1,25 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// RecordConfig is a nested struct in rtc response
+type RecordConfig struct {
+	StorageType         string `json:"StorageType" xml:"StorageType"`
+	FileFormat          int    `json:"FileFormat" xml:"FileFormat"`
+	OssEndpoint         string `json:"OssEndpoint" xml:"OssEndpoint"`
+	OssBucket           string `json:"OssBucket" xml:"OssBucket"`
+	VodTranscodeGroupId int    `json:"VodTranscodeGroupId" xml:"VodTranscodeGroupId"`
+}

+ 21 - 0
services/rtc/struct_template_ids.go

@@ -0,0 +1,21 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// TemplateIds is a nested struct in rtc response
+type TemplateIds struct {
+	TemplateId []string `json:"TemplateId" xml:"TemplateId"`
+}

+ 116 - 0
services/rtc/update_task_param.go

@@ -0,0 +1,116 @@
+package rtc
+
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+//
+// Code generated by Alibaba Cloud SDK Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
+	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
+)
+
+// UpdateTaskParam invokes the rtc.UpdateTaskParam API synchronously
+// api document: https://help.aliyun.com/api/rtc/updatetaskparam.html
+func (client *Client) UpdateTaskParam(request *UpdateTaskParamRequest) (response *UpdateTaskParamResponse, err error) {
+	response = CreateUpdateTaskParamResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateTaskParamWithChan invokes the rtc.UpdateTaskParam API asynchronously
+// api document: https://help.aliyun.com/api/rtc/updatetaskparam.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateTaskParamWithChan(request *UpdateTaskParamRequest) (<-chan *UpdateTaskParamResponse, <-chan error) {
+	responseChan := make(chan *UpdateTaskParamResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateTaskParam(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateTaskParamWithCallback invokes the rtc.UpdateTaskParam API asynchronously
+// api document: https://help.aliyun.com/api/rtc/updatetaskparam.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateTaskParamWithCallback(request *UpdateTaskParamRequest, callback func(response *UpdateTaskParamResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateTaskParamResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateTaskParam(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateTaskParamRequest is the request struct for api UpdateTaskParam
+type UpdateTaskParamRequest struct {
+	*requests.RpcRequest
+	MixPanes   *[]UpdateTaskParamMixPanes `position:"Query" name:"MixPanes"  type:"Repeated"`
+	TaskId     requests.Integer           `position:"Query" name:"TaskId"`
+	OwnerId    requests.Integer           `position:"Query" name:"OwnerId"`
+	TemplateId requests.Integer           `position:"Query" name:"TemplateId"`
+	AppId      string                     `position:"Query" name:"AppId"`
+	ChannelId  string                     `position:"Query" name:"ChannelId"`
+}
+
+// UpdateTaskParamMixPanes is a repeated param struct in UpdateTaskParamRequest
+type UpdateTaskParamMixPanes struct {
+	PaneId     string `name:"PaneId"`
+	UserId     string `name:"UserId"`
+	SourceType string `name:"SourceType"`
+}
+
+// UpdateTaskParamResponse is the response struct for api UpdateTaskParam
+type UpdateTaskParamResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	TaskId    int    `json:"TaskId" xml:"TaskId"`
+}
+
+// CreateUpdateTaskParamRequest creates a request to invoke UpdateTaskParam API
+func CreateUpdateTaskParamRequest() (request *UpdateTaskParamRequest) {
+	request = &UpdateTaskParamRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("rtc", "2018-01-11", "UpdateTaskParam", "rtc", "openAPI")
+	return
+}
+
+// CreateUpdateTaskParamResponse creates a response to parse from UpdateTaskParam response
+func CreateUpdateTaskParamResponse() (response *UpdateTaskParamResponse) {
+	response = &UpdateTaskParamResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}