1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package swf
4
5import (
6	"fmt"
7	"time"
8
9	"github.com/aws/aws-sdk-go/aws"
10	"github.com/aws/aws-sdk-go/aws/awsutil"
11	"github.com/aws/aws-sdk-go/aws/request"
12	"github.com/aws/aws-sdk-go/private/protocol"
13	"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
14)
15
16const opCountClosedWorkflowExecutions = "CountClosedWorkflowExecutions"
17
18// CountClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the
19// client's request for the CountClosedWorkflowExecutions operation. The "output" return
20// value will be populated with the request's response once the request completes
21// successfully.
22//
23// Use "Send" method on the returned Request to send the API call to the service.
24// the "output" return value is not valid until after Send returns without error.
25//
26// See CountClosedWorkflowExecutions for more information on using the CountClosedWorkflowExecutions
27// API call, and error handling.
28//
29// This method is useful when you want to inject custom logic or configuration
30// into the SDK's request lifecycle. Such as custom headers, or retry logic.
31//
32//
33//    // Example sending a request using the CountClosedWorkflowExecutionsRequest method.
34//    req, resp := client.CountClosedWorkflowExecutionsRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40func (c *SWF) CountClosedWorkflowExecutionsRequest(input *CountClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) {
41	op := &request.Operation{
42		Name:       opCountClosedWorkflowExecutions,
43		HTTPMethod: "POST",
44		HTTPPath:   "/",
45	}
46
47	if input == nil {
48		input = &CountClosedWorkflowExecutionsInput{}
49	}
50
51	output = &WorkflowExecutionCount{}
52	req = c.newRequest(op, input, output)
53	return
54}
55
56// CountClosedWorkflowExecutions API operation for Amazon Simple Workflow Service.
57//
58// Returns the number of closed workflow executions within the given domain
59// that meet the specified filtering criteria.
60//
61// This operation is eventually consistent. The results are best effort and
62// may not exactly reflect recent updates and changes.
63//
64// Access Control
65//
66// You can use IAM policies to control this action's access to Amazon SWF resources
67// as follows:
68//
69//    * Use a Resource element with the domain name to limit the action to only
70//    specified domains.
71//
72//    * Use an Action element to allow or deny permission to call this action.
73//
74//    * Constrain the following parameters by using a Condition element with
75//    the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
76//    typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
77//    String constraint. The key is swf:typeFilter.version.
78//
79// If the caller doesn't have sufficient permissions to invoke the action, or
80// the parameter values fall outside the specified constraints, the action fails.
81// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
82// For details and example IAM policies, see Using IAM to Manage Access to Amazon
83// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
84// in the Amazon SWF Developer Guide.
85//
86// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
87// with awserr.Error's Code and Message methods to get detailed information about
88// the error.
89//
90// See the AWS API reference guide for Amazon Simple Workflow Service's
91// API operation CountClosedWorkflowExecutions for usage and error information.
92//
93// Returned Error Codes:
94//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
95//   Returned when the named resource cannot be found with in the scope of this
96//   operation (region or domain). This could happen if the named resource was
97//   never created or is no longer available for this operation.
98//
99//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
100//   Returned when the caller doesn't have sufficient permissions to invoke the
101//   action.
102//
103func (c *SWF) CountClosedWorkflowExecutions(input *CountClosedWorkflowExecutionsInput) (*WorkflowExecutionCount, error) {
104	req, out := c.CountClosedWorkflowExecutionsRequest(input)
105	return out, req.Send()
106}
107
108// CountClosedWorkflowExecutionsWithContext is the same as CountClosedWorkflowExecutions with the addition of
109// the ability to pass a context and additional request options.
110//
111// See CountClosedWorkflowExecutions for details on how to use this API operation.
112//
113// The context must be non-nil and will be used for request cancellation. If
114// the context is nil a panic will occur. In the future the SDK may create
115// sub-contexts for http.Requests. See https://golang.org/pkg/context/
116// for more information on using Contexts.
117func (c *SWF) CountClosedWorkflowExecutionsWithContext(ctx aws.Context, input *CountClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) {
118	req, out := c.CountClosedWorkflowExecutionsRequest(input)
119	req.SetContext(ctx)
120	req.ApplyOptions(opts...)
121	return out, req.Send()
122}
123
124const opCountOpenWorkflowExecutions = "CountOpenWorkflowExecutions"
125
126// CountOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the
127// client's request for the CountOpenWorkflowExecutions operation. The "output" return
128// value will be populated with the request's response once the request completes
129// successfully.
130//
131// Use "Send" method on the returned Request to send the API call to the service.
132// the "output" return value is not valid until after Send returns without error.
133//
134// See CountOpenWorkflowExecutions for more information on using the CountOpenWorkflowExecutions
135// API call, and error handling.
136//
137// This method is useful when you want to inject custom logic or configuration
138// into the SDK's request lifecycle. Such as custom headers, or retry logic.
139//
140//
141//    // Example sending a request using the CountOpenWorkflowExecutionsRequest method.
142//    req, resp := client.CountOpenWorkflowExecutionsRequest(params)
143//
144//    err := req.Send()
145//    if err == nil { // resp is now filled
146//        fmt.Println(resp)
147//    }
148func (c *SWF) CountOpenWorkflowExecutionsRequest(input *CountOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionCount) {
149	op := &request.Operation{
150		Name:       opCountOpenWorkflowExecutions,
151		HTTPMethod: "POST",
152		HTTPPath:   "/",
153	}
154
155	if input == nil {
156		input = &CountOpenWorkflowExecutionsInput{}
157	}
158
159	output = &WorkflowExecutionCount{}
160	req = c.newRequest(op, input, output)
161	return
162}
163
164// CountOpenWorkflowExecutions API operation for Amazon Simple Workflow Service.
165//
166// Returns the number of open workflow executions within the given domain that
167// meet the specified filtering criteria.
168//
169// This operation is eventually consistent. The results are best effort and
170// may not exactly reflect recent updates and changes.
171//
172// Access Control
173//
174// You can use IAM policies to control this action's access to Amazon SWF resources
175// as follows:
176//
177//    * Use a Resource element with the domain name to limit the action to only
178//    specified domains.
179//
180//    * Use an Action element to allow or deny permission to call this action.
181//
182//    * Constrain the following parameters by using a Condition element with
183//    the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
184//    typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
185//    String constraint. The key is swf:typeFilter.version.
186//
187// If the caller doesn't have sufficient permissions to invoke the action, or
188// the parameter values fall outside the specified constraints, the action fails.
189// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
190// For details and example IAM policies, see Using IAM to Manage Access to Amazon
191// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
192// in the Amazon SWF Developer Guide.
193//
194// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
195// with awserr.Error's Code and Message methods to get detailed information about
196// the error.
197//
198// See the AWS API reference guide for Amazon Simple Workflow Service's
199// API operation CountOpenWorkflowExecutions for usage and error information.
200//
201// Returned Error Codes:
202//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
203//   Returned when the named resource cannot be found with in the scope of this
204//   operation (region or domain). This could happen if the named resource was
205//   never created or is no longer available for this operation.
206//
207//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
208//   Returned when the caller doesn't have sufficient permissions to invoke the
209//   action.
210//
211func (c *SWF) CountOpenWorkflowExecutions(input *CountOpenWorkflowExecutionsInput) (*WorkflowExecutionCount, error) {
212	req, out := c.CountOpenWorkflowExecutionsRequest(input)
213	return out, req.Send()
214}
215
216// CountOpenWorkflowExecutionsWithContext is the same as CountOpenWorkflowExecutions with the addition of
217// the ability to pass a context and additional request options.
218//
219// See CountOpenWorkflowExecutions for details on how to use this API operation.
220//
221// The context must be non-nil and will be used for request cancellation. If
222// the context is nil a panic will occur. In the future the SDK may create
223// sub-contexts for http.Requests. See https://golang.org/pkg/context/
224// for more information on using Contexts.
225func (c *SWF) CountOpenWorkflowExecutionsWithContext(ctx aws.Context, input *CountOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionCount, error) {
226	req, out := c.CountOpenWorkflowExecutionsRequest(input)
227	req.SetContext(ctx)
228	req.ApplyOptions(opts...)
229	return out, req.Send()
230}
231
232const opCountPendingActivityTasks = "CountPendingActivityTasks"
233
234// CountPendingActivityTasksRequest generates a "aws/request.Request" representing the
235// client's request for the CountPendingActivityTasks operation. The "output" return
236// value will be populated with the request's response once the request completes
237// successfully.
238//
239// Use "Send" method on the returned Request to send the API call to the service.
240// the "output" return value is not valid until after Send returns without error.
241//
242// See CountPendingActivityTasks for more information on using the CountPendingActivityTasks
243// API call, and error handling.
244//
245// This method is useful when you want to inject custom logic or configuration
246// into the SDK's request lifecycle. Such as custom headers, or retry logic.
247//
248//
249//    // Example sending a request using the CountPendingActivityTasksRequest method.
250//    req, resp := client.CountPendingActivityTasksRequest(params)
251//
252//    err := req.Send()
253//    if err == nil { // resp is now filled
254//        fmt.Println(resp)
255//    }
256func (c *SWF) CountPendingActivityTasksRequest(input *CountPendingActivityTasksInput) (req *request.Request, output *PendingTaskCount) {
257	op := &request.Operation{
258		Name:       opCountPendingActivityTasks,
259		HTTPMethod: "POST",
260		HTTPPath:   "/",
261	}
262
263	if input == nil {
264		input = &CountPendingActivityTasksInput{}
265	}
266
267	output = &PendingTaskCount{}
268	req = c.newRequest(op, input, output)
269	return
270}
271
272// CountPendingActivityTasks API operation for Amazon Simple Workflow Service.
273//
274// Returns the estimated number of activity tasks in the specified task list.
275// The count returned is an approximation and isn't guaranteed to be exact.
276// If you specify a task list that no activity task was ever scheduled in then
277// 0 is returned.
278//
279// Access Control
280//
281// You can use IAM policies to control this action's access to Amazon SWF resources
282// as follows:
283//
284//    * Use a Resource element with the domain name to limit the action to only
285//    specified domains.
286//
287//    * Use an Action element to allow or deny permission to call this action.
288//
289//    * Constrain the taskList.name parameter by using a Condition element with
290//    the swf:taskList.name key to allow the action to access only certain task
291//    lists.
292//
293// If the caller doesn't have sufficient permissions to invoke the action, or
294// the parameter values fall outside the specified constraints, the action fails.
295// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
296// For details and example IAM policies, see Using IAM to Manage Access to Amazon
297// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
298// in the Amazon SWF Developer Guide.
299//
300// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
301// with awserr.Error's Code and Message methods to get detailed information about
302// the error.
303//
304// See the AWS API reference guide for Amazon Simple Workflow Service's
305// API operation CountPendingActivityTasks for usage and error information.
306//
307// Returned Error Codes:
308//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
309//   Returned when the named resource cannot be found with in the scope of this
310//   operation (region or domain). This could happen if the named resource was
311//   never created or is no longer available for this operation.
312//
313//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
314//   Returned when the caller doesn't have sufficient permissions to invoke the
315//   action.
316//
317func (c *SWF) CountPendingActivityTasks(input *CountPendingActivityTasksInput) (*PendingTaskCount, error) {
318	req, out := c.CountPendingActivityTasksRequest(input)
319	return out, req.Send()
320}
321
322// CountPendingActivityTasksWithContext is the same as CountPendingActivityTasks with the addition of
323// the ability to pass a context and additional request options.
324//
325// See CountPendingActivityTasks for details on how to use this API operation.
326//
327// The context must be non-nil and will be used for request cancellation. If
328// the context is nil a panic will occur. In the future the SDK may create
329// sub-contexts for http.Requests. See https://golang.org/pkg/context/
330// for more information on using Contexts.
331func (c *SWF) CountPendingActivityTasksWithContext(ctx aws.Context, input *CountPendingActivityTasksInput, opts ...request.Option) (*PendingTaskCount, error) {
332	req, out := c.CountPendingActivityTasksRequest(input)
333	req.SetContext(ctx)
334	req.ApplyOptions(opts...)
335	return out, req.Send()
336}
337
338const opCountPendingDecisionTasks = "CountPendingDecisionTasks"
339
340// CountPendingDecisionTasksRequest generates a "aws/request.Request" representing the
341// client's request for the CountPendingDecisionTasks operation. The "output" return
342// value will be populated with the request's response once the request completes
343// successfully.
344//
345// Use "Send" method on the returned Request to send the API call to the service.
346// the "output" return value is not valid until after Send returns without error.
347//
348// See CountPendingDecisionTasks for more information on using the CountPendingDecisionTasks
349// API call, and error handling.
350//
351// This method is useful when you want to inject custom logic or configuration
352// into the SDK's request lifecycle. Such as custom headers, or retry logic.
353//
354//
355//    // Example sending a request using the CountPendingDecisionTasksRequest method.
356//    req, resp := client.CountPendingDecisionTasksRequest(params)
357//
358//    err := req.Send()
359//    if err == nil { // resp is now filled
360//        fmt.Println(resp)
361//    }
362func (c *SWF) CountPendingDecisionTasksRequest(input *CountPendingDecisionTasksInput) (req *request.Request, output *PendingTaskCount) {
363	op := &request.Operation{
364		Name:       opCountPendingDecisionTasks,
365		HTTPMethod: "POST",
366		HTTPPath:   "/",
367	}
368
369	if input == nil {
370		input = &CountPendingDecisionTasksInput{}
371	}
372
373	output = &PendingTaskCount{}
374	req = c.newRequest(op, input, output)
375	return
376}
377
378// CountPendingDecisionTasks API operation for Amazon Simple Workflow Service.
379//
380// Returns the estimated number of decision tasks in the specified task list.
381// The count returned is an approximation and isn't guaranteed to be exact.
382// If you specify a task list that no decision task was ever scheduled in then
383// 0 is returned.
384//
385// Access Control
386//
387// You can use IAM policies to control this action's access to Amazon SWF resources
388// as follows:
389//
390//    * Use a Resource element with the domain name to limit the action to only
391//    specified domains.
392//
393//    * Use an Action element to allow or deny permission to call this action.
394//
395//    * Constrain the taskList.name parameter by using a Condition element with
396//    the swf:taskList.name key to allow the action to access only certain task
397//    lists.
398//
399// If the caller doesn't have sufficient permissions to invoke the action, or
400// the parameter values fall outside the specified constraints, the action fails.
401// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
402// For details and example IAM policies, see Using IAM to Manage Access to Amazon
403// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
404// in the Amazon SWF Developer Guide.
405//
406// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
407// with awserr.Error's Code and Message methods to get detailed information about
408// the error.
409//
410// See the AWS API reference guide for Amazon Simple Workflow Service's
411// API operation CountPendingDecisionTasks for usage and error information.
412//
413// Returned Error Codes:
414//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
415//   Returned when the named resource cannot be found with in the scope of this
416//   operation (region or domain). This could happen if the named resource was
417//   never created or is no longer available for this operation.
418//
419//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
420//   Returned when the caller doesn't have sufficient permissions to invoke the
421//   action.
422//
423func (c *SWF) CountPendingDecisionTasks(input *CountPendingDecisionTasksInput) (*PendingTaskCount, error) {
424	req, out := c.CountPendingDecisionTasksRequest(input)
425	return out, req.Send()
426}
427
428// CountPendingDecisionTasksWithContext is the same as CountPendingDecisionTasks with the addition of
429// the ability to pass a context and additional request options.
430//
431// See CountPendingDecisionTasks for details on how to use this API operation.
432//
433// The context must be non-nil and will be used for request cancellation. If
434// the context is nil a panic will occur. In the future the SDK may create
435// sub-contexts for http.Requests. See https://golang.org/pkg/context/
436// for more information on using Contexts.
437func (c *SWF) CountPendingDecisionTasksWithContext(ctx aws.Context, input *CountPendingDecisionTasksInput, opts ...request.Option) (*PendingTaskCount, error) {
438	req, out := c.CountPendingDecisionTasksRequest(input)
439	req.SetContext(ctx)
440	req.ApplyOptions(opts...)
441	return out, req.Send()
442}
443
444const opDeprecateActivityType = "DeprecateActivityType"
445
446// DeprecateActivityTypeRequest generates a "aws/request.Request" representing the
447// client's request for the DeprecateActivityType operation. The "output" return
448// value will be populated with the request's response once the request completes
449// successfully.
450//
451// Use "Send" method on the returned Request to send the API call to the service.
452// the "output" return value is not valid until after Send returns without error.
453//
454// See DeprecateActivityType for more information on using the DeprecateActivityType
455// API call, and error handling.
456//
457// This method is useful when you want to inject custom logic or configuration
458// into the SDK's request lifecycle. Such as custom headers, or retry logic.
459//
460//
461//    // Example sending a request using the DeprecateActivityTypeRequest method.
462//    req, resp := client.DeprecateActivityTypeRequest(params)
463//
464//    err := req.Send()
465//    if err == nil { // resp is now filled
466//        fmt.Println(resp)
467//    }
468func (c *SWF) DeprecateActivityTypeRequest(input *DeprecateActivityTypeInput) (req *request.Request, output *DeprecateActivityTypeOutput) {
469	op := &request.Operation{
470		Name:       opDeprecateActivityType,
471		HTTPMethod: "POST",
472		HTTPPath:   "/",
473	}
474
475	if input == nil {
476		input = &DeprecateActivityTypeInput{}
477	}
478
479	output = &DeprecateActivityTypeOutput{}
480	req = c.newRequest(op, input, output)
481	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
482	return
483}
484
485// DeprecateActivityType API operation for Amazon Simple Workflow Service.
486//
487// Deprecates the specified activity type. After an activity type has been deprecated,
488// you cannot create new tasks of that activity type. Tasks of this type that
489// were scheduled before the type was deprecated continue to run.
490//
491// This operation is eventually consistent. The results are best effort and
492// may not exactly reflect recent updates and changes.
493//
494// Access Control
495//
496// You can use IAM policies to control this action's access to Amazon SWF resources
497// as follows:
498//
499//    * Use a Resource element with the domain name to limit the action to only
500//    specified domains.
501//
502//    * Use an Action element to allow or deny permission to call this action.
503//
504//    * Constrain the following parameters by using a Condition element with
505//    the appropriate keys. activityType.name: String constraint. The key is
506//    swf:activityType.name. activityType.version: String constraint. The key
507//    is swf:activityType.version.
508//
509// If the caller doesn't have sufficient permissions to invoke the action, or
510// the parameter values fall outside the specified constraints, the action fails.
511// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
512// For details and example IAM policies, see Using IAM to Manage Access to Amazon
513// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
514// in the Amazon SWF Developer Guide.
515//
516// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
517// with awserr.Error's Code and Message methods to get detailed information about
518// the error.
519//
520// See the AWS API reference guide for Amazon Simple Workflow Service's
521// API operation DeprecateActivityType for usage and error information.
522//
523// Returned Error Codes:
524//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
525//   Returned when the named resource cannot be found with in the scope of this
526//   operation (region or domain). This could happen if the named resource was
527//   never created or is no longer available for this operation.
528//
529//   * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault"
530//   Returned when the specified activity or workflow type was already deprecated.
531//
532//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
533//   Returned when the caller doesn't have sufficient permissions to invoke the
534//   action.
535//
536func (c *SWF) DeprecateActivityType(input *DeprecateActivityTypeInput) (*DeprecateActivityTypeOutput, error) {
537	req, out := c.DeprecateActivityTypeRequest(input)
538	return out, req.Send()
539}
540
541// DeprecateActivityTypeWithContext is the same as DeprecateActivityType with the addition of
542// the ability to pass a context and additional request options.
543//
544// See DeprecateActivityType for details on how to use this API operation.
545//
546// The context must be non-nil and will be used for request cancellation. If
547// the context is nil a panic will occur. In the future the SDK may create
548// sub-contexts for http.Requests. See https://golang.org/pkg/context/
549// for more information on using Contexts.
550func (c *SWF) DeprecateActivityTypeWithContext(ctx aws.Context, input *DeprecateActivityTypeInput, opts ...request.Option) (*DeprecateActivityTypeOutput, error) {
551	req, out := c.DeprecateActivityTypeRequest(input)
552	req.SetContext(ctx)
553	req.ApplyOptions(opts...)
554	return out, req.Send()
555}
556
557const opDeprecateDomain = "DeprecateDomain"
558
559// DeprecateDomainRequest generates a "aws/request.Request" representing the
560// client's request for the DeprecateDomain operation. The "output" return
561// value will be populated with the request's response once the request completes
562// successfully.
563//
564// Use "Send" method on the returned Request to send the API call to the service.
565// the "output" return value is not valid until after Send returns without error.
566//
567// See DeprecateDomain for more information on using the DeprecateDomain
568// API call, and error handling.
569//
570// This method is useful when you want to inject custom logic or configuration
571// into the SDK's request lifecycle. Such as custom headers, or retry logic.
572//
573//
574//    // Example sending a request using the DeprecateDomainRequest method.
575//    req, resp := client.DeprecateDomainRequest(params)
576//
577//    err := req.Send()
578//    if err == nil { // resp is now filled
579//        fmt.Println(resp)
580//    }
581func (c *SWF) DeprecateDomainRequest(input *DeprecateDomainInput) (req *request.Request, output *DeprecateDomainOutput) {
582	op := &request.Operation{
583		Name:       opDeprecateDomain,
584		HTTPMethod: "POST",
585		HTTPPath:   "/",
586	}
587
588	if input == nil {
589		input = &DeprecateDomainInput{}
590	}
591
592	output = &DeprecateDomainOutput{}
593	req = c.newRequest(op, input, output)
594	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
595	return
596}
597
598// DeprecateDomain API operation for Amazon Simple Workflow Service.
599//
600// Deprecates the specified domain. After a domain has been deprecated it cannot
601// be used to create new workflow executions or register new types. However,
602// you can still use visibility actions on this domain. Deprecating a domain
603// also deprecates all activity and workflow types registered in the domain.
604// Executions that were started before the domain was deprecated continues to
605// run.
606//
607// This operation is eventually consistent. The results are best effort and
608// may not exactly reflect recent updates and changes.
609//
610// Access Control
611//
612// You can use IAM policies to control this action's access to Amazon SWF resources
613// as follows:
614//
615//    * Use a Resource element with the domain name to limit the action to only
616//    specified domains.
617//
618//    * Use an Action element to allow or deny permission to call this action.
619//
620//    * You cannot use an IAM policy to constrain this action's parameters.
621//
622// If the caller doesn't have sufficient permissions to invoke the action, or
623// the parameter values fall outside the specified constraints, the action fails.
624// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
625// For details and example IAM policies, see Using IAM to Manage Access to Amazon
626// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
627// in the Amazon SWF Developer Guide.
628//
629// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
630// with awserr.Error's Code and Message methods to get detailed information about
631// the error.
632//
633// See the AWS API reference guide for Amazon Simple Workflow Service's
634// API operation DeprecateDomain for usage and error information.
635//
636// Returned Error Codes:
637//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
638//   Returned when the named resource cannot be found with in the scope of this
639//   operation (region or domain). This could happen if the named resource was
640//   never created or is no longer available for this operation.
641//
642//   * ErrCodeDomainDeprecatedFault "DomainDeprecatedFault"
643//   Returned when the specified domain has been deprecated.
644//
645//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
646//   Returned when the caller doesn't have sufficient permissions to invoke the
647//   action.
648//
649func (c *SWF) DeprecateDomain(input *DeprecateDomainInput) (*DeprecateDomainOutput, error) {
650	req, out := c.DeprecateDomainRequest(input)
651	return out, req.Send()
652}
653
654// DeprecateDomainWithContext is the same as DeprecateDomain with the addition of
655// the ability to pass a context and additional request options.
656//
657// See DeprecateDomain for details on how to use this API operation.
658//
659// The context must be non-nil and will be used for request cancellation. If
660// the context is nil a panic will occur. In the future the SDK may create
661// sub-contexts for http.Requests. See https://golang.org/pkg/context/
662// for more information on using Contexts.
663func (c *SWF) DeprecateDomainWithContext(ctx aws.Context, input *DeprecateDomainInput, opts ...request.Option) (*DeprecateDomainOutput, error) {
664	req, out := c.DeprecateDomainRequest(input)
665	req.SetContext(ctx)
666	req.ApplyOptions(opts...)
667	return out, req.Send()
668}
669
670const opDeprecateWorkflowType = "DeprecateWorkflowType"
671
672// DeprecateWorkflowTypeRequest generates a "aws/request.Request" representing the
673// client's request for the DeprecateWorkflowType operation. The "output" return
674// value will be populated with the request's response once the request completes
675// successfully.
676//
677// Use "Send" method on the returned Request to send the API call to the service.
678// the "output" return value is not valid until after Send returns without error.
679//
680// See DeprecateWorkflowType for more information on using the DeprecateWorkflowType
681// API call, and error handling.
682//
683// This method is useful when you want to inject custom logic or configuration
684// into the SDK's request lifecycle. Such as custom headers, or retry logic.
685//
686//
687//    // Example sending a request using the DeprecateWorkflowTypeRequest method.
688//    req, resp := client.DeprecateWorkflowTypeRequest(params)
689//
690//    err := req.Send()
691//    if err == nil { // resp is now filled
692//        fmt.Println(resp)
693//    }
694func (c *SWF) DeprecateWorkflowTypeRequest(input *DeprecateWorkflowTypeInput) (req *request.Request, output *DeprecateWorkflowTypeOutput) {
695	op := &request.Operation{
696		Name:       opDeprecateWorkflowType,
697		HTTPMethod: "POST",
698		HTTPPath:   "/",
699	}
700
701	if input == nil {
702		input = &DeprecateWorkflowTypeInput{}
703	}
704
705	output = &DeprecateWorkflowTypeOutput{}
706	req = c.newRequest(op, input, output)
707	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
708	return
709}
710
711// DeprecateWorkflowType API operation for Amazon Simple Workflow Service.
712//
713// Deprecates the specified workflow type. After a workflow type has been deprecated,
714// you cannot create new executions of that type. Executions that were started
715// before the type was deprecated continues to run. A deprecated workflow type
716// may still be used when calling visibility actions.
717//
718// This operation is eventually consistent. The results are best effort and
719// may not exactly reflect recent updates and changes.
720//
721// Access Control
722//
723// You can use IAM policies to control this action's access to Amazon SWF resources
724// as follows:
725//
726//    * Use a Resource element with the domain name to limit the action to only
727//    specified domains.
728//
729//    * Use an Action element to allow or deny permission to call this action.
730//
731//    * Constrain the following parameters by using a Condition element with
732//    the appropriate keys. workflowType.name: String constraint. The key is
733//    swf:workflowType.name. workflowType.version: String constraint. The key
734//    is swf:workflowType.version.
735//
736// If the caller doesn't have sufficient permissions to invoke the action, or
737// the parameter values fall outside the specified constraints, the action fails.
738// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
739// For details and example IAM policies, see Using IAM to Manage Access to Amazon
740// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
741// in the Amazon SWF Developer Guide.
742//
743// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
744// with awserr.Error's Code and Message methods to get detailed information about
745// the error.
746//
747// See the AWS API reference guide for Amazon Simple Workflow Service's
748// API operation DeprecateWorkflowType for usage and error information.
749//
750// Returned Error Codes:
751//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
752//   Returned when the named resource cannot be found with in the scope of this
753//   operation (region or domain). This could happen if the named resource was
754//   never created or is no longer available for this operation.
755//
756//   * ErrCodeTypeDeprecatedFault "TypeDeprecatedFault"
757//   Returned when the specified activity or workflow type was already deprecated.
758//
759//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
760//   Returned when the caller doesn't have sufficient permissions to invoke the
761//   action.
762//
763func (c *SWF) DeprecateWorkflowType(input *DeprecateWorkflowTypeInput) (*DeprecateWorkflowTypeOutput, error) {
764	req, out := c.DeprecateWorkflowTypeRequest(input)
765	return out, req.Send()
766}
767
768// DeprecateWorkflowTypeWithContext is the same as DeprecateWorkflowType with the addition of
769// the ability to pass a context and additional request options.
770//
771// See DeprecateWorkflowType for details on how to use this API operation.
772//
773// The context must be non-nil and will be used for request cancellation. If
774// the context is nil a panic will occur. In the future the SDK may create
775// sub-contexts for http.Requests. See https://golang.org/pkg/context/
776// for more information on using Contexts.
777func (c *SWF) DeprecateWorkflowTypeWithContext(ctx aws.Context, input *DeprecateWorkflowTypeInput, opts ...request.Option) (*DeprecateWorkflowTypeOutput, error) {
778	req, out := c.DeprecateWorkflowTypeRequest(input)
779	req.SetContext(ctx)
780	req.ApplyOptions(opts...)
781	return out, req.Send()
782}
783
784const opDescribeActivityType = "DescribeActivityType"
785
786// DescribeActivityTypeRequest generates a "aws/request.Request" representing the
787// client's request for the DescribeActivityType operation. The "output" return
788// value will be populated with the request's response once the request completes
789// successfully.
790//
791// Use "Send" method on the returned Request to send the API call to the service.
792// the "output" return value is not valid until after Send returns without error.
793//
794// See DescribeActivityType for more information on using the DescribeActivityType
795// API call, and error handling.
796//
797// This method is useful when you want to inject custom logic or configuration
798// into the SDK's request lifecycle. Such as custom headers, or retry logic.
799//
800//
801//    // Example sending a request using the DescribeActivityTypeRequest method.
802//    req, resp := client.DescribeActivityTypeRequest(params)
803//
804//    err := req.Send()
805//    if err == nil { // resp is now filled
806//        fmt.Println(resp)
807//    }
808func (c *SWF) DescribeActivityTypeRequest(input *DescribeActivityTypeInput) (req *request.Request, output *DescribeActivityTypeOutput) {
809	op := &request.Operation{
810		Name:       opDescribeActivityType,
811		HTTPMethod: "POST",
812		HTTPPath:   "/",
813	}
814
815	if input == nil {
816		input = &DescribeActivityTypeInput{}
817	}
818
819	output = &DescribeActivityTypeOutput{}
820	req = c.newRequest(op, input, output)
821	return
822}
823
824// DescribeActivityType API operation for Amazon Simple Workflow Service.
825//
826// Returns information about the specified activity type. This includes configuration
827// settings provided when the type was registered and other general information
828// about the type.
829//
830// Access Control
831//
832// You can use IAM policies to control this action's access to Amazon SWF resources
833// as follows:
834//
835//    * Use a Resource element with the domain name to limit the action to only
836//    specified domains.
837//
838//    * Use an Action element to allow or deny permission to call this action.
839//
840//    * Constrain the following parameters by using a Condition element with
841//    the appropriate keys. activityType.name: String constraint. The key is
842//    swf:activityType.name. activityType.version: String constraint. The key
843//    is swf:activityType.version.
844//
845// If the caller doesn't have sufficient permissions to invoke the action, or
846// the parameter values fall outside the specified constraints, the action fails.
847// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
848// For details and example IAM policies, see Using IAM to Manage Access to Amazon
849// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
850// in the Amazon SWF Developer Guide.
851//
852// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
853// with awserr.Error's Code and Message methods to get detailed information about
854// the error.
855//
856// See the AWS API reference guide for Amazon Simple Workflow Service's
857// API operation DescribeActivityType for usage and error information.
858//
859// Returned Error Codes:
860//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
861//   Returned when the named resource cannot be found with in the scope of this
862//   operation (region or domain). This could happen if the named resource was
863//   never created or is no longer available for this operation.
864//
865//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
866//   Returned when the caller doesn't have sufficient permissions to invoke the
867//   action.
868//
869func (c *SWF) DescribeActivityType(input *DescribeActivityTypeInput) (*DescribeActivityTypeOutput, error) {
870	req, out := c.DescribeActivityTypeRequest(input)
871	return out, req.Send()
872}
873
874// DescribeActivityTypeWithContext is the same as DescribeActivityType with the addition of
875// the ability to pass a context and additional request options.
876//
877// See DescribeActivityType for details on how to use this API operation.
878//
879// The context must be non-nil and will be used for request cancellation. If
880// the context is nil a panic will occur. In the future the SDK may create
881// sub-contexts for http.Requests. See https://golang.org/pkg/context/
882// for more information on using Contexts.
883func (c *SWF) DescribeActivityTypeWithContext(ctx aws.Context, input *DescribeActivityTypeInput, opts ...request.Option) (*DescribeActivityTypeOutput, error) {
884	req, out := c.DescribeActivityTypeRequest(input)
885	req.SetContext(ctx)
886	req.ApplyOptions(opts...)
887	return out, req.Send()
888}
889
890const opDescribeDomain = "DescribeDomain"
891
892// DescribeDomainRequest generates a "aws/request.Request" representing the
893// client's request for the DescribeDomain operation. The "output" return
894// value will be populated with the request's response once the request completes
895// successfully.
896//
897// Use "Send" method on the returned Request to send the API call to the service.
898// the "output" return value is not valid until after Send returns without error.
899//
900// See DescribeDomain for more information on using the DescribeDomain
901// API call, and error handling.
902//
903// This method is useful when you want to inject custom logic or configuration
904// into the SDK's request lifecycle. Such as custom headers, or retry logic.
905//
906//
907//    // Example sending a request using the DescribeDomainRequest method.
908//    req, resp := client.DescribeDomainRequest(params)
909//
910//    err := req.Send()
911//    if err == nil { // resp is now filled
912//        fmt.Println(resp)
913//    }
914func (c *SWF) DescribeDomainRequest(input *DescribeDomainInput) (req *request.Request, output *DescribeDomainOutput) {
915	op := &request.Operation{
916		Name:       opDescribeDomain,
917		HTTPMethod: "POST",
918		HTTPPath:   "/",
919	}
920
921	if input == nil {
922		input = &DescribeDomainInput{}
923	}
924
925	output = &DescribeDomainOutput{}
926	req = c.newRequest(op, input, output)
927	return
928}
929
930// DescribeDomain API operation for Amazon Simple Workflow Service.
931//
932// Returns information about the specified domain, including description and
933// status.
934//
935// Access Control
936//
937// You can use IAM policies to control this action's access to Amazon SWF resources
938// as follows:
939//
940//    * Use a Resource element with the domain name to limit the action to only
941//    specified domains.
942//
943//    * Use an Action element to allow or deny permission to call this action.
944//
945//    * You cannot use an IAM policy to constrain this action's parameters.
946//
947// If the caller doesn't have sufficient permissions to invoke the action, or
948// the parameter values fall outside the specified constraints, the action fails.
949// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
950// For details and example IAM policies, see Using IAM to Manage Access to Amazon
951// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
952// in the Amazon SWF Developer Guide.
953//
954// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
955// with awserr.Error's Code and Message methods to get detailed information about
956// the error.
957//
958// See the AWS API reference guide for Amazon Simple Workflow Service's
959// API operation DescribeDomain for usage and error information.
960//
961// Returned Error Codes:
962//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
963//   Returned when the named resource cannot be found with in the scope of this
964//   operation (region or domain). This could happen if the named resource was
965//   never created or is no longer available for this operation.
966//
967//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
968//   Returned when the caller doesn't have sufficient permissions to invoke the
969//   action.
970//
971func (c *SWF) DescribeDomain(input *DescribeDomainInput) (*DescribeDomainOutput, error) {
972	req, out := c.DescribeDomainRequest(input)
973	return out, req.Send()
974}
975
976// DescribeDomainWithContext is the same as DescribeDomain with the addition of
977// the ability to pass a context and additional request options.
978//
979// See DescribeDomain for details on how to use this API operation.
980//
981// The context must be non-nil and will be used for request cancellation. If
982// the context is nil a panic will occur. In the future the SDK may create
983// sub-contexts for http.Requests. See https://golang.org/pkg/context/
984// for more information on using Contexts.
985func (c *SWF) DescribeDomainWithContext(ctx aws.Context, input *DescribeDomainInput, opts ...request.Option) (*DescribeDomainOutput, error) {
986	req, out := c.DescribeDomainRequest(input)
987	req.SetContext(ctx)
988	req.ApplyOptions(opts...)
989	return out, req.Send()
990}
991
992const opDescribeWorkflowExecution = "DescribeWorkflowExecution"
993
994// DescribeWorkflowExecutionRequest generates a "aws/request.Request" representing the
995// client's request for the DescribeWorkflowExecution operation. The "output" return
996// value will be populated with the request's response once the request completes
997// successfully.
998//
999// Use "Send" method on the returned Request to send the API call to the service.
1000// the "output" return value is not valid until after Send returns without error.
1001//
1002// See DescribeWorkflowExecution for more information on using the DescribeWorkflowExecution
1003// API call, and error handling.
1004//
1005// This method is useful when you want to inject custom logic or configuration
1006// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1007//
1008//
1009//    // Example sending a request using the DescribeWorkflowExecutionRequest method.
1010//    req, resp := client.DescribeWorkflowExecutionRequest(params)
1011//
1012//    err := req.Send()
1013//    if err == nil { // resp is now filled
1014//        fmt.Println(resp)
1015//    }
1016func (c *SWF) DescribeWorkflowExecutionRequest(input *DescribeWorkflowExecutionInput) (req *request.Request, output *DescribeWorkflowExecutionOutput) {
1017	op := &request.Operation{
1018		Name:       opDescribeWorkflowExecution,
1019		HTTPMethod: "POST",
1020		HTTPPath:   "/",
1021	}
1022
1023	if input == nil {
1024		input = &DescribeWorkflowExecutionInput{}
1025	}
1026
1027	output = &DescribeWorkflowExecutionOutput{}
1028	req = c.newRequest(op, input, output)
1029	return
1030}
1031
1032// DescribeWorkflowExecution API operation for Amazon Simple Workflow Service.
1033//
1034// Returns information about the specified workflow execution including its
1035// type and some statistics.
1036//
1037// This operation is eventually consistent. The results are best effort and
1038// may not exactly reflect recent updates and changes.
1039//
1040// Access Control
1041//
1042// You can use IAM policies to control this action's access to Amazon SWF resources
1043// as follows:
1044//
1045//    * Use a Resource element with the domain name to limit the action to only
1046//    specified domains.
1047//
1048//    * Use an Action element to allow or deny permission to call this action.
1049//
1050//    * You cannot use an IAM policy to constrain this action's parameters.
1051//
1052// If the caller doesn't have sufficient permissions to invoke the action, or
1053// the parameter values fall outside the specified constraints, the action fails.
1054// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
1055// For details and example IAM policies, see Using IAM to Manage Access to Amazon
1056// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
1057// in the Amazon SWF Developer Guide.
1058//
1059// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1060// with awserr.Error's Code and Message methods to get detailed information about
1061// the error.
1062//
1063// See the AWS API reference guide for Amazon Simple Workflow Service's
1064// API operation DescribeWorkflowExecution for usage and error information.
1065//
1066// Returned Error Codes:
1067//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
1068//   Returned when the named resource cannot be found with in the scope of this
1069//   operation (region or domain). This could happen if the named resource was
1070//   never created or is no longer available for this operation.
1071//
1072//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
1073//   Returned when the caller doesn't have sufficient permissions to invoke the
1074//   action.
1075//
1076func (c *SWF) DescribeWorkflowExecution(input *DescribeWorkflowExecutionInput) (*DescribeWorkflowExecutionOutput, error) {
1077	req, out := c.DescribeWorkflowExecutionRequest(input)
1078	return out, req.Send()
1079}
1080
1081// DescribeWorkflowExecutionWithContext is the same as DescribeWorkflowExecution with the addition of
1082// the ability to pass a context and additional request options.
1083//
1084// See DescribeWorkflowExecution for details on how to use this API operation.
1085//
1086// The context must be non-nil and will be used for request cancellation. If
1087// the context is nil a panic will occur. In the future the SDK may create
1088// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1089// for more information on using Contexts.
1090func (c *SWF) DescribeWorkflowExecutionWithContext(ctx aws.Context, input *DescribeWorkflowExecutionInput, opts ...request.Option) (*DescribeWorkflowExecutionOutput, error) {
1091	req, out := c.DescribeWorkflowExecutionRequest(input)
1092	req.SetContext(ctx)
1093	req.ApplyOptions(opts...)
1094	return out, req.Send()
1095}
1096
1097const opDescribeWorkflowType = "DescribeWorkflowType"
1098
1099// DescribeWorkflowTypeRequest generates a "aws/request.Request" representing the
1100// client's request for the DescribeWorkflowType operation. The "output" return
1101// value will be populated with the request's response once the request completes
1102// successfully.
1103//
1104// Use "Send" method on the returned Request to send the API call to the service.
1105// the "output" return value is not valid until after Send returns without error.
1106//
1107// See DescribeWorkflowType for more information on using the DescribeWorkflowType
1108// API call, and error handling.
1109//
1110// This method is useful when you want to inject custom logic or configuration
1111// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1112//
1113//
1114//    // Example sending a request using the DescribeWorkflowTypeRequest method.
1115//    req, resp := client.DescribeWorkflowTypeRequest(params)
1116//
1117//    err := req.Send()
1118//    if err == nil { // resp is now filled
1119//        fmt.Println(resp)
1120//    }
1121func (c *SWF) DescribeWorkflowTypeRequest(input *DescribeWorkflowTypeInput) (req *request.Request, output *DescribeWorkflowTypeOutput) {
1122	op := &request.Operation{
1123		Name:       opDescribeWorkflowType,
1124		HTTPMethod: "POST",
1125		HTTPPath:   "/",
1126	}
1127
1128	if input == nil {
1129		input = &DescribeWorkflowTypeInput{}
1130	}
1131
1132	output = &DescribeWorkflowTypeOutput{}
1133	req = c.newRequest(op, input, output)
1134	return
1135}
1136
1137// DescribeWorkflowType API operation for Amazon Simple Workflow Service.
1138//
1139// Returns information about the specified workflow type. This includes configuration
1140// settings specified when the type was registered and other information such
1141// as creation date, current status, etc.
1142//
1143// Access Control
1144//
1145// You can use IAM policies to control this action's access to Amazon SWF resources
1146// as follows:
1147//
1148//    * Use a Resource element with the domain name to limit the action to only
1149//    specified domains.
1150//
1151//    * Use an Action element to allow or deny permission to call this action.
1152//
1153//    * Constrain the following parameters by using a Condition element with
1154//    the appropriate keys. workflowType.name: String constraint. The key is
1155//    swf:workflowType.name. workflowType.version: String constraint. The key
1156//    is swf:workflowType.version.
1157//
1158// If the caller doesn't have sufficient permissions to invoke the action, or
1159// the parameter values fall outside the specified constraints, the action fails.
1160// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
1161// For details and example IAM policies, see Using IAM to Manage Access to Amazon
1162// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
1163// in the Amazon SWF Developer Guide.
1164//
1165// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1166// with awserr.Error's Code and Message methods to get detailed information about
1167// the error.
1168//
1169// See the AWS API reference guide for Amazon Simple Workflow Service's
1170// API operation DescribeWorkflowType for usage and error information.
1171//
1172// Returned Error Codes:
1173//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
1174//   Returned when the named resource cannot be found with in the scope of this
1175//   operation (region or domain). This could happen if the named resource was
1176//   never created or is no longer available for this operation.
1177//
1178//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
1179//   Returned when the caller doesn't have sufficient permissions to invoke the
1180//   action.
1181//
1182func (c *SWF) DescribeWorkflowType(input *DescribeWorkflowTypeInput) (*DescribeWorkflowTypeOutput, error) {
1183	req, out := c.DescribeWorkflowTypeRequest(input)
1184	return out, req.Send()
1185}
1186
1187// DescribeWorkflowTypeWithContext is the same as DescribeWorkflowType with the addition of
1188// the ability to pass a context and additional request options.
1189//
1190// See DescribeWorkflowType for details on how to use this API operation.
1191//
1192// The context must be non-nil and will be used for request cancellation. If
1193// the context is nil a panic will occur. In the future the SDK may create
1194// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1195// for more information on using Contexts.
1196func (c *SWF) DescribeWorkflowTypeWithContext(ctx aws.Context, input *DescribeWorkflowTypeInput, opts ...request.Option) (*DescribeWorkflowTypeOutput, error) {
1197	req, out := c.DescribeWorkflowTypeRequest(input)
1198	req.SetContext(ctx)
1199	req.ApplyOptions(opts...)
1200	return out, req.Send()
1201}
1202
1203const opGetWorkflowExecutionHistory = "GetWorkflowExecutionHistory"
1204
1205// GetWorkflowExecutionHistoryRequest generates a "aws/request.Request" representing the
1206// client's request for the GetWorkflowExecutionHistory operation. The "output" return
1207// value will be populated with the request's response once the request completes
1208// successfully.
1209//
1210// Use "Send" method on the returned Request to send the API call to the service.
1211// the "output" return value is not valid until after Send returns without error.
1212//
1213// See GetWorkflowExecutionHistory for more information on using the GetWorkflowExecutionHistory
1214// API call, and error handling.
1215//
1216// This method is useful when you want to inject custom logic or configuration
1217// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1218//
1219//
1220//    // Example sending a request using the GetWorkflowExecutionHistoryRequest method.
1221//    req, resp := client.GetWorkflowExecutionHistoryRequest(params)
1222//
1223//    err := req.Send()
1224//    if err == nil { // resp is now filled
1225//        fmt.Println(resp)
1226//    }
1227func (c *SWF) GetWorkflowExecutionHistoryRequest(input *GetWorkflowExecutionHistoryInput) (req *request.Request, output *GetWorkflowExecutionHistoryOutput) {
1228	op := &request.Operation{
1229		Name:       opGetWorkflowExecutionHistory,
1230		HTTPMethod: "POST",
1231		HTTPPath:   "/",
1232		Paginator: &request.Paginator{
1233			InputTokens:     []string{"nextPageToken"},
1234			OutputTokens:    []string{"nextPageToken"},
1235			LimitToken:      "maximumPageSize",
1236			TruncationToken: "",
1237		},
1238	}
1239
1240	if input == nil {
1241		input = &GetWorkflowExecutionHistoryInput{}
1242	}
1243
1244	output = &GetWorkflowExecutionHistoryOutput{}
1245	req = c.newRequest(op, input, output)
1246	return
1247}
1248
1249// GetWorkflowExecutionHistory API operation for Amazon Simple Workflow Service.
1250//
1251// Returns the history of the specified workflow execution. The results may
1252// be split into multiple pages. To retrieve subsequent pages, make the call
1253// again using the nextPageToken returned by the initial call.
1254//
1255// This operation is eventually consistent. The results are best effort and
1256// may not exactly reflect recent updates and changes.
1257//
1258// Access Control
1259//
1260// You can use IAM policies to control this action's access to Amazon SWF resources
1261// as follows:
1262//
1263//    * Use a Resource element with the domain name to limit the action to only
1264//    specified domains.
1265//
1266//    * Use an Action element to allow or deny permission to call this action.
1267//
1268//    * You cannot use an IAM policy to constrain this action's parameters.
1269//
1270// If the caller doesn't have sufficient permissions to invoke the action, or
1271// the parameter values fall outside the specified constraints, the action fails.
1272// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
1273// For details and example IAM policies, see Using IAM to Manage Access to Amazon
1274// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
1275// in the Amazon SWF Developer Guide.
1276//
1277// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1278// with awserr.Error's Code and Message methods to get detailed information about
1279// the error.
1280//
1281// See the AWS API reference guide for Amazon Simple Workflow Service's
1282// API operation GetWorkflowExecutionHistory for usage and error information.
1283//
1284// Returned Error Codes:
1285//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
1286//   Returned when the named resource cannot be found with in the scope of this
1287//   operation (region or domain). This could happen if the named resource was
1288//   never created or is no longer available for this operation.
1289//
1290//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
1291//   Returned when the caller doesn't have sufficient permissions to invoke the
1292//   action.
1293//
1294func (c *SWF) GetWorkflowExecutionHistory(input *GetWorkflowExecutionHistoryInput) (*GetWorkflowExecutionHistoryOutput, error) {
1295	req, out := c.GetWorkflowExecutionHistoryRequest(input)
1296	return out, req.Send()
1297}
1298
1299// GetWorkflowExecutionHistoryWithContext is the same as GetWorkflowExecutionHistory with the addition of
1300// the ability to pass a context and additional request options.
1301//
1302// See GetWorkflowExecutionHistory for details on how to use this API operation.
1303//
1304// The context must be non-nil and will be used for request cancellation. If
1305// the context is nil a panic will occur. In the future the SDK may create
1306// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1307// for more information on using Contexts.
1308func (c *SWF) GetWorkflowExecutionHistoryWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, opts ...request.Option) (*GetWorkflowExecutionHistoryOutput, error) {
1309	req, out := c.GetWorkflowExecutionHistoryRequest(input)
1310	req.SetContext(ctx)
1311	req.ApplyOptions(opts...)
1312	return out, req.Send()
1313}
1314
1315// GetWorkflowExecutionHistoryPages iterates over the pages of a GetWorkflowExecutionHistory operation,
1316// calling the "fn" function with the response data for each page. To stop
1317// iterating, return false from the fn function.
1318//
1319// See GetWorkflowExecutionHistory method for more information on how to use this operation.
1320//
1321// Note: This operation can generate multiple requests to a service.
1322//
1323//    // Example iterating over at most 3 pages of a GetWorkflowExecutionHistory operation.
1324//    pageNum := 0
1325//    err := client.GetWorkflowExecutionHistoryPages(params,
1326//        func(page *swf.GetWorkflowExecutionHistoryOutput, lastPage bool) bool {
1327//            pageNum++
1328//            fmt.Println(page)
1329//            return pageNum <= 3
1330//        })
1331//
1332func (c *SWF) GetWorkflowExecutionHistoryPages(input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool) error {
1333	return c.GetWorkflowExecutionHistoryPagesWithContext(aws.BackgroundContext(), input, fn)
1334}
1335
1336// GetWorkflowExecutionHistoryPagesWithContext same as GetWorkflowExecutionHistoryPages except
1337// it takes a Context and allows setting request options on the pages.
1338//
1339// The context must be non-nil and will be used for request cancellation. If
1340// the context is nil a panic will occur. In the future the SDK may create
1341// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1342// for more information on using Contexts.
1343func (c *SWF) GetWorkflowExecutionHistoryPagesWithContext(ctx aws.Context, input *GetWorkflowExecutionHistoryInput, fn func(*GetWorkflowExecutionHistoryOutput, bool) bool, opts ...request.Option) error {
1344	p := request.Pagination{
1345		NewRequest: func() (*request.Request, error) {
1346			var inCpy *GetWorkflowExecutionHistoryInput
1347			if input != nil {
1348				tmp := *input
1349				inCpy = &tmp
1350			}
1351			req, _ := c.GetWorkflowExecutionHistoryRequest(inCpy)
1352			req.SetContext(ctx)
1353			req.ApplyOptions(opts...)
1354			return req, nil
1355		},
1356	}
1357
1358	for p.Next() {
1359		if !fn(p.Page().(*GetWorkflowExecutionHistoryOutput), !p.HasNextPage()) {
1360			break
1361		}
1362	}
1363
1364	return p.Err()
1365}
1366
1367const opListActivityTypes = "ListActivityTypes"
1368
1369// ListActivityTypesRequest generates a "aws/request.Request" representing the
1370// client's request for the ListActivityTypes operation. The "output" return
1371// value will be populated with the request's response once the request completes
1372// successfully.
1373//
1374// Use "Send" method on the returned Request to send the API call to the service.
1375// the "output" return value is not valid until after Send returns without error.
1376//
1377// See ListActivityTypes for more information on using the ListActivityTypes
1378// API call, and error handling.
1379//
1380// This method is useful when you want to inject custom logic or configuration
1381// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1382//
1383//
1384//    // Example sending a request using the ListActivityTypesRequest method.
1385//    req, resp := client.ListActivityTypesRequest(params)
1386//
1387//    err := req.Send()
1388//    if err == nil { // resp is now filled
1389//        fmt.Println(resp)
1390//    }
1391func (c *SWF) ListActivityTypesRequest(input *ListActivityTypesInput) (req *request.Request, output *ListActivityTypesOutput) {
1392	op := &request.Operation{
1393		Name:       opListActivityTypes,
1394		HTTPMethod: "POST",
1395		HTTPPath:   "/",
1396		Paginator: &request.Paginator{
1397			InputTokens:     []string{"nextPageToken"},
1398			OutputTokens:    []string{"nextPageToken"},
1399			LimitToken:      "maximumPageSize",
1400			TruncationToken: "",
1401		},
1402	}
1403
1404	if input == nil {
1405		input = &ListActivityTypesInput{}
1406	}
1407
1408	output = &ListActivityTypesOutput{}
1409	req = c.newRequest(op, input, output)
1410	return
1411}
1412
1413// ListActivityTypes API operation for Amazon Simple Workflow Service.
1414//
1415// Returns information about all activities registered in the specified domain
1416// that match the specified name and registration status. The result includes
1417// information like creation date, current status of the activity, etc. The
1418// results may be split into multiple pages. To retrieve subsequent pages, make
1419// the call again using the nextPageToken returned by the initial call.
1420//
1421// Access Control
1422//
1423// You can use IAM policies to control this action's access to Amazon SWF resources
1424// as follows:
1425//
1426//    * Use a Resource element with the domain name to limit the action to only
1427//    specified domains.
1428//
1429//    * Use an Action element to allow or deny permission to call this action.
1430//
1431//    * You cannot use an IAM policy to constrain this action's parameters.
1432//
1433// If the caller doesn't have sufficient permissions to invoke the action, or
1434// the parameter values fall outside the specified constraints, the action fails.
1435// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
1436// For details and example IAM policies, see Using IAM to Manage Access to Amazon
1437// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
1438// in the Amazon SWF Developer Guide.
1439//
1440// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1441// with awserr.Error's Code and Message methods to get detailed information about
1442// the error.
1443//
1444// See the AWS API reference guide for Amazon Simple Workflow Service's
1445// API operation ListActivityTypes for usage and error information.
1446//
1447// Returned Error Codes:
1448//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
1449//   Returned when the caller doesn't have sufficient permissions to invoke the
1450//   action.
1451//
1452//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
1453//   Returned when the named resource cannot be found with in the scope of this
1454//   operation (region or domain). This could happen if the named resource was
1455//   never created or is no longer available for this operation.
1456//
1457func (c *SWF) ListActivityTypes(input *ListActivityTypesInput) (*ListActivityTypesOutput, error) {
1458	req, out := c.ListActivityTypesRequest(input)
1459	return out, req.Send()
1460}
1461
1462// ListActivityTypesWithContext is the same as ListActivityTypes with the addition of
1463// the ability to pass a context and additional request options.
1464//
1465// See ListActivityTypes for details on how to use this API operation.
1466//
1467// The context must be non-nil and will be used for request cancellation. If
1468// the context is nil a panic will occur. In the future the SDK may create
1469// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1470// for more information on using Contexts.
1471func (c *SWF) ListActivityTypesWithContext(ctx aws.Context, input *ListActivityTypesInput, opts ...request.Option) (*ListActivityTypesOutput, error) {
1472	req, out := c.ListActivityTypesRequest(input)
1473	req.SetContext(ctx)
1474	req.ApplyOptions(opts...)
1475	return out, req.Send()
1476}
1477
1478// ListActivityTypesPages iterates over the pages of a ListActivityTypes operation,
1479// calling the "fn" function with the response data for each page. To stop
1480// iterating, return false from the fn function.
1481//
1482// See ListActivityTypes method for more information on how to use this operation.
1483//
1484// Note: This operation can generate multiple requests to a service.
1485//
1486//    // Example iterating over at most 3 pages of a ListActivityTypes operation.
1487//    pageNum := 0
1488//    err := client.ListActivityTypesPages(params,
1489//        func(page *swf.ListActivityTypesOutput, lastPage bool) bool {
1490//            pageNum++
1491//            fmt.Println(page)
1492//            return pageNum <= 3
1493//        })
1494//
1495func (c *SWF) ListActivityTypesPages(input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool) error {
1496	return c.ListActivityTypesPagesWithContext(aws.BackgroundContext(), input, fn)
1497}
1498
1499// ListActivityTypesPagesWithContext same as ListActivityTypesPages except
1500// it takes a Context and allows setting request options on the pages.
1501//
1502// The context must be non-nil and will be used for request cancellation. If
1503// the context is nil a panic will occur. In the future the SDK may create
1504// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1505// for more information on using Contexts.
1506func (c *SWF) ListActivityTypesPagesWithContext(ctx aws.Context, input *ListActivityTypesInput, fn func(*ListActivityTypesOutput, bool) bool, opts ...request.Option) error {
1507	p := request.Pagination{
1508		NewRequest: func() (*request.Request, error) {
1509			var inCpy *ListActivityTypesInput
1510			if input != nil {
1511				tmp := *input
1512				inCpy = &tmp
1513			}
1514			req, _ := c.ListActivityTypesRequest(inCpy)
1515			req.SetContext(ctx)
1516			req.ApplyOptions(opts...)
1517			return req, nil
1518		},
1519	}
1520
1521	for p.Next() {
1522		if !fn(p.Page().(*ListActivityTypesOutput), !p.HasNextPage()) {
1523			break
1524		}
1525	}
1526
1527	return p.Err()
1528}
1529
1530const opListClosedWorkflowExecutions = "ListClosedWorkflowExecutions"
1531
1532// ListClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the
1533// client's request for the ListClosedWorkflowExecutions operation. The "output" return
1534// value will be populated with the request's response once the request completes
1535// successfully.
1536//
1537// Use "Send" method on the returned Request to send the API call to the service.
1538// the "output" return value is not valid until after Send returns without error.
1539//
1540// See ListClosedWorkflowExecutions for more information on using the ListClosedWorkflowExecutions
1541// API call, and error handling.
1542//
1543// This method is useful when you want to inject custom logic or configuration
1544// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1545//
1546//
1547//    // Example sending a request using the ListClosedWorkflowExecutionsRequest method.
1548//    req, resp := client.ListClosedWorkflowExecutionsRequest(params)
1549//
1550//    err := req.Send()
1551//    if err == nil { // resp is now filled
1552//        fmt.Println(resp)
1553//    }
1554func (c *SWF) ListClosedWorkflowExecutionsRequest(input *ListClosedWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) {
1555	op := &request.Operation{
1556		Name:       opListClosedWorkflowExecutions,
1557		HTTPMethod: "POST",
1558		HTTPPath:   "/",
1559		Paginator: &request.Paginator{
1560			InputTokens:     []string{"nextPageToken"},
1561			OutputTokens:    []string{"nextPageToken"},
1562			LimitToken:      "maximumPageSize",
1563			TruncationToken: "",
1564		},
1565	}
1566
1567	if input == nil {
1568		input = &ListClosedWorkflowExecutionsInput{}
1569	}
1570
1571	output = &WorkflowExecutionInfos{}
1572	req = c.newRequest(op, input, output)
1573	return
1574}
1575
1576// ListClosedWorkflowExecutions API operation for Amazon Simple Workflow Service.
1577//
1578// Returns a list of closed workflow executions in the specified domain that
1579// meet the filtering criteria. The results may be split into multiple pages.
1580// To retrieve subsequent pages, make the call again using the nextPageToken
1581// returned by the initial call.
1582//
1583// This operation is eventually consistent. The results are best effort and
1584// may not exactly reflect recent updates and changes.
1585//
1586// Access Control
1587//
1588// You can use IAM policies to control this action's access to Amazon SWF resources
1589// as follows:
1590//
1591//    * Use a Resource element with the domain name to limit the action to only
1592//    specified domains.
1593//
1594//    * Use an Action element to allow or deny permission to call this action.
1595//
1596//    * Constrain the following parameters by using a Condition element with
1597//    the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
1598//    typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
1599//    String constraint. The key is swf:typeFilter.version.
1600//
1601// If the caller doesn't have sufficient permissions to invoke the action, or
1602// the parameter values fall outside the specified constraints, the action fails.
1603// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
1604// For details and example IAM policies, see Using IAM to Manage Access to Amazon
1605// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
1606// in the Amazon SWF Developer Guide.
1607//
1608// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1609// with awserr.Error's Code and Message methods to get detailed information about
1610// the error.
1611//
1612// See the AWS API reference guide for Amazon Simple Workflow Service's
1613// API operation ListClosedWorkflowExecutions for usage and error information.
1614//
1615// Returned Error Codes:
1616//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
1617//   Returned when the named resource cannot be found with in the scope of this
1618//   operation (region or domain). This could happen if the named resource was
1619//   never created or is no longer available for this operation.
1620//
1621//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
1622//   Returned when the caller doesn't have sufficient permissions to invoke the
1623//   action.
1624//
1625func (c *SWF) ListClosedWorkflowExecutions(input *ListClosedWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) {
1626	req, out := c.ListClosedWorkflowExecutionsRequest(input)
1627	return out, req.Send()
1628}
1629
1630// ListClosedWorkflowExecutionsWithContext is the same as ListClosedWorkflowExecutions with the addition of
1631// the ability to pass a context and additional request options.
1632//
1633// See ListClosedWorkflowExecutions for details on how to use this API operation.
1634//
1635// The context must be non-nil and will be used for request cancellation. If
1636// the context is nil a panic will occur. In the future the SDK may create
1637// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1638// for more information on using Contexts.
1639func (c *SWF) ListClosedWorkflowExecutionsWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) {
1640	req, out := c.ListClosedWorkflowExecutionsRequest(input)
1641	req.SetContext(ctx)
1642	req.ApplyOptions(opts...)
1643	return out, req.Send()
1644}
1645
1646// ListClosedWorkflowExecutionsPages iterates over the pages of a ListClosedWorkflowExecutions operation,
1647// calling the "fn" function with the response data for each page. To stop
1648// iterating, return false from the fn function.
1649//
1650// See ListClosedWorkflowExecutions method for more information on how to use this operation.
1651//
1652// Note: This operation can generate multiple requests to a service.
1653//
1654//    // Example iterating over at most 3 pages of a ListClosedWorkflowExecutions operation.
1655//    pageNum := 0
1656//    err := client.ListClosedWorkflowExecutionsPages(params,
1657//        func(page *swf.WorkflowExecutionInfos, lastPage bool) bool {
1658//            pageNum++
1659//            fmt.Println(page)
1660//            return pageNum <= 3
1661//        })
1662//
1663func (c *SWF) ListClosedWorkflowExecutionsPages(input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error {
1664	return c.ListClosedWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn)
1665}
1666
1667// ListClosedWorkflowExecutionsPagesWithContext same as ListClosedWorkflowExecutionsPages except
1668// it takes a Context and allows setting request options on the pages.
1669//
1670// The context must be non-nil and will be used for request cancellation. If
1671// the context is nil a panic will occur. In the future the SDK may create
1672// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1673// for more information on using Contexts.
1674func (c *SWF) ListClosedWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListClosedWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error {
1675	p := request.Pagination{
1676		NewRequest: func() (*request.Request, error) {
1677			var inCpy *ListClosedWorkflowExecutionsInput
1678			if input != nil {
1679				tmp := *input
1680				inCpy = &tmp
1681			}
1682			req, _ := c.ListClosedWorkflowExecutionsRequest(inCpy)
1683			req.SetContext(ctx)
1684			req.ApplyOptions(opts...)
1685			return req, nil
1686		},
1687	}
1688
1689	for p.Next() {
1690		if !fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) {
1691			break
1692		}
1693	}
1694
1695	return p.Err()
1696}
1697
1698const opListDomains = "ListDomains"
1699
1700// ListDomainsRequest generates a "aws/request.Request" representing the
1701// client's request for the ListDomains operation. The "output" return
1702// value will be populated with the request's response once the request completes
1703// successfully.
1704//
1705// Use "Send" method on the returned Request to send the API call to the service.
1706// the "output" return value is not valid until after Send returns without error.
1707//
1708// See ListDomains for more information on using the ListDomains
1709// API call, and error handling.
1710//
1711// This method is useful when you want to inject custom logic or configuration
1712// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1713//
1714//
1715//    // Example sending a request using the ListDomainsRequest method.
1716//    req, resp := client.ListDomainsRequest(params)
1717//
1718//    err := req.Send()
1719//    if err == nil { // resp is now filled
1720//        fmt.Println(resp)
1721//    }
1722func (c *SWF) ListDomainsRequest(input *ListDomainsInput) (req *request.Request, output *ListDomainsOutput) {
1723	op := &request.Operation{
1724		Name:       opListDomains,
1725		HTTPMethod: "POST",
1726		HTTPPath:   "/",
1727		Paginator: &request.Paginator{
1728			InputTokens:     []string{"nextPageToken"},
1729			OutputTokens:    []string{"nextPageToken"},
1730			LimitToken:      "maximumPageSize",
1731			TruncationToken: "",
1732		},
1733	}
1734
1735	if input == nil {
1736		input = &ListDomainsInput{}
1737	}
1738
1739	output = &ListDomainsOutput{}
1740	req = c.newRequest(op, input, output)
1741	return
1742}
1743
1744// ListDomains API operation for Amazon Simple Workflow Service.
1745//
1746// Returns the list of domains registered in the account. The results may be
1747// split into multiple pages. To retrieve subsequent pages, make the call again
1748// using the nextPageToken returned by the initial call.
1749//
1750// This operation is eventually consistent. The results are best effort and
1751// may not exactly reflect recent updates and changes.
1752//
1753// Access Control
1754//
1755// You can use IAM policies to control this action's access to Amazon SWF resources
1756// as follows:
1757//
1758//    * Use a Resource element with the domain name to limit the action to only
1759//    specified domains. The element must be set to arn:aws:swf::AccountID:domain/*,
1760//    where AccountID is the account ID, with no dashes.
1761//
1762//    * Use an Action element to allow or deny permission to call this action.
1763//
1764//    * You cannot use an IAM policy to constrain this action's parameters.
1765//
1766// If the caller doesn't have sufficient permissions to invoke the action, or
1767// the parameter values fall outside the specified constraints, the action fails.
1768// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
1769// For details and example IAM policies, see Using IAM to Manage Access to Amazon
1770// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
1771// in the Amazon SWF Developer Guide.
1772//
1773// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1774// with awserr.Error's Code and Message methods to get detailed information about
1775// the error.
1776//
1777// See the AWS API reference guide for Amazon Simple Workflow Service's
1778// API operation ListDomains for usage and error information.
1779//
1780// Returned Error Codes:
1781//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
1782//   Returned when the caller doesn't have sufficient permissions to invoke the
1783//   action.
1784//
1785func (c *SWF) ListDomains(input *ListDomainsInput) (*ListDomainsOutput, error) {
1786	req, out := c.ListDomainsRequest(input)
1787	return out, req.Send()
1788}
1789
1790// ListDomainsWithContext is the same as ListDomains with the addition of
1791// the ability to pass a context and additional request options.
1792//
1793// See ListDomains for details on how to use this API operation.
1794//
1795// The context must be non-nil and will be used for request cancellation. If
1796// the context is nil a panic will occur. In the future the SDK may create
1797// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1798// for more information on using Contexts.
1799func (c *SWF) ListDomainsWithContext(ctx aws.Context, input *ListDomainsInput, opts ...request.Option) (*ListDomainsOutput, error) {
1800	req, out := c.ListDomainsRequest(input)
1801	req.SetContext(ctx)
1802	req.ApplyOptions(opts...)
1803	return out, req.Send()
1804}
1805
1806// ListDomainsPages iterates over the pages of a ListDomains operation,
1807// calling the "fn" function with the response data for each page. To stop
1808// iterating, return false from the fn function.
1809//
1810// See ListDomains method for more information on how to use this operation.
1811//
1812// Note: This operation can generate multiple requests to a service.
1813//
1814//    // Example iterating over at most 3 pages of a ListDomains operation.
1815//    pageNum := 0
1816//    err := client.ListDomainsPages(params,
1817//        func(page *swf.ListDomainsOutput, lastPage bool) bool {
1818//            pageNum++
1819//            fmt.Println(page)
1820//            return pageNum <= 3
1821//        })
1822//
1823func (c *SWF) ListDomainsPages(input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool) error {
1824	return c.ListDomainsPagesWithContext(aws.BackgroundContext(), input, fn)
1825}
1826
1827// ListDomainsPagesWithContext same as ListDomainsPages except
1828// it takes a Context and allows setting request options on the pages.
1829//
1830// The context must be non-nil and will be used for request cancellation. If
1831// the context is nil a panic will occur. In the future the SDK may create
1832// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1833// for more information on using Contexts.
1834func (c *SWF) ListDomainsPagesWithContext(ctx aws.Context, input *ListDomainsInput, fn func(*ListDomainsOutput, bool) bool, opts ...request.Option) error {
1835	p := request.Pagination{
1836		NewRequest: func() (*request.Request, error) {
1837			var inCpy *ListDomainsInput
1838			if input != nil {
1839				tmp := *input
1840				inCpy = &tmp
1841			}
1842			req, _ := c.ListDomainsRequest(inCpy)
1843			req.SetContext(ctx)
1844			req.ApplyOptions(opts...)
1845			return req, nil
1846		},
1847	}
1848
1849	for p.Next() {
1850		if !fn(p.Page().(*ListDomainsOutput), !p.HasNextPage()) {
1851			break
1852		}
1853	}
1854
1855	return p.Err()
1856}
1857
1858const opListOpenWorkflowExecutions = "ListOpenWorkflowExecutions"
1859
1860// ListOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the
1861// client's request for the ListOpenWorkflowExecutions operation. The "output" return
1862// value will be populated with the request's response once the request completes
1863// successfully.
1864//
1865// Use "Send" method on the returned Request to send the API call to the service.
1866// the "output" return value is not valid until after Send returns without error.
1867//
1868// See ListOpenWorkflowExecutions for more information on using the ListOpenWorkflowExecutions
1869// API call, and error handling.
1870//
1871// This method is useful when you want to inject custom logic or configuration
1872// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1873//
1874//
1875//    // Example sending a request using the ListOpenWorkflowExecutionsRequest method.
1876//    req, resp := client.ListOpenWorkflowExecutionsRequest(params)
1877//
1878//    err := req.Send()
1879//    if err == nil { // resp is now filled
1880//        fmt.Println(resp)
1881//    }
1882func (c *SWF) ListOpenWorkflowExecutionsRequest(input *ListOpenWorkflowExecutionsInput) (req *request.Request, output *WorkflowExecutionInfos) {
1883	op := &request.Operation{
1884		Name:       opListOpenWorkflowExecutions,
1885		HTTPMethod: "POST",
1886		HTTPPath:   "/",
1887		Paginator: &request.Paginator{
1888			InputTokens:     []string{"nextPageToken"},
1889			OutputTokens:    []string{"nextPageToken"},
1890			LimitToken:      "maximumPageSize",
1891			TruncationToken: "",
1892		},
1893	}
1894
1895	if input == nil {
1896		input = &ListOpenWorkflowExecutionsInput{}
1897	}
1898
1899	output = &WorkflowExecutionInfos{}
1900	req = c.newRequest(op, input, output)
1901	return
1902}
1903
1904// ListOpenWorkflowExecutions API operation for Amazon Simple Workflow Service.
1905//
1906// Returns a list of open workflow executions in the specified domain that meet
1907// the filtering criteria. The results may be split into multiple pages. To
1908// retrieve subsequent pages, make the call again using the nextPageToken returned
1909// by the initial call.
1910//
1911// This operation is eventually consistent. The results are best effort and
1912// may not exactly reflect recent updates and changes.
1913//
1914// Access Control
1915//
1916// You can use IAM policies to control this action's access to Amazon SWF resources
1917// as follows:
1918//
1919//    * Use a Resource element with the domain name to limit the action to only
1920//    specified domains.
1921//
1922//    * Use an Action element to allow or deny permission to call this action.
1923//
1924//    * Constrain the following parameters by using a Condition element with
1925//    the appropriate keys. tagFilter.tag: String constraint. The key is swf:tagFilter.tag.
1926//    typeFilter.name: String constraint. The key is swf:typeFilter.name. typeFilter.version:
1927//    String constraint. The key is swf:typeFilter.version.
1928//
1929// If the caller doesn't have sufficient permissions to invoke the action, or
1930// the parameter values fall outside the specified constraints, the action fails.
1931// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
1932// For details and example IAM policies, see Using IAM to Manage Access to Amazon
1933// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
1934// in the Amazon SWF Developer Guide.
1935//
1936// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1937// with awserr.Error's Code and Message methods to get detailed information about
1938// the error.
1939//
1940// See the AWS API reference guide for Amazon Simple Workflow Service's
1941// API operation ListOpenWorkflowExecutions for usage and error information.
1942//
1943// Returned Error Codes:
1944//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
1945//   Returned when the named resource cannot be found with in the scope of this
1946//   operation (region or domain). This could happen if the named resource was
1947//   never created or is no longer available for this operation.
1948//
1949//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
1950//   Returned when the caller doesn't have sufficient permissions to invoke the
1951//   action.
1952//
1953func (c *SWF) ListOpenWorkflowExecutions(input *ListOpenWorkflowExecutionsInput) (*WorkflowExecutionInfos, error) {
1954	req, out := c.ListOpenWorkflowExecutionsRequest(input)
1955	return out, req.Send()
1956}
1957
1958// ListOpenWorkflowExecutionsWithContext is the same as ListOpenWorkflowExecutions with the addition of
1959// the ability to pass a context and additional request options.
1960//
1961// See ListOpenWorkflowExecutions for details on how to use this API operation.
1962//
1963// The context must be non-nil and will be used for request cancellation. If
1964// the context is nil a panic will occur. In the future the SDK may create
1965// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1966// for more information on using Contexts.
1967func (c *SWF) ListOpenWorkflowExecutionsWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, opts ...request.Option) (*WorkflowExecutionInfos, error) {
1968	req, out := c.ListOpenWorkflowExecutionsRequest(input)
1969	req.SetContext(ctx)
1970	req.ApplyOptions(opts...)
1971	return out, req.Send()
1972}
1973
1974// ListOpenWorkflowExecutionsPages iterates over the pages of a ListOpenWorkflowExecutions operation,
1975// calling the "fn" function with the response data for each page. To stop
1976// iterating, return false from the fn function.
1977//
1978// See ListOpenWorkflowExecutions method for more information on how to use this operation.
1979//
1980// Note: This operation can generate multiple requests to a service.
1981//
1982//    // Example iterating over at most 3 pages of a ListOpenWorkflowExecutions operation.
1983//    pageNum := 0
1984//    err := client.ListOpenWorkflowExecutionsPages(params,
1985//        func(page *swf.WorkflowExecutionInfos, lastPage bool) bool {
1986//            pageNum++
1987//            fmt.Println(page)
1988//            return pageNum <= 3
1989//        })
1990//
1991func (c *SWF) ListOpenWorkflowExecutionsPages(input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool) error {
1992	return c.ListOpenWorkflowExecutionsPagesWithContext(aws.BackgroundContext(), input, fn)
1993}
1994
1995// ListOpenWorkflowExecutionsPagesWithContext same as ListOpenWorkflowExecutionsPages except
1996// it takes a Context and allows setting request options on the pages.
1997//
1998// The context must be non-nil and will be used for request cancellation. If
1999// the context is nil a panic will occur. In the future the SDK may create
2000// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2001// for more information on using Contexts.
2002func (c *SWF) ListOpenWorkflowExecutionsPagesWithContext(ctx aws.Context, input *ListOpenWorkflowExecutionsInput, fn func(*WorkflowExecutionInfos, bool) bool, opts ...request.Option) error {
2003	p := request.Pagination{
2004		NewRequest: func() (*request.Request, error) {
2005			var inCpy *ListOpenWorkflowExecutionsInput
2006			if input != nil {
2007				tmp := *input
2008				inCpy = &tmp
2009			}
2010			req, _ := c.ListOpenWorkflowExecutionsRequest(inCpy)
2011			req.SetContext(ctx)
2012			req.ApplyOptions(opts...)
2013			return req, nil
2014		},
2015	}
2016
2017	for p.Next() {
2018		if !fn(p.Page().(*WorkflowExecutionInfos), !p.HasNextPage()) {
2019			break
2020		}
2021	}
2022
2023	return p.Err()
2024}
2025
2026const opListTagsForResource = "ListTagsForResource"
2027
2028// ListTagsForResourceRequest generates a "aws/request.Request" representing the
2029// client's request for the ListTagsForResource operation. The "output" return
2030// value will be populated with the request's response once the request completes
2031// successfully.
2032//
2033// Use "Send" method on the returned Request to send the API call to the service.
2034// the "output" return value is not valid until after Send returns without error.
2035//
2036// See ListTagsForResource for more information on using the ListTagsForResource
2037// API call, and error handling.
2038//
2039// This method is useful when you want to inject custom logic or configuration
2040// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2041//
2042//
2043//    // Example sending a request using the ListTagsForResourceRequest method.
2044//    req, resp := client.ListTagsForResourceRequest(params)
2045//
2046//    err := req.Send()
2047//    if err == nil { // resp is now filled
2048//        fmt.Println(resp)
2049//    }
2050func (c *SWF) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
2051	op := &request.Operation{
2052		Name:       opListTagsForResource,
2053		HTTPMethod: "POST",
2054		HTTPPath:   "/",
2055	}
2056
2057	if input == nil {
2058		input = &ListTagsForResourceInput{}
2059	}
2060
2061	output = &ListTagsForResourceOutput{}
2062	req = c.newRequest(op, input, output)
2063	return
2064}
2065
2066// ListTagsForResource API operation for Amazon Simple Workflow Service.
2067//
2068// List tags for a given domain.
2069//
2070// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2071// with awserr.Error's Code and Message methods to get detailed information about
2072// the error.
2073//
2074// See the AWS API reference guide for Amazon Simple Workflow Service's
2075// API operation ListTagsForResource for usage and error information.
2076//
2077// Returned Error Codes:
2078//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
2079//   Returned when the named resource cannot be found with in the scope of this
2080//   operation (region or domain). This could happen if the named resource was
2081//   never created or is no longer available for this operation.
2082//
2083//   * ErrCodeLimitExceededFault "LimitExceededFault"
2084//   Returned by any operation if a system imposed limitation has been reached.
2085//   To address this fault you should either clean up unused resources or increase
2086//   the limit by contacting AWS.
2087//
2088//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
2089//   Returned when the caller doesn't have sufficient permissions to invoke the
2090//   action.
2091//
2092func (c *SWF) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
2093	req, out := c.ListTagsForResourceRequest(input)
2094	return out, req.Send()
2095}
2096
2097// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
2098// the ability to pass a context and additional request options.
2099//
2100// See ListTagsForResource for details on how to use this API operation.
2101//
2102// The context must be non-nil and will be used for request cancellation. If
2103// the context is nil a panic will occur. In the future the SDK may create
2104// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2105// for more information on using Contexts.
2106func (c *SWF) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
2107	req, out := c.ListTagsForResourceRequest(input)
2108	req.SetContext(ctx)
2109	req.ApplyOptions(opts...)
2110	return out, req.Send()
2111}
2112
2113const opListWorkflowTypes = "ListWorkflowTypes"
2114
2115// ListWorkflowTypesRequest generates a "aws/request.Request" representing the
2116// client's request for the ListWorkflowTypes operation. The "output" return
2117// value will be populated with the request's response once the request completes
2118// successfully.
2119//
2120// Use "Send" method on the returned Request to send the API call to the service.
2121// the "output" return value is not valid until after Send returns without error.
2122//
2123// See ListWorkflowTypes for more information on using the ListWorkflowTypes
2124// API call, and error handling.
2125//
2126// This method is useful when you want to inject custom logic or configuration
2127// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2128//
2129//
2130//    // Example sending a request using the ListWorkflowTypesRequest method.
2131//    req, resp := client.ListWorkflowTypesRequest(params)
2132//
2133//    err := req.Send()
2134//    if err == nil { // resp is now filled
2135//        fmt.Println(resp)
2136//    }
2137func (c *SWF) ListWorkflowTypesRequest(input *ListWorkflowTypesInput) (req *request.Request, output *ListWorkflowTypesOutput) {
2138	op := &request.Operation{
2139		Name:       opListWorkflowTypes,
2140		HTTPMethod: "POST",
2141		HTTPPath:   "/",
2142		Paginator: &request.Paginator{
2143			InputTokens:     []string{"nextPageToken"},
2144			OutputTokens:    []string{"nextPageToken"},
2145			LimitToken:      "maximumPageSize",
2146			TruncationToken: "",
2147		},
2148	}
2149
2150	if input == nil {
2151		input = &ListWorkflowTypesInput{}
2152	}
2153
2154	output = &ListWorkflowTypesOutput{}
2155	req = c.newRequest(op, input, output)
2156	return
2157}
2158
2159// ListWorkflowTypes API operation for Amazon Simple Workflow Service.
2160//
2161// Returns information about workflow types in the specified domain. The results
2162// may be split into multiple pages that can be retrieved by making the call
2163// repeatedly.
2164//
2165// Access Control
2166//
2167// You can use IAM policies to control this action's access to Amazon SWF resources
2168// as follows:
2169//
2170//    * Use a Resource element with the domain name to limit the action to only
2171//    specified domains.
2172//
2173//    * Use an Action element to allow or deny permission to call this action.
2174//
2175//    * You cannot use an IAM policy to constrain this action's parameters.
2176//
2177// If the caller doesn't have sufficient permissions to invoke the action, or
2178// the parameter values fall outside the specified constraints, the action fails.
2179// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
2180// For details and example IAM policies, see Using IAM to Manage Access to Amazon
2181// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
2182// in the Amazon SWF Developer Guide.
2183//
2184// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2185// with awserr.Error's Code and Message methods to get detailed information about
2186// the error.
2187//
2188// See the AWS API reference guide for Amazon Simple Workflow Service's
2189// API operation ListWorkflowTypes for usage and error information.
2190//
2191// Returned Error Codes:
2192//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
2193//   Returned when the caller doesn't have sufficient permissions to invoke the
2194//   action.
2195//
2196//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
2197//   Returned when the named resource cannot be found with in the scope of this
2198//   operation (region or domain). This could happen if the named resource was
2199//   never created or is no longer available for this operation.
2200//
2201func (c *SWF) ListWorkflowTypes(input *ListWorkflowTypesInput) (*ListWorkflowTypesOutput, error) {
2202	req, out := c.ListWorkflowTypesRequest(input)
2203	return out, req.Send()
2204}
2205
2206// ListWorkflowTypesWithContext is the same as ListWorkflowTypes with the addition of
2207// the ability to pass a context and additional request options.
2208//
2209// See ListWorkflowTypes for details on how to use this API operation.
2210//
2211// The context must be non-nil and will be used for request cancellation. If
2212// the context is nil a panic will occur. In the future the SDK may create
2213// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2214// for more information on using Contexts.
2215func (c *SWF) ListWorkflowTypesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, opts ...request.Option) (*ListWorkflowTypesOutput, error) {
2216	req, out := c.ListWorkflowTypesRequest(input)
2217	req.SetContext(ctx)
2218	req.ApplyOptions(opts...)
2219	return out, req.Send()
2220}
2221
2222// ListWorkflowTypesPages iterates over the pages of a ListWorkflowTypes operation,
2223// calling the "fn" function with the response data for each page. To stop
2224// iterating, return false from the fn function.
2225//
2226// See ListWorkflowTypes method for more information on how to use this operation.
2227//
2228// Note: This operation can generate multiple requests to a service.
2229//
2230//    // Example iterating over at most 3 pages of a ListWorkflowTypes operation.
2231//    pageNum := 0
2232//    err := client.ListWorkflowTypesPages(params,
2233//        func(page *swf.ListWorkflowTypesOutput, lastPage bool) bool {
2234//            pageNum++
2235//            fmt.Println(page)
2236//            return pageNum <= 3
2237//        })
2238//
2239func (c *SWF) ListWorkflowTypesPages(input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool) error {
2240	return c.ListWorkflowTypesPagesWithContext(aws.BackgroundContext(), input, fn)
2241}
2242
2243// ListWorkflowTypesPagesWithContext same as ListWorkflowTypesPages except
2244// it takes a Context and allows setting request options on the pages.
2245//
2246// The context must be non-nil and will be used for request cancellation. If
2247// the context is nil a panic will occur. In the future the SDK may create
2248// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2249// for more information on using Contexts.
2250func (c *SWF) ListWorkflowTypesPagesWithContext(ctx aws.Context, input *ListWorkflowTypesInput, fn func(*ListWorkflowTypesOutput, bool) bool, opts ...request.Option) error {
2251	p := request.Pagination{
2252		NewRequest: func() (*request.Request, error) {
2253			var inCpy *ListWorkflowTypesInput
2254			if input != nil {
2255				tmp := *input
2256				inCpy = &tmp
2257			}
2258			req, _ := c.ListWorkflowTypesRequest(inCpy)
2259			req.SetContext(ctx)
2260			req.ApplyOptions(opts...)
2261			return req, nil
2262		},
2263	}
2264
2265	for p.Next() {
2266		if !fn(p.Page().(*ListWorkflowTypesOutput), !p.HasNextPage()) {
2267			break
2268		}
2269	}
2270
2271	return p.Err()
2272}
2273
2274const opPollForActivityTask = "PollForActivityTask"
2275
2276// PollForActivityTaskRequest generates a "aws/request.Request" representing the
2277// client's request for the PollForActivityTask operation. The "output" return
2278// value will be populated with the request's response once the request completes
2279// successfully.
2280//
2281// Use "Send" method on the returned Request to send the API call to the service.
2282// the "output" return value is not valid until after Send returns without error.
2283//
2284// See PollForActivityTask for more information on using the PollForActivityTask
2285// API call, and error handling.
2286//
2287// This method is useful when you want to inject custom logic or configuration
2288// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2289//
2290//
2291//    // Example sending a request using the PollForActivityTaskRequest method.
2292//    req, resp := client.PollForActivityTaskRequest(params)
2293//
2294//    err := req.Send()
2295//    if err == nil { // resp is now filled
2296//        fmt.Println(resp)
2297//    }
2298func (c *SWF) PollForActivityTaskRequest(input *PollForActivityTaskInput) (req *request.Request, output *PollForActivityTaskOutput) {
2299	op := &request.Operation{
2300		Name:       opPollForActivityTask,
2301		HTTPMethod: "POST",
2302		HTTPPath:   "/",
2303	}
2304
2305	if input == nil {
2306		input = &PollForActivityTaskInput{}
2307	}
2308
2309	output = &PollForActivityTaskOutput{}
2310	req = c.newRequest(op, input, output)
2311	return
2312}
2313
2314// PollForActivityTask API operation for Amazon Simple Workflow Service.
2315//
2316// Used by workers to get an ActivityTask from the specified activity taskList.
2317// This initiates a long poll, where the service holds the HTTP connection open
2318// and responds as soon as a task becomes available. The maximum time the service
2319// holds on to the request before responding is 60 seconds. If no task is available
2320// within 60 seconds, the poll returns an empty result. An empty result, in
2321// this context, means that an ActivityTask is returned, but that the value
2322// of taskToken is an empty string. If a task is returned, the worker should
2323// use its type to identify and process it correctly.
2324//
2325// Workers should set their client side socket timeout to at least 70 seconds
2326// (10 seconds higher than the maximum time service may hold the poll request).
2327//
2328// Access Control
2329//
2330// You can use IAM policies to control this action's access to Amazon SWF resources
2331// as follows:
2332//
2333//    * Use a Resource element with the domain name to limit the action to only
2334//    specified domains.
2335//
2336//    * Use an Action element to allow or deny permission to call this action.
2337//
2338//    * Constrain the taskList.name parameter by using a Condition element with
2339//    the swf:taskList.name key to allow the action to access only certain task
2340//    lists.
2341//
2342// If the caller doesn't have sufficient permissions to invoke the action, or
2343// the parameter values fall outside the specified constraints, the action fails.
2344// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
2345// For details and example IAM policies, see Using IAM to Manage Access to Amazon
2346// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
2347// in the Amazon SWF Developer Guide.
2348//
2349// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2350// with awserr.Error's Code and Message methods to get detailed information about
2351// the error.
2352//
2353// See the AWS API reference guide for Amazon Simple Workflow Service's
2354// API operation PollForActivityTask for usage and error information.
2355//
2356// Returned Error Codes:
2357//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
2358//   Returned when the named resource cannot be found with in the scope of this
2359//   operation (region or domain). This could happen if the named resource was
2360//   never created or is no longer available for this operation.
2361//
2362//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
2363//   Returned when the caller doesn't have sufficient permissions to invoke the
2364//   action.
2365//
2366//   * ErrCodeLimitExceededFault "LimitExceededFault"
2367//   Returned by any operation if a system imposed limitation has been reached.
2368//   To address this fault you should either clean up unused resources or increase
2369//   the limit by contacting AWS.
2370//
2371func (c *SWF) PollForActivityTask(input *PollForActivityTaskInput) (*PollForActivityTaskOutput, error) {
2372	req, out := c.PollForActivityTaskRequest(input)
2373	return out, req.Send()
2374}
2375
2376// PollForActivityTaskWithContext is the same as PollForActivityTask with the addition of
2377// the ability to pass a context and additional request options.
2378//
2379// See PollForActivityTask for details on how to use this API operation.
2380//
2381// The context must be non-nil and will be used for request cancellation. If
2382// the context is nil a panic will occur. In the future the SDK may create
2383// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2384// for more information on using Contexts.
2385func (c *SWF) PollForActivityTaskWithContext(ctx aws.Context, input *PollForActivityTaskInput, opts ...request.Option) (*PollForActivityTaskOutput, error) {
2386	req, out := c.PollForActivityTaskRequest(input)
2387	req.SetContext(ctx)
2388	req.ApplyOptions(opts...)
2389	return out, req.Send()
2390}
2391
2392const opPollForDecisionTask = "PollForDecisionTask"
2393
2394// PollForDecisionTaskRequest generates a "aws/request.Request" representing the
2395// client's request for the PollForDecisionTask operation. The "output" return
2396// value will be populated with the request's response once the request completes
2397// successfully.
2398//
2399// Use "Send" method on the returned Request to send the API call to the service.
2400// the "output" return value is not valid until after Send returns without error.
2401//
2402// See PollForDecisionTask for more information on using the PollForDecisionTask
2403// API call, and error handling.
2404//
2405// This method is useful when you want to inject custom logic or configuration
2406// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2407//
2408//
2409//    // Example sending a request using the PollForDecisionTaskRequest method.
2410//    req, resp := client.PollForDecisionTaskRequest(params)
2411//
2412//    err := req.Send()
2413//    if err == nil { // resp is now filled
2414//        fmt.Println(resp)
2415//    }
2416func (c *SWF) PollForDecisionTaskRequest(input *PollForDecisionTaskInput) (req *request.Request, output *PollForDecisionTaskOutput) {
2417	op := &request.Operation{
2418		Name:       opPollForDecisionTask,
2419		HTTPMethod: "POST",
2420		HTTPPath:   "/",
2421		Paginator: &request.Paginator{
2422			InputTokens:     []string{"nextPageToken"},
2423			OutputTokens:    []string{"nextPageToken"},
2424			LimitToken:      "maximumPageSize",
2425			TruncationToken: "",
2426		},
2427	}
2428
2429	if input == nil {
2430		input = &PollForDecisionTaskInput{}
2431	}
2432
2433	output = &PollForDecisionTaskOutput{}
2434	req = c.newRequest(op, input, output)
2435	return
2436}
2437
2438// PollForDecisionTask API operation for Amazon Simple Workflow Service.
2439//
2440// Used by deciders to get a DecisionTask from the specified decision taskList.
2441// A decision task may be returned for any open workflow execution that is using
2442// the specified task list. The task includes a paginated view of the history
2443// of the workflow execution. The decider should use the workflow type and the
2444// history to determine how to properly handle the task.
2445//
2446// This action initiates a long poll, where the service holds the HTTP connection
2447// open and responds as soon a task becomes available. If no decision task is
2448// available in the specified task list before the timeout of 60 seconds expires,
2449// an empty result is returned. An empty result, in this context, means that
2450// a DecisionTask is returned, but that the value of taskToken is an empty string.
2451//
2452// Deciders should set their client side socket timeout to at least 70 seconds
2453// (10 seconds higher than the timeout).
2454//
2455// Because the number of workflow history events for a single workflow execution
2456// might be very large, the result returned might be split up across a number
2457// of pages. To retrieve subsequent pages, make additional calls to PollForDecisionTask
2458// using the nextPageToken returned by the initial call. Note that you do not
2459// call GetWorkflowExecutionHistory with this nextPageToken. Instead, call PollForDecisionTask
2460// again.
2461//
2462// Access Control
2463//
2464// You can use IAM policies to control this action's access to Amazon SWF resources
2465// as follows:
2466//
2467//    * Use a Resource element with the domain name to limit the action to only
2468//    specified domains.
2469//
2470//    * Use an Action element to allow or deny permission to call this action.
2471//
2472//    * Constrain the taskList.name parameter by using a Condition element with
2473//    the swf:taskList.name key to allow the action to access only certain task
2474//    lists.
2475//
2476// If the caller doesn't have sufficient permissions to invoke the action, or
2477// the parameter values fall outside the specified constraints, the action fails.
2478// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
2479// For details and example IAM policies, see Using IAM to Manage Access to Amazon
2480// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
2481// in the Amazon SWF Developer Guide.
2482//
2483// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2484// with awserr.Error's Code and Message methods to get detailed information about
2485// the error.
2486//
2487// See the AWS API reference guide for Amazon Simple Workflow Service's
2488// API operation PollForDecisionTask for usage and error information.
2489//
2490// Returned Error Codes:
2491//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
2492//   Returned when the named resource cannot be found with in the scope of this
2493//   operation (region or domain). This could happen if the named resource was
2494//   never created or is no longer available for this operation.
2495//
2496//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
2497//   Returned when the caller doesn't have sufficient permissions to invoke the
2498//   action.
2499//
2500//   * ErrCodeLimitExceededFault "LimitExceededFault"
2501//   Returned by any operation if a system imposed limitation has been reached.
2502//   To address this fault you should either clean up unused resources or increase
2503//   the limit by contacting AWS.
2504//
2505func (c *SWF) PollForDecisionTask(input *PollForDecisionTaskInput) (*PollForDecisionTaskOutput, error) {
2506	req, out := c.PollForDecisionTaskRequest(input)
2507	return out, req.Send()
2508}
2509
2510// PollForDecisionTaskWithContext is the same as PollForDecisionTask with the addition of
2511// the ability to pass a context and additional request options.
2512//
2513// See PollForDecisionTask for details on how to use this API operation.
2514//
2515// The context must be non-nil and will be used for request cancellation. If
2516// the context is nil a panic will occur. In the future the SDK may create
2517// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2518// for more information on using Contexts.
2519func (c *SWF) PollForDecisionTaskWithContext(ctx aws.Context, input *PollForDecisionTaskInput, opts ...request.Option) (*PollForDecisionTaskOutput, error) {
2520	req, out := c.PollForDecisionTaskRequest(input)
2521	req.SetContext(ctx)
2522	req.ApplyOptions(opts...)
2523	return out, req.Send()
2524}
2525
2526// PollForDecisionTaskPages iterates over the pages of a PollForDecisionTask operation,
2527// calling the "fn" function with the response data for each page. To stop
2528// iterating, return false from the fn function.
2529//
2530// See PollForDecisionTask method for more information on how to use this operation.
2531//
2532// Note: This operation can generate multiple requests to a service.
2533//
2534//    // Example iterating over at most 3 pages of a PollForDecisionTask operation.
2535//    pageNum := 0
2536//    err := client.PollForDecisionTaskPages(params,
2537//        func(page *swf.PollForDecisionTaskOutput, lastPage bool) bool {
2538//            pageNum++
2539//            fmt.Println(page)
2540//            return pageNum <= 3
2541//        })
2542//
2543func (c *SWF) PollForDecisionTaskPages(input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool) error {
2544	return c.PollForDecisionTaskPagesWithContext(aws.BackgroundContext(), input, fn)
2545}
2546
2547// PollForDecisionTaskPagesWithContext same as PollForDecisionTaskPages except
2548// it takes a Context and allows setting request options on the pages.
2549//
2550// The context must be non-nil and will be used for request cancellation. If
2551// the context is nil a panic will occur. In the future the SDK may create
2552// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2553// for more information on using Contexts.
2554func (c *SWF) PollForDecisionTaskPagesWithContext(ctx aws.Context, input *PollForDecisionTaskInput, fn func(*PollForDecisionTaskOutput, bool) bool, opts ...request.Option) error {
2555	p := request.Pagination{
2556		NewRequest: func() (*request.Request, error) {
2557			var inCpy *PollForDecisionTaskInput
2558			if input != nil {
2559				tmp := *input
2560				inCpy = &tmp
2561			}
2562			req, _ := c.PollForDecisionTaskRequest(inCpy)
2563			req.SetContext(ctx)
2564			req.ApplyOptions(opts...)
2565			return req, nil
2566		},
2567	}
2568
2569	for p.Next() {
2570		if !fn(p.Page().(*PollForDecisionTaskOutput), !p.HasNextPage()) {
2571			break
2572		}
2573	}
2574
2575	return p.Err()
2576}
2577
2578const opRecordActivityTaskHeartbeat = "RecordActivityTaskHeartbeat"
2579
2580// RecordActivityTaskHeartbeatRequest generates a "aws/request.Request" representing the
2581// client's request for the RecordActivityTaskHeartbeat operation. The "output" return
2582// value will be populated with the request's response once the request completes
2583// successfully.
2584//
2585// Use "Send" method on the returned Request to send the API call to the service.
2586// the "output" return value is not valid until after Send returns without error.
2587//
2588// See RecordActivityTaskHeartbeat for more information on using the RecordActivityTaskHeartbeat
2589// API call, and error handling.
2590//
2591// This method is useful when you want to inject custom logic or configuration
2592// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2593//
2594//
2595//    // Example sending a request using the RecordActivityTaskHeartbeatRequest method.
2596//    req, resp := client.RecordActivityTaskHeartbeatRequest(params)
2597//
2598//    err := req.Send()
2599//    if err == nil { // resp is now filled
2600//        fmt.Println(resp)
2601//    }
2602func (c *SWF) RecordActivityTaskHeartbeatRequest(input *RecordActivityTaskHeartbeatInput) (req *request.Request, output *RecordActivityTaskHeartbeatOutput) {
2603	op := &request.Operation{
2604		Name:       opRecordActivityTaskHeartbeat,
2605		HTTPMethod: "POST",
2606		HTTPPath:   "/",
2607	}
2608
2609	if input == nil {
2610		input = &RecordActivityTaskHeartbeatInput{}
2611	}
2612
2613	output = &RecordActivityTaskHeartbeatOutput{}
2614	req = c.newRequest(op, input, output)
2615	return
2616}
2617
2618// RecordActivityTaskHeartbeat API operation for Amazon Simple Workflow Service.
2619//
2620// Used by activity workers to report to the service that the ActivityTask represented
2621// by the specified taskToken is still making progress. The worker can also
2622// specify details of the progress, for example percent complete, using the
2623// details parameter. This action can also be used by the worker as a mechanism
2624// to check if cancellation is being requested for the activity task. If a cancellation
2625// is being attempted for the specified task, then the boolean cancelRequested
2626// flag returned by the service is set to true.
2627//
2628// This action resets the taskHeartbeatTimeout clock. The taskHeartbeatTimeout
2629// is specified in RegisterActivityType.
2630//
2631// This action doesn't in itself create an event in the workflow execution history.
2632// However, if the task times out, the workflow execution history contains a
2633// ActivityTaskTimedOut event that contains the information from the last heartbeat
2634// generated by the activity worker.
2635//
2636// The taskStartToCloseTimeout of an activity type is the maximum duration of
2637// an activity task, regardless of the number of RecordActivityTaskHeartbeat
2638// requests received. The taskStartToCloseTimeout is also specified in RegisterActivityType.
2639//
2640// This operation is only useful for long-lived activities to report liveliness
2641// of the task and to determine if a cancellation is being attempted.
2642//
2643// If the cancelRequested flag returns true, a cancellation is being attempted.
2644// If the worker can cancel the activity, it should respond with RespondActivityTaskCanceled.
2645// Otherwise, it should ignore the cancellation request.
2646//
2647// Access Control
2648//
2649// You can use IAM policies to control this action's access to Amazon SWF resources
2650// as follows:
2651//
2652//    * Use a Resource element with the domain name to limit the action to only
2653//    specified domains.
2654//
2655//    * Use an Action element to allow or deny permission to call this action.
2656//
2657//    * You cannot use an IAM policy to constrain this action's parameters.
2658//
2659// If the caller doesn't have sufficient permissions to invoke the action, or
2660// the parameter values fall outside the specified constraints, the action fails.
2661// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
2662// For details and example IAM policies, see Using IAM to Manage Access to Amazon
2663// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
2664// in the Amazon SWF Developer Guide.
2665//
2666// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2667// with awserr.Error's Code and Message methods to get detailed information about
2668// the error.
2669//
2670// See the AWS API reference guide for Amazon Simple Workflow Service's
2671// API operation RecordActivityTaskHeartbeat for usage and error information.
2672//
2673// Returned Error Codes:
2674//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
2675//   Returned when the named resource cannot be found with in the scope of this
2676//   operation (region or domain). This could happen if the named resource was
2677//   never created or is no longer available for this operation.
2678//
2679//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
2680//   Returned when the caller doesn't have sufficient permissions to invoke the
2681//   action.
2682//
2683func (c *SWF) RecordActivityTaskHeartbeat(input *RecordActivityTaskHeartbeatInput) (*RecordActivityTaskHeartbeatOutput, error) {
2684	req, out := c.RecordActivityTaskHeartbeatRequest(input)
2685	return out, req.Send()
2686}
2687
2688// RecordActivityTaskHeartbeatWithContext is the same as RecordActivityTaskHeartbeat with the addition of
2689// the ability to pass a context and additional request options.
2690//
2691// See RecordActivityTaskHeartbeat for details on how to use this API operation.
2692//
2693// The context must be non-nil and will be used for request cancellation. If
2694// the context is nil a panic will occur. In the future the SDK may create
2695// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2696// for more information on using Contexts.
2697func (c *SWF) RecordActivityTaskHeartbeatWithContext(ctx aws.Context, input *RecordActivityTaskHeartbeatInput, opts ...request.Option) (*RecordActivityTaskHeartbeatOutput, error) {
2698	req, out := c.RecordActivityTaskHeartbeatRequest(input)
2699	req.SetContext(ctx)
2700	req.ApplyOptions(opts...)
2701	return out, req.Send()
2702}
2703
2704const opRegisterActivityType = "RegisterActivityType"
2705
2706// RegisterActivityTypeRequest generates a "aws/request.Request" representing the
2707// client's request for the RegisterActivityType operation. The "output" return
2708// value will be populated with the request's response once the request completes
2709// successfully.
2710//
2711// Use "Send" method on the returned Request to send the API call to the service.
2712// the "output" return value is not valid until after Send returns without error.
2713//
2714// See RegisterActivityType for more information on using the RegisterActivityType
2715// API call, and error handling.
2716//
2717// This method is useful when you want to inject custom logic or configuration
2718// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2719//
2720//
2721//    // Example sending a request using the RegisterActivityTypeRequest method.
2722//    req, resp := client.RegisterActivityTypeRequest(params)
2723//
2724//    err := req.Send()
2725//    if err == nil { // resp is now filled
2726//        fmt.Println(resp)
2727//    }
2728func (c *SWF) RegisterActivityTypeRequest(input *RegisterActivityTypeInput) (req *request.Request, output *RegisterActivityTypeOutput) {
2729	op := &request.Operation{
2730		Name:       opRegisterActivityType,
2731		HTTPMethod: "POST",
2732		HTTPPath:   "/",
2733	}
2734
2735	if input == nil {
2736		input = &RegisterActivityTypeInput{}
2737	}
2738
2739	output = &RegisterActivityTypeOutput{}
2740	req = c.newRequest(op, input, output)
2741	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
2742	return
2743}
2744
2745// RegisterActivityType API operation for Amazon Simple Workflow Service.
2746//
2747// Registers a new activity type along with its configuration settings in the
2748// specified domain.
2749//
2750// A TypeAlreadyExists fault is returned if the type already exists in the domain.
2751// You cannot change any configuration settings of the type after its registration,
2752// and it must be registered as a new version.
2753//
2754// Access Control
2755//
2756// You can use IAM policies to control this action's access to Amazon SWF resources
2757// as follows:
2758//
2759//    * Use a Resource element with the domain name to limit the action to only
2760//    specified domains.
2761//
2762//    * Use an Action element to allow or deny permission to call this action.
2763//
2764//    * Constrain the following parameters by using a Condition element with
2765//    the appropriate keys. defaultTaskList.name: String constraint. The key
2766//    is swf:defaultTaskList.name. name: String constraint. The key is swf:name.
2767//    version: String constraint. The key is swf:version.
2768//
2769// If the caller doesn't have sufficient permissions to invoke the action, or
2770// the parameter values fall outside the specified constraints, the action fails.
2771// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
2772// For details and example IAM policies, see Using IAM to Manage Access to Amazon
2773// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
2774// in the Amazon SWF Developer Guide.
2775//
2776// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2777// with awserr.Error's Code and Message methods to get detailed information about
2778// the error.
2779//
2780// See the AWS API reference guide for Amazon Simple Workflow Service's
2781// API operation RegisterActivityType for usage and error information.
2782//
2783// Returned Error Codes:
2784//   * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault"
2785//   Returned if the type already exists in the specified domain. You may get
2786//   this fault if you are registering a type that is either already registered
2787//   or deprecated, or if you undeprecate a type that is currently registered.
2788//
2789//   * ErrCodeLimitExceededFault "LimitExceededFault"
2790//   Returned by any operation if a system imposed limitation has been reached.
2791//   To address this fault you should either clean up unused resources or increase
2792//   the limit by contacting AWS.
2793//
2794//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
2795//   Returned when the named resource cannot be found with in the scope of this
2796//   operation (region or domain). This could happen if the named resource was
2797//   never created or is no longer available for this operation.
2798//
2799//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
2800//   Returned when the caller doesn't have sufficient permissions to invoke the
2801//   action.
2802//
2803func (c *SWF) RegisterActivityType(input *RegisterActivityTypeInput) (*RegisterActivityTypeOutput, error) {
2804	req, out := c.RegisterActivityTypeRequest(input)
2805	return out, req.Send()
2806}
2807
2808// RegisterActivityTypeWithContext is the same as RegisterActivityType with the addition of
2809// the ability to pass a context and additional request options.
2810//
2811// See RegisterActivityType for details on how to use this API operation.
2812//
2813// The context must be non-nil and will be used for request cancellation. If
2814// the context is nil a panic will occur. In the future the SDK may create
2815// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2816// for more information on using Contexts.
2817func (c *SWF) RegisterActivityTypeWithContext(ctx aws.Context, input *RegisterActivityTypeInput, opts ...request.Option) (*RegisterActivityTypeOutput, error) {
2818	req, out := c.RegisterActivityTypeRequest(input)
2819	req.SetContext(ctx)
2820	req.ApplyOptions(opts...)
2821	return out, req.Send()
2822}
2823
2824const opRegisterDomain = "RegisterDomain"
2825
2826// RegisterDomainRequest generates a "aws/request.Request" representing the
2827// client's request for the RegisterDomain operation. The "output" return
2828// value will be populated with the request's response once the request completes
2829// successfully.
2830//
2831// Use "Send" method on the returned Request to send the API call to the service.
2832// the "output" return value is not valid until after Send returns without error.
2833//
2834// See RegisterDomain for more information on using the RegisterDomain
2835// API call, and error handling.
2836//
2837// This method is useful when you want to inject custom logic or configuration
2838// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2839//
2840//
2841//    // Example sending a request using the RegisterDomainRequest method.
2842//    req, resp := client.RegisterDomainRequest(params)
2843//
2844//    err := req.Send()
2845//    if err == nil { // resp is now filled
2846//        fmt.Println(resp)
2847//    }
2848func (c *SWF) RegisterDomainRequest(input *RegisterDomainInput) (req *request.Request, output *RegisterDomainOutput) {
2849	op := &request.Operation{
2850		Name:       opRegisterDomain,
2851		HTTPMethod: "POST",
2852		HTTPPath:   "/",
2853	}
2854
2855	if input == nil {
2856		input = &RegisterDomainInput{}
2857	}
2858
2859	output = &RegisterDomainOutput{}
2860	req = c.newRequest(op, input, output)
2861	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
2862	return
2863}
2864
2865// RegisterDomain API operation for Amazon Simple Workflow Service.
2866//
2867// Registers a new domain.
2868//
2869// Access Control
2870//
2871// You can use IAM policies to control this action's access to Amazon SWF resources
2872// as follows:
2873//
2874//    * You cannot use an IAM policy to control domain access for this action.
2875//    The name of the domain being registered is available as the resource of
2876//    this action.
2877//
2878//    * Use an Action element to allow or deny permission to call this action.
2879//
2880//    * You cannot use an IAM policy to constrain this action's parameters.
2881//
2882// If the caller doesn't have sufficient permissions to invoke the action, or
2883// the parameter values fall outside the specified constraints, the action fails.
2884// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
2885// For details and example IAM policies, see Using IAM to Manage Access to Amazon
2886// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
2887// in the Amazon SWF Developer Guide.
2888//
2889// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2890// with awserr.Error's Code and Message methods to get detailed information about
2891// the error.
2892//
2893// See the AWS API reference guide for Amazon Simple Workflow Service's
2894// API operation RegisterDomain for usage and error information.
2895//
2896// Returned Error Codes:
2897//   * ErrCodeDomainAlreadyExistsFault "DomainAlreadyExistsFault"
2898//   Returned if the domain already exists. You may get this fault if you are
2899//   registering a domain that is either already registered or deprecated, or
2900//   if you undeprecate a domain that is currently registered.
2901//
2902//   * ErrCodeLimitExceededFault "LimitExceededFault"
2903//   Returned by any operation if a system imposed limitation has been reached.
2904//   To address this fault you should either clean up unused resources or increase
2905//   the limit by contacting AWS.
2906//
2907//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
2908//   Returned when the caller doesn't have sufficient permissions to invoke the
2909//   action.
2910//
2911//   * ErrCodeTooManyTagsFault "TooManyTagsFault"
2912//   You've exceeded the number of tags allowed for a domain.
2913//
2914func (c *SWF) RegisterDomain(input *RegisterDomainInput) (*RegisterDomainOutput, error) {
2915	req, out := c.RegisterDomainRequest(input)
2916	return out, req.Send()
2917}
2918
2919// RegisterDomainWithContext is the same as RegisterDomain with the addition of
2920// the ability to pass a context and additional request options.
2921//
2922// See RegisterDomain for details on how to use this API operation.
2923//
2924// The context must be non-nil and will be used for request cancellation. If
2925// the context is nil a panic will occur. In the future the SDK may create
2926// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2927// for more information on using Contexts.
2928func (c *SWF) RegisterDomainWithContext(ctx aws.Context, input *RegisterDomainInput, opts ...request.Option) (*RegisterDomainOutput, error) {
2929	req, out := c.RegisterDomainRequest(input)
2930	req.SetContext(ctx)
2931	req.ApplyOptions(opts...)
2932	return out, req.Send()
2933}
2934
2935const opRegisterWorkflowType = "RegisterWorkflowType"
2936
2937// RegisterWorkflowTypeRequest generates a "aws/request.Request" representing the
2938// client's request for the RegisterWorkflowType operation. The "output" return
2939// value will be populated with the request's response once the request completes
2940// successfully.
2941//
2942// Use "Send" method on the returned Request to send the API call to the service.
2943// the "output" return value is not valid until after Send returns without error.
2944//
2945// See RegisterWorkflowType for more information on using the RegisterWorkflowType
2946// API call, and error handling.
2947//
2948// This method is useful when you want to inject custom logic or configuration
2949// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2950//
2951//
2952//    // Example sending a request using the RegisterWorkflowTypeRequest method.
2953//    req, resp := client.RegisterWorkflowTypeRequest(params)
2954//
2955//    err := req.Send()
2956//    if err == nil { // resp is now filled
2957//        fmt.Println(resp)
2958//    }
2959func (c *SWF) RegisterWorkflowTypeRequest(input *RegisterWorkflowTypeInput) (req *request.Request, output *RegisterWorkflowTypeOutput) {
2960	op := &request.Operation{
2961		Name:       opRegisterWorkflowType,
2962		HTTPMethod: "POST",
2963		HTTPPath:   "/",
2964	}
2965
2966	if input == nil {
2967		input = &RegisterWorkflowTypeInput{}
2968	}
2969
2970	output = &RegisterWorkflowTypeOutput{}
2971	req = c.newRequest(op, input, output)
2972	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
2973	return
2974}
2975
2976// RegisterWorkflowType API operation for Amazon Simple Workflow Service.
2977//
2978// Registers a new workflow type and its configuration settings in the specified
2979// domain.
2980//
2981// The retention period for the workflow history is set by the RegisterDomain
2982// action.
2983//
2984// If the type already exists, then a TypeAlreadyExists fault is returned. You
2985// cannot change the configuration settings of a workflow type once it is registered
2986// and it must be registered as a new version.
2987//
2988// Access Control
2989//
2990// You can use IAM policies to control this action's access to Amazon SWF resources
2991// as follows:
2992//
2993//    * Use a Resource element with the domain name to limit the action to only
2994//    specified domains.
2995//
2996//    * Use an Action element to allow or deny permission to call this action.
2997//
2998//    * Constrain the following parameters by using a Condition element with
2999//    the appropriate keys. defaultTaskList.name: String constraint. The key
3000//    is swf:defaultTaskList.name. name: String constraint. The key is swf:name.
3001//    version: String constraint. The key is swf:version.
3002//
3003// If the caller doesn't have sufficient permissions to invoke the action, or
3004// the parameter values fall outside the specified constraints, the action fails.
3005// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
3006// For details and example IAM policies, see Using IAM to Manage Access to Amazon
3007// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
3008// in the Amazon SWF Developer Guide.
3009//
3010// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
3011// with awserr.Error's Code and Message methods to get detailed information about
3012// the error.
3013//
3014// See the AWS API reference guide for Amazon Simple Workflow Service's
3015// API operation RegisterWorkflowType for usage and error information.
3016//
3017// Returned Error Codes:
3018//   * ErrCodeTypeAlreadyExistsFault "TypeAlreadyExistsFault"
3019//   Returned if the type already exists in the specified domain. You may get
3020//   this fault if you are registering a type that is either already registered
3021//   or deprecated, or if you undeprecate a type that is currently registered.
3022//
3023//   * ErrCodeLimitExceededFault "LimitExceededFault"
3024//   Returned by any operation if a system imposed limitation has been reached.
3025//   To address this fault you should either clean up unused resources or increase
3026//   the limit by contacting AWS.
3027//
3028//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
3029//   Returned when the named resource cannot be found with in the scope of this
3030//   operation (region or domain). This could happen if the named resource was
3031//   never created or is no longer available for this operation.
3032//
3033//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
3034//   Returned when the caller doesn't have sufficient permissions to invoke the
3035//   action.
3036//
3037func (c *SWF) RegisterWorkflowType(input *RegisterWorkflowTypeInput) (*RegisterWorkflowTypeOutput, error) {
3038	req, out := c.RegisterWorkflowTypeRequest(input)
3039	return out, req.Send()
3040}
3041
3042// RegisterWorkflowTypeWithContext is the same as RegisterWorkflowType with the addition of
3043// the ability to pass a context and additional request options.
3044//
3045// See RegisterWorkflowType for details on how to use this API operation.
3046//
3047// The context must be non-nil and will be used for request cancellation. If
3048// the context is nil a panic will occur. In the future the SDK may create
3049// sub-contexts for http.Requests. See https://golang.org/pkg/context/
3050// for more information on using Contexts.
3051func (c *SWF) RegisterWorkflowTypeWithContext(ctx aws.Context, input *RegisterWorkflowTypeInput, opts ...request.Option) (*RegisterWorkflowTypeOutput, error) {
3052	req, out := c.RegisterWorkflowTypeRequest(input)
3053	req.SetContext(ctx)
3054	req.ApplyOptions(opts...)
3055	return out, req.Send()
3056}
3057
3058const opRequestCancelWorkflowExecution = "RequestCancelWorkflowExecution"
3059
3060// RequestCancelWorkflowExecutionRequest generates a "aws/request.Request" representing the
3061// client's request for the RequestCancelWorkflowExecution operation. The "output" return
3062// value will be populated with the request's response once the request completes
3063// successfully.
3064//
3065// Use "Send" method on the returned Request to send the API call to the service.
3066// the "output" return value is not valid until after Send returns without error.
3067//
3068// See RequestCancelWorkflowExecution for more information on using the RequestCancelWorkflowExecution
3069// API call, and error handling.
3070//
3071// This method is useful when you want to inject custom logic or configuration
3072// into the SDK's request lifecycle. Such as custom headers, or retry logic.
3073//
3074//
3075//    // Example sending a request using the RequestCancelWorkflowExecutionRequest method.
3076//    req, resp := client.RequestCancelWorkflowExecutionRequest(params)
3077//
3078//    err := req.Send()
3079//    if err == nil { // resp is now filled
3080//        fmt.Println(resp)
3081//    }
3082func (c *SWF) RequestCancelWorkflowExecutionRequest(input *RequestCancelWorkflowExecutionInput) (req *request.Request, output *RequestCancelWorkflowExecutionOutput) {
3083	op := &request.Operation{
3084		Name:       opRequestCancelWorkflowExecution,
3085		HTTPMethod: "POST",
3086		HTTPPath:   "/",
3087	}
3088
3089	if input == nil {
3090		input = &RequestCancelWorkflowExecutionInput{}
3091	}
3092
3093	output = &RequestCancelWorkflowExecutionOutput{}
3094	req = c.newRequest(op, input, output)
3095	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
3096	return
3097}
3098
3099// RequestCancelWorkflowExecution API operation for Amazon Simple Workflow Service.
3100//
3101// Records a WorkflowExecutionCancelRequested event in the currently running
3102// workflow execution identified by the given domain, workflowId, and runId.
3103// This logically requests the cancellation of the workflow execution as a whole.
3104// It is up to the decider to take appropriate actions when it receives an execution
3105// history with this event.
3106//
3107// If the runId isn't specified, the WorkflowExecutionCancelRequested event
3108// is recorded in the history of the current open workflow execution with the
3109// specified workflowId in the domain.
3110//
3111// Because this action allows the workflow to properly clean up and gracefully
3112// close, it should be used instead of TerminateWorkflowExecution when possible.
3113//
3114// Access Control
3115//
3116// You can use IAM policies to control this action's access to Amazon SWF resources
3117// as follows:
3118//
3119//    * Use a Resource element with the domain name to limit the action to only
3120//    specified domains.
3121//
3122//    * Use an Action element to allow or deny permission to call this action.
3123//
3124//    * You cannot use an IAM policy to constrain this action's parameters.
3125//
3126// If the caller doesn't have sufficient permissions to invoke the action, or
3127// the parameter values fall outside the specified constraints, the action fails.
3128// The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED.
3129// For details and example IAM policies, see Using IAM to Manage Access to Amazon
3130// SWF Workflows (https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html)
3131// in the Amazon SWF Developer Guide.
3132//
3133// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
3134// with awserr.Error's Code and Message methods to get detailed information about
3135// the error.
3136//
3137// See the AWS API reference guide for Amazon Simple Workflow Service's
3138// API operation RequestCancelWorkflowExecution for usage and error information.
3139//
3140// Returned Error Codes:
3141//   * ErrCodeUnknownResourceFault "UnknownResourceFault"
3142//   Returned when the named resource cannot be found with in the scope of this
3143//   operation (region or domain). This could happen if the named resource was
3144//   never created or is no longer available for this operation.
3145//
3146//   * ErrCodeOperationNotPermittedFault "OperationNotPermittedFault"
3147//   Returned when the caller doesn't have sufficient permissions to invoke the
3148//   action.
3149//
3150func (c *SWF) RequestCancelWorkflowExecution(input *RequestCancelWorkflowExecutionInput) (*RequestCancelWorkflowExecutionOutput, error) {
3151	req, out := c.RequestCancelWorkflowExecutionRequest(input)
3152	return out, req.Send()
3153}
3154
3155// RequestCancelWorkflowExecutionWithContext is the same as RequestCancelWorkflowExecution with the addition of
3156// the ability to pass a context and additional request options.
3157//
3158// See RequestCancelWorkflowExecution for details on how to use this API operation.
3159//
3160// The context must be non-nil and will be used for request cancellation. If
3161// the context is nil a panic will occur. In the future the SDK may create
3162// sub-contexts for http.Requests. See https://golang.org/pkg/context/
3163// for more information on using Contexts.
3164func (c *SWF) RequestCancelWorkflowExecutionWithContext(ctx aws.Context, input *RequestCancelWorkflowExecutionInput, opts ...request.Option) (*RequestCancelWorkflowExecutionOutput, error) {
3165	req, out := c.RequestCancelWorkflowExecutionRequest(input)
3166	req.SetContext(ctx)
3167	req.ApplyOptions(opts...)
3168	return out, req.Send()
3169}
3170
3171const opRespondActivityTaskCanceled = "RespondActivityTaskCanceled"
3172
3173// RespondActivityTaskCanceledRequest generates a "aws/request.Request" representing the
3174// client's request for the RespondActivityTaskCanceled operation. The "output" return
3175// value will be populated with the request's response once the request completes
3176// successfully.
3177//
3178// Use "Send" method on the returned Request to send the API call to the service.
3179// the "output" return value is not valid until after Send returns without error.
3180//
3181// See RespondActivityTaskCanceled for more information on using the RespondActivityTaskCanceled
3182// API call, and error handling.
3183//
3184// This method is useful when you want to inject custom logic or configuration
3185// into the SDK's request lifecycle. Such as custom headers, or retry logic.
3186//
3187//
3188//    // Example sending a request using the RespondActivityTaskCanceledRequest method.
3189//    req, resp := client.RespondActivityTaskCanceledRequest(params)
3190//
3191//    err := req.Send()
3192//    if err == nil { // resp is now filled
3193//        fmt.Println(resp)
3194//    }
3195func (c *SWF) RespondActivityTaskCanceledRequest(input *RespondActivityTaskCanceledInput) (req *request.Request, output *RespondActivityTaskCanceledOutput) {
3196	op := &request.Operation{
3197		Name:       opRespondActivityTaskCanceled,
3198		HTTPMethod: "POST",
3199