Browse Source

GREEN SDK Auto Released By liuhai.lh,Version:1.42.1

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy 7 years ago
parent
commit
fef0a8888a
31 changed files with 2196 additions and 0 deletions
  1. 5 0
      ChangeLog.txt
  2. 108 0
      services/green/create_image_lib.go
  3. 108 0
      services/green/create_keyword.go
  4. 110 0
      services/green/create_keyword_lib.go
  5. 104 0
      services/green/delete_image_from_lib.go
  6. 104 0
      services/green/delete_image_lib.go
  7. 106 0
      services/green/delete_keyword.go
  8. 105 0
      services/green/delete_keyword_lib.go
  9. 111 0
      services/green/describe_image_from_lib.go
  10. 106 0
      services/green/describe_image_lib.go
  11. 109 0
      services/green/describe_image_upload_info.go
  12. 113 0
      services/green/describe_keyword.go
  13. 107 0
      services/green/describe_keyword_lib.go
  14. 111 0
      services/green/describe_upload_info.go
  15. 172 0
      services/green/extension/uploader/client_uploader.go
  16. 21 0
      services/green/struct_biz_types_in_describe_image_lib.go
  17. 21 0
      services/green/struct_biz_types_in_describe_keyword_lib.go
  18. 23 0
      services/green/struct_image_from_lib.go
  19. 21 0
      services/green/struct_image_from_lib_list.go
  20. 30 0
      services/green/struct_image_lib.go
  21. 21 0
      services/green/struct_image_lib_list.go
  22. 21 0
      services/green/struct_invalid_keyword_list.go
  23. 24 0
      services/green/struct_keyword.go
  24. 31 0
      services/green/struct_keyword_lib.go
  25. 21 0
      services/green/struct_keyword_lib_list.go
  26. 21 0
      services/green/struct_keyword_list.go
  27. 21 0
      services/green/struct_resouce_type_list.go
  28. 21 0
      services/green/struct_scene_list.go
  29. 108 0
      services/green/update_image_lib.go
  30. 107 0
      services/green/update_keyword_lib.go
  31. 105 0
      services/green/upload_image_to_lib.go

+ 5 - 0
ChangeLog.txt

@@ -1,3 +1,8 @@
+2018-11-27 Version: 1.42.1
+1, api for custom keyword lib、similartext lib、voice keyword lib
+2, api for custom image lib
+3, support client file detect for image detection scenes、voice detection scenes、video detection scenes、file detection scenes
+
 2018-11-26 Version: 1.42.0
 2018-11-26 Version: 1.42.0
 1, Add RegisterInstance interface, Support admin or DBA user to register new db instance.
 1, Add RegisterInstance interface, Support admin or DBA user to register new db instance.
 2, Add RegisterUser Interface, Support admin user to register new user.
 2, Add RegisterUser Interface, Support admin user to register new user.

+ 108 - 0
services/green/create_image_lib.go

