Browse Source

IMM SDK Auto Released By guangchun.luo,Version:1.31.6

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy 7 years ago
parent
commit
aa91a73c94

+ 6 - 0
ChangeLog.txt

@@ -1,3 +1,9 @@
+2018-10-10 Version: 1.31.6
+1, add UpdateProject api, support update CU, ServiceRole
+2, PutProject not support edit
+3, CreateOfficeConversionTask api now supports FitToPagesTall, FitToPagesWide
+4, Remove paramater Engines, Indexers from project apis
+
 2018-10-09 Version: 1.31.5
 1, v1.0.0-->v1.0.1
 2, provider new region:beijing/shenzhen/zhangjiakou

+ 2 - 2
services/imm/create_office_conversion_task.go

@@ -76,12 +76,10 @@ func (client *Client) CreateOfficeConversionTaskWithCallback(request *CreateOffi
 // CreateOfficeConversionTaskRequest is the request struct for api CreateOfficeConversionTask
 type CreateOfficeConversionTaskRequest struct {
 	*requests.RpcRequest
-	ImageSpec       string           `position:"Query" name:"ImageSpec"`
 	SrcType         string           `position:"Query" name:"SrcType"`
 	NotifyTopicName string           `position:"Query" name:"NotifyTopicName"`
 	ModelId         string           `position:"Query" name:"ModelId"`
 	Project         string           `position:"Query" name:"Project"`
-	ExternalID      string           `position:"Query" name:"ExternalID"`
 	MaxSheetRow     requests.Integer `position:"Query" name:"MaxSheetRow"`
 	MaxSheetCount   requests.Integer `position:"Query" name:"MaxSheetCount"`
 	EndPage         requests.Integer `position:"Query" name:"EndPage"`
@@ -92,7 +90,9 @@ type CreateOfficeConversionTaskRequest struct {
 	MaxSheetCol     requests.Integer `position:"Query" name:"MaxSheetCol"`
 	TgtType         string           `position:"Query" name:"TgtType"`
 	NotifyEndpoint  string           `position:"Query" name:"NotifyEndpoint"`
+	FitToPagesWide  requests.Boolean `position:"Query" name:"FitToPagesWide"`
 	TgtFilePrefix   string           `position:"Query" name:"TgtFilePrefix"`
+	FitToPagesTall  requests.Boolean `position:"Query" name:"FitToPagesTall"`
 	SrcUri          string           `position:"Query" name:"SrcUri"`
 	TgtFilePages    string           `position:"Query" name:"TgtFilePages"`
 	TgtUri          string           `position:"Query" name:"TgtUri"`

+ 1 - 1
services/imm/get_face_search_group.go

@@ -85,7 +85,7 @@ type GetFaceSearchGroupResponse struct {
 	*responses.BaseResponse
 	RequestId  string `json:"RequestId" xml:"RequestId"`
 	GroupName  string `json:"GroupName" xml:"GroupName"`
-	Count      string `json:"Count" xml:"Count"`
+	Count      int    `json:"Count" xml:"Count"`
 	Status     string `json:"Status" xml:"Status"`
 	CreateTime string `json:"CreateTime" xml:"CreateTime"`
 	ModifyTime string `json:"ModifyTime" xml:"ModifyTime"`

+ 1 - 1
services/imm/get_face_search_image.go

@@ -92,7 +92,7 @@ type GetFaceSearchImageResponse struct {
 	Gender    string   `json:"Gender" xml:"Gender"`
 	Age       int      `json:"Age" xml:"Age"`
 	Pitch     float64  `json:"Pitch" xml:"Pitch"`
-	ImageUrl  float64  `json:"ImageUrl" xml:"ImageUrl"`
+	ImageUri  string   `json:"ImageUri" xml:"ImageUri"`
 	ImageMd5  string   `json:"ImageMd5" xml:"ImageMd5"`
 	Roll      float64  `json:"Roll" xml:"Roll"`
 	FaceId    string   `json:"FaceId" xml:"FaceId"`

+ 1 - 1
services/imm/get_face_search_user.go

@@ -86,7 +86,7 @@ type GetFaceSearchUserResponse struct {
 	*responses.BaseResponse
 	RequestId  string `json:"RequestId" xml:"RequestId"`
 	GroupName  string `json:"GroupName" xml:"GroupName"`
-	Count      string `json:"Count" xml:"Count"`
+	Count      int    `json:"Count" xml:"Count"`
 	Status     string `json:"Status" xml:"Status"`
 	CreateTime string `json:"CreateTime" xml:"CreateTime"`
 	ModifyTime string `json:"ModifyTime" xml:"ModifyTime"`

+ 9 - 10
services/imm/get_project.go

@@ -82,16 +82,15 @@ type GetProjectRequest struct {
 // GetProjectResponse is the response struct for api GetProject
 type GetProjectResponse struct {
 	*responses.BaseResponse
-	RequestId   string         `json:"RequestId" xml:"RequestId"`
-	Project     string         `json:"Project" xml:"Project"`
-	ServiceRole string         `json:"ServiceRole" xml:"ServiceRole"`
-	Endpoint    string         `json:"Endpoint" xml:"Endpoint"`
-	CreateTime  string         `json:"CreateTime" xml:"CreateTime"`
-	ModifyTime  string         `json:"ModifyTime" xml:"ModifyTime"`
-	Type        string         `json:"Type" xml:"Type"`
-	CU          int            `json:"CU" xml:"CU"`
-	Indexers    []IndexersItem `json:"Indexers" xml:"Indexers"`
-	Engines     []EnginesItem  `json:"Engines" xml:"Engines"`
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+	Project     string `json:"Project" xml:"Project"`
+	ServiceRole string `json:"ServiceRole" xml:"ServiceRole"`
+	Endpoint    string `json:"Endpoint" xml:"Endpoint"`
+	CreateTime  string `json:"CreateTime" xml:"CreateTime"`
+	ModifyTime  string `json:"ModifyTime" xml:"ModifyTime"`
+	Type        string `json:"Type" xml:"Type"`
+	CU          int    `json:"CU" xml:"CU"`
+	BillingType string `json:"BillingType" xml:"BillingType"`
 }
 
 // CreateGetProjectRequest creates a request to invoke GetProject API

+ 10 - 11
services/imm/put_project.go

@@ -76,26 +76,25 @@ func (client *Client) PutProjectWithCallback(request *PutProjectRequest, callbac
 // PutProjectRequest is the request struct for api PutProject
 type PutProjectRequest struct {
 	*requests.RpcRequest
-	Indexers    string           `position:"Query" name:"Indexers"`
 	CU          requests.Integer `position:"Query" name:"CU"`
-	Engines     string           `position:"Query" name:"Engines"`
 	ServiceRole string           `position:"Query" name:"ServiceRole"`
 	Project     string           `position:"Query" name:"Project"`
+	BillingType string           `position:"Query" name:"BillingType"`
 	Type        string           `position:"Query" name:"Type"`
 }
 
 // PutProjectResponse is the response struct for api PutProject
 type PutProjectResponse struct {
 	*responses.BaseResponse
-	RequestId   string         `json:"RequestId" xml:"RequestId"`
-	Project     string         `json:"Project" xml:"Project"`
-	CreateTime  string         `json:"CreateTime" xml:"CreateTime"`
-	ModifyTime  string         `json:"ModifyTime" xml:"ModifyTime"`
-	ServiceRole string         `json:"ServiceRole" xml:"ServiceRole"`
-	CU          int            `json:"CU" xml:"CU"`
-	Type        string         `json:"Type" xml:"Type"`
-	Engines     []EnginesItem  `json:"Engines" xml:"Engines"`
-	Indexers    []IndexersItem `json:"Indexers" xml:"Indexers"`
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+	Project     string `json:"Project" xml:"Project"`
+	CreateTime  string `json:"CreateTime" xml:"CreateTime"`
+	ModifyTime  string `json:"ModifyTime" xml:"ModifyTime"`
+	ServiceRole string `json:"ServiceRole" xml:"ServiceRole"`
+	CU          int    `json:"CU" xml:"CU"`
+	Type        string `json:"Type" xml:"Type"`
+	Endpoint    string `json:"Endpoint" xml:"Endpoint"`
+	BillingType string `json:"BillingType" xml:"BillingType"`
 }
 
 // CreatePutProjectRequest creates a request to invoke PutProject API

+ 2 - 2
services/imm/regist_face.go

@@ -90,14 +90,14 @@ type RegistFaceResponse struct {
 	*responses.BaseResponse
 	RequestId string   `json:"RequestId" xml:"RequestId"`
 	GroupId   string   `json:"GroupId" xml:"GroupId"`
-	ImageUrl  string   `json:"ImageUrl" xml:"ImageUrl"`
+	ImageUri  string   `json:"ImageUri" xml:"ImageUri"`
 	ImageMd5  string   `json:"ImageMd5" xml:"ImageMd5"`
 	ImageId   string   `json:"ImageId" xml:"ImageId"`
 	GroupName string   `json:"GroupName" xml:"GroupName"`
 	User      string   `json:"User" xml:"User"`
 	Roll      float64  `json:"Roll" xml:"Roll"`
 	FaceId    string   `json:"FaceId" xml:"FaceId"`
-	Yaw       string   `json:"Yaw" xml:"Yaw"`
+	Yaw       float64  `json:"Yaw" xml:"Yaw"`
 	Quality   float64  `json:"Quality" xml:"Quality"`
 	Glasses   int      `json:"Glasses" xml:"Glasses"`
 	Hat       int      `json:"Hat" xml:"Hat"`

+ 1 - 1
services/imm/search_face.go

@@ -88,7 +88,7 @@ type SearchFaceRequest struct {
 type SearchFaceResponse struct {
 	*responses.BaseResponse
 	RequestId   string            `json:"RequestId" xml:"RequestId"`
-	ImageUrl    string            `json:"ImageUrl" xml:"ImageUrl"`
+	ImageUri    string            `json:"ImageUri" xml:"ImageUri"`
 	GroupName   string            `json:"GroupName" xml:"GroupName"`
 	Glasses     int               `json:"Glasses" xml:"Glasses"`
 	Hat         int               `json:"Hat" xml:"Hat"`

+ 1 - 1
services/imm/struct_face_a.go

@@ -17,6 +17,6 @@ package imm
 
 // FaceA is a nested struct in imm response
 type FaceA struct {
-	ImageUrl string   `json:"ImageUrl" xml:"ImageUrl"`
+	ImageUri string   `json:"ImageUri" xml:"ImageUri"`
 	Axis     []string `json:"Axis" xml:"Axis"`
 }

+ 1 - 1
services/imm/struct_face_b.go

@@ -17,6 +17,6 @@ package imm
 
 // FaceB is a nested struct in imm response
 type FaceB struct {
-	ImageUrl string   `json:"ImageUrl" xml:"ImageUrl"`
+	ImageUri string   `json:"ImageUri" xml:"ImageUri"`
 	Axis     []string `json:"Axis" xml:"Axis"`
 }

+ 4 - 2
services/imm/struct_fail_details_item.go

@@ -17,6 +17,8 @@ package imm
 
 // FailDetailsItem is a nested struct in imm response
 type FailDetailsItem struct {
-	Reason string `json:"Reason" xml:"Reason"`
-	SrcUri string `json:"SrcUri" xml:"SrcUri"`
+	Reason       string `json:"Reason" xml:"Reason"`
+	ErrorMessage string `json:"ErrorMessage" xml:"ErrorMessage"`
+	ErrorCode    string `json:"ErrorCode" xml:"ErrorCode"`
+	SrcUri       string `json:"SrcUri" xml:"SrcUri"`
 }

+ 1 - 1
services/imm/struct_images_item.go

@@ -19,7 +19,7 @@ package imm
 type ImagesItem struct {
 	User     string   `json:"User" xml:"User"`
 	ImageId  string   `json:"ImageId" xml:"ImageId"`
-	ImageUrl string   `json:"ImageUrl" xml:"ImageUrl"`
+	ImageUri string   `json:"ImageUri" xml:"ImageUri"`
 	ImageMd5 string   `json:"ImageMd5" xml:"ImageMd5"`
 	Roll     float64  `json:"Roll" xml:"Roll"`
 	FaceId   string   `json:"FaceId" xml:"FaceId"`

+ 8 - 9
services/imm/struct_projects_item.go

@@ -17,13 +17,12 @@ package imm
 
 // ProjectsItem is a nested struct in imm response
 type ProjectsItem struct {
-	Project     string         `json:"Project" xml:"Project"`
-	Endpoint    string         `json:"Endpoint" xml:"Endpoint"`
-	ServiceRole string         `json:"ServiceRole" xml:"ServiceRole"`
-	CreateTime  string         `json:"CreateTime" xml:"CreateTime"`
-	ModifyTime  string         `json:"ModifyTime" xml:"ModifyTime"`
-	CU          int            `json:"CU" xml:"CU"`
-	Type        string         `json:"Type" xml:"Type"`
-	Engines     []EnginesItem  `json:"Engines" xml:"Engines"`
-	Indexers    []IndexersItem `json:"Indexers" xml:"Indexers"`
+	Project     string `json:"Project" xml:"Project"`
+	Endpoint    string `json:"Endpoint" xml:"Endpoint"`
+	ServiceRole string `json:"ServiceRole" xml:"ServiceRole"`
+	CreateTime  string `json:"CreateTime" xml:"CreateTime"`
+	ModifyTime  string `json:"ModifyTime" xml:"ModifyTime"`
+	CU          int    `json:"CU" xml:"CU"`
+	Type        string `json:"Type" xml:"Type"`
+	BillingType string `json:"BillingType" xml:"BillingType"`
 }

+ 21 - 0
services/imm/struct_qr_codes.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.
+
+// QRCodes is a nested struct in imm response
+type QRCodes struct {
+	QRCodesItem []QRCodesItem `json:"QRCodesItem" xml:"QRCodesItem"`
+}

+ 22 - 0
services/imm/struct_qr_codes_item.go

@@ -0,0 +1,22 @@
+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.
+
+// QRCodesItem is a nested struct in imm response
+type QRCodesItem struct {
+	Content          string           `json:"Content" xml:"Content"`
+	QRCodesRectangle QRCodesRectangle `json:"QRCodesRectangle" xml:"QRCodesRectangle"`
+}

+ 4 - 4
services/imm/struct_qr_codes_rectangle.go

@@ -17,8 +17,8 @@ package imm
 
 // QRCodesRectangle is a nested struct in imm response
 type QRCodesRectangle struct {
-	Left   int `json:"Left" xml:"Left"`
-	Top    int `json:"Top" xml:"Top"`
-	Width  int `json:"Width" xml:"Width"`
-	Height int `json:"Height" xml:"Height"`
+	Left   string `json:"Left" xml:"Left"`
+	Top    string `json:"Top" xml:"Top"`
+	Width  string `json:"Width" xml:"Width"`
+	Height string `json:"Height" xml:"Height"`
 }

+ 1 - 1
services/imm/struct_result_faces_item.go

@@ -21,7 +21,7 @@ type ResultFacesItem struct {
 	User     string   `json:"User" xml:"User"`
 	ImageId  string   `json:"ImageId" xml:"ImageId"`
 	Score    float64  `json:"Score" xml:"Score"`
-	ImageUrl string   `json:"ImageUrl" xml:"ImageUrl"`
+	ImageUri string   `json:"ImageUri" xml:"ImageUri"`
 	Glasses  int      `json:"Glasses" xml:"Glasses"`
 	Hat      int      `json:"Hat" xml:"Hat"`
 	Axis     []string `json:"Axis" xml:"Axis"`

+ 5 - 6
services/imm/struct_success_details_item.go

@@ -17,10 +17,9 @@ package imm
 
 // SuccessDetailsItem is a nested struct in imm response
 type SuccessDetailsItem struct {
-	PhotoId          string           `json:"PhotoId" xml:"PhotoId"`
-	Result           string           `json:"Result" xml:"Result"`
-	SrcUri           string           `json:"SrcUri" xml:"SrcUri"`
-	QRCodesRectangle QRCodesRectangle `json:"QRCodesRectangle" xml:"QRCodesRectangle"`
-	Faces            []FacesItem      `json:"Faces" xml:"Faces"`
-	Tags             []TagsItem       `json:"Tags" xml:"Tags"`
+	PhotoId string        `json:"PhotoId" xml:"PhotoId"`
+	SrcUri  string        `json:"SrcUri" xml:"SrcUri"`
+	QRCodes []QRCodesItem `json:"QRCodes" xml:"QRCodes"`
+	Faces   []FacesItem   `json:"Faces" xml:"Faces"`
+	Tags    []TagsItem    `json:"Tags" xml:"Tags"`
 }

+ 111 - 0
services/imm/update_project.go

@@ -0,0 +1,111 @@
+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"
+)
+
+// UpdateProject invokes the imm.UpdateProject API synchronously
+// api document: https://help.aliyun.com/api/imm/updateproject.html
+func (client *Client) UpdateProject(request *UpdateProjectRequest) (response *UpdateProjectResponse, err error) {
+	response = CreateUpdateProjectResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateProjectWithChan invokes the imm.UpdateProject API asynchronously
+// api document: https://help.aliyun.com/api/imm/updateproject.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProjectWithChan(request *UpdateProjectRequest) (<-chan *UpdateProjectResponse, <-chan error) {
+	responseChan := make(chan *UpdateProjectResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateProject(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateProjectWithCallback invokes the imm.UpdateProject API asynchronously
+// api document: https://help.aliyun.com/api/imm/updateproject.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateProjectWithCallback(request *UpdateProjectRequest, callback func(response *UpdateProjectResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateProjectResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateProject(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateProjectRequest is the request struct for api UpdateProject
+type UpdateProjectRequest struct {
+	*requests.RpcRequest
+	NewServiceRole string           `position:"Query" name:"NewServiceRole"`
+	Project        string           `position:"Query" name:"Project"`
+	NewCU          requests.Integer `position:"Query" name:"NewCU"`
+}
+
+// UpdateProjectResponse is the response struct for api UpdateProject
+type UpdateProjectResponse struct {
+	*responses.BaseResponse
+	RequestId   string `json:"RequestId" xml:"RequestId"`
+	Project     string `json:"Project" xml:"Project"`
+	CreateTime  string `json:"CreateTime" xml:"CreateTime"`
+	ModifyTime  string `json:"ModifyTime" xml:"ModifyTime"`
+	ServiceRole string `json:"ServiceRole" xml:"ServiceRole"`
+	CU          int    `json:"CU" xml:"CU"`
+	Type        string `json:"Type" xml:"Type"`
+}
+
+// CreateUpdateProjectRequest creates a request to invoke UpdateProject API
+func CreateUpdateProjectRequest() (request *UpdateProjectRequest) {
+	request = &UpdateProjectRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("imm", "2017-09-06", "UpdateProject", "imm", "openAPI")
+	return
+}
+
+// CreateUpdateProjectResponse creates a response to parse from UpdateProject response
+func CreateUpdateProjectResponse() (response *UpdateProjectResponse) {
+	response = &UpdateProjectResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}