diff --git a/ChangeLog.txt b/ChangeLog.txt index c0dec62e52..0a5cdaceae 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +2023-10-10 Version: v1.62.571 +- Generated 2019-12-30 for `facebody`. +- Update MergeImageFace. + 2023-10-10 Version: v1.62.570 - Generated 2020-03-20 for `videoenhan`. - Update MergeVideoModelFace MergeVideoFace. diff --git a/services/facebody/count_crowd.go b/services/facebody/count_crowd.go deleted file mode 100644 index 3eebd59b9a..0000000000 --- a/services/facebody/count_crowd.go +++ /dev/null @@ -1,104 +0,0 @@ -package facebody - -//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" -) - -// CountCrowd invokes the facebody.CountCrowd API synchronously -func (client *Client) CountCrowd(request *CountCrowdRequest) (response *CountCrowdResponse, err error) { - response = CreateCountCrowdResponse() - err = client.DoAction(request, response) - return -} - -// CountCrowdWithChan invokes the facebody.CountCrowd API asynchronously -func (client *Client) CountCrowdWithChan(request *CountCrowdRequest) (<-chan *CountCrowdResponse, <-chan error) { - responseChan := make(chan *CountCrowdResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.CountCrowd(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// CountCrowdWithCallback invokes the facebody.CountCrowd API asynchronously -func (client *Client) CountCrowdWithCallback(request *CountCrowdRequest, callback func(response *CountCrowdResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *CountCrowdResponse - var err error - defer close(result) - response, err = client.CountCrowd(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// CountCrowdRequest is the request struct for api CountCrowd -type CountCrowdRequest struct { - *requests.RpcRequest - FormatResultToJson requests.Boolean `position:"Query" name:"FormatResultToJson"` - IsShow requests.Boolean `position:"Body" name:"IsShow"` - OssFile string `position:"Query" name:"OssFile"` - RequestProxyBy string `position:"Query" name:"RequestProxyBy"` - ImageURL string `position:"Body" name:"ImageURL"` -} - -// CountCrowdResponse is the response struct for api CountCrowd -type CountCrowdResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Data Data `json:"Data" xml:"Data"` -} - -// CreateCountCrowdRequest creates a request to invoke CountCrowd API -func CreateCountCrowdRequest() (request *CountCrowdRequest) { - request = &CountCrowdRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("facebody", "2019-12-30", "CountCrowd", "facebody", "openAPI") - request.Method = requests.POST - return -} - -// CreateCountCrowdResponse creates a response to parse from CountCrowd response -func CreateCountCrowdResponse() (response *CountCrowdResponse) { - response = &CountCrowdResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/facebody/detect_ipc_pedestrian.go b/services/facebody/detect_ipc_pedestrian.go deleted file mode 100644 index 984a83db00..0000000000 --- a/services/facebody/detect_ipc_pedestrian.go +++ /dev/null @@ -1,108 +0,0 @@ -package facebody - -//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" -) - -// DetectIPCPedestrian invokes the facebody.DetectIPCPedestrian API synchronously -func (client *Client) DetectIPCPedestrian(request *DetectIPCPedestrianRequest) (response *DetectIPCPedestrianResponse, err error) { - response = CreateDetectIPCPedestrianResponse() - err = client.DoAction(request, response) - return -} - -// DetectIPCPedestrianWithChan invokes the facebody.DetectIPCPedestrian API asynchronously -func (client *Client) DetectIPCPedestrianWithChan(request *DetectIPCPedestrianRequest) (<-chan *DetectIPCPedestrianResponse, <-chan error) { - responseChan := make(chan *DetectIPCPedestrianResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.DetectIPCPedestrian(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// DetectIPCPedestrianWithCallback invokes the facebody.DetectIPCPedestrian API asynchronously -func (client *Client) DetectIPCPedestrianWithCallback(request *DetectIPCPedestrianRequest, callback func(response *DetectIPCPedestrianResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *DetectIPCPedestrianResponse - var err error - defer close(result) - response, err = client.DetectIPCPedestrian(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// DetectIPCPedestrianRequest is the request struct for api DetectIPCPedestrian -type DetectIPCPedestrianRequest struct { - *requests.RpcRequest - FormatResultToJson requests.Boolean `position:"Query" name:"FormatResultToJson"` - ContinueOnError requests.Boolean `position:"Body" name:"ContinueOnError"` - OssFile string `position:"Query" name:"OssFile"` - Height requests.Integer `position:"Body" name:"Height"` - ImageData string `position:"Body" name:"ImageData"` - RequestProxyBy string `position:"Query" name:"RequestProxyBy"` - DataId string `position:"Body" name:"DataId"` - ImageURL string `position:"Body" name:"ImageURL"` - Width requests.Integer `position:"Body" name:"Width"` -} - -// DetectIPCPedestrianResponse is the response struct for api DetectIPCPedestrian -type DetectIPCPedestrianResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Data Data `json:"Data" xml:"Data"` -} - -// CreateDetectIPCPedestrianRequest creates a request to invoke DetectIPCPedestrian API -func CreateDetectIPCPedestrianRequest() (request *DetectIPCPedestrianRequest) { - request = &DetectIPCPedestrianRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("facebody", "2019-12-30", "DetectIPCPedestrian", "facebody", "openAPI") - request.Method = requests.POST - return -} - -// CreateDetectIPCPedestrianResponse creates a response to parse from DetectIPCPedestrian response -func CreateDetectIPCPedestrianResponse() (response *DetectIPCPedestrianResponse) { - response = &DetectIPCPedestrianResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -} diff --git a/services/facebody/merge_image_face.go b/services/facebody/merge_image_face.go index 5a3f1d70b8..ca202b5140 100644 --- a/services/facebody/merge_image_face.go +++ b/services/facebody/merge_image_face.go @@ -74,6 +74,7 @@ type MergeImageFaceRequest struct { FormatResultToJson requests.Boolean `position:"Query" name:"FormatResultToJson"` MergeInfos *[]MergeImageFaceMergeInfos `position:"Body" name:"MergeInfos" type:"Repeated"` UserId string `position:"Body" name:"UserId"` + WatermarkType string `position:"Body" name:"WatermarkType"` OssFile string `position:"Query" name:"OssFile"` TemplateId string `position:"Body" name:"TemplateId"` RequestProxyBy string `position:"Query" name:"RequestProxyBy"` diff --git a/services/facebody/recognize_face.go b/services/facebody/recognize_face.go index 4ac6f99042..05fc8fcec5 100644 --- a/services/facebody/recognize_face.go +++ b/services/facebody/recognize_face.go @@ -90,10 +90,10 @@ type RecognizeFaceRequest struct { // RecognizeFaceResponse is the response struct for api RecognizeFace type RecognizeFaceResponse struct { *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Code string `json:"Code" xml:"Code"` - Message string `json:"Message" xml:"Message"` - Data Data `json:"Data" xml:"Data"` + RequestId string `json:"RequestId" xml:"RequestId"` + Code string `json:"Code" xml:"Code"` + Message string `json:"Message" xml:"Message"` + Data DataInRecognizeFace `json:"Data" xml:"Data"` } // CreateRecognizeFaceRequest creates a request to invoke RecognizeFace API diff --git a/services/facebody/struct_boxes_in_detect_ipc_pedestrian.go b/services/facebody/struct_boxes_in_detect_ipc_pedestrian.go deleted file mode 100644 index 18eb4036d0..0000000000 --- a/services/facebody/struct_boxes_in_detect_ipc_pedestrian.go +++ /dev/null @@ -1,21 +0,0 @@ -package facebody - -//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. - -// BoxesInDetectIPCPedestrian is a nested struct in facebody response -type BoxesInDetectIPCPedestrian struct { - Box []int `json:"Box" xml:"Box"` -} diff --git a/services/facebody/struct_data.go b/services/facebody/struct_data.go index dcb0031fd4..6d49b22d30 100644 --- a/services/facebody/struct_data.go +++ b/services/facebody/struct_data.go @@ -22,6 +22,7 @@ type Data struct { Age string `json:"Age" xml:"Age"` VerificationToken string `json:"VerificationToken" xml:"VerificationToken"` MaterialMatch string `json:"MaterialMatch" xml:"MaterialMatch"` + MaskURL string `json:"MaskURL" xml:"MaskURL"` HairScore float64 `json:"HairScore" xml:"HairScore"` TotalCount int `json:"TotalCount" xml:"TotalCount"` ImageURL string `json:"ImageURL" xml:"ImageURL"` @@ -30,7 +31,6 @@ type Data struct { QualityScoreA float64 `json:"QualityScoreA" xml:"QualityScoreA"` ObjTypeScore float64 `json:"ObjTypeScore" xml:"ObjTypeScore"` Token string `json:"Token" xml:"Token"` - HotMap string `json:"HotMap" xml:"HotMap"` QualityScoreB float64 `json:"QualityScoreB" xml:"QualityScoreB"` Action string `json:"Action" xml:"Action"` ChatScore float64 `json:"ChatScore" xml:"ChatScore"` @@ -41,7 +41,6 @@ type Data struct { EntityId string `json:"EntityId" xml:"EntityId"` Gender string `json:"Gender" xml:"Gender"` XFlowURL string `json:"XFlowURL" xml:"XFlowURL"` - PeopleNumber int `json:"PeopleNumber" xml:"PeopleNumber"` ImageHeight int64 `json:"ImageHeight" xml:"ImageHeight"` LowerType string `json:"LowerType" xml:"LowerType"` Width int `json:"Width" xml:"Width"` @@ -51,7 +50,6 @@ type Data struct { Hair string `json:"Hair" xml:"Hair"` MessageTips string `json:"MessageTips" xml:"MessageTips"` Threshold float64 `json:"Threshold" xml:"Threshold"` - DenseFeatureLength int `json:"DenseFeatureLength" xml:"DenseFeatureLength"` AgeScore float64 `json:"AgeScore" xml:"AgeScore"` LowerColor string `json:"LowerColor" xml:"LowerColor"` QualitieScore float64 `json:"QualitieScore" xml:"QualitieScore"` @@ -74,24 +72,16 @@ type Data struct { Labels string `json:"Labels" xml:"Labels"` FaceCount int `json:"FaceCount" xml:"FaceCount"` YFlowURL string `json:"YFlowURL" xml:"YFlowURL"` - GenderList []int `json:"GenderList" xml:"GenderList"` PoseList []float64 `json:"PoseList" xml:"PoseList"` - Pupils []float64 `json:"Pupils" xml:"Pupils"` - Glasses []int `json:"Glasses" xml:"Glasses"` RectBList []int `json:"RectBList" xml:"RectBList"` - DenseFeatures []string `json:"DenseFeatures" xml:"DenseFeatures"` RectangleRef []int `json:"RectangleRef" xml:"RectangleRef"` - HatList []int `json:"HatList" xml:"HatList"` Rectangle []int `json:"Rectangle" xml:"Rectangle"` Thresholds []float64 `json:"Thresholds" xml:"Thresholds"` Landmarks []float64 `json:"Landmarks" xml:"Landmarks"` FaceRectangles []int `json:"FaceRectangles" xml:"FaceRectangles"` - BeautyList []float64 `json:"BeautyList" xml:"BeautyList"` - Masks []int64 `json:"Masks" xml:"Masks"` RectAList []int `json:"RectAList" xml:"RectAList"` - AgeList []int `json:"AgeList" xml:"AgeList"` FaceProbabilityList []float64 `json:"FaceProbabilityList" xml:"FaceProbabilityList"` - Expressions []int `json:"Expressions" xml:"Expressions"` + Pupils []string `json:"Pupils" xml:"Pupils"` LandmarksAList []int64 `json:"LandmarksAList" xml:"LandmarksAList"` LandmarksBList []int64 `json:"LandmarksBList" xml:"LandmarksBList"` Qualities Qualities `json:"Qualities" xml:"Qualities"` @@ -102,7 +92,6 @@ type Data struct { Elements []ElementsItem `json:"Elements" xml:"Elements"` Faces []Face `json:"Faces" xml:"Faces"` FailedFaces []FailedFacesItem `json:"FailedFaces" xml:"FailedFaces"` - ImageInfoList []ImageInfoListItem `json:"ImageInfoList" xml:"ImageInfoList"` Outputs []Output `json:"Outputs" xml:"Outputs"` DbList []DbListItem `json:"DbList" xml:"DbList"` Entities []Entity `json:"Entities" xml:"Entities"` diff --git a/services/facebody/struct_data_in_recognize_face.go b/services/facebody/struct_data_in_recognize_face.go new file mode 100644 index 0000000000..0bb634c6b5 --- /dev/null +++ b/services/facebody/struct_data_in_recognize_face.go @@ -0,0 +1,37 @@ +package facebody + +//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. + +// DataInRecognizeFace is a nested struct in facebody response +type DataInRecognizeFace struct { + FaceCount int `json:"FaceCount" xml:"FaceCount"` + LandmarkCount int `json:"LandmarkCount" xml:"LandmarkCount"` + DenseFeatureLength int `json:"DenseFeatureLength" xml:"DenseFeatureLength"` + Pupils []float64 `json:"Pupils" xml:"Pupils"` + GenderList []int `json:"GenderList" xml:"GenderList"` + Expressions []int `json:"Expressions" xml:"Expressions"` + DenseFeatures []string `json:"DenseFeatures" xml:"DenseFeatures"` + Landmarks []float64 `json:"Landmarks" xml:"Landmarks"` + BeautyList []float64 `json:"BeautyList" xml:"BeautyList"` + HatList []int `json:"HatList" xml:"HatList"` + FaceProbabilityList []float64 `json:"FaceProbabilityList" xml:"FaceProbabilityList"` + Glasses []int `json:"Glasses" xml:"Glasses"` + FaceRectangles []int `json:"FaceRectangles" xml:"FaceRectangles"` + PoseList []float64 `json:"PoseList" xml:"PoseList"` + AgeList []int `json:"AgeList" xml:"AgeList"` + Masks []int64 `json:"Masks" xml:"Masks"` + Qualities Qualities `json:"Qualities" xml:"Qualities"` +} diff --git a/services/facebody/struct_elements_in_detect_ipc_pedestrian.go b/services/facebody/struct_elements_in_detect_ipc_pedestrian.go deleted file mode 100644 index 1bbb092f9f..0000000000 --- a/services/facebody/struct_elements_in_detect_ipc_pedestrian.go +++ /dev/null @@ -1,21 +0,0 @@ -package facebody - -//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. - -// ElementsInDetectIPCPedestrian is a nested struct in facebody response -type ElementsInDetectIPCPedestrian struct { - Element []Element `json:"Element" xml:"Element"` -} diff --git a/services/facebody/struct_image_info_list.go b/services/facebody/struct_image_info_list.go deleted file mode 100644 index 3c2b88319d..0000000000 --- a/services/facebody/struct_image_info_list.go +++ /dev/null @@ -1,21 +0,0 @@ -package facebody - -//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. - -// ImageInfoList is a nested struct in facebody response -type ImageInfoList struct { - ImageInfoListItem []ImageInfoListItem `json:"ImageInfoList" xml:"ImageInfoList"` -} diff --git a/services/facebody/struct_image_info_list_item.go b/services/facebody/struct_image_info_list_item.go deleted file mode 100644 index a74065ff10..0000000000 --- a/services/facebody/struct_image_info_list_item.go +++ /dev/null @@ -1,24 +0,0 @@ -package facebody - -//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. - -// ImageInfoListItem is a nested struct in facebody response -type ImageInfoListItem struct { - ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"` - ErrorCode string `json:"ErrorCode" xml:"ErrorCode"` - DataId string `json:"DataId" xml:"DataId"` - Elements []Element `json:"Elements" xml:"Elements"` -} diff --git a/services/facebody/struct_pupils_in_detect_face.go b/services/facebody/struct_pupils_in_detect_face.go index 052283cdc2..43cac40f50 100644 --- a/services/facebody/struct_pupils_in_detect_face.go +++ b/services/facebody/struct_pupils_in_detect_face.go @@ -17,5 +17,5 @@ package facebody // PupilsInDetectFace is a nested struct in facebody response type PupilsInDetectFace struct { - Pupil []float64 `json:"Pupil" xml:"Pupil"` + Pupil []string `json:"Pupil" xml:"Pupil"` } diff --git a/services/facebody/swap_facial_features.go b/services/facebody/swap_facial_features.go deleted file mode 100644 index 47238ade7f..0000000000 --- a/services/facebody/swap_facial_features.go +++ /dev/null @@ -1,107 +0,0 @@ -package facebody - -//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" -) - -// SwapFacialFeatures invokes the facebody.SwapFacialFeatures API synchronously -func (client *Client) SwapFacialFeatures(request *SwapFacialFeaturesRequest) (response *SwapFacialFeaturesResponse, err error) { - response = CreateSwapFacialFeaturesResponse() - err = client.DoAction(request, response) - return -} - -// SwapFacialFeaturesWithChan invokes the facebody.SwapFacialFeatures API asynchronously -func (client *Client) SwapFacialFeaturesWithChan(request *SwapFacialFeaturesRequest) (<-chan *SwapFacialFeaturesResponse, <-chan error) { - responseChan := make(chan *SwapFacialFeaturesResponse, 1) - errChan := make(chan error, 1) - err := client.AddAsyncTask(func() { - defer close(responseChan) - defer close(errChan) - response, err := client.SwapFacialFeatures(request) - if err != nil { - errChan <- err - } else { - responseChan <- response - } - }) - if err != nil { - errChan <- err - close(responseChan) - close(errChan) - } - return responseChan, errChan -} - -// SwapFacialFeaturesWithCallback invokes the facebody.SwapFacialFeatures API asynchronously -func (client *Client) SwapFacialFeaturesWithCallback(request *SwapFacialFeaturesRequest, callback func(response *SwapFacialFeaturesResponse, err error)) <-chan int { - result := make(chan int, 1) - err := client.AddAsyncTask(func() { - var response *SwapFacialFeaturesResponse - var err error - defer close(result) - response, err = client.SwapFacialFeatures(request) - callback(response, err) - result <- 1 - }) - if err != nil { - defer close(result) - callback(nil, err) - result <- 0 - } - return result -} - -// SwapFacialFeaturesRequest is the request struct for api SwapFacialFeatures -type SwapFacialFeaturesRequest struct { - *requests.RpcRequest - TargetImageURL string `position:"Body" name:"TargetImageURL"` - FormatResultToJson requests.Boolean `position:"Query" name:"FormatResultToJson"` - SourceImageData string `position:"Body" name:"SourceImageData"` - OssFile string `position:"Query" name:"OssFile"` - SourceImageURL string `position:"Body" name:"SourceImageURL"` - TargetImageData string `position:"Body" name:"TargetImageData"` - RequestProxyBy string `position:"Query" name:"RequestProxyBy"` - EditPart string `position:"Body" name:"EditPart"` -} - -// SwapFacialFeaturesResponse is the response struct for api SwapFacialFeatures -type SwapFacialFeaturesResponse struct { - *responses.BaseResponse - RequestId string `json:"RequestId" xml:"RequestId"` - Data Data `json:"Data" xml:"Data"` -} - -// CreateSwapFacialFeaturesRequest creates a request to invoke SwapFacialFeatures API -func CreateSwapFacialFeaturesRequest() (request *SwapFacialFeaturesRequest) { - request = &SwapFacialFeaturesRequest{ - RpcRequest: &requests.RpcRequest{}, - } - request.InitWithApiInfo("facebody", "2019-12-30", "SwapFacialFeatures", "facebody", "openAPI") - request.Method = requests.POST - return -} - -// CreateSwapFacialFeaturesResponse creates a response to parse from SwapFacialFeatures response -func CreateSwapFacialFeaturesResponse() (response *SwapFacialFeaturesResponse) { - response = &SwapFacialFeaturesResponse{ - BaseResponse: &responses.BaseResponse{}, - } - return -}