From 59643369bb9bc185517c054c5eba815158fdd95a Mon Sep 17 00:00:00 2001 From: sdk-team Date: Sun, 17 May 2020 07:21:13 +0800 Subject: [PATCH] Generated 2020-05-15 for Vcs. --- ChangeLog.txt | 4 + services/vcs/add_device.go | 115 ++++++++++++++++++ services/vcs/client.go | 104 ++++++++++++++++ services/vcs/create_corp.go | 109 +++++++++++++++++ services/vcs/delete_device.go | 107 ++++++++++++++++ services/vcs/get_device_live_url.go | 108 ++++++++++++++++ services/vcs/get_inventory.go | 104 ++++++++++++++++ services/vcs/list_corps.go | 107 ++++++++++++++++ services/vcs/list_devices.go | 110 +++++++++++++++++ services/vcs/recognize_image.go | 108 ++++++++++++++++ services/vcs/search_face.go | 112 +++++++++++++++++ services/vcs/struct_body.go | 29 +++++ services/vcs/struct_body_list.go | 21 ++++ services/vcs/struct_data.go | 29 +++++ services/vcs/struct_face.go | 29 +++++ services/vcs/struct_face_list.go | 21 ++++ services/vcs/struct_record.go | 54 ++++++++ services/vcs/struct_records_in_list_corps.go | 21 ++++ .../vcs/struct_records_in_list_devices.go | 21 ++++ services/vcs/struct_records_in_search_face.go | 21 ++++ services/vcs/struct_result_object.go | 21 ++++ services/vcs/struct_result_object_item.go | 27 ++++ services/vcs/update_corp.go | 110 +++++++++++++++++ services/vcs/update_device.go | 115 ++++++++++++++++++ 24 files changed, 1607 insertions(+) create mode 100644 services/vcs/add_device.go create mode 100644 services/vcs/client.go create mode 100644 services/vcs/create_corp.go create mode 100644 services/vcs/delete_device.go create mode 100644 services/vcs/get_device_live_url.go create mode 100644 services/vcs/get_inventory.go create mode 100644 services/vcs/list_corps.go create mode 100644 services/vcs/list_devices.go create mode 100644 services/vcs/recognize_image.go create mode 100644 services/vcs/search_face.go create mode 100644 services/vcs/struct_body.go create mode 100644 services/vcs/struct_body_list.go create mode 100644 services/vcs/struct_data.go create mode 100644 services/vcs/struct_face.go create mode 100644 services/vcs/struct_face_list.go create mode 100644 services/vcs/struct_record.go create mode 100644 services/vcs/struct_records_in_list_corps.go create mode 100644 services/vcs/struct_records_in_list_devices.go create mode 100644 services/vcs/struct_records_in_search_face.go create mode 100644 services/vcs/struct_result_object.go create mode 100644 services/vcs/struct_result_object_item.go create mode 100644 services/vcs/update_corp.go create mode 100644 services/vcs/update_device.go diff --git a/ChangeLog.txt b/ChangeLog.txt index 7dda767ce0..d8c8301d72 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2020-05-17 Version: v1.61.195 +- Generated 2020-05-15 for `Vcs`. +- Open API publish. + 2020-05-15 Version: v1.61.194 - Generated 2018-01-20 for `Iot`. - Add LinkIoTEdge CreateEdgeInstanceChannel, BatchDeleteEdgeInstanceChannel, UpdateEdgeInstanceChannel, BatchGetEdgeInstanceChannel, QueryEdgeInstanceChannel, QueryEdgeInstanceDeviceByDriver, BatchGetEdgeInstanceDeviceDriver, BatchSetEdgeInstanceDeviceChannel, BatchGetEdgeInstanceDeviceChannel API. diff --git a/services/vcs/add_device.go b/services/vcs/add_device.go new file mode 100644 index 0000000000..f40d387d03 --- /dev/null +++ b/services/vcs/add_device.go @@ -0,0 +1,115 @@ +package vcs + +//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" +) + +// AddDevice invokes the vcs.AddDevice API synchronously +// api document: https://help.aliyun.com/api/vcs/adddevice.html +func (client *Client) AddDevice(request *AddDeviceRequest) (response *AddDeviceResponse, err error) { + response = CreateAddDeviceResponse() + err = client.DoAction(request, response) + return +} + +// AddDeviceWithChan invokes the vcs.AddDevice API asynchronously +// api document: https://help.aliyun.com/api/vcs/adddevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) AddDeviceWithChan(request *AddDeviceRequest) (<-chan *AddDeviceResponse, <-chan error) { + responseChan := make(chan *AddDeviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.AddDevice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// AddDeviceWithCallback invokes the vcs.AddDevice API asynchronously +// api document: https://help.aliyun.com/api/vcs/adddevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) AddDeviceWithCallback(request *AddDeviceRequest, callback func(response *AddDeviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *AddDeviceResponse + var err error + defer close(result) + response, err = client.AddDevice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// AddDeviceRequest is the request struct for api AddDevice +type AddDeviceRequest struct { + *requests.RpcRequest + DeviceSite string `position:"Body" name:"DeviceSite"` + CorpId string `position:"Body" name:"CorpId"` + GbId string `position:"Body" name:"GbId"` + DeviceDirection string `position:"Body" name:"DeviceDirection"` + DeviceRate string `position:"Body" name:"DeviceRate"` + DeviceAddress string `position:"Body" name:"DeviceAddress"` + DeviceType string `position:"Body" name:"DeviceType"` + DeviceResolution string `position:"Body" name:"DeviceResolution"` + Vendor string `position:"Body" name:"Vendor"` + DeviceName string `position:"Body" name:"DeviceName"` +} + +// AddDeviceResponse is the response struct for api AddDevice +type AddDeviceResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` +} + +// CreateAddDeviceRequest creates a request to invoke AddDevice API +func CreateAddDeviceRequest() (request *AddDeviceRequest) { + request = &AddDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "AddDevice", "", "") + return +} + +// CreateAddDeviceResponse creates a response to parse from AddDevice response +func CreateAddDeviceResponse() (response *AddDeviceResponse) { + response = &AddDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/client.go b/services/vcs/client.go new file mode 100644 index 0000000000..d3d7bf1163 --- /dev/null +++ b/services/vcs/client.go @@ -0,0 +1,104 @@ +package vcs + +//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" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth" + "github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider" +) + +// Client is the sdk client struct, each func corresponds to an OpenAPI +type Client struct { + sdk.Client +} + +// NewClient creates a sdk client with environment variables +func NewClient() (client *Client, err error) { + client = &Client{} + err = client.Init() + return +} + +// NewClientWithProvider creates a sdk client with providers +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error) { + client = &Client{} + var pc provider.Provider + if len(providers) == 0 { + pc = provider.DefaultChain + } else { + pc = provider.NewProviderChain(providers) + } + err = client.InitWithProviderChain(regionId, pc) + return +} + +// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential +// this is the common api to create a sdk client +func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) { + client = &Client{} + err = client.InitWithOptions(regionId, config, credential) + return +} + +// NewClientWithAccessKey is a shortcut to create sdk client with accesskey +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) { + client = &Client{} + err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret) + return +} + +// NewClientWithStsToken is a shortcut to create sdk client with sts token +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) { + client = &Client{} + err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken) + return +} + +// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) { + client = &Client{} + err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName) + return +} + +// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) { + client = &Client{} + err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy) + return +} + +// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) { + client = &Client{} + err = client.InitWithEcsRamRole(regionId, roleName) + return +} + +// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair +// usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md +func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) { + client = &Client{} + err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration) + return +} diff --git a/services/vcs/create_corp.go b/services/vcs/create_corp.go new file mode 100644 index 0000000000..52e9a88ca6 --- /dev/null +++ b/services/vcs/create_corp.go @@ -0,0 +1,109 @@ +package vcs + +//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" +) + +// CreateCorp invokes the vcs.CreateCorp API synchronously +// api document: https://help.aliyun.com/api/vcs/createcorp.html +func (client *Client) CreateCorp(request *CreateCorpRequest) (response *CreateCorpResponse, err error) { + response = CreateCreateCorpResponse() + err = client.DoAction(request, response) + return +} + +// CreateCorpWithChan invokes the vcs.CreateCorp API asynchronously +// api document: https://help.aliyun.com/api/vcs/createcorp.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateCorpWithChan(request *CreateCorpRequest) (<-chan *CreateCorpResponse, <-chan error) { + responseChan := make(chan *CreateCorpResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.CreateCorp(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// CreateCorpWithCallback invokes the vcs.CreateCorp API asynchronously +// api document: https://help.aliyun.com/api/vcs/createcorp.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) CreateCorpWithCallback(request *CreateCorpRequest, callback func(response *CreateCorpResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *CreateCorpResponse + var err error + defer close(result) + response, err = client.CreateCorp(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// CreateCorpRequest is the request struct for api CreateCorp +type CreateCorpRequest struct { + *requests.RpcRequest + ParentCorpId string `position:"Body" name:"ParentCorpId"` + Description string `position:"Body" name:"Description"` + AppName string `position:"Body" name:"AppName"` + CorpName string `position:"Body" name:"CorpName"` +} + +// CreateCorpResponse is the response struct for api CreateCorp +type CreateCorpResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + CorpId string `json:"CorpId" xml:"CorpId"` +} + +// CreateCreateCorpRequest creates a request to invoke CreateCorp API +func CreateCreateCorpRequest() (request *CreateCorpRequest) { + request = &CreateCorpRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "CreateCorp", "", "") + return +} + +// CreateCreateCorpResponse creates a response to parse from CreateCorp response +func CreateCreateCorpResponse() (response *CreateCorpResponse) { + response = &CreateCorpResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/delete_device.go b/services/vcs/delete_device.go new file mode 100644 index 0000000000..70af02c7f7 --- /dev/null +++ b/services/vcs/delete_device.go @@ -0,0 +1,107 @@ +package vcs + +//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 vcs.DeleteDevice API synchronously +// api document: https://help.aliyun.com/api/vcs/deletedevice.html +func (client *Client) DeleteDevice(request *DeleteDeviceRequest) (response *DeleteDeviceResponse, err error) { + response = CreateDeleteDeviceResponse() + err = client.DoAction(request, response) + return +} + +// DeleteDeviceWithChan invokes the vcs.DeleteDevice API asynchronously +// api document: https://help.aliyun.com/api/vcs/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 vcs.DeleteDevice API asynchronously +// api document: https://help.aliyun.com/api/vcs/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 + CorpId string `position:"Body" name:"CorpId"` + GbId string `position:"Body" name:"GbId"` +} + +// DeleteDeviceResponse is the response struct for api DeleteDevice +type DeleteDeviceResponse struct { + *responses.BaseResponse + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Data string `json:"Data" xml:"Data"` + Message string `json:"Message" xml:"Message"` +} + +// CreateDeleteDeviceRequest creates a request to invoke DeleteDevice API +func CreateDeleteDeviceRequest() (request *DeleteDeviceRequest) { + request = &DeleteDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "DeleteDevice", "", "") + return +} + +// CreateDeleteDeviceResponse creates a response to parse from DeleteDevice response +func CreateDeleteDeviceResponse() (response *DeleteDeviceResponse) { + response = &DeleteDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/get_device_live_url.go b/services/vcs/get_device_live_url.go new file mode 100644 index 0000000000..cd2435c5c4 --- /dev/null +++ b/services/vcs/get_device_live_url.go @@ -0,0 +1,108 @@ +package vcs + +//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" +) + +// GetDeviceLiveUrl invokes the vcs.GetDeviceLiveUrl API synchronously +// api document: https://help.aliyun.com/api/vcs/getdeviceliveurl.html +func (client *Client) GetDeviceLiveUrl(request *GetDeviceLiveUrlRequest) (response *GetDeviceLiveUrlResponse, err error) { + response = CreateGetDeviceLiveUrlResponse() + err = client.DoAction(request, response) + return +} + +// GetDeviceLiveUrlWithChan invokes the vcs.GetDeviceLiveUrl API asynchronously +// api document: https://help.aliyun.com/api/vcs/getdeviceliveurl.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetDeviceLiveUrlWithChan(request *GetDeviceLiveUrlRequest) (<-chan *GetDeviceLiveUrlResponse, <-chan error) { + responseChan := make(chan *GetDeviceLiveUrlResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetDeviceLiveUrl(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetDeviceLiveUrlWithCallback invokes the vcs.GetDeviceLiveUrl API asynchronously +// api document: https://help.aliyun.com/api/vcs/getdeviceliveurl.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetDeviceLiveUrlWithCallback(request *GetDeviceLiveUrlRequest, callback func(response *GetDeviceLiveUrlResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetDeviceLiveUrlResponse + var err error + defer close(result) + response, err = client.GetDeviceLiveUrl(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetDeviceLiveUrlRequest is the request struct for api GetDeviceLiveUrl +type GetDeviceLiveUrlRequest struct { + *requests.RpcRequest + CorpId string `position:"Body" name:"CorpId"` + GbId string `position:"Body" name:"GbId"` + DeviceId requests.Integer `position:"Body" name:"DeviceId"` +} + +// GetDeviceLiveUrlResponse is the response struct for api GetDeviceLiveUrl +type GetDeviceLiveUrlResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Url string `json:"Url" xml:"Url"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` +} + +// CreateGetDeviceLiveUrlRequest creates a request to invoke GetDeviceLiveUrl API +func CreateGetDeviceLiveUrlRequest() (request *GetDeviceLiveUrlRequest) { + request = &GetDeviceLiveUrlRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "GetDeviceLiveUrl", "", "") + return +} + +// CreateGetDeviceLiveUrlResponse creates a response to parse from GetDeviceLiveUrl response +func CreateGetDeviceLiveUrlResponse() (response *GetDeviceLiveUrlResponse) { + response = &GetDeviceLiveUrlResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/get_inventory.go b/services/vcs/get_inventory.go new file mode 100644 index 0000000000..c449ea2944 --- /dev/null +++ b/services/vcs/get_inventory.go @@ -0,0 +1,104 @@ +package vcs + +//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" +) + +// GetInventory invokes the vcs.GetInventory API synchronously +// api document: https://help.aliyun.com/api/vcs/getinventory.html +func (client *Client) GetInventory(request *GetInventoryRequest) (response *GetInventoryResponse, err error) { + response = CreateGetInventoryResponse() + err = client.DoAction(request, response) + return +} + +// GetInventoryWithChan invokes the vcs.GetInventory API asynchronously +// api document: https://help.aliyun.com/api/vcs/getinventory.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetInventoryWithChan(request *GetInventoryRequest) (<-chan *GetInventoryResponse, <-chan error) { + responseChan := make(chan *GetInventoryResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.GetInventory(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// GetInventoryWithCallback invokes the vcs.GetInventory API asynchronously +// api document: https://help.aliyun.com/api/vcs/getinventory.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) GetInventoryWithCallback(request *GetInventoryRequest, callback func(response *GetInventoryResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *GetInventoryResponse + var err error + defer close(result) + response, err = client.GetInventory(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// GetInventoryRequest is the request struct for api GetInventory +type GetInventoryRequest struct { + *requests.RpcRequest + CommodityCode string `position:"Body" name:"CommodityCode"` +} + +// GetInventoryResponse is the response struct for api GetInventory +type GetInventoryResponse struct { + *responses.BaseResponse + Success bool `json:"Success" xml:"Success"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateGetInventoryRequest creates a request to invoke GetInventory API +func CreateGetInventoryRequest() (request *GetInventoryRequest) { + request = &GetInventoryRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "GetInventory", "", "") + return +} + +// CreateGetInventoryResponse creates a response to parse from GetInventory response +func CreateGetInventoryResponse() (response *GetInventoryResponse) { + response = &GetInventoryResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/list_corps.go b/services/vcs/list_corps.go new file mode 100644 index 0000000000..1176f151c6 --- /dev/null +++ b/services/vcs/list_corps.go @@ -0,0 +1,107 @@ +package vcs + +//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" +) + +// ListCorps invokes the vcs.ListCorps API synchronously +// api document: https://help.aliyun.com/api/vcs/listcorps.html +func (client *Client) ListCorps(request *ListCorpsRequest) (response *ListCorpsResponse, err error) { + response = CreateListCorpsResponse() + err = client.DoAction(request, response) + return +} + +// ListCorpsWithChan invokes the vcs.ListCorps API asynchronously +// api document: https://help.aliyun.com/api/vcs/listcorps.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListCorpsWithChan(request *ListCorpsRequest) (<-chan *ListCorpsResponse, <-chan error) { + responseChan := make(chan *ListCorpsResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListCorps(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListCorpsWithCallback invokes the vcs.ListCorps API asynchronously +// api document: https://help.aliyun.com/api/vcs/listcorps.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListCorpsWithCallback(request *ListCorpsRequest, callback func(response *ListCorpsResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListCorpsResponse + var err error + defer close(result) + response, err = client.ListCorps(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListCorpsRequest is the request struct for api ListCorps +type ListCorpsRequest struct { + *requests.RpcRequest + PageNumber requests.Integer `position:"Body" name:"PageNumber"` + PageSize requests.Integer `position:"Body" name:"PageSize"` +} + +// ListCorpsResponse is the response struct for api ListCorps +type ListCorpsResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateListCorpsRequest creates a request to invoke ListCorps API +func CreateListCorpsRequest() (request *ListCorpsRequest) { + request = &ListCorpsRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "ListCorps", "", "") + return +} + +// CreateListCorpsResponse creates a response to parse from ListCorps response +func CreateListCorpsResponse() (response *ListCorpsResponse) { + response = &ListCorpsResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/list_devices.go b/services/vcs/list_devices.go new file mode 100644 index 0000000000..17f5bc290f --- /dev/null +++ b/services/vcs/list_devices.go @@ -0,0 +1,110 @@ +package vcs + +//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" +) + +// ListDevices invokes the vcs.ListDevices API synchronously +// api document: https://help.aliyun.com/api/vcs/listdevices.html +func (client *Client) ListDevices(request *ListDevicesRequest) (response *ListDevicesResponse, err error) { + response = CreateListDevicesResponse() + err = client.DoAction(request, response) + return +} + +// ListDevicesWithChan invokes the vcs.ListDevices API asynchronously +// api document: https://help.aliyun.com/api/vcs/listdevices.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListDevicesWithChan(request *ListDevicesRequest) (<-chan *ListDevicesResponse, <-chan error) { + responseChan := make(chan *ListDevicesResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.ListDevices(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// ListDevicesWithCallback invokes the vcs.ListDevices API asynchronously +// api document: https://help.aliyun.com/api/vcs/listdevices.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) ListDevicesWithCallback(request *ListDevicesRequest, callback func(response *ListDevicesResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *ListDevicesResponse + var err error + defer close(result) + response, err = client.ListDevices(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// ListDevicesRequest is the request struct for api ListDevices +type ListDevicesRequest struct { + *requests.RpcRequest + CorpId string `position:"Body" name:"CorpId"` + GbId string `position:"Body" name:"GbId"` + PageNumber requests.Integer `position:"Body" name:"PageNumber"` + PageSize requests.Integer `position:"Body" name:"PageSize"` + DeviceName string `position:"Body" name:"DeviceName"` +} + +// ListDevicesResponse is the response struct for api ListDevices +type ListDevicesResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateListDevicesRequest creates a request to invoke ListDevices API +func CreateListDevicesRequest() (request *ListDevicesRequest) { + request = &ListDevicesRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "ListDevices", "", "") + return +} + +// CreateListDevicesResponse creates a response to parse from ListDevices response +func CreateListDevicesResponse() (response *ListDevicesResponse) { + response = &ListDevicesResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/recognize_image.go b/services/vcs/recognize_image.go new file mode 100644 index 0000000000..4f77abbc9f --- /dev/null +++ b/services/vcs/recognize_image.go @@ -0,0 +1,108 @@ +package vcs + +//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" +) + +// RecognizeImage invokes the vcs.RecognizeImage API synchronously +// api document: https://help.aliyun.com/api/vcs/recognizeimage.html +func (client *Client) RecognizeImage(request *RecognizeImageRequest) (response *RecognizeImageResponse, err error) { + response = CreateRecognizeImageResponse() + err = client.DoAction(request, response) + return +} + +// RecognizeImageWithChan invokes the vcs.RecognizeImage API asynchronously +// api document: https://help.aliyun.com/api/vcs/recognizeimage.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) RecognizeImageWithChan(request *RecognizeImageRequest) (<-chan *RecognizeImageResponse, <-chan error) { + responseChan := make(chan *RecognizeImageResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.RecognizeImage(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// RecognizeImageWithCallback invokes the vcs.RecognizeImage API asynchronously +// api document: https://help.aliyun.com/api/vcs/recognizeimage.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) RecognizeImageWithCallback(request *RecognizeImageRequest, callback func(response *RecognizeImageResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *RecognizeImageResponse + var err error + defer close(result) + response, err = client.RecognizeImage(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// RecognizeImageRequest is the request struct for api RecognizeImage +type RecognizeImageRequest struct { + *requests.RpcRequest + CorpId string `position:"Body" name:"CorpId"` + PicContent string `position:"Body" name:"PicContent"` + PicFormat string `position:"Body" name:"PicFormat"` +} + +// RecognizeImageResponse is the response struct for api RecognizeImage +type RecognizeImageResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateRecognizeImageRequest creates a request to invoke RecognizeImage API +func CreateRecognizeImageRequest() (request *RecognizeImageRequest) { + request = &RecognizeImageRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "RecognizeImage", "", "") + return +} + +// CreateRecognizeImageResponse creates a response to parse from RecognizeImage response +func CreateRecognizeImageResponse() (response *RecognizeImageResponse) { + response = &RecognizeImageResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/search_face.go b/services/vcs/search_face.go new file mode 100644 index 0000000000..a5257120d7 --- /dev/null +++ b/services/vcs/search_face.go @@ -0,0 +1,112 @@ +package vcs + +//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" +) + +// SearchFace invokes the vcs.SearchFace API synchronously +// api document: https://help.aliyun.com/api/vcs/searchface.html +func (client *Client) SearchFace(request *SearchFaceRequest) (response *SearchFaceResponse, err error) { + response = CreateSearchFaceResponse() + err = client.DoAction(request, response) + return +} + +// SearchFaceWithChan invokes the vcs.SearchFace API asynchronously +// api document: https://help.aliyun.com/api/vcs/searchface.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SearchFaceWithChan(request *SearchFaceRequest) (<-chan *SearchFaceResponse, <-chan error) { + responseChan := make(chan *SearchFaceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.SearchFace(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// SearchFaceWithCallback invokes the vcs.SearchFace API asynchronously +// api document: https://help.aliyun.com/api/vcs/searchface.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) SearchFaceWithCallback(request *SearchFaceRequest, callback func(response *SearchFaceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *SearchFaceResponse + var err error + defer close(result) + response, err = client.SearchFace(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// SearchFaceRequest is the request struct for api SearchFace +type SearchFaceRequest struct { + *requests.RpcRequest + CorpId string `position:"Body" name:"CorpId"` + GbId string `position:"Body" name:"GbId"` + StartTimeStamp requests.Integer `position:"Body" name:"StartTimeStamp"` + EndTimeStamp requests.Integer `position:"Body" name:"EndTimeStamp"` + PageNo requests.Integer `position:"Body" name:"PageNo"` + PageSize requests.Integer `position:"Body" name:"PageSize"` + OptionList string `position:"Body" name:"OptionList"` +} + +// SearchFaceResponse is the response struct for api SearchFace +type SearchFaceResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data Data `json:"Data" xml:"Data"` +} + +// CreateSearchFaceRequest creates a request to invoke SearchFace API +func CreateSearchFaceRequest() (request *SearchFaceRequest) { + request = &SearchFaceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "SearchFace", "", "") + return +} + +// CreateSearchFaceResponse creates a response to parse from SearchFace response +func CreateSearchFaceResponse() (response *SearchFaceResponse) { + response = &SearchFaceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/struct_body.go b/services/vcs/struct_body.go new file mode 100644 index 0000000000..5b8af0a336 --- /dev/null +++ b/services/vcs/struct_body.go @@ -0,0 +1,29 @@ +package vcs + +//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. + +// Body is a nested struct in vcs response +type Body struct { + Feature string `json:"Feature" xml:"Feature"` + FileName string `json:"FileName" xml:"FileName"` + ImageBaseSixFour string `json:"ImageBaseSixFour" xml:"ImageBaseSixFour"` + LeftTopX string `json:"LeftTopX" xml:"LeftTopX"` + LeftTopY string `json:"LeftTopY" xml:"LeftTopY"` + LocalFeature string `json:"LocalFeature" xml:"LocalFeature"` + RespiratorColor string `json:"RespiratorColor" xml:"RespiratorColor"` + RightBottomX string `json:"RightBottomX" xml:"RightBottomX"` + RightBottomY string `json:"RightBottomY" xml:"RightBottomY"` +} diff --git a/services/vcs/struct_body_list.go b/services/vcs/struct_body_list.go new file mode 100644 index 0000000000..564bf146e0 --- /dev/null +++ b/services/vcs/struct_body_list.go @@ -0,0 +1,21 @@ +package vcs + +//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. + +// BodyList is a nested struct in vcs response +type BodyList struct { + Body []Body `json:"Body" xml:"Body"` +} diff --git a/services/vcs/struct_data.go b/services/vcs/struct_data.go new file mode 100644 index 0000000000..042906134f --- /dev/null +++ b/services/vcs/struct_data.go @@ -0,0 +1,29 @@ +package vcs + +//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. + +// Data is a nested struct in vcs response +type Data struct { + TotalPage int `json:"TotalPage" xml:"TotalPage"` + PageNo int `json:"PageNo" xml:"PageNo"` + TotalCount int `json:"TotalCount" xml:"TotalCount"` + PageNumber int `json:"PageNumber" xml:"PageNumber"` + PageSize int `json:"PageSize" xml:"PageSize"` + Records []Record `json:"Records" xml:"Records"` + ResultObject []ResultObjectItem `json:"ResultObject" xml:"ResultObject"` + BodyList []Body `json:"BodyList" xml:"BodyList"` + FaceList []Face `json:"FaceList" xml:"FaceList"` +} diff --git a/services/vcs/struct_face.go b/services/vcs/struct_face.go new file mode 100644 index 0000000000..b413c9a63b --- /dev/null +++ b/services/vcs/struct_face.go @@ -0,0 +1,29 @@ +package vcs + +//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. + +// Face is a nested struct in vcs response +type Face struct { + Feature string `json:"Feature" xml:"Feature"` + FileName string `json:"FileName" xml:"FileName"` + ImageBaseSixFour string `json:"ImageBaseSixFour" xml:"ImageBaseSixFour"` + LeftTopX string `json:"LeftTopX" xml:"LeftTopX"` + LeftTopY string `json:"LeftTopY" xml:"LeftTopY"` + LocalFeature string `json:"LocalFeature" xml:"LocalFeature"` + RespiratorColor string `json:"RespiratorColor" xml:"RespiratorColor"` + RightBottomX string `json:"RightBottomX" xml:"RightBottomX"` + RightBottomY string `json:"RightBottomY" xml:"RightBottomY"` +} diff --git a/services/vcs/struct_face_list.go b/services/vcs/struct_face_list.go new file mode 100644 index 0000000000..c30456de14 --- /dev/null +++ b/services/vcs/struct_face_list.go @@ -0,0 +1,21 @@ +package vcs + +//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. + +// FaceList is a nested struct in vcs response +type FaceList struct { + Face []Face `json:"Face" xml:"Face"` +} diff --git a/services/vcs/struct_record.go b/services/vcs/struct_record.go new file mode 100644 index 0000000000..1e0c089d7a --- /dev/null +++ b/services/vcs/struct_record.go @@ -0,0 +1,54 @@ +package vcs + +//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. + +// Record is a nested struct in vcs response +type Record struct { + CorpName string `json:"CorpName" xml:"CorpName"` + ParentCorpId string `json:"ParentCorpId" xml:"ParentCorpId"` + RightBottomY int `json:"RightBottomY" xml:"RightBottomY"` + CreateTime string `json:"CreateTime" xml:"CreateTime"` + DeviceType string `json:"DeviceType" xml:"DeviceType"` + SipServerIp string `json:"SipServerIp" xml:"SipServerIp"` + DeviceSite string `json:"DeviceSite" xml:"DeviceSite"` + Latitude string `json:"Latitude" xml:"Latitude"` + AccessProtocolType string `json:"AccessProtocolType" xml:"AccessProtocolType"` + CorpId string `json:"CorpId" xml:"CorpId"` + ImageUrl string `json:"ImageUrl" xml:"ImageUrl"` + DeviceAddress string `json:"DeviceAddress" xml:"DeviceAddress"` + DeviceDirection string `json:"DeviceDirection" xml:"DeviceDirection"` + BitRate string `json:"BitRate" xml:"BitRate"` + RightBottomX int `json:"RightBottomX" xml:"RightBottomX"` + Vendor string `json:"Vendor" xml:"Vendor"` + Description string `json:"Description" xml:"Description"` + LeftTopX int `json:"LeftTopX" xml:"LeftTopX"` + GBid string `json:"GBid" xml:"GBid"` + Status int `json:"Status" xml:"Status"` + SipGBId string `json:"SipGBId" xml:"SipGBId"` + SipServerPort string `json:"SipServerPort" xml:"SipServerPort"` + Longitude string `json:"Longitude" xml:"Longitude"` + DeviceName string `json:"DeviceName" xml:"DeviceName"` + CreateDate string `json:"CreateDate" xml:"CreateDate"` + Resolution string `json:"Resolution" xml:"Resolution"` + GbId string `json:"GbId" xml:"GbId"` + DeviceCount int `json:"DeviceCount" xml:"DeviceCount"` + Score int `json:"Score" xml:"Score"` + LeftTopY int `json:"LeftTopY" xml:"LeftTopY"` + AppName string `json:"AppName" xml:"AppName"` + TargetImageUrl string `json:"TargetImageUrl" xml:"TargetImageUrl"` + SipPassword string `json:"SipPassword" xml:"SipPassword"` + CoverImageUrl string `json:"CoverImageUrl" xml:"CoverImageUrl"` +} diff --git a/services/vcs/struct_records_in_list_corps.go b/services/vcs/struct_records_in_list_corps.go new file mode 100644 index 0000000000..73e3c58aec --- /dev/null +++ b/services/vcs/struct_records_in_list_corps.go @@ -0,0 +1,21 @@ +package vcs + +//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. + +// RecordsInListCorps is a nested struct in vcs response +type RecordsInListCorps struct { + Record []Record `json:"Record" xml:"Record"` +} diff --git a/services/vcs/struct_records_in_list_devices.go b/services/vcs/struct_records_in_list_devices.go new file mode 100644 index 0000000000..5726a235eb --- /dev/null +++ b/services/vcs/struct_records_in_list_devices.go @@ -0,0 +1,21 @@ +package vcs + +//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. + +// RecordsInListDevices is a nested struct in vcs response +type RecordsInListDevices struct { + Record []Record `json:"Record" xml:"Record"` +} diff --git a/services/vcs/struct_records_in_search_face.go b/services/vcs/struct_records_in_search_face.go new file mode 100644 index 0000000000..331a023449 --- /dev/null +++ b/services/vcs/struct_records_in_search_face.go @@ -0,0 +1,21 @@ +package vcs + +//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. + +// RecordsInSearchFace is a nested struct in vcs response +type RecordsInSearchFace struct { + Record []Record `json:"Record" xml:"Record"` +} diff --git a/services/vcs/struct_result_object.go b/services/vcs/struct_result_object.go new file mode 100644 index 0000000000..5e3c35bbe8 --- /dev/null +++ b/services/vcs/struct_result_object.go @@ -0,0 +1,21 @@ +package vcs + +//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. + +// ResultObject is a nested struct in vcs response +type ResultObject struct { + ResultObjectItem []ResultObjectItem `json:"ResultObject" xml:"ResultObject"` +} diff --git a/services/vcs/struct_result_object_item.go b/services/vcs/struct_result_object_item.go new file mode 100644 index 0000000000..23cc00548a --- /dev/null +++ b/services/vcs/struct_result_object_item.go @@ -0,0 +1,27 @@ +package vcs + +//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. + +// ResultObjectItem is a nested struct in vcs response +type ResultObjectItem struct { + BuyerId string `json:"BuyerId" xml:"BuyerId"` + CommodityCode string `json:"CommodityCode" xml:"CommodityCode"` + CurrentInventory string `json:"CurrentInventory" xml:"CurrentInventory"` + ValidEndTime string `json:"ValidEndTime" xml:"ValidEndTime"` + ValidStartTime string `json:"ValidStartTime" xml:"ValidStartTime"` + InstanceId string `json:"InstanceId" xml:"InstanceId"` + InventoryId string `json:"InventoryId" xml:"InventoryId"` +} diff --git a/services/vcs/update_corp.go b/services/vcs/update_corp.go new file mode 100644 index 0000000000..5962a13be1 --- /dev/null +++ b/services/vcs/update_corp.go @@ -0,0 +1,110 @@ +package vcs + +//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" +) + +// UpdateCorp invokes the vcs.UpdateCorp API synchronously +// api document: https://help.aliyun.com/api/vcs/updatecorp.html +func (client *Client) UpdateCorp(request *UpdateCorpRequest) (response *UpdateCorpResponse, err error) { + response = CreateUpdateCorpResponse() + err = client.DoAction(request, response) + return +} + +// UpdateCorpWithChan invokes the vcs.UpdateCorp API asynchronously +// api document: https://help.aliyun.com/api/vcs/updatecorp.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateCorpWithChan(request *UpdateCorpRequest) (<-chan *UpdateCorpResponse, <-chan error) { + responseChan := make(chan *UpdateCorpResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateCorp(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateCorpWithCallback invokes the vcs.UpdateCorp API asynchronously +// api document: https://help.aliyun.com/api/vcs/updatecorp.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateCorpWithCallback(request *UpdateCorpRequest, callback func(response *UpdateCorpResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateCorpResponse + var err error + defer close(result) + response, err = client.UpdateCorp(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateCorpRequest is the request struct for api UpdateCorp +type UpdateCorpRequest struct { + *requests.RpcRequest + CorpId string `position:"Body" name:"CorpId"` + ParentCorpId string `position:"Body" name:"ParentCorpId"` + Description string `position:"Body" name:"Description"` + AppName string `position:"Body" name:"AppName"` + CorpName string `position:"Body" name:"CorpName"` +} + +// UpdateCorpResponse is the response struct for api UpdateCorp +type UpdateCorpResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` +} + +// CreateUpdateCorpRequest creates a request to invoke UpdateCorp API +func CreateUpdateCorpRequest() (request *UpdateCorpRequest) { + request = &UpdateCorpRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "UpdateCorp", "", "") + return +} + +// CreateUpdateCorpResponse creates a response to parse from UpdateCorp response +func CreateUpdateCorpResponse() (response *UpdateCorpResponse) { + response = &UpdateCorpResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +} diff --git a/services/vcs/update_device.go b/services/vcs/update_device.go new file mode 100644 index 0000000000..2a69e9114f --- /dev/null +++ b/services/vcs/update_device.go @@ -0,0 +1,115 @@ +package vcs + +//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" +) + +// UpdateDevice invokes the vcs.UpdateDevice API synchronously +// api document: https://help.aliyun.com/api/vcs/updatedevice.html +func (client *Client) UpdateDevice(request *UpdateDeviceRequest) (response *UpdateDeviceResponse, err error) { + response = CreateUpdateDeviceResponse() + err = client.DoAction(request, response) + return +} + +// UpdateDeviceWithChan invokes the vcs.UpdateDevice API asynchronously +// api document: https://help.aliyun.com/api/vcs/updatedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateDeviceWithChan(request *UpdateDeviceRequest) (<-chan *UpdateDeviceResponse, <-chan error) { + responseChan := make(chan *UpdateDeviceResponse, 1) + errChan := make(chan error, 1) + err := client.AddAsyncTask(func() { + defer close(responseChan) + defer close(errChan) + response, err := client.UpdateDevice(request) + if err != nil { + errChan <- err + } else { + responseChan <- response + } + }) + if err != nil { + errChan <- err + close(responseChan) + close(errChan) + } + return responseChan, errChan +} + +// UpdateDeviceWithCallback invokes the vcs.UpdateDevice API asynchronously +// api document: https://help.aliyun.com/api/vcs/updatedevice.html +// asynchronous document: https://help.aliyun.com/document_detail/66220.html +func (client *Client) UpdateDeviceWithCallback(request *UpdateDeviceRequest, callback func(response *UpdateDeviceResponse, err error)) <-chan int { + result := make(chan int, 1) + err := client.AddAsyncTask(func() { + var response *UpdateDeviceResponse + var err error + defer close(result) + response, err = client.UpdateDevice(request) + callback(response, err) + result <- 1 + }) + if err != nil { + defer close(result) + callback(nil, err) + result <- 0 + } + return result +} + +// UpdateDeviceRequest is the request struct for api UpdateDevice +type UpdateDeviceRequest struct { + *requests.RpcRequest + DeviceSite string `position:"Body" name:"DeviceSite"` + CorpId string `position:"Body" name:"CorpId"` + GbId string `position:"Body" name:"GbId"` + DeviceDirection string `position:"Body" name:"DeviceDirection"` + DeviceRate string `position:"Body" name:"DeviceRate"` + DeviceAddress string `position:"Body" name:"DeviceAddress"` + DeviceType string `position:"Body" name:"DeviceType"` + DeviceResolution string `position:"Body" name:"DeviceResolution"` + Vendor string `position:"Body" name:"Vendor"` + DeviceName string `position:"Body" name:"DeviceName"` +} + +// UpdateDeviceResponse is the response struct for api UpdateDevice +type UpdateDeviceResponse struct { + *responses.BaseResponse + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + RequestId string `json:"RequestId" xml:"RequestId"` + Data string `json:"Data" xml:"Data"` +} + +// CreateUpdateDeviceRequest creates a request to invoke UpdateDevice API +func CreateUpdateDeviceRequest() (request *UpdateDeviceRequest) { + request = &UpdateDeviceRequest{ + RpcRequest: &requests.RpcRequest{}, + } + request.InitWithApiInfo("Vcs", "2020-05-15", "UpdateDevice", "", "") + return +} + +// CreateUpdateDeviceResponse creates a response to parse from UpdateDevice response +func CreateUpdateDeviceResponse() (response *UpdateDeviceResponse) { + response = &UpdateDeviceResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}