1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package athena
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 opBatchGetNamedQuery = "BatchGetNamedQuery"
17
18// BatchGetNamedQueryRequest generates a "aws/request.Request" representing the
19// client's request for the BatchGetNamedQuery 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 BatchGetNamedQuery for more information on using the BatchGetNamedQuery
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 BatchGetNamedQueryRequest method.
34//    req, resp := client.BatchGetNamedQueryRequest(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/athena-2017-05-18/BatchGetNamedQuery
42func (c *Athena) BatchGetNamedQueryRequest(input *BatchGetNamedQueryInput) (req *request.Request, output *BatchGetNamedQueryOutput) {
43	op := &request.Operation{
44		Name:       opBatchGetNamedQuery,
45		HTTPMethod: "POST",
46		HTTPPath:   "/",
47	}
48
49	if input == nil {
50		input = &BatchGetNamedQueryInput{}
51	}
52
53	output = &BatchGetNamedQueryOutput{}
54	req = c.newRequest(op, input, output)
55	return
56}
57
58// BatchGetNamedQuery API operation for Amazon Athena.
59//
60// Returns the details of a single named query or a list of up to 50 queries,
61// which you provide as an array of query ID strings. Requires you to have access
62// to the workgroup in which the queries were saved. Use ListNamedQueriesInput
63// to get the list of named query IDs in the specified workgroup. If information
64// could not be retrieved for a submitted query ID, information about the query
65// ID submitted is listed under UnprocessedNamedQueryId. Named queries differ
66// from executed queries. Use BatchGetQueryExecutionInput to get details about
67// each unique query execution, and ListQueryExecutionsInput to get a list of
68// query execution IDs.
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 Athena's
75// API operation BatchGetNamedQuery for usage and error information.
76//
77// Returned Error Codes:
78//   * ErrCodeInternalServerException "InternalServerException"
79//   Indicates a platform issue, which may be due to a transient condition or
80//   outage.
81//
82//   * ErrCodeInvalidRequestException "InvalidRequestException"
83//   Indicates that something is wrong with the input to the request. For example,
84//   a required parameter may be missing or out of range.
85//
86// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery
87func (c *Athena) BatchGetNamedQuery(input *BatchGetNamedQueryInput) (*BatchGetNamedQueryOutput, error) {
88	req, out := c.BatchGetNamedQueryRequest(input)
89	return out, req.Send()
90}
91
92// BatchGetNamedQueryWithContext is the same as BatchGetNamedQuery with the addition of
93// the ability to pass a context and additional request options.
94//
95// See BatchGetNamedQuery for details on how to use this API operation.
96//
97// The context must be non-nil and will be used for request cancellation. If
98// the context is nil a panic will occur. In the future the SDK may create
99// sub-contexts for http.Requests. See https://golang.org/pkg/context/
100// for more information on using Contexts.
101func (c *Athena) BatchGetNamedQueryWithContext(ctx aws.Context, input *BatchGetNamedQueryInput, opts ...request.Option) (*BatchGetNamedQueryOutput, error) {
102	req, out := c.BatchGetNamedQueryRequest(input)
103	req.SetContext(ctx)
104	req.ApplyOptions(opts...)
105	return out, req.Send()
106}
107
108const opBatchGetQueryExecution = "BatchGetQueryExecution"
109
110// BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the
111// client's request for the BatchGetQueryExecution operation. The "output" return
112// value will be populated with the request's response once the request completes
113// successfully.
114//
115// Use "Send" method on the returned Request to send the API call to the service.
116// the "output" return value is not valid until after Send returns without error.
117//
118// See BatchGetQueryExecution for more information on using the BatchGetQueryExecution
119// API call, and error handling.
120//
121// This method is useful when you want to inject custom logic or configuration
122// into the SDK's request lifecycle. Such as custom headers, or retry logic.
123//
124//
125//    // Example sending a request using the BatchGetQueryExecutionRequest method.
126//    req, resp := client.BatchGetQueryExecutionRequest(params)
127//
128//    err := req.Send()
129//    if err == nil { // resp is now filled
130//        fmt.Println(resp)
131//    }
132//
133// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution
134func (c *Athena) BatchGetQueryExecutionRequest(input *BatchGetQueryExecutionInput) (req *request.Request, output *BatchGetQueryExecutionOutput) {
135	op := &request.Operation{
136		Name:       opBatchGetQueryExecution,
137		HTTPMethod: "POST",
138		HTTPPath:   "/",
139	}
140
141	if input == nil {
142		input = &BatchGetQueryExecutionInput{}
143	}
144
145	output = &BatchGetQueryExecutionOutput{}
146	req = c.newRequest(op, input, output)
147	return
148}
149
150// BatchGetQueryExecution API operation for Amazon Athena.
151//
152// Returns the details of a single query execution or a list of up to 50 query
153// executions, which you provide as an array of query execution ID strings.
154// Requires you to have access to the workgroup in which the queries ran. To
155// get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup.
156// Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput
157// to get details about named queries.
158//
159// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
160// with awserr.Error's Code and Message methods to get detailed information about
161// the error.
162//
163// See the AWS API reference guide for Amazon Athena's
164// API operation BatchGetQueryExecution for usage and error information.
165//
166// Returned Error Codes:
167//   * ErrCodeInternalServerException "InternalServerException"
168//   Indicates a platform issue, which may be due to a transient condition or
169//   outage.
170//
171//   * ErrCodeInvalidRequestException "InvalidRequestException"
172//   Indicates that something is wrong with the input to the request. For example,
173//   a required parameter may be missing or out of range.
174//
175// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution
176func (c *Athena) BatchGetQueryExecution(input *BatchGetQueryExecutionInput) (*BatchGetQueryExecutionOutput, error) {
177	req, out := c.BatchGetQueryExecutionRequest(input)
178	return out, req.Send()
179}
180
181// BatchGetQueryExecutionWithContext is the same as BatchGetQueryExecution with the addition of
182// the ability to pass a context and additional request options.
183//
184// See BatchGetQueryExecution for details on how to use this API operation.
185//
186// The context must be non-nil and will be used for request cancellation. If
187// the context is nil a panic will occur. In the future the SDK may create
188// sub-contexts for http.Requests. See https://golang.org/pkg/context/
189// for more information on using Contexts.
190func (c *Athena) BatchGetQueryExecutionWithContext(ctx aws.Context, input *BatchGetQueryExecutionInput, opts ...request.Option) (*BatchGetQueryExecutionOutput, error) {
191	req, out := c.BatchGetQueryExecutionRequest(input)
192	req.SetContext(ctx)
193	req.ApplyOptions(opts...)
194	return out, req.Send()
195}
196
197const opCreateNamedQuery = "CreateNamedQuery"
198
199// CreateNamedQueryRequest generates a "aws/request.Request" representing the
200// client's request for the CreateNamedQuery operation. The "output" return
201// value will be populated with the request's response once the request completes
202// successfully.
203//
204// Use "Send" method on the returned Request to send the API call to the service.
205// the "output" return value is not valid until after Send returns without error.
206//
207// See CreateNamedQuery for more information on using the CreateNamedQuery
208// API call, and error handling.
209//
210// This method is useful when you want to inject custom logic or configuration
211// into the SDK's request lifecycle. Such as custom headers, or retry logic.
212//
213//
214//    // Example sending a request using the CreateNamedQueryRequest method.
215//    req, resp := client.CreateNamedQueryRequest(params)
216//
217//    err := req.Send()
218//    if err == nil { // resp is now filled
219//        fmt.Println(resp)
220//    }
221//
222// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery
223func (c *Athena) CreateNamedQueryRequest(input *CreateNamedQueryInput) (req *request.Request, output *CreateNamedQueryOutput) {
224	op := &request.Operation{
225		Name:       opCreateNamedQuery,
226		HTTPMethod: "POST",
227		HTTPPath:   "/",
228	}
229
230	if input == nil {
231		input = &CreateNamedQueryInput{}
232	}
233
234	output = &CreateNamedQueryOutput{}
235	req = c.newRequest(op, input, output)
236	return
237}
238
239// CreateNamedQuery API operation for Amazon Athena.
240//
241// Creates a named query in the specified workgroup. Requires that you have
242// access to the workgroup.
243//
244// For code samples using the AWS SDK for Java, see Examples and Code Samples
245// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
246// Athena User Guide.
247//
248// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
249// with awserr.Error's Code and Message methods to get detailed information about
250// the error.
251//
252// See the AWS API reference guide for Amazon Athena's
253// API operation CreateNamedQuery for usage and error information.
254//
255// Returned Error Codes:
256//   * ErrCodeInternalServerException "InternalServerException"
257//   Indicates a platform issue, which may be due to a transient condition or
258//   outage.
259//
260//   * ErrCodeInvalidRequestException "InvalidRequestException"
261//   Indicates that something is wrong with the input to the request. For example,
262//   a required parameter may be missing or out of range.
263//
264// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery
265func (c *Athena) CreateNamedQuery(input *CreateNamedQueryInput) (*CreateNamedQueryOutput, error) {
266	req, out := c.CreateNamedQueryRequest(input)
267	return out, req.Send()
268}
269
270// CreateNamedQueryWithContext is the same as CreateNamedQuery with the addition of
271// the ability to pass a context and additional request options.
272//
273// See CreateNamedQuery for details on how to use this API operation.
274//
275// The context must be non-nil and will be used for request cancellation. If
276// the context is nil a panic will occur. In the future the SDK may create
277// sub-contexts for http.Requests. See https://golang.org/pkg/context/
278// for more information on using Contexts.
279func (c *Athena) CreateNamedQueryWithContext(ctx aws.Context, input *CreateNamedQueryInput, opts ...request.Option) (*CreateNamedQueryOutput, error) {
280	req, out := c.CreateNamedQueryRequest(input)
281	req.SetContext(ctx)
282	req.ApplyOptions(opts...)
283	return out, req.Send()
284}
285
286const opCreateWorkGroup = "CreateWorkGroup"
287
288// CreateWorkGroupRequest generates a "aws/request.Request" representing the
289// client's request for the CreateWorkGroup operation. The "output" return
290// value will be populated with the request's response once the request completes
291// successfully.
292//
293// Use "Send" method on the returned Request to send the API call to the service.
294// the "output" return value is not valid until after Send returns without error.
295//
296// See CreateWorkGroup for more information on using the CreateWorkGroup
297// API call, and error handling.
298//
299// This method is useful when you want to inject custom logic or configuration
300// into the SDK's request lifecycle. Such as custom headers, or retry logic.
301//
302//
303//    // Example sending a request using the CreateWorkGroupRequest method.
304//    req, resp := client.CreateWorkGroupRequest(params)
305//
306//    err := req.Send()
307//    if err == nil { // resp is now filled
308//        fmt.Println(resp)
309//    }
310//
311// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateWorkGroup
312func (c *Athena) CreateWorkGroupRequest(input *CreateWorkGroupInput) (req *request.Request, output *CreateWorkGroupOutput) {
313	op := &request.Operation{
314		Name:       opCreateWorkGroup,
315		HTTPMethod: "POST",
316		HTTPPath:   "/",
317	}
318
319	if input == nil {
320		input = &CreateWorkGroupInput{}
321	}
322
323	output = &CreateWorkGroupOutput{}
324	req = c.newRequest(op, input, output)
325	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
326	return
327}
328
329// CreateWorkGroup API operation for Amazon Athena.
330//
331// Creates a workgroup with the specified name.
332//
333// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
334// with awserr.Error's Code and Message methods to get detailed information about
335// the error.
336//
337// See the AWS API reference guide for Amazon Athena's
338// API operation CreateWorkGroup for usage and error information.
339//
340// Returned Error Codes:
341//   * ErrCodeInternalServerException "InternalServerException"
342//   Indicates a platform issue, which may be due to a transient condition or
343//   outage.
344//
345//   * ErrCodeInvalidRequestException "InvalidRequestException"
346//   Indicates that something is wrong with the input to the request. For example,
347//   a required parameter may be missing or out of range.
348//
349// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateWorkGroup
350func (c *Athena) CreateWorkGroup(input *CreateWorkGroupInput) (*CreateWorkGroupOutput, error) {
351	req, out := c.CreateWorkGroupRequest(input)
352	return out, req.Send()
353}
354
355// CreateWorkGroupWithContext is the same as CreateWorkGroup with the addition of
356// the ability to pass a context and additional request options.
357//
358// See CreateWorkGroup for details on how to use this API operation.
359//
360// The context must be non-nil and will be used for request cancellation. If
361// the context is nil a panic will occur. In the future the SDK may create
362// sub-contexts for http.Requests. See https://golang.org/pkg/context/
363// for more information on using Contexts.
364func (c *Athena) CreateWorkGroupWithContext(ctx aws.Context, input *CreateWorkGroupInput, opts ...request.Option) (*CreateWorkGroupOutput, error) {
365	req, out := c.CreateWorkGroupRequest(input)
366	req.SetContext(ctx)
367	req.ApplyOptions(opts...)
368	return out, req.Send()
369}
370
371const opDeleteNamedQuery = "DeleteNamedQuery"
372
373// DeleteNamedQueryRequest generates a "aws/request.Request" representing the
374// client's request for the DeleteNamedQuery operation. The "output" return
375// value will be populated with the request's response once the request completes
376// successfully.
377//
378// Use "Send" method on the returned Request to send the API call to the service.
379// the "output" return value is not valid until after Send returns without error.
380//
381// See DeleteNamedQuery for more information on using the DeleteNamedQuery
382// API call, and error handling.
383//
384// This method is useful when you want to inject custom logic or configuration
385// into the SDK's request lifecycle. Such as custom headers, or retry logic.
386//
387//
388//    // Example sending a request using the DeleteNamedQueryRequest method.
389//    req, resp := client.DeleteNamedQueryRequest(params)
390//
391//    err := req.Send()
392//    if err == nil { // resp is now filled
393//        fmt.Println(resp)
394//    }
395//
396// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery
397func (c *Athena) DeleteNamedQueryRequest(input *DeleteNamedQueryInput) (req *request.Request, output *DeleteNamedQueryOutput) {
398	op := &request.Operation{
399		Name:       opDeleteNamedQuery,
400		HTTPMethod: "POST",
401		HTTPPath:   "/",
402	}
403
404	if input == nil {
405		input = &DeleteNamedQueryInput{}
406	}
407
408	output = &DeleteNamedQueryOutput{}
409	req = c.newRequest(op, input, output)
410	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
411	return
412}
413
414// DeleteNamedQuery API operation for Amazon Athena.
415//
416// Deletes the named query if you have access to the workgroup in which the
417// query was saved.
418//
419// For code samples using the AWS SDK for Java, see Examples and Code Samples
420// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
421// Athena User Guide.
422//
423// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
424// with awserr.Error's Code and Message methods to get detailed information about
425// the error.
426//
427// See the AWS API reference guide for Amazon Athena's
428// API operation DeleteNamedQuery for usage and error information.
429//
430// Returned Error Codes:
431//   * ErrCodeInternalServerException "InternalServerException"
432//   Indicates a platform issue, which may be due to a transient condition or
433//   outage.
434//
435//   * ErrCodeInvalidRequestException "InvalidRequestException"
436//   Indicates that something is wrong with the input to the request. For example,
437//   a required parameter may be missing or out of range.
438//
439// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery
440func (c *Athena) DeleteNamedQuery(input *DeleteNamedQueryInput) (*DeleteNamedQueryOutput, error) {
441	req, out := c.DeleteNamedQueryRequest(input)
442	return out, req.Send()
443}
444
445// DeleteNamedQueryWithContext is the same as DeleteNamedQuery with the addition of
446// the ability to pass a context and additional request options.
447//
448// See DeleteNamedQuery for details on how to use this API operation.
449//
450// The context must be non-nil and will be used for request cancellation. If
451// the context is nil a panic will occur. In the future the SDK may create
452// sub-contexts for http.Requests. See https://golang.org/pkg/context/
453// for more information on using Contexts.
454func (c *Athena) DeleteNamedQueryWithContext(ctx aws.Context, input *DeleteNamedQueryInput, opts ...request.Option) (*DeleteNamedQueryOutput, error) {
455	req, out := c.DeleteNamedQueryRequest(input)
456	req.SetContext(ctx)
457	req.ApplyOptions(opts...)
458	return out, req.Send()
459}
460
461const opDeleteWorkGroup = "DeleteWorkGroup"
462
463// DeleteWorkGroupRequest generates a "aws/request.Request" representing the
464// client's request for the DeleteWorkGroup operation. The "output" return
465// value will be populated with the request's response once the request completes
466// successfully.
467//
468// Use "Send" method on the returned Request to send the API call to the service.
469// the "output" return value is not valid until after Send returns without error.
470//
471// See DeleteWorkGroup for more information on using the DeleteWorkGroup
472// API call, and error handling.
473//
474// This method is useful when you want to inject custom logic or configuration
475// into the SDK's request lifecycle. Such as custom headers, or retry logic.
476//
477//
478//    // Example sending a request using the DeleteWorkGroupRequest method.
479//    req, resp := client.DeleteWorkGroupRequest(params)
480//
481//    err := req.Send()
482//    if err == nil { // resp is now filled
483//        fmt.Println(resp)
484//    }
485//
486// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteWorkGroup
487func (c *Athena) DeleteWorkGroupRequest(input *DeleteWorkGroupInput) (req *request.Request, output *DeleteWorkGroupOutput) {
488	op := &request.Operation{
489		Name:       opDeleteWorkGroup,
490		HTTPMethod: "POST",
491		HTTPPath:   "/",
492	}
493
494	if input == nil {
495		input = &DeleteWorkGroupInput{}
496	}
497
498	output = &DeleteWorkGroupOutput{}
499	req = c.newRequest(op, input, output)
500	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
501	return
502}
503
504// DeleteWorkGroup API operation for Amazon Athena.
505//
506// Deletes the workgroup with the specified name. The primary workgroup cannot
507// be deleted.
508//
509// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
510// with awserr.Error's Code and Message methods to get detailed information about
511// the error.
512//
513// See the AWS API reference guide for Amazon Athena's
514// API operation DeleteWorkGroup for usage and error information.
515//
516// Returned Error Codes:
517//   * ErrCodeInternalServerException "InternalServerException"
518//   Indicates a platform issue, which may be due to a transient condition or
519//   outage.
520//
521//   * ErrCodeInvalidRequestException "InvalidRequestException"
522//   Indicates that something is wrong with the input to the request. For example,
523//   a required parameter may be missing or out of range.
524//
525// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteWorkGroup
526func (c *Athena) DeleteWorkGroup(input *DeleteWorkGroupInput) (*DeleteWorkGroupOutput, error) {
527	req, out := c.DeleteWorkGroupRequest(input)
528	return out, req.Send()
529}
530
531// DeleteWorkGroupWithContext is the same as DeleteWorkGroup with the addition of
532// the ability to pass a context and additional request options.
533//
534// See DeleteWorkGroup for details on how to use this API operation.
535//
536// The context must be non-nil and will be used for request cancellation. If
537// the context is nil a panic will occur. In the future the SDK may create
538// sub-contexts for http.Requests. See https://golang.org/pkg/context/
539// for more information on using Contexts.
540func (c *Athena) DeleteWorkGroupWithContext(ctx aws.Context, input *DeleteWorkGroupInput, opts ...request.Option) (*DeleteWorkGroupOutput, error) {
541	req, out := c.DeleteWorkGroupRequest(input)
542	req.SetContext(ctx)
543	req.ApplyOptions(opts...)
544	return out, req.Send()
545}
546
547const opGetNamedQuery = "GetNamedQuery"
548
549// GetNamedQueryRequest generates a "aws/request.Request" representing the
550// client's request for the GetNamedQuery operation. The "output" return
551// value will be populated with the request's response once the request completes
552// successfully.
553//
554// Use "Send" method on the returned Request to send the API call to the service.
555// the "output" return value is not valid until after Send returns without error.
556//
557// See GetNamedQuery for more information on using the GetNamedQuery
558// API call, and error handling.
559//
560// This method is useful when you want to inject custom logic or configuration
561// into the SDK's request lifecycle. Such as custom headers, or retry logic.
562//
563//
564//    // Example sending a request using the GetNamedQueryRequest method.
565//    req, resp := client.GetNamedQueryRequest(params)
566//
567//    err := req.Send()
568//    if err == nil { // resp is now filled
569//        fmt.Println(resp)
570//    }
571//
572// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery
573func (c *Athena) GetNamedQueryRequest(input *GetNamedQueryInput) (req *request.Request, output *GetNamedQueryOutput) {
574	op := &request.Operation{
575		Name:       opGetNamedQuery,
576		HTTPMethod: "POST",
577		HTTPPath:   "/",
578	}
579
580	if input == nil {
581		input = &GetNamedQueryInput{}
582	}
583
584	output = &GetNamedQueryOutput{}
585	req = c.newRequest(op, input, output)
586	return
587}
588
589// GetNamedQuery API operation for Amazon Athena.
590//
591// Returns information about a single query. Requires that you have access to
592// the workgroup in which the query was saved.
593//
594// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
595// with awserr.Error's Code and Message methods to get detailed information about
596// the error.
597//
598// See the AWS API reference guide for Amazon Athena's
599// API operation GetNamedQuery for usage and error information.
600//
601// Returned Error Codes:
602//   * ErrCodeInternalServerException "InternalServerException"
603//   Indicates a platform issue, which may be due to a transient condition or
604//   outage.
605//
606//   * ErrCodeInvalidRequestException "InvalidRequestException"
607//   Indicates that something is wrong with the input to the request. For example,
608//   a required parameter may be missing or out of range.
609//
610// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery
611func (c *Athena) GetNamedQuery(input *GetNamedQueryInput) (*GetNamedQueryOutput, error) {
612	req, out := c.GetNamedQueryRequest(input)
613	return out, req.Send()
614}
615
616// GetNamedQueryWithContext is the same as GetNamedQuery with the addition of
617// the ability to pass a context and additional request options.
618//
619// See GetNamedQuery for details on how to use this API operation.
620//
621// The context must be non-nil and will be used for request cancellation. If
622// the context is nil a panic will occur. In the future the SDK may create
623// sub-contexts for http.Requests. See https://golang.org/pkg/context/
624// for more information on using Contexts.
625func (c *Athena) GetNamedQueryWithContext(ctx aws.Context, input *GetNamedQueryInput, opts ...request.Option) (*GetNamedQueryOutput, error) {
626	req, out := c.GetNamedQueryRequest(input)
627	req.SetContext(ctx)
628	req.ApplyOptions(opts...)
629	return out, req.Send()
630}
631
632const opGetQueryExecution = "GetQueryExecution"
633
634// GetQueryExecutionRequest generates a "aws/request.Request" representing the
635// client's request for the GetQueryExecution operation. The "output" return
636// value will be populated with the request's response once the request completes
637// successfully.
638//
639// Use "Send" method on the returned Request to send the API call to the service.
640// the "output" return value is not valid until after Send returns without error.
641//
642// See GetQueryExecution for more information on using the GetQueryExecution
643// API call, and error handling.
644//
645// This method is useful when you want to inject custom logic or configuration
646// into the SDK's request lifecycle. Such as custom headers, or retry logic.
647//
648//
649//    // Example sending a request using the GetQueryExecutionRequest method.
650//    req, resp := client.GetQueryExecutionRequest(params)
651//
652//    err := req.Send()
653//    if err == nil { // resp is now filled
654//        fmt.Println(resp)
655//    }
656//
657// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution
658func (c *Athena) GetQueryExecutionRequest(input *GetQueryExecutionInput) (req *request.Request, output *GetQueryExecutionOutput) {
659	op := &request.Operation{
660		Name:       opGetQueryExecution,
661		HTTPMethod: "POST",
662		HTTPPath:   "/",
663	}
664
665	if input == nil {
666		input = &GetQueryExecutionInput{}
667	}
668
669	output = &GetQueryExecutionOutput{}
670	req = c.newRequest(op, input, output)
671	return
672}
673
674// GetQueryExecution API operation for Amazon Athena.
675//
676// Returns information about a single execution of a query if you have access
677// to the workgroup in which the query ran. Each time a query executes, information
678// about the query execution is saved with a unique ID.
679//
680// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
681// with awserr.Error's Code and Message methods to get detailed information about
682// the error.
683//
684// See the AWS API reference guide for Amazon Athena's
685// API operation GetQueryExecution for usage and error information.
686//
687// Returned Error Codes:
688//   * ErrCodeInternalServerException "InternalServerException"
689//   Indicates a platform issue, which may be due to a transient condition or
690//   outage.
691//
692//   * ErrCodeInvalidRequestException "InvalidRequestException"
693//   Indicates that something is wrong with the input to the request. For example,
694//   a required parameter may be missing or out of range.
695//
696// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution
697func (c *Athena) GetQueryExecution(input *GetQueryExecutionInput) (*GetQueryExecutionOutput, error) {
698	req, out := c.GetQueryExecutionRequest(input)
699	return out, req.Send()
700}
701
702// GetQueryExecutionWithContext is the same as GetQueryExecution with the addition of
703// the ability to pass a context and additional request options.
704//
705// See GetQueryExecution for details on how to use this API operation.
706//
707// The context must be non-nil and will be used for request cancellation. If
708// the context is nil a panic will occur. In the future the SDK may create
709// sub-contexts for http.Requests. See https://golang.org/pkg/context/
710// for more information on using Contexts.
711func (c *Athena) GetQueryExecutionWithContext(ctx aws.Context, input *GetQueryExecutionInput, opts ...request.Option) (*GetQueryExecutionOutput, error) {
712	req, out := c.GetQueryExecutionRequest(input)
713	req.SetContext(ctx)
714	req.ApplyOptions(opts...)
715	return out, req.Send()
716}
717
718const opGetQueryResults = "GetQueryResults"
719
720// GetQueryResultsRequest generates a "aws/request.Request" representing the
721// client's request for the GetQueryResults operation. The "output" return
722// value will be populated with the request's response once the request completes
723// successfully.
724//
725// Use "Send" method on the returned Request to send the API call to the service.
726// the "output" return value is not valid until after Send returns without error.
727//
728// See GetQueryResults for more information on using the GetQueryResults
729// API call, and error handling.
730//
731// This method is useful when you want to inject custom logic or configuration
732// into the SDK's request lifecycle. Such as custom headers, or retry logic.
733//
734//
735//    // Example sending a request using the GetQueryResultsRequest method.
736//    req, resp := client.GetQueryResultsRequest(params)
737//
738//    err := req.Send()
739//    if err == nil { // resp is now filled
740//        fmt.Println(resp)
741//    }
742//
743// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults
744func (c *Athena) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) {
745	op := &request.Operation{
746		Name:       opGetQueryResults,
747		HTTPMethod: "POST",
748		HTTPPath:   "/",
749		Paginator: &request.Paginator{
750			InputTokens:     []string{"NextToken"},
751			OutputTokens:    []string{"NextToken"},
752			LimitToken:      "MaxResults",
753			TruncationToken: "",
754		},
755	}
756
757	if input == nil {
758		input = &GetQueryResultsInput{}
759	}
760
761	output = &GetQueryResultsOutput{}
762	req = c.newRequest(op, input, output)
763	return
764}
765
766// GetQueryResults API operation for Amazon Athena.
767//
768// Streams the results of a single query execution specified by QueryExecutionId
769// from the Athena query results location in Amazon S3. For more information,
770// see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html)
771// in the Amazon Athena User Guide. This request does not execute the query
772// but returns results. Use StartQueryExecution to run a query.
773//
774// To stream query results successfully, the IAM principal with permission to
775// call GetQueryResults also must have permissions to the Amazon S3 GetObject
776// action for the Athena query results location.
777//
778// IAM principals with permission to the Amazon S3 GetObject action for the
779// query results location are able to retrieve query results from Amazon S3
780// even if permission to the GetQueryResults action is denied. To restrict user
781// or role access, ensure that Amazon S3 permissions to the Athena query location
782// are denied.
783//
784// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
785// with awserr.Error's Code and Message methods to get detailed information about
786// the error.
787//
788// See the AWS API reference guide for Amazon Athena's
789// API operation GetQueryResults for usage and error information.
790//
791// Returned Error Codes:
792//   * ErrCodeInternalServerException "InternalServerException"
793//   Indicates a platform issue, which may be due to a transient condition or
794//   outage.
795//
796//   * ErrCodeInvalidRequestException "InvalidRequestException"
797//   Indicates that something is wrong with the input to the request. For example,
798//   a required parameter may be missing or out of range.
799//
800// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults
801func (c *Athena) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) {
802	req, out := c.GetQueryResultsRequest(input)
803	return out, req.Send()
804}
805
806// GetQueryResultsWithContext is the same as GetQueryResults with the addition of
807// the ability to pass a context and additional request options.
808//
809// See GetQueryResults for details on how to use this API operation.
810//
811// The context must be non-nil and will be used for request cancellation. If
812// the context is nil a panic will occur. In the future the SDK may create
813// sub-contexts for http.Requests. See https://golang.org/pkg/context/
814// for more information on using Contexts.
815func (c *Athena) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) {
816	req, out := c.GetQueryResultsRequest(input)
817	req.SetContext(ctx)
818	req.ApplyOptions(opts...)
819	return out, req.Send()
820}
821
822// GetQueryResultsPages iterates over the pages of a GetQueryResults operation,
823// calling the "fn" function with the response data for each page. To stop
824// iterating, return false from the fn function.
825//
826// See GetQueryResults method for more information on how to use this operation.
827//
828// Note: This operation can generate multiple requests to a service.
829//
830//    // Example iterating over at most 3 pages of a GetQueryResults operation.
831//    pageNum := 0
832//    err := client.GetQueryResultsPages(params,
833//        func(page *athena.GetQueryResultsOutput, lastPage bool) bool {
834//            pageNum++
835//            fmt.Println(page)
836//            return pageNum <= 3
837//        })
838//
839func (c *Athena) GetQueryResultsPages(input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool) error {
840	return c.GetQueryResultsPagesWithContext(aws.BackgroundContext(), input, fn)
841}
842
843// GetQueryResultsPagesWithContext same as GetQueryResultsPages except
844// it takes a Context and allows setting request options on the pages.
845//
846// The context must be non-nil and will be used for request cancellation. If
847// the context is nil a panic will occur. In the future the SDK may create
848// sub-contexts for http.Requests. See https://golang.org/pkg/context/
849// for more information on using Contexts.
850func (c *Athena) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool, opts ...request.Option) error {
851	p := request.Pagination{
852		NewRequest: func() (*request.Request, error) {
853			var inCpy *GetQueryResultsInput
854			if input != nil {
855				tmp := *input
856				inCpy = &tmp
857			}
858			req, _ := c.GetQueryResultsRequest(inCpy)
859			req.SetContext(ctx)
860			req.ApplyOptions(opts...)
861			return req, nil
862		},
863	}
864
865	cont := true
866	for p.Next() && cont {
867		cont = fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage())
868	}
869	return p.Err()
870}
871
872const opGetWorkGroup = "GetWorkGroup"
873
874// GetWorkGroupRequest generates a "aws/request.Request" representing the
875// client's request for the GetWorkGroup operation. The "output" return
876// value will be populated with the request's response once the request completes
877// successfully.
878//
879// Use "Send" method on the returned Request to send the API call to the service.
880// the "output" return value is not valid until after Send returns without error.
881//
882// See GetWorkGroup for more information on using the GetWorkGroup
883// API call, and error handling.
884//
885// This method is useful when you want to inject custom logic or configuration
886// into the SDK's request lifecycle. Such as custom headers, or retry logic.
887//
888//
889//    // Example sending a request using the GetWorkGroupRequest method.
890//    req, resp := client.GetWorkGroupRequest(params)
891//
892//    err := req.Send()
893//    if err == nil { // resp is now filled
894//        fmt.Println(resp)
895//    }
896//
897// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetWorkGroup
898func (c *Athena) GetWorkGroupRequest(input *GetWorkGroupInput) (req *request.Request, output *GetWorkGroupOutput) {
899	op := &request.Operation{
900		Name:       opGetWorkGroup,
901		HTTPMethod: "POST",
902		HTTPPath:   "/",
903	}
904
905	if input == nil {
906		input = &GetWorkGroupInput{}
907	}
908
909	output = &GetWorkGroupOutput{}
910	req = c.newRequest(op, input, output)
911	return
912}
913
914// GetWorkGroup API operation for Amazon Athena.
915//
916// Returns information about the workgroup with the specified name.
917//
918// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
919// with awserr.Error's Code and Message methods to get detailed information about
920// the error.
921//
922// See the AWS API reference guide for Amazon Athena's
923// API operation GetWorkGroup for usage and error information.
924//
925// Returned Error Codes:
926//   * ErrCodeInternalServerException "InternalServerException"
927//   Indicates a platform issue, which may be due to a transient condition or
928//   outage.
929//
930//   * ErrCodeInvalidRequestException "InvalidRequestException"
931//   Indicates that something is wrong with the input to the request. For example,
932//   a required parameter may be missing or out of range.
933//
934// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetWorkGroup
935func (c *Athena) GetWorkGroup(input *GetWorkGroupInput) (*GetWorkGroupOutput, error) {
936	req, out := c.GetWorkGroupRequest(input)
937	return out, req.Send()
938}
939
940// GetWorkGroupWithContext is the same as GetWorkGroup with the addition of
941// the ability to pass a context and additional request options.
942//
943// See GetWorkGroup for details on how to use this API operation.
944//
945// The context must be non-nil and will be used for request cancellation. If
946// the context is nil a panic will occur. In the future the SDK may create
947// sub-contexts for http.Requests. See https://golang.org/pkg/context/
948// for more information on using Contexts.
949func (c *Athena) GetWorkGroupWithContext(ctx aws.Context, input *GetWorkGroupInput, opts ...request.Option) (*GetWorkGroupOutput, error) {
950	req, out := c.GetWorkGroupRequest(input)
951	req.SetContext(ctx)
952	req.ApplyOptions(opts...)
953	return out, req.Send()
954}
955
956const opListNamedQueries = "ListNamedQueries"
957
958// ListNamedQueriesRequest generates a "aws/request.Request" representing the
959// client's request for the ListNamedQueries operation. The "output" return
960// value will be populated with the request's response once the request completes
961// successfully.
962//
963// Use "Send" method on the returned Request to send the API call to the service.
964// the "output" return value is not valid until after Send returns without error.
965//
966// See ListNamedQueries for more information on using the ListNamedQueries
967// API call, and error handling.
968//
969// This method is useful when you want to inject custom logic or configuration
970// into the SDK's request lifecycle. Such as custom headers, or retry logic.
971//
972//
973//    // Example sending a request using the ListNamedQueriesRequest method.
974//    req, resp := client.ListNamedQueriesRequest(params)
975//
976//    err := req.Send()
977//    if err == nil { // resp is now filled
978//        fmt.Println(resp)
979//    }
980//
981// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries
982func (c *Athena) ListNamedQueriesRequest(input *ListNamedQueriesInput) (req *request.Request, output *ListNamedQueriesOutput) {
983	op := &request.Operation{
984		Name:       opListNamedQueries,
985		HTTPMethod: "POST",
986		HTTPPath:   "/",
987		Paginator: &request.Paginator{
988			InputTokens:     []string{"NextToken"},
989			OutputTokens:    []string{"NextToken"},
990			LimitToken:      "MaxResults",
991			TruncationToken: "",
992		},
993	}
994
995	if input == nil {
996		input = &ListNamedQueriesInput{}
997	}
998
999	output = &ListNamedQueriesOutput{}
1000	req = c.newRequest(op, input, output)
1001	return
1002}
1003
1004// ListNamedQueries API operation for Amazon Athena.
1005//
1006// Provides a list of available query IDs only for queries saved in the specified
1007// workgroup. Requires that you have access to the workgroup.
1008//
1009// For code samples using the AWS SDK for Java, see Examples and Code Samples
1010// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
1011// Athena User Guide.
1012//
1013// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1014// with awserr.Error's Code and Message methods to get detailed information about
1015// the error.
1016//
1017// See the AWS API reference guide for Amazon Athena's
1018// API operation ListNamedQueries for usage and error information.
1019//
1020// Returned Error Codes:
1021//   * ErrCodeInternalServerException "InternalServerException"
1022//   Indicates a platform issue, which may be due to a transient condition or
1023//   outage.
1024//
1025//   * ErrCodeInvalidRequestException "InvalidRequestException"
1026//   Indicates that something is wrong with the input to the request. For example,
1027//   a required parameter may be missing or out of range.
1028//
1029// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListNamedQueries
1030func (c *Athena) ListNamedQueries(input *ListNamedQueriesInput) (*ListNamedQueriesOutput, error) {
1031	req, out := c.ListNamedQueriesRequest(input)
1032	return out, req.Send()
1033}
1034
1035// ListNamedQueriesWithContext is the same as ListNamedQueries with the addition of
1036// the ability to pass a context and additional request options.
1037//
1038// See ListNamedQueries for details on how to use this API operation.
1039//
1040// The context must be non-nil and will be used for request cancellation. If
1041// the context is nil a panic will occur. In the future the SDK may create
1042// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1043// for more information on using Contexts.
1044func (c *Athena) ListNamedQueriesWithContext(ctx aws.Context, input *ListNamedQueriesInput, opts ...request.Option) (*ListNamedQueriesOutput, error) {
1045	req, out := c.ListNamedQueriesRequest(input)
1046	req.SetContext(ctx)
1047	req.ApplyOptions(opts...)
1048	return out, req.Send()
1049}
1050
1051// ListNamedQueriesPages iterates over the pages of a ListNamedQueries operation,
1052// calling the "fn" function with the response data for each page. To stop
1053// iterating, return false from the fn function.
1054//
1055// See ListNamedQueries method for more information on how to use this operation.
1056//
1057// Note: This operation can generate multiple requests to a service.
1058//
1059//    // Example iterating over at most 3 pages of a ListNamedQueries operation.
1060//    pageNum := 0
1061//    err := client.ListNamedQueriesPages(params,
1062//        func(page *athena.ListNamedQueriesOutput, lastPage bool) bool {
1063//            pageNum++
1064//            fmt.Println(page)
1065//            return pageNum <= 3
1066//        })
1067//
1068func (c *Athena) ListNamedQueriesPages(input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool) error {
1069	return c.ListNamedQueriesPagesWithContext(aws.BackgroundContext(), input, fn)
1070}
1071
1072// ListNamedQueriesPagesWithContext same as ListNamedQueriesPages except
1073// it takes a Context and allows setting request options on the pages.
1074//
1075// The context must be non-nil and will be used for request cancellation. If
1076// the context is nil a panic will occur. In the future the SDK may create
1077// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1078// for more information on using Contexts.
1079func (c *Athena) ListNamedQueriesPagesWithContext(ctx aws.Context, input *ListNamedQueriesInput, fn func(*ListNamedQueriesOutput, bool) bool, opts ...request.Option) error {
1080	p := request.Pagination{
1081		NewRequest: func() (*request.Request, error) {
1082			var inCpy *ListNamedQueriesInput
1083			if input != nil {
1084				tmp := *input
1085				inCpy = &tmp
1086			}
1087			req, _ := c.ListNamedQueriesRequest(inCpy)
1088			req.SetContext(ctx)
1089			req.ApplyOptions(opts...)
1090			return req, nil
1091		},
1092	}
1093
1094	cont := true
1095	for p.Next() && cont {
1096		cont = fn(p.Page().(*ListNamedQueriesOutput), !p.HasNextPage())
1097	}
1098	return p.Err()
1099}
1100
1101const opListQueryExecutions = "ListQueryExecutions"
1102
1103// ListQueryExecutionsRequest generates a "aws/request.Request" representing the
1104// client's request for the ListQueryExecutions operation. The "output" return
1105// value will be populated with the request's response once the request completes
1106// successfully.
1107//
1108// Use "Send" method on the returned Request to send the API call to the service.
1109// the "output" return value is not valid until after Send returns without error.
1110//
1111// See ListQueryExecutions for more information on using the ListQueryExecutions
1112// API call, and error handling.
1113//
1114// This method is useful when you want to inject custom logic or configuration
1115// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1116//
1117//
1118//    // Example sending a request using the ListQueryExecutionsRequest method.
1119//    req, resp := client.ListQueryExecutionsRequest(params)
1120//
1121//    err := req.Send()
1122//    if err == nil { // resp is now filled
1123//        fmt.Println(resp)
1124//    }
1125//
1126// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions
1127func (c *Athena) ListQueryExecutionsRequest(input *ListQueryExecutionsInput) (req *request.Request, output *ListQueryExecutionsOutput) {
1128	op := &request.Operation{
1129		Name:       opListQueryExecutions,
1130		HTTPMethod: "POST",
1131		HTTPPath:   "/",
1132		Paginator: &request.Paginator{
1133			InputTokens:     []string{"NextToken"},
1134			OutputTokens:    []string{"NextToken"},
1135			LimitToken:      "MaxResults",
1136			TruncationToken: "",
1137		},
1138	}
1139
1140	if input == nil {
1141		input = &ListQueryExecutionsInput{}
1142	}
1143
1144	output = &ListQueryExecutionsOutput{}
1145	req = c.newRequest(op, input, output)
1146	return
1147}
1148
1149// ListQueryExecutions API operation for Amazon Athena.
1150//
1151// Provides a list of available query execution IDs for the queries in the specified
1152// workgroup. Requires you to have access to the workgroup in which the queries
1153// ran.
1154//
1155// For code samples using the AWS SDK for Java, see Examples and Code Samples
1156// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
1157// Athena User Guide.
1158//
1159// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1160// with awserr.Error's Code and Message methods to get detailed information about
1161// the error.
1162//
1163// See the AWS API reference guide for Amazon Athena's
1164// API operation ListQueryExecutions for usage and error information.
1165//
1166// Returned Error Codes:
1167//   * ErrCodeInternalServerException "InternalServerException"
1168//   Indicates a platform issue, which may be due to a transient condition or
1169//   outage.
1170//
1171//   * ErrCodeInvalidRequestException "InvalidRequestException"
1172//   Indicates that something is wrong with the input to the request. For example,
1173//   a required parameter may be missing or out of range.
1174//
1175// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListQueryExecutions
1176func (c *Athena) ListQueryExecutions(input *ListQueryExecutionsInput) (*ListQueryExecutionsOutput, error) {
1177	req, out := c.ListQueryExecutionsRequest(input)
1178	return out, req.Send()
1179}
1180
1181// ListQueryExecutionsWithContext is the same as ListQueryExecutions with the addition of
1182// the ability to pass a context and additional request options.
1183//
1184// See ListQueryExecutions for details on how to use this API operation.
1185//
1186// The context must be non-nil and will be used for request cancellation. If
1187// the context is nil a panic will occur. In the future the SDK may create
1188// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1189// for more information on using Contexts.
1190func (c *Athena) ListQueryExecutionsWithContext(ctx aws.Context, input *ListQueryExecutionsInput, opts ...request.Option) (*ListQueryExecutionsOutput, error) {
1191	req, out := c.ListQueryExecutionsRequest(input)
1192	req.SetContext(ctx)
1193	req.ApplyOptions(opts...)
1194	return out, req.Send()
1195}
1196
1197// ListQueryExecutionsPages iterates over the pages of a ListQueryExecutions operation,
1198// calling the "fn" function with the response data for each page. To stop
1199// iterating, return false from the fn function.
1200//
1201// See ListQueryExecutions method for more information on how to use this operation.
1202//
1203// Note: This operation can generate multiple requests to a service.
1204//
1205//    // Example iterating over at most 3 pages of a ListQueryExecutions operation.
1206//    pageNum := 0
1207//    err := client.ListQueryExecutionsPages(params,
1208//        func(page *athena.ListQueryExecutionsOutput, lastPage bool) bool {
1209//            pageNum++
1210//            fmt.Println(page)
1211//            return pageNum <= 3
1212//        })
1213//
1214func (c *Athena) ListQueryExecutionsPages(input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool) error {
1215	return c.ListQueryExecutionsPagesWithContext(aws.BackgroundContext(), input, fn)
1216}
1217
1218// ListQueryExecutionsPagesWithContext same as ListQueryExecutionsPages except
1219// it takes a Context and allows setting request options on the pages.
1220//
1221// The context must be non-nil and will be used for request cancellation. If
1222// the context is nil a panic will occur. In the future the SDK may create
1223// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1224// for more information on using Contexts.
1225func (c *Athena) ListQueryExecutionsPagesWithContext(ctx aws.Context, input *ListQueryExecutionsInput, fn func(*ListQueryExecutionsOutput, bool) bool, opts ...request.Option) error {
1226	p := request.Pagination{
1227		NewRequest: func() (*request.Request, error) {
1228			var inCpy *ListQueryExecutionsInput
1229			if input != nil {
1230				tmp := *input
1231				inCpy = &tmp
1232			}
1233			req, _ := c.ListQueryExecutionsRequest(inCpy)
1234			req.SetContext(ctx)
1235			req.ApplyOptions(opts...)
1236			return req, nil
1237		},
1238	}
1239
1240	cont := true
1241	for p.Next() && cont {
1242		cont = fn(p.Page().(*ListQueryExecutionsOutput), !p.HasNextPage())
1243	}
1244	return p.Err()
1245}
1246
1247const opListTagsForResource = "ListTagsForResource"
1248
1249// ListTagsForResourceRequest generates a "aws/request.Request" representing the
1250// client's request for the ListTagsForResource operation. The "output" return
1251// value will be populated with the request's response once the request completes
1252// successfully.
1253//
1254// Use "Send" method on the returned Request to send the API call to the service.
1255// the "output" return value is not valid until after Send returns without error.
1256//
1257// See ListTagsForResource for more information on using the ListTagsForResource
1258// API call, and error handling.
1259//
1260// This method is useful when you want to inject custom logic or configuration
1261// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1262//
1263//
1264//    // Example sending a request using the ListTagsForResourceRequest method.
1265//    req, resp := client.ListTagsForResourceRequest(params)
1266//
1267//    err := req.Send()
1268//    if err == nil { // resp is now filled
1269//        fmt.Println(resp)
1270//    }
1271//
1272// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTagsForResource
1273func (c *Athena) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
1274	op := &request.Operation{
1275		Name:       opListTagsForResource,
1276		HTTPMethod: "POST",
1277		HTTPPath:   "/",
1278	}
1279
1280	if input == nil {
1281		input = &ListTagsForResourceInput{}
1282	}
1283
1284	output = &ListTagsForResourceOutput{}
1285	req = c.newRequest(op, input, output)
1286	return
1287}
1288
1289// ListTagsForResource API operation for Amazon Athena.
1290//
1291// Lists the tags associated with this workgroup.
1292//
1293// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1294// with awserr.Error's Code and Message methods to get detailed information about
1295// the error.
1296//
1297// See the AWS API reference guide for Amazon Athena's
1298// API operation ListTagsForResource for usage and error information.
1299//
1300// Returned Error Codes:
1301//   * ErrCodeInternalServerException "InternalServerException"
1302//   Indicates a platform issue, which may be due to a transient condition or
1303//   outage.
1304//
1305//   * ErrCodeInvalidRequestException "InvalidRequestException"
1306//   Indicates that something is wrong with the input to the request. For example,
1307//   a required parameter may be missing or out of range.
1308//
1309//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1310//   A resource, such as a workgroup, was not found.
1311//
1312// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListTagsForResource
1313func (c *Athena) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
1314	req, out := c.ListTagsForResourceRequest(input)
1315	return out, req.Send()
1316}
1317
1318// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
1319// the ability to pass a context and additional request options.
1320//
1321// See ListTagsForResource for details on how to use this API operation.
1322//
1323// The context must be non-nil and will be used for request cancellation. If
1324// the context is nil a panic will occur. In the future the SDK may create
1325// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1326// for more information on using Contexts.
1327func (c *Athena) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
1328	req, out := c.ListTagsForResourceRequest(input)
1329	req.SetContext(ctx)
1330	req.ApplyOptions(opts...)
1331	return out, req.Send()
1332}
1333
1334const opListWorkGroups = "ListWorkGroups"
1335
1336// ListWorkGroupsRequest generates a "aws/request.Request" representing the
1337// client's request for the ListWorkGroups operation. The "output" return
1338// value will be populated with the request's response once the request completes
1339// successfully.
1340//
1341// Use "Send" method on the returned Request to send the API call to the service.
1342// the "output" return value is not valid until after Send returns without error.
1343//
1344// See ListWorkGroups for more information on using the ListWorkGroups
1345// API call, and error handling.
1346//
1347// This method is useful when you want to inject custom logic or configuration
1348// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1349//
1350//
1351//    // Example sending a request using the ListWorkGroupsRequest method.
1352//    req, resp := client.ListWorkGroupsRequest(params)
1353//
1354//    err := req.Send()
1355//    if err == nil { // resp is now filled
1356//        fmt.Println(resp)
1357//    }
1358//
1359// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListWorkGroups
1360func (c *Athena) ListWorkGroupsRequest(input *ListWorkGroupsInput) (req *request.Request, output *ListWorkGroupsOutput) {
1361	op := &request.Operation{
1362		Name:       opListWorkGroups,
1363		HTTPMethod: "POST",
1364		HTTPPath:   "/",
1365		Paginator: &request.Paginator{
1366			InputTokens:     []string{"NextToken"},
1367			OutputTokens:    []string{"NextToken"},
1368			LimitToken:      "MaxResults",
1369			TruncationToken: "",
1370		},
1371	}
1372
1373	if input == nil {
1374		input = &ListWorkGroupsInput{}
1375	}
1376
1377	output = &ListWorkGroupsOutput{}
1378	req = c.newRequest(op, input, output)
1379	return
1380}
1381
1382// ListWorkGroups API operation for Amazon Athena.
1383//
1384// Lists available workgroups for the account.
1385//
1386// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1387// with awserr.Error's Code and Message methods to get detailed information about
1388// the error.
1389//
1390// See the AWS API reference guide for Amazon Athena's
1391// API operation ListWorkGroups for usage and error information.
1392//
1393// Returned Error Codes:
1394//   * ErrCodeInternalServerException "InternalServerException"
1395//   Indicates a platform issue, which may be due to a transient condition or
1396//   outage.
1397//
1398//   * ErrCodeInvalidRequestException "InvalidRequestException"
1399//   Indicates that something is wrong with the input to the request. For example,
1400//   a required parameter may be missing or out of range.
1401//
1402// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/ListWorkGroups
1403func (c *Athena) ListWorkGroups(input *ListWorkGroupsInput) (*ListWorkGroupsOutput, error) {
1404	req, out := c.ListWorkGroupsRequest(input)
1405	return out, req.Send()
1406}
1407
1408// ListWorkGroupsWithContext is the same as ListWorkGroups with the addition of
1409// the ability to pass a context and additional request options.
1410//
1411// See ListWorkGroups for details on how to use this API operation.
1412//
1413// The context must be non-nil and will be used for request cancellation. If
1414// the context is nil a panic will occur. In the future the SDK may create
1415// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1416// for more information on using Contexts.
1417func (c *Athena) ListWorkGroupsWithContext(ctx aws.Context, input *ListWorkGroupsInput, opts ...request.Option) (*ListWorkGroupsOutput, error) {
1418	req, out := c.ListWorkGroupsRequest(input)
1419	req.SetContext(ctx)
1420	req.ApplyOptions(opts...)
1421	return out, req.Send()
1422}
1423
1424// ListWorkGroupsPages iterates over the pages of a ListWorkGroups operation,
1425// calling the "fn" function with the response data for each page. To stop
1426// iterating, return false from the fn function.
1427//
1428// See ListWorkGroups method for more information on how to use this operation.
1429//
1430// Note: This operation can generate multiple requests to a service.
1431//
1432//    // Example iterating over at most 3 pages of a ListWorkGroups operation.
1433//    pageNum := 0
1434//    err := client.ListWorkGroupsPages(params,
1435//        func(page *athena.ListWorkGroupsOutput, lastPage bool) bool {
1436//            pageNum++
1437//            fmt.Println(page)
1438//            return pageNum <= 3
1439//        })
1440//
1441func (c *Athena) ListWorkGroupsPages(input *ListWorkGroupsInput, fn func(*ListWorkGroupsOutput, bool) bool) error {
1442	return c.ListWorkGroupsPagesWithContext(aws.BackgroundContext(), input, fn)
1443}
1444
1445// ListWorkGroupsPagesWithContext same as ListWorkGroupsPages except
1446// it takes a Context and allows setting request options on the pages.
1447//
1448// The context must be non-nil and will be used for request cancellation. If
1449// the context is nil a panic will occur. In the future the SDK may create
1450// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1451// for more information on using Contexts.
1452func (c *Athena) ListWorkGroupsPagesWithContext(ctx aws.Context, input *ListWorkGroupsInput, fn func(*ListWorkGroupsOutput, bool) bool, opts ...request.Option) error {
1453	p := request.Pagination{
1454		NewRequest: func() (*request.Request, error) {
1455			var inCpy *ListWorkGroupsInput
1456			if input != nil {
1457				tmp := *input
1458				inCpy = &tmp
1459			}
1460			req, _ := c.ListWorkGroupsRequest(inCpy)
1461			req.SetContext(ctx)
1462			req.ApplyOptions(opts...)
1463			return req, nil
1464		},
1465	}
1466
1467	cont := true
1468	for p.Next() && cont {
1469		cont = fn(p.Page().(*ListWorkGroupsOutput), !p.HasNextPage())
1470	}
1471	return p.Err()
1472}
1473
1474const opStartQueryExecution = "StartQueryExecution"
1475
1476// StartQueryExecutionRequest generates a "aws/request.Request" representing the
1477// client's request for the StartQueryExecution operation. The "output" return
1478// value will be populated with the request's response once the request completes
1479// successfully.
1480//
1481// Use "Send" method on the returned Request to send the API call to the service.
1482// the "output" return value is not valid until after Send returns without error.
1483//
1484// See StartQueryExecution for more information on using the StartQueryExecution
1485// API call, and error handling.
1486//
1487// This method is useful when you want to inject custom logic or configuration
1488// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1489//
1490//
1491//    // Example sending a request using the StartQueryExecutionRequest method.
1492//    req, resp := client.StartQueryExecutionRequest(params)
1493//
1494//    err := req.Send()
1495//    if err == nil { // resp is now filled
1496//        fmt.Println(resp)
1497//    }
1498//
1499// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution
1500func (c *Athena) StartQueryExecutionRequest(input *StartQueryExecutionInput) (req *request.Request, output *StartQueryExecutionOutput) {
1501	op := &request.Operation{
1502		Name:       opStartQueryExecution,
1503		HTTPMethod: "POST",
1504		HTTPPath:   "/",
1505	}
1506
1507	if input == nil {
1508		input = &StartQueryExecutionInput{}
1509	}
1510
1511	output = &StartQueryExecutionOutput{}
1512	req = c.newRequest(op, input, output)
1513	return
1514}
1515
1516// StartQueryExecution API operation for Amazon Athena.
1517//
1518// Runs the SQL query statements contained in the Query. Requires you to have
1519// access to the workgroup in which the query ran.
1520//
1521// For code samples using the AWS SDK for Java, see Examples and Code Samples
1522// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
1523// Athena User Guide.
1524//
1525// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1526// with awserr.Error's Code and Message methods to get detailed information about
1527// the error.
1528//
1529// See the AWS API reference guide for Amazon Athena's
1530// API operation StartQueryExecution for usage and error information.
1531//
1532// Returned Error Codes:
1533//   * ErrCodeInternalServerException "InternalServerException"
1534//   Indicates a platform issue, which may be due to a transient condition or
1535//   outage.
1536//
1537//   * ErrCodeInvalidRequestException "InvalidRequestException"
1538//   Indicates that something is wrong with the input to the request. For example,
1539//   a required parameter may be missing or out of range.
1540//
1541//   * ErrCodeTooManyRequestsException "TooManyRequestsException"
1542//   Indicates that the request was throttled.
1543//
1544// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution
1545func (c *Athena) StartQueryExecution(input *StartQueryExecutionInput) (*StartQueryExecutionOutput, error) {
1546	req, out := c.StartQueryExecutionRequest(input)
1547	return out, req.Send()
1548}
1549
1550// StartQueryExecutionWithContext is the same as StartQueryExecution with the addition of
1551// the ability to pass a context and additional request options.
1552//
1553// See StartQueryExecution for details on how to use this API operation.
1554//
1555// The context must be non-nil and will be used for request cancellation. If
1556// the context is nil a panic will occur. In the future the SDK may create
1557// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1558// for more information on using Contexts.
1559func (c *Athena) StartQueryExecutionWithContext(ctx aws.Context, input *StartQueryExecutionInput, opts ...request.Option) (*StartQueryExecutionOutput, error) {
1560	req, out := c.StartQueryExecutionRequest(input)
1561	req.SetContext(ctx)
1562	req.ApplyOptions(opts...)
1563	return out, req.Send()
1564}
1565
1566const opStopQueryExecution = "StopQueryExecution"
1567
1568// StopQueryExecutionRequest generates a "aws/request.Request" representing the
1569// client's request for the StopQueryExecution operation. The "output" return
1570// value will be populated with the request's response once the request completes
1571// successfully.
1572//
1573// Use "Send" method on the returned Request to send the API call to the service.
1574// the "output" return value is not valid until after Send returns without error.
1575//
1576// See StopQueryExecution for more information on using the StopQueryExecution
1577// API call, and error handling.
1578//
1579// This method is useful when you want to inject custom logic or configuration
1580// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1581//
1582//
1583//    // Example sending a request using the StopQueryExecutionRequest method.
1584//    req, resp := client.StopQueryExecutionRequest(params)
1585//
1586//    err := req.Send()
1587//    if err == nil { // resp is now filled
1588//        fmt.Println(resp)
1589//    }
1590//
1591// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution
1592func (c *Athena) StopQueryExecutionRequest(input *StopQueryExecutionInput) (req *request.Request, output *StopQueryExecutionOutput) {
1593	op := &request.Operation{
1594		Name:       opStopQueryExecution,
1595		HTTPMethod: "POST",
1596		HTTPPath:   "/",
1597	}
1598
1599	if input == nil {
1600		input = &StopQueryExecutionInput{}
1601	}
1602
1603	output = &StopQueryExecutionOutput{}
1604	req = c.newRequest(op, input, output)
1605	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1606	return
1607}
1608
1609// StopQueryExecution API operation for Amazon Athena.
1610//
1611// Stops a query execution. Requires you to have access to the workgroup in
1612// which the query ran.
1613//
1614// For code samples using the AWS SDK for Java, see Examples and Code Samples
1615// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
1616// Athena User Guide.
1617//
1618// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1619// with awserr.Error's Code and Message methods to get detailed information about
1620// the error.
1621//
1622// See the AWS API reference guide for Amazon Athena's
1623// API operation StopQueryExecution for usage and error information.
1624//
1625// Returned Error Codes:
1626//   * ErrCodeInternalServerException "InternalServerException"
1627//   Indicates a platform issue, which may be due to a transient condition or
1628//   outage.
1629//
1630//   * ErrCodeInvalidRequestException "InvalidRequestException"
1631//   Indicates that something is wrong with the input to the request. For example,
1632//   a required parameter may be missing or out of range.
1633//
1634// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StopQueryExecution
1635func (c *Athena) StopQueryExecution(input *StopQueryExecutionInput) (*StopQueryExecutionOutput, error) {
1636	req, out := c.StopQueryExecutionRequest(input)
1637	return out, req.Send()
1638}
1639
1640// StopQueryExecutionWithContext is the same as StopQueryExecution with the addition of
1641// the ability to pass a context and additional request options.
1642//
1643// See StopQueryExecution for details on how to use this API operation.
1644//
1645// The context must be non-nil and will be used for request cancellation. If
1646// the context is nil a panic will occur. In the future the SDK may create
1647// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1648// for more information on using Contexts.
1649func (c *Athena) StopQueryExecutionWithContext(ctx aws.Context, input *StopQueryExecutionInput, opts ...request.Option) (*StopQueryExecutionOutput, error) {
1650	req, out := c.StopQueryExecutionRequest(input)
1651	req.SetContext(ctx)
1652	req.ApplyOptions(opts...)
1653	return out, req.Send()
1654}
1655
1656const opTagResource = "TagResource"
1657
1658// TagResourceRequest generates a "aws/request.Request" representing the
1659// client's request for the TagResource operation. The "output" return
1660// value will be populated with the request's response once the request completes
1661// successfully.
1662//
1663// Use "Send" method on the returned Request to send the API call to the service.
1664// the "output" return value is not valid until after Send returns without error.
1665//
1666// See TagResource for more information on using the TagResource
1667// API call, and error handling.
1668//
1669// This method is useful when you want to inject custom logic or configuration
1670// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1671//
1672//
1673//    // Example sending a request using the TagResourceRequest method.
1674//    req, resp := client.TagResourceRequest(params)
1675//
1676//    err := req.Send()
1677//    if err == nil { // resp is now filled
1678//        fmt.Println(resp)
1679//    }
1680//
1681// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/TagResource
1682func (c *Athena) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
1683	op := &request.Operation{
1684		Name:       opTagResource,
1685		HTTPMethod: "POST",
1686		HTTPPath:   "/",
1687	}
1688
1689	if input == nil {
1690		input = &TagResourceInput{}
1691	}
1692
1693	output = &TagResourceOutput{}
1694	req = c.newRequest(op, input, output)
1695	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1696	return
1697}
1698
1699// TagResource API operation for Amazon Athena.
1700//
1701// Adds one or more tags to the resource, such as a workgroup. A tag is a label
1702// that you assign to an AWS Athena resource (a workgroup). Each tag consists
1703// of a key and an optional value, both of which you define. Tags enable you
1704// to categorize resources (workgroups) in Athena, for example, by purpose,
1705// owner, or environment. Use a consistent set of tag keys to make it easier
1706// to search and filter workgroups in your account. For best practices, see
1707// AWS Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/).
1708// The key length is from 1 (minimum) to 128 (maximum) Unicode characters in
1709// UTF-8. The tag value length is from 0 (minimum) to 256 (maximum) Unicode
1710// characters in UTF-8. You can use letters and numbers representable in UTF-8,
1711// and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive.
1712// Tag keys must be unique per resource. If you specify more than one, separate
1713// them by commas.
1714//
1715// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1716// with awserr.Error's Code and Message methods to get detailed information about
1717// the error.
1718//
1719// See the AWS API reference guide for Amazon Athena's
1720// API operation TagResource for usage and error information.
1721//
1722// Returned Error Codes:
1723//   * ErrCodeInternalServerException "InternalServerException"
1724//   Indicates a platform issue, which may be due to a transient condition or
1725//   outage.
1726//
1727//   * ErrCodeInvalidRequestException "InvalidRequestException"
1728//   Indicates that something is wrong with the input to the request. For example,
1729//   a required parameter may be missing or out of range.
1730//
1731//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1732//   A resource, such as a workgroup, was not found.
1733//
1734// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/TagResource
1735func (c *Athena) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
1736	req, out := c.TagResourceRequest(input)
1737	return out, req.Send()
1738}
1739
1740// TagResourceWithContext is the same as TagResource with the addition of
1741// the ability to pass a context and additional request options.
1742//
1743// See TagResource for details on how to use this API operation.
1744//
1745// The context must be non-nil and will be used for request cancellation. If
1746// the context is nil a panic will occur. In the future the SDK may create
1747// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1748// for more information on using Contexts.
1749func (c *Athena) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
1750	req, out := c.TagResourceRequest(input)
1751	req.SetContext(ctx)
1752	req.ApplyOptions(opts...)
1753	return out, req.Send()
1754}
1755
1756const opUntagResource = "UntagResource"
1757
1758// UntagResourceRequest generates a "aws/request.Request" representing the
1759// client's request for the UntagResource operation. The "output" return
1760// value will be populated with the request's response once the request completes
1761// successfully.
1762//
1763// Use "Send" method on the returned Request to send the API call to the service.
1764// the "output" return value is not valid until after Send returns without error.
1765//
1766// See UntagResource for more information on using the UntagResource
1767// API call, and error handling.
1768//
1769// This method is useful when you want to inject custom logic or configuration
1770// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1771//
1772//
1773//    // Example sending a request using the UntagResourceRequest method.
1774//    req, resp := client.UntagResourceRequest(params)
1775//
1776//    err := req.Send()
1777//    if err == nil { // resp is now filled
1778//        fmt.Println(resp)
1779//    }
1780//
1781// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UntagResource
1782func (c *Athena) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
1783	op := &request.Operation{
1784		Name:       opUntagResource,
1785		HTTPMethod: "POST",
1786		HTTPPath:   "/",
1787	}
1788
1789	if input == nil {
1790		input = &UntagResourceInput{}
1791	}
1792
1793	output = &UntagResourceOutput{}
1794	req = c.newRequest(op, input, output)
1795	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1796	return
1797}
1798
1799// UntagResource API operation for Amazon Athena.
1800//
1801// Removes one or more tags from the workgroup resource. Takes as an input a
1802// list of TagKey Strings separated by commas, and removes their tags at the
1803// same time.
1804//
1805// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1806// with awserr.Error's Code and Message methods to get detailed information about
1807// the error.
1808//
1809// See the AWS API reference guide for Amazon Athena's
1810// API operation UntagResource for usage and error information.
1811//
1812// Returned Error Codes:
1813//   * ErrCodeInternalServerException "InternalServerException"
1814//   Indicates a platform issue, which may be due to a transient condition or
1815//   outage.
1816//
1817//   * ErrCodeInvalidRequestException "InvalidRequestException"
1818//   Indicates that something is wrong with the input to the request. For example,
1819//   a required parameter may be missing or out of range.
1820//
1821//   * ErrCodeResourceNotFoundException "ResourceNotFoundException"
1822//   A resource, such as a workgroup, was not found.
1823//
1824// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UntagResource
1825func (c *Athena) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
1826	req, out := c.UntagResourceRequest(input)
1827	return out, req.Send()
1828}
1829
1830// UntagResourceWithContext is the same as UntagResource with the addition of
1831// the ability to pass a context and additional request options.
1832//
1833// See UntagResource for details on how to use this API operation.
1834//
1835// The context must be non-nil and will be used for request cancellation. If
1836// the context is nil a panic will occur. In the future the SDK may create
1837// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1838// for more information on using Contexts.
1839func (c *Athena) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
1840	req, out := c.UntagResourceRequest(input)
1841	req.SetContext(ctx)
1842	req.ApplyOptions(opts...)
1843	return out, req.Send()
1844}
1845
1846const opUpdateWorkGroup = "UpdateWorkGroup"
1847
1848// UpdateWorkGroupRequest generates a "aws/request.Request" representing the
1849// client's request for the UpdateWorkGroup operation. The "output" return
1850// value will be populated with the request's response once the request completes
1851// successfully.
1852//
1853// Use "Send" method on the returned Request to send the API call to the service.
1854// the "output" return value is not valid until after Send returns without error.
1855//
1856// See UpdateWorkGroup for more information on using the UpdateWorkGroup
1857// API call, and error handling.
1858//
1859// This method is useful when you want to inject custom logic or configuration
1860// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1861//
1862//
1863//    // Example sending a request using the UpdateWorkGroupRequest method.
1864//    req, resp := client.UpdateWorkGroupRequest(params)
1865//
1866//    err := req.Send()
1867//    if err == nil { // resp is now filled
1868//        fmt.Println(resp)
1869//    }
1870//
1871// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateWorkGroup
1872func (c *Athena) UpdateWorkGroupRequest(input *UpdateWorkGroupInput) (req *request.Request, output *UpdateWorkGroupOutput) {
1873	op := &request.Operation{
1874		Name:       opUpdateWorkGroup,
1875		HTTPMethod: "POST",
1876		HTTPPath:   "/",
1877	}
1878
1879	if input == nil {
1880		input = &UpdateWorkGroupInput{}
1881	}
1882
1883	output = &UpdateWorkGroupOutput{}
1884	req = c.newRequest(op, input, output)
1885	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1886	return
1887}
1888
1889// UpdateWorkGroup API operation for Amazon Athena.
1890//
1891// Updates the workgroup with the specified name. The workgroup's name cannot
1892// be changed.
1893//
1894// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1895// with awserr.Error's Code and Message methods to get detailed information about
1896// the error.
1897//
1898// See the AWS API reference guide for Amazon Athena's
1899// API operation UpdateWorkGroup for usage and error information.
1900//
1901// Returned Error Codes:
1902//   * ErrCodeInternalServerException "InternalServerException"
1903//   Indicates a platform issue, which may be due to a transient condition or
1904//   outage.
1905//
1906//   * ErrCodeInvalidRequestException "InvalidRequestException"
1907//   Indicates that something is wrong with the input to the request. For example,
1908//   a required parameter may be missing or out of range.
1909//
1910// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/UpdateWorkGroup
1911func (c *Athena) UpdateWorkGroup(input *UpdateWorkGroupInput) (*UpdateWorkGroupOutput, error) {
1912	req, out := c.UpdateWorkGroupRequest(input)
1913	return out, req.Send()
1914}
1915
1916// UpdateWorkGroupWithContext is the same as UpdateWorkGroup with the addition of
1917// the ability to pass a context and additional request options.
1918//
1919// See UpdateWorkGroup for details on how to use this API operation.
1920//
1921// The context must be non-nil and will be used for request cancellation. If
1922// the context is nil a panic will occur. In the future the SDK may create
1923// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1924// for more information on using Contexts.
1925func (c *Athena) UpdateWorkGroupWithContext(ctx aws.Context, input *UpdateWorkGroupInput, opts ...request.Option) (*UpdateWorkGroupOutput, error) {
1926	req, out := c.UpdateWorkGroupRequest(input)
1927	req.SetContext(ctx)
1928	req.ApplyOptions(opts...)
1929	return out, req.Send()
1930}
1931
1932type BatchGetNamedQueryInput struct {
1933	_ struct{} `type:"structure"`
1934
1935	// An array of query IDs.
1936	//
1937	// NamedQueryIds is a required field
1938	NamedQueryIds []*string `min:"1" type:"list" required:"true"`
1939}
1940
1941// String returns the string representation
1942func (s BatchGetNamedQueryInput) String() string {
1943	return awsutil.Prettify(s)
1944}
1945
1946// GoString returns the string representation
1947func (s BatchGetNamedQueryInput) GoString() string {
1948	return s.String()
1949}
1950
1951// Validate inspects the fields of the type to determine if they are valid.
1952func (s *BatchGetNamedQueryInput) Validate() error {
1953	invalidParams := request.ErrInvalidParams{Context: "BatchGetNamedQueryInput"}
1954	if s.NamedQueryIds == nil {
1955		invalidParams.Add(request.NewErrParamRequired("NamedQueryIds"))
1956	}
1957	if s.NamedQueryIds != nil && len(s.NamedQueryIds) < 1 {
1958		invalidParams.Add(request.NewErrParamMinLen("NamedQueryIds", 1))
1959	}
1960
1961	if invalidParams.Len() > 0 {
1962		return invalidParams
1963	}
1964	return nil
1965}
1966
1967// SetNamedQueryIds sets the NamedQueryIds field's value.
1968func (s *BatchGetNamedQueryInput) SetNamedQueryIds(v []*string) *BatchGetNamedQueryInput {
1969	s.NamedQueryIds = v
1970	return s
1971}
1972
1973type BatchGetNamedQueryOutput struct {
1974	_ struct{} `type:"structure"`
1975
1976	// Information about the named query IDs submitted.
1977	NamedQueries []*NamedQuery `type:"list"`
1978
1979	// Information about provided query IDs.
1980	UnprocessedNamedQueryIds []*UnprocessedNamedQueryId `type:"list"`
1981}
1982
1983// String returns the string representation
1984func (s BatchGetNamedQueryOutput) String() string {
1985	return awsutil.Prettify(s)
1986}
1987
1988// GoString returns the string representation
1989func (s BatchGetNamedQueryOutput) GoString() string {
1990	return s.String()
1991}
1992
1993// SetNamedQueries sets the NamedQueries field's value.
1994func (s *BatchGetNamedQueryOutput) SetNamedQueries(v []*NamedQuery) *BatchGetNamedQueryOutput {
1995	s.NamedQueries = v
1996	return s
1997}
1998
1999// SetUnprocessedNamedQueryIds sets the UnprocessedNamedQueryIds field's value.
2000func (s *BatchGetNamedQueryOutput) SetUnprocessedNamedQueryIds(v []*UnprocessedNamedQueryId) *BatchGetNamedQueryOutput {
2001	s.UnprocessedNamedQueryIds = v
2002	return s
2003}
2004
2005type BatchGetQueryExecutionInput struct {
2006	_ struct{} `type:"structure"`
2007
2008	// An array of query execution IDs.
2009	//
2010	// QueryExecutionIds is a required field
2011	QueryExecutionIds []*string `min:"1" type:"list" required:"true"`
2012}
2013
2014// String returns the string representation
2015func (s BatchGetQueryExecutionInput) String() string {
2016	return awsutil.Prettify(s)
2017}
2018
2019// GoString returns the string representation
2020func (s BatchGetQueryExecutionInput) GoString() string {
2021	return s.String()
2022}
2023
2024// Validate inspects the fields of the type to determine if they are valid.
2025func (s *BatchGetQueryExecutionInput) Validate() error {
2026	invalidParams := request.ErrInvalidParams{Context: "BatchGetQueryExecutionInput"}
2027	if s.QueryExecutionIds == nil {
2028		invalidParams.Add(request.NewErrParamRequired("QueryExecutionIds"))
2029	}
2030	if s.QueryExecutionIds != nil && len(s.QueryExecutionIds) < 1 {
2031		invalidParams.Add(request.NewErrParamMinLen("QueryExecutionIds", 1))
2032	}
2033
2034	if invalidParams.Len() > 0 {
2035		return invalidParams
2036	}
2037	return nil
2038}
2039
2040// SetQueryExecutionIds sets the QueryExecutionIds field's value.
2041func (s *BatchGetQueryExecutionInput) SetQueryExecutionIds(v []*string) *BatchGetQueryExecutionInput {
2042	s.QueryExecutionIds = v
2043	return s
2044}
2045
2046type BatchGetQueryExecutionOutput struct {
2047	_ struct{} `type:"structure"`
2048
2049	// Information about a query execution.
2050	QueryExecutions []*QueryExecution `type:"list"`
2051
2052	// Information about the query executions that failed to run.
2053	UnprocessedQueryExecutionIds []*UnprocessedQueryExecutionId `type:"list"`
2054}
2055
2056// String returns the string representation
2057func (s BatchGetQueryExecutionOutput) String() string {
2058	return awsutil.Prettify(s)
2059}
2060
2061// GoString returns the string representation
2062func (s BatchGetQueryExecutionOutput) GoString() string {
2063	return s.String()
2064}
2065
2066// SetQueryExecutions sets the QueryExecutions field's value.
2067func (s *BatchGetQueryExecutionOutput) SetQueryExecutions(v []*QueryExecution) *BatchGetQueryExecutionOutput {
2068	s.QueryExecutions = v
2069	return s
2070}
2071
2072// SetUnprocessedQueryExecutionIds sets the UnprocessedQueryExecutionIds field's value.
2073func (s *BatchGetQueryExecutionOutput) SetUnprocessedQueryExecutionIds(v []*UnprocessedQueryExecutionId) *BatchGetQueryExecutionOutput {
2074	s.UnprocessedQueryExecutionIds = v
2075	return s
2076}
2077
2078// Information about the columns in a query execution result.
2079type ColumnInfo struct {
2080	_ struct{} `type:"structure"`
2081
2082	// Indicates whether values in the column are case-sensitive.
2083	CaseSensitive *bool `type:"boolean"`
2084
2085	// The catalog to which the query results belong.
2086	CatalogName *string `type:"string"`
2087
2088	// A column label.
2089	Label *string `type:"string"`
2090
2091	// The name of the column.
2092	//
2093	// Name is a required field
2094	Name *string `type:"string" required:"true"`
2095
2096	// Indicates the column's nullable status.
2097	Nullable *string `type:"string" enum:"ColumnNullable"`
2098
2099	// For DECIMAL data types, specifies the total number of digits, up to 38. For
2100	// performance reasons, we recommend up to 18 digits.
2101	Precision *int64 `type:"integer"`
2102
2103	// For DECIMAL data types, specifies the total number of digits in the fractional
2104	// part of the value. Defaults to 0.
2105	Scale *int64 `type:"integer"`
2106
2107	// The schema name (database name) to which the query results belong.
2108	SchemaName *string `type:"string"`
2109
2110	// The table name for the query results.
2111	TableName *string `type:"string"`
2112
2113	// The data type of the column.
2114	//
2115	// Type is a required field
2116	Type *string `type:"string" required:"true"`
2117}
2118
2119// String returns the string representation
2120func (s ColumnInfo) String() string {
2121	return awsutil.Prettify(s)
2122}
2123
2124// GoString returns the string representation
2125func (s ColumnInfo) GoString() string {
2126	return s.String()
2127}
2128
2129// SetCaseSensitive sets the CaseSensitive field's value.
2130func (s *ColumnInfo) SetCaseSensitive(v bool) *ColumnInfo {
2131	s.CaseSensitive = &v
2132	return s
2133}
2134
2135// SetCatalogName sets the CatalogName field's value.
2136func (s *ColumnInfo) SetCatalogName(v string) *ColumnInfo {
2137	s.CatalogName = &v
2138	return s
2139}
2140
2141// SetLabel sets the Label field's value.
2142func (s *ColumnInfo) SetLabel(v string) *ColumnInfo {
2143	s.Label = &v
2144	return s
2145}
2146
2147// SetName sets the Name field's value.
2148func (s *ColumnInfo) SetName(v string) *ColumnInfo {
2149	s.Name = &v
2150	return s
2151}
2152
2153// SetNullable sets the Nullable field's value.
2154func (s *ColumnInfo) SetNullable(v string) *ColumnInfo {
2155	s.Nullable = &v
2156	return s
2157}
2158
2159// SetPrecision sets the Precision field's value.
2160func (s *ColumnInfo) SetPrecision(v int64) *ColumnInfo {
2161	s.Precision = &v
2162	return s
2163}
2164
2165// SetScale sets the Scale field's value.
2166func (s *ColumnInfo) SetScale(v int64) *ColumnInfo {
2167	s.Scale = &v
2168	return s
2169}
2170
2171// SetSchemaName sets the SchemaName field's value.
2172func (s *ColumnInfo) SetSchemaName(v string) *ColumnInfo {
2173	s.SchemaName = &v
2174	return s
2175}
2176
2177// SetTableName sets the TableName field's value.
2178func (s *ColumnInfo) SetTableName(v string) *ColumnInfo {
2179	s.TableName = &v
2180	return s
2181}
2182
2183// SetType sets the Type field's value.
2184func (s *ColumnInfo) SetType(v string) *ColumnInfo {
2185	s.Type = &v
2186	return s
2187}
2188
2189type CreateNamedQueryInput struct {
2190	_ struct{} `type:"structure"`
2191
2192	// A unique case-sensitive string used to ensure the request to create the query
2193	// is idempotent (executes only once). If another CreateNamedQuery request is
2194	// received, the same response is returned and another query is not created.
2195	// If a parameter has changed, for example, the QueryString, an error is returned.
2196	//
2197	// This token is listed as not required because AWS SDKs (for example the AWS
2198	// SDK for Java) auto-generate the token for users. If you are not using the
2199	// AWS SDK or the AWS CLI, you must provide this token or the action will fail.
2200	ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"`
2201
2202	// The database to which the query belongs.
2203	//
2204	// Database is a required field
2205	Database *string `min:"1" type:"string" required:"true"`
2206
2207	// The query description.
2208	Description *string `min:"1" type:"string"`
2209
2210	// The query name.
2211	//
2212	// Name is a required field
2213	Name *string `min:"1" type:"string" required:"true"`
2214
2215	// The contents of the query with all query statements.
2216	//
2217	// QueryString is a required field
2218	QueryString *string `min:"1" type:"string" required:"true"`
2219
2220	// The name of the workgroup in which the named query is being created.
2221	WorkGroup *string `type:"string"`
2222}
2223
2224// String returns the string representation
2225func (s CreateNamedQueryInput) String() string {
2226	return awsutil.Prettify(s)
2227}
2228
2229// GoString returns the string representation
2230func (s CreateNamedQueryInput) GoString() string {
2231	return s.String()
2232}
2233
2234// Validate inspects the fields of the type to determine if they are valid.
2235func (s *CreateNamedQueryInput) Validate() error {
2236	invalidParams := request.ErrInvalidParams{Context: "CreateNamedQueryInput"}
2237	if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 {
2238		invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32))
2239	}
2240	if s.Database == nil {
2241		invalidParams.Add(request.NewErrParamRequired("Database"))
2242	}
2243	if s.Database != nil && len(*s.Database) < 1 {
2244		invalidParams.Add(request.NewErrParamMinLen("Database", 1))
2245	}
2246	if s.Description != nil && len(*s.Description) < 1 {
2247		invalidParams.Add(request.NewErrParamMinLen("Description", 1))
2248	}
2249	if s.Name == nil {
2250		invalidParams.Add(request.NewErrParamRequired("Name"))
2251	}
2252	if s.Name != nil && len(*s.Name) < 1 {
2253		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
2254	}
2255	if s.QueryString == nil {
2256		invalidParams.Add(request.NewErrParamRequired("QueryString"))
2257	}
2258	if s.QueryString != nil && len(*s.QueryString) < 1 {
2259		invalidParams.Add(request.NewErrParamMinLen("QueryString", 1))
2260	}
2261
2262	if invalidParams.Len() > 0 {
2263		return invalidParams
2264	}
2265	return nil
2266}
2267
2268// SetClientRequestToken sets the ClientRequestToken field's value.
2269func (s *CreateNamedQueryInput) SetClientRequestToken(v string) *CreateNamedQueryInput {
2270	s.ClientRequestToken = &v
2271	return s
2272}
2273
2274// SetDatabase sets the Database field's value.
2275func (s *CreateNamedQueryInput) SetDatabase(v string) *CreateNamedQueryInput {
2276	s.Database = &v
2277	return s
2278}
2279
2280// SetDescription sets the Description field's value.
2281func (s *CreateNamedQueryInput) SetDescription(v string) *CreateNamedQueryInput {
2282	s.Description = &v
2283	return s
2284}
2285
2286// SetName sets the Name field's value.
2287func (s *CreateNamedQueryInput) SetName(v string) *CreateNamedQueryInput {
2288	s.Name = &v
2289	return s
2290}
2291
2292// SetQueryString sets the QueryString field's value.
2293func (s *CreateNamedQueryInput) SetQueryString(v string) *CreateNamedQueryInput {
2294	s.QueryString = &v
2295	return s
2296}
2297
2298// SetWorkGroup sets the WorkGroup field's value.
2299func (s *CreateNamedQueryInput) SetWorkGroup(v string) *CreateNamedQueryInput {
2300	s.WorkGroup = &v
2301	return s
2302}
2303
2304type CreateNamedQueryOutput struct {
2305	_ struct{} `type:"structure"`
2306
2307	// The unique ID of the query.
2308	NamedQueryId *string `type:"string"`
2309}
2310
2311// String returns the string representation
2312func (s CreateNamedQueryOutput) String() string {
2313	return awsutil.Prettify(s)
2314}
2315
2316// GoString returns the string representation
2317func (s CreateNamedQueryOutput) GoString() string {
2318	return s.String()
2319}
2320
2321// SetNamedQueryId sets the NamedQueryId field's value.
2322func (s *CreateNamedQueryOutput) SetNamedQueryId(v string) *CreateNamedQueryOutput {
2323	s.NamedQueryId = &v
2324	return s
2325}
2326
2327type CreateWorkGroupInput struct {
2328	_ struct{} `type:"structure"`
2329
2330	// The configuration for the workgroup, which includes the location in Amazon
2331	// S3 where query results are stored, the encryption configuration, if any,
2332	// used for encrypting query results, whether the Amazon CloudWatch Metrics
2333	// are enabled for the workgroup, the limit for the amount of bytes scanned
2334	// (cutoff) per query, if it is specified, and whether workgroup's settings
2335	// (specified with EnforceWorkGroupConfiguration) in the WorkGroupConfiguration
2336	// override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
2337	Configuration *WorkGroupConfiguration `type:"structure"`
2338
2339	// The workgroup description.
2340	Description *string `type:"string"`
2341
2342	// The workgroup name.
2343	//
2344	// Name is a required field
2345	Name *string `type:"string" required:"true"`
2346
2347	// One or more tags, separated by commas, that you want to attach to the workgroup
2348	// as you create it.
2349	Tags []*Tag `type:"list"`
2350}
2351
2352// String returns the string representation
2353func (s CreateWorkGroupInput) String() string {
2354	return awsutil.Prettify(s)
2355}
2356
2357// GoString returns the string representation
2358func (s CreateWorkGroupInput) GoString() string {
2359	return s.String()
2360}
2361
2362// Validate inspects the fields of the type to determine if they are valid.
2363func (s *CreateWorkGroupInput) Validate() error {
2364	invalidParams := request.ErrInvalidParams{Context: "CreateWorkGroupInput"}
2365	if s.Name == nil {
2366		invalidParams.Add(request.NewErrParamRequired("Name"))
2367	}
2368	if s.Configuration != nil {
2369		if err := s.Configuration.Validate(); err != nil {
2370			invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams))
2371		}
2372	}
2373	if s.Tags != nil {
2374		for i, v := range s.Tags {
2375			if v == nil {
2376				continue
2377			}
2378			if err := v.Validate(); err != nil {
2379				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
2380			}
2381		}
2382	}
2383
2384	if invalidParams.Len() > 0 {
2385		return invalidParams
2386	}
2387	return nil
2388}
2389
2390// SetConfiguration sets the Configuration field's value.
2391func (s *CreateWorkGroupInput) SetConfiguration(v *WorkGroupConfiguration) *CreateWorkGroupInput {
2392	s.Configuration = v
2393	return s
2394}
2395
2396// SetDescription sets the Description field's value.
2397func (s *CreateWorkGroupInput) SetDescription(v string) *CreateWorkGroupInput {
2398	s.Description = &v
2399	return s
2400}
2401
2402// SetName sets the Name field's value.
2403func (s *CreateWorkGroupInput) SetName(v string) *CreateWorkGroupInput {
2404	s.Name = &v
2405	return s
2406}
2407
2408// SetTags sets the Tags field's value.
2409func (s *CreateWorkGroupInput) SetTags(v []*Tag) *CreateWorkGroupInput {
2410	s.Tags = v
2411	return s
2412}
2413
2414type CreateWorkGroupOutput struct {
2415	_ struct{} `type:"structure"`
2416}
2417
2418// String returns the string representation
2419func (s CreateWorkGroupOutput) String() string {
2420	return awsutil.Prettify(s)
2421}
2422
2423// GoString returns the string representation
2424func (s CreateWorkGroupOutput) GoString() string {
2425	return s.String()
2426}
2427
2428// A piece of data (a field in the table).
2429type Datum struct {
2430	_ struct{} `type:"structure"`
2431
2432	// The value of the datum.
2433	VarCharValue *string `type:"string"`
2434}
2435
2436// String returns the string representation
2437func (s Datum) String() string {
2438	return awsutil.Prettify(s)
2439}
2440
2441// GoString returns the string representation
2442func (s Datum) GoString() string {
2443	return s.String()
2444}
2445
2446// SetVarCharValue sets the VarCharValue field's value.
2447func (s *Datum) SetVarCharValue(v string) *Datum {
2448	s.VarCharValue = &v
2449	return s
2450}
2451
2452type DeleteNamedQueryInput struct {
2453	_ struct{} `type:"structure"`
2454
2455	// The unique ID of the query to delete.
2456	NamedQueryId *string `type:"string" idempotencyToken:"true"`
2457}
2458
2459// String returns the string representation
2460func (s DeleteNamedQueryInput) String() string {
2461	return awsutil.Prettify(s)
2462}
2463
2464// GoString returns the string representation
2465func (s DeleteNamedQueryInput) GoString() string {
2466	return s.String()
2467}
2468
2469// SetNamedQueryId sets the NamedQueryId field's value.
2470func (s *DeleteNamedQueryInput) SetNamedQueryId(v string) *DeleteNamedQueryInput {
2471	s.NamedQueryId = &v
2472	return s
2473}
2474
2475type DeleteNamedQueryOutput struct {
2476	_ struct{} `type:"structure"`
2477}
2478
2479// String returns the string representation
2480func (s DeleteNamedQueryOutput) String() string {
2481	return awsutil.Prettify(s)
2482}
2483
2484// GoString returns the string representation
2485func (s DeleteNamedQueryOutput) GoString() string {
2486	return s.String()
2487}
2488
2489type DeleteWorkGroupInput struct {
2490	_ struct{} `type:"structure"`
2491
2492	// The option to delete the workgroup and its contents even if the workgroup
2493	// contains any named queries.
2494	RecursiveDeleteOption *bool `type:"boolean"`
2495
2496	// The unique name of the workgroup to delete.
2497	//
2498	// WorkGroup is a required field
2499	WorkGroup *string `type:"string" required:"true"`
2500}
2501
2502// String returns the string representation
2503func (s DeleteWorkGroupInput) String() string {
2504	return awsutil.Prettify(s)
2505}
2506
2507// GoString returns the string representation
2508func (s DeleteWorkGroupInput) GoString() string {
2509	return s.String()
2510}
2511
2512// Validate inspects the fields of the type to determine if they are valid.
2513func (s *DeleteWorkGroupInput) Validate() error {
2514	invalidParams := request.ErrInvalidParams{Context: "DeleteWorkGroupInput"}
2515	if s.WorkGroup == nil {
2516		invalidParams.Add(request.NewErrParamRequired("WorkGroup"))
2517	}
2518
2519	if invalidParams.Len() > 0 {
2520		return invalidParams
2521	}
2522	return nil
2523}
2524
2525// SetRecursiveDeleteOption sets the RecursiveDeleteOption field's value.
2526func (s *DeleteWorkGroupInput) SetRecursiveDeleteOption(v bool) *DeleteWorkGroupInput {
2527	s.RecursiveDeleteOption = &v
2528	return s
2529}
2530
2531// SetWorkGroup sets the WorkGroup field's value.
2532func (s *DeleteWorkGroupInput) SetWorkGroup(v string) *DeleteWorkGroupInput {
2533	s.WorkGroup = &v
2534	return s
2535}
2536
2537type DeleteWorkGroupOutput struct {
2538	_ struct{} `type:"structure"`
2539}
2540
2541// String returns the string representation
2542func (s DeleteWorkGroupOutput) String() string {
2543	return awsutil.Prettify(s)
2544}
2545
2546// GoString returns the string representation
2547func (s DeleteWorkGroupOutput) GoString() string {
2548	return s.String()
2549}
2550
2551// If query results are encrypted in Amazon S3, indicates the encryption option
2552// used (for example, SSE-KMS or CSE-KMS) and key information.
2553type EncryptionConfiguration struct {
2554	_ struct{} `type:"structure"`
2555
2556	// Indicates whether Amazon S3 server-side encryption with Amazon S3-managed
2557	// keys (SSE-S3), server-side encryption with KMS-managed keys (SSE-KMS), or
2558	// client-side encryption with KMS-managed keys (CSE-KMS) is used.
2559	//
2560	// If a query runs in a workgroup and the workgroup overrides client-side settings,
2561	// then the workgroup's setting for encryption is used. It specifies whether
2562	// query results must be encrypted, for all queries that run in this workgroup.
2563	//
2564	// EncryptionOption is a required field
2565	EncryptionOption *string `type:"string" required:"true" enum:"EncryptionOption"`
2566
2567	// For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID.
2568	KmsKey *string `type:"string"`
2569}
2570
2571// String returns the string representation
2572func (s EncryptionConfiguration) String() string {
2573	return awsutil.Prettify(s)
2574}
2575
2576// GoString returns the string representation
2577func (s EncryptionConfiguration) GoString() string {
2578	return s.String()
2579}
2580
2581// Validate inspects the fields of the type to determine if they are valid.
2582func (s *EncryptionConfiguration) Validate() error {
2583	invalidParams := request.ErrInvalidParams{Context: "EncryptionConfiguration"}
2584	if s.EncryptionOption == nil {
2585		invalidParams.Add(request.NewErrParamRequired("EncryptionOption"))
2586	}
2587
2588	if invalidParams.Len() > 0 {
2589		return invalidParams
2590	}
2591	return nil
2592}
2593
2594// SetEncryptionOption sets the EncryptionOption field's value.
2595func (s *EncryptionConfiguration) SetEncryptionOption(v string) *EncryptionConfiguration {
2596	s.EncryptionOption = &v
2597	return s
2598}
2599
2600// SetKmsKey sets the KmsKey field's value.
2601func (s *EncryptionConfiguration) SetKmsKey(v string) *EncryptionConfiguration {
2602	s.KmsKey = &v
2603	return s
2604}
2605
2606type GetNamedQueryInput struct {
2607	_ struct{} `type:"structure"`
2608
2609	// The unique ID of the query. Use ListNamedQueries to get query IDs.
2610	//
2611	// NamedQueryId is a required field
2612	NamedQueryId *string `type:"string" required:"true"`
2613}
2614
2615// String returns the string representation
2616func (s GetNamedQueryInput) String() string {
2617	return awsutil.Prettify(s)
2618}
2619
2620// GoString returns the string representation
2621func (s GetNamedQueryInput) GoString() string {
2622	return s.String()
2623}
2624
2625// Validate inspects the fields of the type to determine if they are valid.
2626func (s *GetNamedQueryInput) Validate() error {
2627	invalidParams := request.ErrInvalidParams{Context: "GetNamedQueryInput"}
2628	if s.NamedQueryId == nil {
2629		invalidParams.Add(request.NewErrParamRequired("NamedQueryId"))
2630	}
2631
2632	if invalidParams.Len() > 0 {
2633		return invalidParams
2634	}
2635	return nil
2636}
2637
2638// SetNamedQueryId sets the NamedQueryId field's value.
2639func (s *GetNamedQueryInput) SetNamedQueryId(v string) *GetNamedQueryInput {
2640	s.NamedQueryId = &v
2641	return s
2642}
2643
2644type GetNamedQueryOutput struct {
2645	_ struct{} `type:"structure"`
2646
2647	// Information about the query.
2648	NamedQuery *NamedQuery `type:"structure"`
2649}
2650
2651// String returns the string representation
2652func (s GetNamedQueryOutput) String() string {
2653	return awsutil.Prettify(s)
2654}
2655
2656// GoString returns the string representation
2657func (s GetNamedQueryOutput) GoString() string {
2658	return s.String()
2659}
2660
2661// SetNamedQuery sets the NamedQuery field's value.
2662func (s *GetNamedQueryOutput) SetNamedQuery(v *NamedQuery) *GetNamedQueryOutput {
2663	s.NamedQuery = v
2664	return s
2665}
2666
2667type GetQueryExecutionInput struct {
2668	_ struct{} `type:"structure"`
2669
2670	// The unique ID of the query execution.
2671	//
2672	// QueryExecutionId is a required field
2673	QueryExecutionId *string `type:"string" required:"true"`
2674}
2675
2676// String returns the string representation
2677func (s GetQueryExecutionInput) String() string {
2678	return awsutil.Prettify(s)
2679}
2680
2681// GoString returns the string representation
2682func (s GetQueryExecutionInput) GoString() string {
2683	return s.String()
2684}
2685
2686// Validate inspects the fields of the type to determine if they are valid.
2687func (s *GetQueryExecutionInput) Validate() error {
2688	invalidParams := request.ErrInvalidParams{Context: "GetQueryExecutionInput"}
2689	if s.QueryExecutionId == nil {
2690		invalidParams.Add(request.NewErrParamRequired("QueryExecutionId"))
2691	}
2692
2693	if invalidParams.Len() > 0 {
2694		return invalidParams
2695	}
2696	return nil
2697}
2698
2699// SetQueryExecutionId sets the QueryExecutionId field's value.
2700func (s *GetQueryExecutionInput) SetQueryExecutionId(v string) *GetQueryExecutionInput {
2701	s.QueryExecutionId = &v
2702	return s
2703}
2704
2705type GetQueryExecutionOutput struct {
2706	_ struct{} `type:"structure"`
2707
2708	// Information about the query execution.
2709	QueryExecution *QueryExecution `type:"structure"`
2710}
2711
2712// String returns the string representation
2713func (s GetQueryExecutionOutput) String() string {
2714	return awsutil.Prettify(s)
2715}
2716
2717// GoString returns the string representation
2718func (s GetQueryExecutionOutput) GoString() string {
2719	return s.String()
2720}
2721
2722// SetQueryExecution sets the QueryExecution field's value.
2723func (s *GetQueryExecutionOutput) SetQueryExecution(v *QueryExecution) *GetQueryExecutionOutput {
2724	s.QueryExecution = v
2725	return s
2726}
2727
2728type GetQueryResultsInput struct {
2729	_ struct{} `type:"structure"`
2730
2731	// The maximum number of results (rows) to return in this request.
2732	MaxResults *int64 `min:"1" type:"integer"`
2733
2734	// The token that specifies where to start pagination if a previous request
2735	// was truncated.
2736	NextToken *string `min:"1" type:"string"`
2737
2738	// The unique ID of the query execution.
2739	//
2740	// QueryExecutionId is a required field
2741	QueryExecutionId *string `type:"string" required:"true"`
2742}
2743
2744// String returns the string representation
2745func (s GetQueryResultsInput) String() string {
2746	return awsutil.Prettify(s)
2747}
2748
2749// GoString returns the string representation
2750func (s GetQueryResultsInput) GoString() string {
2751	return s.String()
2752}
2753
2754// Validate inspects the fields of the type to determine if they are valid.
2755func (s *GetQueryResultsInput) Validate() error {
2756	invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"}
2757	if s.MaxResults != nil && *s.MaxResults < 1 {
2758		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2759	}
2760	if s.NextToken != nil && len(*s.NextToken) < 1 {
2761		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
2762	}
2763	if s.QueryExecutionId == nil {
2764		invalidParams.Add(request.NewErrParamRequired("QueryExecutionId"))
2765	}
2766
2767	if invalidParams.Len() > 0 {
2768		return invalidParams
2769	}
2770	return nil
2771}
2772
2773// SetMaxResults sets the MaxResults field's value.
2774func (s *GetQueryResultsInput) SetMaxResults(v int64) *GetQueryResultsInput {
2775	s.MaxResults = &v
2776	return s
2777}
2778
2779// SetNextToken sets the NextToken field's value.
2780func (s *GetQueryResultsInput) SetNextToken(v string) *GetQueryResultsInput {
2781	s.NextToken = &v
2782	return s
2783}
2784
2785// SetQueryExecutionId sets the QueryExecutionId field's value.
2786func (s *GetQueryResultsInput) SetQueryExecutionId(v string) *GetQueryResultsInput {
2787	s.QueryExecutionId = &v
2788	return s
2789}
2790
2791type GetQueryResultsOutput struct {
2792	_ struct{} `type:"structure"`
2793
2794	// A token to be used by the next request if this request is truncated.
2795	NextToken *string `min:"1" type:"string"`
2796
2797	// The results of the query execution.
2798	ResultSet *ResultSet `type:"structure"`
2799
2800	// The number of rows inserted with a CREATE TABLE AS SELECT statement.
2801	UpdateCount *int64 `type:"long"`
2802}
2803
2804// String returns the string representation
2805func (s GetQueryResultsOutput) String() string {
2806	return awsutil.Prettify(s)
2807}
2808
2809// GoString returns the string representation
2810func (s GetQueryResultsOutput) GoString() string {
2811	return s.String()
2812}
2813
2814// SetNextToken sets the NextToken field's value.
2815func (s *GetQueryResultsOutput) SetNextToken(v string) *GetQueryResultsOutput {
2816	s.NextToken = &v
2817	return s
2818}
2819
2820// SetResultSet sets the ResultSet field's value.
2821func (s *GetQueryResultsOutput) SetResultSet(v *ResultSet) *GetQueryResultsOutput {
2822	s.ResultSet = v
2823	return s
2824}
2825
2826// SetUpdateCount sets the UpdateCount field's value.
2827func (s *GetQueryResultsOutput) SetUpdateCount(v int64) *GetQueryResultsOutput {
2828	s.UpdateCount = &v
2829	return s
2830}
2831
2832type GetWorkGroupInput struct {
2833	_ struct{} `type:"structure"`
2834
2835	// The name of the workgroup.
2836	//
2837	// WorkGroup is a required field
2838	WorkGroup *string `type:"string" required:"true"`
2839}
2840
2841// String returns the string representation
2842func (s GetWorkGroupInput) String() string {
2843	return awsutil.Prettify(s)
2844}
2845
2846// GoString returns the string representation
2847func (s GetWorkGroupInput) GoString() string {
2848	return s.String()
2849}
2850
2851// Validate inspects the fields of the type to determine if they are valid.
2852func (s *GetWorkGroupInput) Validate() error {
2853	invalidParams := request.ErrInvalidParams{Context: "GetWorkGroupInput"}
2854	if s.WorkGroup == nil {
2855		invalidParams.Add(request.NewErrParamRequired("WorkGroup"))
2856	}
2857
2858	if invalidParams.Len() > 0 {
2859		return invalidParams
2860	}
2861	return nil
2862}
2863
2864// SetWorkGroup sets the WorkGroup field's value.
2865func (s *GetWorkGroupInput) SetWorkGroup(v string) *GetWorkGroupInput {
2866	s.WorkGroup = &v
2867	return s
2868}
2869
2870type GetWorkGroupOutput struct {
2871	_ struct{} `type:"structure"`
2872
2873	// Information about the workgroup.
2874	WorkGroup *WorkGroup `type:"structure"`
2875}
2876
2877// String returns the string representation
2878func (s GetWorkGroupOutput) String() string {
2879	return awsutil.Prettify(s)
2880}
2881
2882// GoString returns the string representation
2883func (s GetWorkGroupOutput) GoString() string {
2884	return s.String()
2885}
2886
2887// SetWorkGroup sets the WorkGroup field's value.
2888func (s *GetWorkGroupOutput) SetWorkGroup(v *WorkGroup) *GetWorkGroupOutput {
2889	s.WorkGroup = v
2890	return s
2891}
2892
2893type ListNamedQueriesInput struct {
2894	_ struct{} `type:"structure"`
2895
2896	// The maximum number of queries to return in this request.
2897	MaxResults *int64 `type:"integer"`
2898
2899	// The token that specifies where to start pagination if a previous request
2900	// was truncated.
2901	NextToken *string `min:"1" type:"string"`
2902
2903	// The name of the workgroup from which the named queries are being returned.
2904	WorkGroup *string `type:"string"`
2905}
2906
2907// String returns the string representation
2908func (s ListNamedQueriesInput) String() string {
2909	return awsutil.Prettify(s)
2910}
2911
2912// GoString returns the string representation
2913func (s ListNamedQueriesInput) GoString() string {
2914	return s.String()
2915}
2916
2917// Validate inspects the fields of the type to determine if they are valid.
2918func (s *ListNamedQueriesInput) Validate() error {
2919	invalidParams := request.ErrInvalidParams{Context: "ListNamedQueriesInput"}
2920	if s.NextToken != nil && len(*s.NextToken) < 1 {
2921		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
2922	}
2923
2924	if invalidParams.Len() > 0 {
2925		return invalidParams
2926	}
2927	return nil
2928}
2929
2930// SetMaxResults sets the MaxResults field's value.
2931func (s *ListNamedQueriesInput) SetMaxResults(v int64) *ListNamedQueriesInput {
2932	s.MaxResults = &v
2933	return s
2934}
2935
2936// SetNextToken sets the NextToken field's value.
2937func (s *ListNamedQueriesInput) SetNextToken(v string) *ListNamedQueriesInput {
2938	s.NextToken = &v
2939	return s
2940}
2941
2942// SetWorkGroup sets the WorkGroup field's value.
2943func (s *ListNamedQueriesInput) SetWorkGroup(v string) *ListNamedQueriesInput {
2944	s.WorkGroup = &v
2945	return s
2946}
2947
2948type ListNamedQueriesOutput struct {
2949	_ struct{} `type:"structure"`
2950
2951	// The list of unique query IDs.
2952	NamedQueryIds []*string `min:"1" type:"list"`
2953
2954	// A token to be used by the next request if this request is truncated.
2955	NextToken *string `min:"1" type:"string"`
2956}
2957
2958// String returns the string representation
2959func (s ListNamedQueriesOutput) String() string {
2960	return awsutil.Prettify(s)
2961}
2962
2963// GoString returns the string representation
2964func (s ListNamedQueriesOutput) GoString() string {
2965	return s.String()
2966}
2967
2968// SetNamedQueryIds sets the NamedQueryIds field's value.
2969func (s *ListNamedQueriesOutput) SetNamedQueryIds(v []*string) *ListNamedQueriesOutput {
2970	s.NamedQueryIds = v
2971	return s
2972}
2973
2974// SetNextToken sets the NextToken field's value.
2975func (s *ListNamedQueriesOutput) SetNextToken(v string) *ListNamedQueriesOutput {
2976	s.NextToken = &v
2977	return s
2978}
2979
2980type ListQueryExecutionsInput struct {
2981	_ struct{} `type:"structure"`
2982
2983	// The maximum number of query executions to return in this request.
2984	MaxResults *int64 `type:"integer"`
2985
2986	// The token that specifies where to start pagination if a previous request
2987	// was truncated.
2988	NextToken *string `min:"1" type:"string"`
2989
2990	// The name of the workgroup from which queries are being returned.
2991	WorkGroup *string `type:"string"`
2992}
2993
2994// String returns the string representation
2995func (s ListQueryExecutionsInput) String() string {
2996	return awsutil.Prettify(s)
2997}
2998
2999// GoString returns the string representation
3000func (s ListQueryExecutionsInput) GoString() string {
3001	return s.String()
3002}
3003
3004// Validate inspects the fields of the type to determine if they are valid.
3005func (s *ListQueryExecutionsInput) Validate() error {
3006	invalidParams := request.ErrInvalidParams{Context: "ListQueryExecutionsInput"}
3007	if s.NextToken != nil && len(*s.NextToken) < 1 {
3008		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
3009	}
3010
3011	if invalidParams.Len() > 0 {
3012		return invalidParams
3013	}
3014	return nil
3015}
3016
3017// SetMaxResults sets the MaxResults field's value.
3018func (s *ListQueryExecutionsInput) SetMaxResults(v int64) *ListQueryExecutionsInput {
3019	s.MaxResults = &v
3020	return s
3021}
3022
3023// SetNextToken sets the NextToken field's value.
3024func (s *ListQueryExecutionsInput) SetNextToken(v string) *ListQueryExecutionsInput {
3025	s.NextToken = &v
3026	return s
3027}
3028
3029// SetWorkGroup sets the WorkGroup field's value.
3030func (s *ListQueryExecutionsInput) SetWorkGroup(v string) *ListQueryExecutionsInput {
3031	s.WorkGroup = &v
3032	return s
3033}
3034
3035type ListQueryExecutionsOutput struct {
3036	_ struct{} `type:"structure"`
3037
3038	// A token to be used by the next request if this request is truncated.
3039	NextToken *string `min:"1" type:"string"`
3040
3041	// The unique IDs of each query execution as an array of strings.
3042	QueryExecutionIds []*string `min:"1" type:"list"`
3043}
3044
3045// String returns the string representation
3046func (s ListQueryExecutionsOutput) String() string {
3047	return awsutil.Prettify(s)
3048}
3049
3050// GoString returns the string representation
3051func (s ListQueryExecutionsOutput) GoString() string {
3052	return s.String()
3053}
3054
3055// SetNextToken sets the NextToken field's value.
3056func (s *ListQueryExecutionsOutput) SetNextToken(v string) *ListQueryExecutionsOutput {
3057	s.NextToken = &v
3058	return s
3059}
3060
3061// SetQueryExecutionIds sets the QueryExecutionIds field's value.
3062func (s *ListQueryExecutionsOutput) SetQueryExecutionIds(v []*string) *ListQueryExecutionsOutput {
3063	s.QueryExecutionIds = v
3064	return s
3065}
3066
3067type ListTagsForResourceInput struct {
3068	_ struct{} `type:"structure"`
3069
3070	// The maximum number of results to be returned per request that lists the tags
3071	// for the workgroup resource.
3072	MaxResults *int64 `min:"75" type:"integer"`
3073
3074	// The token for the next set of results, or null if there are no additional
3075	// results for this request, where the request lists the tags for the workgroup
3076	// resource with the specified ARN.
3077	NextToken *string `min:"1" type:"string"`
3078
3079	// Lists the tags for the workgroup resource with the specified ARN.
3080	//
3081	// ResourceARN is a required field
3082	ResourceARN *string `min:"1" type:"string" required:"true"`
3083}
3084
3085// String returns the string representation
3086func (s ListTagsForResourceInput) String() string {
3087	return awsutil.Prettify(s)
3088}
3089
3090// GoString returns the string representation
3091func (s ListTagsForResourceInput) GoString() string {
3092	return s.String()
3093}
3094
3095// Validate inspects the fields of the type to determine if they are valid.
3096func (s *ListTagsForResourceInput) Validate() error {
3097	invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
3098	if s.MaxResults != nil && *s.MaxResults < 75 {
3099		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 75))
3100	}
3101	if s.NextToken != nil && len(*s.NextToken) < 1 {
3102		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
3103	}
3104	if s.ResourceARN == nil {
3105		invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
3106	}
3107	if s.ResourceARN != nil && len(*s.ResourceARN) < 1 {
3108		invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1))
3109	}
3110
3111	if invalidParams.Len() > 0 {
3112		return invalidParams
3113	}
3114	return nil
3115}
3116
3117// SetMaxResults sets the MaxResults field's value.
3118func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput {
3119	s.MaxResults = &v
3120	return s
3121}
3122
3123// SetNextToken sets the NextToken field's value.
3124func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
3125	s.NextToken = &v
3126	return s
3127}
3128
3129// SetResourceARN sets the ResourceARN field's value.
3130func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput {
3131	s.ResourceARN = &v
3132	return s
3133}
3134
3135type ListTagsForResourceOutput struct {
3136	_ struct{} `type:"structure"`
3137
3138	// A token to be used by the next request if this request is truncated.
3139	NextToken *string `min:"1" type:"string"`
3140
3141	// The list of tags associated with this workgroup.
3142	Tags []*Tag `type:"list"`
3143}
3144
3145// String returns the string representation
3146func (s ListTagsForResourceOutput) String() string {
3147	return awsutil.Prettify(s)
3148}
3149
3150// GoString returns the string representation
3151func (s ListTagsForResourceOutput) GoString() string {
3152	return s.String()
3153}
3154
3155// SetNextToken sets the NextToken field's value.
3156func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
3157	s.NextToken = &v
3158	return s
3159}
3160
3161// SetTags sets the Tags field's value.
3162func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
3163	s.Tags = v
3164	return s
3165}
3166
3167type ListWorkGroupsInput struct {
3168	_ struct{} `type:"structure"`
3169
3170	// The maximum number of workgroups to return in this request.
3171	MaxResults *int64 `min:"1" type:"integer"`
3172
3173	// A token to be used by the next request if this request is truncated.
3174	NextToken *string `min:"1" type:"string"`
3175}
3176
3177// String returns the string representation
3178func (s ListWorkGroupsInput) String() string {
3179	return awsutil.Prettify(s)
3180}
3181
3182// GoString returns the string representation
3183func (s ListWorkGroupsInput) GoString() string {
3184	return s.String()
3185}
3186
3187// Validate inspects the fields of the type to determine if they are valid.
3188func (s *ListWorkGroupsInput) Validate() error {
3189	invalidParams := request.ErrInvalidParams{Context: "ListWorkGroupsInput"}
3190	if s.MaxResults != nil && *s.MaxResults < 1 {
3191		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
3192	}
3193	if s.NextToken != nil && len(*s.NextToken) < 1 {
3194		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
3195	}
3196
3197	if invalidParams.Len() > 0 {
3198		return invalidParams
3199	}
3200	return nil
3201}
3202
3203// SetMaxResults sets the MaxResults field's value.
3204func (s *ListWorkGroupsInput) SetMaxResults(v int64) *ListWorkGroupsInput {
3205	s.MaxResults = &v
3206	return s
3207}
3208
3209// SetNextToken sets the NextToken field's value.
3210func (s *ListWorkGroupsInput) SetNextToken(v string) *ListWorkGroupsInput {
3211	s.NextToken = &v
3212	return s
3213}
3214
3215type ListWorkGroupsOutput struct {
3216	_ struct{} `type:"structure"`
3217
3218	// A token to be used by the next request if this request is truncated.
3219	NextToken *string `min:"1" type:"string"`
3220
3221	// The list of workgroups, including their names, descriptions, creation times,
3222	// and states.
3223	WorkGroups []*WorkGroupSummary `type:"list"`
3224}
3225
3226// String returns the string representation
3227func (s ListWorkGroupsOutput) String() string {
3228	return awsutil.Prettify(s)
3229}
3230
3231// GoString returns the string representation
3232func (s ListWorkGroupsOutput) GoString() string {
3233	return s.String()
3234}
3235
3236// SetNextToken sets the NextToken field's value.
3237func (s *ListWorkGroupsOutput) SetNextToken(v string) *ListWorkGroupsOutput {
3238	s.NextToken = &v
3239	return s
3240}
3241
3242// SetWorkGroups sets the WorkGroups field's value.
3243func (s *ListWorkGroupsOutput) SetWorkGroups(v []*WorkGroupSummary) *ListWorkGroupsOutput {
3244	s.WorkGroups = v
3245	return s
3246}
3247
3248// A query, where QueryString is the list of SQL query statements that comprise
3249// the query.
3250type NamedQuery struct {
3251	_ struct{} `type:"structure"`
3252
3253	// The database to which the query belongs.
3254	//
3255	// Database is a required field
3256	Database *string `min:"1" type:"string" required:"true"`
3257
3258	// The query description.
3259	Description *string `min:"1" type:"string"`
3260
3261	// The query name.
3262	//
3263	// Name is a required field
3264	Name *string `min:"1" type:"string" required:"true"`
3265
3266	// The unique identifier of the query.
3267	NamedQueryId *string `type:"string"`
3268
3269	// The SQL query statements that comprise the query.
3270	//
3271	// QueryString is a required field
3272	QueryString *string `min:"1" type:"string" required:"true"`
3273
3274	// The name of the workgroup that contains the named query.
3275	WorkGroup *string `type:"string"`
3276}
3277
3278// String returns the string representation
3279func (s NamedQuery) String() string {
3280	return awsutil.Prettify(s)
3281}
3282
3283// GoString returns the string representation
3284func (s NamedQuery) GoString() string {
3285	return s.String()
3286}
3287
3288// SetDatabase sets the Database field's value.
3289func (s *NamedQuery) SetDatabase(v string) *NamedQuery {
3290	s.Database = &v
3291	return s
3292}
3293
3294// SetDescription sets the Description field's value.
3295func (s *NamedQuery) SetDescription(v string) *NamedQuery {
3296	s.Description = &v
3297	return s
3298}
3299
3300// SetName sets the Name field's value.
3301func (s *NamedQuery) SetName(v string) *NamedQuery {
3302	s.Name = &v
3303	return s
3304}
3305
3306// SetNamedQueryId sets the NamedQueryId field's value.
3307func (s *NamedQuery) SetNamedQueryId(v string) *NamedQuery {
3308	s.NamedQueryId = &v
3309	return s
3310}
3311
3312// SetQueryString sets the QueryString field's value.
3313func (s *NamedQuery) SetQueryString(v string) *NamedQuery {
3314	s.QueryString = &v
3315	return s
3316}
3317
3318// SetWorkGroup sets the WorkGroup field's value.
3319func (s *NamedQuery) SetWorkGroup(v string) *NamedQuery {
3320	s.WorkGroup = &v
3321	return s
3322}
3323
3324// Information about a single instance of a query execution.
3325type QueryExecution struct {
3326	_ struct{} `type:"structure"`
3327
3328	// The SQL query statements which the query execution ran.
3329	Query *string `min:"1" type:"string"`
3330
3331	// The database in which the query execution occurred.
3332	QueryExecutionContext *QueryExecutionContext `type:"structure"`
3333
3334	// The unique identifier for each query execution.
3335	QueryExecutionId *string `type:"string"`
3336
3337	// The location in Amazon S3 where query results were stored and the encryption
3338	// option, if any, used for query results. These are known as "client-side settings".
3339	// If workgroup settings override client-side settings, then the query uses
3340	// the location for the query results and the encryption configuration that
3341	// are specified for the workgroup.
3342	ResultConfiguration *ResultConfiguration `type:"structure"`
3343
3344	// The type of query statement that was run. DDL indicates DDL query statements.
3345	// DML indicates DML (Data Manipulation Language) query statements, such as
3346	// CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL
3347	// and DML, such as SHOW CREATE TABLE, or DESCRIBE <table>.
3348	StatementType *string `type:"string" enum:"StatementType"`
3349
3350	// The location of a manifest file that tracks file locations generated by the
3351	// query, the amount of data scanned by the query, and the amount of time that
3352	// it took the query to run.
3353	Statistics *QueryExecutionStatistics `type:"structure"`
3354
3355	// The completion date, current state, submission time, and state change reason
3356	// (if applicable) for the query execution.
3357	Status *QueryExecutionStatus `type:"structure"`
3358
3359	// The name of the workgroup in which the query ran.
3360	WorkGroup *string `type:"string"`
3361}
3362
3363// String returns the string representation
3364func (s QueryExecution) String() string {
3365	return awsutil.Prettify(s)
3366}
3367
3368// GoString returns the string representation
3369func (s QueryExecution) GoString() string {
3370	return s.String()
3371}
3372
3373// SetQuery sets the Query field's value.
3374func (s *QueryExecution) SetQuery(v string) *QueryExecution {
3375	s.Query = &v
3376	return s
3377}
3378
3379// SetQueryExecutionContext sets the QueryExecutionContext field's value.
3380func (s *QueryExecution) SetQueryExecutionContext(v *QueryExecutionContext) *QueryExecution {
3381	s.QueryExecutionContext = v
3382	return s
3383}
3384
3385// SetQueryExecutionId sets the QueryExecutionId field's value.
3386func (s *QueryExecution) SetQueryExecutionId(v string) *QueryExecution {
3387	s.QueryExecutionId = &v
3388	return s
3389}
3390
3391// SetResultConfiguration sets the ResultConfiguration field's value.
3392func (s *QueryExecution) SetResultConfiguration(v *ResultConfiguration) *QueryExecution {
3393	s.ResultConfiguration = v
3394	return s
3395}
3396
3397// SetStatementType sets the StatementType field's value.
3398func (s *QueryExecution) SetStatementType(v string) *QueryExecution {
3399	s.StatementType = &v
3400	return s
3401}
3402
3403// SetStatistics sets the Statistics field's value.
3404func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution {
3405	s.Statistics = v
3406	return s
3407}
3408
3409// SetStatus sets the Status field's value.
3410func (s *QueryExecution) SetStatus(v *QueryExecutionStatus) *QueryExecution {
3411	s.Status = v
3412	return s
3413}
3414
3415// SetWorkGroup sets the WorkGroup field's value.
3416func (s *QueryExecution) SetWorkGroup(v string) *QueryExecution {
3417	s.WorkGroup = &v
3418	return s
3419}
3420
3421// The database in which the query execution occurs.
3422type QueryExecutionContext struct {
3423	_ struct{} `type:"structure"`
3424
3425	// The name of the database.
3426	Database *string `min:"1" type:"string"`
3427}
3428
3429// String returns the string representation
3430func (s QueryExecutionContext) String() string {
3431	return awsutil.Prettify(s)
3432}
3433
3434// GoString returns the string representation
3435func (s QueryExecutionContext) GoString() string {
3436	return s.String()
3437}
3438
3439// Validate inspects the fields of the type to determine if they are valid.
3440func (s *QueryExecutionContext) Validate() error {
3441	invalidParams := request.ErrInvalidParams{Context: "QueryExecutionContext"}
3442	if s.Database != nil && len(*s.Database) < 1 {
3443		invalidParams.Add(request.NewErrParamMinLen("Database", 1))
3444	}
3445
3446	if invalidParams.Len() > 0 {
3447		return invalidParams
3448	}
3449	return nil
3450}
3451
3452// SetDatabase sets the Database field's value.
3453func (s *QueryExecutionContext) SetDatabase(v string) *QueryExecutionContext {
3454	s.Database = &v
3455	return s
3456}
3457
3458// The location of a manifest file that tracks file locations generated by the
3459// query, the amount of data scanned by the query, and the amount of time that
3460// it took the query to run.
3461type QueryExecutionStatistics struct {
3462	_ struct{} `type:"structure"`
3463
3464	// The location and file name of a data manifest file. The manifest file is
3465	// saved to the Athena query results location in Amazon S3. It tracks files
3466	// that the query wrote to Amazon S3. If the query fails, the manifest file
3467	// also tracks files that the query intended to write. The manifest is useful
3468	// for identifying orphaned files resulting from a failed query. For more information,
3469	// see Working with Query Output Files (https://docs.aws.amazon.com/athena/latest/ug/querying.html)
3470	// in the Amazon Athena User Guide.
3471	DataManifestLocation *string `type:"string"`
3472
3473	// The number of bytes in the data that was queried.
3474	DataScannedInBytes *int64 `type:"long"`
3475
3476	// The number of milliseconds that the query took to execute.
3477	EngineExecutionTimeInMillis *int64 `type:"long"`
3478}
3479
3480// String returns the string representation
3481func (s QueryExecutionStatistics) String() string {
3482	return awsutil.Prettify(s)
3483}
3484
3485// GoString returns the string representation
3486func (s QueryExecutionStatistics) GoString() string {
3487	return s.String()
3488}
3489
3490// SetDataManifestLocation sets the DataManifestLocation field's value.
3491func (s *QueryExecutionStatistics) SetDataManifestLocation(v string) *QueryExecutionStatistics {
3492	s.DataManifestLocation = &v
3493	return s
3494}
3495
3496// SetDataScannedInBytes sets the DataScannedInBytes field's value.
3497func (s *QueryExecutionStatistics) SetDataScannedInBytes(v int64) *QueryExecutionStatistics {
3498	s.DataScannedInBytes = &v
3499	return s
3500}
3501
3502// SetEngineExecutionTimeInMillis sets the EngineExecutionTimeInMillis field's value.
3503func (s *QueryExecutionStatistics) SetEngineExecutionTimeInMillis(v int64) *QueryExecutionStatistics {
3504	s.EngineExecutionTimeInMillis = &v
3505	return s
3506}
3507
3508// The completion date, current state, submission time, and state change reason
3509// (if applicable) for the query execution.
3510type QueryExecutionStatus struct {
3511	_ struct{} `type:"structure"`
3512
3513	// The date and time that the query completed.
3514	CompletionDateTime *time.Time `type:"timestamp"`
3515
3516	// The state of query execution. QUEUED state is listed but is not used by Athena
3517	// and is reserved for future use. RUNNING indicates that the query has been
3518	// submitted to the service, and Athena will execute the query as soon as resources
3519	// are available. SUCCEEDED indicates that the query completed without errors.
3520	// FAILED indicates that the query experienced an error and did not complete
3521	// processing. CANCELLED indicates that a user input interrupted query execution.
3522	State *string `type:"string" enum:"QueryExecutionState"`
3523
3524	// Further detail about the status of the query.
3525	StateChangeReason *string `type:"string"`
3526
3527	// The date and time that the query was submitted.
3528	SubmissionDateTime *time.Time `type:"timestamp"`
3529}
3530
3531// String returns the string representation
3532func (s QueryExecutionStatus) String() string {
3533	return awsutil.Prettify(s)
3534}
3535
3536// GoString returns the string representation
3537func (s QueryExecutionStatus) GoString() string {
3538	return s.String()
3539}
3540
3541// SetCompletionDateTime sets the CompletionDateTime field's value.
3542func (s *QueryExecutionStatus) SetCompletionDateTime(v time.Time) *QueryExecutionStatus {
3543	s.CompletionDateTime = &v
3544	return s
3545}
3546
3547// SetState sets the State field's value.
3548func (s *QueryExecutionStatus) SetState(v string) *QueryExecutionStatus {
3549	s.State = &v
3550	return s
3551}
3552
3553// SetStateChangeReason sets the StateChangeReason field's value.
3554func (s *QueryExecutionStatus) SetStateChangeReason(v string) *QueryExecutionStatus {
3555	s.StateChangeReason = &v
3556	return s
3557}
3558
3559// SetSubmissionDateTime sets the SubmissionDateTime field's value.
3560func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutionStatus {
3561	s.SubmissionDateTime = &v
3562	return s
3563}
3564
3565// The location in Amazon S3 where query results are stored and the encryption
3566// option, if any, used for query results. These are known as "client-side settings".
3567// If workgroup settings override client-side settings, then the query uses
3568// the workgroup settings.
3569type ResultConfiguration struct {
3570	_ struct{} `type:"structure"`
3571
3572	// If query results are encrypted in Amazon S3, indicates the encryption option
3573	// used (for example, SSE-KMS or CSE-KMS) and key information. This is a client-side
3574	// setting. If workgroup settings override client-side settings, then the query
3575	// uses the encryption configuration that is specified for the workgroup, and
3576	// also uses the location for storing query results specified in the workgroup.
3577	// See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings
3578	// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
3579	EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
3580
3581	// The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/.
3582	// To run the query, you must specify the query results location using one of
3583	// the ways: either for individual queries using either this setting (client-side),
3584	// or in the workgroup, using WorkGroupConfiguration. If none of them is set,
3585	// Athena issues an error that no output location is provided. For more information,
3586	// see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html).
3587	// If workgroup settings override client-side settings, then the query uses
3588	// the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
3589	OutputLocation *string `type:"string"`
3590}
3591
3592// String returns the string representation
3593func (s ResultConfiguration) String() string {
3594	return awsutil.Prettify(s)
3595}
3596
3597// GoString returns the string representation
3598func (s ResultConfiguration) GoString() string {
3599	return s.String()
3600}
3601
3602// Validate inspects the fields of the type to determine if they are valid.
3603func (s *ResultConfiguration) Validate() error {
3604	invalidParams := request.ErrInvalidParams{Context: "ResultConfiguration"}
3605	if s.EncryptionConfiguration != nil {
3606		if err := s.EncryptionConfiguration.Validate(); err != nil {
3607			invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams))
3608		}
3609	}
3610
3611	if invalidParams.Len() > 0 {
3612		return invalidParams
3613	}
3614	return nil
3615}
3616
3617// SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
3618func (s *ResultConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfiguration {
3619	s.EncryptionConfiguration = v
3620	return s
3621}
3622
3623// SetOutputLocation sets the OutputLocation field's value.
3624func (s *ResultConfiguration) SetOutputLocation(v string) *ResultConfiguration {
3625	s.OutputLocation = &v
3626	return s
3627}
3628
3629// The information about the updates in the query results, such as output location
3630// and encryption configuration for the query results.
3631type ResultConfigurationUpdates struct {
3632	_ struct{} `type:"structure"`
3633
3634	// The encryption configuration for the query results.
3635	EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
3636
3637	// The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/.
3638	// For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html)
3639	// If workgroup settings override client-side settings, then the query uses
3640	// the location for the query results and the encryption configuration that
3641	// are specified for the workgroup. The "workgroup settings override" is specified
3642	// in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration.
3643	// See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
3644	OutputLocation *string `type:"string"`
3645
3646	// If set to "true", indicates that the previously-specified encryption configuration
3647	// (also known as the client-side setting) for queries in this workgroup should
3648	// be ignored and set to null. If set to "false" or not set, and a value is
3649	// present in the EncryptionConfiguration in ResultConfigurationUpdates (the
3650	// client-side setting), the EncryptionConfiguration in the workgroup's ResultConfiguration
3651	// will be updated with the new value. For more information, see Workgroup Settings
3652	// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
3653	RemoveEncryptionConfiguration *bool `type:"boolean"`
3654
3655	// If set to "true", indicates that the previously-specified query results location
3656	// (also known as a client-side setting) for queries in this workgroup should
3657	// be ignored and set to null. If set to "false" or not set, and a value is
3658	// present in the OutputLocation in ResultConfigurationUpdates (the client-side
3659	// setting), the OutputLocation in the workgroup's ResultConfiguration will
3660	// be updated with the new value. For more information, see Workgroup Settings
3661	// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
3662	RemoveOutputLocation *bool `type:"boolean"`
3663}
3664
3665// String returns the string representation
3666func (s ResultConfigurationUpdates) String() string {
3667	return awsutil.Prettify(s)
3668}
3669
3670// GoString returns the string representation
3671func (s ResultConfigurationUpdates) GoString() string {
3672	return s.String()
3673}
3674
3675// Validate inspects the fields of the type to determine if they are valid.
3676func (s *ResultConfigurationUpdates) Validate() error {
3677	invalidParams := request.ErrInvalidParams{Context: "ResultConfigurationUpdates"}
3678	if s.EncryptionConfiguration != nil {
3679		if err := s.EncryptionConfiguration.Validate(); err != nil {
3680			invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams))
3681		}
3682	}
3683
3684	if invalidParams.Len() > 0 {
3685		return invalidParams
3686	}
3687	return nil
3688}
3689
3690// SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
3691func (s *ResultConfigurationUpdates) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfigurationUpdates {
3692	s.EncryptionConfiguration = v
3693	return s
3694}
3695
3696// SetOutputLocation sets the OutputLocation field's value.
3697func (s *ResultConfigurationUpdates) SetOutputLocation(v string) *ResultConfigurationUpdates {
3698	s.OutputLocation = &v
3699	return s
3700}
3701
3702// SetRemoveEncryptionConfiguration sets the RemoveEncryptionConfiguration field's value.
3703func (s *ResultConfigurationUpdates) SetRemoveEncryptionConfiguration(v bool) *ResultConfigurationUpdates {
3704	s.RemoveEncryptionConfiguration = &v
3705	return s
3706}
3707
3708// SetRemoveOutputLocation sets the RemoveOutputLocation field's value.
3709func (s *ResultConfigurationUpdates) SetRemoveOutputLocation(v bool) *ResultConfigurationUpdates {
3710	s.RemoveOutputLocation = &v
3711	return s
3712}
3713
3714// The metadata and rows that comprise a query result set. The metadata describes
3715// the column structure and data types.
3716type ResultSet struct {
3717	_ struct{} `type:"structure"`
3718
3719	// The metadata that describes the column structure and data types of a table
3720	// of query results.
3721	ResultSetMetadata *ResultSetMetadata `type:"structure"`
3722
3723	// The rows in the table.
3724	Rows []*Row `type:"list"`
3725}
3726
3727// String returns the string representation
3728func (s ResultSet) String() string {
3729	return awsutil.Prettify(s)
3730}
3731
3732// GoString returns the string representation
3733func (s ResultSet) GoString() string {
3734	return s.String()
3735}
3736
3737// SetResultSetMetadata sets the ResultSetMetadata field's value.
3738func (s *ResultSet) SetResultSetMetadata(v *ResultSetMetadata) *ResultSet {
3739	s.ResultSetMetadata = v
3740	return s
3741}
3742
3743// SetRows sets the Rows field's value.
3744func (s *ResultSet) SetRows(v []*Row) *ResultSet {
3745	s.Rows = v
3746	return s
3747}
3748
3749// The metadata that describes the column structure and data types of a table
3750// of query results.
3751type ResultSetMetadata struct {
3752	_ struct{} `type:"structure"`
3753
3754	// Information about the columns returned in a query result metadata.
3755	ColumnInfo []*ColumnInfo `type:"list"`
3756}
3757
3758// String returns the string representation
3759func (s ResultSetMetadata) String() string {
3760	return awsutil.Prettify(s)
3761}
3762
3763// GoString returns the string representation
3764func (s ResultSetMetadata) GoString() string {
3765	return s.String()
3766}
3767
3768// SetColumnInfo sets the ColumnInfo field's value.
3769func (s *ResultSetMetadata) SetColumnInfo(v []*ColumnInfo) *ResultSetMetadata {
3770	s.ColumnInfo = v
3771	return s
3772}
3773
3774// The rows that comprise a query result table.
3775type Row struct {
3776	_ struct{} `type:"structure"`
3777
3778	// The data that populates a row in a query result table.
3779	Data []*Datum `type:"list"`
3780}
3781
3782// String returns the string representation
3783func (s Row) String() string {
3784	return awsutil.Prettify(s)
3785}
3786
3787// GoString returns the string representation
3788func (s Row) GoString() string {
3789	return s.String()
3790}
3791
3792// SetData sets the Data field's value.
3793func (s *Row) SetData(v []*Datum) *Row {
3794	s.Data = v
3795	return s
3796}
3797
3798type StartQueryExecutionInput struct {
3799	_ struct{} `type:"structure"`
3800
3801	// A unique case-sensitive string used to ensure the request to create the query
3802	// is idempotent (executes only once). If another StartQueryExecution request
3803	// is received, the same response is returned and another query is not created.
3804	// If a parameter has changed, for example, the QueryString, an error is returned.
3805	//
3806	// This token is listed as not required because AWS SDKs (for example the AWS
3807	// SDK for Java) auto-generate the token for users. If you are not using the
3808	// AWS SDK or the AWS CLI, you must provide this token or the action will fail.
3809	ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"`
3810
3811	// The database within which the query executes.
3812	QueryExecutionContext *QueryExecutionContext `type:"structure"`
3813
3814	// The SQL query statements to be executed.
3815	//
3816	// QueryString is a required field
3817	QueryString *string `min:"1" type:"string" required:"true"`
3818
3819	// Specifies information about where and how to save the results of the query
3820	// execution. If the query runs in a workgroup, then workgroup's settings may
3821	// override query settings. This affects the query results location. The workgroup
3822	// settings override is specified in EnforceWorkGroupConfiguration (true/false)
3823	// in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
3824	ResultConfiguration *ResultConfiguration `type:"structure"`
3825
3826	// The name of the workgroup in which the query is being started.
3827	WorkGroup *string `type:"string"`
3828}
3829
3830// String returns the string representation
3831func (s StartQueryExecutionInput) String() string {
3832	return awsutil.Prettify(s)
3833}
3834
3835// GoString returns the string representation
3836func (s StartQueryExecutionInput) GoString() string {
3837	return s.String()
3838}
3839
3840// Validate inspects the fields of the type to determine if they are valid.
3841func (s *StartQueryExecutionInput) Validate() error {
3842	invalidParams := request.ErrInvalidParams{Context: "StartQueryExecutionInput"}
3843	if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 {
3844		invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32))
3845	}
3846	if s.QueryString == nil {
3847		invalidParams.Add(request.NewErrParamRequired("QueryString"))
3848	}
3849	if s.QueryString != nil && len(*s.QueryString) < 1 {
3850		invalidParams.Add(request.NewErrParamMinLen("QueryString", 1))
3851	}
3852	if s.QueryExecutionContext != nil {
3853		if err := s.QueryExecutionContext.Validate(); err != nil {
3854			invalidParams.AddNested("QueryExecutionContext", err.(request.ErrInvalidParams))
3855		}
3856	}
3857	if s.ResultConfiguration != nil {
3858		if err := s.ResultConfiguration.Validate(); err != nil {
3859			invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams))
3860		}
3861	}
3862
3863	if invalidParams.Len() > 0 {
3864		return invalidParams
3865	}
3866	return nil
3867}
3868
3869// SetClientRequestToken sets the ClientRequestToken field's value.
3870func (s *StartQueryExecutionInput) SetClientRequestToken(v string) *StartQueryExecutionInput {
3871	s.ClientRequestToken = &v
3872	return s
3873}
3874
3875// SetQueryExecutionContext sets the QueryExecutionContext field's value.
3876func (s *StartQueryExecutionInput) SetQueryExecutionContext(v *QueryExecutionContext) *StartQueryExecutionInput {
3877	s.QueryExecutionContext = v
3878	return s
3879}
3880
3881// SetQueryString sets the QueryString field's value.
3882func (s *StartQueryExecutionInput) SetQueryString(v string) *StartQueryExecutionInput {
3883	s.QueryString = &v
3884	return s
3885}
3886
3887// SetResultConfiguration sets the ResultConfiguration field's value.
3888func (s *StartQueryExecutionInput) SetResultConfiguration(v *ResultConfiguration) *StartQueryExecutionInput {
3889	s.ResultConfiguration = v
3890	return s
3891}
3892
3893// SetWorkGroup sets the WorkGroup field's value.
3894func (s *StartQueryExecutionInput) SetWorkGroup(v string) *StartQueryExecutionInput {
3895	s.WorkGroup = &v
3896	return s
3897}
3898
3899type StartQueryExecutionOutput struct {
3900	_ struct{} `type:"structure"`
3901
3902	// The unique ID of the query that ran as a result of this request.
3903	QueryExecutionId *string `type:"string"`
3904}
3905
3906// String returns the string representation
3907func (s StartQueryExecutionOutput) String() string {
3908	return awsutil.Prettify(s)
3909}
3910
3911// GoString returns the string representation
3912func (s StartQueryExecutionOutput) GoString() string {
3913	return s.String()
3914}
3915
3916// SetQueryExecutionId sets the QueryExecutionId field's value.
3917func (s *StartQueryExecutionOutput) SetQueryExecutionId(v string) *StartQueryExecutionOutput {
3918	s.QueryExecutionId = &v
3919	return s
3920}
3921
3922type StopQueryExecutionInput struct {
3923	_ struct{} `type:"structure"`
3924
3925	// The unique ID of the query execution to stop.
3926	QueryExecutionId *string `type:"string" idempotencyToken:"true"`
3927}
3928
3929// String returns the string representation
3930func (s StopQueryExecutionInput) String() string {
3931	return awsutil.Prettify(s)
3932}
3933
3934// GoString returns the string representation
3935func (s StopQueryExecutionInput) GoString() string {
3936	return s.String()
3937}
3938
3939// SetQueryExecutionId sets the QueryExecutionId field's value.
3940func (s *StopQueryExecutionInput) SetQueryExecutionId(v string) *StopQueryExecutionInput {
3941	s.QueryExecutionId = &v
3942	return s
3943}
3944
3945type StopQueryExecutionOutput struct {
3946	_ struct{} `type:"structure"`
3947}
3948
3949// String returns the string representation
3950func (s StopQueryExecutionOutput) String() string {
3951	return awsutil.Prettify(s)
3952}
3953
3954// GoString returns the string representation
3955func (s StopQueryExecutionOutput) GoString() string {
3956	return s.String()
3957}
3958
3959// A tag that you can add to a resource. A tag is a label that you assign to
3960// an AWS Athena resource (a workgroup). Each tag consists of a key and an optional
3961// value, both of which you define. Tags enable you to categorize workgroups
3962// in Athena, for example, by purpose, owner, or environment. Use a consistent
3963// set of tag keys to make it easier to search and filter workgroups in your
3964// account. The maximum tag key length is 128 Unicode characters in UTF-8. The
3965// maximum tag value length is 256 Unicode characters in UTF-8. You can use
3966// letters and numbers representable in UTF-8, and the following characters:
3967// + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be
3968// unique per resource.
3969type Tag struct {
3970	_ struct{} `type:"structure"`
3971
3972	// A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8.
3973	// You can use letters and numbers representable in UTF-8, and the following
3974	// characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique
3975	// per resource.
3976	Key *string `min:"1" type:"string"`
3977
3978	// A tag value. The tag value length is from 0 to 256 Unicode characters in
3979	// UTF-8. You can use letters and numbers representable in UTF-8, and the following
3980	// characters: + - = . _ : / @. Tag values are case-sensitive.
3981	Value *string `type:"string"`
3982}
3983
3984// String returns the string representation
3985func (s Tag) String() string {
3986	return awsutil.Prettify(s)
3987}
3988
3989// GoString returns the string representation
3990func (s Tag) GoString() string {
3991	return s.String()
3992}
3993
3994// Validate inspects the fields of the type to determine if they are valid.
3995func (s *Tag) Validate() error {
3996	invalidParams := request.ErrInvalidParams{Context: "Tag"}
3997	if s.Key != nil && len(*s.Key) < 1 {
3998		invalidParams.Add(request.NewErrParamMinLen("Key", 1))
3999	}
4000
4001	if invalidParams.Len() > 0 {
4002		return invalidParams
4003	}
4004	return nil
4005}
4006
4007// SetKey sets the Key field's value.
4008func (s *Tag) SetKey(v string) *Tag {
4009	s.Key = &v
4010	return s
4011}
4012
4013// SetValue sets the Value field's value.
4014func (s *Tag) SetValue(v string) *Tag {
4015	s.Value = &v
4016	return s
4017}
4018
4019type TagResourceInput struct {
4020	_ struct{} `type:"structure"`
4021
4022	// Requests that one or more tags are added to the resource (such as a workgroup)
4023	// for the specified ARN.
4024	//
4025	// ResourceARN is a required field
4026	ResourceARN *string `min:"1" type:"string" required:"true"`
4027
4028	// One or more tags, separated by commas, to be added to the resource, such
4029	// as a workgroup.
4030	//
4031	// Tags is a required field
4032	Tags []*Tag `type:"list" required:"true"`
4033}
4034
4035// String returns the string representation
4036func (s TagResourceInput) String() string {
4037	return awsutil.Prettify(s)
4038}
4039
4040// GoString returns the string representation
4041func (s TagResourceInput) GoString() string {
4042	return s.String()
4043}
4044
4045// Validate inspects the fields of the type to determine if they are valid.
4046func (s *TagResourceInput) Validate() error {
4047	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
4048	if s.ResourceARN == nil {
4049		invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
4050	}
4051	if s.ResourceARN != nil && len(*s.ResourceARN) < 1 {
4052		invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1))
4053	}
4054	if s.Tags == nil {
4055		invalidParams.Add(request.NewErrParamRequired("Tags"))
4056	}
4057	if s.Tags != nil {
4058		for i, v := range s.Tags {
4059			if v == nil {
4060				continue
4061			}
4062			if err := v.Validate(); err != nil {
4063				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
4064			}
4065		}
4066	}
4067
4068	if invalidParams.Len() > 0 {
4069		return invalidParams
4070	}
4071	return nil
4072}
4073
4074// SetResourceARN sets the ResourceARN field's value.
4075func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput {
4076	s.ResourceARN = &v
4077	return s
4078}
4079
4080// SetTags sets the Tags field's value.
4081func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
4082	s.Tags = v
4083	return s
4084}
4085
4086type TagResourceOutput struct {
4087	_ struct{} `type:"structure"`
4088}
4089
4090// String returns the string representation
4091func (s TagResourceOutput) String() string {
4092	return awsutil.Prettify(s)
4093}
4094
4095// GoString returns the string representation
4096func (s TagResourceOutput) GoString() string {
4097	return s.String()
4098}
4099
4100// Information about a named query ID that could not be processed.
4101type UnprocessedNamedQueryId struct {
4102	_ struct{} `type:"structure"`
4103
4104	// The error code returned when the processing request for the named query failed,
4105	// if applicable.
4106	ErrorCode *string `min:"1" type:"string"`
4107
4108	// The error message returned when the processing request for the named query
4109	// failed, if applicable.
4110	ErrorMessage *string `type:"string"`
4111
4112	// The unique identifier of the named query.
4113	NamedQueryId *string `type:"string"`
4114}
4115
4116// String returns the string representation
4117func (s UnprocessedNamedQueryId) String() string {
4118	return awsutil.Prettify(s)
4119}
4120
4121// GoString returns the string representation
4122func (s UnprocessedNamedQueryId) GoString() string {
4123	return s.String()
4124}
4125
4126// SetErrorCode sets the ErrorCode field's value.
4127func (s *UnprocessedNamedQueryId) SetErrorCode(v string) *UnprocessedNamedQueryId {
4128	s.ErrorCode = &v
4129	return s
4130}
4131
4132// SetErrorMessage sets the ErrorMessage field's value.
4133func (s *UnprocessedNamedQueryId) SetErrorMessage(v string) *UnprocessedNamedQueryId {
4134	s.ErrorMessage = &v
4135	return s
4136}
4137
4138// SetNamedQueryId sets the NamedQueryId field's value.
4139func (s *UnprocessedNamedQueryId) SetNamedQueryId(v string) *UnprocessedNamedQueryId {
4140	s.NamedQueryId = &v
4141	return s
4142}
4143
4144// Describes a query execution that failed to process.
4145type UnprocessedQueryExecutionId struct {
4146	_ struct{} `type:"structure"`
4147
4148	// The error code returned when the query execution failed to process, if applicable.
4149	ErrorCode *string `min:"1" type:"string"`
4150
4151	// The error message returned when the query execution failed to process, if
4152	// applicable.
4153	ErrorMessage *string `type:"string"`
4154
4155	// The unique identifier of the query execution.
4156	QueryExecutionId *string `type:"string"`
4157}
4158
4159// String returns the string representation
4160func (s UnprocessedQueryExecutionId) String() string {
4161	return awsutil.Prettify(s)
4162}
4163
4164// GoString returns the string representation
4165func (s UnprocessedQueryExecutionId) GoString() string {
4166	return s.String()
4167}
4168
4169// SetErrorCode sets the ErrorCode field's value.
4170func (s *UnprocessedQueryExecutionId) SetErrorCode(v string) *UnprocessedQueryExecutionId {
4171	s.ErrorCode = &v
4172	return s
4173}
4174
4175// SetErrorMessage sets the ErrorMessage field's value.
4176func (s *UnprocessedQueryExecutionId) SetErrorMessage(v string) *UnprocessedQueryExecutionId {
4177	s.ErrorMessage = &v
4178	return s
4179}
4180
4181// SetQueryExecutionId sets the QueryExecutionId field's value.
4182func (s *UnprocessedQueryExecutionId) SetQueryExecutionId(v string) *UnprocessedQueryExecutionId {
4183	s.QueryExecutionId = &v
4184	return s
4185}
4186
4187type UntagResourceInput struct {
4188	_ struct{} `type:"structure"`
4189
4190	// Removes one or more tags from the workgroup resource for the specified ARN.
4191	//
4192	// ResourceARN is a required field
4193	ResourceARN *string `min:"1" type:"string" required:"true"`
4194
4195	// Removes the tags associated with one or more tag keys from the workgroup
4196	// resource.
4197	//
4198	// TagKeys is a required field
4199	TagKeys []*string `type:"list" required:"true"`
4200}
4201
4202// String returns the string representation
4203func (s UntagResourceInput) String() string {
4204	return awsutil.Prettify(s)
4205}
4206
4207// GoString returns the string representation
4208func (s UntagResourceInput) GoString() string {
4209	return s.String()
4210}
4211
4212// Validate inspects the fields of the type to determine if they are valid.
4213func (s *UntagResourceInput) Validate() error {
4214	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
4215	if s.ResourceARN == nil {
4216		invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
4217	}
4218	if s.ResourceARN != nil && len(*s.ResourceARN) < 1 {
4219		invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1))
4220	}
4221	if s.TagKeys == nil {
4222		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
4223	}
4224
4225	if invalidParams.Len() > 0 {
4226		return invalidParams
4227	}
4228	return nil
4229}
4230
4231// SetResourceARN sets the ResourceARN field's value.
4232func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput {
4233	s.ResourceARN = &v
4234	return s
4235}
4236
4237// SetTagKeys sets the TagKeys field's value.
4238func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
4239	s.TagKeys = v
4240	return s
4241}
4242
4243type UntagResourceOutput struct {
4244	_ struct{} `type:"structure"`
4245}
4246
4247// String returns the string representation
4248func (s UntagResourceOutput) String() string {
4249	return awsutil.Prettify(s)
4250}
4251
4252// GoString returns the string representation
4253func (s UntagResourceOutput) GoString() string {
4254	return s.String()
4255}
4256
4257type UpdateWorkGroupInput struct {
4258	_ struct{} `type:"structure"`
4259
4260	// The workgroup configuration that will be updated for the given workgroup.
4261	ConfigurationUpdates *WorkGroupConfigurationUpdates `type:"structure"`
4262
4263	// The workgroup description.
4264	Description *string `type:"string"`
4265
4266	// The workgroup state that will be updated for the given workgroup.
4267	State *string `type:"string" enum:"WorkGroupState"`
4268
4269	// The specified workgroup that will be updated.
4270	//
4271	// WorkGroup is a required field
4272	WorkGroup *string `type:"string" required:"true"`
4273}
4274
4275// String returns the string representation
4276func (s UpdateWorkGroupInput) String() string {
4277	return awsutil.Prettify(s)
4278}
4279
4280// GoString returns the string representation
4281func (s UpdateWorkGroupInput) GoString() string {
4282	return s.String()
4283}
4284
4285// Validate inspects the fields of the type to determine if they are valid.
4286func (s *UpdateWorkGroupInput) Validate() error {
4287	invalidParams := request.ErrInvalidParams{Context: "UpdateWorkGroupInput"}
4288	if s.WorkGroup == nil {
4289		invalidParams.Add(request.NewErrParamRequired("WorkGroup"))
4290	}
4291	if s.ConfigurationUpdates != nil {
4292		if err := s.ConfigurationUpdates.Validate(); err != nil {
4293			invalidParams.AddNested("ConfigurationUpdates", err.(request.ErrInvalidParams))
4294		}
4295	}
4296
4297	if invalidParams.Len() > 0 {
4298		return invalidParams
4299	}
4300	return nil
4301}
4302
4303// SetConfigurationUpdates sets the ConfigurationUpdates field's value.
4304func (s *UpdateWorkGroupInput) SetConfigurationUpdates(v *WorkGroupConfigurationUpdates) *UpdateWorkGroupInput {
4305	s.ConfigurationUpdates = v
4306	return s
4307}
4308
4309// SetDescription sets the Description field's value.
4310func (s *UpdateWorkGroupInput) SetDescription(v string) *UpdateWorkGroupInput {
4311	s.Description = &v
4312	return s
4313}
4314
4315// SetState sets the State field's value.
4316func (s *UpdateWorkGroupInput) SetState(v string) *UpdateWorkGroupInput {
4317	s.State = &v
4318	return s
4319}
4320
4321// SetWorkGroup sets the WorkGroup field's value.
4322func (s *UpdateWorkGroupInput) SetWorkGroup(v string) *UpdateWorkGroupInput {
4323	s.WorkGroup = &v
4324	return s
4325}
4326
4327type UpdateWorkGroupOutput struct {
4328	_ struct{} `type:"structure"`
4329}
4330
4331// String returns the string representation
4332func (s UpdateWorkGroupOutput) String() string {
4333	return awsutil.Prettify(s)
4334}
4335
4336// GoString returns the string representation
4337func (s UpdateWorkGroupOutput) GoString() string {
4338	return s.String()
4339}
4340
4341// A workgroup, which contains a name, description, creation time, state, and
4342// other configuration, listed under WorkGroup$Configuration. Each workgroup
4343// enables you to isolate queries for you or your group of users from other
4344// queries in the same account, to configure the query results location and
4345// the encryption configuration (known as workgroup settings), to enable sending
4346// query metrics to Amazon CloudWatch, and to establish per-query data usage
4347// control limits for all queries in a workgroup. The workgroup settings override
4348// is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration.
4349// See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
4350type WorkGroup struct {
4351	_ struct{} `type:"structure"`
4352
4353	// The configuration of the workgroup, which includes the location in Amazon
4354	// S3 where query results are stored, the encryption configuration, if any,
4355	// used for query results; whether the Amazon CloudWatch Metrics are enabled
4356	// for the workgroup; whether workgroup settings override client-side settings;
4357	// and the data usage limits for the amount of data scanned per query or per
4358	// workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration
4359	// (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
4360	Configuration *WorkGroupConfiguration `type:"structure"`
4361
4362	// The date and time the workgroup was created.
4363	CreationTime *time.Time `type:"timestamp"`
4364
4365	// The workgroup description.
4366	Description *string `type:"string"`
4367
4368	// The workgroup name.
4369	//
4370	// Name is a required field
4371	Name *string `type:"string" required:"true"`
4372
4373	// The state of the workgroup: ENABLED or DISABLED.
4374	State *string `type:"string" enum:"WorkGroupState"`
4375}
4376
4377// String returns the string representation
4378func (s WorkGroup) String() string {
4379	return awsutil.Prettify(s)
4380}
4381
4382// GoString returns the string representation
4383func (s WorkGroup) GoString() string {
4384	return s.String()
4385}
4386
4387// SetConfiguration sets the Configuration field's value.
4388func (s *WorkGroup) SetConfiguration(v *WorkGroupConfiguration) *WorkGroup {
4389	s.Configuration = v
4390	return s
4391}
4392
4393// SetCreationTime sets the CreationTime field's value.
4394func (s *WorkGroup) SetCreationTime(v time.Time) *WorkGroup {
4395	s.CreationTime = &v
4396	return s
4397}
4398
4399// SetDescription sets the Description field's value.
4400func (s *WorkGroup) SetDescription(v string) *WorkGroup {
4401	s.Description = &v
4402	return s
4403}
4404
4405// SetName sets the Name field's value.
4406func (s *WorkGroup) SetName(v string) *WorkGroup {
4407	s.Name = &v
4408	return s
4409}
4410
4411// SetState sets the State field's value.
4412func (s *WorkGroup) SetState(v string) *WorkGroup {
4413	s.State = &v
4414	return s
4415}
4416
4417// The configuration of the workgroup, which includes the location in Amazon
4418// S3 where query results are stored, the encryption option, if any, used for
4419// query results, whether the Amazon CloudWatch Metrics are enabled for the
4420// workgroup and whether workgroup settings override query settings, and the
4421// data usage limits for the amount of data scanned per query or per workgroup.
4422// The workgroup settings override is specified in EnforceWorkGroupConfiguration
4423// (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
4424type WorkGroupConfiguration struct {
4425	_ struct{} `type:"structure"`
4426
4427	// The upper data usage limit (cutoff) for the amount of bytes a single query
4428	// in a workgroup is allowed to scan.
4429	BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"`
4430
4431	// If set to "true", the settings for the workgroup override client-side settings.
4432	// If set to "false", client-side settings are used. For more information, see
4433	// Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
4434	EnforceWorkGroupConfiguration *bool `type:"boolean"`
4435
4436	// Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
4437	PublishCloudWatchMetricsEnabled *bool `type:"boolean"`
4438
4439	// If set to true, allows members assigned to a workgroup to reference Amazon
4440	// S3 Requester Pays buckets in queries. If set to false, workgroup members
4441	// cannot query data from Requester Pays buckets, and queries that retrieve
4442	// data from Requester Pays buckets cause an error. The default is false. For
4443	// more information about Requester Pays buckets, see Requester Pays Buckets
4444	// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
4445	// in the Amazon Simple Storage Service Developer Guide.
4446	RequesterPaysEnabled *bool `type:"boolean"`
4447
4448	// The configuration for the workgroup, which includes the location in Amazon
4449	// S3 where query results are stored and the encryption option, if any, used
4450	// for query results. To run the query, you must specify the query results location
4451	// using one of the ways: either in the workgroup using this setting, or for
4452	// individual queries (client-side), using ResultConfiguration$OutputLocation.
4453	// If none of them is set, Athena issues an error that no output location is
4454	// provided. For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html).
4455	ResultConfiguration *ResultConfiguration `type:"structure"`
4456}
4457
4458// String returns the string representation
4459func (s WorkGroupConfiguration) String() string {
4460	return awsutil.Prettify(s)
4461}
4462
4463// GoString returns the string representation
4464func (s WorkGroupConfiguration) GoString() string {
4465	return s.String()
4466}
4467
4468// Validate inspects the fields of the type to determine if they are valid.
4469func (s *WorkGroupConfiguration) Validate() error {
4470	invalidParams := request.ErrInvalidParams{Context: "WorkGroupConfiguration"}
4471	if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 {
4472		invalidParams.Add(request.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07))
4473	}
4474	if s.ResultConfiguration != nil {
4475		if err := s.ResultConfiguration.Validate(); err != nil {
4476			invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams))
4477		}
4478	}
4479
4480	if invalidParams.Len() > 0 {
4481		return invalidParams
4482	}
4483	return nil
4484}
4485
4486// SetBytesScannedCutoffPerQuery sets the BytesScannedCutoffPerQuery field's value.
4487func (s *WorkGroupConfiguration) SetBytesScannedCutoffPerQuery(v int64) *WorkGroupConfiguration {
4488	s.BytesScannedCutoffPerQuery = &v
4489	return s
4490}
4491
4492// SetEnforceWorkGroupConfiguration sets the EnforceWorkGroupConfiguration field's value.
4493func (s *WorkGroupConfiguration) SetEnforceWorkGroupConfiguration(v bool) *WorkGroupConfiguration {
4494	s.EnforceWorkGroupConfiguration = &v
4495	return s
4496}
4497
4498// SetPublishCloudWatchMetricsEnabled sets the PublishCloudWatchMetricsEnabled field's value.
4499func (s *WorkGroupConfiguration) SetPublishCloudWatchMetricsEnabled(v bool) *WorkGroupConfiguration {
4500	s.PublishCloudWatchMetricsEnabled = &v
4501	return s
4502}
4503
4504// SetRequesterPaysEnabled sets the RequesterPaysEnabled field's value.
4505func (s *WorkGroupConfiguration) SetRequesterPaysEnabled(v bool) *WorkGroupConfiguration {
4506	s.RequesterPaysEnabled = &v
4507	return s
4508}
4509
4510// SetResultConfiguration sets the ResultConfiguration field's value.
4511func (s *WorkGroupConfiguration) SetResultConfiguration(v *ResultConfiguration) *WorkGroupConfiguration {
4512	s.ResultConfiguration = v
4513	return s
4514}
4515
4516// The configuration information that will be updated for this workgroup, which
4517// includes the location in Amazon S3 where query results are stored, the encryption
4518// option, if any, used for query results, whether the Amazon CloudWatch Metrics
4519// are enabled for the workgroup, whether the workgroup settings override the
4520// client-side settings, and the data usage limit for the amount of bytes scanned
4521// per query, if it is specified.
4522type WorkGroupConfigurationUpdates struct {
4523	_ struct{} `type:"structure"`
4524
4525	// The upper limit (cutoff) for the amount of bytes a single query in a workgroup
4526	// is allowed to scan.
4527	BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"`
4528
4529	// If set to "true", the settings for the workgroup override client-side settings.
4530	// If set to "false" client-side settings are used. For more information, see
4531	// Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
4532	EnforceWorkGroupConfiguration *bool `type:"boolean"`
4533
4534	// Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
4535	PublishCloudWatchMetricsEnabled *bool `type:"boolean"`
4536
4537	// Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery
4538	RemoveBytesScannedCutoffPerQuery *bool `type:"boolean"`
4539
4540	// If set to true, allows members assigned to a workgroup to specify Amazon
4541	// S3 Requester Pays buckets in queries. If set to false, workgroup members
4542	// cannot query data from Requester Pays buckets, and queries that retrieve
4543	// data from Requester Pays buckets cause an error. The default is false. For
4544	// more information about Requester Pays buckets, see Requester Pays Buckets
4545	// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
4546	// in the Amazon Simple Storage Service Developer Guide.
4547	RequesterPaysEnabled *bool `type:"boolean"`
4548
4549	// The result configuration information about the queries in this workgroup
4550	// that will be updated. Includes the updated results location and an updated
4551	// option for encrypting query results.
4552	ResultConfigurationUpdates *ResultConfigurationUpdates `type:"structure"`
4553}
4554
4555// String returns the string representation
4556func (s WorkGroupConfigurationUpdates) String() string {
4557	return awsutil.Prettify(s)
4558}
4559
4560// GoString returns the string representation
4561func (s WorkGroupConfigurationUpdates) GoString() string {
4562	return s.String()
4563}
4564
4565// Validate inspects the fields of the type to determine if they are valid.
4566func (s *WorkGroupConfigurationUpdates) Validate() error {
4567	invalidParams := request.ErrInvalidParams{Context: "WorkGroupConfigurationUpdates"}
4568	if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 {
4569		invalidParams.Add(request.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07))
4570	}
4571	if s.ResultConfigurationUpdates != nil {
4572		if err := s.ResultConfigurationUpdates.Validate(); err != nil {
4573			invalidParams.AddNested("ResultConfigurationUpdates", err.(request.ErrInvalidParams))
4574		}
4575	}
4576
4577	if invalidParams.Len() > 0 {
4578		return invalidParams
4579	}
4580	return nil
4581}
4582
4583// SetBytesScannedCutoffPerQuery sets the BytesScannedCutoffPerQuery field's value.
4584func (s *WorkGroupConfigurationUpdates) SetBytesScannedCutoffPerQuery(v int64) *WorkGroupConfigurationUpdates {
4585	s.BytesScannedCutoffPerQuery = &v
4586	return s
4587}
4588
4589// SetEnforceWorkGroupConfiguration sets the EnforceWorkGroupConfiguration field's value.
4590func (s *WorkGroupConfigurationUpdates) SetEnforceWorkGroupConfiguration(v bool) *WorkGroupConfigurationUpdates {
4591	s.EnforceWorkGroupConfiguration = &v
4592	return s
4593}
4594
4595// SetPublishCloudWatchMetricsEnabled sets the PublishCloudWatchMetricsEnabled field's value.
4596func (s *WorkGroupConfigurationUpdates) SetPublishCloudWatchMetricsEnabled(v bool) *WorkGroupConfigurationUpdates {
4597	s.PublishCloudWatchMetricsEnabled = &v
4598	return s
4599}
4600
4601// SetRemoveBytesScannedCutoffPerQuery sets the RemoveBytesScannedCutoffPerQuery field's value.
4602func (s *WorkGroupConfigurationUpdates) SetRemoveBytesScannedCutoffPerQuery(v bool) *WorkGroupConfigurationUpdates {
4603	s.RemoveBytesScannedCutoffPerQuery = &v
4604	return s
4605}
4606
4607// SetRequesterPaysEnabled sets the RequesterPaysEnabled field's value.
4608func (s *WorkGroupConfigurationUpdates) SetRequesterPaysEnabled(v bool) *WorkGroupConfigurationUpdates {
4609	s.RequesterPaysEnabled = &v
4610	return s
4611}
4612
4613// SetResultConfigurationUpdates sets the ResultConfigurationUpdates field's value.
4614func (s *WorkGroupConfigurationUpdates) SetResultConfigurationUpdates(v *ResultConfigurationUpdates) *WorkGroupConfigurationUpdates {
4615	s.ResultConfigurationUpdates = v
4616	return s
4617}
4618
4619// The summary information for the workgroup, which includes its name, state,
4620// description, and the date and time it was created.
4621type WorkGroupSummary struct {
4622	_ struct{} `type:"structure"`
4623
4624	// The workgroup creation date and time.
4625	CreationTime *time.Time `type:"timestamp"`
4626
4627	// The workgroup description.
4628	Description *string `type:"string"`
4629
4630	// The name of the workgroup.
4631	Name *string `type:"string"`
4632
4633	// The state of the workgroup.
4634	State *string `type:"string" enum:"WorkGroupState"`
4635}
4636
4637// String returns the string representation
4638func (s WorkGroupSummary) String() string {
4639	return awsutil.Prettify(s)
4640}
4641
4642// GoString returns the string representation
4643func (s WorkGroupSummary) GoString() string {
4644	return s.String()
4645}
4646
4647// SetCreationTime sets the CreationTime field's value.
4648func (s *WorkGroupSummary) SetCreationTime(v time.Time) *WorkGroupSummary {
4649	s.CreationTime = &v
4650	return s
4651}
4652
4653// SetDescription sets the Description field's value.
4654func (s *WorkGroupSummary) SetDescription(v string) *WorkGroupSummary {
4655	s.Description = &v
4656	return s
4657}
4658
4659// SetName sets the Name field's value.
4660func (s *WorkGroupSummary) SetName(v string) *WorkGroupSummary {
4661	s.Name = &v
4662	return s
4663}
4664
4665// SetState sets the State field's value.
4666func (s *WorkGroupSummary) SetState(v string) *WorkGroupSummary {
4667	s.State = &v
4668	return s
4669}
4670
4671const (
4672	// ColumnNullableNotNull is a ColumnNullable enum value
4673	ColumnNullableNotNull = "NOT_NULL"
4674
4675	// ColumnNullableNullable is a ColumnNullable enum value
4676	ColumnNullableNullable = "NULLABLE"
4677
4678	// ColumnNullableUnknown is a ColumnNullable enum value
4679	ColumnNullableUnknown = "UNKNOWN"
4680)
4681
4682const (
4683	// EncryptionOptionSseS3 is a EncryptionOption enum value
4684	EncryptionOptionSseS3 = "SSE_S3"
4685
4686	// EncryptionOptionSseKms is a EncryptionOption enum value
4687	EncryptionOptionSseKms = "SSE_KMS"
4688
4689	// EncryptionOptionCseKms is a EncryptionOption enum value
4690	EncryptionOptionCseKms = "CSE_KMS"
4691)
4692
4693const (
4694	// QueryExecutionStateQueued is a QueryExecutionState enum value
4695	QueryExecutionStateQueued = "QUEUED"
4696
4697	// QueryExecutionStateRunning is a QueryExecutionState enum value
4698	QueryExecutionStateRunning = "RUNNING"
4699
4700	// QueryExecutionStateSucceeded is a QueryExecutionState enum value
4701	QueryExecutionStateSucceeded = "SUCCEEDED"
4702
4703	// QueryExecutionStateFailed is a QueryExecutionState enum value
4704	QueryExecutionStateFailed = "FAILED"
4705
4706	// QueryExecutionStateCancelled is a QueryExecutionState enum value
4707	QueryExecutionStateCancelled = "CANCELLED"
4708)
4709
4710const (
4711	// StatementTypeDdl is a StatementType enum value
4712	StatementTypeDdl = "DDL"
4713
4714	// StatementTypeDml is a StatementType enum value
4715	StatementTypeDml = "DML"
4716
4717	// StatementTypeUtility is a StatementType enum value
4718	StatementTypeUtility = "UTILITY"
4719)
4720
4721// The reason for the query throttling, for example, when it exceeds the concurrent
4722// query limit.
4723const (
4724	// ThrottleReasonConcurrentQueryLimitExceeded is a ThrottleReason enum value
4725	ThrottleReasonConcurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED"
4726)
4727
4728const (
4729	// WorkGroupStateEnabled is a WorkGroupState enum value
4730	WorkGroupStateEnabled = "ENABLED"
4731
4732	// WorkGroupStateDisabled is a WorkGroupState enum value
4733	WorkGroupStateDisabled = "DISABLED"
4734)
4735