Explorar o código

SMARTAG SDK Auto Released By jijun.jj,Version:1.43.13

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
yixiong.jxy %!s(int64=7) %!d(string=hai) anos
pai
achega
f0e74279f8

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2018-12-12 Version: 1.43.13
+1, Fix a bug.
+
 2018-12-12 Version: 1.43.12
 1, Sync CDN API.
 

+ 112 - 0
services/smartag/create_sag_link_level_ha.go

@@ -0,0 +1,112 @@
+package smartag
+
+//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"
+)
+
+// CreateSAGLinkLevelHa invokes the smartag.CreateSAGLinkLevelHa API synchronously
+// api document: https://help.aliyun.com/api/smartag/createsaglinklevelha.html
+func (client *Client) CreateSAGLinkLevelHa(request *CreateSAGLinkLevelHaRequest) (response *CreateSAGLinkLevelHaResponse, err error) {
+	response = CreateCreateSAGLinkLevelHaResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// CreateSAGLinkLevelHaWithChan invokes the smartag.CreateSAGLinkLevelHa API asynchronously
+// api document: https://help.aliyun.com/api/smartag/createsaglinklevelha.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateSAGLinkLevelHaWithChan(request *CreateSAGLinkLevelHaRequest) (<-chan *CreateSAGLinkLevelHaResponse, <-chan error) {
+	responseChan := make(chan *CreateSAGLinkLevelHaResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.CreateSAGLinkLevelHa(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// CreateSAGLinkLevelHaWithCallback invokes the smartag.CreateSAGLinkLevelHa API asynchronously
+// api document: https://help.aliyun.com/api/smartag/createsaglinklevelha.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) CreateSAGLinkLevelHaWithCallback(request *CreateSAGLinkLevelHaRequest, callback func(response *CreateSAGLinkLevelHaResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *CreateSAGLinkLevelHaResponse
+		var err error
+		defer close(result)
+		response, err = client.CreateSAGLinkLevelHa(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// CreateSAGLinkLevelHaRequest is the request struct for api CreateSAGLinkLevelHa
+type CreateSAGLinkLevelHaRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	BackupLinkId         string           `position:"Query" name:"BackupLinkId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	HaType               string           `position:"Query" name:"HaType"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	MainLinkRegionId     string           `position:"Query" name:"MainLinkRegionId"`
+	SmartAGId            string           `position:"Query" name:"SmartAGId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	MainLinkId           string           `position:"Query" name:"MainLinkId"`
+	BackupLinkRegionId   string           `position:"Query" name:"BackupLinkRegionId"`
+}
+
+// CreateSAGLinkLevelHaResponse is the response struct for api CreateSAGLinkLevelHa
+type CreateSAGLinkLevelHaResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateCreateSAGLinkLevelHaRequest creates a request to invoke CreateSAGLinkLevelHa API
+func CreateCreateSAGLinkLevelHaRequest() (request *CreateSAGLinkLevelHaRequest) {
+	request = &CreateSAGLinkLevelHaRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "CreateSAGLinkLevelHa", "smartag", "openAPI")
+	return
+}
+
+// CreateCreateSAGLinkLevelHaResponse creates a response to parse from CreateSAGLinkLevelHa response
+func CreateCreateSAGLinkLevelHaResponse() (response *CreateSAGLinkLevelHaResponse) {
+	response = &CreateSAGLinkLevelHaResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 107 - 0
services/smartag/delete_sag_link_level_ha.go

@@ -0,0 +1,107 @@
+package smartag
+
+//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"
+)
+
+// DeleteSAGLinkLevelHa invokes the smartag.DeleteSAGLinkLevelHa API synchronously
+// api document: https://help.aliyun.com/api/smartag/deletesaglinklevelha.html
+func (client *Client) DeleteSAGLinkLevelHa(request *DeleteSAGLinkLevelHaRequest) (response *DeleteSAGLinkLevelHaResponse, err error) {
+	response = CreateDeleteSAGLinkLevelHaResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DeleteSAGLinkLevelHaWithChan invokes the smartag.DeleteSAGLinkLevelHa API asynchronously
+// api document: https://help.aliyun.com/api/smartag/deletesaglinklevelha.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSAGLinkLevelHaWithChan(request *DeleteSAGLinkLevelHaRequest) (<-chan *DeleteSAGLinkLevelHaResponse, <-chan error) {
+	responseChan := make(chan *DeleteSAGLinkLevelHaResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DeleteSAGLinkLevelHa(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DeleteSAGLinkLevelHaWithCallback invokes the smartag.DeleteSAGLinkLevelHa API asynchronously
+// api document: https://help.aliyun.com/api/smartag/deletesaglinklevelha.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DeleteSAGLinkLevelHaWithCallback(request *DeleteSAGLinkLevelHaRequest, callback func(response *DeleteSAGLinkLevelHaResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DeleteSAGLinkLevelHaResponse
+		var err error
+		defer close(result)
+		response, err = client.DeleteSAGLinkLevelHa(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DeleteSAGLinkLevelHaRequest is the request struct for api DeleteSAGLinkLevelHa
+type DeleteSAGLinkLevelHaRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	SmartAGId            string           `position:"Query" name:"SmartAGId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DeleteSAGLinkLevelHaResponse is the response struct for api DeleteSAGLinkLevelHa
+type DeleteSAGLinkLevelHaResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateDeleteSAGLinkLevelHaRequest creates a request to invoke DeleteSAGLinkLevelHa API
+func CreateDeleteSAGLinkLevelHaRequest() (request *DeleteSAGLinkLevelHaRequest) {
+	request = &DeleteSAGLinkLevelHaRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "DeleteSAGLinkLevelHa", "smartag", "openAPI")
+	return
+}
+
+// CreateDeleteSAGLinkLevelHaResponse creates a response to parse from DeleteSAGLinkLevelHa response
+func CreateDeleteSAGLinkLevelHaResponse() (response *DeleteSAGLinkLevelHaResponse) {
+	response = &DeleteSAGLinkLevelHaResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 113 - 0
services/smartag/describe_grant_rules.go

@@ -0,0 +1,113 @@
+package smartag
+
+//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"
+)
+
+// DescribeGrantRules invokes the smartag.DescribeGrantRules API synchronously
+// api document: https://help.aliyun.com/api/smartag/describegrantrules.html
+func (client *Client) DescribeGrantRules(request *DescribeGrantRulesRequest) (response *DescribeGrantRulesResponse, err error) {
+	response = CreateDescribeGrantRulesResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DescribeGrantRulesWithChan invokes the smartag.DescribeGrantRules API asynchronously
+// api document: https://help.aliyun.com/api/smartag/describegrantrules.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeGrantRulesWithChan(request *DescribeGrantRulesRequest) (<-chan *DescribeGrantRulesResponse, <-chan error) {
+	responseChan := make(chan *DescribeGrantRulesResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DescribeGrantRules(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DescribeGrantRulesWithCallback invokes the smartag.DescribeGrantRules API asynchronously
+// api document: https://help.aliyun.com/api/smartag/describegrantrules.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DescribeGrantRulesWithCallback(request *DescribeGrantRulesRequest, callback func(response *DescribeGrantRulesResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DescribeGrantRulesResponse
+		var err error
+		defer close(result)
+		response, err = client.DescribeGrantRules(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DescribeGrantRulesRequest is the request struct for api DescribeGrantRules
+type DescribeGrantRulesRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	PageSize             string           `position:"Query" name:"PageSize"`
+	AssociatedCcnId      string           `position:"Query" name:"AssociatedCcnId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+	PageNumber           string           `position:"Query" name:"PageNumber"`
+}
+
+// DescribeGrantRulesResponse is the response struct for api DescribeGrantRules
+type DescribeGrantRulesResponse struct {
+	*responses.BaseResponse
+	RequestId  string     `json:"RequestId" xml:"RequestId"`
+	TotalCount int        `json:"TotalCount" xml:"TotalCount"`
+	PageNumber int        `json:"PageNumber" xml:"PageNumber"`
+	PageSize   int        `json:"PageSize" xml:"PageSize"`
+	GrantRules GrantRules `json:"GrantRules" xml:"GrantRules"`
+}
+
+// CreateDescribeGrantRulesRequest creates a request to invoke DescribeGrantRules API
+func CreateDescribeGrantRulesRequest() (request *DescribeGrantRulesRequest) {
+	request = &DescribeGrantRulesRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "DescribeGrantRules", "smartag", "openAPI")
+	return
+}
+
+// CreateDescribeGrantRulesResponse creates a response to parse from DescribeGrantRules response
+func CreateDescribeGrantRulesResponse() (response *DescribeGrantRulesResponse) {
+	response = &DescribeGrantRulesResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 2 - 0
services/smartag/describe_smart_access_gateway_ha.go

@@ -96,6 +96,8 @@ type DescribeSmartAccessGatewayHaResponse struct {
 	MainLinkId             string `json:"MainLinkId" xml:"MainLinkId"`
 	BackupLinkId           string `json:"BackupLinkId" xml:"BackupLinkId"`
 	SmartAGId              string `json:"SmartAGId" xml:"SmartAGId"`
+	MainLinkState          string `json:"MainLinkState" xml:"MainLinkState"`
+	BackupLinkState        string `json:"BackupLinkState" xml:"BackupLinkState"`
 }
 
 // CreateDescribeSmartAccessGatewayHaRequest creates a request to invoke DescribeSmartAccessGatewayHa API

+ 1 - 0
services/smartag/describe_smart_access_gateway_versions.go

@@ -79,6 +79,7 @@ type DescribeSmartAccessGatewayVersionsRequest struct {
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	SmartAGId            string           `position:"Query" name:"SmartAGId"`
 	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
 }
 

+ 4 - 3
services/smartag/describe_smart_access_gateways.go

@@ -77,14 +77,15 @@ func (client *Client) DescribeSmartAccessGatewaysWithCallback(request *DescribeS
 type DescribeSmartAccessGatewaysRequest struct {
 	*requests.RpcRequest
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	SerialNumber         string           `position:"Query" name:"SerialNumber"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
-	Name                 string           `position:"Query" name:"Name"`
-	PageSize             string           `position:"Query" name:"PageSize"`
 	AssociatedCcnId      string           `position:"Query" name:"AssociatedCcnId"`
-	SmartAGId            string           `position:"Query" name:"SmartAGId"`
 	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
 	PageNumber           string           `position:"Query" name:"PageNumber"`
+	Name                 string           `position:"Query" name:"Name"`
+	PageSize             string           `position:"Query" name:"PageSize"`
+	SmartAGId            string           `position:"Query" name:"SmartAGId"`
 	Status               string           `position:"Query" name:"Status"`
 }
 

+ 110 - 0
services/smartag/downgrade_smart_access_gateway.go

@@ -0,0 +1,110 @@
+package smartag
+
+//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"
+)
+
+// DowngradeSmartAccessGateway invokes the smartag.DowngradeSmartAccessGateway API synchronously
+// api document: https://help.aliyun.com/api/smartag/downgradesmartaccessgateway.html
+func (client *Client) DowngradeSmartAccessGateway(request *DowngradeSmartAccessGatewayRequest) (response *DowngradeSmartAccessGatewayResponse, err error) {
+	response = CreateDowngradeSmartAccessGatewayResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// DowngradeSmartAccessGatewayWithChan invokes the smartag.DowngradeSmartAccessGateway API asynchronously
+// api document: https://help.aliyun.com/api/smartag/downgradesmartaccessgateway.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DowngradeSmartAccessGatewayWithChan(request *DowngradeSmartAccessGatewayRequest) (<-chan *DowngradeSmartAccessGatewayResponse, <-chan error) {
+	responseChan := make(chan *DowngradeSmartAccessGatewayResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.DowngradeSmartAccessGateway(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// DowngradeSmartAccessGatewayWithCallback invokes the smartag.DowngradeSmartAccessGateway API asynchronously
+// api document: https://help.aliyun.com/api/smartag/downgradesmartaccessgateway.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) DowngradeSmartAccessGatewayWithCallback(request *DowngradeSmartAccessGatewayRequest, callback func(response *DowngradeSmartAccessGatewayResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *DowngradeSmartAccessGatewayResponse
+		var err error
+		defer close(result)
+		response, err = client.DowngradeSmartAccessGateway(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// DowngradeSmartAccessGatewayRequest is the request struct for api DowngradeSmartAccessGateway
+type DowngradeSmartAccessGatewayRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	AutoPay              requests.Boolean `position:"Query" name:"AutoPay"`
+	BandWidthSpec        requests.Integer `position:"Query" name:"BandWidthSpec"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	SmartAGId            string           `position:"Query" name:"SmartAGId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// DowngradeSmartAccessGatewayResponse is the response struct for api DowngradeSmartAccessGateway
+type DowngradeSmartAccessGatewayResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	OrderId   string `json:"OrderId" xml:"OrderId"`
+}
+
+// CreateDowngradeSmartAccessGatewayRequest creates a request to invoke DowngradeSmartAccessGateway API
+func CreateDowngradeSmartAccessGatewayRequest() (request *DowngradeSmartAccessGatewayRequest) {
+	request = &DowngradeSmartAccessGatewayRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "DowngradeSmartAccessGateway", "smartag", "openAPI")
+	return
+}
+
+// CreateDowngradeSmartAccessGatewayResponse creates a response to parse from DowngradeSmartAccessGateway response
+func CreateDowngradeSmartAccessGatewayResponse() (response *DowngradeSmartAccessGatewayResponse) {
+	response = &DowngradeSmartAccessGatewayResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 109 - 0
services/smartag/grant_instance_to_cbn.go

@@ -0,0 +1,109 @@
+package smartag
+
+//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"
+)
+
+// GrantInstanceToCbn invokes the smartag.GrantInstanceToCbn API synchronously
+// api document: https://help.aliyun.com/api/smartag/grantinstancetocbn.html
+func (client *Client) GrantInstanceToCbn(request *GrantInstanceToCbnRequest) (response *GrantInstanceToCbnResponse, err error) {
+	response = CreateGrantInstanceToCbnResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// GrantInstanceToCbnWithChan invokes the smartag.GrantInstanceToCbn API asynchronously
+// api document: https://help.aliyun.com/api/smartag/grantinstancetocbn.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GrantInstanceToCbnWithChan(request *GrantInstanceToCbnRequest) (<-chan *GrantInstanceToCbnResponse, <-chan error) {
+	responseChan := make(chan *GrantInstanceToCbnResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.GrantInstanceToCbn(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// GrantInstanceToCbnWithCallback invokes the smartag.GrantInstanceToCbn API asynchronously
+// api document: https://help.aliyun.com/api/smartag/grantinstancetocbn.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) GrantInstanceToCbnWithCallback(request *GrantInstanceToCbnRequest, callback func(response *GrantInstanceToCbnResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *GrantInstanceToCbnResponse
+		var err error
+		defer close(result)
+		response, err = client.GrantInstanceToCbn(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// GrantInstanceToCbnRequest is the request struct for api GrantInstanceToCbn
+type GrantInstanceToCbnRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	CenUid               string           `position:"Query" name:"CenUid"`
+	CenInstanceId        string           `position:"Query" name:"CenInstanceId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	CcnInstanceId        string           `position:"Query" name:"CcnInstanceId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// GrantInstanceToCbnResponse is the response struct for api GrantInstanceToCbn
+type GrantInstanceToCbnResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateGrantInstanceToCbnRequest creates a request to invoke GrantInstanceToCbn API
+func CreateGrantInstanceToCbnRequest() (request *GrantInstanceToCbnRequest) {
+	request = &GrantInstanceToCbnRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "GrantInstanceToCbn", "smartag", "openAPI")
+	return
+}
+
+// CreateGrantInstanceToCbnResponse creates a response to parse from GrantInstanceToCbn response
+func CreateGrantInstanceToCbnResponse() (response *GrantInstanceToCbnResponse) {
+	response = &GrantInstanceToCbnResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 108 - 0
services/smartag/revoke_instance_from_cbn.go

@@ -0,0 +1,108 @@
+package smartag
+
+//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"
+)
+
+// RevokeInstanceFromCbn invokes the smartag.RevokeInstanceFromCbn API synchronously
+// api document: https://help.aliyun.com/api/smartag/revokeinstancefromcbn.html
+func (client *Client) RevokeInstanceFromCbn(request *RevokeInstanceFromCbnRequest) (response *RevokeInstanceFromCbnResponse, err error) {
+	response = CreateRevokeInstanceFromCbnResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// RevokeInstanceFromCbnWithChan invokes the smartag.RevokeInstanceFromCbn API asynchronously
+// api document: https://help.aliyun.com/api/smartag/revokeinstancefromcbn.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RevokeInstanceFromCbnWithChan(request *RevokeInstanceFromCbnRequest) (<-chan *RevokeInstanceFromCbnResponse, <-chan error) {
+	responseChan := make(chan *RevokeInstanceFromCbnResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.RevokeInstanceFromCbn(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// RevokeInstanceFromCbnWithCallback invokes the smartag.RevokeInstanceFromCbn API asynchronously
+// api document: https://help.aliyun.com/api/smartag/revokeinstancefromcbn.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) RevokeInstanceFromCbnWithCallback(request *RevokeInstanceFromCbnRequest, callback func(response *RevokeInstanceFromCbnResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *RevokeInstanceFromCbnResponse
+		var err error
+		defer close(result)
+		response, err = client.RevokeInstanceFromCbn(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// RevokeInstanceFromCbnRequest is the request struct for api RevokeInstanceFromCbn
+type RevokeInstanceFromCbnRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	CenInstanceId        string           `position:"Query" name:"CenInstanceId"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	CcnInstanceId        string           `position:"Query" name:"CcnInstanceId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// RevokeInstanceFromCbnResponse is the response struct for api RevokeInstanceFromCbn
+type RevokeInstanceFromCbnResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateRevokeInstanceFromCbnRequest creates a request to invoke RevokeInstanceFromCbn API
+func CreateRevokeInstanceFromCbnRequest() (request *RevokeInstanceFromCbnRequest) {
+	request = &RevokeInstanceFromCbnRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "RevokeInstanceFromCbn", "smartag", "openAPI")
+	return
+}
+
+// CreateRevokeInstanceFromCbnResponse creates a response to parse from RevokeInstanceFromCbn response
+func CreateRevokeInstanceFromCbnResponse() (response *RevokeInstanceFromCbnResponse) {
+	response = &RevokeInstanceFromCbnResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 28 - 0
services/smartag/struct_grant_rule.go

@@ -0,0 +1,28 @@
+package smartag
+
+//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.
+
+// GrantRule is a nested struct in smartag response
+type GrantRule struct {
+	GrantRuleId   string `json:"GrantRuleId" xml:"GrantRuleId"`
+	CenUid        int    `json:"CenUid" xml:"CenUid"`
+	CcnId         int    `json:"CcnId" xml:"CcnId"`
+	CenInstanceId string `json:"CenInstanceId" xml:"CenInstanceId"`
+	CcnInstanceId string `json:"CcnInstanceId" xml:"CcnInstanceId"`
+	GmtCreate     int    `json:"GmtCreate" xml:"GmtCreate"`
+	GmtModified   int    `json:"GmtModified" xml:"GmtModified"`
+	RegionId      string `json:"RegionId" xml:"RegionId"`
+}

+ 21 - 0
services/smartag/struct_grant_rules.go

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

+ 108 - 0
services/smartag/switch_sag_ha_state.go

@@ -0,0 +1,108 @@
+package smartag
+
+//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"
+)
+
+// SwitchSAGHaState invokes the smartag.SwitchSAGHaState API synchronously
+// api document: https://help.aliyun.com/api/smartag/switchsaghastate.html
+func (client *Client) SwitchSAGHaState(request *SwitchSAGHaStateRequest) (response *SwitchSAGHaStateResponse, err error) {
+	response = CreateSwitchSAGHaStateResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SwitchSAGHaStateWithChan invokes the smartag.SwitchSAGHaState API asynchronously
+// api document: https://help.aliyun.com/api/smartag/switchsaghastate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SwitchSAGHaStateWithChan(request *SwitchSAGHaStateRequest) (<-chan *SwitchSAGHaStateResponse, <-chan error) {
+	responseChan := make(chan *SwitchSAGHaStateResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SwitchSAGHaState(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SwitchSAGHaStateWithCallback invokes the smartag.SwitchSAGHaState API asynchronously
+// api document: https://help.aliyun.com/api/smartag/switchsaghastate.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SwitchSAGHaStateWithCallback(request *SwitchSAGHaStateRequest, callback func(response *SwitchSAGHaStateResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SwitchSAGHaStateResponse
+		var err error
+		defer close(result)
+		response, err = client.SwitchSAGHaState(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SwitchSAGHaStateRequest is the request struct for api SwitchSAGHaState
+type SwitchSAGHaStateRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	HaType               string           `position:"Query" name:"HaType"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	SmartAGId            string           `position:"Query" name:"SmartAGId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// SwitchSAGHaStateResponse is the response struct for api SwitchSAGHaState
+type SwitchSAGHaStateResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+}
+
+// CreateSwitchSAGHaStateRequest creates a request to invoke SwitchSAGHaState API
+func CreateSwitchSAGHaStateRequest() (request *SwitchSAGHaStateRequest) {
+	request = &SwitchSAGHaStateRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "SwitchSAGHaState", "smartag", "openAPI")
+	return
+}
+
+// CreateSwitchSAGHaStateResponse creates a response to parse from SwitchSAGHaState response
+func CreateSwitchSAGHaStateResponse() (response *SwitchSAGHaStateResponse) {
+	response = &SwitchSAGHaStateResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 127 - 0
services/smartag/unicom_order_confirm.go

@@ -0,0 +1,127 @@
+package smartag
+
+//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"
+)
+
+// UnicomOrderConfirm invokes the smartag.UnicomOrderConfirm API synchronously
+// api document: https://help.aliyun.com/api/smartag/unicomorderconfirm.html
+func (client *Client) UnicomOrderConfirm(request *UnicomOrderConfirmRequest) (response *UnicomOrderConfirmResponse, err error) {
+	response = CreateUnicomOrderConfirmResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UnicomOrderConfirmWithChan invokes the smartag.UnicomOrderConfirm API asynchronously
+// api document: https://help.aliyun.com/api/smartag/unicomorderconfirm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnicomOrderConfirmWithChan(request *UnicomOrderConfirmRequest) (<-chan *UnicomOrderConfirmResponse, <-chan error) {
+	responseChan := make(chan *UnicomOrderConfirmResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UnicomOrderConfirm(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UnicomOrderConfirmWithCallback invokes the smartag.UnicomOrderConfirm API asynchronously
+// api document: https://help.aliyun.com/api/smartag/unicomorderconfirm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnicomOrderConfirmWithCallback(request *UnicomOrderConfirmRequest, callback func(response *UnicomOrderConfirmResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UnicomOrderConfirmResponse
+		var err error
+		defer close(result)
+		response, err = client.UnicomOrderConfirm(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UnicomOrderConfirmRequest is the request struct for api UnicomOrderConfirm
+type UnicomOrderConfirmRequest struct {
+	*requests.RpcRequest
+	TmsCode              string                         `position:"Query" name:"TmsCode"`
+	ResourceOwnerId      requests.Integer               `position:"Query" name:"ResourceOwnerId"`
+	OrderItem            *[]UnicomOrderConfirmOrderItem `position:"Query" name:"OrderItem"  type:"Repeated"`
+	OwnerUserId          string                         `position:"Query" name:"OwnerUserId"`
+	ResourceOwnerAccount string                         `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string                         `position:"Query" name:"OwnerAccount"`
+	OrderPostFee         requests.Integer               `position:"Query" name:"OrderPostFee"`
+	OwnerId              requests.Integer               `position:"Query" name:"OwnerId"`
+	TmsOrderCode         string                         `position:"Query" name:"TmsOrderCode"`
+	TradeId              string                         `position:"Query" name:"TradeId"`
+}
+
+// UnicomOrderConfirmOrderItem is a repeated param struct in UnicomOrderConfirmRequest
+type UnicomOrderConfirmOrderItem struct {
+	ScItemName   string    `name:"ScItemName"`
+	ItemAmount   string    `name:"ItemAmount"`
+	SnList       *[]string `name:"SnList" type:"Repeated"`
+	OrderItemId  string    `name:"OrderItemId"`
+	ScItemCode   string    `name:"ScItemCode"`
+	ItemQuantity string    `name:"ItemQuantity"`
+	TradeId      string    `name:"TradeId"`
+	TradeItemId  string    `name:"TradeItemId"`
+}
+
+// UnicomOrderConfirmResponse is the response struct for api UnicomOrderConfirm
+type UnicomOrderConfirmResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Success   bool   `json:"Success" xml:"Success"`
+}
+
+// CreateUnicomOrderConfirmRequest creates a request to invoke UnicomOrderConfirm API
+func CreateUnicomOrderConfirmRequest() (request *UnicomOrderConfirmRequest) {
+	request = &UnicomOrderConfirmRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "UnicomOrderConfirm", "smartag", "openAPI")
+	return
+}
+
+// CreateUnicomOrderConfirmResponse creates a response to parse from UnicomOrderConfirm response
+func CreateUnicomOrderConfirmResponse() (response *UnicomOrderConfirmResponse) {
+	response = &UnicomOrderConfirmResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 118 - 0
services/smartag/unicom_sign_confirm.go

@@ -0,0 +1,118 @@
+package smartag
+
+//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"
+)
+
+// UnicomSignConfirm invokes the smartag.UnicomSignConfirm API synchronously
+// api document: https://help.aliyun.com/api/smartag/unicomsignconfirm.html
+func (client *Client) UnicomSignConfirm(request *UnicomSignConfirmRequest) (response *UnicomSignConfirmResponse, err error) {
+	response = CreateUnicomSignConfirmResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UnicomSignConfirmWithChan invokes the smartag.UnicomSignConfirm API asynchronously
+// api document: https://help.aliyun.com/api/smartag/unicomsignconfirm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnicomSignConfirmWithChan(request *UnicomSignConfirmRequest) (<-chan *UnicomSignConfirmResponse, <-chan error) {
+	responseChan := make(chan *UnicomSignConfirmResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UnicomSignConfirm(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UnicomSignConfirmWithCallback invokes the smartag.UnicomSignConfirm API asynchronously
+// api document: https://help.aliyun.com/api/smartag/unicomsignconfirm.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UnicomSignConfirmWithCallback(request *UnicomSignConfirmRequest, callback func(response *UnicomSignConfirmResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UnicomSignConfirmResponse
+		var err error
+		defer close(result)
+		response, err = client.UnicomSignConfirm(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UnicomSignConfirmRequest is the request struct for api UnicomSignConfirm
+type UnicomSignConfirmRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer             `position:"Query" name:"ResourceOwnerId"`
+	ResourceOwnerAccount string                       `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string                       `position:"Query" name:"OwnerAccount"`
+	TmsOrder             *[]UnicomSignConfirmTmsOrder `position:"Query" name:"TmsOrder"  type:"Repeated"`
+	OwnerId              requests.Integer             `position:"Query" name:"OwnerId"`
+}
+
+// UnicomSignConfirmTmsOrder is a repeated param struct in UnicomSignConfirmRequest
+type UnicomSignConfirmTmsOrder struct {
+	TmsCode      string `name:"TmsCode"`
+	SigningTime  string `name:"SigningTime"`
+	TmsOrderCode string `name:"TmsOrderCode"`
+	TradeId      string `name:"TradeId"`
+}
+
+// UnicomSignConfirmResponse is the response struct for api UnicomSignConfirm
+type UnicomSignConfirmResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	Code      string `json:"Code" xml:"Code"`
+	Message   string `json:"Message" xml:"Message"`
+	Success   bool   `json:"Success" xml:"Success"`
+}
+
+// CreateUnicomSignConfirmRequest creates a request to invoke UnicomSignConfirm API
+func CreateUnicomSignConfirmRequest() (request *UnicomSignConfirmRequest) {
+	request = &UnicomSignConfirmRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "UnicomSignConfirm", "smartag", "openAPI")
+	return
+}
+
+// CreateUnicomSignConfirmResponse creates a response to parse from UnicomSignConfirm response
+func CreateUnicomSignConfirmResponse() (response *UnicomSignConfirmResponse) {
+	response = &UnicomSignConfirmResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 1 - 0
services/smartag/update_smart_access_gateway_version.go

@@ -77,6 +77,7 @@ func (client *Client) UpdateSmartAccessGatewayVersionWithCallback(request *Updat
 type UpdateSmartAccessGatewayVersionRequest struct {
 	*requests.RpcRequest
 	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	SerialNumber         string           `position:"Query" name:"SerialNumber"`
 	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
 	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
 	SmartAGId            string           `position:"Query" name:"SmartAGId"`

+ 110 - 0
services/smartag/upgrade_smart_access_gateway.go

@@ -0,0 +1,110 @@
+package smartag
+
+//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"
+)
+
+// UpgradeSmartAccessGateway invokes the smartag.UpgradeSmartAccessGateway API synchronously
+// api document: https://help.aliyun.com/api/smartag/upgradesmartaccessgateway.html
+func (client *Client) UpgradeSmartAccessGateway(request *UpgradeSmartAccessGatewayRequest) (response *UpgradeSmartAccessGatewayResponse, err error) {
+	response = CreateUpgradeSmartAccessGatewayResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// UpgradeSmartAccessGatewayWithChan invokes the smartag.UpgradeSmartAccessGateway API asynchronously
+// api document: https://help.aliyun.com/api/smartag/upgradesmartaccessgateway.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpgradeSmartAccessGatewayWithChan(request *UpgradeSmartAccessGatewayRequest) (<-chan *UpgradeSmartAccessGatewayResponse, <-chan error) {
+	responseChan := make(chan *UpgradeSmartAccessGatewayResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.UpgradeSmartAccessGateway(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// UpgradeSmartAccessGatewayWithCallback invokes the smartag.UpgradeSmartAccessGateway API asynchronously
+// api document: https://help.aliyun.com/api/smartag/upgradesmartaccessgateway.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) UpgradeSmartAccessGatewayWithCallback(request *UpgradeSmartAccessGatewayRequest, callback func(response *UpgradeSmartAccessGatewayResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *UpgradeSmartAccessGatewayResponse
+		var err error
+		defer close(result)
+		response, err = client.UpgradeSmartAccessGateway(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// UpgradeSmartAccessGatewayRequest is the request struct for api UpgradeSmartAccessGateway
+type UpgradeSmartAccessGatewayRequest struct {
+	*requests.RpcRequest
+	ResourceOwnerId      requests.Integer `position:"Query" name:"ResourceOwnerId"`
+	AutoPay              requests.Boolean `position:"Query" name:"AutoPay"`
+	BandWidthSpec        requests.Integer `position:"Query" name:"BandWidthSpec"`
+	ResourceOwnerAccount string           `position:"Query" name:"ResourceOwnerAccount"`
+	OwnerAccount         string           `position:"Query" name:"OwnerAccount"`
+	SmartAGId            string           `position:"Query" name:"SmartAGId"`
+	OwnerId              requests.Integer `position:"Query" name:"OwnerId"`
+}
+
+// UpgradeSmartAccessGatewayResponse is the response struct for api UpgradeSmartAccessGateway
+type UpgradeSmartAccessGatewayResponse struct {
+	*responses.BaseResponse
+	RequestId string `json:"RequestId" xml:"RequestId"`
+	OrderId   string `json:"OrderId" xml:"OrderId"`
+}
+
+// CreateUpgradeSmartAccessGatewayRequest creates a request to invoke UpgradeSmartAccessGateway API
+func CreateUpgradeSmartAccessGatewayRequest() (request *UpgradeSmartAccessGatewayRequest) {
+	request = &UpgradeSmartAccessGatewayRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Smartag", "2018-03-13", "UpgradeSmartAccessGateway", "smartag", "openAPI")
+	return
+}
+
+// CreateUpgradeSmartAccessGatewayResponse creates a response to parse from UpgradeSmartAccessGateway response
+func CreateUpgradeSmartAccessGatewayResponse() (response *UpgradeSmartAccessGatewayResponse) {
+	response = &UpgradeSmartAccessGatewayResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}