|
@@ -20,24 +20,24 @@ import (
|
|
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
|
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-// DeleteWorkFlow invokes the vod.DeleteWorkFlow API synchronously
|
|
|
|
|
|
|
+// DeleteWorkflow invokes the vod.DeleteWorkflow API synchronously
|
|
|
// api document: https://help.aliyun.com/api/vod/deleteworkflow.html
|
|
// api document: https://help.aliyun.com/api/vod/deleteworkflow.html
|
|
|
-func (client *Client) DeleteWorkFlow(request *DeleteWorkFlowRequest) (response *DeleteWorkFlowResponse, err error) {
|
|
|
|
|
- response = CreateDeleteWorkFlowResponse()
|
|
|
|
|
|
|
+func (client *Client) DeleteWorkflow(request *DeleteWorkflowRequest) (response *DeleteWorkflowResponse, err error) {
|
|
|
|
|
+ response = CreateDeleteWorkflowResponse()
|
|
|
err = client.DoAction(request, response)
|
|
err = client.DoAction(request, response)
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// DeleteWorkFlowWithChan invokes the vod.DeleteWorkFlow API asynchronously
|
|
|
|
|
|
|
+// DeleteWorkflowWithChan invokes the vod.DeleteWorkflow API asynchronously
|
|
|
// api document: https://help.aliyun.com/api/vod/deleteworkflow.html
|
|
// api document: https://help.aliyun.com/api/vod/deleteworkflow.html
|
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) DeleteWorkFlowWithChan(request *DeleteWorkFlowRequest) (<-chan *DeleteWorkFlowResponse, <-chan error) {
|
|
|
|
|
- responseChan := make(chan *DeleteWorkFlowResponse, 1)
|
|
|
|
|
|
|
+func (client *Client) DeleteWorkflowWithChan(request *DeleteWorkflowRequest) (<-chan *DeleteWorkflowResponse, <-chan error) {
|
|
|
|
|
+ responseChan := make(chan *DeleteWorkflowResponse, 1)
|
|
|
errChan := make(chan error, 1)
|
|
errChan := make(chan error, 1)
|
|
|
err := client.AddAsyncTask(func() {
|
|
err := client.AddAsyncTask(func() {
|
|
|
defer close(responseChan)
|
|
defer close(responseChan)
|
|
|
defer close(errChan)
|
|
defer close(errChan)
|
|
|
- response, err := client.DeleteWorkFlow(request)
|
|
|
|
|
|
|
+ response, err := client.DeleteWorkflow(request)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
errChan <- err
|
|
errChan <- err
|
|
|
} else {
|
|
} else {
|
|
@@ -52,16 +52,16 @@ func (client *Client) DeleteWorkFlowWithChan(request *DeleteWorkFlowRequest) (<-
|
|
|
return responseChan, errChan
|
|
return responseChan, errChan
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// DeleteWorkFlowWithCallback invokes the vod.DeleteWorkFlow API asynchronously
|
|
|
|
|
|
|
+// DeleteWorkflowWithCallback invokes the vod.DeleteWorkflow API asynchronously
|
|
|
// api document: https://help.aliyun.com/api/vod/deleteworkflow.html
|
|
// api document: https://help.aliyun.com/api/vod/deleteworkflow.html
|
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) DeleteWorkFlowWithCallback(request *DeleteWorkFlowRequest, callback func(response *DeleteWorkFlowResponse, err error)) <-chan int {
|
|
|
|
|
|
|
+func (client *Client) DeleteWorkflowWithCallback(request *DeleteWorkflowRequest, callback func(response *DeleteWorkflowResponse, err error)) <-chan int {
|
|
|
result := make(chan int, 1)
|
|
result := make(chan int, 1)
|
|
|
err := client.AddAsyncTask(func() {
|
|
err := client.AddAsyncTask(func() {
|
|
|
- var response *DeleteWorkFlowResponse
|
|
|
|
|
|
|
+ var response *DeleteWorkflowResponse
|
|
|
var err error
|
|
var err error
|
|
|
defer close(result)
|
|
defer close(result)
|
|
|
- response, err = client.DeleteWorkFlow(request)
|
|
|
|
|
|
|
+ response, err = client.DeleteWorkflow(request)
|
|
|
callback(response, err)
|
|
callback(response, err)
|
|
|
result <- 1
|
|
result <- 1
|
|
|
})
|
|
})
|
|
@@ -73,34 +73,34 @@ func (client *Client) DeleteWorkFlowWithCallback(request *DeleteWorkFlowRequest,
|
|
|
return result
|
|
return result
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// DeleteWorkFlowRequest is the request struct for api DeleteWorkFlow
|
|
|
|
|
-type DeleteWorkFlowRequest struct {
|
|
|
|
|
|
|
+// DeleteWorkflowRequest is the request struct for api DeleteWorkflow
|
|
|
|
|
+type DeleteWorkflowRequest struct {
|
|
|
*requests.RpcRequest
|
|
*requests.RpcRequest
|
|
|
ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
|
|
ResourceOwnerId requests.Integer `position:"Query" name:"ResourceOwnerId"`
|
|
|
ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
|
|
ResourceOwnerAccount string `position:"Query" name:"ResourceOwnerAccount"`
|
|
|
OwnerId requests.Integer `position:"Query" name:"OwnerId"`
|
|
OwnerId requests.Integer `position:"Query" name:"OwnerId"`
|
|
|
- WorkFlowId string `position:"Query" name:"WorkFlowId"`
|
|
|
|
|
|
|
+ WorkflowId string `position:"Query" name:"WorkflowId"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// DeleteWorkFlowResponse is the response struct for api DeleteWorkFlow
|
|
|
|
|
-type DeleteWorkFlowResponse struct {
|
|
|
|
|
|
|
+// DeleteWorkflowResponse is the response struct for api DeleteWorkflow
|
|
|
|
|
+type DeleteWorkflowResponse struct {
|
|
|
*responses.BaseResponse
|
|
*responses.BaseResponse
|
|
|
RequestId string `json:"RequestId" xml:"RequestId"`
|
|
RequestId string `json:"RequestId" xml:"RequestId"`
|
|
|
- WorkFlowId string `json:"WorkFlowId" xml:"WorkFlowId"`
|
|
|
|
|
|
|
+ WorkflowId string `json:"WorkflowId" xml:"WorkflowId"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateDeleteWorkFlowRequest creates a request to invoke DeleteWorkFlow API
|
|
|
|
|
-func CreateDeleteWorkFlowRequest() (request *DeleteWorkFlowRequest) {
|
|
|
|
|
- request = &DeleteWorkFlowRequest{
|
|
|
|
|
|
|
+// CreateDeleteWorkflowRequest creates a request to invoke DeleteWorkflow API
|
|
|
|
|
+func CreateDeleteWorkflowRequest() (request *DeleteWorkflowRequest) {
|
|
|
|
|
+ request = &DeleteWorkflowRequest{
|
|
|
RpcRequest: &requests.RpcRequest{},
|
|
RpcRequest: &requests.RpcRequest{},
|
|
|
}
|
|
}
|
|
|
- request.InitWithApiInfo("vod", "2017-03-21", "DeleteWorkFlow", "vod", "openAPI")
|
|
|
|
|
|
|
+ request.InitWithApiInfo("vod", "2017-03-21", "DeleteWorkflow", "vod", "openAPI")
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CreateDeleteWorkFlowResponse creates a response to parse from DeleteWorkFlow response
|
|
|
|
|
-func CreateDeleteWorkFlowResponse() (response *DeleteWorkFlowResponse) {
|
|
|
|
|
- response = &DeleteWorkFlowResponse{
|
|
|
|
|
|
|
+// CreateDeleteWorkflowResponse creates a response to parse from DeleteWorkflow response
|
|
|
|
|
+func CreateDeleteWorkflowResponse() (response *DeleteWorkflowResponse) {
|
|
|
|
|
+ response = &DeleteWorkflowResponse{
|
|
|
BaseResponse: &responses.BaseResponse{},
|
|
BaseResponse: &responses.BaseResponse{},
|
|
|
}
|
|
}
|
|
|
return
|
|
return
|