1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package mturk
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 opAcceptQualificationRequest = "AcceptQualificationRequest"
17
18// AcceptQualificationRequestRequest generates a "aws/request.Request" representing the
19// client's request for the AcceptQualificationRequest 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 AcceptQualificationRequest for more information on using the AcceptQualificationRequest
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 AcceptQualificationRequestRequest method.
34//    req, resp := client.AcceptQualificationRequestRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40//
41// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/AcceptQualificationRequest
42func (c *MTurk) AcceptQualificationRequestRequest(input *AcceptQualificationRequestInput) (req *request.Request, output *AcceptQualificationRequestOutput) {
43	op := &request.Operation{
44		Name:       opAcceptQualificationRequest,
45		HTTPMethod: "POST",
46		HTTPPath:   "/",
47	}
48
49	if input == nil {
50		input = &AcceptQualificationRequestInput{}
51	}
52
53	output = &AcceptQualificationRequestOutput{}
54	req = c.newRequest(op, input, output)
55	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
56	return
57}
58
59// AcceptQualificationRequest API operation for Amazon Mechanical Turk.
60//
61// The AcceptQualificationRequest operation approves a Worker's request for
62// a Qualification.
63//
64// Only the owner of the Qualification type can grant a Qualification request
65// for that type.
66//
67// A successful request for the AcceptQualificationRequest operation returns
68// with no errors and an empty body.
69//
70// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
71// with awserr.Error's Code and Message methods to get detailed information about
72// the error.
73//
74// See the AWS API reference guide for Amazon Mechanical Turk's
75// API operation AcceptQualificationRequest for usage and error information.
76//
77// Returned Error Codes:
78//   * ErrCodeServiceFault "ServiceFault"
79//   Amazon Mechanical Turk is temporarily unable to process your request. Try
80//   your call again.
81//
82//   * ErrCodeRequestError "RequestError"
83//   Your request is invalid.
84//
85// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/AcceptQualificationRequest
86func (c *MTurk) AcceptQualificationRequest(input *AcceptQualificationRequestInput) (*AcceptQualificationRequestOutput, error) {
87	req, out := c.AcceptQualificationRequestRequest(input)
88	return out, req.Send()
89}
90
91// AcceptQualificationRequestWithContext is the same as AcceptQualificationRequest with the addition of
92// the ability to pass a context and additional request options.
93//
94// See AcceptQualificationRequest for details on how to use this API operation.
95//
96// The context must be non-nil and will be used for request cancellation. If
97// the context is nil a panic will occur. In the future the SDK may create
98// sub-contexts for http.Requests. See https://golang.org/pkg/context/
99// for more information on using Contexts.
100func (c *MTurk) AcceptQualificationRequestWithContext(ctx aws.Context, input *AcceptQualificationRequestInput, opts ...request.Option) (*AcceptQualificationRequestOutput, error) {
101	req, out := c.AcceptQualificationRequestRequest(input)
102	req.SetContext(ctx)
103	req.ApplyOptions(opts...)
104	return out, req.Send()
105}
106
107const opApproveAssignment = "ApproveAssignment"
108
109// ApproveAssignmentRequest generates a "aws/request.Request" representing the
110// client's request for the ApproveAssignment operation. The "output" return
111// value will be populated with the request's response once the request completes
112// successfully.
113//
114// Use "Send" method on the returned Request to send the API call to the service.
115// the "output" return value is not valid until after Send returns without error.
116//
117// See ApproveAssignment for more information on using the ApproveAssignment
118// API call, and error handling.
119//
120// This method is useful when you want to inject custom logic or configuration
121// into the SDK's request lifecycle. Such as custom headers, or retry logic.
122//
123//
124//    // Example sending a request using the ApproveAssignmentRequest method.
125//    req, resp := client.ApproveAssignmentRequest(params)
126//
127//    err := req.Send()
128//    if err == nil { // resp is now filled
129//        fmt.Println(resp)
130//    }
131//
132// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ApproveAssignment
133func (c *MTurk) ApproveAssignmentRequest(input *ApproveAssignmentInput) (req *request.Request, output *ApproveAssignmentOutput) {
134	op := &request.Operation{
135		Name:       opApproveAssignment,
136		HTTPMethod: "POST",
137		HTTPPath:   "/",
138	}
139
140	if input == nil {
141		input = &ApproveAssignmentInput{}
142	}
143
144	output = &ApproveAssignmentOutput{}
145	req = c.newRequest(op, input, output)
146	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
147	return
148}
149
150// ApproveAssignment API operation for Amazon Mechanical Turk.
151//
152// The ApproveAssignment operation approves the results of a completed assignment.
153//
154// Approving an assignment initiates two payments from the Requester's Amazon.com
155// account
156//
157//    * The Worker who submitted the results is paid the reward specified in
158//    the HIT.
159//
160//    * Amazon Mechanical Turk fees are debited.
161//
162// If the Requester's account does not have adequate funds for these payments,
163// the call to ApproveAssignment returns an exception, and the approval is not
164// processed. You can include an optional feedback message with the approval,
165// which the Worker can see in the Status section of the web site.
166//
167// You can also call this operation for assignments that were previous rejected
168// and approve them by explicitly overriding the previous rejection. This only
169// works on rejected assignments that were submitted within the previous 30
170// days and only if the assignment's related HIT has not been deleted.
171//
172// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
173// with awserr.Error's Code and Message methods to get detailed information about
174// the error.
175//
176// See the AWS API reference guide for Amazon Mechanical Turk's
177// API operation ApproveAssignment for usage and error information.
178//
179// Returned Error Codes:
180//   * ErrCodeServiceFault "ServiceFault"
181//   Amazon Mechanical Turk is temporarily unable to process your request. Try
182//   your call again.
183//
184//   * ErrCodeRequestError "RequestError"
185//   Your request is invalid.
186//
187// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ApproveAssignment
188func (c *MTurk) ApproveAssignment(input *ApproveAssignmentInput) (*ApproveAssignmentOutput, error) {
189	req, out := c.ApproveAssignmentRequest(input)
190	return out, req.Send()
191}
192
193// ApproveAssignmentWithContext is the same as ApproveAssignment with the addition of
194// the ability to pass a context and additional request options.
195//
196// See ApproveAssignment for details on how to use this API operation.
197//
198// The context must be non-nil and will be used for request cancellation. If
199// the context is nil a panic will occur. In the future the SDK may create
200// sub-contexts for http.Requests. See https://golang.org/pkg/context/
201// for more information on using Contexts.
202func (c *MTurk) ApproveAssignmentWithContext(ctx aws.Context, input *ApproveAssignmentInput, opts ...request.Option) (*ApproveAssignmentOutput, error) {
203	req, out := c.ApproveAssignmentRequest(input)
204	req.SetContext(ctx)
205	req.ApplyOptions(opts...)
206	return out, req.Send()
207}
208
209const opAssociateQualificationWithWorker = "AssociateQualificationWithWorker"
210
211// AssociateQualificationWithWorkerRequest generates a "aws/request.Request" representing the
212// client's request for the AssociateQualificationWithWorker operation. The "output" return
213// value will be populated with the request's response once the request completes
214// successfully.
215//
216// Use "Send" method on the returned Request to send the API call to the service.
217// the "output" return value is not valid until after Send returns without error.
218//
219// See AssociateQualificationWithWorker for more information on using the AssociateQualificationWithWorker
220// API call, and error handling.
221//
222// This method is useful when you want to inject custom logic or configuration
223// into the SDK's request lifecycle. Such as custom headers, or retry logic.
224//
225//
226//    // Example sending a request using the AssociateQualificationWithWorkerRequest method.
227//    req, resp := client.AssociateQualificationWithWorkerRequest(params)
228//
229//    err := req.Send()
230//    if err == nil { // resp is now filled
231//        fmt.Println(resp)
232//    }
233//
234// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/AssociateQualificationWithWorker
235func (c *MTurk) AssociateQualificationWithWorkerRequest(input *AssociateQualificationWithWorkerInput) (req *request.Request, output *AssociateQualificationWithWorkerOutput) {
236	op := &request.Operation{
237		Name:       opAssociateQualificationWithWorker,
238		HTTPMethod: "POST",
239		HTTPPath:   "/",
240	}
241
242	if input == nil {
243		input = &AssociateQualificationWithWorkerInput{}
244	}
245
246	output = &AssociateQualificationWithWorkerOutput{}
247	req = c.newRequest(op, input, output)
248	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
249	return
250}
251
252// AssociateQualificationWithWorker API operation for Amazon Mechanical Turk.
253//
254// The AssociateQualificationWithWorker operation gives a Worker a Qualification.
255// AssociateQualificationWithWorker does not require that the Worker submit
256// a Qualification request. It gives the Qualification directly to the Worker.
257//
258// You can only assign a Qualification of a Qualification type that you created
259// (using the CreateQualificationType operation).
260//
261// Note: AssociateQualificationWithWorker does not affect any pending Qualification
262// requests for the Qualification by the Worker. If you assign a Qualification
263// to a Worker, then later grant a Qualification request made by the Worker,
264// the granting of the request may modify the Qualification score. To resolve
265// a pending Qualification request without affecting the Qualification the Worker
266// already has, reject the request with the RejectQualificationRequest operation.
267//
268// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
269// with awserr.Error's Code and Message methods to get detailed information about
270// the error.
271//
272// See the AWS API reference guide for Amazon Mechanical Turk's
273// API operation AssociateQualificationWithWorker for usage and error information.
274//
275// Returned Error Codes:
276//   * ErrCodeServiceFault "ServiceFault"
277//   Amazon Mechanical Turk is temporarily unable to process your request. Try
278//   your call again.
279//
280//   * ErrCodeRequestError "RequestError"
281//   Your request is invalid.
282//
283// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/AssociateQualificationWithWorker
284func (c *MTurk) AssociateQualificationWithWorker(input *AssociateQualificationWithWorkerInput) (*AssociateQualificationWithWorkerOutput, error) {
285	req, out := c.AssociateQualificationWithWorkerRequest(input)
286	return out, req.Send()
287}
288
289// AssociateQualificationWithWorkerWithContext is the same as AssociateQualificationWithWorker with the addition of
290// the ability to pass a context and additional request options.
291//
292// See AssociateQualificationWithWorker for details on how to use this API operation.
293//
294// The context must be non-nil and will be used for request cancellation. If
295// the context is nil a panic will occur. In the future the SDK may create
296// sub-contexts for http.Requests. See https://golang.org/pkg/context/
297// for more information on using Contexts.
298func (c *MTurk) AssociateQualificationWithWorkerWithContext(ctx aws.Context, input *AssociateQualificationWithWorkerInput, opts ...request.Option) (*AssociateQualificationWithWorkerOutput, error) {
299	req, out := c.AssociateQualificationWithWorkerRequest(input)
300	req.SetContext(ctx)
301	req.ApplyOptions(opts...)
302	return out, req.Send()
303}
304
305const opCreateAdditionalAssignmentsForHIT = "CreateAdditionalAssignmentsForHIT"
306
307// CreateAdditionalAssignmentsForHITRequest generates a "aws/request.Request" representing the
308// client's request for the CreateAdditionalAssignmentsForHIT operation. The "output" return
309// value will be populated with the request's response once the request completes
310// successfully.
311//
312// Use "Send" method on the returned Request to send the API call to the service.
313// the "output" return value is not valid until after Send returns without error.
314//
315// See CreateAdditionalAssignmentsForHIT for more information on using the CreateAdditionalAssignmentsForHIT
316// API call, and error handling.
317//
318// This method is useful when you want to inject custom logic or configuration
319// into the SDK's request lifecycle. Such as custom headers, or retry logic.
320//
321//
322//    // Example sending a request using the CreateAdditionalAssignmentsForHITRequest method.
323//    req, resp := client.CreateAdditionalAssignmentsForHITRequest(params)
324//
325//    err := req.Send()
326//    if err == nil { // resp is now filled
327//        fmt.Println(resp)
328//    }
329//
330// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateAdditionalAssignmentsForHIT
331func (c *MTurk) CreateAdditionalAssignmentsForHITRequest(input *CreateAdditionalAssignmentsForHITInput) (req *request.Request, output *CreateAdditionalAssignmentsForHITOutput) {
332	op := &request.Operation{
333		Name:       opCreateAdditionalAssignmentsForHIT,
334		HTTPMethod: "POST",
335		HTTPPath:   "/",
336	}
337
338	if input == nil {
339		input = &CreateAdditionalAssignmentsForHITInput{}
340	}
341
342	output = &CreateAdditionalAssignmentsForHITOutput{}
343	req = c.newRequest(op, input, output)
344	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
345	return
346}
347
348// CreateAdditionalAssignmentsForHIT API operation for Amazon Mechanical Turk.
349//
350// The CreateAdditionalAssignmentsForHIT operation increases the maximum number
351// of assignments of an existing HIT.
352//
353// To extend the maximum number of assignments, specify the number of additional
354// assignments.
355//
356//    * HITs created with fewer than 10 assignments cannot be extended to have
357//    10 or more assignments. Attempting to add assignments in a way that brings
358//    the total number of assignments for a HIT from fewer than 10 assignments
359//    to 10 or more assignments will result in an AWS.MechanicalTurk.InvalidMaximumAssignmentsIncrease
360//    exception.
361//
362//    * HITs that were created before July 22, 2015 cannot be extended. Attempting
363//    to extend HITs that were created before July 22, 2015 will result in an
364//    AWS.MechanicalTurk.HITTooOldForExtension exception.
365//
366// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
367// with awserr.Error's Code and Message methods to get detailed information about
368// the error.
369//
370// See the AWS API reference guide for Amazon Mechanical Turk's
371// API operation CreateAdditionalAssignmentsForHIT for usage and error information.
372//
373// Returned Error Codes:
374//   * ErrCodeServiceFault "ServiceFault"
375//   Amazon Mechanical Turk is temporarily unable to process your request. Try
376//   your call again.
377//
378//   * ErrCodeRequestError "RequestError"
379//   Your request is invalid.
380//
381// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateAdditionalAssignmentsForHIT
382func (c *MTurk) CreateAdditionalAssignmentsForHIT(input *CreateAdditionalAssignmentsForHITInput) (*CreateAdditionalAssignmentsForHITOutput, error) {
383	req, out := c.CreateAdditionalAssignmentsForHITRequest(input)
384	return out, req.Send()
385}
386
387// CreateAdditionalAssignmentsForHITWithContext is the same as CreateAdditionalAssignmentsForHIT with the addition of
388// the ability to pass a context and additional request options.
389//
390// See CreateAdditionalAssignmentsForHIT for details on how to use this API operation.
391//
392// The context must be non-nil and will be used for request cancellation. If
393// the context is nil a panic will occur. In the future the SDK may create
394// sub-contexts for http.Requests. See https://golang.org/pkg/context/
395// for more information on using Contexts.
396func (c *MTurk) CreateAdditionalAssignmentsForHITWithContext(ctx aws.Context, input *CreateAdditionalAssignmentsForHITInput, opts ...request.Option) (*CreateAdditionalAssignmentsForHITOutput, error) {
397	req, out := c.CreateAdditionalAssignmentsForHITRequest(input)
398	req.SetContext(ctx)
399	req.ApplyOptions(opts...)
400	return out, req.Send()
401}
402
403const opCreateHIT = "CreateHIT"
404
405// CreateHITRequest generates a "aws/request.Request" representing the
406// client's request for the CreateHIT operation. The "output" return
407// value will be populated with the request's response once the request completes
408// successfully.
409//
410// Use "Send" method on the returned Request to send the API call to the service.
411// the "output" return value is not valid until after Send returns without error.
412//
413// See CreateHIT for more information on using the CreateHIT
414// API call, and error handling.
415//
416// This method is useful when you want to inject custom logic or configuration
417// into the SDK's request lifecycle. Such as custom headers, or retry logic.
418//
419//
420//    // Example sending a request using the CreateHITRequest method.
421//    req, resp := client.CreateHITRequest(params)
422//
423//    err := req.Send()
424//    if err == nil { // resp is now filled
425//        fmt.Println(resp)
426//    }
427//
428// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateHIT
429func (c *MTurk) CreateHITRequest(input *CreateHITInput) (req *request.Request, output *CreateHITOutput) {
430	op := &request.Operation{
431		Name:       opCreateHIT,
432		HTTPMethod: "POST",
433		HTTPPath:   "/",
434	}
435
436	if input == nil {
437		input = &CreateHITInput{}
438	}
439
440	output = &CreateHITOutput{}
441	req = c.newRequest(op, input, output)
442	return
443}
444
445// CreateHIT API operation for Amazon Mechanical Turk.
446//
447// The CreateHIT operation creates a new Human Intelligence Task (HIT). The
448// new HIT is made available for Workers to find and accept on the Amazon Mechanical
449// Turk website.
450//
451// This operation allows you to specify a new HIT by passing in values for the
452// properties of the HIT, such as its title, reward amount and number of assignments.
453// When you pass these values to CreateHIT, a new HIT is created for you, with
454// a new HITTypeID. The HITTypeID can be used to create additional HITs in the
455// future without needing to specify common parameters such as the title, description
456// and reward amount each time.
457//
458// An alternative way to create HITs is to first generate a HITTypeID using
459// the CreateHITType operation and then call the CreateHITWithHITType operation.
460// This is the recommended best practice for Requesters who are creating large
461// numbers of HITs.
462//
463// CreateHIT also supports several ways to provide question data: by providing
464// a value for the Question parameter that fully specifies the contents of the
465// HIT, or by providing a HitLayoutId and associated HitLayoutParameters.
466//
467// If a HIT is created with 10 or more maximum assignments, there is an additional
468// fee. For more information, see Amazon Mechanical Turk Pricing (https://requester.mturk.com/pricing).
469//
470// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
471// with awserr.Error's Code and Message methods to get detailed information about
472// the error.
473//
474// See the AWS API reference guide for Amazon Mechanical Turk's
475// API operation CreateHIT for usage and error information.
476//
477// Returned Error Codes:
478//   * ErrCodeServiceFault "ServiceFault"
479//   Amazon Mechanical Turk is temporarily unable to process your request. Try
480//   your call again.
481//
482//   * ErrCodeRequestError "RequestError"
483//   Your request is invalid.
484//
485// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateHIT
486func (c *MTurk) CreateHIT(input *CreateHITInput) (*CreateHITOutput, error) {
487	req, out := c.CreateHITRequest(input)
488	return out, req.Send()
489}
490
491// CreateHITWithContext is the same as CreateHIT with the addition of
492// the ability to pass a context and additional request options.
493//
494// See CreateHIT for details on how to use this API operation.
495//
496// The context must be non-nil and will be used for request cancellation. If
497// the context is nil a panic will occur. In the future the SDK may create
498// sub-contexts for http.Requests. See https://golang.org/pkg/context/
499// for more information on using Contexts.
500func (c *MTurk) CreateHITWithContext(ctx aws.Context, input *CreateHITInput, opts ...request.Option) (*CreateHITOutput, error) {
501	req, out := c.CreateHITRequest(input)
502	req.SetContext(ctx)
503	req.ApplyOptions(opts...)
504	return out, req.Send()
505}
506
507const opCreateHITType = "CreateHITType"
508
509// CreateHITTypeRequest generates a "aws/request.Request" representing the
510// client's request for the CreateHITType operation. The "output" return
511// value will be populated with the request's response once the request completes
512// successfully.
513//
514// Use "Send" method on the returned Request to send the API call to the service.
515// the "output" return value is not valid until after Send returns without error.
516//
517// See CreateHITType for more information on using the CreateHITType
518// API call, and error handling.
519//
520// This method is useful when you want to inject custom logic or configuration
521// into the SDK's request lifecycle. Such as custom headers, or retry logic.
522//
523//
524//    // Example sending a request using the CreateHITTypeRequest method.
525//    req, resp := client.CreateHITTypeRequest(params)
526//
527//    err := req.Send()
528//    if err == nil { // resp is now filled
529//        fmt.Println(resp)
530//    }
531//
532// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateHITType
533func (c *MTurk) CreateHITTypeRequest(input *CreateHITTypeInput) (req *request.Request, output *CreateHITTypeOutput) {
534	op := &request.Operation{
535		Name:       opCreateHITType,
536		HTTPMethod: "POST",
537		HTTPPath:   "/",
538	}
539
540	if input == nil {
541		input = &CreateHITTypeInput{}
542	}
543
544	output = &CreateHITTypeOutput{}
545	req = c.newRequest(op, input, output)
546	return
547}
548
549// CreateHITType API operation for Amazon Mechanical Turk.
550//
551// The CreateHITType operation creates a new HIT type. This operation allows
552// you to define a standard set of HIT properties to use when creating HITs.
553// If you register a HIT type with values that match an existing HIT type, the
554// HIT type ID of the existing type will be returned.
555//
556// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
557// with awserr.Error's Code and Message methods to get detailed information about
558// the error.
559//
560// See the AWS API reference guide for Amazon Mechanical Turk's
561// API operation CreateHITType for usage and error information.
562//
563// Returned Error Codes:
564//   * ErrCodeServiceFault "ServiceFault"
565//   Amazon Mechanical Turk is temporarily unable to process your request. Try
566//   your call again.
567//
568//   * ErrCodeRequestError "RequestError"
569//   Your request is invalid.
570//
571// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateHITType
572func (c *MTurk) CreateHITType(input *CreateHITTypeInput) (*CreateHITTypeOutput, error) {
573	req, out := c.CreateHITTypeRequest(input)
574	return out, req.Send()
575}
576
577// CreateHITTypeWithContext is the same as CreateHITType with the addition of
578// the ability to pass a context and additional request options.
579//
580// See CreateHITType for details on how to use this API operation.
581//
582// The context must be non-nil and will be used for request cancellation. If
583// the context is nil a panic will occur. In the future the SDK may create
584// sub-contexts for http.Requests. See https://golang.org/pkg/context/
585// for more information on using Contexts.
586func (c *MTurk) CreateHITTypeWithContext(ctx aws.Context, input *CreateHITTypeInput, opts ...request.Option) (*CreateHITTypeOutput, error) {
587	req, out := c.CreateHITTypeRequest(input)
588	req.SetContext(ctx)
589	req.ApplyOptions(opts...)
590	return out, req.Send()
591}
592
593const opCreateHITWithHITType = "CreateHITWithHITType"
594
595// CreateHITWithHITTypeRequest generates a "aws/request.Request" representing the
596// client's request for the CreateHITWithHITType operation. The "output" return
597// value will be populated with the request's response once the request completes
598// successfully.
599//
600// Use "Send" method on the returned Request to send the API call to the service.
601// the "output" return value is not valid until after Send returns without error.
602//
603// See CreateHITWithHITType for more information on using the CreateHITWithHITType
604// API call, and error handling.
605//
606// This method is useful when you want to inject custom logic or configuration
607// into the SDK's request lifecycle. Such as custom headers, or retry logic.
608//
609//
610//    // Example sending a request using the CreateHITWithHITTypeRequest method.
611//    req, resp := client.CreateHITWithHITTypeRequest(params)
612//
613//    err := req.Send()
614//    if err == nil { // resp is now filled
615//        fmt.Println(resp)
616//    }
617//
618// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateHITWithHITType
619func (c *MTurk) CreateHITWithHITTypeRequest(input *CreateHITWithHITTypeInput) (req *request.Request, output *CreateHITWithHITTypeOutput) {
620	op := &request.Operation{
621		Name:       opCreateHITWithHITType,
622		HTTPMethod: "POST",
623		HTTPPath:   "/",
624	}
625
626	if input == nil {
627		input = &CreateHITWithHITTypeInput{}
628	}
629
630	output = &CreateHITWithHITTypeOutput{}
631	req = c.newRequest(op, input, output)
632	return
633}
634
635// CreateHITWithHITType API operation for Amazon Mechanical Turk.
636//
637// The CreateHITWithHITType operation creates a new Human Intelligence Task
638// (HIT) using an existing HITTypeID generated by the CreateHITType operation.
639//
640// This is an alternative way to create HITs from the CreateHIT operation. This
641// is the recommended best practice for Requesters who are creating large numbers
642// of HITs.
643//
644// CreateHITWithHITType also supports several ways to provide question data:
645// by providing a value for the Question parameter that fully specifies the
646// contents of the HIT, or by providing a HitLayoutId and associated HitLayoutParameters.
647//
648// If a HIT is created with 10 or more maximum assignments, there is an additional
649// fee. For more information, see Amazon Mechanical Turk Pricing (https://requester.mturk.com/pricing).
650//
651// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
652// with awserr.Error's Code and Message methods to get detailed information about
653// the error.
654//
655// See the AWS API reference guide for Amazon Mechanical Turk's
656// API operation CreateHITWithHITType for usage and error information.
657//
658// Returned Error Codes:
659//   * ErrCodeServiceFault "ServiceFault"
660//   Amazon Mechanical Turk is temporarily unable to process your request. Try
661//   your call again.
662//
663//   * ErrCodeRequestError "RequestError"
664//   Your request is invalid.
665//
666// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateHITWithHITType
667func (c *MTurk) CreateHITWithHITType(input *CreateHITWithHITTypeInput) (*CreateHITWithHITTypeOutput, error) {
668	req, out := c.CreateHITWithHITTypeRequest(input)
669	return out, req.Send()
670}
671
672// CreateHITWithHITTypeWithContext is the same as CreateHITWithHITType with the addition of
673// the ability to pass a context and additional request options.
674//
675// See CreateHITWithHITType for details on how to use this API operation.
676//
677// The context must be non-nil and will be used for request cancellation. If
678// the context is nil a panic will occur. In the future the SDK may create
679// sub-contexts for http.Requests. See https://golang.org/pkg/context/
680// for more information on using Contexts.
681func (c *MTurk) CreateHITWithHITTypeWithContext(ctx aws.Context, input *CreateHITWithHITTypeInput, opts ...request.Option) (*CreateHITWithHITTypeOutput, error) {
682	req, out := c.CreateHITWithHITTypeRequest(input)
683	req.SetContext(ctx)
684	req.ApplyOptions(opts...)
685	return out, req.Send()
686}
687
688const opCreateQualificationType = "CreateQualificationType"
689
690// CreateQualificationTypeRequest generates a "aws/request.Request" representing the
691// client's request for the CreateQualificationType operation. The "output" return
692// value will be populated with the request's response once the request completes
693// successfully.
694//
695// Use "Send" method on the returned Request to send the API call to the service.
696// the "output" return value is not valid until after Send returns without error.
697//
698// See CreateQualificationType for more information on using the CreateQualificationType
699// API call, and error handling.
700//
701// This method is useful when you want to inject custom logic or configuration
702// into the SDK's request lifecycle. Such as custom headers, or retry logic.
703//
704//
705//    // Example sending a request using the CreateQualificationTypeRequest method.
706//    req, resp := client.CreateQualificationTypeRequest(params)
707//
708//    err := req.Send()
709//    if err == nil { // resp is now filled
710//        fmt.Println(resp)
711//    }
712//
713// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateQualificationType
714func (c *MTurk) CreateQualificationTypeRequest(input *CreateQualificationTypeInput) (req *request.Request, output *CreateQualificationTypeOutput) {
715	op := &request.Operation{
716		Name:       opCreateQualificationType,
717		HTTPMethod: "POST",
718		HTTPPath:   "/",
719	}
720
721	if input == nil {
722		input = &CreateQualificationTypeInput{}
723	}
724
725	output = &CreateQualificationTypeOutput{}
726	req = c.newRequest(op, input, output)
727	return
728}
729
730// CreateQualificationType API operation for Amazon Mechanical Turk.
731//
732// The CreateQualificationType operation creates a new Qualification type, which
733// is represented by a QualificationType data structure.
734//
735// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
736// with awserr.Error's Code and Message methods to get detailed information about
737// the error.
738//
739// See the AWS API reference guide for Amazon Mechanical Turk's
740// API operation CreateQualificationType for usage and error information.
741//
742// Returned Error Codes:
743//   * ErrCodeServiceFault "ServiceFault"
744//   Amazon Mechanical Turk is temporarily unable to process your request. Try
745//   your call again.
746//
747//   * ErrCodeRequestError "RequestError"
748//   Your request is invalid.
749//
750// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateQualificationType
751func (c *MTurk) CreateQualificationType(input *CreateQualificationTypeInput) (*CreateQualificationTypeOutput, error) {
752	req, out := c.CreateQualificationTypeRequest(input)
753	return out, req.Send()
754}
755
756// CreateQualificationTypeWithContext is the same as CreateQualificationType with the addition of
757// the ability to pass a context and additional request options.
758//
759// See CreateQualificationType for details on how to use this API operation.
760//
761// The context must be non-nil and will be used for request cancellation. If
762// the context is nil a panic will occur. In the future the SDK may create
763// sub-contexts for http.Requests. See https://golang.org/pkg/context/
764// for more information on using Contexts.
765func (c *MTurk) CreateQualificationTypeWithContext(ctx aws.Context, input *CreateQualificationTypeInput, opts ...request.Option) (*CreateQualificationTypeOutput, error) {
766	req, out := c.CreateQualificationTypeRequest(input)
767	req.SetContext(ctx)
768	req.ApplyOptions(opts...)
769	return out, req.Send()
770}
771
772const opCreateWorkerBlock = "CreateWorkerBlock"
773
774// CreateWorkerBlockRequest generates a "aws/request.Request" representing the
775// client's request for the CreateWorkerBlock operation. The "output" return
776// value will be populated with the request's response once the request completes
777// successfully.
778//
779// Use "Send" method on the returned Request to send the API call to the service.
780// the "output" return value is not valid until after Send returns without error.
781//
782// See CreateWorkerBlock for more information on using the CreateWorkerBlock
783// API call, and error handling.
784//
785// This method is useful when you want to inject custom logic or configuration
786// into the SDK's request lifecycle. Such as custom headers, or retry logic.
787//
788//
789//    // Example sending a request using the CreateWorkerBlockRequest method.
790//    req, resp := client.CreateWorkerBlockRequest(params)
791//
792//    err := req.Send()
793//    if err == nil { // resp is now filled
794//        fmt.Println(resp)
795//    }
796//
797// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateWorkerBlock
798func (c *MTurk) CreateWorkerBlockRequest(input *CreateWorkerBlockInput) (req *request.Request, output *CreateWorkerBlockOutput) {
799	op := &request.Operation{
800		Name:       opCreateWorkerBlock,
801		HTTPMethod: "POST",
802		HTTPPath:   "/",
803	}
804
805	if input == nil {
806		input = &CreateWorkerBlockInput{}
807	}
808
809	output = &CreateWorkerBlockOutput{}
810	req = c.newRequest(op, input, output)
811	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
812	return
813}
814
815// CreateWorkerBlock API operation for Amazon Mechanical Turk.
816//
817// The CreateWorkerBlock operation allows you to prevent a Worker from working
818// on your HITs. For example, you can block a Worker who is producing poor quality
819// work. You can block up to 100,000 Workers.
820//
821// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
822// with awserr.Error's Code and Message methods to get detailed information about
823// the error.
824//
825// See the AWS API reference guide for Amazon Mechanical Turk's
826// API operation CreateWorkerBlock for usage and error information.
827//
828// Returned Error Codes:
829//   * ErrCodeServiceFault "ServiceFault"
830//   Amazon Mechanical Turk is temporarily unable to process your request. Try
831//   your call again.
832//
833//   * ErrCodeRequestError "RequestError"
834//   Your request is invalid.
835//
836// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/CreateWorkerBlock
837func (c *MTurk) CreateWorkerBlock(input *CreateWorkerBlockInput) (*CreateWorkerBlockOutput, error) {
838	req, out := c.CreateWorkerBlockRequest(input)
839	return out, req.Send()
840}
841
842// CreateWorkerBlockWithContext is the same as CreateWorkerBlock with the addition of
843// the ability to pass a context and additional request options.
844//
845// See CreateWorkerBlock for details on how to use this API operation.
846//
847// The context must be non-nil and will be used for request cancellation. If
848// the context is nil a panic will occur. In the future the SDK may create
849// sub-contexts for http.Requests. See https://golang.org/pkg/context/
850// for more information on using Contexts.
851func (c *MTurk) CreateWorkerBlockWithContext(ctx aws.Context, input *CreateWorkerBlockInput, opts ...request.Option) (*CreateWorkerBlockOutput, error) {
852	req, out := c.CreateWorkerBlockRequest(input)
853	req.SetContext(ctx)
854	req.ApplyOptions(opts...)
855	return out, req.Send()
856}
857
858const opDeleteHIT = "DeleteHIT"
859
860// DeleteHITRequest generates a "aws/request.Request" representing the
861// client's request for the DeleteHIT operation. The "output" return
862// value will be populated with the request's response once the request completes
863// successfully.
864//
865// Use "Send" method on the returned Request to send the API call to the service.
866// the "output" return value is not valid until after Send returns without error.
867//
868// See DeleteHIT for more information on using the DeleteHIT
869// API call, and error handling.
870//
871// This method is useful when you want to inject custom logic or configuration
872// into the SDK's request lifecycle. Such as custom headers, or retry logic.
873//
874//
875//    // Example sending a request using the DeleteHITRequest method.
876//    req, resp := client.DeleteHITRequest(params)
877//
878//    err := req.Send()
879//    if err == nil { // resp is now filled
880//        fmt.Println(resp)
881//    }
882//
883// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DeleteHIT
884func (c *MTurk) DeleteHITRequest(input *DeleteHITInput) (req *request.Request, output *DeleteHITOutput) {
885	op := &request.Operation{
886		Name:       opDeleteHIT,
887		HTTPMethod: "POST",
888		HTTPPath:   "/",
889	}
890
891	if input == nil {
892		input = &DeleteHITInput{}
893	}
894
895	output = &DeleteHITOutput{}
896	req = c.newRequest(op, input, output)
897	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
898	return
899}
900
901// DeleteHIT API operation for Amazon Mechanical Turk.
902//
903// The DeleteHIT operation is used to delete HIT that is no longer needed. Only
904// the Requester who created the HIT can delete it.
905//
906// You can only dispose of HITs that are in the Reviewable state, with all of
907// their submitted assignments already either approved or rejected. If you call
908// the DeleteHIT operation on a HIT that is not in the Reviewable state (for
909// example, that has not expired, or still has active assignments), or on a
910// HIT that is Reviewable but without all of its submitted assignments already
911// approved or rejected, the service will return an error.
912//
913//    * HITs are automatically disposed of after 120 days.
914//
915//    * After you dispose of a HIT, you can no longer approve the HIT's rejected
916//    assignments.
917//
918//    * Disposed HITs are not returned in results for the ListHITs operation.
919//
920//    * Disposing HITs can improve the performance of operations such as ListReviewableHITs
921//    and ListHITs.
922//
923// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
924// with awserr.Error's Code and Message methods to get detailed information about
925// the error.
926//
927// See the AWS API reference guide for Amazon Mechanical Turk's
928// API operation DeleteHIT for usage and error information.
929//
930// Returned Error Codes:
931//   * ErrCodeServiceFault "ServiceFault"
932//   Amazon Mechanical Turk is temporarily unable to process your request. Try
933//   your call again.
934//
935//   * ErrCodeRequestError "RequestError"
936//   Your request is invalid.
937//
938// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DeleteHIT
939func (c *MTurk) DeleteHIT(input *DeleteHITInput) (*DeleteHITOutput, error) {
940	req, out := c.DeleteHITRequest(input)
941	return out, req.Send()
942}
943
944// DeleteHITWithContext is the same as DeleteHIT with the addition of
945// the ability to pass a context and additional request options.
946//
947// See DeleteHIT for details on how to use this API operation.
948//
949// The context must be non-nil and will be used for request cancellation. If
950// the context is nil a panic will occur. In the future the SDK may create
951// sub-contexts for http.Requests. See https://golang.org/pkg/context/
952// for more information on using Contexts.
953func (c *MTurk) DeleteHITWithContext(ctx aws.Context, input *DeleteHITInput, opts ...request.Option) (*DeleteHITOutput, error) {
954	req, out := c.DeleteHITRequest(input)
955	req.SetContext(ctx)
956	req.ApplyOptions(opts...)
957	return out, req.Send()
958}
959
960const opDeleteQualificationType = "DeleteQualificationType"
961
962// DeleteQualificationTypeRequest generates a "aws/request.Request" representing the
963// client's request for the DeleteQualificationType operation. The "output" return
964// value will be populated with the request's response once the request completes
965// successfully.
966//
967// Use "Send" method on the returned Request to send the API call to the service.
968// the "output" return value is not valid until after Send returns without error.
969//
970// See DeleteQualificationType for more information on using the DeleteQualificationType
971// API call, and error handling.
972//
973// This method is useful when you want to inject custom logic or configuration
974// into the SDK's request lifecycle. Such as custom headers, or retry logic.
975//
976//
977//    // Example sending a request using the DeleteQualificationTypeRequest method.
978//    req, resp := client.DeleteQualificationTypeRequest(params)
979//
980//    err := req.Send()
981//    if err == nil { // resp is now filled
982//        fmt.Println(resp)
983//    }
984//
985// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DeleteQualificationType
986func (c *MTurk) DeleteQualificationTypeRequest(input *DeleteQualificationTypeInput) (req *request.Request, output *DeleteQualificationTypeOutput) {
987	op := &request.Operation{
988		Name:       opDeleteQualificationType,
989		HTTPMethod: "POST",
990		HTTPPath:   "/",
991	}
992
993	if input == nil {
994		input = &DeleteQualificationTypeInput{}
995	}
996
997	output = &DeleteQualificationTypeOutput{}
998	req = c.newRequest(op, input, output)
999	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1000	return
1001}
1002
1003// DeleteQualificationType API operation for Amazon Mechanical Turk.
1004//
1005// The DeleteQualificationType deletes a Qualification type and deletes any
1006// HIT types that are associated with the Qualification type.
1007//
1008// This operation does not revoke Qualifications already assigned to Workers
1009// because the Qualifications might be needed for active HITs. If there are
1010// any pending requests for the Qualification type, Amazon Mechanical Turk rejects
1011// those requests. After you delete a Qualification type, you can no longer
1012// use it to create HITs or HIT types.
1013//
1014// DeleteQualificationType must wait for all the HITs that use the deleted Qualification
1015// type to be deleted before completing. It may take up to 48 hours before DeleteQualificationType
1016// completes and the unique name of the Qualification type is available for
1017// reuse with CreateQualificationType.
1018//
1019// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1020// with awserr.Error's Code and Message methods to get detailed information about
1021// the error.
1022//
1023// See the AWS API reference guide for Amazon Mechanical Turk's
1024// API operation DeleteQualificationType for usage and error information.
1025//
1026// Returned Error Codes:
1027//   * ErrCodeServiceFault "ServiceFault"
1028//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1029//   your call again.
1030//
1031//   * ErrCodeRequestError "RequestError"
1032//   Your request is invalid.
1033//
1034// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DeleteQualificationType
1035func (c *MTurk) DeleteQualificationType(input *DeleteQualificationTypeInput) (*DeleteQualificationTypeOutput, error) {
1036	req, out := c.DeleteQualificationTypeRequest(input)
1037	return out, req.Send()
1038}
1039
1040// DeleteQualificationTypeWithContext is the same as DeleteQualificationType with the addition of
1041// the ability to pass a context and additional request options.
1042//
1043// See DeleteQualificationType for details on how to use this API operation.
1044//
1045// The context must be non-nil and will be used for request cancellation. If
1046// the context is nil a panic will occur. In the future the SDK may create
1047// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1048// for more information on using Contexts.
1049func (c *MTurk) DeleteQualificationTypeWithContext(ctx aws.Context, input *DeleteQualificationTypeInput, opts ...request.Option) (*DeleteQualificationTypeOutput, error) {
1050	req, out := c.DeleteQualificationTypeRequest(input)
1051	req.SetContext(ctx)
1052	req.ApplyOptions(opts...)
1053	return out, req.Send()
1054}
1055
1056const opDeleteWorkerBlock = "DeleteWorkerBlock"
1057
1058// DeleteWorkerBlockRequest generates a "aws/request.Request" representing the
1059// client's request for the DeleteWorkerBlock operation. The "output" return
1060// value will be populated with the request's response once the request completes
1061// successfully.
1062//
1063// Use "Send" method on the returned Request to send the API call to the service.
1064// the "output" return value is not valid until after Send returns without error.
1065//
1066// See DeleteWorkerBlock for more information on using the DeleteWorkerBlock
1067// API call, and error handling.
1068//
1069// This method is useful when you want to inject custom logic or configuration
1070// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1071//
1072//
1073//    // Example sending a request using the DeleteWorkerBlockRequest method.
1074//    req, resp := client.DeleteWorkerBlockRequest(params)
1075//
1076//    err := req.Send()
1077//    if err == nil { // resp is now filled
1078//        fmt.Println(resp)
1079//    }
1080//
1081// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DeleteWorkerBlock
1082func (c *MTurk) DeleteWorkerBlockRequest(input *DeleteWorkerBlockInput) (req *request.Request, output *DeleteWorkerBlockOutput) {
1083	op := &request.Operation{
1084		Name:       opDeleteWorkerBlock,
1085		HTTPMethod: "POST",
1086		HTTPPath:   "/",
1087	}
1088
1089	if input == nil {
1090		input = &DeleteWorkerBlockInput{}
1091	}
1092
1093	output = &DeleteWorkerBlockOutput{}
1094	req = c.newRequest(op, input, output)
1095	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1096	return
1097}
1098
1099// DeleteWorkerBlock API operation for Amazon Mechanical Turk.
1100//
1101// The DeleteWorkerBlock operation allows you to reinstate a blocked Worker
1102// to work on your HITs. This operation reverses the effects of the CreateWorkerBlock
1103// operation. You need the Worker ID to use this operation. If the Worker ID
1104// is missing or invalid, this operation fails and returns the message “WorkerId
1105// is invalid.” If the specified Worker is not blocked, this operation returns
1106// successfully.
1107//
1108// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1109// with awserr.Error's Code and Message methods to get detailed information about
1110// the error.
1111//
1112// See the AWS API reference guide for Amazon Mechanical Turk's
1113// API operation DeleteWorkerBlock for usage and error information.
1114//
1115// Returned Error Codes:
1116//   * ErrCodeServiceFault "ServiceFault"
1117//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1118//   your call again.
1119//
1120//   * ErrCodeRequestError "RequestError"
1121//   Your request is invalid.
1122//
1123// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DeleteWorkerBlock
1124func (c *MTurk) DeleteWorkerBlock(input *DeleteWorkerBlockInput) (*DeleteWorkerBlockOutput, error) {
1125	req, out := c.DeleteWorkerBlockRequest(input)
1126	return out, req.Send()
1127}
1128
1129// DeleteWorkerBlockWithContext is the same as DeleteWorkerBlock with the addition of
1130// the ability to pass a context and additional request options.
1131//
1132// See DeleteWorkerBlock for details on how to use this API operation.
1133//
1134// The context must be non-nil and will be used for request cancellation. If
1135// the context is nil a panic will occur. In the future the SDK may create
1136// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1137// for more information on using Contexts.
1138func (c *MTurk) DeleteWorkerBlockWithContext(ctx aws.Context, input *DeleteWorkerBlockInput, opts ...request.Option) (*DeleteWorkerBlockOutput, error) {
1139	req, out := c.DeleteWorkerBlockRequest(input)
1140	req.SetContext(ctx)
1141	req.ApplyOptions(opts...)
1142	return out, req.Send()
1143}
1144
1145const opDisassociateQualificationFromWorker = "DisassociateQualificationFromWorker"
1146
1147// DisassociateQualificationFromWorkerRequest generates a "aws/request.Request" representing the
1148// client's request for the DisassociateQualificationFromWorker operation. The "output" return
1149// value will be populated with the request's response once the request completes
1150// successfully.
1151//
1152// Use "Send" method on the returned Request to send the API call to the service.
1153// the "output" return value is not valid until after Send returns without error.
1154//
1155// See DisassociateQualificationFromWorker for more information on using the DisassociateQualificationFromWorker
1156// API call, and error handling.
1157//
1158// This method is useful when you want to inject custom logic or configuration
1159// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1160//
1161//
1162//    // Example sending a request using the DisassociateQualificationFromWorkerRequest method.
1163//    req, resp := client.DisassociateQualificationFromWorkerRequest(params)
1164//
1165//    err := req.Send()
1166//    if err == nil { // resp is now filled
1167//        fmt.Println(resp)
1168//    }
1169//
1170// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DisassociateQualificationFromWorker
1171func (c *MTurk) DisassociateQualificationFromWorkerRequest(input *DisassociateQualificationFromWorkerInput) (req *request.Request, output *DisassociateQualificationFromWorkerOutput) {
1172	op := &request.Operation{
1173		Name:       opDisassociateQualificationFromWorker,
1174		HTTPMethod: "POST",
1175		HTTPPath:   "/",
1176	}
1177
1178	if input == nil {
1179		input = &DisassociateQualificationFromWorkerInput{}
1180	}
1181
1182	output = &DisassociateQualificationFromWorkerOutput{}
1183	req = c.newRequest(op, input, output)
1184	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1185	return
1186}
1187
1188// DisassociateQualificationFromWorker API operation for Amazon Mechanical Turk.
1189//
1190// The DisassociateQualificationFromWorker revokes a previously granted Qualification
1191// from a user.
1192//
1193// You can provide a text message explaining why the Qualification was revoked.
1194// The user who had the Qualification can see this message.
1195//
1196// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1197// with awserr.Error's Code and Message methods to get detailed information about
1198// the error.
1199//
1200// See the AWS API reference guide for Amazon Mechanical Turk's
1201// API operation DisassociateQualificationFromWorker for usage and error information.
1202//
1203// Returned Error Codes:
1204//   * ErrCodeServiceFault "ServiceFault"
1205//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1206//   your call again.
1207//
1208//   * ErrCodeRequestError "RequestError"
1209//   Your request is invalid.
1210//
1211// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/DisassociateQualificationFromWorker
1212func (c *MTurk) DisassociateQualificationFromWorker(input *DisassociateQualificationFromWorkerInput) (*DisassociateQualificationFromWorkerOutput, error) {
1213	req, out := c.DisassociateQualificationFromWorkerRequest(input)
1214	return out, req.Send()
1215}
1216
1217// DisassociateQualificationFromWorkerWithContext is the same as DisassociateQualificationFromWorker with the addition of
1218// the ability to pass a context and additional request options.
1219//
1220// See DisassociateQualificationFromWorker for details on how to use this API operation.
1221//
1222// The context must be non-nil and will be used for request cancellation. If
1223// the context is nil a panic will occur. In the future the SDK may create
1224// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1225// for more information on using Contexts.
1226func (c *MTurk) DisassociateQualificationFromWorkerWithContext(ctx aws.Context, input *DisassociateQualificationFromWorkerInput, opts ...request.Option) (*DisassociateQualificationFromWorkerOutput, error) {
1227	req, out := c.DisassociateQualificationFromWorkerRequest(input)
1228	req.SetContext(ctx)
1229	req.ApplyOptions(opts...)
1230	return out, req.Send()
1231}
1232
1233const opGetAccountBalance = "GetAccountBalance"
1234
1235// GetAccountBalanceRequest generates a "aws/request.Request" representing the
1236// client's request for the GetAccountBalance operation. The "output" return
1237// value will be populated with the request's response once the request completes
1238// successfully.
1239//
1240// Use "Send" method on the returned Request to send the API call to the service.
1241// the "output" return value is not valid until after Send returns without error.
1242//
1243// See GetAccountBalance for more information on using the GetAccountBalance
1244// API call, and error handling.
1245//
1246// This method is useful when you want to inject custom logic or configuration
1247// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1248//
1249//
1250//    // Example sending a request using the GetAccountBalanceRequest method.
1251//    req, resp := client.GetAccountBalanceRequest(params)
1252//
1253//    err := req.Send()
1254//    if err == nil { // resp is now filled
1255//        fmt.Println(resp)
1256//    }
1257//
1258// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetAccountBalance
1259func (c *MTurk) GetAccountBalanceRequest(input *GetAccountBalanceInput) (req *request.Request, output *GetAccountBalanceOutput) {
1260	op := &request.Operation{
1261		Name:       opGetAccountBalance,
1262		HTTPMethod: "POST",
1263		HTTPPath:   "/",
1264	}
1265
1266	if input == nil {
1267		input = &GetAccountBalanceInput{}
1268	}
1269
1270	output = &GetAccountBalanceOutput{}
1271	req = c.newRequest(op, input, output)
1272	return
1273}
1274
1275// GetAccountBalance API operation for Amazon Mechanical Turk.
1276//
1277// The GetAccountBalance operation retrieves the amount of money in your Amazon
1278// Mechanical Turk account.
1279//
1280// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1281// with awserr.Error's Code and Message methods to get detailed information about
1282// the error.
1283//
1284// See the AWS API reference guide for Amazon Mechanical Turk's
1285// API operation GetAccountBalance for usage and error information.
1286//
1287// Returned Error Codes:
1288//   * ErrCodeServiceFault "ServiceFault"
1289//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1290//   your call again.
1291//
1292//   * ErrCodeRequestError "RequestError"
1293//   Your request is invalid.
1294//
1295// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetAccountBalance
1296func (c *MTurk) GetAccountBalance(input *GetAccountBalanceInput) (*GetAccountBalanceOutput, error) {
1297	req, out := c.GetAccountBalanceRequest(input)
1298	return out, req.Send()
1299}
1300
1301// GetAccountBalanceWithContext is the same as GetAccountBalance with the addition of
1302// the ability to pass a context and additional request options.
1303//
1304// See GetAccountBalance for details on how to use this API operation.
1305//
1306// The context must be non-nil and will be used for request cancellation. If
1307// the context is nil a panic will occur. In the future the SDK may create
1308// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1309// for more information on using Contexts.
1310func (c *MTurk) GetAccountBalanceWithContext(ctx aws.Context, input *GetAccountBalanceInput, opts ...request.Option) (*GetAccountBalanceOutput, error) {
1311	req, out := c.GetAccountBalanceRequest(input)
1312	req.SetContext(ctx)
1313	req.ApplyOptions(opts...)
1314	return out, req.Send()
1315}
1316
1317const opGetAssignment = "GetAssignment"
1318
1319// GetAssignmentRequest generates a "aws/request.Request" representing the
1320// client's request for the GetAssignment operation. The "output" return
1321// value will be populated with the request's response once the request completes
1322// successfully.
1323//
1324// Use "Send" method on the returned Request to send the API call to the service.
1325// the "output" return value is not valid until after Send returns without error.
1326//
1327// See GetAssignment for more information on using the GetAssignment
1328// API call, and error handling.
1329//
1330// This method is useful when you want to inject custom logic or configuration
1331// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1332//
1333//
1334//    // Example sending a request using the GetAssignmentRequest method.
1335//    req, resp := client.GetAssignmentRequest(params)
1336//
1337//    err := req.Send()
1338//    if err == nil { // resp is now filled
1339//        fmt.Println(resp)
1340//    }
1341//
1342// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetAssignment
1343func (c *MTurk) GetAssignmentRequest(input *GetAssignmentInput) (req *request.Request, output *GetAssignmentOutput) {
1344	op := &request.Operation{
1345		Name:       opGetAssignment,
1346		HTTPMethod: "POST",
1347		HTTPPath:   "/",
1348	}
1349
1350	if input == nil {
1351		input = &GetAssignmentInput{}
1352	}
1353
1354	output = &GetAssignmentOutput{}
1355	req = c.newRequest(op, input, output)
1356	return
1357}
1358
1359// GetAssignment API operation for Amazon Mechanical Turk.
1360//
1361// The GetAssignment operation retrieves the details of the specified Assignment.
1362//
1363// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1364// with awserr.Error's Code and Message methods to get detailed information about
1365// the error.
1366//
1367// See the AWS API reference guide for Amazon Mechanical Turk's
1368// API operation GetAssignment for usage and error information.
1369//
1370// Returned Error Codes:
1371//   * ErrCodeServiceFault "ServiceFault"
1372//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1373//   your call again.
1374//
1375//   * ErrCodeRequestError "RequestError"
1376//   Your request is invalid.
1377//
1378// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetAssignment
1379func (c *MTurk) GetAssignment(input *GetAssignmentInput) (*GetAssignmentOutput, error) {
1380	req, out := c.GetAssignmentRequest(input)
1381	return out, req.Send()
1382}
1383
1384// GetAssignmentWithContext is the same as GetAssignment with the addition of
1385// the ability to pass a context and additional request options.
1386//
1387// See GetAssignment for details on how to use this API operation.
1388//
1389// The context must be non-nil and will be used for request cancellation. If
1390// the context is nil a panic will occur. In the future the SDK may create
1391// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1392// for more information on using Contexts.
1393func (c *MTurk) GetAssignmentWithContext(ctx aws.Context, input *GetAssignmentInput, opts ...request.Option) (*GetAssignmentOutput, error) {
1394	req, out := c.GetAssignmentRequest(input)
1395	req.SetContext(ctx)
1396	req.ApplyOptions(opts...)
1397	return out, req.Send()
1398}
1399
1400const opGetFileUploadURL = "GetFileUploadURL"
1401
1402// GetFileUploadURLRequest generates a "aws/request.Request" representing the
1403// client's request for the GetFileUploadURL operation. The "output" return
1404// value will be populated with the request's response once the request completes
1405// successfully.
1406//
1407// Use "Send" method on the returned Request to send the API call to the service.
1408// the "output" return value is not valid until after Send returns without error.
1409//
1410// See GetFileUploadURL for more information on using the GetFileUploadURL
1411// API call, and error handling.
1412//
1413// This method is useful when you want to inject custom logic or configuration
1414// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1415//
1416//
1417//    // Example sending a request using the GetFileUploadURLRequest method.
1418//    req, resp := client.GetFileUploadURLRequest(params)
1419//
1420//    err := req.Send()
1421//    if err == nil { // resp is now filled
1422//        fmt.Println(resp)
1423//    }
1424//
1425// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetFileUploadURL
1426func (c *MTurk) GetFileUploadURLRequest(input *GetFileUploadURLInput) (req *request.Request, output *GetFileUploadURLOutput) {
1427	op := &request.Operation{
1428		Name:       opGetFileUploadURL,
1429		HTTPMethod: "POST",
1430		HTTPPath:   "/",
1431	}
1432
1433	if input == nil {
1434		input = &GetFileUploadURLInput{}
1435	}
1436
1437	output = &GetFileUploadURLOutput{}
1438	req = c.newRequest(op, input, output)
1439	return
1440}
1441
1442// GetFileUploadURL API operation for Amazon Mechanical Turk.
1443//
1444// The GetFileUploadURL operation generates and returns a temporary URL. You
1445// use the temporary URL to retrieve a file uploaded by a Worker as an answer
1446// to a FileUploadAnswer question for a HIT. The temporary URL is generated
1447// the instant the GetFileUploadURL operation is called, and is valid for 60
1448// seconds. You can get a temporary file upload URL any time until the HIT is
1449// disposed. After the HIT is disposed, any uploaded files are deleted, and
1450// cannot be retrieved. Pending Deprecation on December 12, 2017. The Answer
1451// Specification structure will no longer support the FileUploadAnswer element
1452// to be used for the QuestionForm data structure. Instead, we recommend that
1453// Requesters who want to create HITs asking Workers to upload files to use
1454// Amazon S3.
1455//
1456// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1457// with awserr.Error's Code and Message methods to get detailed information about
1458// the error.
1459//
1460// See the AWS API reference guide for Amazon Mechanical Turk's
1461// API operation GetFileUploadURL for usage and error information.
1462//
1463// Returned Error Codes:
1464//   * ErrCodeServiceFault "ServiceFault"
1465//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1466//   your call again.
1467//
1468//   * ErrCodeRequestError "RequestError"
1469//   Your request is invalid.
1470//
1471// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetFileUploadURL
1472func (c *MTurk) GetFileUploadURL(input *GetFileUploadURLInput) (*GetFileUploadURLOutput, error) {
1473	req, out := c.GetFileUploadURLRequest(input)
1474	return out, req.Send()
1475}
1476
1477// GetFileUploadURLWithContext is the same as GetFileUploadURL with the addition of
1478// the ability to pass a context and additional request options.
1479//
1480// See GetFileUploadURL for details on how to use this API operation.
1481//
1482// The context must be non-nil and will be used for request cancellation. If
1483// the context is nil a panic will occur. In the future the SDK may create
1484// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1485// for more information on using Contexts.
1486func (c *MTurk) GetFileUploadURLWithContext(ctx aws.Context, input *GetFileUploadURLInput, opts ...request.Option) (*GetFileUploadURLOutput, error) {
1487	req, out := c.GetFileUploadURLRequest(input)
1488	req.SetContext(ctx)
1489	req.ApplyOptions(opts...)
1490	return out, req.Send()
1491}
1492
1493const opGetHIT = "GetHIT"
1494
1495// GetHITRequest generates a "aws/request.Request" representing the
1496// client's request for the GetHIT operation. The "output" return
1497// value will be populated with the request's response once the request completes
1498// successfully.
1499//
1500// Use "Send" method on the returned Request to send the API call to the service.
1501// the "output" return value is not valid until after Send returns without error.
1502//
1503// See GetHIT for more information on using the GetHIT
1504// API call, and error handling.
1505//
1506// This method is useful when you want to inject custom logic or configuration
1507// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1508//
1509//
1510//    // Example sending a request using the GetHITRequest method.
1511//    req, resp := client.GetHITRequest(params)
1512//
1513//    err := req.Send()
1514//    if err == nil { // resp is now filled
1515//        fmt.Println(resp)
1516//    }
1517//
1518// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetHIT
1519func (c *MTurk) GetHITRequest(input *GetHITInput) (req *request.Request, output *GetHITOutput) {
1520	op := &request.Operation{
1521		Name:       opGetHIT,
1522		HTTPMethod: "POST",
1523		HTTPPath:   "/",
1524	}
1525
1526	if input == nil {
1527		input = &GetHITInput{}
1528	}
1529
1530	output = &GetHITOutput{}
1531	req = c.newRequest(op, input, output)
1532	return
1533}
1534
1535// GetHIT API operation for Amazon Mechanical Turk.
1536//
1537// The GetHIT operation retrieves the details of the specified HIT.
1538//
1539// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1540// with awserr.Error's Code and Message methods to get detailed information about
1541// the error.
1542//
1543// See the AWS API reference guide for Amazon Mechanical Turk's
1544// API operation GetHIT for usage and error information.
1545//
1546// Returned Error Codes:
1547//   * ErrCodeServiceFault "ServiceFault"
1548//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1549//   your call again.
1550//
1551//   * ErrCodeRequestError "RequestError"
1552//   Your request is invalid.
1553//
1554// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetHIT
1555func (c *MTurk) GetHIT(input *GetHITInput) (*GetHITOutput, error) {
1556	req, out := c.GetHITRequest(input)
1557	return out, req.Send()
1558}
1559
1560// GetHITWithContext is the same as GetHIT with the addition of
1561// the ability to pass a context and additional request options.
1562//
1563// See GetHIT for details on how to use this API operation.
1564//
1565// The context must be non-nil and will be used for request cancellation. If
1566// the context is nil a panic will occur. In the future the SDK may create
1567// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1568// for more information on using Contexts.
1569func (c *MTurk) GetHITWithContext(ctx aws.Context, input *GetHITInput, opts ...request.Option) (*GetHITOutput, error) {
1570	req, out := c.GetHITRequest(input)
1571	req.SetContext(ctx)
1572	req.ApplyOptions(opts...)
1573	return out, req.Send()
1574}
1575
1576const opGetQualificationScore = "GetQualificationScore"
1577
1578// GetQualificationScoreRequest generates a "aws/request.Request" representing the
1579// client's request for the GetQualificationScore operation. The "output" return
1580// value will be populated with the request's response once the request completes
1581// successfully.
1582//
1583// Use "Send" method on the returned Request to send the API call to the service.
1584// the "output" return value is not valid until after Send returns without error.
1585//
1586// See GetQualificationScore for more information on using the GetQualificationScore
1587// API call, and error handling.
1588//
1589// This method is useful when you want to inject custom logic or configuration
1590// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1591//
1592//
1593//    // Example sending a request using the GetQualificationScoreRequest method.
1594//    req, resp := client.GetQualificationScoreRequest(params)
1595//
1596//    err := req.Send()
1597//    if err == nil { // resp is now filled
1598//        fmt.Println(resp)
1599//    }
1600//
1601// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetQualificationScore
1602func (c *MTurk) GetQualificationScoreRequest(input *GetQualificationScoreInput) (req *request.Request, output *GetQualificationScoreOutput) {
1603	op := &request.Operation{
1604		Name:       opGetQualificationScore,
1605		HTTPMethod: "POST",
1606		HTTPPath:   "/",
1607	}
1608
1609	if input == nil {
1610		input = &GetQualificationScoreInput{}
1611	}
1612
1613	output = &GetQualificationScoreOutput{}
1614	req = c.newRequest(op, input, output)
1615	return
1616}
1617
1618// GetQualificationScore API operation for Amazon Mechanical Turk.
1619//
1620// The GetQualificationScore operation returns the value of a Worker's Qualification
1621// for a given Qualification type.
1622//
1623// To get a Worker's Qualification, you must know the Worker's ID. The Worker's
1624// ID is included in the assignment data returned by the ListAssignmentsForHIT
1625// operation.
1626//
1627// Only the owner of a Qualification type can query the value of a Worker's
1628// Qualification of that type.
1629//
1630// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1631// with awserr.Error's Code and Message methods to get detailed information about
1632// the error.
1633//
1634// See the AWS API reference guide for Amazon Mechanical Turk's
1635// API operation GetQualificationScore for usage and error information.
1636//
1637// Returned Error Codes:
1638//   * ErrCodeServiceFault "ServiceFault"
1639//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1640//   your call again.
1641//
1642//   * ErrCodeRequestError "RequestError"
1643//   Your request is invalid.
1644//
1645// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetQualificationScore
1646func (c *MTurk) GetQualificationScore(input *GetQualificationScoreInput) (*GetQualificationScoreOutput, error) {
1647	req, out := c.GetQualificationScoreRequest(input)
1648	return out, req.Send()
1649}
1650
1651// GetQualificationScoreWithContext is the same as GetQualificationScore with the addition of
1652// the ability to pass a context and additional request options.
1653//
1654// See GetQualificationScore for details on how to use this API operation.
1655//
1656// The context must be non-nil and will be used for request cancellation. If
1657// the context is nil a panic will occur. In the future the SDK may create
1658// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1659// for more information on using Contexts.
1660func (c *MTurk) GetQualificationScoreWithContext(ctx aws.Context, input *GetQualificationScoreInput, opts ...request.Option) (*GetQualificationScoreOutput, error) {
1661	req, out := c.GetQualificationScoreRequest(input)
1662	req.SetContext(ctx)
1663	req.ApplyOptions(opts...)
1664	return out, req.Send()
1665}
1666
1667const opGetQualificationType = "GetQualificationType"
1668
1669// GetQualificationTypeRequest generates a "aws/request.Request" representing the
1670// client's request for the GetQualificationType operation. The "output" return
1671// value will be populated with the request's response once the request completes
1672// successfully.
1673//
1674// Use "Send" method on the returned Request to send the API call to the service.
1675// the "output" return value is not valid until after Send returns without error.
1676//
1677// See GetQualificationType for more information on using the GetQualificationType
1678// API call, and error handling.
1679//
1680// This method is useful when you want to inject custom logic or configuration
1681// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1682//
1683//
1684//    // Example sending a request using the GetQualificationTypeRequest method.
1685//    req, resp := client.GetQualificationTypeRequest(params)
1686//
1687//    err := req.Send()
1688//    if err == nil { // resp is now filled
1689//        fmt.Println(resp)
1690//    }
1691//
1692// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetQualificationType
1693func (c *MTurk) GetQualificationTypeRequest(input *GetQualificationTypeInput) (req *request.Request, output *GetQualificationTypeOutput) {
1694	op := &request.Operation{
1695		Name:       opGetQualificationType,
1696		HTTPMethod: "POST",
1697		HTTPPath:   "/",
1698	}
1699
1700	if input == nil {
1701		input = &GetQualificationTypeInput{}
1702	}
1703
1704	output = &GetQualificationTypeOutput{}
1705	req = c.newRequest(op, input, output)
1706	return
1707}
1708
1709// GetQualificationType API operation for Amazon Mechanical Turk.
1710//
1711// The GetQualificationTypeoperation retrieves information about a Qualification
1712// type using its ID.
1713//
1714// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1715// with awserr.Error's Code and Message methods to get detailed information about
1716// the error.
1717//
1718// See the AWS API reference guide for Amazon Mechanical Turk's
1719// API operation GetQualificationType for usage and error information.
1720//
1721// Returned Error Codes:
1722//   * ErrCodeServiceFault "ServiceFault"
1723//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1724//   your call again.
1725//
1726//   * ErrCodeRequestError "RequestError"
1727//   Your request is invalid.
1728//
1729// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/GetQualificationType
1730func (c *MTurk) GetQualificationType(input *GetQualificationTypeInput) (*GetQualificationTypeOutput, error) {
1731	req, out := c.GetQualificationTypeRequest(input)
1732	return out, req.Send()
1733}
1734
1735// GetQualificationTypeWithContext is the same as GetQualificationType with the addition of
1736// the ability to pass a context and additional request options.
1737//
1738// See GetQualificationType for details on how to use this API operation.
1739//
1740// The context must be non-nil and will be used for request cancellation. If
1741// the context is nil a panic will occur. In the future the SDK may create
1742// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1743// for more information on using Contexts.
1744func (c *MTurk) GetQualificationTypeWithContext(ctx aws.Context, input *GetQualificationTypeInput, opts ...request.Option) (*GetQualificationTypeOutput, error) {
1745	req, out := c.GetQualificationTypeRequest(input)
1746	req.SetContext(ctx)
1747	req.ApplyOptions(opts...)
1748	return out, req.Send()
1749}
1750
1751const opListAssignmentsForHIT = "ListAssignmentsForHIT"
1752
1753// ListAssignmentsForHITRequest generates a "aws/request.Request" representing the
1754// client's request for the ListAssignmentsForHIT operation. The "output" return
1755// value will be populated with the request's response once the request completes
1756// successfully.
1757//
1758// Use "Send" method on the returned Request to send the API call to the service.
1759// the "output" return value is not valid until after Send returns without error.
1760//
1761// See ListAssignmentsForHIT for more information on using the ListAssignmentsForHIT
1762// API call, and error handling.
1763//
1764// This method is useful when you want to inject custom logic or configuration
1765// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1766//
1767//
1768//    // Example sending a request using the ListAssignmentsForHITRequest method.
1769//    req, resp := client.ListAssignmentsForHITRequest(params)
1770//
1771//    err := req.Send()
1772//    if err == nil { // resp is now filled
1773//        fmt.Println(resp)
1774//    }
1775//
1776// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListAssignmentsForHIT
1777func (c *MTurk) ListAssignmentsForHITRequest(input *ListAssignmentsForHITInput) (req *request.Request, output *ListAssignmentsForHITOutput) {
1778	op := &request.Operation{
1779		Name:       opListAssignmentsForHIT,
1780		HTTPMethod: "POST",
1781		HTTPPath:   "/",
1782		Paginator: &request.Paginator{
1783			InputTokens:     []string{"NextToken"},
1784			OutputTokens:    []string{"NextToken"},
1785			LimitToken:      "MaxResults",
1786			TruncationToken: "",
1787		},
1788	}
1789
1790	if input == nil {
1791		input = &ListAssignmentsForHITInput{}
1792	}
1793
1794	output = &ListAssignmentsForHITOutput{}
1795	req = c.newRequest(op, input, output)
1796	return
1797}
1798
1799// ListAssignmentsForHIT API operation for Amazon Mechanical Turk.
1800//
1801// The ListAssignmentsForHIT operation retrieves completed assignments for a
1802// HIT. You can use this operation to retrieve the results for a HIT.
1803//
1804// You can get assignments for a HIT at any time, even if the HIT is not yet
1805// Reviewable. If a HIT requested multiple assignments, and has received some
1806// results but has not yet become Reviewable, you can still retrieve the partial
1807// results with this operation.
1808//
1809// Use the AssignmentStatus parameter to control which set of assignments for
1810// a HIT are returned. The ListAssignmentsForHIT operation can return submitted
1811// assignments awaiting approval, or it can return assignments that have already
1812// been approved or rejected. You can set AssignmentStatus=Approved,Rejected
1813// to get assignments that have already been approved and rejected together
1814// in one result set.
1815//
1816// Only the Requester who created the HIT can retrieve the assignments for that
1817// HIT.
1818//
1819// Results are sorted and divided into numbered pages and the operation returns
1820// a single page of results. You can use the parameters of the operation to
1821// control sorting and pagination.
1822//
1823// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1824// with awserr.Error's Code and Message methods to get detailed information about
1825// the error.
1826//
1827// See the AWS API reference guide for Amazon Mechanical Turk's
1828// API operation ListAssignmentsForHIT for usage and error information.
1829//
1830// Returned Error Codes:
1831//   * ErrCodeServiceFault "ServiceFault"
1832//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1833//   your call again.
1834//
1835//   * ErrCodeRequestError "RequestError"
1836//   Your request is invalid.
1837//
1838// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListAssignmentsForHIT
1839func (c *MTurk) ListAssignmentsForHIT(input *ListAssignmentsForHITInput) (*ListAssignmentsForHITOutput, error) {
1840	req, out := c.ListAssignmentsForHITRequest(input)
1841	return out, req.Send()
1842}
1843
1844// ListAssignmentsForHITWithContext is the same as ListAssignmentsForHIT with the addition of
1845// the ability to pass a context and additional request options.
1846//
1847// See ListAssignmentsForHIT for details on how to use this API operation.
1848//
1849// The context must be non-nil and will be used for request cancellation. If
1850// the context is nil a panic will occur. In the future the SDK may create
1851// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1852// for more information on using Contexts.
1853func (c *MTurk) ListAssignmentsForHITWithContext(ctx aws.Context, input *ListAssignmentsForHITInput, opts ...request.Option) (*ListAssignmentsForHITOutput, error) {
1854	req, out := c.ListAssignmentsForHITRequest(input)
1855	req.SetContext(ctx)
1856	req.ApplyOptions(opts...)
1857	return out, req.Send()
1858}
1859
1860// ListAssignmentsForHITPages iterates over the pages of a ListAssignmentsForHIT operation,
1861// calling the "fn" function with the response data for each page. To stop
1862// iterating, return false from the fn function.
1863//
1864// See ListAssignmentsForHIT method for more information on how to use this operation.
1865//
1866// Note: This operation can generate multiple requests to a service.
1867//
1868//    // Example iterating over at most 3 pages of a ListAssignmentsForHIT operation.
1869//    pageNum := 0
1870//    err := client.ListAssignmentsForHITPages(params,
1871//        func(page *mturk.ListAssignmentsForHITOutput, lastPage bool) bool {
1872//            pageNum++
1873//            fmt.Println(page)
1874//            return pageNum <= 3
1875//        })
1876//
1877func (c *MTurk) ListAssignmentsForHITPages(input *ListAssignmentsForHITInput, fn func(*ListAssignmentsForHITOutput, bool) bool) error {
1878	return c.ListAssignmentsForHITPagesWithContext(aws.BackgroundContext(), input, fn)
1879}
1880
1881// ListAssignmentsForHITPagesWithContext same as ListAssignmentsForHITPages except
1882// it takes a Context and allows setting request options on the pages.
1883//
1884// The context must be non-nil and will be used for request cancellation. If
1885// the context is nil a panic will occur. In the future the SDK may create
1886// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1887// for more information on using Contexts.
1888func (c *MTurk) ListAssignmentsForHITPagesWithContext(ctx aws.Context, input *ListAssignmentsForHITInput, fn func(*ListAssignmentsForHITOutput, bool) bool, opts ...request.Option) error {
1889	p := request.Pagination{
1890		NewRequest: func() (*request.Request, error) {
1891			var inCpy *ListAssignmentsForHITInput
1892			if input != nil {
1893				tmp := *input
1894				inCpy = &tmp
1895			}
1896			req, _ := c.ListAssignmentsForHITRequest(inCpy)
1897			req.SetContext(ctx)
1898			req.ApplyOptions(opts...)
1899			return req, nil
1900		},
1901	}
1902
1903	for p.Next() {
1904		if !fn(p.Page().(*ListAssignmentsForHITOutput), !p.HasNextPage()) {
1905			break
1906		}
1907	}
1908
1909	return p.Err()
1910}
1911
1912const opListBonusPayments = "ListBonusPayments"
1913
1914// ListBonusPaymentsRequest generates a "aws/request.Request" representing the
1915// client's request for the ListBonusPayments operation. The "output" return
1916// value will be populated with the request's response once the request completes
1917// successfully.
1918//
1919// Use "Send" method on the returned Request to send the API call to the service.
1920// the "output" return value is not valid until after Send returns without error.
1921//
1922// See ListBonusPayments for more information on using the ListBonusPayments
1923// API call, and error handling.
1924//
1925// This method is useful when you want to inject custom logic or configuration
1926// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1927//
1928//
1929//    // Example sending a request using the ListBonusPaymentsRequest method.
1930//    req, resp := client.ListBonusPaymentsRequest(params)
1931//
1932//    err := req.Send()
1933//    if err == nil { // resp is now filled
1934//        fmt.Println(resp)
1935//    }
1936//
1937// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListBonusPayments
1938func (c *MTurk) ListBonusPaymentsRequest(input *ListBonusPaymentsInput) (req *request.Request, output *ListBonusPaymentsOutput) {
1939	op := &request.Operation{
1940		Name:       opListBonusPayments,
1941		HTTPMethod: "POST",
1942		HTTPPath:   "/",
1943		Paginator: &request.Paginator{
1944			InputTokens:     []string{"NextToken"},
1945			OutputTokens:    []string{"NextToken"},
1946			LimitToken:      "MaxResults",
1947			TruncationToken: "",
1948		},
1949	}
1950
1951	if input == nil {
1952		input = &ListBonusPaymentsInput{}
1953	}
1954
1955	output = &ListBonusPaymentsOutput{}
1956	req = c.newRequest(op, input, output)
1957	return
1958}
1959
1960// ListBonusPayments API operation for Amazon Mechanical Turk.
1961//
1962// The ListBonusPayments operation retrieves the amounts of bonuses you have
1963// paid to Workers for a given HIT or assignment.
1964//
1965// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1966// with awserr.Error's Code and Message methods to get detailed information about
1967// the error.
1968//
1969// See the AWS API reference guide for Amazon Mechanical Turk's
1970// API operation ListBonusPayments for usage and error information.
1971//
1972// Returned Error Codes:
1973//   * ErrCodeServiceFault "ServiceFault"
1974//   Amazon Mechanical Turk is temporarily unable to process your request. Try
1975//   your call again.
1976//
1977//   * ErrCodeRequestError "RequestError"
1978//   Your request is invalid.
1979//
1980// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListBonusPayments
1981func (c *MTurk) ListBonusPayments(input *ListBonusPaymentsInput) (*ListBonusPaymentsOutput, error) {
1982	req, out := c.ListBonusPaymentsRequest(input)
1983	return out, req.Send()
1984}
1985
1986// ListBonusPaymentsWithContext is the same as ListBonusPayments with the addition of
1987// the ability to pass a context and additional request options.
1988//
1989// See ListBonusPayments for details on how to use this API operation.
1990//
1991// The context must be non-nil and will be used for request cancellation. If
1992// the context is nil a panic will occur. In the future the SDK may create
1993// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1994// for more information on using Contexts.
1995func (c *MTurk) ListBonusPaymentsWithContext(ctx aws.Context, input *ListBonusPaymentsInput, opts ...request.Option) (*ListBonusPaymentsOutput, error) {
1996	req, out := c.ListBonusPaymentsRequest(input)
1997	req.SetContext(ctx)
1998	req.ApplyOptions(opts...)
1999	return out, req.Send()
2000}
2001
2002// ListBonusPaymentsPages iterates over the pages of a ListBonusPayments operation,
2003// calling the "fn" function with the response data for each page. To stop
2004// iterating, return false from the fn function.
2005//
2006// See ListBonusPayments method for more information on how to use this operation.
2007//
2008// Note: This operation can generate multiple requests to a service.
2009//
2010//    // Example iterating over at most 3 pages of a ListBonusPayments operation.
2011//    pageNum := 0
2012//    err := client.ListBonusPaymentsPages(params,
2013//        func(page *mturk.ListBonusPaymentsOutput, lastPage bool) bool {
2014//            pageNum++
2015//            fmt.Println(page)
2016//            return pageNum <= 3
2017//        })
2018//
2019func (c *MTurk) ListBonusPaymentsPages(input *ListBonusPaymentsInput, fn func(*ListBonusPaymentsOutput, bool) bool) error {
2020	return c.ListBonusPaymentsPagesWithContext(aws.BackgroundContext(), input, fn)
2021}
2022
2023// ListBonusPaymentsPagesWithContext same as ListBonusPaymentsPages except
2024// it takes a Context and allows setting request options on the pages.
2025//
2026// The context must be non-nil and will be used for request cancellation. If
2027// the context is nil a panic will occur. In the future the SDK may create
2028// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2029// for more information on using Contexts.
2030func (c *MTurk) ListBonusPaymentsPagesWithContext(ctx aws.Context, input *ListBonusPaymentsInput, fn func(*ListBonusPaymentsOutput, bool) bool, opts ...request.Option) error {
2031	p := request.Pagination{
2032		NewRequest: func() (*request.Request, error) {
2033			var inCpy *ListBonusPaymentsInput
2034			if input != nil {
2035				tmp := *input
2036				inCpy = &tmp
2037			}
2038			req, _ := c.ListBonusPaymentsRequest(inCpy)
2039			req.SetContext(ctx)
2040			req.ApplyOptions(opts...)
2041			return req, nil
2042		},
2043	}
2044
2045	for p.Next() {
2046		if !fn(p.Page().(*ListBonusPaymentsOutput), !p.HasNextPage()) {
2047			break
2048		}
2049	}
2050
2051	return p.Err()
2052}
2053
2054const opListHITs = "ListHITs"
2055
2056// ListHITsRequest generates a "aws/request.Request" representing the
2057// client's request for the ListHITs operation. The "output" return
2058// value will be populated with the request's response once the request completes
2059// successfully.
2060//
2061// Use "Send" method on the returned Request to send the API call to the service.
2062// the "output" return value is not valid until after Send returns without error.
2063//
2064// See ListHITs for more information on using the ListHITs
2065// API call, and error handling.
2066//
2067// This method is useful when you want to inject custom logic or configuration
2068// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2069//
2070//
2071//    // Example sending a request using the ListHITsRequest method.
2072//    req, resp := client.ListHITsRequest(params)
2073//
2074//    err := req.Send()
2075//    if err == nil { // resp is now filled
2076//        fmt.Println(resp)
2077//    }
2078//
2079// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListHITs
2080func (c *MTurk) ListHITsRequest(input *ListHITsInput) (req *request.Request, output *ListHITsOutput) {
2081	op := &request.Operation{
2082		Name:       opListHITs,
2083		HTTPMethod: "POST",
2084		HTTPPath:   "/",
2085		Paginator: &request.Paginator{
2086			InputTokens:     []string{"NextToken"},
2087			OutputTokens:    []string{"NextToken"},
2088			LimitToken:      "MaxResults",
2089			TruncationToken: "",
2090		},
2091	}
2092
2093	if input == nil {
2094		input = &ListHITsInput{}
2095	}
2096
2097	output = &ListHITsOutput{}
2098	req = c.newRequest(op, input, output)
2099	return
2100}
2101
2102// ListHITs API operation for Amazon Mechanical Turk.
2103//
2104// The ListHITs operation returns all of a Requester's HITs. The operation returns
2105// HITs of any status, except for HITs that have been deleted of with the DeleteHIT
2106// operation or that have been auto-deleted.
2107//
2108// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2109// with awserr.Error's Code and Message methods to get detailed information about
2110// the error.
2111//
2112// See the AWS API reference guide for Amazon Mechanical Turk's
2113// API operation ListHITs for usage and error information.
2114//
2115// Returned Error Codes:
2116//   * ErrCodeServiceFault "ServiceFault"
2117//   Amazon Mechanical Turk is temporarily unable to process your request. Try
2118//   your call again.
2119//
2120//   * ErrCodeRequestError "RequestError"
2121//   Your request is invalid.
2122//
2123// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListHITs
2124func (c *MTurk) ListHITs(input *ListHITsInput) (*ListHITsOutput, error) {
2125	req, out := c.ListHITsRequest(input)
2126	return out, req.Send()
2127}
2128
2129// ListHITsWithContext is the same as ListHITs with the addition of
2130// the ability to pass a context and additional request options.
2131//
2132// See ListHITs for details on how to use this API operation.
2133//
2134// The context must be non-nil and will be used for request cancellation. If
2135// the context is nil a panic will occur. In the future the SDK may create
2136// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2137// for more information on using Contexts.
2138func (c *MTurk) ListHITsWithContext(ctx aws.Context, input *ListHITsInput, opts ...request.Option) (*ListHITsOutput, error) {
2139	req, out := c.ListHITsRequest(input)
2140	req.SetContext(ctx)
2141	req.ApplyOptions(opts...)
2142	return out, req.Send()
2143}
2144
2145// ListHITsPages iterates over the pages of a ListHITs operation,
2146// calling the "fn" function with the response data for each page. To stop
2147// iterating, return false from the fn function.
2148//
2149// See ListHITs method for more information on how to use this operation.
2150//
2151// Note: This operation can generate multiple requests to a service.
2152//
2153//    // Example iterating over at most 3 pages of a ListHITs operation.
2154//    pageNum := 0
2155//    err := client.ListHITsPages(params,
2156//        func(page *mturk.ListHITsOutput, lastPage bool) bool {
2157//            pageNum++
2158//            fmt.Println(page)
2159//            return pageNum <= 3
2160//        })
2161//
2162func (c *MTurk) ListHITsPages(input *ListHITsInput, fn func(*ListHITsOutput, bool) bool) error {
2163	return c.ListHITsPagesWithContext(aws.BackgroundContext(), input, fn)
2164}
2165
2166// ListHITsPagesWithContext same as ListHITsPages except
2167// it takes a Context and allows setting request options on the pages.
2168//
2169// The context must be non-nil and will be used for request cancellation. If
2170// the context is nil a panic will occur. In the future the SDK may create
2171// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2172// for more information on using Contexts.
2173func (c *MTurk) ListHITsPagesWithContext(ctx aws.Context, input *ListHITsInput, fn func(*ListHITsOutput, bool) bool, opts ...request.Option) error {
2174	p := request.Pagination{
2175		NewRequest: func() (*request.Request, error) {
2176			var inCpy *ListHITsInput
2177			if input != nil {
2178				tmp := *input
2179				inCpy = &tmp
2180			}
2181			req, _ := c.ListHITsRequest(inCpy)
2182			req.SetContext(ctx)
2183			req.ApplyOptions(opts...)
2184			return req, nil
2185		},
2186	}
2187
2188	for p.Next() {
2189		if !fn(p.Page().(*ListHITsOutput), !p.HasNextPage()) {
2190			break
2191		}
2192	}
2193
2194	return p.Err()
2195}
2196
2197const opListHITsForQualificationType = "ListHITsForQualificationType"
2198
2199// ListHITsForQualificationTypeRequest generates a "aws/request.Request" representing the
2200// client's request for the ListHITsForQualificationType operation. The "output" return
2201// value will be populated with the request's response once the request completes
2202// successfully.
2203//
2204// Use "Send" method on the returned Request to send the API call to the service.
2205// the "output" return value is not valid until after Send returns without error.
2206//
2207// See ListHITsForQualificationType for more information on using the ListHITsForQualificationType
2208// API call, and error handling.
2209//
2210// This method is useful when you want to inject custom logic or configuration
2211// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2212//
2213//
2214//    // Example sending a request using the ListHITsForQualificationTypeRequest method.
2215//    req, resp := client.ListHITsForQualificationTypeRequest(params)
2216//
2217//    err := req.Send()
2218//    if err == nil { // resp is now filled
2219//        fmt.Println(resp)
2220//    }
2221//
2222// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListHITsForQualificationType
2223func (c *MTurk) ListHITsForQualificationTypeRequest(input *ListHITsForQualificationTypeInput) (req *request.Request, output *ListHITsForQualificationTypeOutput) {
2224	op := &request.Operation{
2225		Name:       opListHITsForQualificationType,
2226		HTTPMethod: "POST",
2227		HTTPPath:   "/",
2228		Paginator: &request.Paginator{
2229			InputTokens:     []string{"NextToken"},
2230			OutputTokens:    []string{"NextToken"},
2231			LimitToken:      "MaxResults",
2232			TruncationToken: "",
2233		},
2234	}
2235
2236	if input == nil {
2237		input = &ListHITsForQualificationTypeInput{}
2238	}
2239
2240	output = &ListHITsForQualificationTypeOutput{}
2241	req = c.newRequest(op, input, output)
2242	return
2243}
2244
2245// ListHITsForQualificationType API operation for Amazon Mechanical Turk.
2246//
2247// The ListHITsForQualificationType operation returns the HITs that use the
2248// given Qualification type for a Qualification requirement. The operation returns
2249// HITs of any status, except for HITs that have been deleted with the DeleteHIT
2250// operation or that have been auto-deleted.
2251//
2252// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2253// with awserr.Error's Code and Message methods to get detailed information about
2254// the error.
2255//
2256// See the AWS API reference guide for Amazon Mechanical Turk's
2257// API operation ListHITsForQualificationType for usage and error information.
2258//
2259// Returned Error Codes:
2260//   * ErrCodeServiceFault "ServiceFault"
2261//   Amazon Mechanical Turk is temporarily unable to process your request. Try
2262//   your call again.
2263//
2264//   * ErrCodeRequestError "RequestError"
2265//   Your request is invalid.
2266//
2267// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListHITsForQualificationType
2268func (c *MTurk) ListHITsForQualificationType(input *ListHITsForQualificationTypeInput) (*ListHITsForQualificationTypeOutput, error) {
2269	req, out := c.ListHITsForQualificationTypeRequest(input)
2270	return out, req.Send()
2271}
2272
2273// ListHITsForQualificationTypeWithContext is the same as ListHITsForQualificationType with the addition of
2274// the ability to pass a context and additional request options.
2275//
2276// See ListHITsForQualificationType for details on how to use this API operation.
2277//
2278// The context must be non-nil and will be used for request cancellation. If
2279// the context is nil a panic will occur. In the future the SDK may create
2280// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2281// for more information on using Contexts.
2282func (c *MTurk) ListHITsForQualificationTypeWithContext(ctx aws.Context, input *ListHITsForQualificationTypeInput, opts ...request.Option) (*ListHITsForQualificationTypeOutput, error) {
2283	req, out := c.ListHITsForQualificationTypeRequest(input)
2284	req.SetContext(ctx)
2285	req.ApplyOptions(opts...)
2286	return out, req.Send()
2287}
2288
2289// ListHITsForQualificationTypePages iterates over the pages of a ListHITsForQualificationType operation,
2290// calling the "fn" function with the response data for each page. To stop
2291// iterating, return false from the fn function.
2292//
2293// See ListHITsForQualificationType method for more information on how to use this operation.
2294//
2295// Note: This operation can generate multiple requests to a service.
2296//
2297//    // Example iterating over at most 3 pages of a ListHITsForQualificationType operation.
2298//    pageNum := 0
2299//    err := client.ListHITsForQualificationTypePages(params,
2300//        func(page *mturk.ListHITsForQualificationTypeOutput, lastPage bool) bool {
2301//            pageNum++
2302//            fmt.Println(page)
2303//            return pageNum <= 3
2304//        })
2305//
2306func (c *MTurk) ListHITsForQualificationTypePages(input *ListHITsForQualificationTypeInput, fn func(*ListHITsForQualificationTypeOutput, bool) bool) error {
2307	return c.ListHITsForQualificationTypePagesWithContext(aws.BackgroundContext(), input, fn)
2308}
2309
2310// ListHITsForQualificationTypePagesWithContext same as ListHITsForQualificationTypePages except
2311// it takes a Context and allows setting request options on the pages.
2312//
2313// The context must be non-nil and will be used for request cancellation. If
2314// the context is nil a panic will occur. In the future the SDK may create
2315// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2316// for more information on using Contexts.
2317func (c *MTurk) ListHITsForQualificationTypePagesWithContext(ctx aws.Context, input *ListHITsForQualificationTypeInput, fn func(*ListHITsForQualificationTypeOutput, bool) bool, opts ...request.Option) error {
2318	p := request.Pagination{
2319		NewRequest: func() (*request.Request, error) {
2320			var inCpy *ListHITsForQualificationTypeInput
2321			if input != nil {
2322				tmp := *input
2323				inCpy = &tmp
2324			}
2325			req, _ := c.ListHITsForQualificationTypeRequest(inCpy)
2326			req.SetContext(ctx)
2327			req.ApplyOptions(opts...)
2328			return req, nil
2329		},
2330	}
2331
2332	for p.Next() {
2333		if !fn(p.Page().(*ListHITsForQualificationTypeOutput), !p.HasNextPage()) {
2334			break
2335		}
2336	}
2337
2338	return p.Err()
2339}
2340
2341const opListQualificationRequests = "ListQualificationRequests"
2342
2343// ListQualificationRequestsRequest generates a "aws/request.Request" representing the
2344// client's request for the ListQualificationRequests operation. The "output" return
2345// value will be populated with the request's response once the request completes
2346// successfully.
2347//
2348// Use "Send" method on the returned Request to send the API call to the service.
2349// the "output" return value is not valid until after Send returns without error.
2350//
2351// See ListQualificationRequests for more information on using the ListQualificationRequests
2352// API call, and error handling.
2353//
2354// This method is useful when you want to inject custom logic or configuration
2355// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2356//
2357//
2358//    // Example sending a request using the ListQualificationRequestsRequest method.
2359//    req, resp := client.ListQualificationRequestsRequest(params)
2360//
2361//    err := req.Send()
2362//    if err == nil { // resp is now filled
2363//        fmt.Println(resp)
2364//    }
2365//
2366// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListQualificationRequests
2367func (c *MTurk) ListQualificationRequestsRequest(input *ListQualificationRequestsInput) (req *request.Request, output *ListQualificationRequestsOutput) {
2368	op := &request.Operation{
2369		Name:       opListQualificationRequests,
2370		HTTPMethod: "POST",
2371		HTTPPath:   "/",
2372		Paginator: &request.Paginator{
2373			InputTokens:     []string{"NextToken"},
2374			OutputTokens:    []string{"NextToken"},
2375			LimitToken:      "MaxResults",
2376			TruncationToken: "",
2377		},
2378	}
2379
2380	if input == nil {
2381		input = &ListQualificationRequestsInput{}
2382	}
2383
2384	output = &ListQualificationRequestsOutput{}
2385	req = c.newRequest(op, input, output)
2386	return
2387}
2388
2389// ListQualificationRequests API operation for Amazon Mechanical Turk.
2390//
2391// The ListQualificationRequests operation retrieves requests for Qualifications
2392// of a particular Qualification type. The owner of the Qualification type calls
2393// this operation to poll for pending requests, and accepts them using the AcceptQualification
2394// operation.
2395//
2396// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2397// with awserr.Error's Code and Message methods to get detailed information about
2398// the error.
2399//
2400// See the AWS API reference guide for Amazon Mechanical Turk's
2401// API operation ListQualificationRequests for usage and error information.
2402//
2403// Returned Error Codes:
2404//   * ErrCodeServiceFault "ServiceFault"
2405//   Amazon Mechanical Turk is temporarily unable to process your request. Try
2406//   your call again.
2407//
2408//   * ErrCodeRequestError "RequestError"
2409//   Your request is invalid.
2410//
2411// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListQualificationRequests
2412func (c *MTurk) ListQualificationRequests(input *ListQualificationRequestsInput) (*ListQualificationRequestsOutput, error) {
2413	req, out := c.ListQualificationRequestsRequest(input)
2414	return out, req.Send()
2415}
2416
2417// ListQualificationRequestsWithContext is the same as ListQualificationRequests with the addition of
2418// the ability to pass a context and additional request options.
2419//
2420// See ListQualificationRequests for details on how to use this API operation.
2421//
2422// The context must be non-nil and will be used for request cancellation. If
2423// the context is nil a panic will occur. In the future the SDK may create
2424// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2425// for more information on using Contexts.
2426func (c *MTurk) ListQualificationRequestsWithContext(ctx aws.Context, input *ListQualificationRequestsInput, opts ...request.Option) (*ListQualificationRequestsOutput, error) {
2427	req, out := c.ListQualificationRequestsRequest(input)
2428	req.SetContext(ctx)
2429	req.ApplyOptions(opts...)
2430	return out, req.Send()
2431}
2432
2433// ListQualificationRequestsPages iterates over the pages of a ListQualificationRequests operation,
2434// calling the "fn" function with the response data for each page. To stop
2435// iterating, return false from the fn function.
2436//
2437// See ListQualificationRequests method for more information on how to use this operation.
2438//
2439// Note: This operation can generate multiple requests to a service.
2440//
2441//    // Example iterating over at most 3 pages of a ListQualificationRequests operation.
2442//    pageNum := 0
2443//    err := client.ListQualificationRequestsPages(params,
2444//        func(page *mturk.ListQualificationRequestsOutput, lastPage bool) bool {
2445//            pageNum++
2446//            fmt.Println(page)
2447//            return pageNum <= 3
2448//        })
2449//
2450func (c *MTurk) ListQualificationRequestsPages(input *ListQualificationRequestsInput, fn func(*ListQualificationRequestsOutput, bool) bool) error {
2451	return c.ListQualificationRequestsPagesWithContext(aws.BackgroundContext(), input, fn)
2452}
2453
2454// ListQualificationRequestsPagesWithContext same as ListQualificationRequestsPages except
2455// it takes a Context and allows setting request options on the pages.
2456//
2457// The context must be non-nil and will be used for request cancellation. If
2458// the context is nil a panic will occur. In the future the SDK may create
2459// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2460// for more information on using Contexts.
2461func (c *MTurk) ListQualificationRequestsPagesWithContext(ctx aws.Context, input *ListQualificationRequestsInput, fn func(*ListQualificationRequestsOutput, bool) bool, opts ...request.Option) error {
2462	p := request.Pagination{
2463		NewRequest: func() (*request.Request, error) {
2464			var inCpy *ListQualificationRequestsInput
2465			if input != nil {
2466				tmp := *input
2467				inCpy = &tmp
2468			}
2469			req, _ := c.ListQualificationRequestsRequest(inCpy)
2470			req.SetContext(ctx)
2471			req.ApplyOptions(opts...)
2472			return req, nil
2473		},
2474	}
2475
2476	for p.Next() {
2477		if !fn(p.Page().(*ListQualificationRequestsOutput), !p.HasNextPage()) {
2478			break
2479		}
2480	}
2481
2482	return p.Err()
2483}
2484
2485const opListQualificationTypes = "ListQualificationTypes"
2486
2487// ListQualificationTypesRequest generates a "aws/request.Request" representing the
2488// client's request for the ListQualificationTypes operation. The "output" return
2489// value will be populated with the request's response once the request completes
2490// successfully.
2491//
2492// Use "Send" method on the returned Request to send the API call to the service.
2493// the "output" return value is not valid until after Send returns without error.
2494//
2495// See ListQualificationTypes for more information on using the ListQualificationTypes
2496// API call, and error handling.
2497//
2498// This method is useful when you want to inject custom logic or configuration
2499// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2500//
2501//
2502//    // Example sending a request using the ListQualificationTypesRequest method.
2503//    req, resp := client.ListQualificationTypesRequest(params)
2504//
2505//    err := req.Send()
2506//    if err == nil { // resp is now filled
2507//        fmt.Println(resp)
2508//    }
2509//
2510// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListQualificationTypes
2511func (c *MTurk) ListQualificationTypesRequest(input *ListQualificationTypesInput) (req *request.Request, output *ListQualificationTypesOutput) {
2512	op := &request.Operation{
2513		Name:       opListQualificationTypes,
2514		HTTPMethod: "POST",
2515		HTTPPath:   "/",
2516		Paginator: &request.Paginator{
2517			InputTokens:     []string{"NextToken"},
2518			OutputTokens:    []string{"NextToken"},
2519			LimitToken:      "MaxResults",
2520			TruncationToken: "",
2521		},
2522	}
2523
2524	if input == nil {
2525		input = &ListQualificationTypesInput{}
2526	}
2527
2528	output = &ListQualificationTypesOutput{}
2529	req = c.newRequest(op, input, output)
2530	return
2531}
2532
2533// ListQualificationTypes API operation for Amazon Mechanical Turk.
2534//
2535// The ListQualificationTypes operation returns a list of Qualification types,
2536// filtered by an optional search term.
2537//
2538// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2539// with awserr.Error's Code and Message methods to get detailed information about
2540// the error.
2541//
2542// See the AWS API reference guide for Amazon Mechanical Turk's
2543// API operation ListQualificationTypes for usage and error information.
2544//
2545// Returned Error Codes:
2546//   * ErrCodeServiceFault "ServiceFault"
2547//   Amazon Mechanical Turk is temporarily unable to process your request. Try
2548//   your call again.
2549//
2550//   * ErrCodeRequestError "RequestError"
2551//   Your request is invalid.
2552//
2553// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListQualificationTypes
2554func (c *MTurk) ListQualificationTypes(input *ListQualificationTypesInput) (*ListQualificationTypesOutput, error) {
2555	req, out := c.ListQualificationTypesRequest(input)
2556	return out, req.Send()
2557}
2558
2559// ListQualificationTypesWithContext is the same as ListQualificationTypes with the addition of
2560// the ability to pass a context and additional request options.
2561//
2562// See ListQualificationTypes for details on how to use this API operation.
2563//
2564// The context must be non-nil and will be used for request cancellation. If
2565// the context is nil a panic will occur. In the future the SDK may create
2566// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2567// for more information on using Contexts.
2568func (c *MTurk) ListQualificationTypesWithContext(ctx aws.Context, input *ListQualificationTypesInput, opts ...request.Option) (*ListQualificationTypesOutput, error) {
2569	req, out := c.ListQualificationTypesRequest(input)
2570	req.SetContext(ctx)
2571	req.ApplyOptions(opts...)
2572	return out, req.Send()
2573}
2574
2575// ListQualificationTypesPages iterates over the pages of a ListQualificationTypes operation,
2576// calling the "fn" function with the response data for each page. To stop
2577// iterating, return false from the fn function.
2578//
2579// See ListQualificationTypes method for more information on how to use this operation.
2580//
2581// Note: This operation can generate multiple requests to a service.
2582//
2583//    // Example iterating over at most 3 pages of a ListQualificationTypes operation.
2584//    pageNum := 0
2585//    err := client.ListQualificationTypesPages(params,
2586//        func(page *mturk.ListQualificationTypesOutput, lastPage bool) bool {
2587//            pageNum++
2588//            fmt.Println(page)
2589//            return pageNum <= 3
2590//        })
2591//
2592func (c *MTurk) ListQualificationTypesPages(input *ListQualificationTypesInput, fn func(*ListQualificationTypesOutput, bool) bool) error {
2593	return c.ListQualificationTypesPagesWithContext(aws.BackgroundContext(), input, fn)
2594}
2595
2596// ListQualificationTypesPagesWithContext same as ListQualificationTypesPages except
2597// it takes a Context and allows setting request options on the pages.
2598//
2599// The context must be non-nil and will be used for request cancellation. If
2600// the context is nil a panic will occur. In the future the SDK may create
2601// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2602// for more information on using Contexts.
2603func (c *MTurk) ListQualificationTypesPagesWithContext(ctx aws.Context, input *ListQualificationTypesInput, fn func(*ListQualificationTypesOutput, bool) bool, opts ...request.Option) error {
2604	p := request.Pagination{
2605		NewRequest: func() (*request.Request, error) {
2606			var inCpy *ListQualificationTypesInput
2607			if input != nil {
2608				tmp := *input
2609				inCpy = &tmp
2610			}
2611			req, _ := c.ListQualificationTypesRequest(inCpy)
2612			req.SetContext(ctx)
2613			req.ApplyOptions(opts...)
2614			return req, nil
2615		},
2616	}
2617
2618	for p.Next() {
2619		if !fn(p.Page().(*ListQualificationTypesOutput), !p.HasNextPage()) {
2620			break
2621		}
2622	}
2623
2624	return p.Err()
2625}
2626
2627const opListReviewPolicyResultsForHIT = "ListReviewPolicyResultsForHIT"
2628
2629// ListReviewPolicyResultsForHITRequest generates a "aws/request.Request" representing the
2630// client's request for the ListReviewPolicyResultsForHIT operation. The "output" return
2631// value will be populated with the request's response once the request completes
2632// successfully.
2633//
2634// Use "Send" method on the returned Request to send the API call to the service.
2635// the "output" return value is not valid until after Send returns without error.
2636//
2637// See ListReviewPolicyResultsForHIT for more information on using the ListReviewPolicyResultsForHIT
2638// API call, and error handling.
2639//
2640// This method is useful when you want to inject custom logic or configuration
2641// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2642//
2643//
2644//    // Example sending a request using the ListReviewPolicyResultsForHITRequest method.
2645//    req, resp := client.ListReviewPolicyResultsForHITRequest(params)
2646//
2647//    err := req.Send()
2648//    if err == nil { // resp is now filled
2649//        fmt.Println(resp)
2650//    }
2651//
2652// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListReviewPolicyResultsForHIT
2653func (c *MTurk) ListReviewPolicyResultsForHITRequest(input *ListReviewPolicyResultsForHITInput) (req *request.Request, output *ListReviewPolicyResultsForHITOutput) {
2654	op := &request.Operation{
2655		Name:       opListReviewPolicyResultsForHIT,
2656		HTTPMethod: "POST",
2657		HTTPPath:   "/",
2658		Paginator: &request.Paginator{
2659			InputTokens:     []string{"NextToken"},
2660			OutputTokens:    []string{"NextToken"},
2661			LimitToken:      "MaxResults",
2662			TruncationToken: "",
2663		},
2664	}
2665
2666	if input == nil {
2667		input = &ListReviewPolicyResultsForHITInput{}
2668	}
2669
2670	output = &ListReviewPolicyResultsForHITOutput{}
2671	req = c.newRequest(op, input, output)
2672	return
2673}
2674
2675// ListReviewPolicyResultsForHIT API operation for Amazon Mechanical Turk.
2676//
2677// The ListReviewPolicyResultsForHIT operation retrieves the computed results
2678// and the actions taken in the course of executing your Review Policies for
2679// a given HIT. For information about how to specify Review Policies when you
2680// call CreateHIT, see Review Policies. The ListReviewPolicyResultsForHIT operation
2681// can return results for both Assignment-level and HIT-level review results.
2682//
2683// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2684// with awserr.Error's Code and Message methods to get detailed information about
2685// the error.
2686//
2687// See the AWS API reference guide for Amazon Mechanical Turk's
2688// API operation ListReviewPolicyResultsForHIT for usage and error information.
2689//
2690// Returned Error Codes:
2691//   * ErrCodeServiceFault "ServiceFault"
2692//   Amazon Mechanical Turk is temporarily unable to process your request. Try
2693//   your call again.
2694//
2695//   * ErrCodeRequestError "RequestError"
2696//   Your request is invalid.
2697//
2698// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListReviewPolicyResultsForHIT
2699func (c *MTurk) ListReviewPolicyResultsForHIT(input *ListReviewPolicyResultsForHITInput) (*ListReviewPolicyResultsForHITOutput, error) {
2700	req, out := c.ListReviewPolicyResultsForHITRequest(input)
2701	return out, req.Send()
2702}
2703
2704// ListReviewPolicyResultsForHITWithContext is the same as ListReviewPolicyResultsForHIT with the addition of
2705// the ability to pass a context and additional request options.
2706//
2707// See ListReviewPolicyResultsForHIT for details on how to use this API operation.
2708//
2709// The context must be non-nil and will be used for request cancellation. If
2710// the context is nil a panic will occur. In the future the SDK may create
2711// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2712// for more information on using Contexts.
2713func (c *MTurk) ListReviewPolicyResultsForHITWithContext(ctx aws.Context, input *ListReviewPolicyResultsForHITInput, opts ...request.Option) (*ListReviewPolicyResultsForHITOutput, error) {
2714	req, out := c.ListReviewPolicyResultsForHITRequest(input)
2715	req.SetContext(ctx)
2716	req.ApplyOptions(opts...)
2717	return out, req.Send()
2718}
2719
2720// ListReviewPolicyResultsForHITPages iterates over the pages of a ListReviewPolicyResultsForHIT operation,
2721// calling the "fn" function with the response data for each page. To stop
2722// iterating, return false from the fn function.
2723//
2724// See ListReviewPolicyResultsForHIT method for more information on how to use this operation.
2725//
2726// Note: This operation can generate multiple requests to a service.
2727//
2728//    // Example iterating over at most 3 pages of a ListReviewPolicyResultsForHIT operation.
2729//    pageNum := 0
2730//    err := client.ListReviewPolicyResultsForHITPages(params,
2731//        func(page *mturk.ListReviewPolicyResultsForHITOutput, lastPage bool) bool {
2732//            pageNum++
2733//            fmt.Println(page)
2734//            return pageNum <= 3
2735//        })
2736//
2737func (c *MTurk) ListReviewPolicyResultsForHITPages(input *ListReviewPolicyResultsForHITInput, fn func(*ListReviewPolicyResultsForHITOutput, bool) bool) error {
2738	return c.ListReviewPolicyResultsForHITPagesWithContext(aws.BackgroundContext(), input, fn)
2739}
2740
2741// ListReviewPolicyResultsForHITPagesWithContext same as ListReviewPolicyResultsForHITPages except
2742// it takes a Context and allows setting request options on the pages.
2743//
2744// The context must be non-nil and will be used for request cancellation. If
2745// the context is nil a panic will occur. In the future the SDK may create
2746// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2747// for more information on using Contexts.
2748func (c *MTurk) ListReviewPolicyResultsForHITPagesWithContext(ctx aws.Context, input *ListReviewPolicyResultsForHITInput, fn func(*ListReviewPolicyResultsForHITOutput, bool) bool, opts ...request.Option) error {
2749	p := request.Pagination{
2750		NewRequest: func() (*request.Request, error) {
2751			var inCpy *ListReviewPolicyResultsForHITInput
2752			if input != nil {
2753				tmp := *input
2754				inCpy = &tmp
2755			}
2756			req, _ := c.ListReviewPolicyResultsForHITRequest(inCpy)
2757			req.SetContext(ctx)
2758			req.ApplyOptions(opts...)
2759			return req, nil
2760		},
2761	}
2762
2763	for p.Next() {
2764		if !fn(p.Page().(*ListReviewPolicyResultsForHITOutput), !p.HasNextPage()) {
2765			break
2766		}
2767	}
2768
2769	return p.Err()
2770}
2771
2772const opListReviewableHITs = "ListReviewableHITs"
2773
2774// ListReviewableHITsRequest generates a "aws/request.Request" representing the
2775// client's request for the ListReviewableHITs operation. The "output" return
2776// value will be populated with the request's response once the request completes
2777// successfully.
2778//
2779// Use "Send" method on the returned Request to send the API call to the service.
2780// the "output" return value is not valid until after Send returns without error.
2781//
2782// See ListReviewableHITs for more information on using the ListReviewableHITs
2783// API call, and error handling.
2784//
2785// This method is useful when you want to inject custom logic or configuration
2786// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2787//
2788//
2789//    // Example sending a request using the ListReviewableHITsRequest method.
2790//    req, resp := client.ListReviewableHITsRequest(params)
2791//
2792//    err := req.Send()
2793//    if err == nil { // resp is now filled
2794//        fmt.Println(resp)
2795//    }
2796//
2797// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListReviewableHITs
2798func (c *MTurk) ListReviewableHITsRequest(input *ListReviewableHITsInput) (req *request.Request, output *ListReviewableHITsOutput) {
2799	op := &request.Operation{
2800		Name:       opListReviewableHITs,
2801		HTTPMethod: "POST",
2802		HTTPPath:   "/",
2803		Paginator: &request.Paginator{
2804			InputTokens:     []string{"NextToken"},
2805			OutputTokens:    []string{"NextToken"},
2806			LimitToken:      "MaxResults",
2807			TruncationToken: "",
2808		},
2809	}
2810
2811	if input == nil {
2812		input = &ListReviewableHITsInput{}
2813	}
2814
2815	output = &ListReviewableHITsOutput{}
2816	req = c.newRequest(op, input, output)
2817	return
2818}
2819
2820// ListReviewableHITs API operation for Amazon Mechanical Turk.
2821//
2822// The ListReviewableHITs operation retrieves the HITs with Status equal to
2823// Reviewable or Status equal to Reviewing that belong to the Requester calling
2824// the operation.
2825//
2826// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2827// with awserr.Error's Code and Message methods to get detailed information about
2828// the error.
2829//
2830// See the AWS API reference guide for Amazon Mechanical Turk's
2831// API operation ListReviewableHITs for usage and error information.
2832//
2833// Returned Error Codes:
2834//   * ErrCodeServiceFault "ServiceFault"
2835//   Amazon Mechanical Turk is temporarily unable to process your request. Try
2836//   your call again.
2837//
2838//   * ErrCodeRequestError "RequestError"
2839//   Your request is invalid.
2840//
2841// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListReviewableHITs
2842func (c *MTurk) ListReviewableHITs(input *ListReviewableHITsInput) (*ListReviewableHITsOutput, error) {
2843	req, out := c.ListReviewableHITsRequest(input)
2844	return out, req.Send()
2845}
2846
2847// ListReviewableHITsWithContext is the same as ListReviewableHITs with the addition of
2848// the ability to pass a context and additional request options.
2849//
2850// See ListReviewableHITs for details on how to use this API operation.
2851//
2852// The context must be non-nil and will be used for request cancellation. If
2853// the context is nil a panic will occur. In the future the SDK may create
2854// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2855// for more information on using Contexts.
2856func (c *MTurk) ListReviewableHITsWithContext(ctx aws.Context, input *ListReviewableHITsInput, opts ...request.Option) (*ListReviewableHITsOutput, error) {
2857	req, out := c.ListReviewableHITsRequest(input)
2858	req.SetContext(ctx)
2859	req.ApplyOptions(opts...)
2860	return out, req.Send()
2861}
2862
2863// ListReviewableHITsPages iterates over the pages of a ListReviewableHITs operation,
2864// calling the "fn" function with the response data for each page. To stop
2865// iterating, return false from the fn function.
2866//
2867// See ListReviewableHITs method for more information on how to use this operation.
2868//
2869// Note: This operation can generate multiple requests to a service.
2870//
2871//    // Example iterating over at most 3 pages of a ListReviewableHITs operation.
2872//    pageNum := 0
2873//    err := client.ListReviewableHITsPages(params,
2874//        func(page *mturk.ListReviewableHITsOutput, lastPage bool) bool {
2875//            pageNum++
2876//            fmt.Println(page)
2877//            return pageNum <= 3
2878//        })
2879//
2880func (c *MTurk) ListReviewableHITsPages(input *ListReviewableHITsInput, fn func(*ListReviewableHITsOutput, bool) bool) error {
2881	return c.ListReviewableHITsPagesWithContext(aws.BackgroundContext(), input, fn)
2882}
2883
2884// ListReviewableHITsPagesWithContext same as ListReviewableHITsPages except
2885// it takes a Context and allows setting request options on the pages.
2886//
2887// The context must be non-nil and will be used for request cancellation. If
2888// the context is nil a panic will occur. In the future the SDK may create
2889// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2890// for more information on using Contexts.
2891func (c *MTurk) ListReviewableHITsPagesWithContext(ctx aws.Context, input *ListReviewableHITsInput, fn func(*ListReviewableHITsOutput, bool) bool, opts ...request.Option) error {
2892	p := request.Pagination{
2893		NewRequest: func() (*request.Request, error) {
2894			var inCpy *ListReviewableHITsInput
2895			if input != nil {
2896				tmp := *input
2897				inCpy = &tmp
2898			}
2899			req, _ := c.ListReviewableHITsRequest(inCpy)
2900			req.SetContext(ctx)
2901			req.ApplyOptions(opts...)
2902			return req, nil
2903		},
2904	}
2905
2906	for p.Next() {
2907		if !fn(p.Page().(*ListReviewableHITsOutput), !p.HasNextPage()) {
2908			break
2909		}
2910	}
2911
2912	return p.Err()
2913}
2914
2915const opListWorkerBlocks = "ListWorkerBlocks"
2916
2917// ListWorkerBlocksRequest generates a "aws/request.Request" representing the
2918// client's request for the ListWorkerBlocks operation. The "output" return
2919// value will be populated with the request's response once the request completes
2920// successfully.
2921//
2922// Use "Send" method on the returned Request to send the API call to the service.
2923// the "output" return value is not valid until after Send returns without error.
2924//
2925// See ListWorkerBlocks for more information on using the ListWorkerBlocks
2926// API call, and error handling.
2927//
2928// This method is useful when you want to inject custom logic or configuration
2929// into the SDK's request lifecycle. Such as custom headers, or retry logic.
2930//
2931//
2932//    // Example sending a request using the ListWorkerBlocksRequest method.
2933//    req, resp := client.ListWorkerBlocksRequest(params)
2934//
2935//    err := req.Send()
2936//    if err == nil { // resp is now filled
2937//        fmt.Println(resp)
2938//    }
2939//
2940// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListWorkerBlocks
2941func (c *MTurk) ListWorkerBlocksRequest(input *ListWorkerBlocksInput) (req *request.Request, output *ListWorkerBlocksOutput) {
2942	op := &request.Operation{
2943		Name:       opListWorkerBlocks,
2944		HTTPMethod: "POST",
2945		HTTPPath:   "/",
2946		Paginator: &request.Paginator{
2947			InputTokens:     []string{"NextToken"},
2948			OutputTokens:    []string{"NextToken"},
2949			LimitToken:      "MaxResults",
2950			TruncationToken: "",
2951		},
2952	}
2953
2954	if input == nil {
2955		input = &ListWorkerBlocksInput{}
2956	}
2957
2958	output = &ListWorkerBlocksOutput{}
2959	req = c.newRequest(op, input, output)
2960	return
2961}
2962
2963// ListWorkerBlocks API operation for Amazon Mechanical Turk.
2964//
2965// The ListWorkersBlocks operation retrieves a list of Workers who are blocked
2966// from working on your HITs.
2967//
2968// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
2969// with awserr.Error's Code and Message methods to get detailed information about
2970// the error.
2971//
2972// See the AWS API reference guide for Amazon Mechanical Turk's
2973// API operation ListWorkerBlocks for usage and error information.
2974//
2975// Returned Error Codes:
2976//   * ErrCodeServiceFault "ServiceFault"
2977//   Amazon Mechanical Turk is temporarily unable to process your request. Try
2978//   your call again.
2979//
2980//   * ErrCodeRequestError "RequestError"
2981//   Your request is invalid.
2982//
2983// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListWorkerBlocks
2984func (c *MTurk) ListWorkerBlocks(input *ListWorkerBlocksInput) (*ListWorkerBlocksOutput, error) {
2985	req, out := c.ListWorkerBlocksRequest(input)
2986	return out, req.Send()
2987}
2988
2989// ListWorkerBlocksWithContext is the same as ListWorkerBlocks with the addition of
2990// the ability to pass a context and additional request options.
2991//
2992// See ListWorkerBlocks for details on how to use this API operation.
2993//
2994// The context must be non-nil and will be used for request cancellation. If
2995// the context is nil a panic will occur. In the future the SDK may create
2996// sub-contexts for http.Requests. See https://golang.org/pkg/context/
2997// for more information on using Contexts.
2998func (c *MTurk) ListWorkerBlocksWithContext(ctx aws.Context, input *ListWorkerBlocksInput, opts ...request.Option) (*ListWorkerBlocksOutput, error) {
2999	req, out := c.ListWorkerBlocksRequest(input)
3000	req.SetContext(ctx)
3001	req.ApplyOptions(opts...)
3002	return out, req.Send()
3003}
3004
3005// ListWorkerBlocksPages iterates over the pages of a ListWorkerBlocks operation,
3006// calling the "fn" function with the response data for each page. To stop
3007// iterating, return false from the fn function.
3008//
3009// See ListWorkerBlocks method for more information on how to use this operation.
3010//
3011// Note: This operation can generate multiple requests to a service.
3012//
3013//    // Example iterating over at most 3 pages of a ListWorkerBlocks operation.
3014//    pageNum := 0
3015//    err := client.ListWorkerBlocksPages(params,
3016//        func(page *mturk.ListWorkerBlocksOutput, lastPage bool) bool {
3017//            pageNum++
3018//            fmt.Println(page)
3019//            return pageNum <= 3
3020//        })
3021//
3022func (c *MTurk) ListWorkerBlocksPages(input *ListWorkerBlocksInput, fn func(*ListWorkerBlocksOutput, bool) bool) error {
3023	return c.ListWorkerBlocksPagesWithContext(aws.BackgroundContext(), input, fn)
3024}
3025
3026// ListWorkerBlocksPagesWithContext same as ListWorkerBlocksPages except
3027// it takes a Context and allows setting request options on the pages.
3028//
3029// The context must be non-nil and will be used for request cancellation. If
3030// the context is nil a panic will occur. In the future the SDK may create
3031// sub-contexts for http.Requests. See https://golang.org/pkg/context/
3032// for more information on using Contexts.
3033func (c *MTurk) ListWorkerBlocksPagesWithContext(ctx aws.Context, input *ListWorkerBlocksInput, fn func(*ListWorkerBlocksOutput, bool) bool, opts ...request.Option) error {
3034	p := request.Pagination{
3035		NewRequest: func() (*request.Request, error) {
3036			var inCpy *ListWorkerBlocksInput
3037			if input != nil {
3038				tmp := *input
3039				inCpy = &tmp
3040			}
3041			req, _ := c.ListWorkerBlocksRequest(inCpy)
3042			req.SetContext(ctx)
3043			req.ApplyOptions(opts...)
3044			return req, nil
3045		},
3046	}
3047
3048	for p.Next() {
3049		if !fn(p.Page().(*ListWorkerBlocksOutput), !p.HasNextPage()) {
3050			break
3051		}
3052	}
3053
3054	return p.Err()
3055}
3056
3057const opListWorkersWithQualificationType = "ListWorkersWithQualificationType"
3058
3059// ListWorkersWithQualificationTypeRequest generates a "aws/request.Request" representing the
3060// client's request for the ListWorkersWithQualificationType operation. The "output" return
3061// value will be populated with the request's response once the request completes
3062// successfully.
3063//
3064// Use "Send" method on the returned Request to send the API call to the service.
3065// the "output" return value is not valid until after Send returns without error.
3066//
3067// See ListWorkersWithQualificationType for more information on using the ListWorkersWithQualificationType
3068// API call, and error handling.
3069//
3070// This method is useful when you want to inject custom logic or configuration
3071// into the SDK's request lifecycle. Such as custom headers, or retry logic.
3072//
3073//
3074//    // Example sending a request using the ListWorkersWithQualificationTypeRequest method.
3075//    req, resp := client.ListWorkersWithQualificationTypeRequest(params)
3076//
3077//    err := req.Send()
3078//    if err == nil { // resp is now filled
3079//        fmt.Println(resp)
3080//    }
3081//
3082// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListWorkersWithQualificationType
3083func (c *MTurk) ListWorkersWithQualificationTypeRequest(input *ListWorkersWithQualificationTypeInput) (req *request.Request, output *ListWorkersWithQualificationTypeOutput) {
3084	op := &request.Operation{
3085		Name:       opListWorkersWithQualificationType,
3086		HTTPMethod: "POST",
3087		HTTPPath:   "/",
3088		Paginator: &request.Paginator{
3089			InputTokens:     []string{"NextToken"},
3090			OutputTokens:    []string{"NextToken"},
3091			LimitToken:      "MaxResults",
3092			TruncationToken: "",
3093		},
3094	}
3095
3096	if input == nil {
3097		input = &ListWorkersWithQualificationTypeInput{}
3098	}
3099
3100	output = &ListWorkersWithQualificationTypeOutput{}
3101	req = c.newRequest(op, input, output)
3102	return
3103}
3104
3105// ListWorkersWithQualificationType API operation for Amazon Mechanical Turk.
3106//
3107// The ListWorkersWithQualificationType operation returns all of the Workers
3108// that have been associated with a given Qualification type.
3109//
3110// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
3111// with awserr.Error's Code and Message methods to get detailed information about
3112// the error.
3113//
3114// See the AWS API reference guide for Amazon Mechanical Turk's
3115// API operation ListWorkersWithQualificationType for usage and error information.
3116//
3117// Returned Error Codes:
3118//   * ErrCodeServiceFault "ServiceFault"
3119//   Amazon Mechanical Turk is temporarily unable to process your request. Try
3120//   your call again.
3121//
3122//   * ErrCodeRequestError "RequestError"
3123//   Your request is invalid.
3124//
3125// See also, https://docs.aws.amazon.com/goto/WebAPI/mturk-requester-2017-01-17/ListWorkersWithQualificationType
3126func (c *MTurk) ListWorkersWithQualificationType(input *ListWorkersWithQualificationTypeInput) (*ListWorkersWithQualificationTypeOutput, error) {
3127	req, out := c.ListWorkersWithQualificationTypeRequest(input)
3128	return out, req.Send()
3129}
3130
3131// ListWorkersWithQualificationTypeWithContext is the same as ListWorkersWithQualificationType with the addition of
3132// the ability to pass a context and additional request options.
3133//
3134// See ListWorkersWithQualificationType for details on how to use this API operation.
3135//
3136// The context must be non-nil and will be used for request cancellation. If
3137// the context is nil a panic will occur. In the future the SDK may create
3138// sub-contexts for http.Requests. See https://golang.org/pkg/context/
3139// for more information on using Contexts.
3140func (c *MTurk) ListWorkersWithQualificationTypeWithContext(ctx aws.Context, input *ListWorkersWithQualificationTypeInput, opts ...request.Option) (*ListWorkersWithQualificationTypeOutput, error) {
3141	req, out := c.ListWorkersWithQualificationTypeRequest(input)
3142	req.SetContext(ctx)
3143	req.ApplyOptions(opts...)
3144	return out, req.Send()
3145}
3146
3147// ListWorkersWithQualificationTypePages iterates over the pages of a ListWorkersWithQualificationType operation,
3148// calling the "fn" function with the response data for each page. To stop
3149// iterating, return false from the fn function.
3150//
3151// See ListWorkersWithQualificationType method for more information on how to use this operation.
3152//
3153// Note: This operation can generate multiple requests to a service.
3154//
3155//    // Example iterating over at most 3 pages of a ListWorkersWithQualificationType operation.
3156//    pageNum := 0
3157//    err := client.ListWorkersWithQualificationTypePages(params,
3158//        func(page *mturk.ListWorkersWithQualificationTypeOutput, lastPage bool) bool {
3159//            pageNum++
3160//            fmt.Println(page)
3161//            return pageNum <= 3
3162//        })
3163//
3164func (c *MTurk) ListWorkersWithQualificationTypePages(input *ListWorkersWithQualificationTypeInput, fn func(*ListWorkersWithQualificationTypeOutput, bool) bool) error {
3165	return c.ListWorkersWithQualificationTypePagesWithContext(aws.BackgroundContext(), input, fn)
3166}
3167
3168// ListWorkersWithQualificationTypePagesWithContext same as ListWorkersWithQualificationTypePages except
3169// it takes a Context and allows setting request options on the pages.
3170//
3171// The context must be non-nil and will be used for request cancellation. If
3172// the context is nil a panic will occur. In the future the SDK may create
3173// sub-contexts for http.Requests. See https://golang.org/pkg/context/
3174// for more information on using Contexts.
3175func (c *MTurk) ListWorkersWithQualificationTypePagesWithContext(ctx aws.Context, input *ListWorkersWithQualificationTypeInput, fn func(*ListWorkersWithQualificationTypeOutput, bool) bool, opts ...request.Option) error {
3176	p := request.Pagination{
3177		NewRequest: func() (*request.Request, error) {
3178			var inCpy *ListWorkersWithQualificationTypeInput
3179			if input != nil {
3180				tmp := *input
3181				inCpy = &tmp
3182			}
3183			req, _ := c.ListWorkersWithQualificationTypeRequest(inCpy)
3184			req.SetContext(ctx)
3185			req.ApplyOptions(opts...)
3186			return req, nil
3187		},
3188	}
3189
3190	for p.Next() {
3191		if !fn(p.Page().(*ListWorkersWithQualificationTypeOutput), !p.HasNextPage()) {
3192			break
3193		}
3194	}
3195
3196	return p.Err()
3197}
3198
3199const opNotifyWorkers = "NotifyWorkers"
3200
3201// NotifyWorkersRequest generates a "aws/request.Request" representing the
3202// client's request for the NotifyWorkers operation. The "output" return
3203// value will be populated with the request's response once the request completes
3204// successfully.
3205//
3206// Use "Send" method on the retur&#