Просмотр исходного кода

IMM SDK Auto Released By zhengrui.lj,Version:1.53.79

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 6 лет назад
Родитель
Сommit
5ff50ac10a

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-03-28 Version: 1.53.79
+1, Add logo detect.
+
 2019-03-27 Version: 1.53.78
 1, Add Project interface.
 2, Add Tag interface.

+ 1 - 0
services/imm/create_office_conversion_task.go

@@ -87,6 +87,7 @@ type CreateOfficeConversionTaskRequest struct {
 	TgtFilePrefix   string           `position:"Query" name:"TgtFilePrefix"`
 	NotifyTopicName string           `position:"Query" name:"NotifyTopicName"`
 	ModelId         string           `position:"Query" name:"ModelId"`
+	DisplayDpi      requests.Integer `position:"Query" name:"DisplayDpi"`
 	MaxSheetRow     requests.Integer `position:"Query" name:"MaxSheetRow"`
 	MaxSheetCount   requests.Integer `position:"Query" name:"MaxSheetCount"`
 	EndPage         requests.Integer `position:"Query" name:"EndPage"`

+ 106 - 0
services/imm/detect_image_logos.go

@@ -0,0 +1,106 @@
+package imm
+
+//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"
+)
+
+// DetectImageLogos invokes the imm.DetectImageLogos API synchronously
+// api document: https://help.aliyun.com/api/imm/detectimagelogos.html
+func (client *Client) DetectImageLogos(request *DetectImageLogosRequest) (response *DetectImageLogosResponse, err error) {
+	response = CreateDetectImageLogosResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DetectImageLogosWithChan invokes the imm.DetectImageLogos API asynchronously
+// api document: https://help.aliyun.com/api/imm/detectimagelogos.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DetectImageLogosWithChan(request *DetectImageLogosRequest) (<-chan *DetectImageLogosResponse, <-chan error) {
+	responseChan := make(chan *DetectImageLogosResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DetectImageLogos(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DetectImageLogosWithCallback invokes the imm.DetectImageLogos API asynchronously
+// api document: https://help.aliyun.com/api/imm/detectimagelogos.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DetectImageLogosWithCallback(request *DetectImageLogosRequest, callback func(response *DetectImageLogosResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DetectImageLogosResponse
+		var err error
+		defer close(result)
+		response, err = client.DetectImageLogos(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DetectImageLogosRequest is the request struct for api DetectImageLogos
+type DetectImageLogosRequest struct {
+	*requests.RpcRequest
+	ImageUri string `position:"Query" name:"ImageUri"`
+	Project  string `position:"Query" name:"Project"`
+}
+
+// DetectImageLogosResponse is the response struct for api DetectImageLogos
+type DetectImageLogosResponse struct {
+	*responses.BaseResponse
+	RequestId string      `json:"RequestId" xml:"RequestId"`
+	ImageUri  string      `json:"ImageUri" xml:"ImageUri"`
+	Logos     []LogosItem `json:"Logos" xml:"Logos"`
+}
+
+// CreateDetectImageLogosRequest creates a request to invoke DetectImageLogos API
+func CreateDetectImageLogosRequest() (request *DetectImageLogosRequest) {
+	request = &DetectImageLogosRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "DetectImageLogos", "imm", "openAPI")
+	return
+}
+
+// CreateDetectImageLogosResponse creates a response to parse from DetectImageLogos response
+func CreateDetectImageLogosResponse() (response *DetectImageLogosResponse) {
+	response = &DetectImageLogosResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 24 - 0
services/imm/struct_logo_boundary.go

@@ -0,0 +1,24 @@
+package imm
+
+//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.
+
+// LogoBoundary is a nested struct in imm response
+type LogoBoundary struct {
+	Width  int `json:"Width" xml:"Width"`
+	Height int `json:"Height" xml:"Height"`
+	Top    int `json:"Top" xml:"Top"`
+	Left   int `json:"Left" xml:"Left"`
+}

+ 21 - 0
services/imm/struct_logos.go

@@ -0,0 +1,21 @@
+package imm
+
+//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.
+
+// Logos is a nested struct in imm response
+type Logos struct {
+	LogosItem []LogosItem `json:"LogosItem" xml:"LogosItem"`
+}

+ 23 - 0
services/imm/struct_logos_item.go

@@ -0,0 +1,23 @@
+package imm
+
+//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.
+
+// LogosItem is a nested struct in imm response
+type LogosItem struct {
+	LogoName       string       `json:"LogoName" xml:"LogoName"`
+	LogoConfidence float64      `json:"LogoConfidence" xml:"LogoConfidence"`
+	LogoBoundary   LogoBoundary `json:"LogoBoundary" xml:"LogoBoundary"`
+}