From 23ec129918b720f1170a53d8f41a5477d8324a2e Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 4 Jun 2024 02:36:41 +0000 Subject: [PATCH] Generated 2016-11-01 for live. --- ChangeLog.txt | 4 + services/live/add_live_ai_produce_rules.go | 107 ++++++++++++++++ services/live/add_live_ai_subtitle.go | 117 ++++++++++++++++++ services/live/create_rtc_asr_task.go | 116 +++++++++++++++++ services/live/delete_live_ai_produce_rules.go | 103 +++++++++++++++ services/live/delete_live_ai_subtitle.go | 101 +++++++++++++++ .../live/describe_live_ai_produce_rules.go | 106 ++++++++++++++++ services/live/describe_live_ai_subtitle.go | 104 ++++++++++++++++ .../describe_live_stream_watermark_rules.go | 6 +- .../live/list_live_message_group_by_page.go | 108 ++++++++++++++++ services/live/query_rtc_asr_tasks.go | 99 +++++++++++++++ services/live/stop_rtc_asr_task.go | 102 +++++++++++++++ ...list_in_list_live_message_group_by_page.go | 21 ++++ ...list_in_list_live_message_group_by_page.go | 21 ++++ services/live/struct_groups.go | 6 +- ...normalized_in_describe_live_ai_subtitle.go | 21 ++++ services/live/struct_rule_info.go | 21 ++-- ...list_in_describe_live_ai_produce_rules.go} | 4 +- ...in_describe_live_stream_watermark_rules.go | 21 ++++ services/live/struct_rules_refer.go | 21 ++++ services/live/struct_subtitle_config.go | 38 ++++++ services/live/struct_subtitle_configs.go | 21 ++++ services/live/update_live_ai_produce_rules.go | 108 ++++++++++++++++ services/live/update_live_ai_subtitle.go | 116 +++++++++++++++++ 24 files changed, 1477 insertions(+), 15 deletions(-) create mode 100644 services/live/add_live_ai_produce_rules.go create mode 100644 services/live/add_live_ai_subtitle.go create mode 100644 services/live/create_rtc_asr_task.go create mode 100644 services/live/delete_live_ai_produce_rules.go create mode 100644 services/live/delete_live_ai_subtitle.go create mode 100644 services/live/describe_live_ai_produce_rules.go create mode 100644 services/live/describe_live_ai_subtitle.go create mode 100644 services/live/list_live_message_group_by_page.go create mode 100644 services/live/query_rtc_asr_tasks.go create mode 100644 services/live/stop_rtc_asr_task.go create mode 100644 services/live/struct_admin_list_in_list_live_message_group_by_page.go create mode 100644 services/live/struct_group_list_in_list_live_message_group_by_page.go create mode 100644 services/live/struct_position_normalized_in_describe_live_ai_subtitle.go rename services/live/{struct_rule_info_list.go => struct_rule_info_list_in_describe_live_ai_produce_rules.go} (84%) create mode 100644 services/live/struct_rule_info_list_in_describe_live_stream_watermark_rules.go create mode 100644 services/live/struct_rules_refer.go create mode 100644 services/live/struct_subtitle_config.go create mode 100644 services/live/struct_subtitle_configs.go create mode 100644 services/live/update_live_ai_produce_rules.go create mode 100644 services/live/update_live_ai_subtitle.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 16dc80460f..b5eb04cd49 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2024-06-04 Version: v1.62.755 +- Generated 2016-11-01 for `live`. +- Update to support new apis. + 2024-06-03 Version: v1.62.754 - Generated 2022-05-30 for `eflo`. - Supported gateway for hdeni api. diff --git a/services/live/add_live_ai_produce_rules.go b/services/live/add_live_ai_produce_rules.go new file mode 100644 index 0000000000..5541abea5d --- /dev/null +++ b/services/live/add_live_ai_produce_rules.go @@ -0,0 +1,107 @@ +package live + +//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" +) + +// AddLiveAIProduceRules invokes the live.AddLiveAIProduceRules API synchronously +func (client *Client) AddLiveAIProduceRules(request *AddLiveAIProduceRulesRequest) (response *AddLiveAIProduceRulesResponse, err error) { + response = CreateAddLiveAIProduceRulesResponse() + err = client.DoAction(request, response) + return +} + +// AddLiveAIProduceRulesWithChan invokes the live.AddLiveAIProduceRules API asynchronously +func (client *Client) AddLiveAIProduceRulesWithChan(request *AddLiveAIProduceRulesRequest) (<-chan *AddLiveAIProduceRulesResponse, <-chan error) { + responseChan := make(chan *AddLiveAIProduceRulesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.AddLiveAIProduceRules(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// AddLiveAIProduceRulesWithCallback invokes the live.AddLiveAIProduceRules API asynchronously +func (client *Client) AddLiveAIProduceRulesWithCallback(request *AddLiveAIProduceRulesRequest, callback func(response *AddLiveAIProduceRulesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *AddLiveAIProduceRulesResponse + var err error + defer close(result) + response, err = client.AddLiveAIProduceRules(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// AddLiveAIProduceRulesRequest is the request struct for api AddLiveAIProduceRules +type AddLiveAIProduceRulesRequest struct { + *requests.RpcRequest + Description string `position:"Query" name:"Description"` + SubtitleName string `position:"Query" name:"SubtitleName"` + App string `position:"Query" name:"App"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + IsLazy requests.Boolean `position:"Query" name:"IsLazy"` + LiveTemplate string `position:"Query" name:"LiveTemplate"` + Domain string `position:"Query" name:"Domain"` + IsOrigin requests.Boolean `position:"Query" name:"IsOrigin"` +} + +// AddLiveAIProduceRulesResponse is the response struct for api AddLiveAIProduceRules +type AddLiveAIProduceRulesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + RulesId string `json:"RulesId" xml:"RulesId"` +} + +// CreateAddLiveAIProduceRulesRequest creates a request to invoke AddLiveAIProduceRules API +func CreateAddLiveAIProduceRulesRequest() (request *AddLiveAIProduceRulesRequest) { + request = &AddLiveAIProduceRulesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "AddLiveAIProduceRules", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateAddLiveAIProduceRulesResponse creates a response to parse from AddLiveAIProduceRules response +func CreateAddLiveAIProduceRulesResponse() (response *AddLiveAIProduceRulesResponse) { + response = &AddLiveAIProduceRulesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/add_live_ai_subtitle.go b/services/live/add_live_ai_subtitle.go new file mode 100644 index 0000000000..a3af55a180 --- /dev/null +++ b/services/live/add_live_ai_subtitle.go @@ -0,0 +1,117 @@ +package live + +//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" +) + +// AddLiveAISubtitle invokes the live.AddLiveAISubtitle API synchronously +func (client *Client) AddLiveAISubtitle(request *AddLiveAISubtitleRequest) (response *AddLiveAISubtitleResponse, err error) { + response = CreateAddLiveAISubtitleResponse() + err = client.DoAction(request, response) + return +} + +// AddLiveAISubtitleWithChan invokes the live.AddLiveAISubtitle API asynchronously +func (client *Client) AddLiveAISubtitleWithChan(request *AddLiveAISubtitleRequest) (<-chan *AddLiveAISubtitleResponse, <-chan error) { + responseChan := make(chan *AddLiveAISubtitleResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.AddLiveAISubtitle(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// AddLiveAISubtitleWithCallback invokes the live.AddLiveAISubtitle API asynchronously +func (client *Client) AddLiveAISubtitleWithCallback(request *AddLiveAISubtitleRequest, callback func(response *AddLiveAISubtitleResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *AddLiveAISubtitleResponse + var err error + defer close(result) + response, err = client.AddLiveAISubtitle(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// AddLiveAISubtitleRequest is the request struct for api AddLiveAISubtitle +type AddLiveAISubtitleRequest struct { + *requests.RpcRequest + SrcLanguage string `position:"Query" name:"SrcLanguage"` + Description string `position:"Query" name:"Description"` + FontName string `position:"Query" name:"FontName"` + SubtitleName string `position:"Query" name:"SubtitleName"` + FontSizeNormalized requests.Float `position:"Query" name:"FontSizeNormalized"` + FontColor string `position:"Query" name:"FontColor"` + ShowSourceLan requests.Boolean `position:"Query" name:"ShowSourceLan"` + PositionNormalized *[]string `position:"Query" name:"PositionNormalized" type:"Json"` + BorderWidthNormalized requests.Float `position:"Query" name:"BorderWidthNormalized"` + MaxLines requests.Integer `position:"Query" name:"MaxLines"` + Height string `position:"Query" name:"Height"` + WordPerLine requests.Integer `position:"Query" name:"WordPerLine"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + BgWidthNormalized requests.Float `position:"Query" name:"BgWidthNormalized"` + BgColor string `position:"Query" name:"BgColor"` + DstLanguage string `position:"Query" name:"DstLanguage"` + Width string `position:"Query" name:"Width"` + CopyFrom string `position:"Query" name:"CopyFrom"` +} + +// AddLiveAISubtitleResponse is the response struct for api AddLiveAISubtitle +type AddLiveAISubtitleResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + SubtitleId string `json:"SubtitleId" xml:"SubtitleId"` +} + +// CreateAddLiveAISubtitleRequest creates a request to invoke AddLiveAISubtitle API +func CreateAddLiveAISubtitleRequest() (request *AddLiveAISubtitleRequest) { + request = &AddLiveAISubtitleRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "AddLiveAISubtitle", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateAddLiveAISubtitleResponse creates a response to parse from AddLiveAISubtitle response +func CreateAddLiveAISubtitleResponse() (response *AddLiveAISubtitleResponse) { + response = &AddLiveAISubtitleResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/create_rtc_asr_task.go b/services/live/create_rtc_asr_task.go new file mode 100644 index 0000000000..70c185f419 --- /dev/null +++ b/services/live/create_rtc_asr_task.go @@ -0,0 +1,116 @@ +package live + +//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" +) + +// CreateRtcAsrTask invokes the live.CreateRtcAsrTask API synchronously +func (client *Client) CreateRtcAsrTask(request *CreateRtcAsrTaskRequest) (response *CreateRtcAsrTaskResponse, err error) { + response = CreateCreateRtcAsrTaskResponse() + err = client.DoAction(request, response) + return +} + +// CreateRtcAsrTaskWithChan invokes the live.CreateRtcAsrTask API asynchronously +func (client *Client) CreateRtcAsrTaskWithChan(request *CreateRtcAsrTaskRequest) (<-chan *CreateRtcAsrTaskResponse, <-chan error) { + responseChan := make(chan *CreateRtcAsrTaskResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateRtcAsrTask(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateRtcAsrTaskWithCallback invokes the live.CreateRtcAsrTask API asynchronously +func (client *Client) CreateRtcAsrTaskWithCallback(request *CreateRtcAsrTaskRequest, callback func(response *CreateRtcAsrTaskResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateRtcAsrTaskResponse + var err error + defer close(result) + response, err = client.CreateRtcAsrTask(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateRtcAsrTaskRequest is the request struct for api CreateRtcAsrTask +type CreateRtcAsrTaskRequest struct { + *requests.RpcRequest + AuthKey string `position:"Query" name:"AuthKey"` + Language string `position:"Query" name:"Language"` + Mode string `position:"Query" name:"Mode"` + TranslateEnabled requests.Boolean `position:"Query" name:"TranslateEnabled"` + Tag string `position:"Query" name:"Tag"` + StreamURL string `position:"Query" name:"StreamURL"` + TargetLanguages string `position:"Query" name:"TargetLanguages"` + AutoTerminateEnabled requests.Boolean `position:"Query" name:"AutoTerminateEnabled"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + RtcUserId string `position:"Query" name:"RtcUserId"` + ReportInterval requests.Integer `position:"Query" name:"ReportInterval"` + AutoTerminateDelay requests.Integer `position:"Query" name:"AutoTerminateDelay"` + SDKAppID string `position:"Query" name:"SDKAppID"` + CallbackURL string `position:"Query" name:"CallbackURL"` + ChannelID string `position:"Query" name:"ChannelID"` +} + +// CreateRtcAsrTaskResponse is the response struct for api CreateRtcAsrTask +type CreateRtcAsrTaskResponse struct { + *responses.BaseResponse + Description string `json:"Description" xml:"Description"` + RequestId string `json:"RequestId" xml:"RequestId"` + RetCode int64 `json:"RetCode" xml:"RetCode"` + TaskId string `json:"TaskId" xml:"TaskId"` +} + +// CreateCreateRtcAsrTaskRequest creates a request to invoke CreateRtcAsrTask API +func CreateCreateRtcAsrTaskRequest() (request *CreateRtcAsrTaskRequest) { + request = &CreateRtcAsrTaskRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "CreateRtcAsrTask", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateCreateRtcAsrTaskResponse creates a response to parse from CreateRtcAsrTask response +func CreateCreateRtcAsrTaskResponse() (response *CreateRtcAsrTaskResponse) { + response = &CreateRtcAsrTaskResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/delete_live_ai_produce_rules.go b/services/live/delete_live_ai_produce_rules.go new file mode 100644 index 0000000000..d35975c63c --- /dev/null +++ b/services/live/delete_live_ai_produce_rules.go @@ -0,0 +1,103 @@ +package live + +//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" +) + +// DeleteLiveAIProduceRules invokes the live.DeleteLiveAIProduceRules API synchronously +func (client *Client) DeleteLiveAIProduceRules(request *DeleteLiveAIProduceRulesRequest) (response *DeleteLiveAIProduceRulesResponse, err error) { + response = CreateDeleteLiveAIProduceRulesResponse() + err = client.DoAction(request, response) + return +} + +// DeleteLiveAIProduceRulesWithChan invokes the live.DeleteLiveAIProduceRules API asynchronously +func (client *Client) DeleteLiveAIProduceRulesWithChan(request *DeleteLiveAIProduceRulesRequest) (<-chan *DeleteLiveAIProduceRulesResponse, <-chan error) { + responseChan := make(chan *DeleteLiveAIProduceRulesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteLiveAIProduceRules(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteLiveAIProduceRulesWithCallback invokes the live.DeleteLiveAIProduceRules API asynchronously +func (client *Client) DeleteLiveAIProduceRulesWithCallback(request *DeleteLiveAIProduceRulesRequest, callback func(response *DeleteLiveAIProduceRulesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteLiveAIProduceRulesResponse + var err error + defer close(result) + response, err = client.DeleteLiveAIProduceRules(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteLiveAIProduceRulesRequest is the request struct for api DeleteLiveAIProduceRules +type DeleteLiveAIProduceRulesRequest struct { + *requests.RpcRequest + RulesId string `position:"Query" name:"RulesId"` + App string `position:"Query" name:"App"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SuffixName string `position:"Query" name:"SuffixName"` + Domain string `position:"Query" name:"Domain"` +} + +// DeleteLiveAIProduceRulesResponse is the response struct for api DeleteLiveAIProduceRules +type DeleteLiveAIProduceRulesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteLiveAIProduceRulesRequest creates a request to invoke DeleteLiveAIProduceRules API +func CreateDeleteLiveAIProduceRulesRequest() (request *DeleteLiveAIProduceRulesRequest) { + request = &DeleteLiveAIProduceRulesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "DeleteLiveAIProduceRules", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteLiveAIProduceRulesResponse creates a response to parse from DeleteLiveAIProduceRules response +func CreateDeleteLiveAIProduceRulesResponse() (response *DeleteLiveAIProduceRulesResponse) { + response = &DeleteLiveAIProduceRulesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/delete_live_ai_subtitle.go b/services/live/delete_live_ai_subtitle.go new file mode 100644 index 0000000000..7dedefa9ea --- /dev/null +++ b/services/live/delete_live_ai_subtitle.go @@ -0,0 +1,101 @@ +package live + +//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" +) + +// DeleteLiveAISubtitle invokes the live.DeleteLiveAISubtitle API synchronously +func (client *Client) DeleteLiveAISubtitle(request *DeleteLiveAISubtitleRequest) (response *DeleteLiveAISubtitleResponse, err error) { + response = CreateDeleteLiveAISubtitleResponse() + err = client.DoAction(request, response) + return +} + +// DeleteLiveAISubtitleWithChan invokes the live.DeleteLiveAISubtitle API asynchronously +func (client *Client) DeleteLiveAISubtitleWithChan(request *DeleteLiveAISubtitleRequest) (<-chan *DeleteLiveAISubtitleResponse, <-chan error) { + responseChan := make(chan *DeleteLiveAISubtitleResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteLiveAISubtitle(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteLiveAISubtitleWithCallback invokes the live.DeleteLiveAISubtitle API asynchronously +func (client *Client) DeleteLiveAISubtitleWithCallback(request *DeleteLiveAISubtitleRequest, callback func(response *DeleteLiveAISubtitleResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteLiveAISubtitleResponse + var err error + defer close(result) + response, err = client.DeleteLiveAISubtitle(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteLiveAISubtitleRequest is the request struct for api DeleteLiveAISubtitle +type DeleteLiveAISubtitleRequest struct { + *requests.RpcRequest + SubtitleName string `position:"Query" name:"SubtitleName"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SubtitleId string `position:"Query" name:"SubtitleId"` +} + +// DeleteLiveAISubtitleResponse is the response struct for api DeleteLiveAISubtitle +type DeleteLiveAISubtitleResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteLiveAISubtitleRequest creates a request to invoke DeleteLiveAISubtitle API +func CreateDeleteLiveAISubtitleRequest() (request *DeleteLiveAISubtitleRequest) { + request = &DeleteLiveAISubtitleRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "DeleteLiveAISubtitle", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateDeleteLiveAISubtitleResponse creates a response to parse from DeleteLiveAISubtitle response +func CreateDeleteLiveAISubtitleResponse() (response *DeleteLiveAISubtitleResponse) { + response = &DeleteLiveAISubtitleResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/describe_live_ai_produce_rules.go b/services/live/describe_live_ai_produce_rules.go new file mode 100644 index 0000000000..8b57a37c93 --- /dev/null +++ b/services/live/describe_live_ai_produce_rules.go @@ -0,0 +1,106 @@ +package live + +//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" +) + +// DescribeLiveAIProduceRules invokes the live.DescribeLiveAIProduceRules API synchronously +func (client *Client) DescribeLiveAIProduceRules(request *DescribeLiveAIProduceRulesRequest) (response *DescribeLiveAIProduceRulesResponse, err error) { + response = CreateDescribeLiveAIProduceRulesResponse() + err = client.DoAction(request, response) + return +} + +// DescribeLiveAIProduceRulesWithChan invokes the live.DescribeLiveAIProduceRules API asynchronously +func (client *Client) DescribeLiveAIProduceRulesWithChan(request *DescribeLiveAIProduceRulesRequest) (<-chan *DescribeLiveAIProduceRulesResponse, <-chan error) { + responseChan := make(chan *DescribeLiveAIProduceRulesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeLiveAIProduceRules(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeLiveAIProduceRulesWithCallback invokes the live.DescribeLiveAIProduceRules API asynchronously +func (client *Client) DescribeLiveAIProduceRulesWithCallback(request *DescribeLiveAIProduceRulesRequest, callback func(response *DescribeLiveAIProduceRulesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeLiveAIProduceRulesResponse + var err error + defer close(result) + response, err = client.DescribeLiveAIProduceRules(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeLiveAIProduceRulesRequest is the request struct for api DescribeLiveAIProduceRules +type DescribeLiveAIProduceRulesRequest struct { + *requests.RpcRequest + PageNumber string `position:"Query" name:"PageNumber"` + PageSize string `position:"Query" name:"PageSize"` + RulesId string `position:"Query" name:"RulesId"` + App string `position:"Query" name:"App"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SuffixName string `position:"Query" name:"SuffixName"` + Domain string `position:"Query" name:"Domain"` +} + +// DescribeLiveAIProduceRulesResponse is the response struct for api DescribeLiveAIProduceRules +type DescribeLiveAIProduceRulesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + RuleInfoList RuleInfoListInDescribeLiveAIProduceRules `json:"RuleInfoList" xml:"RuleInfoList"` +} + +// CreateDescribeLiveAIProduceRulesRequest creates a request to invoke DescribeLiveAIProduceRules API +func CreateDescribeLiveAIProduceRulesRequest() (request *DescribeLiveAIProduceRulesRequest) { + request = &DescribeLiveAIProduceRulesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "DescribeLiveAIProduceRules", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeLiveAIProduceRulesResponse creates a response to parse from DescribeLiveAIProduceRules response +func CreateDescribeLiveAIProduceRulesResponse() (response *DescribeLiveAIProduceRulesResponse) { + response = &DescribeLiveAIProduceRulesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/describe_live_ai_subtitle.go b/services/live/describe_live_ai_subtitle.go new file mode 100644 index 0000000000..9afa2cea15 --- /dev/null +++ b/services/live/describe_live_ai_subtitle.go @@ -0,0 +1,104 @@ +package live + +//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" +) + +// DescribeLiveAISubtitle invokes the live.DescribeLiveAISubtitle API synchronously +func (client *Client) DescribeLiveAISubtitle(request *DescribeLiveAISubtitleRequest) (response *DescribeLiveAISubtitleResponse, err error) { + response = CreateDescribeLiveAISubtitleResponse() + err = client.DoAction(request, response) + return +} + +// DescribeLiveAISubtitleWithChan invokes the live.DescribeLiveAISubtitle API asynchronously +func (client *Client) DescribeLiveAISubtitleWithChan(request *DescribeLiveAISubtitleRequest) (<-chan *DescribeLiveAISubtitleResponse, <-chan error) { + responseChan := make(chan *DescribeLiveAISubtitleResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DescribeLiveAISubtitle(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DescribeLiveAISubtitleWithCallback invokes the live.DescribeLiveAISubtitle API asynchronously +func (client *Client) DescribeLiveAISubtitleWithCallback(request *DescribeLiveAISubtitleRequest, callback func(response *DescribeLiveAISubtitleResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DescribeLiveAISubtitleResponse + var err error + defer close(result) + response, err = client.DescribeLiveAISubtitle(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DescribeLiveAISubtitleRequest is the request struct for api DescribeLiveAISubtitle +type DescribeLiveAISubtitleRequest struct { + *requests.RpcRequest + SubtitleName string `position:"Query" name:"SubtitleName"` + PageNumber string `position:"Query" name:"PageNumber"` + PageSize string `position:"Query" name:"PageSize"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + SubtitleId string `position:"Query" name:"SubtitleId"` +} + +// DescribeLiveAISubtitleResponse is the response struct for api DescribeLiveAISubtitle +type DescribeLiveAISubtitleResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + SubtitleConfigs SubtitleConfigs `json:"SubtitleConfigs" xml:"SubtitleConfigs"` +} + +// CreateDescribeLiveAISubtitleRequest creates a request to invoke DescribeLiveAISubtitle API +func CreateDescribeLiveAISubtitleRequest() (request *DescribeLiveAISubtitleRequest) { + request = &DescribeLiveAISubtitleRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "DescribeLiveAISubtitle", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateDescribeLiveAISubtitleResponse creates a response to parse from DescribeLiveAISubtitle response +func CreateDescribeLiveAISubtitleResponse() (response *DescribeLiveAISubtitleResponse) { + response = &DescribeLiveAISubtitleResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/describe_live_stream_watermark_rules.go b/services/live/describe_live_stream_watermark_rules.go index ec866242dd..df49855445 100644 --- a/services/live/describe_live_stream_watermark_rules.go +++ b/services/live/describe_live_stream_watermark_rules.go @@ -80,9 +80,9 @@ type DescribeLiveStreamWatermarkRulesRequest struct { // DescribeLiveStreamWatermarkRulesResponse is the response struct for api DescribeLiveStreamWatermarkRules type DescribeLiveStreamWatermarkRulesResponse struct { *responses.BaseResponse - Total int `json:"Total" xml:"Total"` - RequestId string `json:"RequestId" xml:"RequestId"` - RuleInfoList RuleInfoList `json:"RuleInfoList" xml:"RuleInfoList"` + Total int `json:"Total" xml:"Total"` + RequestId string `json:"RequestId" xml:"RequestId"` + RuleInfoList RuleInfoListInDescribeLiveStreamWatermarkRules `json:"RuleInfoList" xml:"RuleInfoList"` } // CreateDescribeLiveStreamWatermarkRulesRequest creates a request to invoke DescribeLiveStreamWatermarkRules API diff --git a/services/live/list_live_message_group_by_page.go b/services/live/list_live_message_group_by_page.go new file mode 100644 index 0000000000..926095a0df --- /dev/null +++ b/services/live/list_live_message_group_by_page.go @@ -0,0 +1,108 @@ +package live + +//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" +) + +// ListLiveMessageGroupByPage invokes the live.ListLiveMessageGroupByPage API synchronously +func (client *Client) ListLiveMessageGroupByPage(request *ListLiveMessageGroupByPageRequest) (response *ListLiveMessageGroupByPageResponse, err error) { + response = CreateListLiveMessageGroupByPageResponse() + err = client.DoAction(request, response) + return +} + +// ListLiveMessageGroupByPageWithChan invokes the live.ListLiveMessageGroupByPage API asynchronously +func (client *Client) ListLiveMessageGroupByPageWithChan(request *ListLiveMessageGroupByPageRequest) (<-chan *ListLiveMessageGroupByPageResponse, <-chan error) { + responseChan := make(chan *ListLiveMessageGroupByPageResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListLiveMessageGroupByPage(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListLiveMessageGroupByPageWithCallback invokes the live.ListLiveMessageGroupByPage API asynchronously +func (client *Client) ListLiveMessageGroupByPageWithCallback(request *ListLiveMessageGroupByPageRequest, callback func(response *ListLiveMessageGroupByPageResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListLiveMessageGroupByPageResponse + var err error + defer close(result) + response, err = client.ListLiveMessageGroupByPage(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListLiveMessageGroupByPageRequest is the request struct for api ListLiveMessageGroupByPage +type ListLiveMessageGroupByPageRequest struct { + *requests.RpcRequest + SortType requests.Integer `position:"Query" name:"SortType"` + GroupStatus requests.Integer `position:"Query" name:"GroupStatus"` + DataCenter string `position:"Query" name:"DataCenter"` + PageNumber requests.Integer `position:"Query" name:"PageNumber"` + AppId string `position:"Query" name:"AppId"` + PageSize requests.Integer `position:"Query" name:"PageSize"` +} + +// ListLiveMessageGroupByPageResponse is the response struct for api ListLiveMessageGroupByPage +type ListLiveMessageGroupByPageResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + GroupList []Groups `json:"GroupList" xml:"GroupList"` +} + +// CreateListLiveMessageGroupByPageRequest creates a request to invoke ListLiveMessageGroupByPage API +func CreateListLiveMessageGroupByPageRequest() (request *ListLiveMessageGroupByPageRequest) { + request = &ListLiveMessageGroupByPageRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "ListLiveMessageGroupByPage", "live", "openAPI") + request.Method = requests.GET + return +} + +// CreateListLiveMessageGroupByPageResponse creates a response to parse from ListLiveMessageGroupByPage response +func CreateListLiveMessageGroupByPageResponse() (response *ListLiveMessageGroupByPageResponse) { + response = &ListLiveMessageGroupByPageResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/query_rtc_asr_tasks.go b/services/live/query_rtc_asr_tasks.go new file mode 100644 index 0000000000..649a744f63 --- /dev/null +++ b/services/live/query_rtc_asr_tasks.go @@ -0,0 +1,99 @@ +package live + +//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" +) + +// QueryRtcAsrTasks invokes the live.QueryRtcAsrTasks API synchronously +func (client *Client) QueryRtcAsrTasks(request *QueryRtcAsrTasksRequest) (response *QueryRtcAsrTasksResponse, err error) { + response = CreateQueryRtcAsrTasksResponse() + err = client.DoAction(request, response) + return +} + +// QueryRtcAsrTasksWithChan invokes the live.QueryRtcAsrTasks API asynchronously +func (client *Client) QueryRtcAsrTasksWithChan(request *QueryRtcAsrTasksRequest) (<-chan *QueryRtcAsrTasksResponse, <-chan error) { + responseChan := make(chan *QueryRtcAsrTasksResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.QueryRtcAsrTasks(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// QueryRtcAsrTasksWithCallback invokes the live.QueryRtcAsrTasks API asynchronously +func (client *Client) QueryRtcAsrTasksWithCallback(request *QueryRtcAsrTasksRequest, callback func(response *QueryRtcAsrTasksResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *QueryRtcAsrTasksResponse + var err error + defer close(result) + response, err = client.QueryRtcAsrTasks(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// QueryRtcAsrTasksRequest is the request struct for api QueryRtcAsrTasks +type QueryRtcAsrTasksRequest struct { + *requests.RpcRequest + TaskId string `position:"Query" name:"TaskId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// QueryRtcAsrTasksResponse is the response struct for api QueryRtcAsrTasks +type QueryRtcAsrTasksResponse struct { + *responses.BaseResponse +} + +// CreateQueryRtcAsrTasksRequest creates a request to invoke QueryRtcAsrTasks API +func CreateQueryRtcAsrTasksRequest() (request *QueryRtcAsrTasksRequest) { + request = &QueryRtcAsrTasksRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "QueryRtcAsrTasks", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateQueryRtcAsrTasksResponse creates a response to parse from QueryRtcAsrTasks response +func CreateQueryRtcAsrTasksResponse() (response *QueryRtcAsrTasksResponse) { + response = &QueryRtcAsrTasksResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/stop_rtc_asr_task.go b/services/live/stop_rtc_asr_task.go new file mode 100644 index 0000000000..b989e25438 --- /dev/null +++ b/services/live/stop_rtc_asr_task.go @@ -0,0 +1,102 @@ +package live + +//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" +) + +// StopRtcAsrTask invokes the live.StopRtcAsrTask API synchronously +func (client *Client) StopRtcAsrTask(request *StopRtcAsrTaskRequest) (response *StopRtcAsrTaskResponse, err error) { + response = CreateStopRtcAsrTaskResponse() + err = client.DoAction(request, response) + return +} + +// StopRtcAsrTaskWithChan invokes the live.StopRtcAsrTask API asynchronously +func (client *Client) StopRtcAsrTaskWithChan(request *StopRtcAsrTaskRequest) (<-chan *StopRtcAsrTaskResponse, <-chan error) { + responseChan := make(chan *StopRtcAsrTaskResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StopRtcAsrTask(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StopRtcAsrTaskWithCallback invokes the live.StopRtcAsrTask API asynchronously +func (client *Client) StopRtcAsrTaskWithCallback(request *StopRtcAsrTaskRequest, callback func(response *StopRtcAsrTaskResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StopRtcAsrTaskResponse + var err error + defer close(result) + response, err = client.StopRtcAsrTask(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StopRtcAsrTaskRequest is the request struct for api StopRtcAsrTask +type StopRtcAsrTaskRequest struct { + *requests.RpcRequest + TaskId string `position:"Query" name:"TaskId"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` +} + +// StopRtcAsrTaskResponse is the response struct for api StopRtcAsrTask +type StopRtcAsrTaskResponse struct { + *responses.BaseResponse + Description string `json:"Description" xml:"Description"` + RequestId string `json:"RequestId" xml:"RequestId"` + RetCode int64 `json:"RetCode" xml:"RetCode"` +} + +// CreateStopRtcAsrTaskRequest creates a request to invoke StopRtcAsrTask API +func CreateStopRtcAsrTaskRequest() (request *StopRtcAsrTaskRequest) { + request = &StopRtcAsrTaskRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "StopRtcAsrTask", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateStopRtcAsrTaskResponse creates a response to parse from StopRtcAsrTask response +func CreateStopRtcAsrTaskResponse() (response *StopRtcAsrTaskResponse) { + response = &StopRtcAsrTaskResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/struct_admin_list_in_list_live_message_group_by_page.go b/services/live/struct_admin_list_in_list_live_message_group_by_page.go new file mode 100644 index 0000000000..f908f110d2 --- /dev/null +++ b/services/live/struct_admin_list_in_list_live_message_group_by_page.go @@ -0,0 +1,21 @@ +package live + +//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. + +// AdminListInListLiveMessageGroupByPage is a nested struct in live response +type AdminListInListLiveMessageGroupByPage struct { + Admins []string `json:"Admins" xml:"Admins"` +} diff --git a/services/live/struct_group_list_in_list_live_message_group_by_page.go b/services/live/struct_group_list_in_list_live_message_group_by_page.go new file mode 100644 index 0000000000..1b5e8ac556 --- /dev/null +++ b/services/live/struct_group_list_in_list_live_message_group_by_page.go @@ -0,0 +1,21 @@ +package live + +//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. + +// GroupListInListLiveMessageGroupByPage is a nested struct in live response +type GroupListInListLiveMessageGroupByPage struct { + Groups []Groups `json:"Groups" xml:"Groups"` +} diff --git a/services/live/struct_groups.go b/services/live/struct_groups.go index 59b471988f..d6ba731367 100644 --- a/services/live/struct_groups.go +++ b/services/live/struct_groups.go @@ -17,11 +17,11 @@ package live // Groups is a nested struct in live response type Groups struct { - GroupId string `json:"GroupId" xml:"GroupId"` - CreatorId string `json:"CreatorId" xml:"CreatorId"` Createtime int64 `json:"Createtime" xml:"Createtime"` - GroupName string `json:"GroupName" xml:"GroupName"` GroupInfo string `json:"GroupInfo" xml:"GroupInfo"` Delete bool `json:"Delete" xml:"Delete"` + CreatorId string `json:"CreatorId" xml:"CreatorId"` + GroupName string `json:"GroupName" xml:"GroupName"` + GroupId string `json:"GroupId" xml:"GroupId"` AdminList []string `json:"AdminList" xml:"AdminList"` } diff --git a/services/live/struct_position_normalized_in_describe_live_ai_subtitle.go b/services/live/struct_position_normalized_in_describe_live_ai_subtitle.go new file mode 100644 index 0000000000..aaea0c2787 --- /dev/null +++ b/services/live/struct_position_normalized_in_describe_live_ai_subtitle.go @@ -0,0 +1,21 @@ +package live + +//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. + +// PositionNormalizedInDescribeLiveAISubtitle is a nested struct in live response +type PositionNormalizedInDescribeLiveAISubtitle struct { + Position []float64 `json:"Position" xml:"Position"` +} diff --git a/services/live/struct_rule_info.go b/services/live/struct_rule_info.go index bd371dff9b..4c7d1b6539 100644 --- a/services/live/struct_rule_info.go +++ b/services/live/struct_rule_info.go @@ -17,11 +17,18 @@ package live // RuleInfo is a nested struct in live response type RuleInfo struct { - Domain string `json:"Domain" xml:"Domain"` - Description string `json:"Description" xml:"Description"` - App string `json:"App" xml:"App"` - Stream string `json:"Stream" xml:"Stream"` - Name string `json:"Name" xml:"Name"` - TemplateId string `json:"TemplateId" xml:"TemplateId"` - RuleId string `json:"RuleId" xml:"RuleId"` + Domain string `json:"Domain" xml:"Domain"` + App string `json:"App" xml:"App"` + Name string `json:"Name" xml:"Name"` + TemplateId string `json:"TemplateId" xml:"TemplateId"` + IsOrigin bool `json:"IsOrigin" xml:"IsOrigin"` + SubtitleName string `json:"SubtitleName" xml:"SubtitleName"` + SuffixName string `json:"SuffixName" xml:"SuffixName"` + RulesId string `json:"RulesId" xml:"RulesId"` + RuleId string `json:"RuleId" xml:"RuleId"` + GmtModifyTime string `json:"GmtModifyTime" xml:"GmtModifyTime"` + LiveTemplate string `json:"LiveTemplate" xml:"LiveTemplate"` + IsLazy bool `json:"IsLazy" xml:"IsLazy"` + Description string `json:"Description" xml:"Description"` + Stream string `json:"Stream" xml:"Stream"` } diff --git a/services/live/struct_rule_info_list.go b/services/live/struct_rule_info_list_in_describe_live_ai_produce_rules.go similarity index 84% rename from services/live/struct_rule_info_list.go rename to services/live/struct_rule_info_list_in_describe_live_ai_produce_rules.go index 61c347810d..42c577feae 100644 --- a/services/live/struct_rule_info_list.go +++ b/services/live/struct_rule_info_list_in_describe_live_ai_produce_rules.go @@ -15,7 +15,7 @@ package live // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// RuleInfoList is a nested struct in live response -type RuleInfoList struct { +// RuleInfoListInDescribeLiveAIProduceRules is a nested struct in live response +type RuleInfoListInDescribeLiveAIProduceRules struct { RuleInfo []RuleInfo `json:"RuleInfo" xml:"RuleInfo"` } diff --git a/services/live/struct_rule_info_list_in_describe_live_stream_watermark_rules.go b/services/live/struct_rule_info_list_in_describe_live_stream_watermark_rules.go new file mode 100644 index 0000000000..0211f91cf6 --- /dev/null +++ b/services/live/struct_rule_info_list_in_describe_live_stream_watermark_rules.go @@ -0,0 +1,21 @@ +package live + +//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. + +// RuleInfoListInDescribeLiveStreamWatermarkRules is a nested struct in live response +type RuleInfoListInDescribeLiveStreamWatermarkRules struct { + RuleInfo []RuleInfo `json:"RuleInfo" xml:"RuleInfo"` +} diff --git a/services/live/struct_rules_refer.go b/services/live/struct_rules_refer.go new file mode 100644 index 0000000000..20e5744a45 --- /dev/null +++ b/services/live/struct_rules_refer.go @@ -0,0 +1,21 @@ +package live + +//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. + +// RulesRefer is a nested struct in live response +type RulesRefer struct { + RulesId []string `json:"RulesId" xml:"RulesId"` +} diff --git a/services/live/struct_subtitle_config.go b/services/live/struct_subtitle_config.go new file mode 100644 index 0000000000..5fca4465f4 --- /dev/null +++ b/services/live/struct_subtitle_config.go @@ -0,0 +1,38 @@ +package live + +//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. + +// SubtitleConfig is a nested struct in live response +type SubtitleConfig struct { + DstLanguage string `json:"DstLanguage" xml:"DstLanguage"` + SrcLanguage string `json:"SrcLanguage" xml:"SrcLanguage"` + FontColor string `json:"FontColor" xml:"FontColor"` + FontName string `json:"FontName" xml:"FontName"` + ShowSourceLan int `json:"ShowSourceLan" xml:"ShowSourceLan"` + MaxLines int `json:"MaxLines" xml:"MaxLines"` + WordPerline int `json:"WordPerline" xml:"WordPerline"` + BgColor string `json:"BgColor" xml:"BgColor"` + BgWidthNormalized float64 `json:"BgWidthNormalized" xml:"BgWidthNormalized"` + BorderWidthNormalized float64 `json:"BorderWidthNormalized" xml:"BorderWidthNormalized"` + Width string `json:"Width" xml:"Width"` + Height string `json:"Height" xml:"Height"` + SubtitleName string `json:"SubtitleName" xml:"SubtitleName"` + SubtitleId string `json:"SubtitleId" xml:"SubtitleId"` + FontSizeNormalized string `json:"FontSizeNormalized" xml:"FontSizeNormalized"` + Description string `json:"Description" xml:"Description"` + PositionNormalized PositionNormalizedInDescribeLiveAISubtitle `json:"PositionNormalized" xml:"PositionNormalized"` + RulesRefer RulesRefer `json:"RulesRefer" xml:"RulesRefer"` +} diff --git a/services/live/struct_subtitle_configs.go b/services/live/struct_subtitle_configs.go new file mode 100644 index 0000000000..cb458a828b --- /dev/null +++ b/services/live/struct_subtitle_configs.go @@ -0,0 +1,21 @@ +package live + +//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. + +// SubtitleConfigs is a nested struct in live response +type SubtitleConfigs struct { + SubtitleConfig []SubtitleConfig `json:"SubtitleConfig" xml:"SubtitleConfig"` +} diff --git a/services/live/update_live_ai_produce_rules.go b/services/live/update_live_ai_produce_rules.go new file mode 100644 index 0000000000..1cbdbc497d --- /dev/null +++ b/services/live/update_live_ai_produce_rules.go @@ -0,0 +1,108 @@ +package live + +//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" +) + +// UpdateLiveAIProduceRules invokes the live.UpdateLiveAIProduceRules API synchronously +func (client *Client) UpdateLiveAIProduceRules(request *UpdateLiveAIProduceRulesRequest) (response *UpdateLiveAIProduceRulesResponse, err error) { + response = CreateUpdateLiveAIProduceRulesResponse() + err = client.DoAction(request, response) + return +} + +// UpdateLiveAIProduceRulesWithChan invokes the live.UpdateLiveAIProduceRules API asynchronously +func (client *Client) UpdateLiveAIProduceRulesWithChan(request *UpdateLiveAIProduceRulesRequest) (<-chan *UpdateLiveAIProduceRulesResponse, <-chan error) { + responseChan := make(chan *UpdateLiveAIProduceRulesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateLiveAIProduceRules(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateLiveAIProduceRulesWithCallback invokes the live.UpdateLiveAIProduceRules API asynchronously +func (client *Client) UpdateLiveAIProduceRulesWithCallback(request *UpdateLiveAIProduceRulesRequest, callback func(response *UpdateLiveAIProduceRulesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateLiveAIProduceRulesResponse + var err error + defer close(result) + response, err = client.UpdateLiveAIProduceRules(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateLiveAIProduceRulesRequest is the request struct for api UpdateLiveAIProduceRules +type UpdateLiveAIProduceRulesRequest struct { + *requests.RpcRequest + Description string `position:"Query" name:"Description"` + SubtitleName string `position:"Query" name:"SubtitleName"` + RulesId string `position:"Query" name:"RulesId"` + App string `position:"Query" name:"App"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + IsLazy requests.Boolean `position:"Query" name:"IsLazy"` + LiveTemplate string `position:"Query" name:"LiveTemplate"` + Domain string `position:"Query" name:"Domain"` + IsOrigin requests.Boolean `position:"Query" name:"IsOrigin"` + SubtitleId string `position:"Query" name:"SubtitleId"` +} + +// UpdateLiveAIProduceRulesResponse is the response struct for api UpdateLiveAIProduceRules +type UpdateLiveAIProduceRulesResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateUpdateLiveAIProduceRulesRequest creates a request to invoke UpdateLiveAIProduceRules API +func CreateUpdateLiveAIProduceRulesRequest() (request *UpdateLiveAIProduceRulesRequest) { + request = &UpdateLiveAIProduceRulesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "UpdateLiveAIProduceRules", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateUpdateLiveAIProduceRulesResponse creates a response to parse from UpdateLiveAIProduceRules response +func CreateUpdateLiveAIProduceRulesResponse() (response *UpdateLiveAIProduceRulesResponse) { + response = &UpdateLiveAIProduceRulesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/live/update_live_ai_subtitle.go b/services/live/update_live_ai_subtitle.go new file mode 100644 index 0000000000..e7853bd871 --- /dev/null +++ b/services/live/update_live_ai_subtitle.go @@ -0,0 +1,116 @@ +package live + +//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" +) + +// UpdateLiveAISubtitle invokes the live.UpdateLiveAISubtitle API synchronously +func (client *Client) UpdateLiveAISubtitle(request *UpdateLiveAISubtitleRequest) (response *UpdateLiveAISubtitleResponse, err error) { + response = CreateUpdateLiveAISubtitleResponse() + err = client.DoAction(request, response) + return +} + +// UpdateLiveAISubtitleWithChan invokes the live.UpdateLiveAISubtitle API asynchronously +func (client *Client) UpdateLiveAISubtitleWithChan(request *UpdateLiveAISubtitleRequest) (<-chan *UpdateLiveAISubtitleResponse, <-chan error) { + responseChan := make(chan *UpdateLiveAISubtitleResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateLiveAISubtitle(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateLiveAISubtitleWithCallback invokes the live.UpdateLiveAISubtitle API asynchronously +func (client *Client) UpdateLiveAISubtitleWithCallback(request *UpdateLiveAISubtitleRequest, callback func(response *UpdateLiveAISubtitleResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateLiveAISubtitleResponse + var err error + defer close(result) + response, err = client.UpdateLiveAISubtitle(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateLiveAISubtitleRequest is the request struct for api UpdateLiveAISubtitle +type UpdateLiveAISubtitleRequest struct { + *requests.RpcRequest + SrcLanguage string `position:"Query" name:"SrcLanguage"` + Description string `position:"Query" name:"Description"` + FontName string `position:"Query" name:"FontName"` + SubtitleName string `position:"Query" name:"SubtitleName"` + FontSizeNormalized requests.Float `position:"Query" name:"FontSizeNormalized"` + FontColor string `position:"Query" name:"FontColor"` + ShowSourceLan requests.Boolean `position:"Query" name:"ShowSourceLan"` + PositionNormalized *[]string `position:"Query" name:"PositionNormalized" type:"Json"` + BorderWidthNormalized requests.Float `position:"Query" name:"BorderWidthNormalized"` + MaxLines requests.Integer `position:"Query" name:"MaxLines"` + Height string `position:"Query" name:"Height"` + WordPerLine requests.Integer `position:"Query" name:"WordPerLine"` + OwnerId requests.Integer `position:"Query" name:"OwnerId"` + BgWidthNormalized requests.Float `position:"Query" name:"BgWidthNormalized"` + BgColor string `position:"Query" name:"BgColor"` + DstLanguage string `position:"Query" name:"DstLanguage"` + Width string `position:"Query" name:"Width"` + SubtitleId string `position:"Query" name:"SubtitleId"` +} + +// UpdateLiveAISubtitleResponse is the response struct for api UpdateLiveAISubtitle +type UpdateLiveAISubtitleResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateUpdateLiveAISubtitleRequest creates a request to invoke UpdateLiveAISubtitle API +func CreateUpdateLiveAISubtitleRequest() (request *UpdateLiveAISubtitleRequest) { + request = &UpdateLiveAISubtitleRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("live", "2016-11-01", "UpdateLiveAISubtitle", "live", "openAPI") + request.Method = requests.POST + return +} + +// CreateUpdateLiveAISubtitleResponse creates a response to parse from UpdateLiveAISubtitle response +func CreateUpdateLiveAISubtitleResponse() (response *UpdateLiveAISubtitleResponse) { + response = &UpdateLiveAISubtitleResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}