@@ -0,0 +1,108 @@
+package green
+
+//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"
+)
+
+// CreateImageLib invokes the green.CreateImageLib API synchronously
+// api document: https://help.aliyun.com/api/green/createimagelib.html
+func (client *Client) CreateImageLib(request *CreateImageLibRequest) (response *CreateImageLibResponse, err error) {
+	response = CreateCreateImageLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateImageLibWithChan invokes the green.CreateImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/createimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateImageLibWithChan(request *CreateImageLibRequest) (<-chan *CreateImageLibResponse, <-chan error) {
+	responseChan := make(chan *CreateImageLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateImageLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateImageLibWithCallback invokes the green.CreateImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/createimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateImageLibWithCallback(request *CreateImageLibRequest, callback func(response *CreateImageLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateImageLibResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateImageLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateImageLibRequest is the request struct for api CreateImageLib
+type CreateImageLibRequest struct {
+	*requests.RpcRequest
+	SourceIp      string `position:"Query" name:"SourceIp"`
+	Name          string `position:"Query" name:"Name"`
+	BizTypes      string `position:"Query" name:"BizTypes"`
+	ServiceModule string `position:"Query" name:"ServiceModule"`
+	Category      string `position:"Query" name:"Category"`
+	Scene         string `position:"Query" name:"Scene"`
+}
+
+// CreateImageLibResponse is the response struct for api CreateImageLib
+type CreateImageLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateCreateImageLibRequest creates a request to invoke CreateImageLib API
+func CreateCreateImageLibRequest() (request *CreateImageLibRequest) {
+	request = &CreateImageLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "CreateImageLib", "green", "openAPI")
+	return
+}
+
+// CreateCreateImageLibResponse creates a response to parse from CreateImageLib response
+func CreateCreateImageLibResponse() (response *CreateImageLibResponse) {
+	response = &CreateImageLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/green/create_keyword.go

@@ -0,0 +1,108 @@
+package green
+
+//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"
+)
+
+// CreateKeyword invokes the green.CreateKeyword API synchronously
+// api document: https://help.aliyun.com/api/green/createkeyword.html
+func (client *Client) CreateKeyword(request *CreateKeywordRequest) (response *CreateKeywordResponse, err error) {
+	response = CreateCreateKeywordResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateKeywordWithChan invokes the green.CreateKeyword API asynchronously
+// api document: https://help.aliyun.com/api/green/createkeyword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateKeywordWithChan(request *CreateKeywordRequest) (<-chan *CreateKeywordResponse, <-chan error) {
+	responseChan := make(chan *CreateKeywordResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateKeyword(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateKeywordWithCallback invokes the green.CreateKeyword API asynchronously
+// api document: https://help.aliyun.com/api/green/createkeyword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateKeywordWithCallback(request *CreateKeywordRequest, callback func(response *CreateKeywordResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateKeywordResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateKeyword(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateKeywordRequest is the request struct for api CreateKeyword
+type CreateKeywordRequest struct {
+	*requests.RpcRequest
+	SourceIp     string           `position:"Query" name:"SourceIp"`
+	Keywords     string           `position:"Query" name:"Keywords"`
+	KeywordLibId requests.Integer `position:"Query" name:"KeywordLibId"`
+	Lang         string           `position:"Query" name:"Lang"`
+}
+
+// CreateKeywordResponse is the response struct for api CreateKeyword
+type CreateKeywordResponse struct {
+	*responses.BaseResponse
+	RequestId          string   `json:"RequestId" xml:"RequestId"`
+	SuccessCount       int      `json:"SuccessCount" xml:"SuccessCount"`
+	InvalidKeywordList []string `json:"InvalidKeywordList" xml:"InvalidKeywordList"`
+}
+
+// CreateCreateKeywordRequest creates a request to invoke CreateKeyword API
+func CreateCreateKeywordRequest() (request *CreateKeywordRequest) {
+	request = &CreateKeywordRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "CreateKeyword", "green", "openAPI")
+	return
+}
+
+// CreateCreateKeywordResponse creates a response to parse from CreateKeyword response
+func CreateCreateKeywordResponse() (response *CreateKeywordResponse) {
+	response = &CreateKeywordResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 110 - 0
services/green/create_keyword_lib.go

@@ -0,0 +1,110 @@
+package green
+
+//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"
+)
+
+// CreateKeywordLib invokes the green.CreateKeywordLib API synchronously
+// api document: https://help.aliyun.com/api/green/createkeywordlib.html
+func (client *Client) CreateKeywordLib(request *CreateKeywordLibRequest) (response *CreateKeywordLibResponse, err error) {
+	response = CreateCreateKeywordLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateKeywordLibWithChan invokes the green.CreateKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/createkeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateKeywordLibWithChan(request *CreateKeywordLibRequest) (<-chan *CreateKeywordLibResponse, <-chan error) {
+	responseChan := make(chan *CreateKeywordLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateKeywordLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateKeywordLibWithCallback invokes the green.CreateKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/createkeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateKeywordLibWithCallback(request *CreateKeywordLibRequest, callback func(response *CreateKeywordLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateKeywordLibResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateKeywordLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateKeywordLibRequest is the request struct for api CreateKeywordLib
+type CreateKeywordLibRequest struct {
+	*requests.RpcRequest
+	SourceIp      string `position:"Query" name:"SourceIp"`
+	LibType       string `position:"Query" name:"LibType"`
+	Name          string `position:"Query" name:"Name"`
+	BizTypes      string `position:"Query" name:"BizTypes"`
+	ServiceModule string `position:"Query" name:"ServiceModule"`
+	Lang          string `position:"Query" name:"Lang"`
+	Category      string `position:"Query" name:"Category"`
+	ResourceType  string `position:"Query" name:"ResourceType"`
+}
+
+// CreateKeywordLibResponse is the response struct for api CreateKeywordLib
+type CreateKeywordLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateCreateKeywordLibRequest creates a request to invoke CreateKeywordLib API
+func CreateCreateKeywordLibRequest() (request *CreateKeywordLibRequest) {
+	request = &CreateKeywordLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "CreateKeywordLib", "green", "openAPI")
+	return
+}
+
+// CreateCreateKeywordLibResponse creates a response to parse from CreateKeywordLib response
+func CreateCreateKeywordLibResponse() (response *CreateKeywordLibResponse) {
+	response = &CreateKeywordLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/green/delete_image_from_lib.go

@@ -0,0 +1,104 @@
+package green
+
+//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"
+)
+
+// DeleteImageFromLib invokes the green.DeleteImageFromLib API synchronously
+// api document: https://help.aliyun.com/api/green/deleteimagefromlib.html
+func (client *Client) DeleteImageFromLib(request *DeleteImageFromLibRequest) (response *DeleteImageFromLibResponse, err error) {
+	response = CreateDeleteImageFromLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteImageFromLibWithChan invokes the green.DeleteImageFromLib API asynchronously
+// api document: https://help.aliyun.com/api/green/deleteimagefromlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteImageFromLibWithChan(request *DeleteImageFromLibRequest) (<-chan *DeleteImageFromLibResponse, <-chan error) {
+	responseChan := make(chan *DeleteImageFromLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteImageFromLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteImageFromLibWithCallback invokes the green.DeleteImageFromLib API asynchronously
+// api document: https://help.aliyun.com/api/green/deleteimagefromlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteImageFromLibWithCallback(request *DeleteImageFromLibRequest, callback func(response *DeleteImageFromLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteImageFromLibResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteImageFromLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteImageFromLibRequest is the request struct for api DeleteImageFromLib
+type DeleteImageFromLibRequest struct {
+	*requests.RpcRequest
+	SourceIp string `position:"Query" name:"SourceIp"`
+	Ids      string `position:"Query" name:"Ids"`
+}
+
+// DeleteImageFromLibResponse is the response struct for api DeleteImageFromLib
+type DeleteImageFromLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteImageFromLibRequest creates a request to invoke DeleteImageFromLib API
+func CreateDeleteImageFromLibRequest() (request *DeleteImageFromLibRequest) {
+	request = &DeleteImageFromLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DeleteImageFromLib", "green", "openAPI")
+	return
+}
+
+// CreateDeleteImageFromLibResponse creates a response to parse from DeleteImageFromLib response
+func CreateDeleteImageFromLibResponse() (response *DeleteImageFromLibResponse) {
+	response = &DeleteImageFromLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 104 - 0
services/green/delete_image_lib.go

@@ -0,0 +1,104 @@
+package green
+
+//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"
+)
+
+// DeleteImageLib invokes the green.DeleteImageLib API synchronously
+// api document: https://help.aliyun.com/api/green/deleteimagelib.html
+func (client *Client) DeleteImageLib(request *DeleteImageLibRequest) (response *DeleteImageLibResponse, err error) {
+	response = CreateDeleteImageLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteImageLibWithChan invokes the green.DeleteImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/deleteimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteImageLibWithChan(request *DeleteImageLibRequest) (<-chan *DeleteImageLibResponse, <-chan error) {
+	responseChan := make(chan *DeleteImageLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteImageLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteImageLibWithCallback invokes the green.DeleteImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/deleteimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteImageLibWithCallback(request *DeleteImageLibRequest, callback func(response *DeleteImageLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteImageLibResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteImageLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteImageLibRequest is the request struct for api DeleteImageLib
+type DeleteImageLibRequest struct {
+	*requests.RpcRequest
+	SourceIp string           `position:"Query" name:"SourceIp"`
+	Id       requests.Integer `position:"Query" name:"Id"`
+}
+
+// DeleteImageLibResponse is the response struct for api DeleteImageLib
+type DeleteImageLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteImageLibRequest creates a request to invoke DeleteImageLib API
+func CreateDeleteImageLibRequest() (request *DeleteImageLibRequest) {
+	request = &DeleteImageLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DeleteImageLib", "green", "openAPI")
+	return
+}
+
+// CreateDeleteImageLibResponse creates a response to parse from DeleteImageLib response
+func CreateDeleteImageLibResponse() (response *DeleteImageLibResponse) {
+	response = &DeleteImageLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/green/delete_keyword.go

@@ -0,0 +1,106 @@
+package green
+
+//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"
+)
+
+// DeleteKeyword invokes the green.DeleteKeyword API synchronously
+// api document: https://help.aliyun.com/api/green/deletekeyword.html
+func (client *Client) DeleteKeyword(request *DeleteKeywordRequest) (response *DeleteKeywordResponse, err error) {
+	response = CreateDeleteKeywordResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteKeywordWithChan invokes the green.DeleteKeyword API asynchronously
+// api document: https://help.aliyun.com/api/green/deletekeyword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteKeywordWithChan(request *DeleteKeywordRequest) (<-chan *DeleteKeywordResponse, <-chan error) {
+	responseChan := make(chan *DeleteKeywordResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteKeyword(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteKeywordWithCallback invokes the green.DeleteKeyword API asynchronously
+// api document: https://help.aliyun.com/api/green/deletekeyword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteKeywordWithCallback(request *DeleteKeywordRequest, callback func(response *DeleteKeywordResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteKeywordResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteKeyword(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteKeywordRequest is the request struct for api DeleteKeyword
+type DeleteKeywordRequest struct {
+	*requests.RpcRequest
+	SourceIp     string `position:"Query" name:"SourceIp"`
+	KeywordLibId string `position:"Query" name:"KeywordLibId"`
+	Ids          string `position:"Query" name:"Ids"`
+	Lang         string `position:"Query" name:"Lang"`
+}
+
+// DeleteKeywordResponse is the response struct for api DeleteKeyword
+type DeleteKeywordResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteKeywordRequest creates a request to invoke DeleteKeyword API
+func CreateDeleteKeywordRequest() (request *DeleteKeywordRequest) {
+	request = &DeleteKeywordRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DeleteKeyword", "green", "openAPI")
+	return
+}
+
+// CreateDeleteKeywordResponse creates a response to parse from DeleteKeyword response
+func CreateDeleteKeywordResponse() (response *DeleteKeywordResponse) {
+	response = &DeleteKeywordResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/green/delete_keyword_lib.go

@@ -0,0 +1,105 @@
+package green
+
+//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"
+)
+
+// DeleteKeywordLib invokes the green.DeleteKeywordLib API synchronously
+// api document: https://help.aliyun.com/api/green/deletekeywordlib.html
+func (client *Client) DeleteKeywordLib(request *DeleteKeywordLibRequest) (response *DeleteKeywordLibResponse, err error) {
+	response = CreateDeleteKeywordLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteKeywordLibWithChan invokes the green.DeleteKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/deletekeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteKeywordLibWithChan(request *DeleteKeywordLibRequest) (<-chan *DeleteKeywordLibResponse, <-chan error) {
+	responseChan := make(chan *DeleteKeywordLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteKeywordLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteKeywordLibWithCallback invokes the green.DeleteKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/deletekeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteKeywordLibWithCallback(request *DeleteKeywordLibRequest, callback func(response *DeleteKeywordLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteKeywordLibResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteKeywordLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteKeywordLibRequest is the request struct for api DeleteKeywordLib
+type DeleteKeywordLibRequest struct {
+	*requests.RpcRequest
+	SourceIp string           `position:"Query" name:"SourceIp"`
+	Id       requests.Integer `position:"Query" name:"Id"`
+	Lang     string           `position:"Query" name:"Lang"`
+}
+
+// DeleteKeywordLibResponse is the response struct for api DeleteKeywordLib
+type DeleteKeywordLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteKeywordLibRequest creates a request to invoke DeleteKeywordLib API
+func CreateDeleteKeywordLibRequest() (request *DeleteKeywordLibRequest) {
+	request = &DeleteKeywordLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DeleteKeywordLib", "green", "openAPI")
+	return
+}
+
+// CreateDeleteKeywordLibResponse creates a response to parse from DeleteKeywordLib response
+func CreateDeleteKeywordLibResponse() (response *DeleteKeywordLibResponse) {
+	response = &DeleteKeywordLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/green/describe_image_from_lib.go

@@ -0,0 +1,111 @@
+package green
+
+//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"
+)
+
+// DescribeImageFromLib invokes the green.DescribeImageFromLib API synchronously
+// api document: https://help.aliyun.com/api/green/describeimagefromlib.html
+func (client *Client) DescribeImageFromLib(request *DescribeImageFromLibRequest) (response *DescribeImageFromLibResponse, err error) {
+	response = CreateDescribeImageFromLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeImageFromLibWithChan invokes the green.DescribeImageFromLib API asynchronously
+// api document: https://help.aliyun.com/api/green/describeimagefromlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageFromLibWithChan(request *DescribeImageFromLibRequest) (<-chan *DescribeImageFromLibResponse, <-chan error) {
+	responseChan := make(chan *DescribeImageFromLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeImageFromLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeImageFromLibWithCallback invokes the green.DescribeImageFromLib API asynchronously
+// api document: https://help.aliyun.com/api/green/describeimagefromlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageFromLibWithCallback(request *DescribeImageFromLibRequest, callback func(response *DescribeImageFromLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeImageFromLibResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeImageFromLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeImageFromLibRequest is the request struct for api DescribeImageFromLib
+type DescribeImageFromLibRequest struct {
+	*requests.RpcRequest
+	TotalCount  requests.Integer `position:"Query" name:"TotalCount"`
+	SourceIp    string           `position:"Query" name:"SourceIp"`
+	ImageLibId  requests.Integer `position:"Query" name:"ImageLibId"`
+	PageSize    requests.Integer `position:"Query" name:"PageSize"`
+	CurrentPage requests.Integer `position:"Query" name:"CurrentPage"`
+}
+
+// DescribeImageFromLibResponse is the response struct for api DescribeImageFromLib
+type DescribeImageFromLibResponse struct {
+	*responses.BaseResponse
+	RequestId        string         `json:"RequestId" xml:"RequestId"`
+	PageSize         int            `json:"PageSize" xml:"PageSize"`
+	CurrentPage      int            `json:"CurrentPage" xml:"CurrentPage"`
+	TotalCount       int            `json:"TotalCount" xml:"TotalCount"`
+	ImageFromLibList []ImageFromLib `json:"ImageFromLibList" xml:"ImageFromLibList"`
+}
+
+// CreateDescribeImageFromLibRequest creates a request to invoke DescribeImageFromLib API
+func CreateDescribeImageFromLibRequest() (request *DescribeImageFromLibRequest) {
+	request = &DescribeImageFromLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DescribeImageFromLib", "green", "openAPI")
+	return
+}
+
+// CreateDescribeImageFromLibResponse creates a response to parse from DescribeImageFromLib response
+func CreateDescribeImageFromLibResponse() (response *DescribeImageFromLibResponse) {
+	response = &DescribeImageFromLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 106 - 0
services/green/describe_image_lib.go

@@ -0,0 +1,106 @@
+package green
+
+//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"
+)
+
+// DescribeImageLib invokes the green.DescribeImageLib API synchronously
+// api document: https://help.aliyun.com/api/green/describeimagelib.html
+func (client *Client) DescribeImageLib(request *DescribeImageLibRequest) (response *DescribeImageLibResponse, err error) {
+	response = CreateDescribeImageLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeImageLibWithChan invokes the green.DescribeImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/describeimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageLibWithChan(request *DescribeImageLibRequest) (<-chan *DescribeImageLibResponse, <-chan error) {
+	responseChan := make(chan *DescribeImageLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeImageLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeImageLibWithCallback invokes the green.DescribeImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/describeimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageLibWithCallback(request *DescribeImageLibRequest, callback func(response *DescribeImageLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeImageLibResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeImageLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeImageLibRequest is the request struct for api DescribeImageLib
+type DescribeImageLibRequest struct {
+	*requests.RpcRequest
+	SourceIp      string `position:"Query" name:"SourceIp"`
+	ServiceModule string `position:"Query" name:"ServiceModule"`
+}
+
+// DescribeImageLibResponse is the response struct for api DescribeImageLib
+type DescribeImageLibResponse struct {
+	*responses.BaseResponse
+	RequestId    string     `json:"RequestId" xml:"RequestId"`
+	TotalCount   int        `json:"TotalCount" xml:"TotalCount"`
+	ImageLibList []ImageLib `json:"ImageLibList" xml:"ImageLibList"`
+}
+
+// CreateDescribeImageLibRequest creates a request to invoke DescribeImageLib API
+func CreateDescribeImageLibRequest() (request *DescribeImageLibRequest) {
+	request = &DescribeImageLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DescribeImageLib", "green", "openAPI")
+	return
+}
+
+// CreateDescribeImageLibResponse creates a response to parse from DescribeImageLib response
+func CreateDescribeImageLibResponse() (response *DescribeImageLibResponse) {
+	response = &DescribeImageLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/green/describe_image_upload_info.go

@@ -0,0 +1,109 @@
+package green
+
+//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"
+)
+
+// DescribeImageUploadInfo invokes the green.DescribeImageUploadInfo API synchronously
+// api document: https://help.aliyun.com/api/green/describeimageuploadinfo.html
+func (client *Client) DescribeImageUploadInfo(request *DescribeImageUploadInfoRequest) (response *DescribeImageUploadInfoResponse, err error) {
+	response = CreateDescribeImageUploadInfoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeImageUploadInfoWithChan invokes the green.DescribeImageUploadInfo API asynchronously
+// api document: https://help.aliyun.com/api/green/describeimageuploadinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageUploadInfoWithChan(request *DescribeImageUploadInfoRequest) (<-chan *DescribeImageUploadInfoResponse, <-chan error) {
+	responseChan := make(chan *DescribeImageUploadInfoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeImageUploadInfo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeImageUploadInfoWithCallback invokes the green.DescribeImageUploadInfo API asynchronously
+// api document: https://help.aliyun.com/api/green/describeimageuploadinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeImageUploadInfoWithCallback(request *DescribeImageUploadInfoRequest, callback func(response *DescribeImageUploadInfoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeImageUploadInfoResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeImageUploadInfo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeImageUploadInfoRequest is the request struct for api DescribeImageUploadInfo
+type DescribeImageUploadInfoRequest struct {
+	*requests.RpcRequest
+	SourceIp string `position:"Query" name:"SourceIp"`
+}
+
+// DescribeImageUploadInfoResponse is the response struct for api DescribeImageUploadInfo
+type DescribeImageUploadInfoResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Accessid  string `json:"Accessid" xml:"Accessid"`
+	Policy    string `json:"Policy" xml:"Policy"`
+	Signature string `json:"Signature" xml:"Signature"`
+	Folder    string `json:"Folder" xml:"Folder"`
+	Host      string `json:"Host" xml:"Host"`
+	Expire    int    `json:"Expire" xml:"Expire"`
+}
+
+// CreateDescribeImageUploadInfoRequest creates a request to invoke DescribeImageUploadInfo API
+func CreateDescribeImageUploadInfoRequest() (request *DescribeImageUploadInfoRequest) {
+	request = &DescribeImageUploadInfoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DescribeImageUploadInfo", "green", "openAPI")
+	return
+}
+
+// CreateDescribeImageUploadInfoResponse creates a response to parse from DescribeImageUploadInfo response
+func CreateDescribeImageUploadInfoResponse() (response *DescribeImageUploadInfoResponse) {
+	response = &DescribeImageUploadInfoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/green/describe_keyword.go

@@ -0,0 +1,113 @@
+package green
+
+//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"
+)
+
+// DescribeKeyword invokes the green.DescribeKeyword API synchronously
+// api document: https://help.aliyun.com/api/green/describekeyword.html
+func (client *Client) DescribeKeyword(request *DescribeKeywordRequest) (response *DescribeKeywordResponse, err error) {
+	response = CreateDescribeKeywordResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeKeywordWithChan invokes the green.DescribeKeyword API asynchronously
+// api document: https://help.aliyun.com/api/green/describekeyword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeKeywordWithChan(request *DescribeKeywordRequest) (<-chan *DescribeKeywordResponse, <-chan error) {
+	responseChan := make(chan *DescribeKeywordResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeKeyword(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeKeywordWithCallback invokes the green.DescribeKeyword API asynchronously
+// api document: https://help.aliyun.com/api/green/describekeyword.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeKeywordWithCallback(request *DescribeKeywordRequest, callback func(response *DescribeKeywordResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeKeywordResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeKeyword(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeKeywordRequest is the request struct for api DescribeKeyword
+type DescribeKeywordRequest struct {
+	*requests.RpcRequest
+	TotalCount   requests.Integer `position:"Query" name:"TotalCount"`
+	SourceIp     string           `position:"Query" name:"SourceIp"`
+	KeywordLibId requests.Integer `position:"Query" name:"KeywordLibId"`
+	PageSize     requests.Integer `position:"Query" name:"PageSize"`
+	CurrentPage  requests.Integer `position:"Query" name:"CurrentPage"`
+	Lang         string           `position:"Query" name:"Lang"`
+	Keyword      string           `position:"Query" name:"Keyword"`
+}
+
+// DescribeKeywordResponse is the response struct for api DescribeKeyword
+type DescribeKeywordResponse struct {
+	*responses.BaseResponse
+	RequestId   string    `json:"RequestId" xml:"RequestId"`
+	TotalCount  int       `json:"TotalCount" xml:"TotalCount"`
+	PageSize    int       `json:"PageSize" xml:"PageSize"`
+	CurrentPage int       `json:"CurrentPage" xml:"CurrentPage"`
+	KeywordList []Keyword `json:"KeywordList" xml:"KeywordList"`
+}
+
+// CreateDescribeKeywordRequest creates a request to invoke DescribeKeyword API
+func CreateDescribeKeywordRequest() (request *DescribeKeywordRequest) {
+	request = &DescribeKeywordRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DescribeKeyword", "green", "openAPI")
+	return
+}
+
+// CreateDescribeKeywordResponse creates a response to parse from DescribeKeyword response
+func CreateDescribeKeywordResponse() (response *DescribeKeywordResponse) {
+	response = &DescribeKeywordResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/green/describe_keyword_lib.go

@@ -0,0 +1,107 @@
+package green
+
+//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"
+)
+
+// DescribeKeywordLib invokes the green.DescribeKeywordLib API synchronously
+// api document: https://help.aliyun.com/api/green/describekeywordlib.html
+func (client *Client) DescribeKeywordLib(request *DescribeKeywordLibRequest) (response *DescribeKeywordLibResponse, err error) {
+	response = CreateDescribeKeywordLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeKeywordLibWithChan invokes the green.DescribeKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/describekeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeKeywordLibWithChan(request *DescribeKeywordLibRequest) (<-chan *DescribeKeywordLibResponse, <-chan error) {
+	responseChan := make(chan *DescribeKeywordLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeKeywordLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeKeywordLibWithCallback invokes the green.DescribeKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/describekeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeKeywordLibWithCallback(request *DescribeKeywordLibRequest, callback func(response *DescribeKeywordLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeKeywordLibResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeKeywordLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeKeywordLibRequest is the request struct for api DescribeKeywordLib
+type DescribeKeywordLibRequest struct {
+	*requests.RpcRequest
+	SourceIp      string `position:"Query" name:"SourceIp"`
+	ServiceModule string `position:"Query" name:"ServiceModule"`
+	Lang          string `position:"Query" name:"Lang"`
+}
+
+// DescribeKeywordLibResponse is the response struct for api DescribeKeywordLib
+type DescribeKeywordLibResponse struct {
+	*responses.BaseResponse
+	RequestId      string       `json:"RequestId" xml:"RequestId"`
+	TotalCount     int          `json:"TotalCount" xml:"TotalCount"`
+	KeywordLibList []KeywordLib `json:"KeywordLibList" xml:"KeywordLibList"`
+}
+
+// CreateDescribeKeywordLibRequest creates a request to invoke DescribeKeywordLib API
+func CreateDescribeKeywordLibRequest() (request *DescribeKeywordLibRequest) {
+	request = &DescribeKeywordLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DescribeKeywordLib", "green", "openAPI")
+	return
+}
+
+// CreateDescribeKeywordLibResponse creates a response to parse from DescribeKeywordLib response
+func CreateDescribeKeywordLibResponse() (response *DescribeKeywordLibResponse) {
+	response = &DescribeKeywordLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 111 - 0
services/green/describe_upload_info.go

@@ -0,0 +1,111 @@
+package green
+
+//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"
+)
+
+// DescribeUploadInfo invokes the green.DescribeUploadInfo API synchronously
+// api document: https://help.aliyun.com/api/green/describeuploadinfo.html
+func (client *Client) DescribeUploadInfo(request *DescribeUploadInfoRequest) (response *DescribeUploadInfoResponse, err error) {
+	response = CreateDescribeUploadInfoResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeUploadInfoWithChan invokes the green.DescribeUploadInfo API asynchronously
+// api document: https://help.aliyun.com/api/green/describeuploadinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeUploadInfoWithChan(request *DescribeUploadInfoRequest) (<-chan *DescribeUploadInfoResponse, <-chan error) {
+	responseChan := make(chan *DescribeUploadInfoResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeUploadInfo(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeUploadInfoWithCallback invokes the green.DescribeUploadInfo API asynchronously
+// api document: https://help.aliyun.com/api/green/describeuploadinfo.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeUploadInfoWithCallback(request *DescribeUploadInfoRequest, callback func(response *DescribeUploadInfoResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeUploadInfoResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeUploadInfo(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeUploadInfoRequest is the request struct for api DescribeUploadInfo
+type DescribeUploadInfoRequest struct {
+	*requests.RpcRequest
+	Biz      string `position:"Query" name:"Biz"`
+	SourceIp string `position:"Query" name:"SourceIp"`
+	Lang     string `position:"Query" name:"Lang"`
+}
+
+// DescribeUploadInfoResponse is the response struct for api DescribeUploadInfo
+type DescribeUploadInfoResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Accessid  string `json:"Accessid" xml:"Accessid"`
+	Policy    string `json:"Policy" xml:"Policy"`
+	Signature string `json:"Signature" xml:"Signature"`
+	Folder    string `json:"Folder" xml:"Folder"`
+	Host      string `json:"Host" xml:"Host"`
+	Expire    int    `json:"Expire" xml:"Expire"`
+}
+
+// CreateDescribeUploadInfoRequest creates a request to invoke DescribeUploadInfo API
+func CreateDescribeUploadInfoRequest() (request *DescribeUploadInfoRequest) {
+	request = &DescribeUploadInfoRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "DescribeUploadInfo", "green", "openAPI")
+	return
+}
+
+// CreateDescribeUploadInfoResponse creates a response to parse from DescribeUploadInfo response
+func CreateDescribeUploadInfoResponse() (response *DescribeUploadInfoResponse) {
+	response = &DescribeUploadInfoResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 172 - 0
services/green/extension/uploader/client_uploader.go

@@ -0,0 +1,172 @@
+package green_extension_uploader
+
+import (
+	"fmt"
+	"github.com/aliyun/alibaba-cloud-sdk-go/services/green"
+	"github.com/aliyun/aliyun-oss-go-sdk/oss"
+	"github.com/satori/go.uuid"
+	"os"
+	"bytes"
+	"time"
+	"encoding/json"
+)
+
+type uploadCredentials struct {
+	AccessKeyId string `json:"accessKeyId"`
+	AccessKeySecret string `json:"accessKeySecret"`
+	SecurityToken string `json:"securityToken"`
+	ExpiredTime int64 `json:"expiredTime"`
+	OssEndpoint string `json:"ossEndpoint"`
+	UploadBucket string `json:"uploadBucket"`
+	UploadFolder string `json:"uploadFolder"`
+}
+
+
+type ClientUploader struct {
+	GreenClient *green.Client
+	UploadCredentials *uploadCredentials
+	Headers map[string]string
+	Prefix string
+}
+
+
+
+func GetImageUploaderClient(client *green.Client)(clientUploader *ClientUploader)  {
+	clientUploader = &ClientUploader{client, nil, make(map[string]string), "images"}
+	return
+}
+
+func GetVideoUploaderClient(client *green.Client)(clientUploader *ClientUploader)  {
+	clientUploader = &ClientUploader{client, nil, make(map[string]string), "videos"}
+	return
+}
+
+func GetVoiceUploaderClient(client *green.Client)(clientUploader *ClientUploader)  {
+	clientUploader = &ClientUploader{client, nil, make(map[string]string), "voices"}
+	return
+}
+
+func GetFileUploaderClient(client *green.Client)(clientUploader *ClientUploader)  {
+	clientUploader = &ClientUploader{client, nil, make(map[string]string), "files"}
+	return
+}
+
+
+func (clientUploader *ClientUploader)UploadFile(filepath string)(*string, error)  {
+	uploadCredentials, err := clientUploader.getUploadCredentials()
+	fmt.Println(uploadCredentials.OssEndpoint)
+	if uploadCredentials == nil {
+		return nil, err
+	}
+
+	client, err := oss.New(uploadCredentials.OssEndpoint, uploadCredentials.AccessKeyId, uploadCredentials.AccessKeySecret, oss.SecurityToken(uploadCredentials.SecurityToken))
+	if err != nil {
+		fmt.Println("Error:", err)
+		return nil, err
+	}
+	// 获取存储空间。
+	bucket, err := client.Bucket(uploadCredentials.UploadBucket)
+	if err != nil {
+		fmt.Println("Error:", err)
+		return nil, err
+	}
+
+	// 读取本地文件。
+	fd, err := os.Open(filepath)
+	if err != nil {
+		fmt.Println("Error:", err)
+		return nil, err
+	}
+	defer fd.Close()
+
+	uuid := uuid.NewV4()
+	object := uploadCredentials.UploadFolder + "/" + clientUploader.Prefix + "/" + uuid.String()
+	// 上传文件流。
+	err = bucket.PutObject(object, fd)
+	if err != nil {
+		fmt.Println("Error:", err)
+		return nil, err
+	}
+
+	uploadedUrl :="oss://" + uploadCredentials.UploadBucket + "/" + object
+	return &uploadedUrl, nil
+}
+
+
+func (clientUploader *ClientUploader)UploadBytes(dataBytes []byte)(*string, error)  {
+	uploadCredentials, err := clientUploader.getUploadCredentials()
+
+	if uploadCredentials == nil {
+		return nil, err
+	}
+
+	client, err := oss.New(uploadCredentials.OssEndpoint, uploadCredentials.AccessKeyId, uploadCredentials.AccessKeySecret, oss.SecurityToken(uploadCredentials.SecurityToken))
+	if err != nil {
+		fmt.Println("Error:", err)
+		return nil, err
+	}
+	// 获取存储空间。
+	bucket, err := client.Bucket(uploadCredentials.UploadBucket)
+	if err != nil {
+		fmt.Println("Error:", err)
+		return nil, err
+	}
+
+	uuid := uuid.NewV4()
+	object := uploadCredentials.UploadFolder + "/" + clientUploader.Prefix + "/" + uuid.String()
+	// 上传文件流。
+	err = bucket.PutObject(object, bytes.NewReader(dataBytes))
+	if err != nil {
+		fmt.Println("Error:", err)
+		return nil, err
+	}
+
+	uploadedUrl :="oss://" + uploadCredentials.UploadBucket + "/" + object
+	return &uploadedUrl, nil
+}
+
+func (clientUploader *ClientUploader)getUploadCredentials()(*uploadCredentials,  error)  {
+	if clientUploader.UploadCredentials == nil || clientUploader.UploadCredentials.ExpiredTime < (time.Now().UnixNano() / 1e6) {
+		 uploadCredentials, err := clientUploader.getUploadCredentialsFromServer()
+         if err == nil {
+			 clientUploader.UploadCredentials = uploadCredentials
+		 }
+
+		 return clientUploader.UploadCredentials, err
+	}
+
+	return clientUploader.UploadCredentials, nil
+}
+
+type uploadCredentialsResponse struct {
+	Code int16 `json:"code"`
+	Data uploadCredentials `json:"data"`
+	Msg string `json:"msg"`
+	RequestId string `json:"requestId"`
+
+}
+
+
+func (clientUploader *ClientUploader)getUploadCredentialsFromServer()(*uploadCredentials, error)  {
+	uploadCredentialsRequest := green.CreateUploadCredentialsRequest();
+	dataJson, _:= json.Marshal(make(map[string]string))
+	uploadCredentialsRequest.SetContent(dataJson)
+	var uploadCredentials *uploadCredentials
+	// 发起请求并处理异常
+	response, err := clientUploader.GreenClient.UploadCredentials(uploadCredentialsRequest)
+	if err != nil {
+		// 异常处理
+		return uploadCredentials, err
+	}
+
+	uploadCredentialsResponse := uploadCredentialsResponse{}
+	err = json.Unmarshal([]byte(response.GetHttpContentString()), &uploadCredentialsResponse)
+	if err == nil {
+		uploadCredentials = &uploadCredentialsResponse.Data
+	}
+
+	return  uploadCredentials, err
+}
+
+
+

+ 21 - 0
services/green/struct_biz_types_in_describe_image_lib.go

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

+ 21 - 0
services/green/struct_biz_types_in_describe_keyword_lib.go

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

+ 23 - 0
services/green/struct_image_from_lib.go

@@ -0,0 +1,23 @@
+package green
+
+//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.
+
+// ImageFromLib is a nested struct in green response
+type ImageFromLib struct {
+	Image     string `json:"Image" xml:"Image"`
+	Thumbnail string `json:"Thumbnail" xml:"Thumbnail"`
+	Id        int    `json:"Id" xml:"Id"`
+}

+ 21 - 0
services/green/struct_image_from_lib_list.go

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

+ 30 - 0
services/green/struct_image_lib.go

@@ -0,0 +1,30 @@
+package green
+
+//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.
+
+// ImageLib is a nested struct in green response
+type ImageLib struct {
+	ImageCount    int      `json:"ImageCount" xml:"ImageCount"`
+	ModifiedTime  string   `json:"ModifiedTime" xml:"ModifiedTime"`
+	Code          string   `json:"Code" xml:"Code"`
+	Name          string   `json:"Name" xml:"Name"`
+	Id            int      `json:"Id" xml:"Id"`
+	Source        string   `json:"Source" xml:"Source"`
+	Category      string   `json:"Category" xml:"Category"`
+	ServiceModule string   `json:"ServiceModule" xml:"ServiceModule"`
+	Scene         string   `json:"Scene" xml:"Scene"`
+	BizTypes      []string `json:"BizTypes" xml:"BizTypes"`
+}

+ 21 - 0
services/green/struct_image_lib_list.go

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

+ 21 - 0
services/green/struct_invalid_keyword_list.go

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

+ 24 - 0
services/green/struct_keyword.go

@@ -0,0 +1,24 @@
+package green
+
+//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.
+
+// Keyword is a nested struct in green response
+type Keyword struct {
+	Id         int    `json:"Id" xml:"Id"`
+	CreateTime string `json:"CreateTime" xml:"CreateTime"`
+	Keyword    string `json:"Keyword" xml:"Keyword"`
+	HitCount   int    `json:"HitCount" xml:"HitCount"`
+}

+ 31 - 0
services/green/struct_keyword_lib.go

@@ -0,0 +1,31 @@
+package green
+
+//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.
+
+// KeywordLib is a nested struct in green response
+type KeywordLib struct {
+	Id            int      `json:"Id" xml:"Id"`
+	ModifiedTime  string   `json:"ModifiedTime" xml:"ModifiedTime"`
+	Name          string   `json:"Name" xml:"Name"`
+	Code          string   `json:"Code" xml:"Code"`
+	Count         int      `json:"Count" xml:"Count"`
+	Category      string   `json:"Category" xml:"Category"`
+	ResourceType  string   `json:"ResourceType" xml:"ResourceType"`
+	LibType       string   `json:"LibType" xml:"LibType"`
+	Source        string   `json:"Source" xml:"Source"`
+	ServiceModule string   `json:"ServiceModule" xml:"ServiceModule"`
+	BizTypes      []string `json:"BizTypes" xml:"BizTypes"`
+}

+ 21 - 0
services/green/struct_keyword_lib_list.go

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

+ 21 - 0
services/green/struct_keyword_list.go

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

+ 21 - 0
services/green/struct_resouce_type_list.go

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

+ 21 - 0
services/green/struct_scene_list.go

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

+ 108 - 0
services/green/update_image_lib.go

@@ -0,0 +1,108 @@
+package green
+
+//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"
+)
+
+// UpdateImageLib invokes the green.UpdateImageLib API synchronously
+// api document: https://help.aliyun.com/api/green/updateimagelib.html
+func (client *Client) UpdateImageLib(request *UpdateImageLibRequest) (response *UpdateImageLibResponse, err error) {
+	response = CreateUpdateImageLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateImageLibWithChan invokes the green.UpdateImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/updateimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateImageLibWithChan(request *UpdateImageLibRequest) (<-chan *UpdateImageLibResponse, <-chan error) {
+	responseChan := make(chan *UpdateImageLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateImageLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateImageLibWithCallback invokes the green.UpdateImageLib API asynchronously
+// api document: https://help.aliyun.com/api/green/updateimagelib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateImageLibWithCallback(request *UpdateImageLibRequest, callback func(response *UpdateImageLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateImageLibResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateImageLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateImageLibRequest is the request struct for api UpdateImageLib
+type UpdateImageLibRequest struct {
+	*requests.RpcRequest
+	SourceIp string           `position:"Query" name:"SourceIp"`
+	Name     string           `position:"Query" name:"Name"`
+	BizTypes string           `position:"Query" name:"BizTypes"`
+	Id       requests.Integer `position:"Query" name:"Id"`
+	Category string           `position:"Query" name:"Category"`
+	Scene    string           `position:"Query" name:"Scene"`
+}
+
+// UpdateImageLibResponse is the response struct for api UpdateImageLib
+type UpdateImageLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUpdateImageLibRequest creates a request to invoke UpdateImageLib API
+func CreateUpdateImageLibRequest() (request *UpdateImageLibRequest) {
+	request = &UpdateImageLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "UpdateImageLib", "green", "openAPI")
+	return
+}
+
+// CreateUpdateImageLibResponse creates a response to parse from UpdateImageLib response
+func CreateUpdateImageLibResponse() (response *UpdateImageLibResponse) {
+	response = &UpdateImageLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/green/update_keyword_lib.go

@@ -0,0 +1,107 @@
+package green
+
+//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"
+)
+
+// UpdateKeywordLib invokes the green.UpdateKeywordLib API synchronously
+// api document: https://help.aliyun.com/api/green/updatekeywordlib.html
+func (client *Client) UpdateKeywordLib(request *UpdateKeywordLibRequest) (response *UpdateKeywordLibResponse, err error) {
+	response = CreateUpdateKeywordLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpdateKeywordLibWithChan invokes the green.UpdateKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/updatekeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateKeywordLibWithChan(request *UpdateKeywordLibRequest) (<-chan *UpdateKeywordLibResponse, <-chan error) {
+	responseChan := make(chan *UpdateKeywordLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpdateKeywordLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpdateKeywordLibWithCallback invokes the green.UpdateKeywordLib API asynchronously
+// api document: https://help.aliyun.com/api/green/updatekeywordlib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpdateKeywordLibWithCallback(request *UpdateKeywordLibRequest, callback func(response *UpdateKeywordLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpdateKeywordLibResponse
+		var err error
+		defer close(result)
+		response, err = client.UpdateKeywordLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpdateKeywordLibRequest is the request struct for api UpdateKeywordLib
+type UpdateKeywordLibRequest struct {
+	*requests.RpcRequest
+	SourceIp string           `position:"Query" name:"SourceIp"`
+	Name     string           `position:"Query" name:"Name"`
+	BizTypes string           `position:"Query" name:"BizTypes"`
+	Id       requests.Integer `position:"Query" name:"Id"`
+	Lang     string           `position:"Query" name:"Lang"`
+}
+
+// UpdateKeywordLibResponse is the response struct for api UpdateKeywordLib
+type UpdateKeywordLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUpdateKeywordLibRequest creates a request to invoke UpdateKeywordLib API
+func CreateUpdateKeywordLibRequest() (request *UpdateKeywordLibRequest) {
+	request = &UpdateKeywordLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "UpdateKeywordLib", "green", "openAPI")
+	return
+}
+
+// CreateUpdateKeywordLibResponse creates a response to parse from UpdateKeywordLib response
+func CreateUpdateKeywordLibResponse() (response *UpdateKeywordLibResponse) {
+	response = &UpdateKeywordLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/green/upload_image_to_lib.go

@@ -0,0 +1,105 @@
+package green
+
+//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"
+)
+
+// UploadImageToLib invokes the green.UploadImageToLib API synchronously
+// api document: https://help.aliyun.com/api/green/uploadimagetolib.html
+func (client *Client) UploadImageToLib(request *UploadImageToLibRequest) (response *UploadImageToLibResponse, err error) {
+	response = CreateUploadImageToLibResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UploadImageToLibWithChan invokes the green.UploadImageToLib API asynchronously
+// api document: https://help.aliyun.com/api/green/uploadimagetolib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UploadImageToLibWithChan(request *UploadImageToLibRequest) (<-chan *UploadImageToLibResponse, <-chan error) {
+	responseChan := make(chan *UploadImageToLibResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UploadImageToLib(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UploadImageToLibWithCallback invokes the green.UploadImageToLib API asynchronously
+// api document: https://help.aliyun.com/api/green/uploadimagetolib.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UploadImageToLibWithCallback(request *UploadImageToLibRequest, callback func(response *UploadImageToLibResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UploadImageToLibResponse
+		var err error
+		defer close(result)
+		response, err = client.UploadImageToLib(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UploadImageToLibRequest is the request struct for api UploadImageToLib
+type UploadImageToLibRequest struct {
+	*requests.RpcRequest
+	Images     string           `position:"Query" name:"Images"`
+	SourceIp   string           `position:"Query" name:"SourceIp"`
+	ImageLibId requests.Integer `position:"Query" name:"ImageLibId"`
+}
+
+// UploadImageToLibResponse is the response struct for api UploadImageToLib
+type UploadImageToLibResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateUploadImageToLibRequest creates a request to invoke UploadImageToLib API
+func CreateUploadImageToLibRequest() (request *UploadImageToLibRequest) {
+	request = &UploadImageToLibRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Green", "2017-08-23", "UploadImageToLib", "green", "openAPI")
+	return
+}
+
+// CreateUploadImageToLibResponse creates a response to parse from UploadImageToLib response
+func CreateUploadImageToLibResponse() (response *UploadImageToLibResponse) {
+	response = &UploadImageToLibResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}