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