1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package athena
4
5import (
6	"fmt"
7	"time"
8
9	"github.com/aws/aws-sdk-go/aws"
10	"github.com/aws/aws-sdk-go/aws/awsutil"
11	"github.com/aws/aws-sdk-go/aws/request"
12	"github.com/aws/aws-sdk-go/private/protocol"
13	"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
14)
15
16const opBatchGetNamedQuery = "BatchGetNamedQuery"
17
18// BatchGetNamedQueryRequest generates a "aws/request.Request" representing the
19// client's request for the BatchGetNamedQuery operation. The "output" return
20// value will be populated with the request's response once the request completes
21// successfully.
22//
23// Use "Send" method on the returned Request to send the API call to the service.
24// the "output" return value is not valid until after Send returns without error.
25//
26// See BatchGetNamedQuery for more information on using the BatchGetNamedQuery
27// API call, and error handling.
28//
29// This method is useful when you want to inject custom logic or configuration
30// into the SDK's request lifecycle. Such as custom headers, or retry logic.
31//
32//
33//    // Example sending a request using the BatchGetNamedQueryRequest method.
34//    req, resp := client.BatchGetNamedQueryRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40//
41// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery
42func (c *Athena) BatchGetNamedQueryRequest(input *BatchGetNamedQueryInput) (req *request.Request, output *BatchGetNamedQueryOutput) {
43	op := &request.Operation{
44		Name:       opBatchGetNamedQuery,
45		HTTPMethod: "POST",
46		HTTPPath:   "/",
47	}
48
49	if input == nil {
50		input = &BatchGetNamedQueryInput{}
51	}
52
53	output = &BatchGetNamedQueryOutput{}
54	req = c.newRequest(op, input, output)
55	return
56}
57
58// BatchGetNamedQuery API operation for Amazon Athena.
59//
60// Returns the details of a single named query or a list of up to 50 queries,
61// which you provide as an array of query ID strings. Requires you to have access
62// to the workgroup in which the queries were saved. Use ListNamedQueriesInput
63// to get the list of named query IDs in the specified workgroup. If information
64// could not be retrieved for a submitted query ID, information about the query
65// ID submitted is listed under UnprocessedNamedQueryId. Named queries differ
66// from executed queries. Use BatchGetQueryExecutionInput to get details about
67// each unique query execution, and ListQueryExecutionsInput to get a list of
68// query execution IDs.
69//
70// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
71// with awserr.Error's Code and Message methods to get detailed information about
72// the error.
73//
74// See the AWS API reference guide for Amazon Athena's
75// API operation BatchGetNamedQuery for usage and error information.
76//
77// Returned Error Codes:
78//   * ErrCodeInternalServerException "InternalServerException"
79//   Indicates a platform issue, which may be due to a transient condition or
80//   outage.
81//
82//   * ErrCodeInvalidRequestException "InvalidRequestException"
83//   Indicates that something is wrong with the input to the request. For example,
84//   a required parameter may be missing or out of range.
85//
86// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery
87func (c *Athena) BatchGetNamedQuery(input *BatchGetNamedQueryInput) (*BatchGetNamedQueryOutput, error) {
88	req, out := c.BatchGetNamedQueryRequest(input)
89	return out, req.Send()
90}
91
92// BatchGetNamedQueryWithContext is the same as BatchGetNamedQuery with the addition of
93// the ability to pass a context and additional request options.
94//
95// See BatchGetNamedQuery for details on how to use this API operation.
96//
97// The context must be non-nil and will be used for request cancellation. If
98// the context is nil a panic will occur. In the future the SDK may create
99// sub-contexts for http.Requests. See https://golang.org/pkg/context/
100// for more information on using Contexts.
101func (c *Athena) BatchGetNamedQueryWithContext(ctx aws.Context, input *BatchGetNamedQueryInput, opts ...request.Option) (*BatchGetNamedQueryOutput, error) {
102	req, out := c.BatchGetNamedQueryRequest(input)
103	req.SetContext(ctx)
104	req.ApplyOptions(opts...)
105	return out, req.Send()
106}
107
108const opBatchGetQueryExecution = "BatchGetQueryExecution"
109
110// BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the
111// client's request for the BatchGetQueryExecution operation. The "output" return
112// value will be populated with the request's response once the request completes
113// successfully.
114//
115// Use "Send" method on the returned Request to send the API call to the service.
116// the "output" return value is not valid until after Send returns without error.
117//
118// See BatchGetQueryExecution for more information on using the BatchGetQueryExecution
119// API call, and error handling.
120//
121// This method is useful when you want to inject custom logic or configuration
122// into the SDK's request lifecycle. Such as custom headers, or retry logic.
123//
124//
125//    // Example sending a request using the BatchGetQueryExecutionRequest method.
126//    req, resp := client.BatchGetQueryExecutionRequest(params)
127//
128//    err := req.Send()
129//    if err == nil { // resp is now filled
130//        fmt.Println(resp)
131//    }
132//
133// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution
134func (c *Athena) BatchGetQueryExecutionRequest(input *BatchGetQueryExecutionInput) (req *request.Request, output *BatchGetQueryExecutionOutput) {
135	op := &request.Operation{
136		Name:       opBatchGetQueryExecution,
137		HTTPMethod: "POST",
138		HTTPPath:   "/",
139	}
140
141	if input == nil {
142		input = &BatchGetQueryExecutionInput{}
143	}
144
145	output = &BatchGetQueryExecutionOutput{}
146	req = c.newRequest(op, input, output)
147	return
148}
149
150// BatchGetQueryExecution API operation for Amazon Athena.
151//
152// Returns the details of a single query execution or a list of up to 50 query
153// executions, which you provide as an array of query execution ID strings.
154// Requires you to have access to the workgroup in which the queries ran. To
155// get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup.
156// Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput
157// to get details about named queries.
158//
159// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
160// with awserr.Error's Code and Message methods to get detailed information about
161// the error.
162//
163// See the AWS API reference guide for Amazon Athena's
164// API operation BatchGetQueryExecution for usage and error information.
165//
166// Returned Error Codes:
167//   * ErrCodeInternalServerException "InternalServerException"
168//   Indicates a platform issue, which may be due to a transient condition or
169//   outage.
170//
171//   * ErrCodeInvalidRequestException "InvalidRequestException"
172//   Indicates that something is wrong with the input to the request. For example,
173//   a required parameter may be missing or out of range.
174//
175// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetQueryExecution
176func (c *Athena) BatchGetQueryExecution(input *BatchGetQueryExecutionInput) (*BatchGetQueryExecutionOutput, error) {
177	req, out := c.BatchGetQueryExecutionRequest(input)
178	return out, req.Send()
179}
180
181// BatchGetQueryExecutionWithContext is the same as BatchGetQueryExecution with the addition of
182// the ability to pass a context and additional request options.
183//
184// See BatchGetQueryExecution for details on how to use this API operation.
185//
186// The context must be non-nil and will be used for request cancellation. If
187// the context is nil a panic will occur. In the future the SDK may create
188// sub-contexts for http.Requests. See https://golang.org/pkg/context/
189// for more information on using Contexts.
190func (c *Athena) BatchGetQueryExecutionWithContext(ctx aws.Context, input *BatchGetQueryExecutionInput, opts ...request.Option) (*BatchGetQueryExecutionOutput, error) {
191	req, out := c.BatchGetQueryExecutionRequest(input)
192	req.SetContext(ctx)
193	req.ApplyOptions(opts...)
194	return out, req.Send()
195}
196
197const opCreateNamedQuery = "CreateNamedQuery"
198
199// CreateNamedQueryRequest generates a "aws/request.Request" representing the
200// client's request for the CreateNamedQuery operation. The "output" return
201// value will be populated with the request's response once the request completes
202// successfully.
203//
204// Use "Send" method on the returned Request to send the API call to the service.
205// the "output" return value is not valid until after Send returns without error.
206//
207// See CreateNamedQuery for more information on using the CreateNamedQuery
208// API call, and error handling.
209//
210// This method is useful when you want to inject custom logic or configuration
211// into the SDK's request lifecycle. Such as custom headers, or retry logic.
212//
213//
214//    // Example sending a request using the CreateNamedQueryRequest method.
215//    req, resp := client.CreateNamedQueryRequest(params)
216//
217//    err := req.Send()
218//    if err == nil { // resp is now filled
219//        fmt.Println(resp)
220//    }
221//
222// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery
223func (c *Athena) CreateNamedQueryRequest(input *CreateNamedQueryInput) (req *request.Request, output *CreateNamedQueryOutput) {
224	op := &request.Operation{
225		Name:       opCreateNamedQuery,
226		HTTPMethod: "POST",
227		HTTPPath:   "/",
228	}
229
230	if input == nil {
231		input = &CreateNamedQueryInput{}
232	}
233
234	output = &CreateNamedQueryOutput{}
235	req = c.newRequest(op, input, output)
236	return
237}
238
239// CreateNamedQuery API operation for Amazon Athena.
240//
241// Creates a named query in the specified workgroup. Requires that you have
242// access to the workgroup.
243//
244// For code samples using the AWS SDK for Java, see Examples and Code Samples
245// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
246// Athena User Guide.
247//
248// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
249// with awserr.Error's Code and Message methods to get detailed information about
250// the error.
251//
252// See the AWS API reference guide for Amazon Athena's
253// API operation CreateNamedQuery for usage and error information.
254//
255// Returned Error Codes:
256//   * ErrCodeInternalServerException "InternalServerException"
257//   Indicates a platform issue, which may be due to a transient condition or
258//   outage.
259//
260//   * ErrCodeInvalidRequestException "InvalidRequestException"
261//   Indicates that something is wrong with the input to the request. For example,
262//   a required parameter may be missing or out of range.
263//
264// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateNamedQuery
265func (c *Athena) CreateNamedQuery(input *CreateNamedQueryInput) (*CreateNamedQueryOutput, error) {
266	req, out := c.CreateNamedQueryRequest(input)
267	return out, req.Send()
268}
269
270// CreateNamedQueryWithContext is the same as CreateNamedQuery with the addition of
271// the ability to pass a context and additional request options.
272//
273// See CreateNamedQuery for details on how to use this API operation.
274//
275// The context must be non-nil and will be used for request cancellation. If
276// the context is nil a panic will occur. In the future the SDK may create
277// sub-contexts for http.Requests. See https://golang.org/pkg/context/
278// for more information on using Contexts.
279func (c *Athena) CreateNamedQueryWithContext(ctx aws.Context, input *CreateNamedQueryInput, opts ...request.Option) (*CreateNamedQueryOutput, error) {
280	req, out := c.CreateNamedQueryRequest(input)
281	req.SetContext(ctx)
282	req.ApplyOptions(opts...)
283	return out, req.Send()
284}
285
286const opCreateWorkGroup = "CreateWorkGroup"
287
288// CreateWorkGroupRequest generates a "aws/request.Request" representing the
289// client's request for the CreateWorkGroup operation. The "output" return
290// value will be populated with the request's response once the request completes
291// successfully.
292//
293// Use "Send" method on the returned Request to send the API call to the service.
294// the "output" return value is not valid until after Send returns without error.
295//
296// See CreateWorkGroup for more information on using the CreateWorkGroup
297// API call, and error handling.
298//
299// This method is useful when you want to inject custom logic or configuration
300// into the SDK's request lifecycle. Such as custom headers, or retry logic.
301//
302//
303//    // Example sending a request using the CreateWorkGroupRequest method.
304//    req, resp := client.CreateWorkGroupRequest(params)
305//
306//    err := req.Send()
307//    if err == nil { // resp is now filled
308//        fmt.Println(resp)
309//    }
310//
311// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateWorkGroup
312func (c *Athena) CreateWorkGroupRequest(input *CreateWorkGroupInput) (req *request.Request, output *CreateWorkGroupOutput) {
313	op := &request.Operation{
314		Name:       opCreateWorkGroup,
315		HTTPMethod: "POST",
316		HTTPPath:   "/",
317	}
318
319	if input == nil {
320		input = &CreateWorkGroupInput{}
321	}
322
323	output = &CreateWorkGroupOutput{}
324	req = c.newRequest(op, input, output)
325	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
326	return
327}
328
329// CreateWorkGroup API operation for Amazon Athena.
330//
331// Creates a workgroup with the specified name.
332//
333// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
334// with awserr.Error's Code and Message methods to get detailed information about
335// the error.
336//
337// See the AWS API reference guide for Amazon Athena's
338// API operation CreateWorkGroup for usage and error information.
339//
340// Returned Error Codes:
341//   * ErrCodeInternalServerException "InternalServerException"
342//   Indicates a platform issue, which may be due to a transient condition or
343//   outage.
344//
345//   * ErrCodeInvalidRequestException "InvalidRequestException"
346//   Indicates that something is wrong with the input to the request. For example,
347//   a required parameter may be missing or out of range.
348//
349// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/CreateWorkGroup
350func (c *Athena) CreateWorkGroup(input *CreateWorkGroupInput) (*CreateWorkGroupOutput, error) {
351	req, out := c.CreateWorkGroupRequest(input)
352	return out, req.Send()
353}
354
355// CreateWorkGroupWithContext is the same as CreateWorkGroup with the addition of
356// the ability to pass a context and additional request options.
357//
358// See CreateWorkGroup for details on how to use this API operation.
359//
360// The context must be non-nil and will be used for request cancellation. If
361// the context is nil a panic will occur. In the future the SDK may create
362// sub-contexts for http.Requests. See https://golang.org/pkg/context/
363// for more information on using Contexts.
364func (c *Athena) CreateWorkGroupWithContext(ctx aws.Context, input *CreateWorkGroupInput, opts ...request.Option) (*CreateWorkGroupOutput, error) {
365	req, out := c.CreateWorkGroupRequest(input)
366	req.SetContext(ctx)
367	req.ApplyOptions(opts...)
368	return out, req.Send()
369}
370
371const opDeleteNamedQuery = "DeleteNamedQuery"
372
373// DeleteNamedQueryRequest generates a "aws/request.Request" representing the
374// client's request for the DeleteNamedQuery operation. The "output" return
375// value will be populated with the request's response once the request completes
376// successfully.
377//
378// Use "Send" method on the returned Request to send the API call to the service.
379// the "output" return value is not valid until after Send returns without error.
380//
381// See DeleteNamedQuery for more information on using the DeleteNamedQuery
382// API call, and error handling.
383//
384// This method is useful when you want to inject custom logic or configuration
385// into the SDK's request lifecycle. Such as custom headers, or retry logic.
386//
387//
388//    // Example sending a request using the DeleteNamedQueryRequest method.
389//    req, resp := client.DeleteNamedQueryRequest(params)
390//
391//    err := req.Send()
392//    if err == nil { // resp is now filled
393//        fmt.Println(resp)
394//    }
395//
396// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery
397func (c *Athena) DeleteNamedQueryRequest(input *DeleteNamedQueryInput) (req *request.Request, output *DeleteNamedQueryOutput) {
398	op := &request.Operation{
399		Name:       opDeleteNamedQuery,
400		HTTPMethod: "POST",
401		HTTPPath:   "/",
402	}
403
404	if input == nil {
405		input = &DeleteNamedQueryInput{}
406	}
407
408	output = &DeleteNamedQueryOutput{}
409	req = c.newRequest(op, input, output)
410	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
411	return
412}
413
414// DeleteNamedQuery API operation for Amazon Athena.
415//
416// Deletes the named query if you have access to the workgroup in which the
417// query was saved.
418//
419// For code samples using the AWS SDK for Java, see Examples and Code Samples
420// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon
421// Athena User Guide.
422//
423// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
424// with awserr.Error's Code and Message methods to get detailed information about
425// the error.
426//
427// See the AWS API reference guide for Amazon Athena's
428// API operation DeleteNamedQuery for usage and error information.
429//
430// Returned Error Codes:
431//   * ErrCodeInternalServerException "InternalServerException"
432//   Indicates a platform issue, which may be due to a transient condition or
433//   outage.
434//
435//   * ErrCodeInvalidRequestException "InvalidRequestException"
436//   Indicates that something is wrong with the input to the request. For example,
437//   a required parameter may be missing or out of range.
438//
439// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteNamedQuery
440func (c *Athena) DeleteNamedQuery(input *DeleteNamedQueryInput) (*DeleteNamedQueryOutput, error) {
441	req, out := c.DeleteNamedQueryRequest(input)
442	return out, req.Send()
443}
444
445// DeleteNamedQueryWithContext is the same as DeleteNamedQuery with the addition of
446// the ability to pass a context and additional request options.
447//
448// See DeleteNamedQuery for details on how to use this API operation.
449//
450// The context must be non-nil and will be used for request cancellation. If
451// the context is nil a panic will occur. In the future the SDK may create
452// sub-contexts for http.Requests. See https://golang.org/pkg/context/
453// for more information on using Contexts.
454func (c *Athena) DeleteNamedQueryWithContext(ctx aws.Context, input *DeleteNamedQueryInput, opts ...request.Option) (*DeleteNamedQueryOutput, error) {
455	req, out := c.DeleteNamedQueryRequest(input)
456	req.SetContext(ctx)
457	req.ApplyOptions(opts...)
458	return out, req.Send()
459}
460
461const opDeleteWorkGroup = "DeleteWorkGroup"
462
463// DeleteWorkGroupRequest generates a "aws/request.Request" representing the
464// client's request for the DeleteWorkGroup operation. The "output" return
465// value will be populated with the request's response once the request completes
466// successfully.
467//
468// Use "Send" method on the returned Request to send the API call to the service.
469// the "output" return value is not valid until after Send returns without error.
470//
471// See DeleteWorkGroup for more information on using the DeleteWorkGroup
472// API call, and error handling.
473//
474// This method is useful when you want to inject custom logic or configuration
475// into the SDK's request lifecycle. Such as custom headers, or retry logic.
476//
477//
478//    // Example sending a request using the DeleteWorkGroupRequest method.
479//    req, resp := client.DeleteWorkGroupRequest(params)
480//
481//    err := req.Send()
482//    if err == nil { // resp is now filled
483//        fmt.Println(resp)
484//    }
485//
486// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteWorkGroup
487func (c *Athena) DeleteWorkGroupRequest(input *DeleteWorkGroupInput) (req *request.Request, output *DeleteWorkGroupOutput) {
488	op := &request.Operation{
489		Name:       opDeleteWorkGroup,
490		HTTPMethod: "POST",
491		HTTPPath:   "/",
492	}
493
494	if input == nil {
495		input = &DeleteWorkGroupInput{}
496	}
497
498	output = &DeleteWorkGroupOutput{}
499	req = c.newRequest(op, input, output)
500	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
501	return
502}
503
504// DeleteWorkGroup API operation for Amazon Athena.
505//
506// Deletes the workgroup with the specified name. The primary workgroup cannot
507// be deleted.
508//
509// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
510// with awserr.Error's Code and Message methods to get detailed information about
511// the error.
512//
513// See the AWS API reference guide for Amazon Athena's
514// API operation DeleteWorkGroup for usage and error information.
515//
516// Returned Error Codes:
517//   * ErrCodeInternalServerException "InternalServerException"
518//   Indicates a platform issue, which may be due to a transient condition or
519//   outage.
520//
521//   * ErrCodeInvalidRequestException "InvalidRequestException"
522//   Indicates that something is wrong with the input to the request. For example,
523//   a required parameter may be missing or out of range.
524//
525// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/DeleteWorkGroup
526func (c *Athena) DeleteWorkGroup(input *DeleteWorkGroupInput) (*DeleteWorkGroupOutput, error) {
527	req, out := c.DeleteWorkGroupRequest(input)
528	return out, req.Send()
529}
530
531// DeleteWorkGroupWithContext is the same as DeleteWorkGroup with the addition of
532// the ability to pass a context and additional request options.
533//
534// See DeleteWorkGroup for details on how to use this API operation.
535//
536// The context must be non-nil and will be used for request cancellation. If
537// the context is nil a panic will occur. In the future the SDK may create
538// sub-contexts for http.Requests. See https://golang.org/pkg/context/
539// for more information on using Contexts.
540func (c *Athena) DeleteWorkGroupWithContext(ctx aws.Context, input *DeleteWorkGroupInput, opts ...request.Option) (*DeleteWorkGroupOutput, error) {
541	req, out := c.DeleteWorkGroupRequest(input)
542	req.SetContext(ctx)
543	req.ApplyOptions(opts...)
544	return out, req.Send()
545}
546
547const opGetNamedQuery = "GetNamedQuery"
548
549// GetNamedQueryRequest generates a "aws/request.Request" representing the
550// client's request for the GetNamedQuery operation. The "output" return
551// value will be populated with the request's response once the request completes
552// successfully.
553//
554// Use "Send" method on the returned Request to send the API call to the service.
555// the "output" return value is not valid until after Send returns without error.
556//
557// See GetNamedQuery for more information on using the GetNamedQuery
558// API call, and error handling.
559//
560// This method is useful when you want to inject custom logic or configuration
561// into the SDK's request lifecycle. Such as custom headers, or retry logic.
562//
563//
564//    // Example sending a request using the GetNamedQueryRequest method.
565//    req, resp := client.GetNamedQueryRequest(params)
566//
567//    err := req.Send()
568//    if err == nil { // resp is now filled
569//        fmt.Println(resp)
570//    }
571//
572// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery
573func (c *Athena) GetNamedQueryRequest(input *GetNamedQueryInput) (req *request.Request, output *GetNamedQueryOutput) {
574	op := &request.Operation{
575		Name:       opGetNamedQuery,
576		HTTPMethod: "POST",
577		HTTPPath:   "/",
578	}
579
580	if input == nil {
581		input = &GetNamedQueryInput{}
582	}
583
584	output = &GetNamedQueryOutput{}
585	req = c.newRequest(op, input, output)
586	return
587}
588
589// GetNamedQuery API operation for Amazon Athena.
590//
591// Returns information about a single query. Requires that you have access to
592// the workgroup in which the query was saved.
593//
594// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
595// with awserr.Error's Code and Message methods to get detailed information about
596// the error.
597//
598// See the AWS API reference guide for Amazon Athena's
599// API operation GetNamedQuery for usage and error information.
600//
601// Returned Error Codes:
602//   * ErrCodeInternalServerException "InternalServerException"
603//   Indicates a platform issue, which may be due to a transient condition or
604//   outage.
605//
606//   * ErrCodeInvalidRequestException "InvalidRequestException"
607//   Indicates that something is wrong with the input to the request. For example,
608//   a required parameter may be missing or out of range.
609//
610// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetNamedQuery
611func (c *Athena) GetNamedQuery(input *GetNamedQueryInput) (*GetNamedQueryOutput, error) {
612	req, out := c.GetNamedQueryRequest(input)
613	return out, req.Send()
614}
615
616// GetNamedQueryWithContext is the same as GetNamedQuery with the addition of
617// the ability to pass a context and additional request options.
618//
619// See GetNamedQuery for details on how to use this API operation.
620//
621// The context must be non-nil and will be used for request cancellation. If
622// the context is nil a panic will occur. In the future the SDK may create
623// sub-contexts for http.Requests. See https://golang.org/pkg/context/
624// for more information on using Contexts.
625func (c *Athena) GetNamedQueryWithContext(ctx aws.Context, input *GetNamedQueryInput, opts ...request.Option) (*GetNamedQueryOutput, error) {
626	req, out := c.GetNamedQueryRequest(input)
627	req.SetContext(ctx)
628	req.ApplyOptions(opts...)
629	return out, req.Send()
630}
631
632const opGetQueryExecution = "GetQueryExecution"
633
634// GetQueryExecutionRequest generates a "aws/request.Request" representing the
635// client's request for the GetQueryExecution operation. The "output" return
636// value will be populated with the request's response once the request completes
637// successfully.
638//
639// Use "Send" method on the returned Request to send the API call to the service.
640// the "output" return value is not valid until after Send returns without error.
641//
642// See GetQueryExecution for more information on using the GetQueryExecution
643// API call, and error handling.
644//
645// This method is useful when you want to inject custom logic or configuration
646// into the SDK's request lifecycle. Such as custom headers, or retry logic.
647//
648//
649//    // Example sending a request using the GetQueryExecutionRequest method.
650//    req, resp := client.GetQueryExecutionRequest(params)
651//
652//    err := req.Send()
653//    if err == nil { // resp is now filled
654//        fmt.Println(resp)
655//    }
656//
657// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution
658func (c *Athena) GetQueryExecutionRequest(input *GetQueryExecutionInput) (req *request.Request, output *GetQueryExecutionOutput) {
659	op := &request.Operation{
660		Name:       opGetQueryExecution,
661		HTTPMethod: "POST",
662		HTTPPath:   "/",
663	}
664
665	if input == nil {
666		input = &GetQueryExecutionInput{}
667	}
668
669	output = &GetQueryExecutionOutput{}
670	req = c.newRequest(op, input, output)
671	return
672}
673
674// GetQueryExecution API operation for Amazon Athena.
675//
676// Returns information about a single execution of a query if you have access
677// to the workgroup in which the query ran. Each time a query executes, information
678// about the query execution is saved with a unique ID.
679//
680// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
681// with awserr.Error's Code and Message methods to get detailed information about
682// the error.
683//
684// See the AWS API reference guide for Amazon Athena's
685// API operation GetQueryExecution for usage and error information.
686//
687// Returned Error Codes:
688//   * ErrCodeInternalServerException "InternalServerException"
689//   Indicates a platform issue, which may be due to a transient condition or
690//   outage.
691//
692//   * ErrCodeInvalidRequestException "InvalidRequestException"
693//   Indicates that something is wrong with the input to the request. For example,
694//   a required parameter may be missing or out of range.
695//
696// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryExecution
697func (c *Athena) GetQueryExecution(input *GetQueryExecutionInput) (*GetQueryExecutionOutput, error) {
698	req, out := c.GetQueryExecutionRequest(input)
699	return out, req.Send()
700}
701
702// GetQueryExecutionWithContext is the same as GetQueryExecution with the addition of
703// the ability to pass a context and additional request options.
704//
705// See GetQueryExecution for details on how to use this API operation.
706//
707// The context must be non-nil and will be used for request cancellation. If
708// the context is nil a panic will occur. In the future the SDK may create
709// sub-contexts for http.Requests. See https://golang.org/pkg/context/
710// for more information on using Contexts.
711func (c *Athena) GetQueryExecutionWithContext(ctx aws.Context, input *GetQueryExecutionInput, opts ...request.Option) (*GetQueryExecutionOutput, error) {
712	req, out := c.GetQueryExecutionRequest(input)
713	req.SetContext(ctx)
714	req.ApplyOptions(opts...)
715	return out, req.Send()
716}
717
718const opGetQueryResults = "GetQueryResults"
719
720// GetQueryResultsRequest generates a "aws/request.Request" representing the
721// client's request for the GetQueryResults operation. The "output" return
722// value will be populated with the request's response once the request completes
723// successfully.
724//
725// Use "Send" method on the returned Request to send the API call to the service.
726// the "output" return value is not valid until after Send returns without error.
727//
728// See GetQueryResults for more information on using the GetQueryResults
729// API call, and error handling.
730//
731// This method is useful when you want to inject custom logic or configuration
732// into the SDK's request lifecycle. Such as custom headers, or retry logic.
733//
734//
735//    // Example sending a request using the GetQueryResultsRequest method.
736//    req, resp := client.GetQueryResultsRequest(params)
737//
738//    err := req.Send()
739//    if err == nil { // resp is now filled
740//        fmt.Println(resp)
741//    }
742//
743// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults
744func (c *Athena) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) {
745	op := &request.Operation{
746		Name:       opGetQueryResults,
747		HTTPMethod: "POST",
748		HTTPPath:   "/",
749		Paginator: &request.Paginator{
750			InputTokens:     []string{"NextToken"},
751			OutputTokens:    []string{"NextToken"},
752			LimitToken:      "MaxResults",
753			TruncationToken: "",
754		},
755	}
756
757	if input == nil {
758		input = &GetQueryResultsInput{}
759	}
760
761	output = &GetQueryResultsOutput{}
762	req = c.newRequest(op, input, output)
763	return
764}
765
766// GetQueryResults API operation for Amazon Athena.
767//
768// Streams the results of a single query execution specified by QueryExecutionId
769// from the Athena query results location in Amazon S3. For more information,
770// see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html)
771// in the Amazon Athena User Guide. This request does not execute the query
772// but returns results. Use StartQueryExecution to run a query.
773//
774// To stream query results successfully, the IAM principal with permission to
775// call GetQueryResults also must have permissions to the Amazon S3 GetObject
776// action for the Athena query results location.
777//
778// IAM principals with permission to the Amazon S3 GetObject action for the
779// query results location are able to retrieve query results from Amazon S3
780// even if permission to the GetQueryResults action is denied. To restrict user
781// or role access, ensure that Amazon S3 permissions to the Athena query location
782// are denied.
783//
784// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
785// with awserr.Error's Code and Message methods to get detailed information about
786// the error.
787//
788// See the AWS API reference guide for Amazon Athena's
789// API operation GetQueryResults for usage and error information.
790//
791// Returned Error Codes:
792//   * ErrCodeInternalServerException "InternalServerException"
793//   Indicates a platform issue, which may be due to a transient condition or
794//   outage.
795//
796//   * ErrCodeInvalidRequestException "InvalidRequestException"
797//   Indicates that something is wrong with the input to the request. For example,
798//   a required parameter may be missing or out of range.
799//
800// See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/GetQueryResults
801func (c *Athena) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) {
802	req, out := c.GetQueryResultsRequest(input)
803	return out, req.Send()
804}
805
806// GetQueryResultsWithContext is the same as GetQueryResults with the addition of
807// the ability to pass a context and additional request options.
808//
809// See GetQueryResults for details on how to use this API operation.
810//
811// The context must be non-nil and will be used for request cancellation. If
812// the context is nil a panic will occur. In the future the SDK may create
813// sub-contexts for http.Requests. See https://golang.org/pkg/context/
814// for more information on using Contexts.
815func (c *Athena) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) {
816	req, out := c.GetQueryResultsRequest(input)
817	req.SetContext(ctx)
818	req.ApplyOptions(opts...)
819	return out, req.Send()
820}
821
822// GetQueryResultsPages iterates over the pages of a GetQueryResults operation,
823// calling the "fn" function with the response data for each page. To stop
824// iterating, return false from the fn function.
825//
826// See GetQueryResults method for more information on how to use this operation.
827//
828// Note: This operation can generate multiple requests to a service.
829//
830//    // Example iterating over at most 3 pages of a GetQueryResults operation.
831//    pageNum := 0
832//    err := client.GetQueryResultsPages(params,
833//        func(page *athena.GetQueryResultsOutput, lastPage bool) bool {
834//            pageNum++
835//            fmt.Println(page)
836//            return pageNum <= 3
837//        })
838//
839func (c *Athena) GetQueryResultsPages(input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool) error {
840	return c.GetQueryResultsPagesWithContext(aws.BackgroundContext(), input, fn)
841}
842
843// GetQueryResultsPagesWithContext same as GetQueryResultsPages except
844// it takes a Context and allows setting request options on the pages.
845//
846// The context must be non-nil and will be used for request cancellation. If
847// the context is nil a panic will occur. In the future the SDK may create
848// sub-contexts for http.Requests. See https://golang.org/pkg/context/
849// for more information on using Contexts.
850func (c *Athena) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool, opts ...request.Option) error {
851	p := request.Pagination{
852		NewRequest: func() (*request.Request, error) {
853			var inCpy *GetQueryResultsInput
854			if input != nil {
855				tmp := *input
856				inCpy = &tmp
857			}
858			req, _ := c.GetQueryResultsRequest(inCpy)
859			req.SetContext(ctx)
860			req.ApplyOptions(opts...)
861			return req, nil
862		},
863	}
864
865	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 Codes:
928//   * ErrCodeInternalServerException "InternalServerException"
929//   Indicates a platform issue, which may be due to a transient condition or
930//   outage.
931//
932//   * ErrCodeInvalidRequestException "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 Codes:
1023//   * ErrCodeInternalServerException "InternalServerException"
1024//   Indicates a platform issue, which may be due to a transient condition or
1025//   outage.
1026//
1027//   * ErrCodeInvalidRequestException "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 Codes:
1171//   * ErrCodeInternalServerException "InternalServerException"
1172//   Indicates a platform issue, which may be due to a transient condition or
1173//   outage.
1174//
1175//   * ErrCodeInvalidRequestException "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 Codes:
1307//   * ErrCodeInternalServerException "InternalServerException"
1308//   Indicates a platform issue, which may be due to a transient condition or
1309//   outage.
1310//
1311//   * ErrCodeInvalidRequestException "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//   * ErrCodeResourceNotFoundException "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 Codes:
1400//   * ErrCodeInternalServerException "InternalServerException"
1401//   Indicates a platform issue, which may be due to a transient condition or
1402//   outage.
1403//
1404//   * ErrCodeInvalidRequestException "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 Codes:
1541//   * ErrCodeInternalServerException "InternalServerException"
1542//   Indicates a platform issue, which may be due to a transient condition or
1543//   outage.
1544//
1545//   * ErrCodeInvalidRequestException "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//   * ErrCodeTooManyRequestsException "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 Codes:
1634//   * ErrCodeInternalServerException "InternalServerException"
1635//   Indicates a platform issue, which may be due to a transient condition or
1636//   outage.
1637//
1638//   * ErrCodeInvalidRequestException "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 Codes:
1731//   * ErrCodeInternalServerException "InternalServerException"
1732//   Indicates a platform issue, which may be due to a transient condition or
1733//   outage.
1734//
1735//   * ErrCodeInvalidRequestException "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//   * ErrCodeResourceNotFoundException "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 Codes:
1821//   * ErrCodeInternalServerException "InternalServerException"
1822//   Indicates a platform issue, which may be due to a transient condition or
1823//   outage.
1824//
1825//   * ErrCodeInvalidRequestException "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//   * ErrCodeResourceNotFoundException "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 Codes:
1910//   * ErrCodeInternalServerException "InternalServerException"
1911//   Indicates a platform issue, which may be due to a transient condition or
1912//   outage.
1913//
1914//   * ErrCodeInvalidRequestException "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
2901type ListNamedQueriesInput struct {
2902	_ struct{} `type:"structure"`
2903
2904	// The maximum number of queries to return in this request.
2905	MaxResults *int64 `type:"integer"`
2906
2907	// The token that specifies where to start pagination if a previous request
2908	// was truncated.
2909	NextToken *string `min:"1" type:"string"`
2910
2911	// The name of the workgroup from which the named queries are being returned.
2912	WorkGroup *string `type:"string"`
2913}
2914
2915// String returns the string representation
2916func (s ListNamedQueriesInput) String() string {
2917	return awsutil.Prettify(s)
2918}
2919
2920// GoString returns the string representation
2921func (s ListNamedQueriesInput) GoString() string {
2922	return s.String()
2923}
2924
2925// Validate inspects the fields of the type to determine if they are valid.
2926func (s *ListNamedQueriesInput) Validate() error {
2927	invalidParams := request.ErrInvalidParams{Context: "ListNamedQueriesInput"}
2928	if s.NextToken != nil && len(*s.NextToken) < 1 {
2929		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
2930	}
2931
2932	if invalidParams.Len() > 0 {
2933		return invalidParams
2934	}
2935	return nil
2936}
2937
2938// SetMaxResults sets the MaxResults field's value.
2939func (s *ListNamedQueriesInput) SetMaxResults(v int64) *ListNamedQueriesInput {
2940	s.MaxResults = &v
2941	return s
2942}
2943
2944// SetNextToken sets the NextToken field's value.
2945func (s *ListNamedQueriesInput) SetNextToken(v string) *ListNamedQueriesInput {
2946	s.NextToken = &v
2947	return s
2948}
2949
2950// SetWorkGroup sets the WorkGroup field's value.
2951func (s *ListNamedQueriesInput) SetWorkGroup(v string) *ListNamedQueriesInput {
2952	s.WorkGroup = &v
2953	return s
2954}
2955
2956type ListNamedQueriesOutput struct {
2957	_ struct{} `type:"structure"`
2958
2959	// The list of unique query IDs.
2960	NamedQueryIds []*string `min:"1" type:"list"`
2961
2962	// A token to be used by the next request if this request is truncated.
2963	NextToken *string `min:"1" type:"string"`
2964}
2965
2966// String returns the string representation
2967func (s ListNamedQueriesOutput) String() string {
2968	return awsutil.Prettify(s)
2969}
2970
2971// GoString returns the string representation
2972func (s ListNamedQueriesOutput) GoString() string {
2973	return s.String()
2974}
2975
2976// SetNamedQueryIds sets the NamedQueryIds field's value.
2977func (s *ListNamedQueriesOutput) SetNamedQueryIds(v []*string) *ListNamedQueriesOutput {
2978	s.NamedQueryIds = v
2979	return s
2980}
2981
2982// SetNextToken sets the NextToken field's value.
2983func (s *ListNamedQueriesOutput) SetNextToken(v string) *ListNamedQueriesOutput {
2984	s.NextToken = &v
2985	return s
2986}
2987
2988type ListQueryExecutionsInput struct {
2989	_ struct{} `type:"structure"`
2990
2991	// The maximum number of query executions to return in this request.
2992	MaxResults *int64 `type:"integer"`
2993
2994	// The token that specifies where to start pagination if a previous request
2995	// was truncated.
2996	NextToken *string `min:"1" type:"string"`
2997
2998	// The name of the workgroup from which queries are being returned.
2999	WorkGroup *string `type:"string"`
3000}
3001
3002// String returns the string representation
3003func (s ListQueryExecutionsInput) String() string {
3004	return awsutil.Prettify(s)
3005}
3006
3007// GoString returns the string representation
3008func (s ListQueryExecutionsInput) GoString() string {
3009	return s.String()
3010}
3011
3012// Validate inspects the fields of the type to determine if they are valid.
3013func (s *ListQueryExecutionsInput) Validate() error {
3014	invalidParams := request.ErrInvalidParams{Context: "ListQueryExecutionsInput"}
3015	if s.NextToken != nil && len(*s.NextToken) < 1 {
3016		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
3017	}
3018
3019	if invalidParams.Len() > 0 {
3020		return invalidParams
3021	}
3022	return nil
3023}
3024
3025// SetMaxResults sets the MaxResults field's value.
3026func (s *ListQueryExecutionsInput) SetMaxResults(v int64) *ListQueryExecutionsInput {
3027	s.MaxResults = &v
3028	return s
3029}
3030
3031// SetNextToken sets the NextToken field's value.
3032func (s *ListQueryExecutionsInput) SetNextToken(v string) *ListQueryExecutionsInput {
3033	s.NextToken = &v
3034	return s
3035}
3036
3037// SetWorkGroup sets the WorkGroup field's value.
3038func (s *ListQueryExecutionsInput) SetWorkGroup(v string) *ListQueryExecutionsInput {
3039	s.WorkGroup = &v
3040	return s
3041}
3042
3043type ListQueryExecutionsOutput struct {
3044	_ struct{} `type:"structure"`
3045
3046	// A token to be used by the next request if this request is truncated.
3047	NextToken *string `min:"1" type:"string"`
3048
3049	// The unique IDs of each query execution as an array of strings.
3050	QueryExecutionIds []*string `min:"1" type:"list"`
3051}
3052
3053// String returns the string representation
3054func (s ListQueryExecutionsOutput) String() string {
3055	return awsutil.Prettify(s)
3056}
3057
3058// GoString returns the string representation
3059func (s ListQueryExecutionsOutput) GoString() string {
3060	return s.String()
3061}
3062
3063// SetNextToken sets the NextToken field's value.
3064func (s *ListQueryExecutionsOutput) SetNextToken(v string) *ListQueryExecutionsOutput {
3065	s.NextToken = &v
3066	return s
3067}
3068
3069// SetQueryExecutionIds sets the QueryExecutionIds field's value.
3070func (s *ListQueryExecutionsOutput) SetQueryExecutionIds(v []*string) *ListQueryExecutionsOutput {
3071	s.QueryExecutionIds = v
3072	return s
3073}
3074
3075type ListTagsForResourceInput struct {
3076	_ struct{} `type:"structure"`
3077
3078	// The maximum number of results to be returned per request that lists the tags
3079	// for the workgroup resource.
3080	MaxResults *int64 `min:"75" type:"integer"`
3081
3082	// The token for the next set of results, or null if there are no additional
3083	// results for this request, where the request lists the tags for the workgroup
3084	// resource with the specified ARN.
3085	NextToken *string `min:"1" type:"string"`
3086
3087	// Lists the tags for the workgroup resource with the specified ARN.
3088	//
3089	// ResourceARN is a required field
3090	ResourceARN *string `min:"1" type:"string" required:"true"`
3091}
3092
3093// String returns the string representation
3094func (s ListTagsForResourceInput) String() string {
3095	return awsutil.Prettify(s)
3096}
3097
3098// GoString returns the string representation
3099func (s ListTagsForResourceInput) GoString() string {
3100	return s.String()
3101}
3102
3103// Validate inspects the fields of the type to determine if they are valid.
3104func (s *ListTagsForResourceInput) Validate() error {
3105	invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
3106	if s.MaxResults != nil && *s.MaxResults < 75 {
3107		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 75))
3108	}
3109	if s.NextToken != nil && len(*s.NextToken) < 1 {
3110		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
3111	}
3112	if s.ResourceARN == nil {
3113		invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
3114	}
3115	if s.ResourceARN != nil && len(*s.ResourceARN) < 1 {
3116		invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1))
3117	}
3118
3119	if invalidParams.Len() > 0 {
3120		return invalidParams
3121	}
3122	return nil
3123}
3124
3125// SetMaxResults sets the MaxResults field's value.
3126func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput {
3127	s.MaxResults = &v
3128	return s
3129}
3130
3131// SetNextToken sets the NextToken field's value.
3132func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
3133	s.NextToken = &v
3134	return s
3135}
3136
3137// SetResourceARN sets the ResourceARN field's value.
3138func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput {
3139	s.ResourceARN = &v
3140	return s
3141}
3142
3143type ListTagsForResourceOutput struct {
3144	_ struct{} `type:"structure"`
3145
3146	// A token to be used by the next request if this request is truncated.
3147	NextToken *string `min:"1" type:"string"`
3148
3149	// The list of tags associated with this workgroup.
3150	Tags []*Tag `type:"list"`
3151}
3152
3153// String returns the string representation
3154func (s ListTagsForResourceOutput) String() string {
3155	return awsutil.Prettify(s)
3156}
3157
3158// GoString returns the string representation
3159func (s ListTagsForResourceOutput) GoString() string {
3160	return s.String()
3161}
3162
3163// SetNextToken sets the NextToken field's value.
3164func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
3165	s.NextToken = &v
3166	return s
3167}
3168
3169// SetTags sets the Tags field's value.
3170func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
3171	s.Tags = v
3172	return s
3173}
3174
3175type ListWorkGroupsInput struct {
3176	_ struct{} `type:"structure"`
3177
3178	// The maximum number of workgroups to return in this request.
3179	MaxResults *int64 `min:"1" type:"integer"`
3180
3181	// A token to be used by the next request if this request is truncated.
3182	NextToken *string `min:"1" type:"string"`
3183}
3184
3185// String returns the string representation
3186func (s ListWorkGroupsInput) String() string {
3187	return awsutil.Prettify(s)
3188}
3189
3190// GoString returns the string representation
3191func (s ListWorkGroupsInput) GoString() string {
3192	return s.String()
3193}
3194
3195// Validate inspects the fields of the type to determine if they are valid.
3196func (s *ListWorkGroupsInput) Validate() error {
3197	invalidParams := request.ErrInvalidParams{Context: "ListWorkGroupsInput"}
3198	if s.MaxResults != nil && *s.MaxResults < 1 {
3199		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
3200	}
3201	if s.NextToken != nil && len(*s.NextToken) < 1 {
3202		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
3203	}
3204
3205	if invalidParams.Len() > 0 {
3206		return invalidParams
3207	}
3208	return nil
3209}
3210
3211// SetMaxResults sets the MaxResults field's value.
3212func (s *ListWorkGroupsInput) SetMaxResults(v int64) *ListWorkGroupsInput {
3213	s.MaxResults = &v
3214	return s
3215}
3216
3217// SetNextToken sets the NextToken field's value.
3218func (s *ListWorkGroupsInput) SetNextToken(v string) *ListWorkGroupsInput {
3219	s.NextToken = &v
3220	return s
3221}
3222
3223type ListWorkGroupsOutput struct {
3224	_ struct{} `type:"structure"`
3225
3226	// A token to be used by the next request if this request is truncated.
3227	NextToken *string `min:"1" type:"string"`
3228
3229	// The list of workgroups, including their names, descriptions, creation times,
3230	// and states.
3231	WorkGroups []*WorkGroupSummary `type:"list"`
3232}
3233
3234// String returns the string representation
3235func (s ListWorkGroupsOutput) String() string {
3236	return awsutil.Prettify(s)
3237}
3238
3239// GoString returns the string representation
3240func (s ListWorkGroupsOutput) GoString() string {
3241	return s.String()
3242}
3243
3244// SetNextToken sets the NextToken field's value.
3245func (s *ListWorkGroupsOutput) SetNextToken(v string) *ListWorkGroupsOutput {
3246	s.NextToken = &v
3247	return s
3248}
3249
3250// SetWorkGroups sets the WorkGroups field's value.
3251func (s *ListWorkGroupsOutput) SetWorkGroups(v []*WorkGroupSummary) *ListWorkGroupsOutput {
3252	s.WorkGroups = v
3253	return s
3254}
3255
3256// A query, where QueryString is the list of SQL query statements that comprise
3257// the query.
3258type NamedQuery struct {
3259	_ struct{} `type:"structure"`
3260
3261	// The database to which the query belongs.
3262	//
3263	// Database is a required field
3264	Database *string `min:"1" type:"string" required:"true"`
3265
3266	// The query description.
3267	Description *string `min:"1" type:"string"`
3268
3269	// The query name.
3270	//
3271	// Name is a required field
3272	Name *string `min:"1" type:"string" required:"true"`
3273
3274	// The unique identifier of the query.
3275	NamedQueryId *string `type:"string"`
3276
3277	// The SQL query statements that comprise the query.
3278	//
3279	// QueryString is a required field
3280	QueryString *string `min:"1" type:"string" required:"true"`
3281
3282	// The name of the workgroup that contains the named query.
3283	WorkGroup *string `type:"string"`
3284}
3285
3286// String returns the string representation
3287func (s NamedQuery) String() string {
3288	return awsutil.Prettify(s)
3289}
3290
3291// GoString returns the string representation
3292func (s NamedQuery) GoString() string {
3293	return s.String()
3294}
3295
3296// SetDatabase sets the Database field's value.
3297func (s *NamedQuery) SetDatabase(v string) *NamedQuery {
3298	s.Database = &v
3299	return s
3300}
3301
3302// SetDescription sets the Description field's value.
3303func (s *NamedQuery) SetDescription(v string) *NamedQuery {
3304	s.Description = &v
3305	return s
3306}
3307
3308// SetName sets the Name field's value.
3309func (s *NamedQuery) SetName(v string) *NamedQuery {
3310	s.Name = &v
3311	return s
3312}
3313
3314// SetNamedQueryId sets the NamedQueryId field's value.
3315func (s *NamedQuery) SetNamedQueryId(v string) *NamedQuery {
3316	s.NamedQueryId = &v
3317	return s
3318}
3319
3320// SetQueryString sets the QueryString field's value.
3321func (s *NamedQuery) SetQueryString(v string) *NamedQuery {
3322	s.QueryString = &v
3323	return s
3324}
3325
3326// SetWorkGroup sets the WorkGroup field's value.
3327func (s *NamedQuery) SetWorkGroup(v string) *NamedQuery {
3328	s.WorkGroup = &v
3329	return s
3330}
3331
3332// Information about a single instance of a query execution.
3333type QueryExecution struct {
3334	_ struct{} `type:"structure"`
3335
3336	// The SQL query statements which the query execution ran.
3337	Query *string `min:"1" type:"string"`
3338
3339	// The database in which the query execution occurred.
3340	QueryExecutionContext *QueryExecutionContext `type:"structure"`
3341
3342	// The unique identifier for each query execution.
3343	QueryExecutionId *string `type:"string"`
3344
3345	// The location in Amazon S3 where query results were stored and the encryption
3346	// option, if any, used for query results. These are known as "client-side settings".
3347	// If workgroup settings override client-side settings, then the query uses
3348	// the location for the query results and the encryption configuration that
3349	// are specified for the workgroup.
3350	ResultConfiguration *ResultConfiguration `type:"structure"`
3351
3352	// The type of query statement that was run. DDL indicates DDL query statements.
3353	// DML indicates DML (Data Manipulation Language) query statements, such as
3354	// CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL
3355	// and DML, such as SHOW CREATE TABLE, or DESCRIBE <table>.
3356	StatementType *string `type:"string" enum:"StatementType"`
3357
3358	// The amount of data scanned during the query execution and the amount of time
3359	// that it took to execute, and the type of statement that was run.
3360	Statistics *QueryExecutionStatistics `type:"structure"`
3361
3362	// The completion date, current state, submission time, and state change reason
3363	// (if applicable) for the query execution.
3364	Status *QueryExecutionStatus `type:"structure"`
3365
3366	// The name of the workgroup in which the query ran.
3367	WorkGroup *string `type:"string"`
3368}
3369
3370// String returns the string representation
3371func (s QueryExecution) String() string {
3372	return awsutil.Prettify(s)
3373}
3374
3375// GoString returns the string representation
3376func (s QueryExecution) GoString() string {
3377	return s.String()
3378}
3379
3380// SetQuery sets the Query field's value.
3381func (s *QueryExecution) SetQuery(v string) *QueryExecution {
3382	s.Query = &v
3383	return s
3384}
3385
3386// SetQueryExecutionContext sets the QueryExecutionContext field's value.
3387func (s *QueryExecution) SetQueryExecutionContext(v *QueryExecutionContext) *QueryExecution {
3388	s.QueryExecutionContext = v
3389	return s
3390}
3391
3392// SetQueryExecutionId sets the QueryExecutionId field's value.
3393func (s *QueryExecution) SetQueryExecutionId(v string) *QueryExecution {
3394	s.QueryExecutionId = &v
3395	return s
3396}
3397
3398// SetResultConfiguration sets the ResultConfiguration field's value.
3399func (s *QueryExecution) SetResultConfiguration(v *ResultConfiguration) *QueryExecution {
3400	s.ResultConfiguration = v
3401	return s
3402}
3403
3404// SetStatementType sets the StatementType field's value.
3405func (s *QueryExecution) SetStatementType(v string) *QueryExecution {
3406	s.StatementType = &v
3407	return s
3408}
3409
3410// SetStatistics sets the Statistics field's value.
3411func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution {
3412	s.Statistics = v
3413	return s
3414}
3415
3416// SetStatus sets the Status field's value.
3417func (s *QueryExecution) SetStatus(v *QueryExecutionStatus) *QueryExecution {
3418	s.Status = v
3419	return s
3420}
3421
3422// SetWorkGroup sets the WorkGroup field's value.
3423func (s *QueryExecution) SetWorkGroup(v string) *QueryExecution {
3424	s.WorkGroup = &v
3425	return s
3426}
3427
3428// The database in which the query execution occurs.
3429type QueryExecutionContext struct {
3430	_ struct{} `type:"structure"`
3431
3432	// The name of the database.
3433	Database *string `min:"1" type:"string"`
3434}
3435
3436// String returns the string representation
3437func (s QueryExecutionContext) String() string {
3438	return awsutil.Prettify(s)
3439}
3440
3441// GoString returns the string representation
3442func (s QueryExecutionContext) GoString() string {
3443	return s.String()
3444}
3445
3446// Validate inspects the fields of the type to determine if they are valid.
3447func (s *QueryExecutionContext) Validate() error {
3448	invalidParams := request.ErrInvalidParams{Context: "QueryExecutionContext"}
3449	if s.Database != nil && len(*s.Database) < 1 {
3450		invalidParams.Add(request.NewErrParamMinLen("Database", 1))
3451	}
3452
3453	if invalidParams.Len() > 0 {
3454		return invalidParams
3455	}
3456	return nil
3457}
3458
3459// SetDatabase sets the Database field's value.
3460func (s *QueryExecutionContext) SetDatabase(v string) *QueryExecutionContext {
3461	s.Database = &v
3462	return s
3463}
3464
3465// The amount of data scanned during the query execution and the amount of time
3466// that it took to execute, and the type of statement that was run.
3467type QueryExecutionStatistics struct {
3468	_ struct{} `type:"structure"`
3469
3470	// The location and file name of a data manifest file. The manifest file is
3471	// saved to the Athena query results location in Amazon S3. The manifest file
3472	// tracks files that the query wrote to Amazon S3. If the query fails, the manifest
3473	// file also tracks files that the query intended to write. The manifest is
3474	// useful for identifying orphaned files resulting from a failed query. For
3475	// more information, see Working with Query Results, Output Files, and Query
3476	// History (https://docs.aws.amazon.com/athena/latest/ug/querying.html) in the
3477	// Amazon Athena User Guide.
3478	DataManifestLocation *string `type:"string"`
3479
3480	// The number of bytes in the data that was queried.
3481	DataScannedInBytes *int64 `type:"long"`
3482
3483	// The number of milliseconds that the query took to execute.
3484	EngineExecutionTimeInMillis *int64 `type:"long"`
3485
3486	// The number of milliseconds that Athena took to plan the query processing
3487	// flow. This includes the time spent retrieving table partitions from the data
3488	// source. Note that because the query engine performs the query planning, query
3489	// planning time is a subset of engine processing time.
3490	QueryPlanningTimeInMillis *int64 `type:"long"`
3491
3492	// The number of milliseconds that the query was in your query queue waiting
3493	// for resources. Note that if transient errors occur, Athena might automatically
3494	// add the query back to the queue.
3495	QueryQueueTimeInMillis *int64 `type:"long"`
3496
3497	// The number of milliseconds that Athena took to finalize and publish the query
3498	// results after the query engine finished running the query.
3499	ServiceProcessingTimeInMillis *int64 `type:"long"`
3500
3501	// The number of milliseconds that Athena took to run the query.
3502	TotalExecutionTimeInMillis *int64 `type:"long"`
3503}
3504
3505// String returns the string representation
3506func (s QueryExecutionStatistics) String() string {
3507	return awsutil.Prettify(s)
3508}
3509
3510// GoString returns the string representation
3511func (s QueryExecutionStatistics) GoString() string {
3512	return s.String()
3513}
3514
3515// SetDataManifestLocation sets the DataManifestLocation field's value.
3516func (s *QueryExecutionStatistics) SetDataManifestLocation(v string) *QueryExecutionStatistics {
3517	s.DataManifestLocation = &v
3518	return s
3519}
3520
3521// SetDataScannedInBytes sets the DataScannedInBytes field's value.
3522func (s *QueryExecutionStatistics) SetDataScannedInBytes(v int64) *QueryExecutionStatistics {
3523	s.DataScannedInBytes = &v
3524	return s
3525}
3526
3527// SetEngineExecutionTimeInMillis sets the EngineExecutionTimeInMillis field's value.
3528func (s *QueryExecutionStatistics) SetEngineExecutionTimeInMillis(v int64) *QueryExecutionStatistics {
3529	s.EngineExecutionTimeInMillis = &v
3530	return s
3531}
3532
3533// SetQueryPlanningTimeInMillis sets the QueryPlanningTimeInMillis field's value.
3534func (s *QueryExecutionStatistics) SetQueryPlanningTimeInMillis(v int64) *QueryExecutionStatistics {
3535	s.QueryPlanningTimeInMillis = &v
3536	return s
3537}
3538
3539// SetQueryQueueTimeInMillis sets the QueryQueueTimeInMillis field's value.
3540func (s *QueryExecutionStatistics) SetQueryQueueTimeInMillis(v int64) *QueryExecutionStatistics {
3541	s.QueryQueueTimeInMillis = &v
3542	return s
3543}
3544
3545// SetServiceProcessingTimeInMillis sets the ServiceProcessingTimeInMillis field's value.
3546func (s *QueryExecutionStatistics) SetServiceProcessingTimeInMillis(v int64) *QueryExecutionStatistics {
3547	s.ServiceProcessingTimeInMillis = &v
3548	return s
3549}
3550
3551// SetTotalExecutionTimeInMillis sets the TotalExecutionTimeInMillis field's value.
3552func (s *QueryExecutionStatistics) SetTotalExecutionTimeInMillis(v int64) *QueryExecutionStatistics {
3553	s.TotalExecutionTimeInMillis = &v
3554	return s
3555}
3556
3557// The completion date, current state, submission time, and state change reason
3558// (if applicable) for the query execution.
3559type QueryExecutionStatus struct {
3560	_ struct{} `type:"structure"`
3561
3562	// The date and time that the query completed.
3563	CompletionDateTime *time.Time `type:"timestamp"`
3564
3565	// The state of query execution. QUEUED state is listed but is not used by Athena
3566	// and is reserved for future use. RUNNING indicates that the query has been
3567	// submitted to the service, and Athena will execute the query as soon as resources
3568	// are available. SUCCEEDED indicates that the query completed without errors.
3569	// FAILED indicates that the query experienced an error and did not complete
3570	// processing. CANCELLED indicates that a user input interrupted query execution.
3571	State *string `type:"string" enum:"QueryExecutionState"`
3572
3573	// Further detail about the status of the query.
3574	StateChangeReason *string `type:"string"`
3575
3576	// The date and time that the query was submitted.
3577	SubmissionDateTime *time.Time `type:"timestamp"`
3578}
3579
3580// String returns the string representation
3581func (s QueryExecutionStatus) String() string {
3582	return awsutil.Prettify(s)
3583}
3584
3585// GoString returns the string representation
3586func (s QueryExecutionStatus) GoString() string {
3587	return s.String()
3588}
3589
3590// SetCompletionDateTime sets the CompletionDateTime field's value.
3591func (s *QueryExecutionStatus) SetCompletionDateTime(v time.Time) *QueryExecutionStatus {
3592	s.CompletionDateTime = &v
3593	return s
3594}
3595
3596// SetState sets the State field's value.
3597func (s *QueryExecutionStatus) SetState(v string) *QueryExecutionStatus {
3598	s.State = &v
3599	return s
3600}
3601
3602// SetStateChangeReason sets the StateChangeReason field's value.
3603func (s *QueryExecutionStatus) SetStateChangeReason(v string) *QueryExecutionStatus {
3604	s.StateChangeReason = &v
3605	return s
3606}
3607
3608// SetSubmissionDateTime sets the SubmissionDateTime field's value.
3609func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutionStatus {
3610	s.SubmissionDateTime = &v
3611	return s
3612}
3613
3614// The location in Amazon S3 where query results are stored and the encryption
3615// option, if any, used for query results. These are known as "client-side settings".
3616// If workgroup settings override client-side settings, then the query uses
3617// the workgroup settings.
3618type ResultConfiguration struct {
3619	_ struct{} `type:"structure"`
3620
3621	// If query results are encrypted in Amazon S3, indicates the encryption option
3622	// used (for example, SSE-KMS or CSE-KMS) and key information. This is a client-side
3623	// setting. If workgroup settings override client-side settings, then the query
3624	// uses the encryption configuration that is specified for the workgroup, and
3625	// also uses the location for storing query results specified in the workgroup.
3626	// See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings
3627	// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
3628	EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
3629
3630	// The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/.
3631	// To run the query, you must specify the query results location using one of
3632	// the ways: either for individual queries using either this setting (client-side),
3633	// or in the workgroup, using WorkGroupConfiguration. If none of them is set,
3634	// Athena issues an error that no output location is provided. For more information,
3635	// see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html).
3636	// If workgroup settings override client-side settings, then the query uses
3637	// the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
3638	OutputLocation *string `type:"string"`
3639}
3640
3641// String returns the string representation
3642func (s ResultConfiguration) String() string {
3643	return awsutil.Prettify(s)
3644}
3645
3646// GoString returns the string representation
3647func (s ResultConfiguration) GoString() string {
3648	return s.String()
3649}
3650
3651// Validate inspects the fields of the type to determine if they are valid.
3652func (s *ResultConfiguration) Validate() error {
3653	invalidParams := request.ErrInvalidParams{Context: "ResultConfiguration"}
3654	if s.EncryptionConfiguration != nil {
3655		if err := s.EncryptionConfiguration.Validate(); err != nil {
3656			invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams))
3657		}
3658	}
3659
3660	if invalidParams.Len() > 0 {
3661		return invalidParams
3662	}
3663	return nil
3664}
3665
3666// SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
3667func (s *ResultConfiguration) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfiguration {
3668	s.EncryptionConfiguration = v
3669	return s
3670}
3671
3672// SetOutputLocation sets the OutputLocation field's value.
3673func (s *ResultConfiguration) SetOutputLocation(v string) *ResultConfiguration {
3674	s.OutputLocation = &v
3675	return s
3676}
3677
3678// The information about the updates in the query results, such as output location
3679// and encryption configuration for the query results.
3680type ResultConfigurationUpdates struct {
3681	_ struct{} `type:"structure"`
3682
3683	// The encryption configuration for the query results.
3684	EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
3685
3686	// The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/.
3687	// For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html)
3688	// If workgroup settings override client-side settings, then the query uses
3689	// the location for the query results and the encryption configuration that
3690	// are specified for the workgroup. The "workgroup settings override" is specified
3691	// in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration.
3692	// See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
3693	OutputLocation *string `type:"string"`
3694
3695	// If set to "true", indicates that the previously-specified encryption configuration
3696	// (also known as the client-side setting) for queries in this workgroup should
3697	// be ignored and set to null. If set to "false" or not set, and a value is
3698	// present in the EncryptionConfiguration in ResultConfigurationUpdates (the
3699	// client-side setting), the EncryptionConfiguration in the workgroup's ResultConfiguration
3700	// will be updated with the new value. For more information, see Workgroup Settings
3701	// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
3702	RemoveEncryptionConfiguration *bool `type:"boolean"`
3703
3704	// If set to "true", indicates that the previously-specified query results location
3705	// (also known as a client-side setting) for queries in this workgroup should
3706	// be ignored and set to null. If set to "false" or not set, and a value is
3707	// present in the OutputLocation in ResultConfigurationUpdates (the client-side
3708	// setting), the OutputLocation in the workgroup's ResultConfiguration will
3709	// be updated with the new value. For more information, see Workgroup Settings
3710	// Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
3711	RemoveOutputLocation *bool `type:"boolean"`
3712}
3713
3714// String returns the string representation
3715func (s ResultConfigurationUpdates) String() string {
3716	return awsutil.Prettify(s)
3717}
3718
3719// GoString returns the string representation
3720func (s ResultConfigurationUpdates) GoString() string {
3721	return s.String()
3722}
3723
3724// Validate inspects the fields of the type to determine if they are valid.
3725func (s *ResultConfigurationUpdates) Validate() error {
3726	invalidParams := request.ErrInvalidParams{Context: "ResultConfigurationUpdates"}
3727	if s.EncryptionConfiguration != nil {
3728		if err := s.EncryptionConfiguration.Validate(); err != nil {
3729			invalidParams.AddNested("EncryptionConfiguration", err.(request.ErrInvalidParams))
3730		}
3731	}
3732
3733	if invalidParams.Len() > 0 {
3734		return invalidParams
3735	}
3736	return nil
3737}
3738
3739// SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
3740func (s *ResultConfigurationUpdates) SetEncryptionConfiguration(v *EncryptionConfiguration) *ResultConfigurationUpdates {
3741	s.EncryptionConfiguration = v
3742	return s
3743}
3744
3745// SetOutputLocation sets the OutputLocation field's value.
3746func (s *ResultConfigurationUpdates) SetOutputLocation(v string) *ResultConfigurationUpdates {
3747	s.OutputLocation = &v
3748	return s
3749}
3750
3751// SetRemoveEncryptionConfiguration sets the RemoveEncryptionConfiguration field's value.
3752func (s *ResultConfigurationUpdates) SetRemoveEncryptionConfiguration(v bool) *ResultConfigurationUpdates {
3753	s.RemoveEncryptionConfiguration = &v
3754	return s
3755}
3756
3757// SetRemoveOutputLocation sets the RemoveOutputLocation field's value.
3758func (s *ResultConfigurationUpdates) SetRemoveOutputLocation(v bool) *ResultConfigurationUpdates {
3759	s.RemoveOutputLocation = &v
3760	return s
3761}
3762
3763// The metadata and rows that comprise a query result set. The metadata describes
3764// the column structure and data types.
3765type ResultSet struct {
3766	_ struct{} `type:"structure"`
3767
3768	// The metadata that describes the column structure and data types of a table
3769	// of query results.
3770	ResultSetMetadata *ResultSetMetadata `type:"structure"`
3771
3772	// The rows in the table.
3773	Rows []*Row `type:"list"`
3774}
3775
3776// String returns the string representation
3777func (s ResultSet) String() string {
3778	return awsutil.Prettify(s)
3779}
3780
3781// GoString returns the string representation
3782func (s ResultSet) GoString() string {
3783	return s.String()
3784}
3785
3786// SetResultSetMetadata sets the ResultSetMetadata field's value.
3787func (s *ResultSet) SetResultSetMetadata(v *ResultSetMetadata) *ResultSet {
3788	s.ResultSetMetadata = v
3789	return s
3790}
3791
3792// SetRows sets the Rows field's value.
3793func (s *ResultSet) SetRows(v []*Row) *ResultSet {
3794	s.Rows = v
3795	return s
3796}
3797
3798// The metadata that describes the column structure and data types of a table
3799// of query results.
3800type ResultSetMetadata struct {
3801	_ struct{} `type:"structure"`
3802
3803	// Information about the columns returned in a query result metadata.
3804	ColumnInfo []*ColumnInfo `type:"list"`
3805}
3806
3807// String returns the string representation
3808func (s ResultSetMetadata) String() string {
3809	return awsutil.Prettify(s)
3810}
3811
3812// GoString returns the string representation
3813func (s ResultSetMetadata) GoString() string {
3814	return s.String()
3815}
3816
3817// SetColumnInfo sets the ColumnInfo field's value.
3818func (s *ResultSetMetadata) SetColumnInfo(v []*ColumnInfo) *ResultSetMetadata {
3819	s.ColumnInfo = v
3820	return s
3821}
3822
3823// The rows that comprise a query result table.
3824type Row struct {
3825	_ struct{} `type:"structure"`
3826
3827	// The data that populates a row in a query result table.
3828	Data []*Datum `type:"list"`
3829}
3830
3831// String returns the string representation
3832func (s Row) String() string {
3833	return awsutil.Prettify(s)
3834}
3835
3836// GoString returns the string representation
3837func (s Row) GoString() string {
3838	return s.String()
3839}
3840
3841// SetData sets the Data field's value.
3842func (s *Row) SetData(v []*Datum) *Row {
3843	s.Data = v
3844	return s
3845}
3846
3847type StartQueryExecutionInput struct {
3848	_ struct{} `type:"structure"`
3849
3850	// A unique case-sensitive string used to ensure the request to create the query
3851	// is idempotent (executes only once). If another StartQueryExecution request
3852	// is received, the same response is returned and another query is not created.
3853	// If a parameter has changed, for example, the QueryString, an error is returned.
3854	//
3855	// This token is listed as not required because AWS SDKs (for example the AWS
3856	// SDK for Java) auto-generate the token for users. If you are not using the
3857	// AWS SDK or the AWS CLI, you must provide this token or the action will fail.
3858	ClientRequestToken *string `min:"32" type:"string" idempotencyToken:"true"`
3859
3860	// The database within which the query executes.
3861	QueryExecutionContext *QueryExecutionContext `type:"structure"`
3862
3863	// The SQL query statements to be executed.
3864	//
3865	// QueryString is a required field
3866	QueryString *string `min:"1" type:"string" required:"true"`
3867
3868	// Specifies information about where and how to save the results of the query
3869	// execution. If the query runs in a workgroup, then workgroup's settings may
3870	// override query settings. This affects the query results location. The workgroup
3871	// settings override is specified in EnforceWorkGroupConfiguration (true/false)
3872	// in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
3873	ResultConfiguration *ResultConfiguration `type:"structure"`
3874
3875	// The name of the workgroup in which the query is being started.
3876	WorkGroup *string `type:"string"`
3877}
3878
3879// String returns the string representation
3880func (s StartQueryExecutionInput) String() string {
3881	return awsutil.Prettify(s)
3882}
3883
3884// GoString returns the string representation
3885func (s StartQueryExecutionInput) GoString() string {
3886	return s.String()
3887}
3888
3889// Validate inspects the fields of the type to determine if they are valid.
3890func (s *StartQueryExecutionInput) Validate() error {
3891	invalidParams := request.ErrInvalidParams{Context: "StartQueryExecutionInput"}
3892	if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 32 {
3893		invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 32))
3894	}
3895	if s.QueryString == nil {
3896		invalidParams.Add(request.NewErrParamRequired("QueryString"))
3897	}
3898	if s.QueryString != nil && len(*s.QueryString) < 1 {
3899		invalidParams.Add(request.NewErrParamMinLen("QueryString", 1))
3900	}
3901	if s.QueryExecutionContext != nil {
3902		if err := s.QueryExecutionContext.Validate(); err != nil {
3903			invalidParams.AddNested("QueryExecutionContext", err.(request.ErrInvalidParams))
3904		}
3905	}
3906	if s.ResultConfiguration != nil {
3907		if err := s.ResultConfiguration.Validate(); err != nil {
3908			invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams))
3909		}
3910	}
3911
3912	if invalidParams.Len() > 0 {
3913		return invalidParams
3914	}
3915	return nil
3916}
3917
3918// SetClientRequestToken sets the ClientRequestToken field's value.
3919func (s *StartQueryExecutionInput) SetClientRequestToken(v string) *StartQueryExecutionInput {
3920	s.ClientRequestToken = &v
3921	return s
3922}
3923
3924// SetQueryExecutionContext sets the QueryExecutionContext field's value.
3925func (s *StartQueryExecutionInput) SetQueryExecutionContext(v *QueryExecutionContext) *StartQueryExecutionInput {
3926	s.QueryExecutionContext = v
3927	return s
3928}
3929
3930// SetQueryString sets the QueryString field's value.
3931func (s *StartQueryExecutionInput) SetQueryString(v string) *StartQueryExecutionInput {
3932	s.QueryString = &v
3933	return s
3934}
3935
3936// SetResultConfiguration sets the ResultConfiguration field's value.
3937func (s *StartQueryExecutionInput) SetResultConfiguration(v *ResultConfiguration) *StartQueryExecutionInput {
3938	s.ResultConfiguration = v
3939	return s
3940}
3941
3942// SetWorkGroup sets the WorkGroup field's value.
3943func (s *StartQueryExecutionInput) SetWorkGroup(v string) *StartQueryExecutionInput {
3944	s.WorkGroup = &v
3945	return s
3946}
3947
3948type StartQueryExecutionOutput struct {
3949	_ struct{} `type:"structure"`
3950
3951	// The unique ID of the query that ran as a result of this request.
3952	QueryExecutionId *string `type:"string"`
3953}
3954
3955// String returns the string representation
3956func (s StartQueryExecutionOutput) String() string {
3957	return awsutil.Prettify(s)
3958}
3959
3960// GoString returns the string representation
3961func (s StartQueryExecutionOutput) GoString() string {
3962	return s.String()
3963}
3964
3965// SetQueryExecutionId sets the QueryExecutionId field's value.
3966func (s *StartQueryExecutionOutput) SetQueryExecutionId(v string) *StartQueryExecutionOutput {
3967	s.QueryExecutionId = &v
3968	return s
3969}
3970
3971type StopQueryExecutionInput struct {
3972	_ struct{} `type:"structure"`
3973
3974	// The unique ID of the query execution to stop.
3975	QueryExecutionId *string `type:"string" idempotencyToken:"true"`
3976}
3977
3978// String returns the string representation
3979func (s StopQueryExecutionInput) String() string {
3980	return awsutil.Prettify(s)
3981}
3982
3983// GoString returns the string representation
3984func (s StopQueryExecutionInput) GoString() string {
3985	return s.String()
3986}
3987
3988// SetQueryExecutionId sets the QueryExecutionId field's value.
3989func (s *StopQueryExecutionInput) SetQueryExecutionId(v string) *StopQueryExecutionInput {
3990	s.QueryExecutionId = &v
3991	return s
3992}
3993
3994type StopQueryExecutionOutput struct {
3995	_ struct{} `type:"structure"`
3996}
3997
3998// String returns the string representation
3999func (s StopQueryExecutionOutput) String() string {
4000	return awsutil.Prettify(s)
4001}
4002
4003// GoString returns the string representation
4004func (s StopQueryExecutionOutput) GoString() string {
4005	return s.String()
4006}
4007
4008// A tag that you can add to a resource. A tag is a label that you assign to
4009// an AWS Athena resource (a workgroup). Each tag consists of a key and an optional
4010// value, both of which you define. Tags enable you to categorize workgroups
4011// in Athena, for example, by purpose, owner, or environment. Use a consistent
4012// set of tag keys to make it easier to search and filter workgroups in your
4013// account. The maximum tag key length is 128 Unicode characters in UTF-8. The
4014// maximum tag value length is 256 Unicode characters in UTF-8. You can use
4015// letters and numbers representable in UTF-8, and the following characters:
4016// + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be
4017// unique per resource.
4018type Tag struct {
4019	_ struct{} `type:"structure"`
4020
4021	// A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8.
4022	// You can use letters and numbers representable in UTF-8, and the following
4023	// characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique
4024	// per resource.
4025	Key *string `min:"1" type:"string"`
4026
4027	// A tag value. The tag value length is from 0 to 256 Unicode characters in
4028	// UTF-8. You can use letters and numbers representable in UTF-8, and the following
4029	// characters: + - = . _ : / @. Tag values are case-sensitive.
4030	Value *string `type:"string"`
4031}
4032
4033// String returns the string representation
4034func (s Tag) String() string {
4035	return awsutil.Prettify(s)
4036}
4037
4038// GoString returns the string representation
4039func (s Tag) GoString() string {
4040	return s.String()
4041}
4042
4043// Validate inspects the fields of the type to determine if they are valid.
4044func (s *Tag) Validate() error {
4045	invalidParams := request.ErrInvalidParams{Context: "Tag"}
4046	if s.Key != nil && len(*s.Key) < 1 {
4047		invalidParams.Add(request.NewErrParamMinLen("Key", 1))
4048	}
4049
4050	if invalidParams.Len() > 0 {
4051		return invalidParams
4052	}
4053	return nil
4054}
4055
4056// SetKey sets the Key field's value.
4057func (s *Tag) SetKey(v string) *Tag {
4058	s.Key = &v
4059	return s
4060}
4061
4062// SetValue sets the Value field's value.
4063func (s *Tag) SetValue(v string) *Tag {
4064	s.Value = &v
4065	return s
4066}
4067
4068type TagResourceInput struct {
4069	_ struct{} `type:"structure"`
4070
4071	// Requests that one or more tags are added to the resource (such as a workgroup)
4072	// for the specified ARN.
4073	//
4074	// ResourceARN is a required field
4075	ResourceARN *string `min:"1" type:"string" required:"true"`
4076
4077	// One or more tags, separated by commas, to be added to the resource, such
4078	// as a workgroup.
4079	//
4080	// Tags is a required field
4081	Tags []*Tag `type:"list" required:"true"`
4082}
4083
4084// String returns the string representation
4085func (s TagResourceInput) String() string {
4086	return awsutil.Prettify(s)
4087}
4088
4089// GoString returns the string representation
4090func (s TagResourceInput) GoString() string {
4091	return s.String()
4092}
4093
4094// Validate inspects the fields of the type to determine if they are valid.
4095func (s *TagResourceInput) Validate() error {
4096	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
4097	if s.ResourceARN == nil {
4098		invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
4099	}
4100	if s.ResourceARN != nil && len(*s.ResourceARN) < 1 {
4101		invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1))
4102	}
4103	if s.Tags == nil {
4104		invalidParams.Add(request.NewErrParamRequired("Tags"))
4105	}
4106	if s.Tags != nil {
4107		for i, v := range s.Tags {
4108			if v == nil {
4109				continue
4110			}
4111			if err := v.Validate(); err != nil {
4112				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
4113			}
4114		}
4115	}
4116
4117	if invalidParams.Len() > 0 {
4118		return invalidParams
4119	}
4120	return nil
4121}
4122
4123// SetResourceARN sets the ResourceARN field's value.
4124func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput {
4125	s.ResourceARN = &v
4126	return s
4127}
4128
4129// SetTags sets the Tags field's value.
4130func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
4131	s.Tags = v
4132	return s
4133}
4134
4135type TagResourceOutput struct {
4136	_ struct{} `type:"structure"`
4137}
4138
4139// String returns the string representation
4140func (s TagResourceOutput) String() string {
4141	return awsutil.Prettify(s)
4142}
4143
4144// GoString returns the string representation
4145func (s TagResourceOutput) GoString() string {
4146	return s.String()
4147}
4148
4149// Information about a named query ID that could not be processed.
4150type UnprocessedNamedQueryId struct {
4151	_ struct{} `type:"structure"`
4152
4153	// The error code returned when the processing request for the named query failed,
4154	// if applicable.
4155	ErrorCode *string `min:"1" type:"string"`
4156
4157	// The error message returned when the processing request for the named query
4158	// failed, if applicable.
4159	ErrorMessage *string `type:"string"`
4160
4161	// The unique identifier of the named query.
4162	NamedQueryId *string `type:"string"`
4163}
4164
4165// String returns the string representation
4166func (s UnprocessedNamedQueryId) String() string {
4167	return awsutil.Prettify(s)
4168}
4169
4170// GoString returns the string representation
4171func (s UnprocessedNamedQueryId) GoString() string {
4172	return s.String()
4173}
4174
4175// SetErrorCode sets the ErrorCode field's value.
4176func (s *UnprocessedNamedQueryId) SetErrorCode(v string) *UnprocessedNamedQueryId {
4177	s.ErrorCode = &v
4178	return s
4179}
4180
4181// SetErrorMessage sets the ErrorMessage field's value.
4182func (s *UnprocessedNamedQueryId) SetErrorMessage(v string) *UnprocessedNamedQueryId {
4183	s.ErrorMessage = &v
4184	return s
4185}
4186
4187// SetNamedQueryId sets the NamedQueryId field's value.
4188func (s *UnprocessedNamedQueryId) SetNamedQueryId(v string) *UnprocessedNamedQueryId {
4189	s.NamedQueryId = &v
4190	return s
4191}
4192
4193// Describes a query execution that failed to process.
4194type UnprocessedQueryExecutionId struct {
4195	_ struct{} `type:"structure"`
4196
4197	// The error code returned when the query execution failed to process, if applicable.
4198	ErrorCode *string `min:"1" type:"string"`
4199
4200	// The error message returned when the query execution failed to process, if
4201	// applicable.
4202	ErrorMessage *string `type:"string"`
4203
4204	// The unique identifier of the query execution.
4205	QueryExecutionId *string `type:"string"`
4206}
4207
4208// String returns the string representation
4209func (s UnprocessedQueryExecutionId) String() string {
4210	return awsutil.Prettify(s)
4211}
4212
4213// GoString returns the string representation
4214func (s UnprocessedQueryExecutionId) GoString() string {
4215	return s.String()
4216}
4217
4218// SetErrorCode sets the ErrorCode field's value.
4219func (s *UnprocessedQueryExecutionId) SetErrorCode(v string) *UnprocessedQueryExecutionId {
4220	s.ErrorCode = &v
4221	return s
4222}
4223
4224// SetErrorMessage sets the ErrorMessage field's value.
4225func (s *UnprocessedQueryExecutionId) SetErrorMessage(v string) *UnprocessedQueryExecutionId {
4226	s.ErrorMessage = &v
4227	return s
4228}
4229
4230// SetQueryExecutionId sets the QueryExecutionId field's value.
4231func (s *UnprocessedQueryExecutionId) SetQueryExecutionId(v string) *UnprocessedQueryExecutionId {
4232	s.QueryExecutionId = &v
4233	return s
4234}
4235
4236type UntagResourceInput struct {
4237	_ struct{} `type:"structure"`
4238
4239	// Removes one or more tags from the workgroup resource for the specified ARN.
4240	//
4241	// ResourceARN is a required field
4242	ResourceARN *string `min:"1" type:"string" required:"true"`
4243
4244	// Removes the tags associated with one or more tag keys from the workgroup
4245	// resource.
4246	//
4247	// TagKeys is a required field
4248	TagKeys []*string `type:"list" required:"true"`
4249}
4250
4251// String returns the string representation
4252func (s UntagResourceInput) String() string {
4253	return awsutil.Prettify(s)
4254}
4255
4256// GoString returns the string representation
4257func (s UntagResourceInput) GoString() string {
4258	return s.String()
4259}
4260
4261// Validate inspects the fields of the type to determine if they are valid.
4262func (s *UntagResourceInput) Validate() error {
4263	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
4264	if s.ResourceARN == nil {
4265		invalidParams.Add(request.NewErrParamRequired("ResourceARN"))
4266	}
4267	if s.ResourceARN != nil && len(*s.ResourceARN) < 1 {
4268		invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1))
4269	}
4270	if s.TagKeys == nil {
4271		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
4272	}
4273
4274	if invalidParams.Len() > 0 {
4275		return invalidParams
4276	}
4277	return nil
4278}
4279
4280// SetResourceARN sets the ResourceARN field's value.
4281func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput {
4282	s.ResourceARN = &v
4283	return s
4284}
4285
4286// SetTagKeys sets the TagKeys field's value.
4287func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
4288	s.TagKeys = v
4289	return s
4290}
4291
4292type UntagResourceOutput struct {
4293	_ struct{} `type:"structure"`
4294}
4295
4296// String returns the string representation
4297func (s UntagResourceOutput) String() string {
4298	return awsutil.Prettify(s)
4299}
4300
4301// GoString returns the string representation
4302func (s UntagResourceOutput) GoString() string {
4303	return s.String()
4304}
4305
4306type UpdateWorkGroupInput struct {
4307	_ struct{} `type:"structure"`
4308
4309	// The workgroup configuration that will be updated for the given workgroup.
4310	ConfigurationUpdates *WorkGroupConfigurationUpdates `type:"structure"`
4311
4312	// The workgroup description.
4313	Description *string `type:"string"`
4314
4315	// The workgroup state that will be updated for the given workgroup.
4316	State *string `type:"string" enum:"WorkGroupState"`
4317
4318	// The specified workgroup that will be updated.
4319	//
4320	// WorkGroup is a required field
4321	WorkGroup *string `type:"string" required:"true"`
4322}
4323
4324// String returns the string representation
4325func (s UpdateWorkGroupInput) String() string {
4326	return awsutil.Prettify(s)
4327}
4328
4329// GoString returns the string representation
4330func (s UpdateWorkGroupInput) GoString() string {
4331	return s.String()
4332}
4333
4334// Validate inspects the fields of the type to determine if they are valid.
4335func (s *UpdateWorkGroupInput) Validate() error {
4336	invalidParams := request.ErrInvalidParams{Context: "UpdateWorkGroupInput"}
4337	if s.WorkGroup == nil {
4338		invalidParams.Add(request.NewErrParamRequired("WorkGroup"))
4339	}
4340	if s.ConfigurationUpdates != nil {
4341		if err := s.ConfigurationUpdates.Validate(); err != nil {
4342			invalidParams.AddNested("ConfigurationUpdates", err.(request.ErrInvalidParams))
4343		}
4344	}
4345
4346	if invalidParams.Len() > 0 {
4347		return invalidParams
4348	}
4349	return nil
4350}
4351
4352// SetConfigurationUpdates sets the ConfigurationUpdates field's value.
4353func (s *UpdateWorkGroupInput) SetConfigurationUpdates(v *WorkGroupConfigurationUpdates) *UpdateWorkGroupInput {
4354	s.ConfigurationUpdates = v
4355	return s
4356}
4357
4358// SetDescription sets the Description field's value.
4359func (s *UpdateWorkGroupInput) SetDescription(v string) *UpdateWorkGroupInput {
4360	s.Description = &v
4361	return s
4362}
4363
4364// SetState sets the State field's value.
4365func (s *UpdateWorkGroupInput) SetState(v string) *UpdateWorkGroupInput {
4366	s.State = &v
4367	return s
4368}
4369
4370// SetWorkGroup sets the WorkGroup field's value.
4371func (s *UpdateWorkGroupInput) SetWorkGroup(v string) *UpdateWorkGroupInput {
4372	s.WorkGroup = &v
4373	return s
4374}
4375
4376type UpdateWorkGroupOutput struct {
4377	_ struct{} `type:"structure"`
4378}
4379
4380// String returns the string representation
4381func (s UpdateWorkGroupOutput) String() string {
4382	return awsutil.Prettify(s)
4383}
4384
4385// GoString returns the string representation
4386func (s UpdateWorkGroupOutput) GoString() string {
4387	return s.String()
4388}
4389
4390// A workgroup, which contains a name, description, creation time, state, and
4391// other configuration, listed under WorkGroup$Configuration. Each workgroup
4392// enables you to isolate queries for you or your group of users from other
4393// queries in the same account, to configure the query results location and
4394// the encryption configuration (known as workgroup settings), to enable sending
4395// query metrics to Amazon CloudWatch, and to establish per-query data usage
4396// control limits for all queries in a workgroup. The workgroup settings override
4397// is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration.
4398// See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
4399type WorkGroup struct {
4400	_ struct{} `type:"structure"`
4401
4402	// The configuration of the workgroup, which includes the location in Amazon
4403	// S3 where query results are stored, the encryption configuration, if any,
4404	// used for query results; whether the Amazon CloudWatch Metrics are enabled
4405	// for the workgroup; whether workgroup settings override client-side settings;
4406	// and the data usage limits for the amount of data scanned per query or per
4407	// workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration
4408	// (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
4409	Configuration *WorkGroupConfiguration `type:"structure"`
4410
4411	// The date and time the workgroup was created.
4412	CreationTime *time.Time `type:"timestamp"`
4413
4414	// The workgroup description.
4415	Description *string `type:"string"`
4416
4417	// The workgroup name.
4418	//
4419	// Name is a required field
4420	Name *string `type:"string" required:"true"`
4421
4422	// The state of the workgroup: ENABLED or DISABLED.
4423	State *string `type:"string" enum:"WorkGroupState"`
4424}
4425
4426// String returns the string representation
4427func (s WorkGroup) String() string {
4428	return awsutil.Prettify(s)
4429}
4430
4431// GoString returns the string representation
4432func (s WorkGroup) GoString() string {
4433	return s.String()
4434}
4435
4436// SetConfiguration sets the Configuration field's value.
4437func (s *WorkGroup) SetConfiguration(v *WorkGroupConfiguration) *WorkGroup {
4438	s.Configuration = v
4439	return s
4440}
4441
4442// SetCreationTime sets the CreationTime field's value.
4443func (s *WorkGroup) SetCreationTime(v time.Time) *WorkGroup {
4444	s.CreationTime = &v
4445	return s
4446}
4447
4448// SetDescription sets the Description field's value.
4449func (s *WorkGroup) SetDescription(v string) *WorkGroup {
4450	s.Description = &v
4451	return s
4452}
4453
4454// SetName sets the Name field's value.
4455func (s *WorkGroup) SetName(v string) *WorkGroup {
4456	s.Name = &v
4457	return s
4458}
4459
4460// SetState sets the State field's value.
4461func (s *WorkGroup) SetState(v string) *WorkGroup {
4462	s.State = &v
4463	return s
4464}
4465
4466// The configuration of the workgroup, which includes the location in Amazon
4467// S3 where query results are stored, the encryption option, if any, used for
4468// query results, whether the Amazon CloudWatch Metrics are enabled for the
4469// workgroup and whether workgroup settings override query settings, and the
4470// data usage limits for the amount of data scanned per query or per workgroup.
4471// The workgroup settings override is specified in EnforceWorkGroupConfiguration
4472// (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
4473type WorkGroupConfiguration struct {
4474	_ struct{} `type:"structure"`
4475
4476	// The upper data usage limit (cutoff) for the amount of bytes a single query
4477	// in a workgroup is allowed to scan.
4478	BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"`
4479
4480	// If set to "true", the settings for the workgroup override client-side settings.
4481	// If set to "false", client-side settings are used. For more information, see
4482	// Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
4483	EnforceWorkGroupConfiguration *bool `type:"boolean"`
4484
4485	// Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
4486	PublishCloudWatchMetricsEnabled *bool `type:"boolean"`
4487
4488	// If set to true, allows members assigned to a workgroup to reference Amazon
4489	// S3 Requester Pays buckets in queries. If set to false, workgroup members
4490	// cannot query data from Requester Pays buckets, and queries that retrieve
4491	// data from Requester Pays buckets cause an error. The default is false. For
4492	// more information about Requester Pays buckets, see Requester Pays Buckets
4493	// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
4494	// in the Amazon Simple Storage Service Developer Guide.
4495	RequesterPaysEnabled *bool `type:"boolean"`
4496
4497	// The configuration for the workgroup, which includes the location in Amazon
4498	// S3 where query results are stored and the encryption option, if any, used
4499	// for query results. To run the query, you must specify the query results location
4500	// using one of the ways: either in the workgroup using this setting, or for
4501	// individual queries (client-side), using ResultConfiguration$OutputLocation.
4502	// If none of them is set, Athena issues an error that no output location is
4503	// provided. For more information, see Query Results (https://docs.aws.amazon.com/athena/latest/ug/querying.html).
4504	ResultConfiguration *ResultConfiguration `type:"structure"`
4505}
4506
4507// String returns the string representation
4508func (s WorkGroupConfiguration) String() string {
4509	return awsutil.Prettify(s)
4510}
4511
4512// GoString returns the string representation
4513func (s WorkGroupConfiguration) GoString() string {
4514	return s.String()
4515}
4516
4517// Validate inspects the fields of the type to determine if they are valid.
4518func (s *WorkGroupConfiguration) Validate() error {
4519	invalidParams := request.ErrInvalidParams{Context: "WorkGroupConfiguration"}
4520	if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 {
4521		invalidParams.Add(request.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07))
4522	}
4523	if s.ResultConfiguration != nil {
4524		if err := s.ResultConfiguration.Validate(); err != nil {
4525			invalidParams.AddNested("ResultConfiguration", err.(request.ErrInvalidParams))
4526		}
4527	}
4528
4529	if invalidParams.Len() > 0 {
4530		return invalidParams
4531	}
4532	return nil
4533}
4534
4535// SetBytesScannedCutoffPerQuery sets the BytesScannedCutoffPerQuery field's value.
4536func (s *WorkGroupConfiguration) SetBytesScannedCutoffPerQuery(v int64) *WorkGroupConfiguration {
4537	s.BytesScannedCutoffPerQuery = &v
4538	return s
4539}
4540
4541// SetEnforceWorkGroupConfiguration sets the EnforceWorkGroupConfiguration field's value.
4542func (s *WorkGroupConfiguration) SetEnforceWorkGroupConfiguration(v bool) *WorkGroupConfiguration {
4543	s.EnforceWorkGroupConfiguration = &v
4544	return s
4545}
4546
4547// SetPublishCloudWatchMetricsEnabled sets the PublishCloudWatchMetricsEnabled field's value.
4548func (s *WorkGroupConfiguration) SetPublishCloudWatchMetricsEnabled(v bool) *WorkGroupConfiguration {
4549	s.PublishCloudWatchMetricsEnabled = &v
4550	return s
4551}
4552
4553// SetRequesterPaysEnabled sets the RequesterPaysEnabled field's value.
4554func (s *WorkGroupConfiguration) SetRequesterPaysEnabled(v bool) *WorkGroupConfiguration {
4555	s.RequesterPaysEnabled = &v
4556	return s
4557}
4558
4559// SetResultConfiguration sets the ResultConfiguration field's value.
4560func (s *WorkGroupConfiguration) SetResultConfiguration(v *ResultConfiguration) *WorkGroupConfiguration {
4561	s.ResultConfiguration = v
4562	return s
4563}
4564
4565// The configuration information that will be updated for this workgroup, which
4566// includes the location in Amazon S3 where query results are stored, the encryption
4567// option, if any, used for query results, whether the Amazon CloudWatch Metrics
4568// are enabled for the workgroup, whether the workgroup settings override the
4569// client-side settings, and the data usage limit for the amount of bytes scanned
4570// per query, if it is specified.
4571type WorkGroupConfigurationUpdates struct {
4572	_ struct{} `type:"structure"`
4573
4574	// The upper limit (cutoff) for the amount of bytes a single query in a workgroup
4575	// is allowed to scan.
4576	BytesScannedCutoffPerQuery *int64 `min:"1e+07" type:"long"`
4577
4578	// If set to "true", the settings for the workgroup override client-side settings.
4579	// If set to "false" client-side settings are used. For more information, see
4580	// Workgroup Settings Override Client-Side Settings (https://docs.aws.amazon.com/athena/latest/ug/workgroups-settings-override.html).
4581	EnforceWorkGroupConfiguration *bool `type:"boolean"`
4582
4583	// Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
4584	PublishCloudWatchMetricsEnabled *bool `type:"boolean"`
4585
4586	// Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery
4587	RemoveBytesScannedCutoffPerQuery *bool `type:"boolean"`
4588
4589	// If set to true, allows members assigned to a workgroup to specify Amazon
4590	// S3 Requester Pays buckets in queries. If set to false, workgroup members
4591	// cannot query data from Requester Pays buckets, and queries that retrieve
4592	// data from Requester Pays buckets cause an error. The default is false. For
4593	// more information about Requester Pays buckets, see Requester Pays Buckets
4594	// (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html)
4595	// in the Amazon Simple Storage Service Developer Guide.
4596	RequesterPaysEnabled *bool `type:"boolean"`
4597
4598	// The result configuration information about the queries in this workgroup
4599	// that will be updated. Includes the updated results location and an updated
4600	// option for encrypting query results.
4601	ResultConfigurationUpdates *ResultConfigurationUpdates `type:"structure"`
4602}
4603
4604// String returns the string representation
4605func (s WorkGroupConfigurationUpdates) String() string {
4606	return awsutil.Prettify(s)
4607}
4608
4609// GoString returns the string representation
4610func (s WorkGroupConfigurationUpdates) GoString() string {
4611	return s.String()
4612}
4613
4614// Validate inspects the fields of the type to determine if they are valid.
4615func (s *WorkGroupConfigurationUpdates) Validate() error {
4616	invalidParams := request.ErrInvalidParams{Context: "WorkGroupConfigurationUpdates"}
4617	if s.BytesScannedCutoffPerQuery != nil && *s.BytesScannedCutoffPerQuery < 1e+07 {
4618		invalidParams.Add(request.NewErrParamMinValue("BytesScannedCutoffPerQuery", 1e+07))
4619	}
4620	if s.ResultConfigurationUpdates != nil {
4621		if err := s.ResultConfigurationUpdates.Validate(); err != nil {
4622			invalidParams.AddNested("ResultConfigurationUpdates", err.(request.ErrInvalidParams))
4623		}
4624	}
4625
4626	if invalidParams.Len() > 0 {
4627		return invalidParams
4628	}
4629	return nil
4630}
4631
4632// SetBytesScannedCutoffPerQuery sets the BytesScannedCutoffPerQuery field's value.
4633func (s *WorkGroupConfigurationUpdates) SetBytesScannedCutoffPerQuery(v int64) *WorkGroupConfigurationUpdates {
4634	s.BytesScannedCutoffPerQuery = &v
4635	return s
4636}
4637
4638// SetEnforceWorkGroupConfiguration sets the EnforceWorkGroupConfiguration field's value.
4639func (s *WorkGroupConfigurationUpdates) SetEnforceWorkGroupConfiguration(v bool) *WorkGroupConfigurationUpdates {
4640	s.EnforceWorkGroupConfiguration = &v
4641	return s
4642}
4643
4644// SetPublishCloudWatchMetricsEnabled sets the PublishCloudWatchMetricsEnabled field's value.
4645func (s *WorkGroupConfigurationUpdates) SetPublishCloudWatchMetricsEnabled(v bool) *WorkGroupConfigurationUpdates {
4646	s.PublishCloudWatchMetricsEnabled = &v
4647	return s
4648}
4649
4650// SetRemoveBytesScannedCutoffPerQuery sets the RemoveBytesScannedCutoffPerQuery field's value.
4651func (s *WorkGroupConfigurationUpdates) SetRemoveBytesScannedCutoffPerQuery(v bool) *WorkGroupConfigurationUpdates {
4652	s.RemoveBytesScannedCutoffPerQuery = &v
4653	return s
4654}
4655
4656// SetRequesterPaysEnabled sets the RequesterPaysEnabled field's value.
4657func (s *WorkGroupConfigurationUpdates) SetRequesterPaysEnabled(v bool) *WorkGroupConfigurationUpdates {
4658	s.RequesterPaysEnabled = &v
4659	return s
4660}
4661
4662// SetResultConfigurationUpdates sets the ResultConfigurationUpdates field's value.
4663func (s *WorkGroupConfigurationUpdates) SetResultConfigurationUpdates(v *ResultConfigurationUpdates) *WorkGroupConfigurationUpdates {
4664	s.ResultConfigurationUpdates = v
4665	return s
4666}
4667
4668// The summary information for the workgroup, which includes its name, state,
4669// description, and the date and time it was created.
4670type WorkGroupSummary struct {
4671	_ struct{} `type:"structure"`
4672
4673	// The workgroup creation date and time.
4674	CreationTime *time.Time `type:"timestamp"`
4675
4676	// The workgroup description.
4677	Description *string `type:"string"`
4678
4679	// The name of the workgroup.
4680	Name *string `type:"string"`
4681
4682	// The state of the workgroup.
4683	State *string `type:"string" enum:"WorkGroupState"`
4684}
4685
4686// String returns the string representation
4687func (s WorkGroupSummary) String() string {
4688	return awsutil.Prettify(s)
4689}
4690
4691// GoString returns the string representation
4692func (s WorkGroupSummary) GoString() string {
4693	return s.String()
4694}
4695
4696// SetCreationTime sets the CreationTime field's value.
4697func (s *WorkGroupSummary) SetCreationTime(v time.Time) *WorkGroupSummary {
4698	s.CreationTime = &v
4699	return s
4700}
4701
4702// SetDescription sets the Description field's value.
4703func (s *WorkGroupSummary) SetDescription(v string) *WorkGroupSummary {
4704	s.Description = &v
4705	return s
4706}
4707
4708// SetName sets the Name field's value.
4709func (s *WorkGroupSummary) SetName(v string) *WorkGroupSummary {
4710	s.Name = &v
4711	return s
4712}
4713
4714// SetState sets the State field's value.
4715func (s *WorkGroupSummary) SetState(v string) *WorkGroupSummary {
4716	s.State = &v
4717	return s
4718}
4719
4720const (
4721	// ColumnNullableNotNull is a ColumnNullable enum value
4722	ColumnNullableNotNull = "NOT_NULL"
4723
4724	// ColumnNullableNullable is a ColumnNullable enum value
4725	ColumnNullableNullable = "NULLABLE"
4726
4727	// ColumnNullableUnknown is a ColumnNullable enum value
4728	ColumnNullableUnknown = "UNKNOWN"
4729)
4730
4731const (
4732	// EncryptionOptionSseS3 is a EncryptionOption enum value
4733	EncryptionOptionSseS3 = "SSE_S3"
4734
4735	// EncryptionOptionSseKms is a EncryptionOption enum value
4736	EncryptionOptionSseKms = "SSE_KMS"
4737
4738	// EncryptionOptionCseKms is a EncryptionOption enum value
4739	EncryptionOptionCseKms = "CSE_KMS"
4740)
4741
4742const (
4743	// QueryExecutionStateQueued is a QueryExecutionState enum value
4744	QueryExecutionStateQueued = "QUEUED"
4745
4746	// QueryExecutionStateRunning is a QueryExecutionState enum value
4747	QueryExecutionStateRunning = "RUNNING"
4748
4749	// QueryExecutionStateSucceeded is a QueryExecutionState enum value
4750	QueryExecutionStateSucceeded = "SUCCEEDED"
4751
4752	// QueryExecutionStateFailed is a QueryExecutionState enum value
4753	QueryExecutionStateFailed = "FAILED"
4754
4755	// QueryExecutionStateCancelled is a QueryExecutionState enum value
4756	QueryExecutionStateCancelled = "CANCELLED"
4757)
4758
4759const (
4760	// StatementTypeDdl is a StatementType enum value
4761	StatementTypeDdl = "DDL"
4762
4763	// StatementTypeDml is a StatementType enum value
4764	StatementTypeDml = "DML"
4765
4766	// StatementTypeUtility is a StatementType enum value
4767	StatementTypeUtility = "UTILITY"
4768)
4769
4770// The reason for the query throttling, for example, when it exceeds the concurrent
4771// query limit.
4772const (
4773	// ThrottleReasonConcurrentQueryLimitExceeded is a ThrottleReason enum value
4774	ThrottleReasonConcurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED"
4775)
4776
4777const (
4778	// WorkGroupStateEnabled is a WorkGroupState enum value
4779	WorkGroupStateEnabled = "ENABLED"
4780
4781	// WorkGroupStateDisabled is a WorkGroupState enum value
4782	WorkGroupStateDisabled = "DISABLED"
4783)
4784