Browse Source

Generated 2019-03-15 for fnf.

sdk-team 5 years ago
parent
commit
8294f7dca3

+ 5 - 0
ChangeLog.txt

@@ -1,3 +1,8 @@
+2020-02-14 Version: v1.60.378
+- Generated 2019-03-15 for `fnf`.
+- Add callback params to StartExecution API.
+- Support ListExecutions with Status API.
+
 2020-02-14 Version: v1.60.377
 2020-02-14 Version: v1.60.377
 - Generated 2015-04-01 for `Sts`.
 - Generated 2015-04-01 for `Sts`.
 - Use standard endpoints.
 - Use standard endpoints.

+ 25 - 0
services/fnf/client.go

@@ -16,6 +16,8 @@ package fnf
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
 
 import (
 import (
+	"reflect"
+
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/provider"
@@ -26,10 +28,25 @@ type Client struct {
 	sdk.Client
 	sdk.Client
 }
 }
 
 
+// SetClientProperty Set Property by Reflect
+func SetClientProperty(client *Client, propertyName string, propertyValue interface{}) {
+	v := reflect.ValueOf(client).Elem()
+	if v.FieldByName(propertyName).IsValid() && v.FieldByName(propertyName).CanSet() {
+		v.FieldByName(propertyName).Set(reflect.ValueOf(propertyValue))
+	}
+}
+
+// SetEndpointDataToClient Set EndpointMap and ENdpointType
+func SetEndpointDataToClient(client *Client) {
+	SetClientProperty(client, "EndpointMap", GetEndpointMap())
+	SetClientProperty(client, "EndpointType", GetEndpointType())
+}
+
 // NewClient creates a sdk client with environment variables
 // NewClient creates a sdk client with environment variables
 func NewClient() (client *Client, err error) {
 func NewClient() (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.Init()
 	err = client.Init()
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -44,6 +61,7 @@ func NewClientWithProvider(regionId string, providers ...provider.Provider) (cli
 		pc = provider.NewProviderChain(providers)
 		pc = provider.NewProviderChain(providers)
 	}
 	}
 	err = client.InitWithProviderChain(regionId, pc)
 	err = client.InitWithProviderChain(regionId, pc)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -52,6 +70,7 @@ func NewClientWithProvider(regionId string, providers ...provider.Provider) (cli
 func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
 func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.InitWithOptions(regionId, config, credential)
 	err = client.InitWithOptions(regionId, config, credential)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -60,6 +79,7 @@ func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.C
 func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
 func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
 	err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -68,6 +88,7 @@ func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (clie
 func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
 func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
 	err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -76,6 +97,7 @@ func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToke
 func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
 func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
 	err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -84,6 +106,7 @@ func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, role
 func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
 func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
 	err = client.InitWithRamRoleArnAndPolicy(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -92,6 +115,7 @@ func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySec
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
 func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.InitWithEcsRamRole(regionId, roleName)
 	err = client.InitWithEcsRamRole(regionId, roleName)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }
 
 
@@ -100,5 +124,6 @@ func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client,
 func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
 func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
 	client = &Client{}
 	client = &Client{}
 	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
 	err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
+	SetEndpointDataToClient(client)
 	return
 	return
 }
 }

+ 2 - 2
services/fnf/create_flow.go

@@ -76,12 +76,12 @@ func (client *Client) CreateFlowWithCallback(request *CreateFlowRequest, callbac
 // CreateFlowRequest is the request struct for api CreateFlow
 // CreateFlowRequest is the request struct for api CreateFlow
 type CreateFlowRequest struct {
 type CreateFlowRequest struct {
 	*requests.RpcRequest
 	*requests.RpcRequest
+	Description string `position:"Body" name:"Description"`
+	Type        string `position:"Body" name:"Type"`
 	RequestId   string `position:"Query" name:"RequestId"`
 	RequestId   string `position:"Query" name:"RequestId"`
 	RoleArn     string `position:"Body" name:"RoleArn"`
 	RoleArn     string `position:"Body" name:"RoleArn"`
 	Name        string `position:"Body" name:"Name"`
 	Name        string `position:"Body" name:"Name"`
-	Description string `position:"Body" name:"Description"`
 	Definition  string `position:"Body" name:"Definition"`
 	Definition  string `position:"Body" name:"Definition"`
-	Type        string `position:"Body" name:"Type"`
 }
 }
 
 
 // CreateFlowResponse is the response struct for api CreateFlow
 // CreateFlowResponse is the response struct for api CreateFlow

+ 25 - 0
services/fnf/endpoint.go

@@ -0,0 +1,25 @@
+package fnf
+
+// EndpointMap Endpoint Data
+var EndpointMap map[string]string
+
+// EndpointType regional or central
+var EndpointType = "regional"
+
+// GetEndpointMap Get Endpoint Data Map
+func GetEndpointMap() map[string]string {
+	if EndpointMap == nil {
+		EndpointMap = map[string]string{
+			"cn-shenzhen": "cn-shenzhen.fnf.aliyuncs.com",
+			"cn-beijing":  "cn-beijing.fnf.aliyuncs.com",
+			"cn-shanghai": "cn-shanghai.fnf.aliyuncs.com",
+			"cn-hangzhou": "cn-hangzhou.fnf.aliyuncs.com",
+		}
+	}
+	return EndpointMap
+}
+
+// GetEndpointType Get Endpoint Type Value
+func GetEndpointType() string {
+	return EndpointType
+}

+ 1 - 0
services/fnf/list_executions.go

@@ -80,6 +80,7 @@ type ListExecutionsRequest struct {
 	RequestId string           `position:"Query" name:"RequestId"`
 	RequestId string           `position:"Query" name:"RequestId"`
 	Limit     requests.Integer `position:"Query" name:"Limit"`
 	Limit     requests.Integer `position:"Query" name:"Limit"`
 	FlowName  string           `position:"Query" name:"FlowName"`
 	FlowName  string           `position:"Query" name:"FlowName"`
+	Status    string           `position:"Query" name:"Status"`
 }
 }
 
 
 // ListExecutionsResponse is the response struct for api ListExecutions
 // ListExecutionsResponse is the response struct for api ListExecutions

+ 2 - 2
services/fnf/report_task_failed.go

@@ -76,10 +76,10 @@ func (client *Client) ReportTaskFailedWithCallback(request *ReportTaskFailedRequ
 // ReportTaskFailedRequest is the request struct for api ReportTaskFailed
 // ReportTaskFailedRequest is the request struct for api ReportTaskFailed
 type ReportTaskFailedRequest struct {
 type ReportTaskFailedRequest struct {
 	*requests.RpcRequest
 	*requests.RpcRequest
-	RequestId string `position:"Query" name:"RequestId"`
 	Cause     string `position:"Body" name:"Cause"`
 	Cause     string `position:"Body" name:"Cause"`
-	TaskToken string `position:"Query" name:"TaskToken"`
 	Error     string `position:"Body" name:"Error"`
 	Error     string `position:"Body" name:"Error"`
+	RequestId string `position:"Query" name:"RequestId"`
+	TaskToken string `position:"Query" name:"TaskToken"`
 }
 }
 
 
 // ReportTaskFailedResponse is the response struct for api ReportTaskFailed
 // ReportTaskFailedResponse is the response struct for api ReportTaskFailed

+ 5 - 4
services/fnf/start_execution.go

@@ -76,10 +76,11 @@ func (client *Client) StartExecutionWithCallback(request *StartExecutionRequest,
 // StartExecutionRequest is the request struct for api StartExecution
 // StartExecutionRequest is the request struct for api StartExecution
 type StartExecutionRequest struct {
 type StartExecutionRequest struct {
 	*requests.RpcRequest
 	*requests.RpcRequest
-	Input         string `position:"Body" name:"Input"`
-	ExecutionName string `position:"Body" name:"ExecutionName"`
-	RequestId     string `position:"Query" name:"RequestId"`
-	FlowName      string `position:"Body" name:"FlowName"`
+	CallbackFnFTaskToken string `position:"Body" name:"CallbackFnFTaskToken"`
+	ExecutionName        string `position:"Body" name:"ExecutionName"`
+	Input                string `position:"Body" name:"Input"`
+	RequestId            string `position:"Query" name:"RequestId"`
+	FlowName             string `position:"Body" name:"FlowName"`
 }
 }
 
 
 // StartExecutionResponse is the response struct for api StartExecution
 // StartExecutionResponse is the response struct for api StartExecution

+ 2 - 2
services/fnf/stop_execution.go

@@ -77,10 +77,10 @@ func (client *Client) StopExecutionWithCallback(request *StopExecutionRequest, c
 type StopExecutionRequest struct {
 type StopExecutionRequest struct {
 	*requests.RpcRequest
 	*requests.RpcRequest
 	ExecutionName string `position:"Body" name:"ExecutionName"`
 	ExecutionName string `position:"Body" name:"ExecutionName"`
-	RequestId     string `position:"Query" name:"RequestId"`
 	Cause         string `position:"Body" name:"Cause"`
 	Cause         string `position:"Body" name:"Cause"`
-	FlowName      string `position:"Body" name:"FlowName"`
 	Error         string `position:"Body" name:"Error"`
 	Error         string `position:"Body" name:"Error"`
+	RequestId     string `position:"Query" name:"RequestId"`
+	FlowName      string `position:"Body" name:"FlowName"`
 }
 }
 
 
 // StopExecutionResponse is the response struct for api StopExecution
 // StopExecutionResponse is the response struct for api StopExecution

+ 1 - 1
services/fnf/struct_events.go

@@ -17,5 +17,5 @@ package fnf
 
 
 // Events is a nested struct in fnf response
 // Events is a nested struct in fnf response
 type Events struct {
 type Events struct {
-	EventsItem []EventsItem `json:"EventsItem" xml:"EventsItem"`
+	EventsItem []EventsItem `json:"Events" xml:"Events"`
 }
 }

+ 1 - 1
services/fnf/struct_executions.go

@@ -17,5 +17,5 @@ package fnf
 
 
 // Executions is a nested struct in fnf response
 // Executions is a nested struct in fnf response
 type Executions struct {
 type Executions struct {
-	ExecutionsItem []ExecutionsItem `json:"ExecutionsItem" xml:"ExecutionsItem"`
+	ExecutionsItem []ExecutionsItem `json:"Executions" xml:"Executions"`
 }
 }

+ 1 - 1
services/fnf/struct_flows.go

@@ -17,5 +17,5 @@ package fnf
 
 
 // Flows is a nested struct in fnf response
 // Flows is a nested struct in fnf response
 type Flows struct {
 type Flows struct {
-	FlowsItem []FlowsItem `json:"FlowsItem" xml:"FlowsItem"`
+	FlowsItem []FlowsItem `json:"Flows" xml:"Flows"`
 }
 }

+ 2 - 2
services/fnf/update_flow.go

@@ -76,12 +76,12 @@ func (client *Client) UpdateFlowWithCallback(request *UpdateFlowRequest, callbac
 // UpdateFlowRequest is the request struct for api UpdateFlow
 // UpdateFlowRequest is the request struct for api UpdateFlow
 type UpdateFlowRequest struct {
 type UpdateFlowRequest struct {
 	*requests.RpcRequest
 	*requests.RpcRequest
+	Description string `position:"Body" name:"Description"`
+	Type        string `position:"Body" name:"Type"`
 	RequestId   string `position:"Query" name:"RequestId"`
 	RequestId   string `position:"Query" name:"RequestId"`
 	RoleArn     string `position:"Body" name:"RoleArn"`
 	RoleArn     string `position:"Body" name:"RoleArn"`
 	Name        string `position:"Body" name:"Name"`
 	Name        string `position:"Body" name:"Name"`
-	Description string `position:"Body" name:"Description"`
 	Definition  string `position:"Body" name:"Definition"`
 	Definition  string `position:"Body" name:"Definition"`
-	Type        string `position:"Body" name:"Type"`
 }
 }
 
 
 // UpdateFlowResponse is the response struct for api UpdateFlow
 // UpdateFlowResponse is the response struct for api UpdateFlow