diff --git a/ChangeLog.txt b/ChangeLog.txt index 536bf40cef..fb0ce58005 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,8 @@ +2020-05-19 Version: v1.61.206 +- Generated 2019-10-30 for `aliyuncvc`. +- Public beta version. +- Add Api Overseas. + 2020-05-19 Version: v1.61.205 - Generated 2020-05-15 for `Vcs`. - Initial version. diff --git a/services/aliyuncvc/active_device.go b/services/aliyuncvc/active_device.go new file mode 100644 index 0000000000..63f91d122f --- /dev/null +++ b/services/aliyuncvc/active_device.go @@ -0,0 +1,111 @@ +package aliyuncvc + +//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" +) + +// ActiveDevice invokes the aliyuncvc.ActiveDevice API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/activedevice.html +func (client *Client) ActiveDevice(request *ActiveDeviceRequest) (response *ActiveDeviceResponse, err error) { + response = CreateActiveDeviceResponse() + err = client.DoAction(request, response) + return +} + +// ActiveDeviceWithChan invokes the aliyuncvc.ActiveDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/activedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ActiveDeviceWithChan(request *ActiveDeviceRequest) (<-chan *ActiveDeviceResponse, <-chan error) { + responseChan := make(chan *ActiveDeviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ActiveDevice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ActiveDeviceWithCallback invokes the aliyuncvc.ActiveDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/activedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ActiveDeviceWithCallback(request *ActiveDeviceRequest, callback func(response *ActiveDeviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ActiveDeviceResponse + var err error + defer close(result) + response, err = client.ActiveDevice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ActiveDeviceRequest is the request struct for api ActiveDevice +type ActiveDeviceRequest struct { + *requests.RpcRequest + IP string `position:"Body" name:"IP"` + ActiveCode string `position:"Body" name:"ActiveCode"` + Mac string `position:"Body" name:"Mac"` + DeviceVersion string `position:"Body" name:"DeviceVersion"` + SN string `position:"Body" name:"SN"` +} + +// ActiveDeviceResponse is the response struct for api ActiveDevice +type ActiveDeviceResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Token string `json:"Token" xml:"Token"` +} + +// CreateActiveDeviceRequest creates a request to invoke ActiveDevice API +func CreateActiveDeviceRequest() (request *ActiveDeviceRequest) { + request = &ActiveDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "ActiveDevice", "aliyuncvc", "openAPI") + return +} + +// CreateActiveDeviceResponse creates a response to parse from ActiveDevice response +func CreateActiveDeviceResponse() (response *ActiveDeviceResponse) { + response = &ActiveDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/batch_create_device.go b/services/aliyuncvc/batch_create_device.go new file mode 100644 index 0000000000..e04b787e5c --- /dev/null +++ b/services/aliyuncvc/batch_create_device.go @@ -0,0 +1,106 @@ +package aliyuncvc + +//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" +) + +// BatchCreateDevice invokes the aliyuncvc.BatchCreateDevice API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/batchcreatedevice.html +func (client *Client) BatchCreateDevice(request *BatchCreateDeviceRequest) (response *BatchCreateDeviceResponse, err error) { + response = CreateBatchCreateDeviceResponse() + err = client.DoAction(request, response) + return +} + +// BatchCreateDeviceWithChan invokes the aliyuncvc.BatchCreateDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/batchcreatedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchCreateDeviceWithChan(request *BatchCreateDeviceRequest) (<-chan *BatchCreateDeviceResponse, <-chan error) { + responseChan := make(chan *BatchCreateDeviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.BatchCreateDevice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// BatchCreateDeviceWithCallback invokes the aliyuncvc.BatchCreateDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/batchcreatedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) BatchCreateDeviceWithCallback(request *BatchCreateDeviceRequest, callback func(response *BatchCreateDeviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *BatchCreateDeviceResponse + var err error + defer close(result) + response, err = client.BatchCreateDevice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// BatchCreateDeviceRequest is the request struct for api BatchCreateDevice +type BatchCreateDeviceRequest struct { + *requests.RpcRequest + SN string `position:"Body" name:"SN"` +} + +// BatchCreateDeviceResponse is the response struct for api BatchCreateDevice +type BatchCreateDeviceResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Devices []Data `json:"Devices" xml:"Devices"` +} + +// CreateBatchCreateDeviceRequest creates a request to invoke BatchCreateDevice API +func CreateBatchCreateDeviceRequest() (request *BatchCreateDeviceRequest) { + request = &BatchCreateDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "BatchCreateDevice", "aliyuncvc", "openAPI") + return +} + +// CreateBatchCreateDeviceResponse creates a response to parse from BatchCreateDevice response +func CreateBatchCreateDeviceResponse() (response *BatchCreateDeviceResponse) { + response = &BatchCreateDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/create_device_meeting.go b/services/aliyuncvc/create_device_meeting.go new file mode 100644 index 0000000000..f02bc1ae97 --- /dev/null +++ b/services/aliyuncvc/create_device_meeting.go @@ -0,0 +1,111 @@ +package aliyuncvc + +//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" +) + +// CreateDeviceMeeting invokes the aliyuncvc.CreateDeviceMeeting API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createdevicemeeting.html +func (client *Client) CreateDeviceMeeting(request *CreateDeviceMeetingRequest) (response *CreateDeviceMeetingResponse, err error) { + response = CreateCreateDeviceMeetingResponse() + err = client.DoAction(request, response) + return +} + +// CreateDeviceMeetingWithChan invokes the aliyuncvc.CreateDeviceMeeting API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createdevicemeeting.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateDeviceMeetingWithChan(request *CreateDeviceMeetingRequest) (<-chan *CreateDeviceMeetingResponse, <-chan error) { + responseChan := make(chan *CreateDeviceMeetingResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateDeviceMeeting(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateDeviceMeetingWithCallback invokes the aliyuncvc.CreateDeviceMeeting API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createdevicemeeting.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateDeviceMeetingWithCallback(request *CreateDeviceMeetingRequest, callback func(response *CreateDeviceMeetingResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateDeviceMeetingResponse + var err error + defer close(result) + response, err = client.CreateDeviceMeeting(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateDeviceMeetingRequest is the request struct for api CreateDeviceMeeting +type CreateDeviceMeetingRequest struct { + *requests.RpcRequest + MeetingName string `position:"Body" name:"MeetingName"` + OpenPasswordtag requests.Boolean `position:"Body" name:"OpenPasswordtag"` + Token string `position:"Body" name:"Token"` + Password string `position:"Body" name:"Password"` + SN string `position:"Body" name:"SN"` +} + +// CreateDeviceMeetingResponse is the response struct for api CreateDeviceMeeting +type CreateDeviceMeetingResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Devices Devices `json:"Devices" xml:"Devices"` +} + +// CreateCreateDeviceMeetingRequest creates a request to invoke CreateDeviceMeeting API +func CreateCreateDeviceMeetingRequest() (request *CreateDeviceMeetingRequest) { + request = &CreateDeviceMeetingRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "CreateDeviceMeeting", "aliyuncvc", "openAPI") + return +} + +// CreateCreateDeviceMeetingResponse creates a response to parse from CreateDeviceMeeting response +func CreateCreateDeviceMeetingResponse() (response *CreateDeviceMeetingResponse) { + response = &CreateDeviceMeetingResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/create_live.go b/services/aliyuncvc/create_live.go new file mode 100644 index 0000000000..3a20e5bd96 --- /dev/null +++ b/services/aliyuncvc/create_live.go @@ -0,0 +1,111 @@ +package aliyuncvc + +//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" +) + +// CreateLive invokes the aliyuncvc.CreateLive API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createlive.html +func (client *Client) CreateLive(request *CreateLiveRequest) (response *CreateLiveResponse, err error) { + response = CreateCreateLiveResponse() + err = client.DoAction(request, response) + return +} + +// CreateLiveWithChan invokes the aliyuncvc.CreateLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateLiveWithChan(request *CreateLiveRequest) (<-chan *CreateLiveResponse, <-chan error) { + responseChan := make(chan *CreateLiveResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateLive(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateLiveWithCallback invokes the aliyuncvc.CreateLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateLiveWithCallback(request *CreateLiveRequest, callback func(response *CreateLiveResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateLiveResponse + var err error + defer close(result) + response, err = client.CreateLive(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateLiveRequest is the request struct for api CreateLive +type CreateLiveRequest struct { + *requests.RpcRequest + Memo string `position:"Body" name:"Memo"` + UserId string `position:"Body" name:"UserId"` + OpenPasswordFlag requests.Boolean `position:"Body" name:"OpenPasswordFlag"` + Password string `position:"Body" name:"Password"` + LiveName string `position:"Body" name:"LiveName"` +} + +// CreateLiveResponse is the response struct for api CreateLive +type CreateLiveResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + LiveInfo LiveInfo `json:"LiveInfo" xml:"LiveInfo"` +} + +// CreateCreateLiveRequest creates a request to invoke CreateLive API +func CreateCreateLiveRequest() (request *CreateLiveRequest) { + request = &CreateLiveRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "CreateLive", "aliyuncvc", "openAPI") + return +} + +// CreateCreateLiveResponse creates a response to parse from CreateLive response +func CreateCreateLiveResponse() (response *CreateLiveResponse) { + response = &CreateLiveResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/create_meeting.go b/services/aliyuncvc/create_meeting.go index 7c97e166de..f7f41f2811 100644 --- a/services/aliyuncvc/create_meeting.go +++ b/services/aliyuncvc/create_meeting.go @@ -76,8 +76,12 @@ func (client *Client) CreateMeetingWithCallback(request *CreateMeetingRequest, c // CreateMeetingRequest is the request struct for api CreateMeeting type CreateMeetingRequest struct { *requests.RpcRequest - MeetingName string `position:"Body" name:"MeetingName"` - UserId string `position:"Body" name:"UserId"` + MeetingName string `position:"Body" name:"MeetingName"` + UserId string `position:"Body" name:"UserId"` + OpenPasswordFlag requests.Boolean `position:"Body" name:"OpenPasswordFlag"` + Password string `position:"Body" name:"Password"` + MasterEnableFlag requests.Boolean `position:"Body" name:"MasterEnableFlag"` + MeetingMode string `position:"Body" name:"MeetingMode"` } // CreateMeetingResponse is the response struct for api CreateMeeting diff --git a/services/aliyuncvc/create_meeting_international.go b/services/aliyuncvc/create_meeting_international.go new file mode 100644 index 0000000000..5a3f6f2a9f --- /dev/null +++ b/services/aliyuncvc/create_meeting_international.go @@ -0,0 +1,110 @@ +package aliyuncvc + +//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" +) + +// CreateMeetingInternational invokes the aliyuncvc.CreateMeetingInternational API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createmeetinginternational.html +func (client *Client) CreateMeetingInternational(request *CreateMeetingInternationalRequest) (response *CreateMeetingInternationalResponse, err error) { + response = CreateCreateMeetingInternationalResponse() + err = client.DoAction(request, response) + return +} + +// CreateMeetingInternationalWithChan invokes the aliyuncvc.CreateMeetingInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createmeetinginternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateMeetingInternationalWithChan(request *CreateMeetingInternationalRequest) (<-chan *CreateMeetingInternationalResponse, <-chan error) { + responseChan := make(chan *CreateMeetingInternationalResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateMeetingInternational(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateMeetingInternationalWithCallback invokes the aliyuncvc.CreateMeetingInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createmeetinginternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateMeetingInternationalWithCallback(request *CreateMeetingInternationalRequest, callback func(response *CreateMeetingInternationalResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateMeetingInternationalResponse + var err error + defer close(result) + response, err = client.CreateMeetingInternational(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateMeetingInternationalRequest is the request struct for api CreateMeetingInternational +type CreateMeetingInternationalRequest struct { + *requests.RpcRequest + MeetingName string `position:"Body" name:"MeetingName"` + UserId string `position:"Body" name:"UserId"` + OpenPasswordFlag string `position:"Body" name:"OpenPasswordFlag"` + Password string `position:"Body" name:"Password"` +} + +// CreateMeetingInternationalResponse is the response struct for api CreateMeetingInternational +type CreateMeetingInternationalResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + MeetingInfo MeetingInfo `json:"MeetingInfo" xml:"MeetingInfo"` +} + +// CreateCreateMeetingInternationalRequest creates a request to invoke CreateMeetingInternational API +func CreateCreateMeetingInternationalRequest() (request *CreateMeetingInternationalRequest) { + request = &CreateMeetingInternationalRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "CreateMeetingInternational", "aliyuncvc", "openAPI") + return +} + +// CreateCreateMeetingInternationalResponse creates a response to parse from CreateMeetingInternational response +func CreateCreateMeetingInternationalResponse() (response *CreateMeetingInternationalResponse) { + response = &CreateMeetingInternationalResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/create_user_international.go b/services/aliyuncvc/create_user_international.go new file mode 100644 index 0000000000..12259ee1ba --- /dev/null +++ b/services/aliyuncvc/create_user_international.go @@ -0,0 +1,108 @@ +package aliyuncvc + +//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" +) + +// CreateUserInternational invokes the aliyuncvc.CreateUserInternational API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createuserinternational.html +func (client *Client) CreateUserInternational(request *CreateUserInternationalRequest) (response *CreateUserInternationalResponse, err error) { + response = CreateCreateUserInternationalResponse() + err = client.DoAction(request, response) + return +} + +// CreateUserInternationalWithChan invokes the aliyuncvc.CreateUserInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createuserinternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateUserInternationalWithChan(request *CreateUserInternationalRequest) (<-chan *CreateUserInternationalResponse, <-chan error) { + responseChan := make(chan *CreateUserInternationalResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateUserInternational(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateUserInternationalWithCallback invokes the aliyuncvc.CreateUserInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/createuserinternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateUserInternationalWithCallback(request *CreateUserInternationalRequest, callback func(response *CreateUserInternationalResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateUserInternationalResponse + var err error + defer close(result) + response, err = client.CreateUserInternational(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateUserInternationalRequest is the request struct for api CreateUserInternational +type CreateUserInternationalRequest struct { + *requests.RpcRequest + Count requests.Integer `position:"Body" name:"Count"` + UserInfo string `position:"Body" name:"UserInfo"` +} + +// CreateUserInternationalResponse is the response struct for api CreateUserInternational +type CreateUserInternationalResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + UserId string `json:"UserId" xml:"UserId"` +} + +// CreateCreateUserInternationalRequest creates a request to invoke CreateUserInternational API +func CreateCreateUserInternationalRequest() (request *CreateUserInternationalRequest) { + request = &CreateUserInternationalRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "CreateUserInternational", "aliyuncvc", "openAPI") + return +} + +// CreateCreateUserInternationalResponse creates a response to parse from CreateUserInternational response +func CreateCreateUserInternationalResponse() (response *CreateUserInternationalResponse) { + response = &CreateUserInternationalResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/delete_device.go b/services/aliyuncvc/delete_device.go new file mode 100644 index 0000000000..f65e63f56a --- /dev/null +++ b/services/aliyuncvc/delete_device.go @@ -0,0 +1,107 @@ +package aliyuncvc + +//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" +) + +// DeleteDevice invokes the aliyuncvc.DeleteDevice API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/deletedevice.html +func (client *Client) DeleteDevice(request *DeleteDeviceRequest) (response *DeleteDeviceResponse, err error) { + response = CreateDeleteDeviceResponse() + err = client.DoAction(request, response) + return +} + +// DeleteDeviceWithChan invokes the aliyuncvc.DeleteDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/deletedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) DeleteDeviceWithChan(request *DeleteDeviceRequest) (<-chan *DeleteDeviceResponse, <-chan error) { + responseChan := make(chan *DeleteDeviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteDevice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteDeviceWithCallback invokes the aliyuncvc.DeleteDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/deletedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) DeleteDeviceWithCallback(request *DeleteDeviceRequest, callback func(response *DeleteDeviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteDeviceResponse + var err error + defer close(result) + response, err = client.DeleteDevice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteDeviceRequest is the request struct for api DeleteDevice +type DeleteDeviceRequest struct { + *requests.RpcRequest + GroupId string `position:"Body" name:"GroupId"` + SN string `position:"Body" name:"SN"` +} + +// DeleteDeviceResponse is the response struct for api DeleteDevice +type DeleteDeviceResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteDeviceRequest creates a request to invoke DeleteDevice API +func CreateDeleteDeviceRequest() (request *DeleteDeviceRequest) { + request = &DeleteDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "DeleteDevice", "aliyuncvc", "openAPI") + return +} + +// CreateDeleteDeviceResponse creates a response to parse from DeleteDevice response +func CreateDeleteDeviceResponse() (response *DeleteDeviceResponse) { + response = &DeleteDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/delete_live.go b/services/aliyuncvc/delete_live.go new file mode 100644 index 0000000000..a2e82dd891 --- /dev/null +++ b/services/aliyuncvc/delete_live.go @@ -0,0 +1,107 @@ +package aliyuncvc + +//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" +) + +// DeleteLive invokes the aliyuncvc.DeleteLive API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/deletelive.html +func (client *Client) DeleteLive(request *DeleteLiveRequest) (response *DeleteLiveResponse, err error) { + response = CreateDeleteLiveResponse() + err = client.DoAction(request, response) + return +} + +// DeleteLiveWithChan invokes the aliyuncvc.DeleteLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/deletelive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) DeleteLiveWithChan(request *DeleteLiveRequest) (<-chan *DeleteLiveResponse, <-chan error) { + responseChan := make(chan *DeleteLiveResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.DeleteLive(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// DeleteLiveWithCallback invokes the aliyuncvc.DeleteLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/deletelive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) DeleteLiveWithCallback(request *DeleteLiveRequest, callback func(response *DeleteLiveResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *DeleteLiveResponse + var err error + defer close(result) + response, err = client.DeleteLive(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// DeleteLiveRequest is the request struct for api DeleteLive +type DeleteLiveRequest struct { + *requests.RpcRequest + LiveUUID string `position:"Body" name:"LiveUUID"` + UserId string `position:"Body" name:"UserId"` +} + +// DeleteLiveResponse is the response struct for api DeleteLive +type DeleteLiveResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateDeleteLiveRequest creates a request to invoke DeleteLive API +func CreateDeleteLiveRequest() (request *DeleteLiveRequest) { + request = &DeleteLiveRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "DeleteLive", "aliyuncvc", "openAPI") + return +} + +// CreateDeleteLiveResponse creates a response to parse from DeleteLive response +func CreateDeleteLiveResponse() (response *DeleteLiveResponse) { + response = &DeleteLiveResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/end_device_meeting.go b/services/aliyuncvc/end_device_meeting.go new file mode 100644 index 0000000000..ea878cefb4 --- /dev/null +++ b/services/aliyuncvc/end_device_meeting.go @@ -0,0 +1,107 @@ +package aliyuncvc + +//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" +) + +// EndDeviceMeeting invokes the aliyuncvc.EndDeviceMeeting API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/enddevicemeeting.html +func (client *Client) EndDeviceMeeting(request *EndDeviceMeetingRequest) (response *EndDeviceMeetingResponse, err error) { + response = CreateEndDeviceMeetingResponse() + err = client.DoAction(request, response) + return +} + +// EndDeviceMeetingWithChan invokes the aliyuncvc.EndDeviceMeeting API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/enddevicemeeting.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) EndDeviceMeetingWithChan(request *EndDeviceMeetingRequest) (<-chan *EndDeviceMeetingResponse, <-chan error) { + responseChan := make(chan *EndDeviceMeetingResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.EndDeviceMeeting(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// EndDeviceMeetingWithCallback invokes the aliyuncvc.EndDeviceMeeting API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/enddevicemeeting.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) EndDeviceMeetingWithCallback(request *EndDeviceMeetingRequest, callback func(response *EndDeviceMeetingResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *EndDeviceMeetingResponse + var err error + defer close(result) + response, err = client.EndDeviceMeeting(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// EndDeviceMeetingRequest is the request struct for api EndDeviceMeeting +type EndDeviceMeetingRequest struct { + *requests.RpcRequest + MeetingUUID string `position:"Body" name:"MeetingUUID"` + SN string `position:"Body" name:"SN"` +} + +// EndDeviceMeetingResponse is the response struct for api EndDeviceMeeting +type EndDeviceMeetingResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateEndDeviceMeetingRequest creates a request to invoke EndDeviceMeeting API +func CreateEndDeviceMeetingRequest() (request *EndDeviceMeetingRequest) { + request = &EndDeviceMeetingRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "EndDeviceMeeting", "aliyuncvc", "openAPI") + return +} + +// CreateEndDeviceMeetingResponse creates a response to parse from EndDeviceMeeting response +func CreateEndDeviceMeetingResponse() (response *EndDeviceMeetingResponse) { + response = &EndDeviceMeetingResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/end_live.go b/services/aliyuncvc/end_live.go new file mode 100644 index 0000000000..803caad10c --- /dev/null +++ b/services/aliyuncvc/end_live.go @@ -0,0 +1,107 @@ +package aliyuncvc + +//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" +) + +// EndLive invokes the aliyuncvc.EndLive API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/endlive.html +func (client *Client) EndLive(request *EndLiveRequest) (response *EndLiveResponse, err error) { + response = CreateEndLiveResponse() + err = client.DoAction(request, response) + return +} + +// EndLiveWithChan invokes the aliyuncvc.EndLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/endlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) EndLiveWithChan(request *EndLiveRequest) (<-chan *EndLiveResponse, <-chan error) { + responseChan := make(chan *EndLiveResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.EndLive(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// EndLiveWithCallback invokes the aliyuncvc.EndLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/endlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) EndLiveWithCallback(request *EndLiveRequest, callback func(response *EndLiveResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *EndLiveResponse + var err error + defer close(result) + response, err = client.EndLive(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// EndLiveRequest is the request struct for api EndLive +type EndLiveRequest struct { + *requests.RpcRequest + LiveUUID string `position:"Body" name:"LiveUUID"` + UserId string `position:"Body" name:"UserId"` +} + +// EndLiveResponse is the response struct for api EndLive +type EndLiveResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateEndLiveRequest creates a request to invoke EndLive API +func CreateEndLiveRequest() (request *EndLiveRequest) { + request = &EndLiveRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "EndLive", "aliyuncvc", "openAPI") + return +} + +// CreateEndLiveResponse creates a response to parse from EndLive response +func CreateEndLiveResponse() (response *EndLiveResponse) { + response = &EndLiveResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/get_device_active_code.go b/services/aliyuncvc/get_device_active_code.go new file mode 100644 index 0000000000..605710cea4 --- /dev/null +++ b/services/aliyuncvc/get_device_active_code.go @@ -0,0 +1,106 @@ +package aliyuncvc + +//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" +) + +// GetDeviceActiveCode invokes the aliyuncvc.GetDeviceActiveCode API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getdeviceactivecode.html +func (client *Client) GetDeviceActiveCode(request *GetDeviceActiveCodeRequest) (response *GetDeviceActiveCodeResponse, err error) { + response = CreateGetDeviceActiveCodeResponse() + err = client.DoAction(request, response) + return +} + +// GetDeviceActiveCodeWithChan invokes the aliyuncvc.GetDeviceActiveCode API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getdeviceactivecode.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetDeviceActiveCodeWithChan(request *GetDeviceActiveCodeRequest) (<-chan *GetDeviceActiveCodeResponse, <-chan error) { + responseChan := make(chan *GetDeviceActiveCodeResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetDeviceActiveCode(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetDeviceActiveCodeWithCallback invokes the aliyuncvc.GetDeviceActiveCode API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getdeviceactivecode.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetDeviceActiveCodeWithCallback(request *GetDeviceActiveCodeRequest, callback func(response *GetDeviceActiveCodeResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetDeviceActiveCodeResponse + var err error + defer close(result) + response, err = client.GetDeviceActiveCode(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetDeviceActiveCodeRequest is the request struct for api GetDeviceActiveCode +type GetDeviceActiveCodeRequest struct { + *requests.RpcRequest + SN string `position:"Body" name:"SN"` +} + +// GetDeviceActiveCodeResponse is the response struct for api GetDeviceActiveCode +type GetDeviceActiveCodeResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + Devices []Data `json:"Devices" xml:"Devices"` +} + +// CreateGetDeviceActiveCodeRequest creates a request to invoke GetDeviceActiveCode API +func CreateGetDeviceActiveCodeRequest() (request *GetDeviceActiveCodeRequest) { + request = &GetDeviceActiveCodeRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "GetDeviceActiveCode", "aliyuncvc", "openAPI") + return +} + +// CreateGetDeviceActiveCodeResponse creates a response to parse from GetDeviceActiveCode response +func CreateGetDeviceActiveCodeResponse() (response *GetDeviceActiveCodeResponse) { + response = &GetDeviceActiveCodeResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/get_device_token.go b/services/aliyuncvc/get_device_token.go new file mode 100644 index 0000000000..a8d5d8064b --- /dev/null +++ b/services/aliyuncvc/get_device_token.go @@ -0,0 +1,108 @@ +package aliyuncvc + +//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" +) + +// GetDeviceToken invokes the aliyuncvc.GetDeviceToken API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getdevicetoken.html +func (client *Client) GetDeviceToken(request *GetDeviceTokenRequest) (response *GetDeviceTokenResponse, err error) { + response = CreateGetDeviceTokenResponse() + err = client.DoAction(request, response) + return +} + +// GetDeviceTokenWithChan invokes the aliyuncvc.GetDeviceToken API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getdevicetoken.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetDeviceTokenWithChan(request *GetDeviceTokenRequest) (<-chan *GetDeviceTokenResponse, <-chan error) { + responseChan := make(chan *GetDeviceTokenResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetDeviceToken(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetDeviceTokenWithCallback invokes the aliyuncvc.GetDeviceToken API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getdevicetoken.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetDeviceTokenWithCallback(request *GetDeviceTokenRequest, callback func(response *GetDeviceTokenResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetDeviceTokenResponse + var err error + defer close(result) + response, err = client.GetDeviceToken(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetDeviceTokenRequest is the request struct for api GetDeviceToken +type GetDeviceTokenRequest struct { + *requests.RpcRequest + Token string `position:"Query" name:"Token"` + SN string `position:"Query" name:"SN"` +} + +// GetDeviceTokenResponse is the response struct for api GetDeviceToken +type GetDeviceTokenResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Token string `json:"Token" xml:"Token"` +} + +// CreateGetDeviceTokenRequest creates a request to invoke GetDeviceToken API +func CreateGetDeviceTokenRequest() (request *GetDeviceTokenRequest) { + request = &GetDeviceTokenRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "GetDeviceToken", "aliyuncvc", "openAPI") + return +} + +// CreateGetDeviceTokenResponse creates a response to parse from GetDeviceToken response +func CreateGetDeviceTokenResponse() (response *GetDeviceTokenResponse) { + response = &GetDeviceTokenResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/get_meeting_international.go b/services/aliyuncvc/get_meeting_international.go new file mode 100644 index 0000000000..4b129a48e0 --- /dev/null +++ b/services/aliyuncvc/get_meeting_international.go @@ -0,0 +1,107 @@ +package aliyuncvc + +//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" +) + +// GetMeetingInternational invokes the aliyuncvc.GetMeetingInternational API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getmeetinginternational.html +func (client *Client) GetMeetingInternational(request *GetMeetingInternationalRequest) (response *GetMeetingInternationalResponse, err error) { + response = CreateGetMeetingInternationalResponse() + err = client.DoAction(request, response) + return +} + +// GetMeetingInternationalWithChan invokes the aliyuncvc.GetMeetingInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getmeetinginternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetMeetingInternationalWithChan(request *GetMeetingInternationalRequest) (<-chan *GetMeetingInternationalResponse, <-chan error) { + responseChan := make(chan *GetMeetingInternationalResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetMeetingInternational(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetMeetingInternationalWithCallback invokes the aliyuncvc.GetMeetingInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/getmeetinginternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetMeetingInternationalWithCallback(request *GetMeetingInternationalRequest, callback func(response *GetMeetingInternationalResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetMeetingInternationalResponse + var err error + defer close(result) + response, err = client.GetMeetingInternational(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetMeetingInternationalRequest is the request struct for api GetMeetingInternational +type GetMeetingInternationalRequest struct { + *requests.RpcRequest + MeetingUUID string `position:"Body" name:"MeetingUUID"` +} + +// GetMeetingInternationalResponse is the response struct for api GetMeetingInternational +type GetMeetingInternationalResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + MeetingInfo MeetingInfo `json:"MeetingInfo" xml:"MeetingInfo"` +} + +// CreateGetMeetingInternationalRequest creates a request to invoke GetMeetingInternational API +func CreateGetMeetingInternationalRequest() (request *GetMeetingInternationalRequest) { + request = &GetMeetingInternationalRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "GetMeetingInternational", "aliyuncvc", "openAPI") + return +} + +// CreateGetMeetingInternationalResponse creates a response to parse from GetMeetingInternational response +func CreateGetMeetingInternationalResponse() (response *GetMeetingInternationalResponse) { + response = &GetMeetingInternationalResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/get_meeting_member.go b/services/aliyuncvc/get_meeting_member.go index 87854bb724..4575e2f55e 100644 --- a/services/aliyuncvc/get_meeting_member.go +++ b/services/aliyuncvc/get_meeting_member.go @@ -82,11 +82,11 @@ type GetMeetingMemberRequest struct { // GetMeetingMemberResponse is the response struct for api GetMeetingMember type GetMeetingMemberResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Message string `json:"Message" xml:"Message"` - Success bool `json:"Success" xml:"Success"` - ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` - Members []int `json:"Members" xml:"Members"` + RequestId string `json:"RequestId" xml:"RequestId"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Members map[string]interface{} `json:"Members" xml:"Members"` } // CreateGetMeetingMemberRequest creates a request to invoke GetMeetingMember API diff --git a/services/aliyuncvc/join_device_meeting.go b/services/aliyuncvc/join_device_meeting.go new file mode 100644 index 0000000000..bed5f46b4f --- /dev/null +++ b/services/aliyuncvc/join_device_meeting.go @@ -0,0 +1,110 @@ +package aliyuncvc + +//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" +) + +// JoinDeviceMeeting invokes the aliyuncvc.JoinDeviceMeeting API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joindevicemeeting.html +func (client *Client) JoinDeviceMeeting(request *JoinDeviceMeetingRequest) (response *JoinDeviceMeetingResponse, err error) { + response = CreateJoinDeviceMeetingResponse() + err = client.DoAction(request, response) + return +} + +// JoinDeviceMeetingWithChan invokes the aliyuncvc.JoinDeviceMeeting API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joindevicemeeting.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) JoinDeviceMeetingWithChan(request *JoinDeviceMeetingRequest) (<-chan *JoinDeviceMeetingResponse, <-chan error) { + responseChan := make(chan *JoinDeviceMeetingResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.JoinDeviceMeeting(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// JoinDeviceMeetingWithCallback invokes the aliyuncvc.JoinDeviceMeeting API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joindevicemeeting.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) JoinDeviceMeetingWithCallback(request *JoinDeviceMeetingRequest, callback func(response *JoinDeviceMeetingResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *JoinDeviceMeetingResponse + var err error + defer close(result) + response, err = client.JoinDeviceMeeting(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// JoinDeviceMeetingRequest is the request struct for api JoinDeviceMeeting +type JoinDeviceMeetingRequest struct { + *requests.RpcRequest + Token string `position:"Body" name:"Token"` + Password string `position:"Body" name:"Password"` + MeetingCode string `position:"Body" name:"MeetingCode"` + SN string `position:"Body" name:"SN"` +} + +// JoinDeviceMeetingResponse is the response struct for api JoinDeviceMeeting +type JoinDeviceMeetingResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Device Device `json:"Device" xml:"Device"` +} + +// CreateJoinDeviceMeetingRequest creates a request to invoke JoinDeviceMeeting API +func CreateJoinDeviceMeetingRequest() (request *JoinDeviceMeetingRequest) { + request = &JoinDeviceMeetingRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "JoinDeviceMeeting", "aliyuncvc", "openAPI") + return +} + +// CreateJoinDeviceMeetingResponse creates a response to parse from JoinDeviceMeeting response +func CreateJoinDeviceMeetingResponse() (response *JoinDeviceMeetingResponse) { + response = &JoinDeviceMeetingResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/join_live.go b/services/aliyuncvc/join_live.go new file mode 100644 index 0000000000..655c5b9a89 --- /dev/null +++ b/services/aliyuncvc/join_live.go @@ -0,0 +1,109 @@ +package aliyuncvc + +//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" +) + +// JoinLive invokes the aliyuncvc.JoinLive API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joinlive.html +func (client *Client) JoinLive(request *JoinLiveRequest) (response *JoinLiveResponse, err error) { + response = CreateJoinLiveResponse() + err = client.DoAction(request, response) + return +} + +// JoinLiveWithChan invokes the aliyuncvc.JoinLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joinlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) JoinLiveWithChan(request *JoinLiveRequest) (<-chan *JoinLiveResponse, <-chan error) { + responseChan := make(chan *JoinLiveResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.JoinLive(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// JoinLiveWithCallback invokes the aliyuncvc.JoinLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joinlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) JoinLiveWithCallback(request *JoinLiveRequest, callback func(response *JoinLiveResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *JoinLiveResponse + var err error + defer close(result) + response, err = client.JoinLive(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// JoinLiveRequest is the request struct for api JoinLive +type JoinLiveRequest struct { + *requests.RpcRequest + LiveUUID string `position:"Body" name:"LiveUUID"` + UserId string `position:"Body" name:"UserId"` + Password string `position:"Body" name:"Password"` +} + +// JoinLiveResponse is the response struct for api JoinLive +type JoinLiveResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Message string `json:"Message" xml:"Message"` + MeetingInfo MeetingInfo `json:"MeetingInfo" xml:"MeetingInfo"` +} + +// CreateJoinLiveRequest creates a request to invoke JoinLive API +func CreateJoinLiveRequest() (request *JoinLiveRequest) { + request = &JoinLiveRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "JoinLive", "aliyuncvc", "openAPI") + return +} + +// CreateJoinLiveResponse creates a response to parse from JoinLive response +func CreateJoinLiveResponse() (response *JoinLiveResponse) { + response = &JoinLiveResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/join_meeting.go b/services/aliyuncvc/join_meeting.go index c118268254..7e715101de 100644 --- a/services/aliyuncvc/join_meeting.go +++ b/services/aliyuncvc/join_meeting.go @@ -77,6 +77,7 @@ func (client *Client) JoinMeetingWithCallback(request *JoinMeetingRequest, callb type JoinMeetingRequest struct { *requests.RpcRequest UserId string `position:"Body" name:"UserId"` + Password string `position:"Body" name:"Password"` MeetingCode string `position:"Body" name:"MeetingCode"` } diff --git a/services/aliyuncvc/join_meeting_international.go b/services/aliyuncvc/join_meeting_international.go new file mode 100644 index 0000000000..0752d30f78 --- /dev/null +++ b/services/aliyuncvc/join_meeting_international.go @@ -0,0 +1,109 @@ +package aliyuncvc + +//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" +) + +// JoinMeetingInternational invokes the aliyuncvc.JoinMeetingInternational API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joinmeetinginternational.html +func (client *Client) JoinMeetingInternational(request *JoinMeetingInternationalRequest) (response *JoinMeetingInternationalResponse, err error) { + response = CreateJoinMeetingInternationalResponse() + err = client.DoAction(request, response) + return +} + +// JoinMeetingInternationalWithChan invokes the aliyuncvc.JoinMeetingInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joinmeetinginternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) JoinMeetingInternationalWithChan(request *JoinMeetingInternationalRequest) (<-chan *JoinMeetingInternationalResponse, <-chan error) { + responseChan := make(chan *JoinMeetingInternationalResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.JoinMeetingInternational(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// JoinMeetingInternationalWithCallback invokes the aliyuncvc.JoinMeetingInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/joinmeetinginternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) JoinMeetingInternationalWithCallback(request *JoinMeetingInternationalRequest, callback func(response *JoinMeetingInternationalResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *JoinMeetingInternationalResponse + var err error + defer close(result) + response, err = client.JoinMeetingInternational(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// JoinMeetingInternationalRequest is the request struct for api JoinMeetingInternational +type JoinMeetingInternationalRequest struct { + *requests.RpcRequest + UserId string `position:"Body" name:"UserId"` + Password string `position:"Body" name:"Password"` + MeetingCode string `position:"Body" name:"MeetingCode"` +} + +// JoinMeetingInternationalResponse is the response struct for api JoinMeetingInternational +type JoinMeetingInternationalResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Message string `json:"Message" xml:"Message"` + MeetingInfo MeetingInfo `json:"MeetingInfo" xml:"MeetingInfo"` +} + +// CreateJoinMeetingInternationalRequest creates a request to invoke JoinMeetingInternational API +func CreateJoinMeetingInternationalRequest() (request *JoinMeetingInternationalRequest) { + request = &JoinMeetingInternationalRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "JoinMeetingInternational", "aliyuncvc", "openAPI") + return +} + +// CreateJoinMeetingInternationalResponse creates a response to parse from JoinMeetingInternational response +func CreateJoinMeetingInternationalResponse() (response *JoinMeetingInternationalResponse) { + response = &JoinMeetingInternationalResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/list_device_ip.go b/services/aliyuncvc/list_device_ip.go new file mode 100644 index 0000000000..ccd01a8b6b --- /dev/null +++ b/services/aliyuncvc/list_device_ip.go @@ -0,0 +1,108 @@ +package aliyuncvc + +//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" +) + +// ListDeviceIp invokes the aliyuncvc.ListDeviceIp API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/listdeviceip.html +func (client *Client) ListDeviceIp(request *ListDeviceIpRequest) (response *ListDeviceIpResponse, err error) { + response = CreateListDeviceIpResponse() + err = client.DoAction(request, response) + return +} + +// ListDeviceIpWithChan invokes the aliyuncvc.ListDeviceIp API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/listdeviceip.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListDeviceIpWithChan(request *ListDeviceIpRequest) (<-chan *ListDeviceIpResponse, <-chan error) { + responseChan := make(chan *ListDeviceIpResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListDeviceIp(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListDeviceIpWithCallback invokes the aliyuncvc.ListDeviceIp API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/listdeviceip.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListDeviceIpWithCallback(request *ListDeviceIpRequest, callback func(response *ListDeviceIpResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListDeviceIpResponse + var err error + defer close(result) + response, err = client.ListDeviceIp(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListDeviceIpRequest is the request struct for api ListDeviceIp +type ListDeviceIpRequest struct { + *requests.RpcRequest + GroupId string `position:"Body" name:"GroupId"` + SN string `position:"Body" name:"SN"` +} + +// ListDeviceIpResponse is the response struct for api ListDeviceIp +type ListDeviceIpResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Devices []DevicesItem `json:"Devices" xml:"Devices"` +} + +// CreateListDeviceIpRequest creates a request to invoke ListDeviceIp API +func CreateListDeviceIpRequest() (request *ListDeviceIpRequest) { + request = &ListDeviceIpRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "ListDeviceIp", "aliyuncvc", "openAPI") + return +} + +// CreateListDeviceIpResponse creates a response to parse from ListDeviceIp response +func CreateListDeviceIpResponse() (response *ListDeviceIpResponse) { + response = &ListDeviceIpResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/modify_meeting_password.go b/services/aliyuncvc/modify_meeting_password.go new file mode 100644 index 0000000000..7d2dda283d --- /dev/null +++ b/services/aliyuncvc/modify_meeting_password.go @@ -0,0 +1,109 @@ +package aliyuncvc + +//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" +) + +// ModifyMeetingPassword invokes the aliyuncvc.ModifyMeetingPassword API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/modifymeetingpassword.html +func (client *Client) ModifyMeetingPassword(request *ModifyMeetingPasswordRequest) (response *ModifyMeetingPasswordResponse, err error) { + response = CreateModifyMeetingPasswordResponse() + err = client.DoAction(request, response) + return +} + +// ModifyMeetingPasswordWithChan invokes the aliyuncvc.ModifyMeetingPassword API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/modifymeetingpassword.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ModifyMeetingPasswordWithChan(request *ModifyMeetingPasswordRequest) (<-chan *ModifyMeetingPasswordResponse, <-chan error) { + responseChan := make(chan *ModifyMeetingPasswordResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyMeetingPassword(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyMeetingPasswordWithCallback invokes the aliyuncvc.ModifyMeetingPassword API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/modifymeetingpassword.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ModifyMeetingPasswordWithCallback(request *ModifyMeetingPasswordRequest, callback func(response *ModifyMeetingPasswordResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyMeetingPasswordResponse + var err error + defer close(result) + response, err = client.ModifyMeetingPassword(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyMeetingPasswordRequest is the request struct for api ModifyMeetingPassword +type ModifyMeetingPasswordRequest struct { + *requests.RpcRequest + UserId string `position:"Body" name:"UserId"` + OpenPasswordFlag requests.Boolean `position:"Body" name:"OpenPasswordFlag"` + MeetingUUID string `position:"Body" name:"MeetingUUID"` + Password string `position:"Body" name:"Password"` +} + +// ModifyMeetingPasswordResponse is the response struct for api ModifyMeetingPassword +type ModifyMeetingPasswordResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyMeetingPasswordRequest creates a request to invoke ModifyMeetingPassword API +func CreateModifyMeetingPasswordRequest() (request *ModifyMeetingPasswordRequest) { + request = &ModifyMeetingPasswordRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "ModifyMeetingPassword", "aliyuncvc", "openAPI") + return +} + +// CreateModifyMeetingPasswordResponse creates a response to parse from ModifyMeetingPassword response +func CreateModifyMeetingPasswordResponse() (response *ModifyMeetingPasswordResponse) { + response = &ModifyMeetingPasswordResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/modify_meeting_password_international.go b/services/aliyuncvc/modify_meeting_password_international.go new file mode 100644 index 0000000000..03e1c5f042 --- /dev/null +++ b/services/aliyuncvc/modify_meeting_password_international.go @@ -0,0 +1,109 @@ +package aliyuncvc + +//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" +) + +// ModifyMeetingPasswordInternational invokes the aliyuncvc.ModifyMeetingPasswordInternational API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/modifymeetingpasswordinternational.html +func (client *Client) ModifyMeetingPasswordInternational(request *ModifyMeetingPasswordInternationalRequest) (response *ModifyMeetingPasswordInternationalResponse, err error) { + response = CreateModifyMeetingPasswordInternationalResponse() + err = client.DoAction(request, response) + return +} + +// ModifyMeetingPasswordInternationalWithChan invokes the aliyuncvc.ModifyMeetingPasswordInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/modifymeetingpasswordinternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ModifyMeetingPasswordInternationalWithChan(request *ModifyMeetingPasswordInternationalRequest) (<-chan *ModifyMeetingPasswordInternationalResponse, <-chan error) { + responseChan := make(chan *ModifyMeetingPasswordInternationalResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ModifyMeetingPasswordInternational(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ModifyMeetingPasswordInternationalWithCallback invokes the aliyuncvc.ModifyMeetingPasswordInternational API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/modifymeetingpasswordinternational.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ModifyMeetingPasswordInternationalWithCallback(request *ModifyMeetingPasswordInternationalRequest, callback func(response *ModifyMeetingPasswordInternationalResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ModifyMeetingPasswordInternationalResponse + var err error + defer close(result) + response, err = client.ModifyMeetingPasswordInternational(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ModifyMeetingPasswordInternationalRequest is the request struct for api ModifyMeetingPasswordInternational +type ModifyMeetingPasswordInternationalRequest struct { + *requests.RpcRequest + UserId string `position:"Body" name:"UserId"` + OpenPasswordFlag requests.Boolean `position:"Body" name:"OpenPasswordFlag"` + MeetingUUID string `position:"Body" name:"MeetingUUID"` + Password string `position:"Body" name:"Password"` +} + +// ModifyMeetingPasswordInternationalResponse is the response struct for api ModifyMeetingPasswordInternational +type ModifyMeetingPasswordInternationalResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateModifyMeetingPasswordInternationalRequest creates a request to invoke ModifyMeetingPasswordInternational API +func CreateModifyMeetingPasswordInternationalRequest() (request *ModifyMeetingPasswordInternationalRequest) { + request = &ModifyMeetingPasswordInternationalRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "ModifyMeetingPasswordInternational", "aliyuncvc", "openAPI") + return +} + +// CreateModifyMeetingPasswordInternationalResponse creates a response to parse from ModifyMeetingPasswordInternational response +func CreateModifyMeetingPasswordInternationalResponse() (response *ModifyMeetingPasswordInternationalResponse) { + response = &ModifyMeetingPasswordInternationalResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/register_device.go b/services/aliyuncvc/register_device.go new file mode 100644 index 0000000000..53ee4f5d76 --- /dev/null +++ b/services/aliyuncvc/register_device.go @@ -0,0 +1,111 @@ +package aliyuncvc + +//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" +) + +// RegisterDevice invokes the aliyuncvc.RegisterDevice API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/registerdevice.html +func (client *Client) RegisterDevice(request *RegisterDeviceRequest) (response *RegisterDeviceResponse, err error) { + response = CreateRegisterDeviceResponse() + err = client.DoAction(request, response) + return +} + +// RegisterDeviceWithChan invokes the aliyuncvc.RegisterDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/registerdevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) RegisterDeviceWithChan(request *RegisterDeviceRequest) (<-chan *RegisterDeviceResponse, <-chan error) { + responseChan := make(chan *RegisterDeviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RegisterDevice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RegisterDeviceWithCallback invokes the aliyuncvc.RegisterDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/registerdevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) RegisterDeviceWithCallback(request *RegisterDeviceRequest, callback func(response *RegisterDeviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RegisterDeviceResponse + var err error + defer close(result) + response, err = client.RegisterDevice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RegisterDeviceRequest is the request struct for api RegisterDevice +type RegisterDeviceRequest struct { + *requests.RpcRequest + IP string `position:"Query" name:"IP"` + Mac string `position:"Query" name:"Mac"` + Token string `position:"Query" name:"Token"` + DeviceVersion string `position:"Query" name:"DeviceVersion"` + SN string `position:"Query" name:"SN"` +} + +// RegisterDeviceResponse is the response struct for api RegisterDevice +type RegisterDeviceResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Message string `json:"Message" xml:"Message"` + DeviceInfo DeviceInfo `json:"DeviceInfo" xml:"DeviceInfo"` +} + +// CreateRegisterDeviceRequest creates a request to invoke RegisterDevice API +func CreateRegisterDeviceRequest() (request *RegisterDeviceRequest) { + request = &RegisterDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "RegisterDevice", "aliyuncvc", "openAPI") + return +} + +// CreateRegisterDeviceResponse creates a response to parse from RegisterDevice response +func CreateRegisterDeviceResponse() (response *RegisterDeviceResponse) { + response = &RegisterDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/register_uem_device.go b/services/aliyuncvc/register_uem_device.go new file mode 100644 index 0000000000..f5dc58bd95 --- /dev/null +++ b/services/aliyuncvc/register_uem_device.go @@ -0,0 +1,112 @@ +package aliyuncvc + +//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" +) + +// RegisterUemDevice invokes the aliyuncvc.RegisterUemDevice API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/registeruemdevice.html +func (client *Client) RegisterUemDevice(request *RegisterUemDeviceRequest) (response *RegisterUemDeviceResponse, err error) { + response = CreateRegisterUemDeviceResponse() + err = client.DoAction(request, response) + return +} + +// RegisterUemDeviceWithChan invokes the aliyuncvc.RegisterUemDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/registeruemdevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) RegisterUemDeviceWithChan(request *RegisterUemDeviceRequest) (<-chan *RegisterUemDeviceResponse, <-chan error) { + responseChan := make(chan *RegisterUemDeviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RegisterUemDevice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RegisterUemDeviceWithCallback invokes the aliyuncvc.RegisterUemDevice API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/registeruemdevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) RegisterUemDeviceWithCallback(request *RegisterUemDeviceRequest, callback func(response *RegisterUemDeviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RegisterUemDeviceResponse + var err error + defer close(result) + response, err = client.RegisterUemDevice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RegisterUemDeviceRequest is the request struct for api RegisterUemDevice +type RegisterUemDeviceRequest struct { + *requests.RpcRequest + IP string `position:"Query" name:"IP"` + GroupId string `position:"Query" name:"GroupId"` + DeviceId string `position:"Query" name:"DeviceId"` + GroupName string `position:"Query" name:"GroupName"` + Mac string `position:"Query" name:"Mac"` + DeviceVersion string `position:"Query" name:"DeviceVersion"` +} + +// RegisterUemDeviceResponse is the response struct for api RegisterUemDevice +type RegisterUemDeviceResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + Message string `json:"Message" xml:"Message"` + DeviceInfo DeviceInfo `json:"DeviceInfo" xml:"DeviceInfo"` +} + +// CreateRegisterUemDeviceRequest creates a request to invoke RegisterUemDevice API +func CreateRegisterUemDeviceRequest() (request *RegisterUemDeviceRequest) { + request = &RegisterUemDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "RegisterUemDevice", "aliyuncvc", "openAPI") + return +} + +// CreateRegisterUemDeviceResponse creates a response to parse from RegisterUemDevice response +func CreateRegisterUemDeviceResponse() (response *RegisterUemDeviceResponse) { + response = &RegisterUemDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/start_live.go b/services/aliyuncvc/start_live.go new file mode 100644 index 0000000000..cdbc3f418e --- /dev/null +++ b/services/aliyuncvc/start_live.go @@ -0,0 +1,107 @@ +package aliyuncvc + +//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" +) + +// StartLive invokes the aliyuncvc.StartLive API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/startlive.html +func (client *Client) StartLive(request *StartLiveRequest) (response *StartLiveResponse, err error) { + response = CreateStartLiveResponse() + err = client.DoAction(request, response) + return +} + +// StartLiveWithChan invokes the aliyuncvc.StartLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/startlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) StartLiveWithChan(request *StartLiveRequest) (<-chan *StartLiveResponse, <-chan error) { + responseChan := make(chan *StartLiveResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.StartLive(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// StartLiveWithCallback invokes the aliyuncvc.StartLive API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/startlive.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) StartLiveWithCallback(request *StartLiveRequest, callback func(response *StartLiveResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *StartLiveResponse + var err error + defer close(result) + response, err = client.StartLive(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// StartLiveRequest is the request struct for api StartLive +type StartLiveRequest struct { + *requests.RpcRequest + LiveUUID string `position:"Body" name:"LiveUUID"` + UserId string `position:"Body" name:"UserId"` +} + +// StartLiveResponse is the response struct for api StartLive +type StartLiveResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateStartLiveRequest creates a request to invoke StartLive API +func CreateStartLiveRequest() (request *StartLiveRequest) { + request = &StartLiveRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "StartLive", "aliyuncvc", "openAPI") + return +} + +// CreateStartLiveResponse creates a response to parse from StartLive response +func CreateStartLiveResponse() (response *StartLiveResponse) { + response = &StartLiveResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/struct_auth_ws_channel_config.go b/services/aliyuncvc/struct_auth_ws_channel_config.go new file mode 100644 index 0000000000..5c38b29a91 --- /dev/null +++ b/services/aliyuncvc/struct_auth_ws_channel_config.go @@ -0,0 +1,23 @@ +package aliyuncvc + +//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. + +// AuthWsChannelConfig is a nested struct in aliyuncvc response +type AuthWsChannelConfig struct { + Token string `json:"Token" xml:"Token"` + AuthWsUrl string `json:"AuthWsUrl" xml:"AuthWsUrl"` + WsOuterReconnTime int `json:"WsOuterReconnTime" xml:"WsOuterReconnTime"` +} diff --git a/services/aliyuncvc/struct_data.go b/services/aliyuncvc/struct_data.go index 586fe4c911..151e8b45a7 100644 --- a/services/aliyuncvc/struct_data.go +++ b/services/aliyuncvc/struct_data.go @@ -17,10 +17,14 @@ package aliyuncvc // Data is a nested struct in aliyuncvc response type Data struct { - TotalCount int `json:"TotalCount" xml:"TotalCount"` - PageNumber int `json:"PageNumber" xml:"PageNumber"` - PageSize int `json:"PageSize" xml:"PageSize"` - Total Total `json:"Total" xml:"Total"` - Statistics []Statistic `json:"Statistics" xml:"Statistics"` - UserInfos []UserInfo `json:"UserInfos" xml:"UserInfos"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + DeviceErrorCode int `json:"DeviceErrorCode" xml:"DeviceErrorCode"` + DeviceMessage string `json:"DeviceMessage" xml:"DeviceMessage"` + PageSize int `json:"PageSize" xml:"PageSize"` + SN string `json:"SN" xml:"SN"` + ActiveCode string `json:"ActiveCode" xml:"ActiveCode"` + Total Total `json:"Total" xml:"Total"` + Statistics []Statistic `json:"Statistics" xml:"Statistics"` + UserInfos []UserInfo `json:"UserInfos" xml:"UserInfos"` } diff --git a/services/aliyuncvc/struct_device.go b/services/aliyuncvc/struct_device.go new file mode 100644 index 0000000000..5b063da763 --- /dev/null +++ b/services/aliyuncvc/struct_device.go @@ -0,0 +1,28 @@ +package aliyuncvc + +//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. + +// Device is a nested struct in aliyuncvc response +type Device struct { + MeetingDomain string `json:"MeetingDomain" xml:"MeetingDomain"` + MeetingToken string `json:"MeetingToken" xml:"MeetingToken"` + MeetingCode string `json:"MeetingCode" xml:"MeetingCode"` + MemberUUID string `json:"MemberUUID" xml:"MemberUUID"` + ClientAppId string `json:"ClientAppId" xml:"ClientAppId"` + MeetingUUID string `json:"MeetingUUID" xml:"MeetingUUID"` + MeetingAppId string `json:"MeetingAppId" xml:"MeetingAppId"` + SlsInfo SlsInfo `json:"SlsInfo" xml:"SlsInfo"` +} diff --git a/services/aliyuncvc/struct_device_info.go b/services/aliyuncvc/struct_device_info.go new file mode 100644 index 0000000000..e0180af573 --- /dev/null +++ b/services/aliyuncvc/struct_device_info.go @@ -0,0 +1,30 @@ +package aliyuncvc + +//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. + +// DeviceInfo is a nested struct in aliyuncvc response +type DeviceInfo struct { + DeviceName string `json:"DeviceName" xml:"DeviceName"` + Token string `json:"Token" xml:"Token"` + ChannelType string `json:"ChannelType" xml:"ChannelType"` + RegisterTime int64 `json:"RegisterTime" xml:"RegisterTime"` + ScreenCode string `json:"ScreenCode" xml:"ScreenCode"` + MessageKey string `json:"MessageKey" xml:"MessageKey"` + DeviceSessionId string `json:"DeviceSessionId" xml:"DeviceSessionId"` + AuthWsChannelConfig AuthWsChannelConfig `json:"AuthWsChannelConfig" xml:"AuthWsChannelConfig"` + MqttParam MqttParam `json:"MqttParam" xml:"MqttParam"` + SlsConfig SlsConfig `json:"SlsConfig" xml:"SlsConfig"` +} diff --git a/services/aliyuncvc/struct_devices.go b/services/aliyuncvc/struct_devices.go new file mode 100644 index 0000000000..aebf22a6db --- /dev/null +++ b/services/aliyuncvc/struct_devices.go @@ -0,0 +1,22 @@ +package aliyuncvc + +//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. + +// Devices is a nested struct in aliyuncvc response +type Devices struct { + MeetingUUID string `json:"MeetingUUID" xml:"MeetingUUID"` + MeetingCode string `json:"MeetingCode" xml:"MeetingCode"` +} diff --git a/services/aliyuncvc/struct_members.go b/services/aliyuncvc/struct_devices_in_batch_create_device.go similarity index 82% rename from services/aliyuncvc/struct_members.go rename to services/aliyuncvc/struct_devices_in_batch_create_device.go index 5c1b9a38c0..4fcaf825b4 100644 --- a/services/aliyuncvc/struct_members.go +++ b/services/aliyuncvc/struct_devices_in_batch_create_device.go @@ -15,7 +15,7 @@ package aliyuncvc // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// Members is a nested struct in aliyuncvc response -type Members struct { - Data []int `json:"Data" xml:"Data"` +// DevicesInBatchCreateDevice is a nested struct in aliyuncvc response +type DevicesInBatchCreateDevice struct { + Data []Data `json:"data" xml:"data"` } diff --git a/services/aliyuncvc/struct_devices_in_get_device_active_code.go b/services/aliyuncvc/struct_devices_in_get_device_active_code.go new file mode 100644 index 0000000000..fdef4df644 --- /dev/null +++ b/services/aliyuncvc/struct_devices_in_get_device_active_code.go @@ -0,0 +1,21 @@ +package aliyuncvc + +//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. + +// DevicesInGetDeviceActiveCode is a nested struct in aliyuncvc response +type DevicesInGetDeviceActiveCode struct { + Data []Data `json:"data" xml:"data"` +} diff --git a/services/aliyuncvc/struct_devices_in_list_device_ip.go b/services/aliyuncvc/struct_devices_in_list_device_ip.go new file mode 100644 index 0000000000..c70e47b666 --- /dev/null +++ b/services/aliyuncvc/struct_devices_in_list_device_ip.go @@ -0,0 +1,21 @@ +package aliyuncvc + +//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. + +// DevicesInListDeviceIp is a nested struct in aliyuncvc response +type DevicesInListDeviceIp struct { + DevicesItem []DevicesItem `json:"Devices" xml:"Devices"` +} diff --git a/services/aliyuncvc/struct_devices_item.go b/services/aliyuncvc/struct_devices_item.go new file mode 100644 index 0000000000..ee12937c53 --- /dev/null +++ b/services/aliyuncvc/struct_devices_item.go @@ -0,0 +1,24 @@ +package aliyuncvc + +//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. + +// DevicesItem is a nested struct in aliyuncvc response +type DevicesItem struct { + ScreenCode string `json:"ScreenCode" xml:"ScreenCode"` + Ip string `json:"Ip" xml:"Ip"` + Mac string `json:"Mac" xml:"Mac"` + SsId string `json:"SsId" xml:"SsId"` +} diff --git a/services/aliyuncvc/struct_live_info.go b/services/aliyuncvc/struct_live_info.go new file mode 100644 index 0000000000..c01e8b4131 --- /dev/null +++ b/services/aliyuncvc/struct_live_info.go @@ -0,0 +1,22 @@ +package aliyuncvc + +//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. + +// LiveInfo is a nested struct in aliyuncvc response +type LiveInfo struct { + LiveUUID string `json:"LiveUUID" xml:"LiveUUID"` + StreamUUID string `json:"StreamUUID" xml:"StreamUUID"` +} diff --git a/services/aliyuncvc/struct_meeting_info.go b/services/aliyuncvc/struct_meeting_info.go index 4f7af1236b..71fc04d448 100644 --- a/services/aliyuncvc/struct_meeting_info.go +++ b/services/aliyuncvc/struct_meeting_info.go @@ -22,6 +22,7 @@ type MeetingInfo struct { CreateTime int64 `json:"CreateTime" xml:"CreateTime"` MeetingAppId string `json:"MeetingAppId" xml:"MeetingAppId"` MeetingCode string `json:"MeetingCode" xml:"MeetingCode"` + Password string `json:"Password" xml:"Password"` MemberUUID string `json:"MemberUUID" xml:"MemberUUID"` ValidTime int64 `json:"ValidTime" xml:"ValidTime"` ClientAppId string `json:"ClientAppId" xml:"ClientAppId"` diff --git a/services/aliyuncvc/struct_member_list.go b/services/aliyuncvc/struct_member_list_in_get_meeting.go similarity index 88% rename from services/aliyuncvc/struct_member_list.go rename to services/aliyuncvc/struct_member_list_in_get_meeting.go index 81f236c47f..6180b9783a 100644 --- a/services/aliyuncvc/struct_member_list.go +++ b/services/aliyuncvc/struct_member_list_in_get_meeting.go @@ -15,7 +15,7 @@ package aliyuncvc // Code generated by Alibaba Cloud SDK Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// MemberList is a nested struct in aliyuncvc response -type MemberList struct { +// MemberListInGetMeeting is a nested struct in aliyuncvc response +type MemberListInGetMeeting struct { MemberListItem []MemberListItem `json:"MemberList" xml:"MemberList"` } diff --git a/services/aliyuncvc/struct_member_list_in_get_meeting_international.go b/services/aliyuncvc/struct_member_list_in_get_meeting_international.go new file mode 100644 index 0000000000..3dbf5efaaa --- /dev/null +++ b/services/aliyuncvc/struct_member_list_in_get_meeting_international.go @@ -0,0 +1,21 @@ +package aliyuncvc + +//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. + +// MemberListInGetMeetingInternational is a nested struct in aliyuncvc response +type MemberListInGetMeetingInternational struct { + MemberListItem []MemberListItem `json:"MemberList" xml:"MemberList"` +} diff --git a/services/aliyuncvc/struct_member_list_item.go b/services/aliyuncvc/struct_member_list_item.go index 7f3681e294..5d23c1845b 100644 --- a/services/aliyuncvc/struct_member_list_item.go +++ b/services/aliyuncvc/struct_member_list_item.go @@ -17,9 +17,9 @@ package aliyuncvc // MemberListItem is a nested struct in aliyuncvc response type MemberListItem struct { - UserAvatarUrl string `json:"UserAvatarUrl" xml:"UserAvatarUrl"` MemberUUID string `json:"MemberUUID" xml:"MemberUUID"` - UserName string `json:"UserName" xml:"UserName"` + UserAvatarUrl string `json:"UserAvatarUrl" xml:"UserAvatarUrl"` UserId string `json:"UserId" xml:"UserId"` + UserName string `json:"UserName" xml:"UserName"` Status string `json:"Status" xml:"Status"` } diff --git a/services/aliyuncvc/struct_mqtt_param.go b/services/aliyuncvc/struct_mqtt_param.go new file mode 100644 index 0000000000..acafc9cb4d --- /dev/null +++ b/services/aliyuncvc/struct_mqtt_param.go @@ -0,0 +1,32 @@ +package aliyuncvc + +//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. + +// MqttParam is a nested struct in aliyuncvc response +type MqttParam struct { + UseTLS string `json:"UseTLS" xml:"UseTLS"` + Host string `json:"Host" xml:"Host"` + Password string `json:"Password" xml:"Password"` + ClientId string `json:"ClientId" xml:"ClientId"` + CleanSession string `json:"CleanSession" xml:"CleanSession"` + Port string `json:"Port" xml:"Port"` + SDKClientPort string `json:"SDKClientPort" xml:"SDKClientPort"` + UserName string `json:"UserName" xml:"UserName"` + GroupId string `json:"GroupId" xml:"GroupId"` + ReconnectTimeout string `json:"ReconnectTimeout" xml:"ReconnectTimeout"` + Topic string `json:"Topic" xml:"Topic"` + TLSPort string `json:"TLSPort" xml:"TLSPort"` +} diff --git a/services/aliyuncvc/struct_sls_config.go b/services/aliyuncvc/struct_sls_config.go new file mode 100644 index 0000000000..04119fc593 --- /dev/null +++ b/services/aliyuncvc/struct_sls_config.go @@ -0,0 +1,23 @@ +package aliyuncvc + +//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. + +// SlsConfig is a nested struct in aliyuncvc response +type SlsConfig struct { + LogStore string `json:"LogStore" xml:"LogStore"` + Project string `json:"Project" xml:"Project"` + LogServiceEndpoint string `json:"LogServiceEndpoint" xml:"LogServiceEndpoint"` +} diff --git a/services/aliyuncvc/struct_sls_info.go b/services/aliyuncvc/struct_sls_info.go index 2d94b04582..441fc1b4e6 100644 --- a/services/aliyuncvc/struct_sls_info.go +++ b/services/aliyuncvc/struct_sls_info.go @@ -17,7 +17,7 @@ package aliyuncvc // SlsInfo is a nested struct in aliyuncvc response type SlsInfo struct { - LogServiceEndpoint string `json:"LogServiceEndpoint" xml:"LogServiceEndpoint"` - Logstore string `json:"Logstore" xml:"Logstore"` Project string `json:"Project" xml:"Project"` + Logstore string `json:"Logstore" xml:"Logstore"` + LogServiceEndpoint string `json:"LogServiceEndpoint" xml:"LogServiceEndpoint"` } diff --git a/services/aliyuncvc/update_device_heart_beat.go b/services/aliyuncvc/update_device_heart_beat.go new file mode 100644 index 0000000000..054854b6e7 --- /dev/null +++ b/services/aliyuncvc/update_device_heart_beat.go @@ -0,0 +1,107 @@ +package aliyuncvc + +//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" +) + +// UpdateDeviceHeartBeat invokes the aliyuncvc.UpdateDeviceHeartBeat API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/updatedeviceheartbeat.html +func (client *Client) UpdateDeviceHeartBeat(request *UpdateDeviceHeartBeatRequest) (response *UpdateDeviceHeartBeatResponse, err error) { + response = CreateUpdateDeviceHeartBeatResponse() + err = client.DoAction(request, response) + return +} + +// UpdateDeviceHeartBeatWithChan invokes the aliyuncvc.UpdateDeviceHeartBeat API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/updatedeviceheartbeat.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateDeviceHeartBeatWithChan(request *UpdateDeviceHeartBeatRequest) (<-chan *UpdateDeviceHeartBeatResponse, <-chan error) { + responseChan := make(chan *UpdateDeviceHeartBeatResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateDeviceHeartBeat(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateDeviceHeartBeatWithCallback invokes the aliyuncvc.UpdateDeviceHeartBeat API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/updatedeviceheartbeat.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateDeviceHeartBeatWithCallback(request *UpdateDeviceHeartBeatRequest, callback func(response *UpdateDeviceHeartBeatResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateDeviceHeartBeatResponse + var err error + defer close(result) + response, err = client.UpdateDeviceHeartBeat(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateDeviceHeartBeatRequest is the request struct for api UpdateDeviceHeartBeat +type UpdateDeviceHeartBeatRequest struct { + *requests.RpcRequest + Message string `position:"Query" name:"Message"` +} + +// UpdateDeviceHeartBeatResponse is the response struct for api UpdateDeviceHeartBeat +type UpdateDeviceHeartBeatResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` + DeviceInfo DeviceInfo `json:"DeviceInfo" xml:"DeviceInfo"` +} + +// CreateUpdateDeviceHeartBeatRequest creates a request to invoke UpdateDeviceHeartBeat API +func CreateUpdateDeviceHeartBeatRequest() (request *UpdateDeviceHeartBeatRequest) { + request = &UpdateDeviceHeartBeatRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "UpdateDeviceHeartBeat", "aliyuncvc", "openAPI") + return +} + +// CreateUpdateDeviceHeartBeatResponse creates a response to parse from UpdateDeviceHeartBeat response +func CreateUpdateDeviceHeartBeatResponse() (response *UpdateDeviceHeartBeatResponse) { + response = &UpdateDeviceHeartBeatResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/aliyuncvc/update_live_password.go b/services/aliyuncvc/update_live_password.go new file mode 100644 index 0000000000..ef679a2b89 --- /dev/null +++ b/services/aliyuncvc/update_live_password.go @@ -0,0 +1,109 @@ +package aliyuncvc + +//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" +) + +// UpdateLivePassword invokes the aliyuncvc.UpdateLivePassword API synchronously +// api document: https://help.aliyun.com/api/aliyuncvc/updatelivepassword.html +func (client *Client) UpdateLivePassword(request *UpdateLivePasswordRequest) (response *UpdateLivePasswordResponse, err error) { + response = CreateUpdateLivePasswordResponse() + err = client.DoAction(request, response) + return +} + +// UpdateLivePasswordWithChan invokes the aliyuncvc.UpdateLivePassword API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/updatelivepassword.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateLivePasswordWithChan(request *UpdateLivePasswordRequest) (<-chan *UpdateLivePasswordResponse, <-chan error) { + responseChan := make(chan *UpdateLivePasswordResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateLivePassword(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateLivePasswordWithCallback invokes the aliyuncvc.UpdateLivePassword API asynchronously +// api document: https://help.aliyun.com/api/aliyuncvc/updatelivepassword.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateLivePasswordWithCallback(request *UpdateLivePasswordRequest, callback func(response *UpdateLivePasswordResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateLivePasswordResponse + var err error + defer close(result) + response, err = client.UpdateLivePassword(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateLivePasswordRequest is the request struct for api UpdateLivePassword +type UpdateLivePasswordRequest struct { + *requests.RpcRequest + LiveUUID string `position:"Body" name:"LiveUUID"` + UserId string `position:"Body" name:"UserId"` + OpenPasswordFlag requests.Boolean `position:"Body" name:"OpenPasswordFlag"` + Password string `position:"Body" name:"Password"` +} + +// UpdateLivePasswordResponse is the response struct for api UpdateLivePassword +type UpdateLivePasswordResponse struct { + *responses.BaseResponse + ErrorCode int `json:"ErrorCode" xml:"ErrorCode"` + Message string `json:"Message" xml:"Message"` + Success bool `json:"Success" xml:"Success"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateUpdateLivePasswordRequest creates a request to invoke UpdateLivePassword API +func CreateUpdateLivePasswordRequest() (request *UpdateLivePasswordRequest) { + request = &UpdateLivePasswordRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("aliyuncvc", "2019-10-30", "UpdateLivePassword", "aliyuncvc", "openAPI") + return +} + +// CreateUpdateLivePasswordResponse creates a response to parse from UpdateLivePassword response +func CreateUpdateLivePasswordResponse() (response *UpdateLivePasswordResponse) { + response = &UpdateLivePasswordResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}