1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package lakeformation
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 opBatchGrantPermissions = "BatchGrantPermissions"
17
18// BatchGrantPermissionsRequest generates a "aws/request.Request" representing the
19// client's request for the BatchGrantPermissions 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 BatchGrantPermissions for more information on using the BatchGrantPermissions
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 BatchGrantPermissionsRequest method.
34//    req, resp := client.BatchGrantPermissionsRequest(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/lakeformation-2017-03-31/BatchGrantPermissions
42func (c *LakeFormation) BatchGrantPermissionsRequest(input *BatchGrantPermissionsInput) (req *request.Request, output *BatchGrantPermissionsOutput) {
43	op := &request.Operation{
44		Name:       opBatchGrantPermissions,
45		HTTPMethod: "POST",
46		HTTPPath:   "/",
47	}
48
49	if input == nil {
50		input = &BatchGrantPermissionsInput{}
51	}
52
53	output = &BatchGrantPermissionsOutput{}
54	req = c.newRequest(op, input, output)
55	return
56}
57
58// BatchGrantPermissions API operation for AWS Lake Formation.
59//
60// Batch operation to grant permissions to the principal.
61//
62// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
63// with awserr.Error's Code and Message methods to get detailed information about
64// the error.
65//
66// See the AWS API reference guide for AWS Lake Formation's
67// API operation BatchGrantPermissions for usage and error information.
68//
69// Returned Error Types:
70//   * InvalidInputException
71//   The input provided was not valid.
72//
73//   * OperationTimeoutException
74//   The operation timed out.
75//
76// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchGrantPermissions
77func (c *LakeFormation) BatchGrantPermissions(input *BatchGrantPermissionsInput) (*BatchGrantPermissionsOutput, error) {
78	req, out := c.BatchGrantPermissionsRequest(input)
79	return out, req.Send()
80}
81
82// BatchGrantPermissionsWithContext is the same as BatchGrantPermissions with the addition of
83// the ability to pass a context and additional request options.
84//
85// See BatchGrantPermissions for details on how to use this API operation.
86//
87// The context must be non-nil and will be used for request cancellation. If
88// the context is nil a panic will occur. In the future the SDK may create
89// sub-contexts for http.Requests. See https://golang.org/pkg/context/
90// for more information on using Contexts.
91func (c *LakeFormation) BatchGrantPermissionsWithContext(ctx aws.Context, input *BatchGrantPermissionsInput, opts ...request.Option) (*BatchGrantPermissionsOutput, error) {
92	req, out := c.BatchGrantPermissionsRequest(input)
93	req.SetContext(ctx)
94	req.ApplyOptions(opts...)
95	return out, req.Send()
96}
97
98const opBatchRevokePermissions = "BatchRevokePermissions"
99
100// BatchRevokePermissionsRequest generates a "aws/request.Request" representing the
101// client's request for the BatchRevokePermissions operation. The "output" return
102// value will be populated with the request's response once the request completes
103// successfully.
104//
105// Use "Send" method on the returned Request to send the API call to the service.
106// the "output" return value is not valid until after Send returns without error.
107//
108// See BatchRevokePermissions for more information on using the BatchRevokePermissions
109// API call, and error handling.
110//
111// This method is useful when you want to inject custom logic or configuration
112// into the SDK's request lifecycle. Such as custom headers, or retry logic.
113//
114//
115//    // Example sending a request using the BatchRevokePermissionsRequest method.
116//    req, resp := client.BatchRevokePermissionsRequest(params)
117//
118//    err := req.Send()
119//    if err == nil { // resp is now filled
120//        fmt.Println(resp)
121//    }
122//
123// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchRevokePermissions
124func (c *LakeFormation) BatchRevokePermissionsRequest(input *BatchRevokePermissionsInput) (req *request.Request, output *BatchRevokePermissionsOutput) {
125	op := &request.Operation{
126		Name:       opBatchRevokePermissions,
127		HTTPMethod: "POST",
128		HTTPPath:   "/",
129	}
130
131	if input == nil {
132		input = &BatchRevokePermissionsInput{}
133	}
134
135	output = &BatchRevokePermissionsOutput{}
136	req = c.newRequest(op, input, output)
137	return
138}
139
140// BatchRevokePermissions API operation for AWS Lake Formation.
141//
142// Batch operation to revoke permissions from the principal.
143//
144// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
145// with awserr.Error's Code and Message methods to get detailed information about
146// the error.
147//
148// See the AWS API reference guide for AWS Lake Formation's
149// API operation BatchRevokePermissions for usage and error information.
150//
151// Returned Error Types:
152//   * InvalidInputException
153//   The input provided was not valid.
154//
155//   * OperationTimeoutException
156//   The operation timed out.
157//
158// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/BatchRevokePermissions
159func (c *LakeFormation) BatchRevokePermissions(input *BatchRevokePermissionsInput) (*BatchRevokePermissionsOutput, error) {
160	req, out := c.BatchRevokePermissionsRequest(input)
161	return out, req.Send()
162}
163
164// BatchRevokePermissionsWithContext is the same as BatchRevokePermissions with the addition of
165// the ability to pass a context and additional request options.
166//
167// See BatchRevokePermissions for details on how to use this API operation.
168//
169// The context must be non-nil and will be used for request cancellation. If
170// the context is nil a panic will occur. In the future the SDK may create
171// sub-contexts for http.Requests. See https://golang.org/pkg/context/
172// for more information on using Contexts.
173func (c *LakeFormation) BatchRevokePermissionsWithContext(ctx aws.Context, input *BatchRevokePermissionsInput, opts ...request.Option) (*BatchRevokePermissionsOutput, error) {
174	req, out := c.BatchRevokePermissionsRequest(input)
175	req.SetContext(ctx)
176	req.ApplyOptions(opts...)
177	return out, req.Send()
178}
179
180const opDeregisterResource = "DeregisterResource"
181
182// DeregisterResourceRequest generates a "aws/request.Request" representing the
183// client's request for the DeregisterResource operation. The "output" return
184// value will be populated with the request's response once the request completes
185// successfully.
186//
187// Use "Send" method on the returned Request to send the API call to the service.
188// the "output" return value is not valid until after Send returns without error.
189//
190// See DeregisterResource for more information on using the DeregisterResource
191// API call, and error handling.
192//
193// This method is useful when you want to inject custom logic or configuration
194// into the SDK's request lifecycle. Such as custom headers, or retry logic.
195//
196//
197//    // Example sending a request using the DeregisterResourceRequest method.
198//    req, resp := client.DeregisterResourceRequest(params)
199//
200//    err := req.Send()
201//    if err == nil { // resp is now filled
202//        fmt.Println(resp)
203//    }
204//
205// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DeregisterResource
206func (c *LakeFormation) DeregisterResourceRequest(input *DeregisterResourceInput) (req *request.Request, output *DeregisterResourceOutput) {
207	op := &request.Operation{
208		Name:       opDeregisterResource,
209		HTTPMethod: "POST",
210		HTTPPath:   "/",
211	}
212
213	if input == nil {
214		input = &DeregisterResourceInput{}
215	}
216
217	output = &DeregisterResourceOutput{}
218	req = c.newRequest(op, input, output)
219	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
220	return
221}
222
223// DeregisterResource API operation for AWS Lake Formation.
224//
225// Deregisters the resource as managed by the Data Catalog.
226//
227// When you deregister a path, Lake Formation removes the path from the inline
228// policy attached to your service-linked role.
229//
230// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
231// with awserr.Error's Code and Message methods to get detailed information about
232// the error.
233//
234// See the AWS API reference guide for AWS Lake Formation's
235// API operation DeregisterResource for usage and error information.
236//
237// Returned Error Types:
238//   * InvalidInputException
239//   The input provided was not valid.
240//
241//   * InternalServiceException
242//   An internal service error occurred.
243//
244//   * OperationTimeoutException
245//   The operation timed out.
246//
247//   * EntityNotFoundException
248//   A specified entity does not exist
249//
250// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DeregisterResource
251func (c *LakeFormation) DeregisterResource(input *DeregisterResourceInput) (*DeregisterResourceOutput, error) {
252	req, out := c.DeregisterResourceRequest(input)
253	return out, req.Send()
254}
255
256// DeregisterResourceWithContext is the same as DeregisterResource with the addition of
257// the ability to pass a context and additional request options.
258//
259// See DeregisterResource for details on how to use this API operation.
260//
261// The context must be non-nil and will be used for request cancellation. If
262// the context is nil a panic will occur. In the future the SDK may create
263// sub-contexts for http.Requests. See https://golang.org/pkg/context/
264// for more information on using Contexts.
265func (c *LakeFormation) DeregisterResourceWithContext(ctx aws.Context, input *DeregisterResourceInput, opts ...request.Option) (*DeregisterResourceOutput, error) {
266	req, out := c.DeregisterResourceRequest(input)
267	req.SetContext(ctx)
268	req.ApplyOptions(opts...)
269	return out, req.Send()
270}
271
272const opDescribeResource = "DescribeResource"
273
274// DescribeResourceRequest generates a "aws/request.Request" representing the
275// client's request for the DescribeResource operation. The "output" return
276// value will be populated with the request's response once the request completes
277// successfully.
278//
279// Use "Send" method on the returned Request to send the API call to the service.
280// the "output" return value is not valid until after Send returns without error.
281//
282// See DescribeResource for more information on using the DescribeResource
283// API call, and error handling.
284//
285// This method is useful when you want to inject custom logic or configuration
286// into the SDK's request lifecycle. Such as custom headers, or retry logic.
287//
288//
289//    // Example sending a request using the DescribeResourceRequest method.
290//    req, resp := client.DescribeResourceRequest(params)
291//
292//    err := req.Send()
293//    if err == nil { // resp is now filled
294//        fmt.Println(resp)
295//    }
296//
297// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DescribeResource
298func (c *LakeFormation) DescribeResourceRequest(input *DescribeResourceInput) (req *request.Request, output *DescribeResourceOutput) {
299	op := &request.Operation{
300		Name:       opDescribeResource,
301		HTTPMethod: "POST",
302		HTTPPath:   "/",
303	}
304
305	if input == nil {
306		input = &DescribeResourceInput{}
307	}
308
309	output = &DescribeResourceOutput{}
310	req = c.newRequest(op, input, output)
311	return
312}
313
314// DescribeResource API operation for AWS Lake Formation.
315//
316// Retrieves the current data access role for the given resource registered
317// in AWS Lake Formation.
318//
319// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
320// with awserr.Error's Code and Message methods to get detailed information about
321// the error.
322//
323// See the AWS API reference guide for AWS Lake Formation's
324// API operation DescribeResource for usage and error information.
325//
326// Returned Error Types:
327//   * InvalidInputException
328//   The input provided was not valid.
329//
330//   * InternalServiceException
331//   An internal service error occurred.
332//
333//   * OperationTimeoutException
334//   The operation timed out.
335//
336//   * EntityNotFoundException
337//   A specified entity does not exist
338//
339// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/DescribeResource
340func (c *LakeFormation) DescribeResource(input *DescribeResourceInput) (*DescribeResourceOutput, error) {
341	req, out := c.DescribeResourceRequest(input)
342	return out, req.Send()
343}
344
345// DescribeResourceWithContext is the same as DescribeResource with the addition of
346// the ability to pass a context and additional request options.
347//
348// See DescribeResource for details on how to use this API operation.
349//
350// The context must be non-nil and will be used for request cancellation. If
351// the context is nil a panic will occur. In the future the SDK may create
352// sub-contexts for http.Requests. See https://golang.org/pkg/context/
353// for more information on using Contexts.
354func (c *LakeFormation) DescribeResourceWithContext(ctx aws.Context, input *DescribeResourceInput, opts ...request.Option) (*DescribeResourceOutput, error) {
355	req, out := c.DescribeResourceRequest(input)
356	req.SetContext(ctx)
357	req.ApplyOptions(opts...)
358	return out, req.Send()
359}
360
361const opGetDataLakeSettings = "GetDataLakeSettings"
362
363// GetDataLakeSettingsRequest generates a "aws/request.Request" representing the
364// client's request for the GetDataLakeSettings operation. The "output" return
365// value will be populated with the request's response once the request completes
366// successfully.
367//
368// Use "Send" method on the returned Request to send the API call to the service.
369// the "output" return value is not valid until after Send returns without error.
370//
371// See GetDataLakeSettings for more information on using the GetDataLakeSettings
372// API call, and error handling.
373//
374// This method is useful when you want to inject custom logic or configuration
375// into the SDK's request lifecycle. Such as custom headers, or retry logic.
376//
377//
378//    // Example sending a request using the GetDataLakeSettingsRequest method.
379//    req, resp := client.GetDataLakeSettingsRequest(params)
380//
381//    err := req.Send()
382//    if err == nil { // resp is now filled
383//        fmt.Println(resp)
384//    }
385//
386// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetDataLakeSettings
387func (c *LakeFormation) GetDataLakeSettingsRequest(input *GetDataLakeSettingsInput) (req *request.Request, output *GetDataLakeSettingsOutput) {
388	op := &request.Operation{
389		Name:       opGetDataLakeSettings,
390		HTTPMethod: "POST",
391		HTTPPath:   "/",
392	}
393
394	if input == nil {
395		input = &GetDataLakeSettingsInput{}
396	}
397
398	output = &GetDataLakeSettingsOutput{}
399	req = c.newRequest(op, input, output)
400	return
401}
402
403// GetDataLakeSettings API operation for AWS Lake Formation.
404//
405// Retrieves the list of the data lake administrators of a Lake Formation-managed
406// data lake.
407//
408// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
409// with awserr.Error's Code and Message methods to get detailed information about
410// the error.
411//
412// See the AWS API reference guide for AWS Lake Formation's
413// API operation GetDataLakeSettings for usage and error information.
414//
415// Returned Error Types:
416//   * InternalServiceException
417//   An internal service error occurred.
418//
419//   * InvalidInputException
420//   The input provided was not valid.
421//
422//   * EntityNotFoundException
423//   A specified entity does not exist
424//
425// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetDataLakeSettings
426func (c *LakeFormation) GetDataLakeSettings(input *GetDataLakeSettingsInput) (*GetDataLakeSettingsOutput, error) {
427	req, out := c.GetDataLakeSettingsRequest(input)
428	return out, req.Send()
429}
430
431// GetDataLakeSettingsWithContext is the same as GetDataLakeSettings with the addition of
432// the ability to pass a context and additional request options.
433//
434// See GetDataLakeSettings for details on how to use this API operation.
435//
436// The context must be non-nil and will be used for request cancellation. If
437// the context is nil a panic will occur. In the future the SDK may create
438// sub-contexts for http.Requests. See https://golang.org/pkg/context/
439// for more information on using Contexts.
440func (c *LakeFormation) GetDataLakeSettingsWithContext(ctx aws.Context, input *GetDataLakeSettingsInput, opts ...request.Option) (*GetDataLakeSettingsOutput, error) {
441	req, out := c.GetDataLakeSettingsRequest(input)
442	req.SetContext(ctx)
443	req.ApplyOptions(opts...)
444	return out, req.Send()
445}
446
447const opGetEffectivePermissionsForPath = "GetEffectivePermissionsForPath"
448
449// GetEffectivePermissionsForPathRequest generates a "aws/request.Request" representing the
450// client's request for the GetEffectivePermissionsForPath operation. The "output" return
451// value will be populated with the request's response once the request completes
452// successfully.
453//
454// Use "Send" method on the returned Request to send the API call to the service.
455// the "output" return value is not valid until after Send returns without error.
456//
457// See GetEffectivePermissionsForPath for more information on using the GetEffectivePermissionsForPath
458// API call, and error handling.
459//
460// This method is useful when you want to inject custom logic or configuration
461// into the SDK's request lifecycle. Such as custom headers, or retry logic.
462//
463//
464//    // Example sending a request using the GetEffectivePermissionsForPathRequest method.
465//    req, resp := client.GetEffectivePermissionsForPathRequest(params)
466//
467//    err := req.Send()
468//    if err == nil { // resp is now filled
469//        fmt.Println(resp)
470//    }
471//
472// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetEffectivePermissionsForPath
473func (c *LakeFormation) GetEffectivePermissionsForPathRequest(input *GetEffectivePermissionsForPathInput) (req *request.Request, output *GetEffectivePermissionsForPathOutput) {
474	op := &request.Operation{
475		Name:       opGetEffectivePermissionsForPath,
476		HTTPMethod: "POST",
477		HTTPPath:   "/",
478		Paginator: &request.Paginator{
479			InputTokens:     []string{"NextToken"},
480			OutputTokens:    []string{"NextToken"},
481			LimitToken:      "MaxResults",
482			TruncationToken: "",
483		},
484	}
485
486	if input == nil {
487		input = &GetEffectivePermissionsForPathInput{}
488	}
489
490	output = &GetEffectivePermissionsForPathOutput{}
491	req = c.newRequest(op, input, output)
492	return
493}
494
495// GetEffectivePermissionsForPath API operation for AWS Lake Formation.
496//
497// Returns the Lake Formation permissions for a specified table or database
498// resource located at a path in Amazon S3. GetEffectivePermissionsForPath will
499// not return databases and tables if the catalog is encrypted.
500//
501// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
502// with awserr.Error's Code and Message methods to get detailed information about
503// the error.
504//
505// See the AWS API reference guide for AWS Lake Formation's
506// API operation GetEffectivePermissionsForPath for usage and error information.
507//
508// Returned Error Types:
509//   * InvalidInputException
510//   The input provided was not valid.
511//
512//   * EntityNotFoundException
513//   A specified entity does not exist
514//
515//   * OperationTimeoutException
516//   The operation timed out.
517//
518//   * InternalServiceException
519//   An internal service error occurred.
520//
521// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GetEffectivePermissionsForPath
522func (c *LakeFormation) GetEffectivePermissionsForPath(input *GetEffectivePermissionsForPathInput) (*GetEffectivePermissionsForPathOutput, error) {
523	req, out := c.GetEffectivePermissionsForPathRequest(input)
524	return out, req.Send()
525}
526
527// GetEffectivePermissionsForPathWithContext is the same as GetEffectivePermissionsForPath with the addition of
528// the ability to pass a context and additional request options.
529//
530// See GetEffectivePermissionsForPath for details on how to use this API operation.
531//
532// The context must be non-nil and will be used for request cancellation. If
533// the context is nil a panic will occur. In the future the SDK may create
534// sub-contexts for http.Requests. See https://golang.org/pkg/context/
535// for more information on using Contexts.
536func (c *LakeFormation) GetEffectivePermissionsForPathWithContext(ctx aws.Context, input *GetEffectivePermissionsForPathInput, opts ...request.Option) (*GetEffectivePermissionsForPathOutput, error) {
537	req, out := c.GetEffectivePermissionsForPathRequest(input)
538	req.SetContext(ctx)
539	req.ApplyOptions(opts...)
540	return out, req.Send()
541}
542
543// GetEffectivePermissionsForPathPages iterates over the pages of a GetEffectivePermissionsForPath operation,
544// calling the "fn" function with the response data for each page. To stop
545// iterating, return false from the fn function.
546//
547// See GetEffectivePermissionsForPath method for more information on how to use this operation.
548//
549// Note: This operation can generate multiple requests to a service.
550//
551//    // Example iterating over at most 3 pages of a GetEffectivePermissionsForPath operation.
552//    pageNum := 0
553//    err := client.GetEffectivePermissionsForPathPages(params,
554//        func(page *lakeformation.GetEffectivePermissionsForPathOutput, lastPage bool) bool {
555//            pageNum++
556//            fmt.Println(page)
557//            return pageNum <= 3
558//        })
559//
560func (c *LakeFormation) GetEffectivePermissionsForPathPages(input *GetEffectivePermissionsForPathInput, fn func(*GetEffectivePermissionsForPathOutput, bool) bool) error {
561	return c.GetEffectivePermissionsForPathPagesWithContext(aws.BackgroundContext(), input, fn)
562}
563
564// GetEffectivePermissionsForPathPagesWithContext same as GetEffectivePermissionsForPathPages except
565// it takes a Context and allows setting request options on the pages.
566//
567// The context must be non-nil and will be used for request cancellation. If
568// the context is nil a panic will occur. In the future the SDK may create
569// sub-contexts for http.Requests. See https://golang.org/pkg/context/
570// for more information on using Contexts.
571func (c *LakeFormation) GetEffectivePermissionsForPathPagesWithContext(ctx aws.Context, input *GetEffectivePermissionsForPathInput, fn func(*GetEffectivePermissionsForPathOutput, bool) bool, opts ...request.Option) error {
572	p := request.Pagination{
573		NewRequest: func() (*request.Request, error) {
574			var inCpy *GetEffectivePermissionsForPathInput
575			if input != nil {
576				tmp := *input
577				inCpy = &tmp
578			}
579			req, _ := c.GetEffectivePermissionsForPathRequest(inCpy)
580			req.SetContext(ctx)
581			req.ApplyOptions(opts...)
582			return req, nil
583		},
584	}
585
586	for p.Next() {
587		if !fn(p.Page().(*GetEffectivePermissionsForPathOutput), !p.HasNextPage()) {
588			break
589		}
590	}
591
592	return p.Err()
593}
594
595const opGrantPermissions = "GrantPermissions"
596
597// GrantPermissionsRequest generates a "aws/request.Request" representing the
598// client's request for the GrantPermissions operation. The "output" return
599// value will be populated with the request's response once the request completes
600// successfully.
601//
602// Use "Send" method on the returned Request to send the API call to the service.
603// the "output" return value is not valid until after Send returns without error.
604//
605// See GrantPermissions for more information on using the GrantPermissions
606// API call, and error handling.
607//
608// This method is useful when you want to inject custom logic or configuration
609// into the SDK's request lifecycle. Such as custom headers, or retry logic.
610//
611//
612//    // Example sending a request using the GrantPermissionsRequest method.
613//    req, resp := client.GrantPermissionsRequest(params)
614//
615//    err := req.Send()
616//    if err == nil { // resp is now filled
617//        fmt.Println(resp)
618//    }
619//
620// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GrantPermissions
621func (c *LakeFormation) GrantPermissionsRequest(input *GrantPermissionsInput) (req *request.Request, output *GrantPermissionsOutput) {
622	op := &request.Operation{
623		Name:       opGrantPermissions,
624		HTTPMethod: "POST",
625		HTTPPath:   "/",
626	}
627
628	if input == nil {
629		input = &GrantPermissionsInput{}
630	}
631
632	output = &GrantPermissionsOutput{}
633	req = c.newRequest(op, input, output)
634	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
635	return
636}
637
638// GrantPermissions API operation for AWS Lake Formation.
639//
640// Grants permissions to the principal to access metadata in the Data Catalog
641// and data organized in underlying data storage such as Amazon S3.
642//
643// For information about permissions, see Security and Access Control to Metadata
644// and Data (https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html).
645//
646// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
647// with awserr.Error's Code and Message methods to get detailed information about
648// the error.
649//
650// See the AWS API reference guide for AWS Lake Formation's
651// API operation GrantPermissions for usage and error information.
652//
653// Returned Error Types:
654//   * ConcurrentModificationException
655//   Two processes are trying to modify a resource simultaneously.
656//
657//   * EntityNotFoundException
658//   A specified entity does not exist
659//
660//   * InvalidInputException
661//   The input provided was not valid.
662//
663// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/GrantPermissions
664func (c *LakeFormation) GrantPermissions(input *GrantPermissionsInput) (*GrantPermissionsOutput, error) {
665	req, out := c.GrantPermissionsRequest(input)
666	return out, req.Send()
667}
668
669// GrantPermissionsWithContext is the same as GrantPermissions with the addition of
670// the ability to pass a context and additional request options.
671//
672// See GrantPermissions for details on how to use this API operation.
673//
674// The context must be non-nil and will be used for request cancellation. If
675// the context is nil a panic will occur. In the future the SDK may create
676// sub-contexts for http.Requests. See https://golang.org/pkg/context/
677// for more information on using Contexts.
678func (c *LakeFormation) GrantPermissionsWithContext(ctx aws.Context, input *GrantPermissionsInput, opts ...request.Option) (*GrantPermissionsOutput, error) {
679	req, out := c.GrantPermissionsRequest(input)
680	req.SetContext(ctx)
681	req.ApplyOptions(opts...)
682	return out, req.Send()
683}
684
685const opListPermissions = "ListPermissions"
686
687// ListPermissionsRequest generates a "aws/request.Request" representing the
688// client's request for the ListPermissions operation. The "output" return
689// value will be populated with the request's response once the request completes
690// successfully.
691//
692// Use "Send" method on the returned Request to send the API call to the service.
693// the "output" return value is not valid until after Send returns without error.
694//
695// See ListPermissions for more information on using the ListPermissions
696// API call, and error handling.
697//
698// This method is useful when you want to inject custom logic or configuration
699// into the SDK's request lifecycle. Such as custom headers, or retry logic.
700//
701//
702//    // Example sending a request using the ListPermissionsRequest method.
703//    req, resp := client.ListPermissionsRequest(params)
704//
705//    err := req.Send()
706//    if err == nil { // resp is now filled
707//        fmt.Println(resp)
708//    }
709//
710// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListPermissions
711func (c *LakeFormation) ListPermissionsRequest(input *ListPermissionsInput) (req *request.Request, output *ListPermissionsOutput) {
712	op := &request.Operation{
713		Name:       opListPermissions,
714		HTTPMethod: "POST",
715		HTTPPath:   "/",
716		Paginator: &request.Paginator{
717			InputTokens:     []string{"NextToken"},
718			OutputTokens:    []string{"NextToken"},
719			LimitToken:      "MaxResults",
720			TruncationToken: "",
721		},
722	}
723
724	if input == nil {
725		input = &ListPermissionsInput{}
726	}
727
728	output = &ListPermissionsOutput{}
729	req = c.newRequest(op, input, output)
730	return
731}
732
733// ListPermissions API operation for AWS Lake Formation.
734//
735// Returns a list of the principal permissions on the resource, filtered by
736// the permissions of the caller. For example, if you are granted an ALTER permission,
737// you are able to see only the principal permissions for ALTER.
738//
739// This operation returns only those permissions that have been explicitly granted.
740//
741// For information about permissions, see Security and Access Control to Metadata
742// and Data (https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html).
743//
744// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
745// with awserr.Error's Code and Message methods to get detailed information about
746// the error.
747//
748// See the AWS API reference guide for AWS Lake Formation's
749// API operation ListPermissions for usage and error information.
750//
751// Returned Error Types:
752//   * InvalidInputException
753//   The input provided was not valid.
754//
755//   * OperationTimeoutException
756//   The operation timed out.
757//
758//   * InternalServiceException
759//   An internal service error occurred.
760//
761// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListPermissions
762func (c *LakeFormation) ListPermissions(input *ListPermissionsInput) (*ListPermissionsOutput, error) {
763	req, out := c.ListPermissionsRequest(input)
764	return out, req.Send()
765}
766
767// ListPermissionsWithContext is the same as ListPermissions with the addition of
768// the ability to pass a context and additional request options.
769//
770// See ListPermissions for details on how to use this API operation.
771//
772// The context must be non-nil and will be used for request cancellation. If
773// the context is nil a panic will occur. In the future the SDK may create
774// sub-contexts for http.Requests. See https://golang.org/pkg/context/
775// for more information on using Contexts.
776func (c *LakeFormation) ListPermissionsWithContext(ctx aws.Context, input *ListPermissionsInput, opts ...request.Option) (*ListPermissionsOutput, error) {
777	req, out := c.ListPermissionsRequest(input)
778	req.SetContext(ctx)
779	req.ApplyOptions(opts...)
780	return out, req.Send()
781}
782
783// ListPermissionsPages iterates over the pages of a ListPermissions operation,
784// calling the "fn" function with the response data for each page. To stop
785// iterating, return false from the fn function.
786//
787// See ListPermissions method for more information on how to use this operation.
788//
789// Note: This operation can generate multiple requests to a service.
790//
791//    // Example iterating over at most 3 pages of a ListPermissions operation.
792//    pageNum := 0
793//    err := client.ListPermissionsPages(params,
794//        func(page *lakeformation.ListPermissionsOutput, lastPage bool) bool {
795//            pageNum++
796//            fmt.Println(page)
797//            return pageNum <= 3
798//        })
799//
800func (c *LakeFormation) ListPermissionsPages(input *ListPermissionsInput, fn func(*ListPermissionsOutput, bool) bool) error {
801	return c.ListPermissionsPagesWithContext(aws.BackgroundContext(), input, fn)
802}
803
804// ListPermissionsPagesWithContext same as ListPermissionsPages except
805// it takes a Context and allows setting request options on the pages.
806//
807// The context must be non-nil and will be used for request cancellation. If
808// the context is nil a panic will occur. In the future the SDK may create
809// sub-contexts for http.Requests. See https://golang.org/pkg/context/
810// for more information on using Contexts.
811func (c *LakeFormation) ListPermissionsPagesWithContext(ctx aws.Context, input *ListPermissionsInput, fn func(*ListPermissionsOutput, bool) bool, opts ...request.Option) error {
812	p := request.Pagination{
813		NewRequest: func() (*request.Request, error) {
814			var inCpy *ListPermissionsInput
815			if input != nil {
816				tmp := *input
817				inCpy = &tmp
818			}
819			req, _ := c.ListPermissionsRequest(inCpy)
820			req.SetContext(ctx)
821			req.ApplyOptions(opts...)
822			return req, nil
823		},
824	}
825
826	for p.Next() {
827		if !fn(p.Page().(*ListPermissionsOutput), !p.HasNextPage()) {
828			break
829		}
830	}
831
832	return p.Err()
833}
834
835const opListResources = "ListResources"
836
837// ListResourcesRequest generates a "aws/request.Request" representing the
838// client's request for the ListResources operation. The "output" return
839// value will be populated with the request's response once the request completes
840// successfully.
841//
842// Use "Send" method on the returned Request to send the API call to the service.
843// the "output" return value is not valid until after Send returns without error.
844//
845// See ListResources for more information on using the ListResources
846// API call, and error handling.
847//
848// This method is useful when you want to inject custom logic or configuration
849// into the SDK's request lifecycle. Such as custom headers, or retry logic.
850//
851//
852//    // Example sending a request using the ListResourcesRequest method.
853//    req, resp := client.ListResourcesRequest(params)
854//
855//    err := req.Send()
856//    if err == nil { // resp is now filled
857//        fmt.Println(resp)
858//    }
859//
860// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListResources
861func (c *LakeFormation) ListResourcesRequest(input *ListResourcesInput) (req *request.Request, output *ListResourcesOutput) {
862	op := &request.Operation{
863		Name:       opListResources,
864		HTTPMethod: "POST",
865		HTTPPath:   "/",
866		Paginator: &request.Paginator{
867			InputTokens:     []string{"NextToken"},
868			OutputTokens:    []string{"NextToken"},
869			LimitToken:      "MaxResults",
870			TruncationToken: "",
871		},
872	}
873
874	if input == nil {
875		input = &ListResourcesInput{}
876	}
877
878	output = &ListResourcesOutput{}
879	req = c.newRequest(op, input, output)
880	return
881}
882
883// ListResources API operation for AWS Lake Formation.
884//
885// Lists the resources registered to be managed by the Data Catalog.
886//
887// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
888// with awserr.Error's Code and Message methods to get detailed information about
889// the error.
890//
891// See the AWS API reference guide for AWS Lake Formation's
892// API operation ListResources for usage and error information.
893//
894// Returned Error Types:
895//   * InvalidInputException
896//   The input provided was not valid.
897//
898//   * InternalServiceException
899//   An internal service error occurred.
900//
901//   * OperationTimeoutException
902//   The operation timed out.
903//
904// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/ListResources
905func (c *LakeFormation) ListResources(input *ListResourcesInput) (*ListResourcesOutput, error) {
906	req, out := c.ListResourcesRequest(input)
907	return out, req.Send()
908}
909
910// ListResourcesWithContext is the same as ListResources with the addition of
911// the ability to pass a context and additional request options.
912//
913// See ListResources for details on how to use this API operation.
914//
915// The context must be non-nil and will be used for request cancellation. If
916// the context is nil a panic will occur. In the future the SDK may create
917// sub-contexts for http.Requests. See https://golang.org/pkg/context/
918// for more information on using Contexts.
919func (c *LakeFormation) ListResourcesWithContext(ctx aws.Context, input *ListResourcesInput, opts ...request.Option) (*ListResourcesOutput, error) {
920	req, out := c.ListResourcesRequest(input)
921	req.SetContext(ctx)
922	req.ApplyOptions(opts...)
923	return out, req.Send()
924}
925
926// ListResourcesPages iterates over the pages of a ListResources operation,
927// calling the "fn" function with the response data for each page. To stop
928// iterating, return false from the fn function.
929//
930// See ListResources method for more information on how to use this operation.
931//
932// Note: This operation can generate multiple requests to a service.
933//
934//    // Example iterating over at most 3 pages of a ListResources operation.
935//    pageNum := 0
936//    err := client.ListResourcesPages(params,
937//        func(page *lakeformation.ListResourcesOutput, lastPage bool) bool {
938//            pageNum++
939//            fmt.Println(page)
940//            return pageNum <= 3
941//        })
942//
943func (c *LakeFormation) ListResourcesPages(input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool) error {
944	return c.ListResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
945}
946
947// ListResourcesPagesWithContext same as ListResourcesPages except
948// it takes a Context and allows setting request options on the pages.
949//
950// The context must be non-nil and will be used for request cancellation. If
951// the context is nil a panic will occur. In the future the SDK may create
952// sub-contexts for http.Requests. See https://golang.org/pkg/context/
953// for more information on using Contexts.
954func (c *LakeFormation) ListResourcesPagesWithContext(ctx aws.Context, input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool, opts ...request.Option) error {
955	p := request.Pagination{
956		NewRequest: func() (*request.Request, error) {
957			var inCpy *ListResourcesInput
958			if input != nil {
959				tmp := *input
960				inCpy = &tmp
961			}
962			req, _ := c.ListResourcesRequest(inCpy)
963			req.SetContext(ctx)
964			req.ApplyOptions(opts...)
965			return req, nil
966		},
967	}
968
969	for p.Next() {
970		if !fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) {
971			break
972		}
973	}
974
975	return p.Err()
976}
977
978const opPutDataLakeSettings = "PutDataLakeSettings"
979
980// PutDataLakeSettingsRequest generates a "aws/request.Request" representing the
981// client's request for the PutDataLakeSettings operation. The "output" return
982// value will be populated with the request's response once the request completes
983// successfully.
984//
985// Use "Send" method on the returned Request to send the API call to the service.
986// the "output" return value is not valid until after Send returns without error.
987//
988// See PutDataLakeSettings for more information on using the PutDataLakeSettings
989// API call, and error handling.
990//
991// This method is useful when you want to inject custom logic or configuration
992// into the SDK's request lifecycle. Such as custom headers, or retry logic.
993//
994//
995//    // Example sending a request using the PutDataLakeSettingsRequest method.
996//    req, resp := client.PutDataLakeSettingsRequest(params)
997//
998//    err := req.Send()
999//    if err == nil { // resp is now filled
1000//        fmt.Println(resp)
1001//    }
1002//
1003// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/PutDataLakeSettings
1004func (c *LakeFormation) PutDataLakeSettingsRequest(input *PutDataLakeSettingsInput) (req *request.Request, output *PutDataLakeSettingsOutput) {
1005	op := &request.Operation{
1006		Name:       opPutDataLakeSettings,
1007		HTTPMethod: "POST",
1008		HTTPPath:   "/",
1009	}
1010
1011	if input == nil {
1012		input = &PutDataLakeSettingsInput{}
1013	}
1014
1015	output = &PutDataLakeSettingsOutput{}
1016	req = c.newRequest(op, input, output)
1017	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1018	return
1019}
1020
1021// PutDataLakeSettings API operation for AWS Lake Formation.
1022//
1023// Sets the list of data lake administrators who have admin privileges on all
1024// resources managed by Lake Formation. For more information on admin privileges,
1025// see Granting Lake Formation Permissions (https://docs.aws.amazon.com/lake-formation/latest/dg/lake-formation-permissions.html).
1026//
1027// This API replaces the current list of data lake admins with the new list
1028// being passed. To add an admin, fetch the current list and add the new admin
1029// to that list and pass that list in this API.
1030//
1031// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1032// with awserr.Error's Code and Message methods to get detailed information about
1033// the error.
1034//
1035// See the AWS API reference guide for AWS Lake Formation's
1036// API operation PutDataLakeSettings for usage and error information.
1037//
1038// Returned Error Types:
1039//   * InternalServiceException
1040//   An internal service error occurred.
1041//
1042//   * InvalidInputException
1043//   The input provided was not valid.
1044//
1045// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/PutDataLakeSettings
1046func (c *LakeFormation) PutDataLakeSettings(input *PutDataLakeSettingsInput) (*PutDataLakeSettingsOutput, error) {
1047	req, out := c.PutDataLakeSettingsRequest(input)
1048	return out, req.Send()
1049}
1050
1051// PutDataLakeSettingsWithContext is the same as PutDataLakeSettings with the addition of
1052// the ability to pass a context and additional request options.
1053//
1054// See PutDataLakeSettings for details on how to use this API operation.
1055//
1056// The context must be non-nil and will be used for request cancellation. If
1057// the context is nil a panic will occur. In the future the SDK may create
1058// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1059// for more information on using Contexts.
1060func (c *LakeFormation) PutDataLakeSettingsWithContext(ctx aws.Context, input *PutDataLakeSettingsInput, opts ...request.Option) (*PutDataLakeSettingsOutput, error) {
1061	req, out := c.PutDataLakeSettingsRequest(input)
1062	req.SetContext(ctx)
1063	req.ApplyOptions(opts...)
1064	return out, req.Send()
1065}
1066
1067const opRegisterResource = "RegisterResource"
1068
1069// RegisterResourceRequest generates a "aws/request.Request" representing the
1070// client's request for the RegisterResource operation. The "output" return
1071// value will be populated with the request's response once the request completes
1072// successfully.
1073//
1074// Use "Send" method on the returned Request to send the API call to the service.
1075// the "output" return value is not valid until after Send returns without error.
1076//
1077// See RegisterResource for more information on using the RegisterResource
1078// API call, and error handling.
1079//
1080// This method is useful when you want to inject custom logic or configuration
1081// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1082//
1083//
1084//    // Example sending a request using the RegisterResourceRequest method.
1085//    req, resp := client.RegisterResourceRequest(params)
1086//
1087//    err := req.Send()
1088//    if err == nil { // resp is now filled
1089//        fmt.Println(resp)
1090//    }
1091//
1092// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RegisterResource
1093func (c *LakeFormation) RegisterResourceRequest(input *RegisterResourceInput) (req *request.Request, output *RegisterResourceOutput) {
1094	op := &request.Operation{
1095		Name:       opRegisterResource,
1096		HTTPMethod: "POST",
1097		HTTPPath:   "/",
1098	}
1099
1100	if input == nil {
1101		input = &RegisterResourceInput{}
1102	}
1103
1104	output = &RegisterResourceOutput{}
1105	req = c.newRequest(op, input, output)
1106	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1107	return
1108}
1109
1110// RegisterResource API operation for AWS Lake Formation.
1111//
1112// Registers the resource as managed by the Data Catalog.
1113//
1114// To add or update data, Lake Formation needs read/write access to the chosen
1115// Amazon S3 path. Choose a role that you know has permission to do this, or
1116// choose the AWSServiceRoleForLakeFormationDataAccess service-linked role.
1117// When you register the first Amazon S3 path, the service-linked role and a
1118// new inline policy are created on your behalf. Lake Formation adds the first
1119// path to the inline policy and attaches it to the service-linked role. When
1120// you register subsequent paths, Lake Formation adds the path to the existing
1121// policy.
1122//
1123// The following request registers a new location and gives AWS Lake Formation
1124// permission to use the service-linked role to access that location.
1125//
1126// ResourceArn = arn:aws:s3:::my-bucket UseServiceLinkedRole = true
1127//
1128// If UseServiceLinkedRole is not set to true, you must provide or set the RoleArn:
1129//
1130// arn:aws:iam::12345:role/my-data-access-role
1131//
1132// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1133// with awserr.Error's Code and Message methods to get detailed information about
1134// the error.
1135//
1136// See the AWS API reference guide for AWS Lake Formation's
1137// API operation RegisterResource for usage and error information.
1138//
1139// Returned Error Types:
1140//   * InvalidInputException
1141//   The input provided was not valid.
1142//
1143//   * InternalServiceException
1144//   An internal service error occurred.
1145//
1146//   * OperationTimeoutException
1147//   The operation timed out.
1148//
1149//   * AlreadyExistsException
1150//   A resource to be created or added already exists.
1151//
1152// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RegisterResource
1153func (c *LakeFormation) RegisterResource(input *RegisterResourceInput) (*RegisterResourceOutput, error) {
1154	req, out := c.RegisterResourceRequest(input)
1155	return out, req.Send()
1156}
1157
1158// RegisterResourceWithContext is the same as RegisterResource with the addition of
1159// the ability to pass a context and additional request options.
1160//
1161// See RegisterResource for details on how to use this API operation.
1162//
1163// The context must be non-nil and will be used for request cancellation. If
1164// the context is nil a panic will occur. In the future the SDK may create
1165// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1166// for more information on using Contexts.
1167func (c *LakeFormation) RegisterResourceWithContext(ctx aws.Context, input *RegisterResourceInput, opts ...request.Option) (*RegisterResourceOutput, error) {
1168	req, out := c.RegisterResourceRequest(input)
1169	req.SetContext(ctx)
1170	req.ApplyOptions(opts...)
1171	return out, req.Send()
1172}
1173
1174const opRevokePermissions = "RevokePermissions"
1175
1176// RevokePermissionsRequest generates a "aws/request.Request" representing the
1177// client's request for the RevokePermissions operation. The "output" return
1178// value will be populated with the request's response once the request completes
1179// successfully.
1180//
1181// Use "Send" method on the returned Request to send the API call to the service.
1182// the "output" return value is not valid until after Send returns without error.
1183//
1184// See RevokePermissions for more information on using the RevokePermissions
1185// API call, and error handling.
1186//
1187// This method is useful when you want to inject custom logic or configuration
1188// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1189//
1190//
1191//    // Example sending a request using the RevokePermissionsRequest method.
1192//    req, resp := client.RevokePermissionsRequest(params)
1193//
1194//    err := req.Send()
1195//    if err == nil { // resp is now filled
1196//        fmt.Println(resp)
1197//    }
1198//
1199// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RevokePermissions
1200func (c *LakeFormation) RevokePermissionsRequest(input *RevokePermissionsInput) (req *request.Request, output *RevokePermissionsOutput) {
1201	op := &request.Operation{
1202		Name:       opRevokePermissions,
1203		HTTPMethod: "POST",
1204		HTTPPath:   "/",
1205	}
1206
1207	if input == nil {
1208		input = &RevokePermissionsInput{}
1209	}
1210
1211	output = &RevokePermissionsOutput{}
1212	req = c.newRequest(op, input, output)
1213	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1214	return
1215}
1216
1217// RevokePermissions API operation for AWS Lake Formation.
1218//
1219// Revokes permissions to the principal to access metadata in the Data Catalog
1220// and data organized in underlying data storage such as Amazon S3.
1221//
1222// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1223// with awserr.Error's Code and Message methods to get detailed information about
1224// the error.
1225//
1226// See the AWS API reference guide for AWS Lake Formation's
1227// API operation RevokePermissions for usage and error information.
1228//
1229// Returned Error Types:
1230//   * ConcurrentModificationException
1231//   Two processes are trying to modify a resource simultaneously.
1232//
1233//   * EntityNotFoundException
1234//   A specified entity does not exist
1235//
1236//   * InvalidInputException
1237//   The input provided was not valid.
1238//
1239// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/RevokePermissions
1240func (c *LakeFormation) RevokePermissions(input *RevokePermissionsInput) (*RevokePermissionsOutput, error) {
1241	req, out := c.RevokePermissionsRequest(input)
1242	return out, req.Send()
1243}
1244
1245// RevokePermissionsWithContext is the same as RevokePermissions with the addition of
1246// the ability to pass a context and additional request options.
1247//
1248// See RevokePermissions for details on how to use this API operation.
1249//
1250// The context must be non-nil and will be used for request cancellation. If
1251// the context is nil a panic will occur. In the future the SDK may create
1252// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1253// for more information on using Contexts.
1254func (c *LakeFormation) RevokePermissionsWithContext(ctx aws.Context, input *RevokePermissionsInput, opts ...request.Option) (*RevokePermissionsOutput, error) {
1255	req, out := c.RevokePermissionsRequest(input)
1256	req.SetContext(ctx)
1257	req.ApplyOptions(opts...)
1258	return out, req.Send()
1259}
1260
1261const opUpdateResource = "UpdateResource"
1262
1263// UpdateResourceRequest generates a "aws/request.Request" representing the
1264// client's request for the UpdateResource operation. The "output" return
1265// value will be populated with the request's response once the request completes
1266// successfully.
1267//
1268// Use "Send" method on the returned Request to send the API call to the service.
1269// the "output" return value is not valid until after Send returns without error.
1270//
1271// See UpdateResource for more information on using the UpdateResource
1272// API call, and error handling.
1273//
1274// This method is useful when you want to inject custom logic or configuration
1275// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1276//
1277//
1278//    // Example sending a request using the UpdateResourceRequest method.
1279//    req, resp := client.UpdateResourceRequest(params)
1280//
1281//    err := req.Send()
1282//    if err == nil { // resp is now filled
1283//        fmt.Println(resp)
1284//    }
1285//
1286// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/UpdateResource
1287func (c *LakeFormation) UpdateResourceRequest(input *UpdateResourceInput) (req *request.Request, output *UpdateResourceOutput) {
1288	op := &request.Operation{
1289		Name:       opUpdateResource,
1290		HTTPMethod: "POST",
1291		HTTPPath:   "/",
1292	}
1293
1294	if input == nil {
1295		input = &UpdateResourceInput{}
1296	}
1297
1298	output = &UpdateResourceOutput{}
1299	req = c.newRequest(op, input, output)
1300	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1301	return
1302}
1303
1304// UpdateResource API operation for AWS Lake Formation.
1305//
1306// Updates the data access role used for vending access to the given (registered)
1307// resource in AWS Lake Formation.
1308//
1309// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1310// with awserr.Error's Code and Message methods to get detailed information about
1311// the error.
1312//
1313// See the AWS API reference guide for AWS Lake Formation's
1314// API operation UpdateResource for usage and error information.
1315//
1316// Returned Error Types:
1317//   * InvalidInputException
1318//   The input provided was not valid.
1319//
1320//   * InternalServiceException
1321//   An internal service error occurred.
1322//
1323//   * OperationTimeoutException
1324//   The operation timed out.
1325//
1326//   * EntityNotFoundException
1327//   A specified entity does not exist
1328//
1329// See also, https://docs.aws.amazon.com/goto/WebAPI/lakeformation-2017-03-31/UpdateResource
1330func (c *LakeFormation) UpdateResource(input *UpdateResourceInput) (*UpdateResourceOutput, error) {
1331	req, out := c.UpdateResourceRequest(input)
1332	return out, req.Send()
1333}
1334
1335// UpdateResourceWithContext is the same as UpdateResource with the addition of
1336// the ability to pass a context and additional request options.
1337//
1338// See UpdateResource for details on how to use this API operation.
1339//
1340// The context must be non-nil and will be used for request cancellation. If
1341// the context is nil a panic will occur. In the future the SDK may create
1342// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1343// for more information on using Contexts.
1344func (c *LakeFormation) UpdateResourceWithContext(ctx aws.Context, input *UpdateResourceInput, opts ...request.Option) (*UpdateResourceOutput, error) {
1345	req, out := c.UpdateResourceRequest(input)
1346	req.SetContext(ctx)
1347	req.ApplyOptions(opts...)
1348	return out, req.Send()
1349}
1350
1351// A resource to be created or added already exists.
1352type AlreadyExistsException struct {
1353	_            struct{}                  `type:"structure"`
1354	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1355
1356	// A message describing the problem.
1357	Message_ *string `locationName:"Message" type:"string"`
1358}
1359
1360// String returns the string representation
1361func (s AlreadyExistsException) String() string {
1362	return awsutil.Prettify(s)
1363}
1364
1365// GoString returns the string representation
1366func (s AlreadyExistsException) GoString() string {
1367	return s.String()
1368}
1369
1370func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error {
1371	return &AlreadyExistsException{
1372		RespMetadata: v,
1373	}
1374}
1375
1376// Code returns the exception type name.
1377func (s *AlreadyExistsException) Code() string {
1378	return "AlreadyExistsException"
1379}
1380
1381// Message returns the exception's message.
1382func (s *AlreadyExistsException) Message() string {
1383	if s.Message_ != nil {
1384		return *s.Message_
1385	}
1386	return ""
1387}
1388
1389// OrigErr always returns nil, satisfies awserr.Error interface.
1390func (s *AlreadyExistsException) OrigErr() error {
1391	return nil
1392}
1393
1394func (s *AlreadyExistsException) Error() string {
1395	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1396}
1397
1398// Status code returns the HTTP status code for the request's response error.
1399func (s *AlreadyExistsException) StatusCode() int {
1400	return s.RespMetadata.StatusCode
1401}
1402
1403// RequestID returns the service's response RequestID for request.
1404func (s *AlreadyExistsException) RequestID() string {
1405	return s.RespMetadata.RequestID
1406}
1407
1408type BatchGrantPermissionsInput struct {
1409	_ struct{} `type:"structure"`
1410
1411	// The identifier for the Data Catalog. By default, the account ID. The Data
1412	// Catalog is the persistent metadata store. It contains database definitions,
1413	// table definitions, and other control information to manage your AWS Lake
1414	// Formation environment.
1415	CatalogId *string `min:"1" type:"string"`
1416
1417	// A list of up to 20 entries for resource permissions to be granted by batch
1418	// operation to the principal.
1419	//
1420	// Entries is a required field
1421	Entries []*BatchPermissionsRequestEntry `type:"list" required:"true"`
1422}
1423
1424// String returns the string representation
1425func (s BatchGrantPermissionsInput) String() string {
1426	return awsutil.Prettify(s)
1427}
1428
1429// GoString returns the string representation
1430func (s BatchGrantPermissionsInput) GoString() string {
1431	return s.String()
1432}
1433
1434// Validate inspects the fields of the type to determine if they are valid.
1435func (s *BatchGrantPermissionsInput) Validate() error {
1436	invalidParams := request.ErrInvalidParams{Context: "BatchGrantPermissionsInput"}
1437	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
1438		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
1439	}
1440	if s.Entries == nil {
1441		invalidParams.Add(request.NewErrParamRequired("Entries"))
1442	}
1443	if s.Entries != nil {
1444		for i, v := range s.Entries {
1445			if v == nil {
1446				continue
1447			}
1448			if err := v.Validate(); err != nil {
1449				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams))
1450			}
1451		}
1452	}
1453
1454	if invalidParams.Len() > 0 {
1455		return invalidParams
1456	}
1457	return nil
1458}
1459
1460// SetCatalogId sets the CatalogId field's value.
1461func (s *BatchGrantPermissionsInput) SetCatalogId(v string) *BatchGrantPermissionsInput {
1462	s.CatalogId = &v
1463	return s
1464}
1465
1466// SetEntries sets the Entries field's value.
1467func (s *BatchGrantPermissionsInput) SetEntries(v []*BatchPermissionsRequestEntry) *BatchGrantPermissionsInput {
1468	s.Entries = v
1469	return s
1470}
1471
1472type BatchGrantPermissionsOutput struct {
1473	_ struct{} `type:"structure"`
1474
1475	// A list of failures to grant permissions to the resources.
1476	Failures []*BatchPermissionsFailureEntry `type:"list"`
1477}
1478
1479// String returns the string representation
1480func (s BatchGrantPermissionsOutput) String() string {
1481	return awsutil.Prettify(s)
1482}
1483
1484// GoString returns the string representation
1485func (s BatchGrantPermissionsOutput) GoString() string {
1486	return s.String()
1487}
1488
1489// SetFailures sets the Failures field's value.
1490func (s *BatchGrantPermissionsOutput) SetFailures(v []*BatchPermissionsFailureEntry) *BatchGrantPermissionsOutput {
1491	s.Failures = v
1492	return s
1493}
1494
1495// A list of failures when performing a batch grant or batch revoke operation.
1496type BatchPermissionsFailureEntry struct {
1497	_ struct{} `type:"structure"`
1498
1499	// An error message that applies to the failure of the entry.
1500	Error *ErrorDetail `type:"structure"`
1501
1502	// An identifier for an entry of the batch request.
1503	RequestEntry *BatchPermissionsRequestEntry `type:"structure"`
1504}
1505
1506// String returns the string representation
1507func (s BatchPermissionsFailureEntry) String() string {
1508	return awsutil.Prettify(s)
1509}
1510
1511// GoString returns the string representation
1512func (s BatchPermissionsFailureEntry) GoString() string {
1513	return s.String()
1514}
1515
1516// SetError sets the Error field's value.
1517func (s *BatchPermissionsFailureEntry) SetError(v *ErrorDetail) *BatchPermissionsFailureEntry {
1518	s.Error = v
1519	return s
1520}
1521
1522// SetRequestEntry sets the RequestEntry field's value.
1523func (s *BatchPermissionsFailureEntry) SetRequestEntry(v *BatchPermissionsRequestEntry) *BatchPermissionsFailureEntry {
1524	s.RequestEntry = v
1525	return s
1526}
1527
1528// A permission to a resource granted by batch operation to the principal.
1529type BatchPermissionsRequestEntry struct {
1530	_ struct{} `type:"structure"`
1531
1532	// A unique identifier for the batch permissions request entry.
1533	//
1534	// Id is a required field
1535	Id *string `min:"1" type:"string" required:"true"`
1536
1537	// The permissions to be granted.
1538	Permissions []*string `type:"list"`
1539
1540	// Indicates if the option to pass permissions is granted.
1541	PermissionsWithGrantOption []*string `type:"list"`
1542
1543	// The principal to be granted a permission.
1544	Principal *DataLakePrincipal `type:"structure"`
1545
1546	// The resource to which the principal is to be granted a permission.
1547	Resource *Resource `type:"structure"`
1548}
1549
1550// String returns the string representation
1551func (s BatchPermissionsRequestEntry) String() string {
1552	return awsutil.Prettify(s)
1553}
1554
1555// GoString returns the string representation
1556func (s BatchPermissionsRequestEntry) GoString() string {
1557	return s.String()
1558}
1559
1560// Validate inspects the fields of the type to determine if they are valid.
1561func (s *BatchPermissionsRequestEntry) Validate() error {
1562	invalidParams := request.ErrInvalidParams{Context: "BatchPermissionsRequestEntry"}
1563	if s.Id == nil {
1564		invalidParams.Add(request.NewErrParamRequired("Id"))
1565	}
1566	if s.Id != nil && len(*s.Id) < 1 {
1567		invalidParams.Add(request.NewErrParamMinLen("Id", 1))
1568	}
1569	if s.Principal != nil {
1570		if err := s.Principal.Validate(); err != nil {
1571			invalidParams.AddNested("Principal", err.(request.ErrInvalidParams))
1572		}
1573	}
1574	if s.Resource != nil {
1575		if err := s.Resource.Validate(); err != nil {
1576			invalidParams.AddNested("Resource", err.(request.ErrInvalidParams))
1577		}
1578	}
1579
1580	if invalidParams.Len() > 0 {
1581		return invalidParams
1582	}
1583	return nil
1584}
1585
1586// SetId sets the Id field's value.
1587func (s *BatchPermissionsRequestEntry) SetId(v string) *BatchPermissionsRequestEntry {
1588	s.Id = &v
1589	return s
1590}
1591
1592// SetPermissions sets the Permissions field's value.
1593func (s *BatchPermissionsRequestEntry) SetPermissions(v []*string) *BatchPermissionsRequestEntry {
1594	s.Permissions = v
1595	return s
1596}
1597
1598// SetPermissionsWithGrantOption sets the PermissionsWithGrantOption field's value.
1599func (s *BatchPermissionsRequestEntry) SetPermissionsWithGrantOption(v []*string) *BatchPermissionsRequestEntry {
1600	s.PermissionsWithGrantOption = v
1601	return s
1602}
1603
1604// SetPrincipal sets the Principal field's value.
1605func (s *BatchPermissionsRequestEntry) SetPrincipal(v *DataLakePrincipal) *BatchPermissionsRequestEntry {
1606	s.Principal = v
1607	return s
1608}
1609
1610// SetResource sets the Resource field's value.
1611func (s *BatchPermissionsRequestEntry) SetResource(v *Resource) *BatchPermissionsRequestEntry {
1612	s.Resource = v
1613	return s
1614}
1615
1616type BatchRevokePermissionsInput struct {
1617	_ struct{} `type:"structure"`
1618
1619	// The identifier for the Data Catalog. By default, the account ID. The Data
1620	// Catalog is the persistent metadata store. It contains database definitions,
1621	// table definitions, and other control information to manage your AWS Lake
1622	// Formation environment.
1623	CatalogId *string `min:"1" type:"string"`
1624
1625	// A list of up to 20 entries for resource permissions to be revoked by batch
1626	// operation to the principal.
1627	//
1628	// Entries is a required field
1629	Entries []*BatchPermissionsRequestEntry `type:"list" required:"true"`
1630}
1631
1632// String returns the string representation
1633func (s BatchRevokePermissionsInput) String() string {
1634	return awsutil.Prettify(s)
1635}
1636
1637// GoString returns the string representation
1638func (s BatchRevokePermissionsInput) GoString() string {
1639	return s.String()
1640}
1641
1642// Validate inspects the fields of the type to determine if they are valid.
1643func (s *BatchRevokePermissionsInput) Validate() error {
1644	invalidParams := request.ErrInvalidParams{Context: "BatchRevokePermissionsInput"}
1645	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
1646		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
1647	}
1648	if s.Entries == nil {
1649		invalidParams.Add(request.NewErrParamRequired("Entries"))
1650	}
1651	if s.Entries != nil {
1652		for i, v := range s.Entries {
1653			if v == nil {
1654				continue
1655			}
1656			if err := v.Validate(); err != nil {
1657				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entries", i), err.(request.ErrInvalidParams))
1658			}
1659		}
1660	}
1661
1662	if invalidParams.Len() > 0 {
1663		return invalidParams
1664	}
1665	return nil
1666}
1667
1668// SetCatalogId sets the CatalogId field's value.
1669func (s *BatchRevokePermissionsInput) SetCatalogId(v string) *BatchRevokePermissionsInput {
1670	s.CatalogId = &v
1671	return s
1672}
1673
1674// SetEntries sets the Entries field's value.
1675func (s *BatchRevokePermissionsInput) SetEntries(v []*BatchPermissionsRequestEntry) *BatchRevokePermissionsInput {
1676	s.Entries = v
1677	return s
1678}
1679
1680type BatchRevokePermissionsOutput struct {
1681	_ struct{} `type:"structure"`
1682
1683	// A list of failures to revoke permissions to the resources.
1684	Failures []*BatchPermissionsFailureEntry `type:"list"`
1685}
1686
1687// String returns the string representation
1688func (s BatchRevokePermissionsOutput) String() string {
1689	return awsutil.Prettify(s)
1690}
1691
1692// GoString returns the string representation
1693func (s BatchRevokePermissionsOutput) GoString() string {
1694	return s.String()
1695}
1696
1697// SetFailures sets the Failures field's value.
1698func (s *BatchRevokePermissionsOutput) SetFailures(v []*BatchPermissionsFailureEntry) *BatchRevokePermissionsOutput {
1699	s.Failures = v
1700	return s
1701}
1702
1703// A structure for the catalog object.
1704type CatalogResource struct {
1705	_ struct{} `type:"structure"`
1706}
1707
1708// String returns the string representation
1709func (s CatalogResource) String() string {
1710	return awsutil.Prettify(s)
1711}
1712
1713// GoString returns the string representation
1714func (s CatalogResource) GoString() string {
1715	return s.String()
1716}
1717
1718// A wildcard object, consisting of an optional list of excluded column names
1719// or indexes.
1720type ColumnWildcard struct {
1721	_ struct{} `type:"structure"`
1722
1723	// Excludes column names. Any column with this name will be excluded.
1724	ExcludedColumnNames []*string `type:"list"`
1725}
1726
1727// String returns the string representation
1728func (s ColumnWildcard) String() string {
1729	return awsutil.Prettify(s)
1730}
1731
1732// GoString returns the string representation
1733func (s ColumnWildcard) GoString() string {
1734	return s.String()
1735}
1736
1737// SetExcludedColumnNames sets the ExcludedColumnNames field's value.
1738func (s *ColumnWildcard) SetExcludedColumnNames(v []*string) *ColumnWildcard {
1739	s.ExcludedColumnNames = v
1740	return s
1741}
1742
1743// Two processes are trying to modify a resource simultaneously.
1744type ConcurrentModificationException struct {
1745	_            struct{}                  `type:"structure"`
1746	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1747
1748	// A message describing the problem.
1749	Message_ *string `locationName:"Message" type:"string"`
1750}
1751
1752// String returns the string representation
1753func (s ConcurrentModificationException) String() string {
1754	return awsutil.Prettify(s)
1755}
1756
1757// GoString returns the string representation
1758func (s ConcurrentModificationException) GoString() string {
1759	return s.String()
1760}
1761
1762func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error {
1763	return &ConcurrentModificationException{
1764		RespMetadata: v,
1765	}
1766}
1767
1768// Code returns the exception type name.
1769func (s *ConcurrentModificationException) Code() string {
1770	return "ConcurrentModificationException"
1771}
1772
1773// Message returns the exception's message.
1774func (s *ConcurrentModificationException) Message() string {
1775	if s.Message_ != nil {
1776		return *s.Message_
1777	}
1778	return ""
1779}
1780
1781// OrigErr always returns nil, satisfies awserr.Error interface.
1782func (s *ConcurrentModificationException) OrigErr() error {
1783	return nil
1784}
1785
1786func (s *ConcurrentModificationException) Error() string {
1787	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1788}
1789
1790// Status code returns the HTTP status code for the request's response error.
1791func (s *ConcurrentModificationException) StatusCode() int {
1792	return s.RespMetadata.StatusCode
1793}
1794
1795// RequestID returns the service's response RequestID for request.
1796func (s *ConcurrentModificationException) RequestID() string {
1797	return s.RespMetadata.RequestID
1798}
1799
1800// The AWS Lake Formation principal. Supported principals are IAM users or IAM
1801// roles.
1802type DataLakePrincipal struct {
1803	_ struct{} `type:"structure"`
1804
1805	// An identifier for the AWS Lake Formation principal.
1806	DataLakePrincipalIdentifier *string `min:"1" type:"string"`
1807}
1808
1809// String returns the string representation
1810func (s DataLakePrincipal) String() string {
1811	return awsutil.Prettify(s)
1812}
1813
1814// GoString returns the string representation
1815func (s DataLakePrincipal) GoString() string {
1816	return s.String()
1817}
1818
1819// Validate inspects the fields of the type to determine if they are valid.
1820func (s *DataLakePrincipal) Validate() error {
1821	invalidParams := request.ErrInvalidParams{Context: "DataLakePrincipal"}
1822	if s.DataLakePrincipalIdentifier != nil && len(*s.DataLakePrincipalIdentifier) < 1 {
1823		invalidParams.Add(request.NewErrParamMinLen("DataLakePrincipalIdentifier", 1))
1824	}
1825
1826	if invalidParams.Len() > 0 {
1827		return invalidParams
1828	}
1829	return nil
1830}
1831
1832// SetDataLakePrincipalIdentifier sets the DataLakePrincipalIdentifier field's value.
1833func (s *DataLakePrincipal) SetDataLakePrincipalIdentifier(v string) *DataLakePrincipal {
1834	s.DataLakePrincipalIdentifier = &v
1835	return s
1836}
1837
1838// A structure representing a list of AWS Lake Formation principals designated
1839// as data lake administrators and lists of principal permission entries for
1840// default create database and default create table permissions.
1841type DataLakeSettings struct {
1842	_ struct{} `type:"structure"`
1843
1844	// A structure representing a list of up to three principal permissions entries
1845	// for default create database permissions.
1846	CreateDatabaseDefaultPermissions []*PrincipalPermissions `type:"list"`
1847
1848	// A structure representing a list of up to three principal permissions entries
1849	// for default create table permissions.
1850	CreateTableDefaultPermissions []*PrincipalPermissions `type:"list"`
1851
1852	// A list of AWS Lake Formation principals. Supported principals are IAM users
1853	// or IAM roles.
1854	DataLakeAdmins []*DataLakePrincipal `type:"list"`
1855
1856	// A list of the resource-owning account IDs that the caller's account can use
1857	// to share their user access details (user ARNs). The user ARNs can be logged
1858	// in the resource owner's AWS CloudTrail log.
1859	//
1860	// You may want to specify this property when you are in a high-trust boundary,
1861	// such as the same team or company.
1862	TrustedResourceOwners []*string `type:"list"`
1863}
1864
1865// String returns the string representation
1866func (s DataLakeSettings) String() string {
1867	return awsutil.Prettify(s)
1868}
1869
1870// GoString returns the string representation
1871func (s DataLakeSettings) GoString() string {
1872	return s.String()
1873}
1874
1875// Validate inspects the fields of the type to determine if they are valid.
1876func (s *DataLakeSettings) Validate() error {
1877	invalidParams := request.ErrInvalidParams{Context: "DataLakeSettings"}
1878	if s.CreateDatabaseDefaultPermissions != nil {
1879		for i, v := range s.CreateDatabaseDefaultPermissions {
1880			if v == nil {
1881				continue
1882			}
1883			if err := v.Validate(); err != nil {
1884				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CreateDatabaseDefaultPermissions", i), err.(request.ErrInvalidParams))
1885			}
1886		}
1887	}
1888	if s.CreateTableDefaultPermissions != nil {
1889		for i, v := range s.CreateTableDefaultPermissions {
1890			if v == nil {
1891				continue
1892			}
1893			if err := v.Validate(); err != nil {
1894				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CreateTableDefaultPermissions", i), err.(request.ErrInvalidParams))
1895			}
1896		}
1897	}
1898	if s.DataLakeAdmins != nil {
1899		for i, v := range s.DataLakeAdmins {
1900			if v == nil {
1901				continue
1902			}
1903			if err := v.Validate(); err != nil {
1904				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DataLakeAdmins", i), err.(request.ErrInvalidParams))
1905			}
1906		}
1907	}
1908
1909	if invalidParams.Len() > 0 {
1910		return invalidParams
1911	}
1912	return nil
1913}
1914
1915// SetCreateDatabaseDefaultPermissions sets the CreateDatabaseDefaultPermissions field's value.
1916func (s *DataLakeSettings) SetCreateDatabaseDefaultPermissions(v []*PrincipalPermissions) *DataLakeSettings {
1917	s.CreateDatabaseDefaultPermissions = v
1918	return s
1919}
1920
1921// SetCreateTableDefaultPermissions sets the CreateTableDefaultPermissions field's value.
1922func (s *DataLakeSettings) SetCreateTableDefaultPermissions(v []*PrincipalPermissions) *DataLakeSettings {
1923	s.CreateTableDefaultPermissions = v
1924	return s
1925}
1926
1927// SetDataLakeAdmins sets the DataLakeAdmins field's value.
1928func (s *DataLakeSettings) SetDataLakeAdmins(v []*DataLakePrincipal) *DataLakeSettings {
1929	s.DataLakeAdmins = v
1930	return s
1931}
1932
1933// SetTrustedResourceOwners sets the TrustedResourceOwners field's value.
1934func (s *DataLakeSettings) SetTrustedResourceOwners(v []*string) *DataLakeSettings {
1935	s.TrustedResourceOwners = v
1936	return s
1937}
1938
1939// A structure for a data location object where permissions are granted or revoked.
1940type DataLocationResource struct {
1941	_ struct{} `type:"structure"`
1942
1943	// The identifier for the Data Catalog where the location is registered with
1944	// AWS Lake Formation. By default, it is the account ID of the caller.
1945	CatalogId *string `min:"1" type:"string"`
1946
1947	// The Amazon Resource Name (ARN) that uniquely identifies the data location
1948	// resource.
1949	//
1950	// ResourceArn is a required field
1951	ResourceArn *string `type:"string" required:"true"`
1952}
1953
1954// String returns the string representation
1955func (s DataLocationResource) String() string {
1956	return awsutil.Prettify(s)
1957}
1958
1959// GoString returns the string representation
1960func (s DataLocationResource) GoString() string {
1961	return s.String()
1962}
1963
1964// Validate inspects the fields of the type to determine if they are valid.
1965func (s *DataLocationResource) Validate() error {
1966	invalidParams := request.ErrInvalidParams{Context: "DataLocationResource"}
1967	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
1968		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
1969	}
1970	if s.ResourceArn == nil {
1971		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
1972	}
1973
1974	if invalidParams.Len() > 0 {
1975		return invalidParams
1976	}
1977	return nil
1978}
1979
1980// SetCatalogId sets the CatalogId field's value.
1981func (s *DataLocationResource) SetCatalogId(v string) *DataLocationResource {
1982	s.CatalogId = &v
1983	return s
1984}
1985
1986// SetResourceArn sets the ResourceArn field's value.
1987func (s *DataLocationResource) SetResourceArn(v string) *DataLocationResource {
1988	s.ResourceArn = &v
1989	return s
1990}
1991
1992// A structure for the database object.
1993type DatabaseResource struct {
1994	_ struct{} `type:"structure"`
1995
1996	// The identifier for the Data Catalog. By default, it is the account ID of
1997	// the caller.
1998	CatalogId *string `min:"1" type:"string"`
1999
2000	// The name of the database resource. Unique to the Data Catalog.
2001	//
2002	// Name is a required field
2003	Name *string `min:"1" type:"string" required:"true"`
2004}
2005
2006// String returns the string representation
2007func (s DatabaseResource) String() string {
2008	return awsutil.Prettify(s)
2009}
2010
2011// GoString returns the string representation
2012func (s DatabaseResource) GoString() string {
2013	return s.String()
2014}
2015
2016// Validate inspects the fields of the type to determine if they are valid.
2017func (s *DatabaseResource) Validate() error {
2018	invalidParams := request.ErrInvalidParams{Context: "DatabaseResource"}
2019	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
2020		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
2021	}
2022	if s.Name == nil {
2023		invalidParams.Add(request.NewErrParamRequired("Name"))
2024	}
2025	if s.Name != nil && len(*s.Name) < 1 {
2026		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
2027	}
2028
2029	if invalidParams.Len() > 0 {
2030		return invalidParams
2031	}
2032	return nil
2033}
2034
2035// SetCatalogId sets the CatalogId field's value.
2036func (s *DatabaseResource) SetCatalogId(v string) *DatabaseResource {
2037	s.CatalogId = &v
2038	return s
2039}
2040
2041// SetName sets the Name field's value.
2042func (s *DatabaseResource) SetName(v string) *DatabaseResource {
2043	s.Name = &v
2044	return s
2045}
2046
2047type DeregisterResourceInput struct {
2048	_ struct{} `type:"structure"`
2049
2050	// The Amazon Resource Name (ARN) of the resource that you want to deregister.
2051	//
2052	// ResourceArn is a required field
2053	ResourceArn *string `type:"string" required:"true"`
2054}
2055
2056// String returns the string representation
2057func (s DeregisterResourceInput) String() string {
2058	return awsutil.Prettify(s)
2059}
2060
2061// GoString returns the string representation
2062func (s DeregisterResourceInput) GoString() string {
2063	return s.String()
2064}
2065
2066// Validate inspects the fields of the type to determine if they are valid.
2067func (s *DeregisterResourceInput) Validate() error {
2068	invalidParams := request.ErrInvalidParams{Context: "DeregisterResourceInput"}
2069	if s.ResourceArn == nil {
2070		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
2071	}
2072
2073	if invalidParams.Len() > 0 {
2074		return invalidParams
2075	}
2076	return nil
2077}
2078
2079// SetResourceArn sets the ResourceArn field's value.
2080func (s *DeregisterResourceInput) SetResourceArn(v string) *DeregisterResourceInput {
2081	s.ResourceArn = &v
2082	return s
2083}
2084
2085type DeregisterResourceOutput struct {
2086	_ struct{} `type:"structure"`
2087}
2088
2089// String returns the string representation
2090func (s DeregisterResourceOutput) String() string {
2091	return awsutil.Prettify(s)
2092}
2093
2094// GoString returns the string representation
2095func (s DeregisterResourceOutput) GoString() string {
2096	return s.String()
2097}
2098
2099type DescribeResourceInput struct {
2100	_ struct{} `type:"structure"`
2101
2102	// The resource ARN.
2103	//
2104	// ResourceArn is a required field
2105	ResourceArn *string `type:"string" required:"true"`
2106}
2107
2108// String returns the string representation
2109func (s DescribeResourceInput) String() string {
2110	return awsutil.Prettify(s)
2111}
2112
2113// GoString returns the string representation
2114func (s DescribeResourceInput) GoString() string {
2115	return s.String()
2116}
2117
2118// Validate inspects the fields of the type to determine if they are valid.
2119func (s *DescribeResourceInput) Validate() error {
2120	invalidParams := request.ErrInvalidParams{Context: "DescribeResourceInput"}
2121	if s.ResourceArn == nil {
2122		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
2123	}
2124
2125	if invalidParams.Len() > 0 {
2126		return invalidParams
2127	}
2128	return nil
2129}
2130
2131// SetResourceArn sets the ResourceArn field's value.
2132func (s *DescribeResourceInput) SetResourceArn(v string) *DescribeResourceInput {
2133	s.ResourceArn = &v
2134	return s
2135}
2136
2137type DescribeResourceOutput struct {
2138	_ struct{} `type:"structure"`
2139
2140	// A structure containing information about an AWS Lake Formation resource.
2141	ResourceInfo *ResourceInfo `type:"structure"`
2142}
2143
2144// String returns the string representation
2145func (s DescribeResourceOutput) String() string {
2146	return awsutil.Prettify(s)
2147}
2148
2149// GoString returns the string representation
2150func (s DescribeResourceOutput) GoString() string {
2151	return s.String()
2152}
2153
2154// SetResourceInfo sets the ResourceInfo field's value.
2155func (s *DescribeResourceOutput) SetResourceInfo(v *ResourceInfo) *DescribeResourceOutput {
2156	s.ResourceInfo = v
2157	return s
2158}
2159
2160// A structure containing the additional details to be returned in the AdditionalDetails
2161// attribute of PrincipalResourcePermissions.
2162//
2163// If a catalog resource is shared through AWS Resource Access Manager (AWS
2164// RAM), then there will exist a corresponding RAM share resource ARN.
2165type DetailsMap struct {
2166	_ struct{} `type:"structure"`
2167
2168	// A share resource ARN for a catalog resource shared through AWS Resource Access
2169	// Manager (AWS RAM).
2170	ResourceShare []*string `type:"list"`
2171}
2172
2173// String returns the string representation
2174func (s DetailsMap) String() string {
2175	return awsutil.Prettify(s)
2176}
2177
2178// GoString returns the string representation
2179func (s DetailsMap) GoString() string {
2180	return s.String()
2181}
2182
2183// SetResourceShare sets the ResourceShare field's value.
2184func (s *DetailsMap) SetResourceShare(v []*string) *DetailsMap {
2185	s.ResourceShare = v
2186	return s
2187}
2188
2189// A specified entity does not exist
2190type EntityNotFoundException struct {
2191	_            struct{}                  `type:"structure"`
2192	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
2193
2194	// A message describing the problem.
2195	Message_ *string `locationName:"Message" type:"string"`
2196}
2197
2198// String returns the string representation
2199func (s EntityNotFoundException) String() string {
2200	return awsutil.Prettify(s)
2201}
2202
2203// GoString returns the string representation
2204func (s EntityNotFoundException) GoString() string {
2205	return s.String()
2206}
2207
2208func newErrorEntityNotFoundException(v protocol.ResponseMetadata) error {
2209	return &EntityNotFoundException{
2210		RespMetadata: v,
2211	}
2212}
2213
2214// Code returns the exception type name.
2215func (s *EntityNotFoundException) Code() string {
2216	return "EntityNotFoundException"
2217}
2218
2219// Message returns the exception's message.
2220func (s *EntityNotFoundException) Message() string {
2221	if s.Message_ != nil {
2222		return *s.Message_
2223	}
2224	return ""
2225}
2226
2227// OrigErr always returns nil, satisfies awserr.Error interface.
2228func (s *EntityNotFoundException) OrigErr() error {
2229	return nil
2230}
2231
2232func (s *EntityNotFoundException) Error() string {
2233	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
2234}
2235
2236// Status code returns the HTTP status code for the request's response error.
2237func (s *EntityNotFoundException) StatusCode() int {
2238	return s.RespMetadata.StatusCode
2239}
2240
2241// RequestID returns the service's response RequestID for request.
2242func (s *EntityNotFoundException) RequestID() string {
2243	return s.RespMetadata.RequestID
2244}
2245
2246// Contains details about an error.
2247type ErrorDetail struct {
2248	_ struct{} `type:"structure"`
2249
2250	// The code associated with this error.
2251	ErrorCode *string `min:"1" type:"string"`
2252
2253	// A message describing the error.
2254	ErrorMessage *string `type:"string"`
2255}
2256
2257// String returns the string representation
2258func (s ErrorDetail) String() string {
2259	return awsutil.Prettify(s)
2260}
2261
2262// GoString returns the string representation
2263func (s ErrorDetail) GoString() string {
2264	return s.String()
2265}
2266
2267// SetErrorCode sets the ErrorCode field's value.
2268func (s *ErrorDetail) SetErrorCode(v string) *ErrorDetail {
2269	s.ErrorCode = &v
2270	return s
2271}
2272
2273// SetErrorMessage sets the ErrorMessage field's value.
2274func (s *ErrorDetail) SetErrorMessage(v string) *ErrorDetail {
2275	s.ErrorMessage = &v
2276	return s
2277}
2278
2279// This structure describes the filtering of columns in a table based on a filter
2280// condition.
2281type FilterCondition struct {
2282	_ struct{} `type:"structure"`
2283
2284	// The comparison operator used in the filter condition.
2285	ComparisonOperator *string `type:"string" enum:"ComparisonOperator"`
2286
2287	// The field to filter in the filter condition.
2288	Field *string `type:"string" enum:"FieldNameString"`
2289
2290	// A string with values used in evaluating the filter condition.
2291	StringValueList []*string `type:"list"`
2292}
2293
2294// String returns the string representation
2295func (s FilterCondition) String() string {
2296	return awsutil.Prettify(s)
2297}
2298
2299// GoString returns the string representation
2300func (s FilterCondition) GoString() string {
2301	return s.String()
2302}
2303
2304// SetComparisonOperator sets the ComparisonOperator field's value.
2305func (s *FilterCondition) SetComparisonOperator(v string) *FilterCondition {
2306	s.ComparisonOperator = &v
2307	return s
2308}
2309
2310// SetField sets the Field field's value.
2311func (s *FilterCondition) SetField(v string) *FilterCondition {
2312	s.Field = &v
2313	return s
2314}
2315
2316// SetStringValueList sets the StringValueList field's value.
2317func (s *FilterCondition) SetStringValueList(v []*string) *FilterCondition {
2318	s.StringValueList = v
2319	return s
2320}
2321
2322type GetDataLakeSettingsInput struct {
2323	_ struct{} `type:"structure"`
2324
2325	// The identifier for the Data Catalog. By default, the account ID. The Data
2326	// Catalog is the persistent metadata store. It contains database definitions,
2327	// table definitions, and other control information to manage your AWS Lake
2328	// Formation environment.
2329	CatalogId *string `min:"1" type:"string"`
2330}
2331
2332// String returns the string representation
2333func (s GetDataLakeSettingsInput) String() string {
2334	return awsutil.Prettify(s)
2335}
2336
2337// GoString returns the string representation
2338func (s GetDataLakeSettingsInput) GoString() string {
2339	return s.String()
2340}
2341
2342// Validate inspects the fields of the type to determine if they are valid.
2343func (s *GetDataLakeSettingsInput) Validate() error {
2344	invalidParams := request.ErrInvalidParams{Context: "GetDataLakeSettingsInput"}
2345	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
2346		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
2347	}
2348
2349	if invalidParams.Len() > 0 {
2350		return invalidParams
2351	}
2352	return nil
2353}
2354
2355// SetCatalogId sets the CatalogId field's value.
2356func (s *GetDataLakeSettingsInput) SetCatalogId(v string) *GetDataLakeSettingsInput {
2357	s.CatalogId = &v
2358	return s
2359}
2360
2361type GetDataLakeSettingsOutput struct {
2362	_ struct{} `type:"structure"`
2363
2364	// A structure representing a list of AWS Lake Formation principals designated
2365	// as data lake administrators.
2366	DataLakeSettings *DataLakeSettings `type:"structure"`
2367}
2368
2369// String returns the string representation
2370func (s GetDataLakeSettingsOutput) String() string {
2371	return awsutil.Prettify(s)
2372}
2373
2374// GoString returns the string representation
2375func (s GetDataLakeSettingsOutput) GoString() string {
2376	return s.String()
2377}
2378
2379// SetDataLakeSettings sets the DataLakeSettings field's value.
2380func (s *GetDataLakeSettingsOutput) SetDataLakeSettings(v *DataLakeSettings) *GetDataLakeSettingsOutput {
2381	s.DataLakeSettings = v
2382	return s
2383}
2384
2385type GetEffectivePermissionsForPathInput struct {
2386	_ struct{} `type:"structure"`
2387
2388	// The identifier for the Data Catalog. By default, the account ID. The Data
2389	// Catalog is the persistent metadata store. It contains database definitions,
2390	// table definitions, and other control information to manage your AWS Lake
2391	// Formation environment.
2392	CatalogId *string `min:"1" type:"string"`
2393
2394	// The maximum number of results to return.
2395	MaxResults *int64 `min:"1" type:"integer"`
2396
2397	// A continuation token, if this is not the first call to retrieve this list.
2398	NextToken *string `type:"string"`
2399
2400	// The Amazon Resource Name (ARN) of the resource for which you want to get
2401	// permissions.
2402	//
2403	// ResourceArn is a required field
2404	ResourceArn *string `type:"string" required:"true"`
2405}
2406
2407// String returns the string representation
2408func (s GetEffectivePermissionsForPathInput) String() string {
2409	return awsutil.Prettify(s)
2410}
2411
2412// GoString returns the string representation
2413func (s GetEffectivePermissionsForPathInput) GoString() string {
2414	return s.String()
2415}
2416
2417// Validate inspects the fields of the type to determine if they are valid.
2418func (s *GetEffectivePermissionsForPathInput) Validate() error {
2419	invalidParams := request.ErrInvalidParams{Context: "GetEffectivePermissionsForPathInput"}
2420	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
2421		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
2422	}
2423	if s.MaxResults != nil && *s.MaxResults < 1 {
2424		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2425	}
2426	if s.ResourceArn == nil {
2427		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
2428	}
2429
2430	if invalidParams.Len() > 0 {
2431		return invalidParams
2432	}
2433	return nil
2434}
2435
2436// SetCatalogId sets the CatalogId field's value.
2437func (s *GetEffectivePermissionsForPathInput) SetCatalogId(v string) *GetEffectivePermissionsForPathInput {
2438	s.CatalogId = &v
2439	return s
2440}
2441
2442// SetMaxResults sets the MaxResults field's value.
2443func (s *GetEffectivePermissionsForPathInput) SetMaxResults(v int64) *GetEffectivePermissionsForPathInput {
2444	s.MaxResults = &v
2445	return s
2446}
2447
2448// SetNextToken sets the NextToken field's value.
2449func (s *GetEffectivePermissionsForPathInput) SetNextToken(v string) *GetEffectivePermissionsForPathInput {
2450	s.NextToken = &v
2451	return s
2452}
2453
2454// SetResourceArn sets the ResourceArn field's value.
2455func (s *GetEffectivePermissionsForPathInput) SetResourceArn(v string) *GetEffectivePermissionsForPathInput {
2456	s.ResourceArn = &v
2457	return s
2458}
2459
2460type GetEffectivePermissionsForPathOutput struct {
2461	_ struct{} `type:"structure"`
2462
2463	// A continuation token, if this is not the first call to retrieve this list.
2464	NextToken *string `type:"string"`
2465
2466	// A list of the permissions for the specified table or database resource located
2467	// at the path in Amazon S3.
2468	Permissions []*PrincipalResourcePermissions `type:"list"`
2469}
2470
2471// String returns the string representation
2472func (s GetEffectivePermissionsForPathOutput) String() string {
2473	return awsutil.Prettify(s)
2474}
2475
2476// GoString returns the string representation
2477func (s GetEffectivePermissionsForPathOutput) GoString() string {
2478	return s.String()
2479}
2480
2481// SetNextToken sets the NextToken field's value.
2482func (s *GetEffectivePermissionsForPathOutput) SetNextToken(v string) *GetEffectivePermissionsForPathOutput {
2483	s.NextToken = &v
2484	return s
2485}
2486
2487// SetPermissions sets the Permissions field's value.
2488func (s *GetEffectivePermissionsForPathOutput) SetPermissions(v []*PrincipalResourcePermissions) *GetEffectivePermissionsForPathOutput {
2489	s.Permissions = v
2490	return s
2491}
2492
2493type GrantPermissionsInput struct {
2494	_ struct{} `type:"structure"`
2495
2496	// The identifier for the Data Catalog. By default, the account ID. The Data
2497	// Catalog is the persistent metadata store. It contains database definitions,
2498	// table definitions, and other control information to manage your AWS Lake
2499	// Formation environment.
2500	CatalogId *string `min:"1" type:"string"`
2501
2502	// The permissions granted to the principal on the resource. AWS Lake Formation
2503	// defines privileges to grant and revoke access to metadata in the Data Catalog
2504	// and data organized in underlying data storage such as Amazon S3. AWS Lake
2505	// Formation requires that each principal be authorized to perform a specific
2506	// task on AWS Lake Formation resources.
2507	//
2508	// Permissions is a required field
2509	Permissions []*string `type:"list" required:"true"`
2510
2511	// Indicates a list of the granted permissions that the principal may pass to
2512	// other users. These permissions may only be a subset of the permissions granted
2513	// in the Privileges.
2514	PermissionsWithGrantOption []*string `type:"list"`
2515
2516	// The principal to be granted the permissions on the resource. Supported principals
2517	// are IAM users or IAM roles, and they are defined by their principal type
2518	// and their ARN.
2519	//
2520	// Note that if you define a resource with a particular ARN, then later delete,
2521	// and recreate a resource with that same ARN, the resource maintains the permissions
2522	// already granted.
2523	//
2524	// Principal is a required field
2525	Principal *DataLakePrincipal `type:"structure" required:"true"`
2526
2527	// The resource to which permissions are to be granted. Resources in AWS Lake
2528	// Formation are the Data Catalog, databases, and tables.
2529	//
2530	// Resource is a required field
2531	Resource *Resource `type:"structure" required:"true"`
2532}
2533
2534// String returns the string representation
2535func (s GrantPermissionsInput) String() string {
2536	return awsutil.Prettify(s)
2537}
2538
2539// GoString returns the string representation
2540func (s GrantPermissionsInput) GoString() string {
2541	return s.String()
2542}
2543
2544// Validate inspects the fields of the type to determine if they are valid.
2545func (s *GrantPermissionsInput) Validate() error {
2546	invalidParams := request.ErrInvalidParams{Context: "GrantPermissionsInput"}
2547	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
2548		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
2549	}
2550	if s.Permissions == nil {
2551		invalidParams.Add(request.NewErrParamRequired("Permissions"))
2552	}
2553	if s.Principal == nil {
2554		invalidParams.Add(request.NewErrParamRequired("Principal"))
2555	}
2556	if s.Resource == nil {
2557		invalidParams.Add(request.NewErrParamRequired("Resource"))
2558	}
2559	if s.Principal != nil {
2560		if err := s.Principal.Validate(); err != nil {
2561			invalidParams.AddNested("Principal", err.(request.ErrInvalidParams))
2562		}
2563	}
2564	if s.Resource != nil {
2565		if err := s.Resource.Validate(); err != nil {
2566			invalidParams.AddNested("Resource", err.(request.ErrInvalidParams))
2567		}
2568	}
2569
2570	if invalidParams.Len() > 0 {
2571		return invalidParams
2572	}
2573	return nil
2574}
2575
2576// SetCatalogId sets the CatalogId field's value.
2577func (s *GrantPermissionsInput) SetCatalogId(v string) *GrantPermissionsInput {
2578	s.CatalogId = &v
2579	return s
2580}
2581
2582// SetPermissions sets the Permissions field's value.
2583func (s *GrantPermissionsInput) SetPermissions(v []*string) *GrantPermissionsInput {
2584	s.Permissions = v
2585	return s
2586}
2587
2588// SetPermissionsWithGrantOption sets the PermissionsWithGrantOption field's value.
2589func (s *GrantPermissionsInput) SetPermissionsWithGrantOption(v []*string) *GrantPermissionsInput {
2590	s.PermissionsWithGrantOption = v
2591	return s
2592}
2593
2594// SetPrincipal sets the Principal field's value.
2595func (s *GrantPermissionsInput) SetPrincipal(v *DataLakePrincipal) *GrantPermissionsInput {
2596	s.Principal = v
2597	return s
2598}
2599
2600// SetResource sets the Resource field's value.
2601func (s *GrantPermissionsInput) SetResource(v *Resource) *GrantPermissionsInput {
2602	s.Resource = v
2603	return s
2604}
2605
2606type GrantPermissionsOutput struct {
2607	_ struct{} `type:"structure"`
2608}
2609
2610// String returns the string representation
2611func (s GrantPermissionsOutput) String() string {
2612	return awsutil.Prettify(s)
2613}
2614
2615// GoString returns the string representation
2616func (s GrantPermissionsOutput) GoString() string {
2617	return s.String()
2618}
2619
2620// An internal service error occurred.
2621type InternalServiceException struct {
2622	_            struct{}                  `type:"structure"`
2623	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
2624
2625	// A message describing the problem.
2626	Message_ *string `locationName:"Message" type:"string"`
2627}
2628
2629// String returns the string representation
2630func (s InternalServiceException) String() string {
2631	return awsutil.Prettify(s)
2632}
2633
2634// GoString returns the string representation
2635func (s InternalServiceException) GoString() string {
2636	return s.String()
2637}
2638
2639func newErrorInternalServiceException(v protocol.ResponseMetadata) error {
2640	return &InternalServiceException{
2641		RespMetadata: v,
2642	}
2643}
2644
2645// Code returns the exception type name.
2646func (s *InternalServiceException) Code() string {
2647	return "InternalServiceException"
2648}
2649
2650// Message returns the exception's message.
2651func (s *InternalServiceException) Message() string {
2652	if s.Message_ != nil {
2653		return *s.Message_
2654	}
2655	return ""
2656}
2657
2658// OrigErr always returns nil, satisfies awserr.Error interface.
2659func (s *InternalServiceException) OrigErr() error {
2660	return nil
2661}
2662
2663func (s *InternalServiceException) Error() string {
2664	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
2665}
2666
2667// Status code returns the HTTP status code for the request's response error.
2668func (s *InternalServiceException) StatusCode() int {
2669	return s.RespMetadata.StatusCode
2670}
2671
2672// RequestID returns the service's response RequestID for request.
2673func (s *InternalServiceException) RequestID() string {
2674	return s.RespMetadata.RequestID
2675}
2676
2677// The input provided was not valid.
2678type InvalidInputException struct {
2679	_            struct{}                  `type:"structure"`
2680	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
2681
2682	// A message describing the problem.
2683	Message_ *string `locationName:"Message" type:"string"`
2684}
2685
2686// String returns the string representation
2687func (s InvalidInputException) String() string {
2688	return awsutil.Prettify(s)
2689}
2690
2691// GoString returns the string representation
2692func (s InvalidInputException) GoString() string {
2693	return s.String()
2694}
2695
2696func newErrorInvalidInputException(v protocol.ResponseMetadata) error {
2697	return &InvalidInputException{
2698		RespMetadata: v,
2699	}
2700}
2701
2702// Code returns the exception type name.
2703func (s *InvalidInputException) Code() string {
2704	return "InvalidInputException"
2705}
2706
2707// Message returns the exception's message.
2708func (s *InvalidInputException) Message() string {
2709	if s.Message_ != nil {
2710		return *s.Message_
2711	}
2712	return ""
2713}
2714
2715// OrigErr always returns nil, satisfies awserr.Error interface.
2716func (s *InvalidInputException) OrigErr() error {
2717	return nil
2718}
2719
2720func (s *InvalidInputException) Error() string {
2721	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
2722}
2723
2724// Status code returns the HTTP status code for the request's response error.
2725func (s *InvalidInputException) StatusCode() int {
2726	return s.RespMetadata.StatusCode
2727}
2728
2729// RequestID returns the service's response RequestID for request.
2730func (s *InvalidInputException) RequestID() string {
2731	return s.RespMetadata.RequestID
2732}
2733
2734type ListPermissionsInput struct {
2735	_ struct{} `type:"structure"`
2736
2737	// The identifier for the Data Catalog. By default, the account ID. The Data
2738	// Catalog is the persistent metadata store. It contains database definitions,
2739	// table definitions, and other control information to manage your AWS Lake
2740	// Formation environment.
2741	CatalogId *string `min:"1" type:"string"`
2742
2743	// The maximum number of results to return.
2744	MaxResults *int64 `min:"1" type:"integer"`
2745
2746	// A continuation token, if this is not the first call to retrieve this list.
2747	NextToken *string `type:"string"`
2748
2749	// Specifies a principal to filter the permissions returned.
2750	Principal *DataLakePrincipal `type:"structure"`
2751
2752	// A resource where you will get a list of the principal permissions.
2753	//
2754	// This operation does not support getting privileges on a table with columns.
2755	// Instead, call this operation on the table, and the operation returns the
2756	// table and the table w columns.
2757	Resource *Resource `type:"structure"`
2758
2759	// Specifies a resource type to filter the permissions returned.
2760	ResourceType *string `type:"string" enum:"DataLakeResourceType"`
2761}
2762
2763// String returns the string representation
2764func (s ListPermissionsInput) String() string {
2765	return awsutil.Prettify(s)
2766}
2767
2768// GoString returns the string representation
2769func (s ListPermissionsInput) GoString() string {
2770	return s.String()
2771}
2772
2773// Validate inspects the fields of the type to determine if they are valid.
2774func (s *ListPermissionsInput) Validate() error {
2775	invalidParams := request.ErrInvalidParams{Context: "ListPermissionsInput"}
2776	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
2777		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
2778	}
2779	if s.MaxResults != nil && *s.MaxResults < 1 {
2780		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2781	}
2782	if s.Principal != nil {
2783		if err := s.Principal.Validate(); err != nil {
2784			invalidParams.AddNested("Principal", err.(request.ErrInvalidParams))
2785		}
2786	}
2787	if s.Resource != nil {
2788		if err := s.Resource.Validate(); err != nil {
2789			invalidParams.AddNested("Resource", err.(request.ErrInvalidParams))
2790		}
2791	}
2792
2793	if invalidParams.Len() > 0 {
2794		return invalidParams
2795	}
2796	return nil
2797}
2798
2799// SetCatalogId sets the CatalogId field's value.
2800func (s *ListPermissionsInput) SetCatalogId(v string) *ListPermissionsInput {
2801	s.CatalogId = &v
2802	return s
2803}
2804
2805// SetMaxResults sets the MaxResults field's value.
2806func (s *ListPermissionsInput) SetMaxResults(v int64) *ListPermissionsInput {
2807	s.MaxResults = &v
2808	return s
2809}
2810
2811// SetNextToken sets the NextToken field's value.
2812func (s *ListPermissionsInput) SetNextToken(v string) *ListPermissionsInput {
2813	s.NextToken = &v
2814	return s
2815}
2816
2817// SetPrincipal sets the Principal field's value.
2818func (s *ListPermissionsInput) SetPrincipal(v *DataLakePrincipal) *ListPermissionsInput {
2819	s.Principal = v
2820	return s
2821}
2822
2823// SetResource sets the Resource field's value.
2824func (s *ListPermissionsInput) SetResource(v *Resource) *ListPermissionsInput {
2825	s.Resource = v
2826	return s
2827}
2828
2829// SetResourceType sets the ResourceType field's value.
2830func (s *ListPermissionsInput) SetResourceType(v string) *ListPermissionsInput {
2831	s.ResourceType = &v
2832	return s
2833}
2834
2835type ListPermissionsOutput struct {
2836	_ struct{} `type:"structure"`
2837
2838	// A continuation token, if this is not the first call to retrieve this list.
2839	NextToken *string `type:"string"`
2840
2841	// A list of principals and their permissions on the resource for the specified
2842	// principal and resource types.
2843	PrincipalResourcePermissions []*PrincipalResourcePermissions `type:"list"`
2844}
2845
2846// String returns the string representation
2847func (s ListPermissionsOutput) String() string {
2848	return awsutil.Prettify(s)
2849}
2850
2851// GoString returns the string representation
2852func (s ListPermissionsOutput) GoString() string {
2853	return s.String()
2854}
2855
2856// SetNextToken sets the NextToken field's value.
2857func (s *ListPermissionsOutput) SetNextToken(v string) *ListPermissionsOutput {
2858	s.NextToken = &v
2859	return s
2860}
2861
2862// SetPrincipalResourcePermissions sets the PrincipalResourcePermissions field's value.
2863func (s *ListPermissionsOutput) SetPrincipalResourcePermissions(v []*PrincipalResourcePermissions) *ListPermissionsOutput {
2864	s.PrincipalResourcePermissions = v
2865	return s
2866}
2867
2868type ListResourcesInput struct {
2869	_ struct{} `type:"structure"`
2870
2871	// Any applicable row-level and/or column-level filtering conditions for the
2872	// resources.
2873	FilterConditionList []*FilterCondition `min:"1" type:"list"`
2874
2875	// The maximum number of resource results.
2876	MaxResults *int64 `min:"1" type:"integer"`
2877
2878	// A continuation token, if this is not the first call to retrieve these resources.
2879	NextToken *string `type:"string"`
2880}
2881
2882// String returns the string representation
2883func (s ListResourcesInput) String() string {
2884	return awsutil.Prettify(s)
2885}
2886
2887// GoString returns the string representation
2888func (s ListResourcesInput) GoString() string {
2889	return s.String()
2890}
2891
2892// Validate inspects the fields of the type to determine if they are valid.
2893func (s *ListResourcesInput) Validate() error {
2894	invalidParams := request.ErrInvalidParams{Context: "ListResourcesInput"}
2895	if s.FilterConditionList != nil && len(s.FilterConditionList) < 1 {
2896		invalidParams.Add(request.NewErrParamMinLen("FilterConditionList", 1))
2897	}
2898	if s.MaxResults != nil && *s.MaxResults < 1 {
2899		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2900	}
2901
2902	if invalidParams.Len() > 0 {
2903		return invalidParams
2904	}
2905	return nil
2906}
2907
2908// SetFilterConditionList sets the FilterConditionList field's value.
2909func (s *ListResourcesInput) SetFilterConditionList(v []*FilterCondition) *ListResourcesInput {
2910	s.FilterConditionList = v
2911	return s
2912}
2913
2914// SetMaxResults sets the MaxResults field's value.
2915func (s *ListResourcesInput) SetMaxResults(v int64) *ListResourcesInput {
2916	s.MaxResults = &v
2917	return s
2918}
2919
2920// SetNextToken sets the NextToken field's value.
2921func (s *ListResourcesInput) SetNextToken(v string) *ListResourcesInput {
2922	s.NextToken = &v
2923	return s
2924}
2925
2926type ListResourcesOutput struct {
2927	_ struct{} `type:"structure"`
2928
2929	// A continuation token, if this is not the first call to retrieve these resources.
2930	NextToken *string `type:"string"`
2931
2932	// A summary of the data lake resources.
2933	ResourceInfoList []*ResourceInfo `type:"list"`
2934}
2935
2936// String returns the string representation
2937func (s ListResourcesOutput) String() string {
2938	return awsutil.Prettify(s)
2939}
2940
2941// GoString returns the string representation
2942func (s ListResourcesOutput) GoString() string {
2943	return s.String()
2944}
2945
2946// SetNextToken sets the NextToken field's value.
2947func (s *ListResourcesOutput) SetNextToken(v string) *ListResourcesOutput {
2948	s.NextToken = &v
2949	return s
2950}
2951
2952// SetResourceInfoList sets the ResourceInfoList field's value.
2953func (s *ListResourcesOutput) SetResourceInfoList(v []*ResourceInfo) *ListResourcesOutput {
2954	s.ResourceInfoList = v
2955	return s
2956}
2957
2958// The operation timed out.
2959type OperationTimeoutException struct {
2960	_            struct{}                  `type:"structure"`
2961	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
2962
2963	// A message describing the problem.
2964	Message_ *string `locationName:"Message" type:"string"`
2965}
2966
2967// String returns the string representation
2968func (s OperationTimeoutException) String() string {
2969	return awsutil.Prettify(s)
2970}
2971
2972// GoString returns the string representation
2973func (s OperationTimeoutException) GoString() string {
2974	return s.String()
2975}
2976
2977func newErrorOperationTimeoutException(v protocol.ResponseMetadata) error {
2978	return &OperationTimeoutException{
2979		RespMetadata: v,
2980	}
2981}
2982
2983// Code returns the exception type name.
2984func (s *OperationTimeoutException) Code() string {
2985	return "OperationTimeoutException"
2986}
2987
2988// Message returns the exception's message.
2989func (s *OperationTimeoutException) Message() string {
2990	if s.Message_ != nil {
2991		return *s.Message_
2992	}
2993	return ""
2994}
2995
2996// OrigErr always returns nil, satisfies awserr.Error interface.
2997func (s *OperationTimeoutException) OrigErr() error {
2998	return nil
2999}
3000
3001func (s *OperationTimeoutException) Error() string {
3002	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
3003}
3004
3005// Status code returns the HTTP status code for the request's response error.
3006func (s *OperationTimeoutException) StatusCode() int {
3007	return s.RespMetadata.StatusCode
3008}
3009
3010// RequestID returns the service's response RequestID for request.
3011func (s *OperationTimeoutException) RequestID() string {
3012	return s.RespMetadata.RequestID
3013}
3014
3015// Permissions granted to a principal.
3016type PrincipalPermissions struct {
3017	_ struct{} `type:"structure"`
3018
3019	// The permissions that are granted to the principal.
3020	Permissions []*string `type:"list"`
3021
3022	// The principal who is granted permissions.
3023	Principal *DataLakePrincipal `type:"structure"`
3024}
3025
3026// String returns the string representation
3027func (s PrincipalPermissions) String() string {
3028	return awsutil.Prettify(s)
3029}
3030
3031// GoString returns the string representation
3032func (s PrincipalPermissions) GoString() string {
3033	return s.String()
3034}
3035
3036// Validate inspects the fields of the type to determine if they are valid.
3037func (s *PrincipalPermissions) Validate() error {
3038	invalidParams := request.ErrInvalidParams{Context: "PrincipalPermissions"}
3039	if s.Principal != nil {
3040		if err := s.Principal.Validate(); err != nil {
3041			invalidParams.AddNested("Principal", err.(request.ErrInvalidParams))
3042		}
3043	}
3044
3045	if invalidParams.Len() > 0 {
3046		return invalidParams
3047	}
3048	return nil
3049}
3050
3051// SetPermissions sets the Permissions field's value.
3052func (s *PrincipalPermissions) SetPermissions(v []*string) *PrincipalPermissions {
3053	s.Permissions = v
3054	return s
3055}
3056
3057// SetPrincipal sets the Principal field's value.
3058func (s *PrincipalPermissions) SetPrincipal(v *DataLakePrincipal) *PrincipalPermissions {
3059	s.Principal = v
3060	return s
3061}
3062
3063// The permissions granted or revoked on a resource.
3064type PrincipalResourcePermissions struct {
3065	_ struct{} `type:"structure"`
3066
3067	// This attribute can be used to return any additional details of PrincipalResourcePermissions.
3068	// Currently returns only as a RAM share resource ARN.
3069	AdditionalDetails *DetailsMap `type:"structure"`
3070
3071	// The permissions to be granted or revoked on the resource.
3072	Permissions []*string `type:"list"`
3073
3074	// Indicates whether to grant the ability to grant permissions (as a subset
3075	// of permissions granted).
3076	PermissionsWithGrantOption []*string `type:"list"`
3077
3078	// The Data Lake principal to be granted or revoked permissions.
3079	Principal *DataLakePrincipal `type:"structure"`
3080
3081	// The resource where permissions are to be granted or revoked.
3082	Resource *Resource `type:"structure"`
3083}
3084
3085// String returns the string representation
3086func (s PrincipalResourcePermissions) String() string {
3087	return awsutil.Prettify(s)
3088}
3089
3090// GoString returns the string representation
3091func (s PrincipalResourcePermissions) GoString() string {
3092	return s.String()
3093}
3094
3095// SetAdditionalDetails sets the AdditionalDetails field's value.
3096func (s *PrincipalResourcePermissions) SetAdditionalDetails(v *DetailsMap) *PrincipalResourcePermissions {
3097	s.AdditionalDetails = v
3098	return s
3099}
3100
3101// SetPermissions sets the Permissions field's value.
3102func (s *PrincipalResourcePermissions) SetPermissions(v []*string) *PrincipalResourcePermissions {
3103	s.Permissions = v
3104	return s
3105}
3106
3107// SetPermissionsWithGrantOption sets the PermissionsWithGrantOption field's value.
3108func (s *PrincipalResourcePermissions) SetPermissionsWithGrantOption(v []*string) *PrincipalResourcePermissions {
3109	s.PermissionsWithGrantOption = v
3110	return s
3111}
3112
3113// SetPrincipal sets the Principal field's value.
3114func (s *PrincipalResourcePermissions) SetPrincipal(v *DataLakePrincipal) *PrincipalResourcePermissions {
3115	s.Principal = v
3116	return s
3117}
3118
3119// SetResource sets the Resource field's value.
3120func (s *PrincipalResourcePermissions) SetResource(v *Resource) *PrincipalResourcePermissions {
3121	s.Resource = v
3122	return s
3123}
3124
3125type PutDataLakeSettingsInput struct {
3126	_ struct{} `type:"structure"`
3127
3128	// The identifier for the Data Catalog. By default, the account ID. The Data
3129	// Catalog is the persistent metadata store. It contains database definitions,
3130	// table definitions, and other control information to manage your AWS Lake
3131	// Formation environment.
3132	CatalogId *string `min:"1" type:"string"`
3133
3134	// A structure representing a list of AWS Lake Formation principals designated
3135	// as data lake administrators.
3136	//
3137	// DataLakeSettings is a required field
3138	DataLakeSettings *DataLakeSettings `type:"structure" required:"true"`
3139}
3140
3141// String returns the string representation
3142func (s PutDataLakeSettingsInput) String() string {
3143	return awsutil.Prettify(s)
3144}
3145
3146// GoString returns the string representation
3147func (s PutDataLakeSettingsInput) GoString() string {
3148	return s.String()
3149}
3150
3151// Validate inspects the fields of the type to determine if they are valid.
3152func (s *PutDataLakeSettingsInput) Validate() error {
3153	invalidParams := request.ErrInvalidParams{Context: "PutDataLakeSettingsInput"}
3154	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
3155		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
3156	}
3157	if s.DataLakeSettings == nil {
3158		invalidParams.Add(request.NewErrParamRequired("DataLakeSettings"))
3159	}
3160	if s.DataLakeSettings != nil {
3161		if err := s.DataLakeSettings.Validate(); err != nil {
3162			invalidParams.AddNested("DataLakeSettings", err.(request.ErrInvalidParams))
3163		}
3164	}
3165
3166	if invalidParams.Len() > 0 {
3167		return invalidParams
3168	}
3169	return nil
3170}
3171
3172// SetCatalogId sets the CatalogId field's value.
3173func (s *PutDataLakeSettingsInput) SetCatalogId(v string) *PutDataLakeSettingsInput {
3174	s.CatalogId = &v
3175	return s
3176}
3177
3178// SetDataLakeSettings sets the DataLakeSettings field's value.
3179func (s *PutDataLakeSettingsInput) SetDataLakeSettings(v *DataLakeSettings) *PutDataLakeSettingsInput {
3180	s.DataLakeSettings = v
3181	return s
3182}
3183
3184type PutDataLakeSettingsOutput struct {
3185	_ struct{} `type:"structure"`
3186}
3187
3188// String returns the string representation
3189func (s PutDataLakeSettingsOutput) String() string {
3190	return awsutil.Prettify(s)
3191}
3192
3193// GoString returns the string representation
3194func (s PutDataLakeSettingsOutput) GoString() string {
3195	return s.String()
3196}
3197
3198type RegisterResourceInput struct {
3199	_ struct{} `type:"structure"`
3200
3201	// The Amazon Resource Name (ARN) of the resource that you want to register.
3202	//
3203	// ResourceArn is a required field
3204	ResourceArn *string `type:"string" required:"true"`
3205
3206	// The identifier for the role that registers the resource.
3207	RoleArn *string `type:"string"`
3208
3209	// Designates an AWS Identity and Access Management (IAM) service-linked role
3210	// by registering this role with the Data Catalog. A service-linked role is
3211	// a unique type of IAM role that is linked directly to Lake Formation.
3212	//
3213	// For more information, see Using Service-Linked Roles for Lake Formation (https://docs-aws.amazon.com/lake-formation/latest/dg/service-linked-roles.html).
3214	UseServiceLinkedRole *bool `type:"boolean"`
3215}
3216
3217// String returns the string representation
3218func (s RegisterResourceInput) String() string {
3219	return awsutil.Prettify(s)
3220}
3221
3222// GoString returns the string representation
3223func (s RegisterResourceInput) GoString() string {
3224	return s.String()
3225}
3226
3227// Validate inspects the fields of the type to determine if they are valid.
3228func (s *RegisterResourceInput) Validate() error {
3229	invalidParams := request.ErrInvalidParams{Context: "RegisterResourceInput"}
3230	if s.ResourceArn == nil {
3231		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
3232	}
3233
3234	if invalidParams.Len() > 0 {
3235		return invalidParams
3236	}
3237	return nil
3238}
3239
3240// SetResourceArn sets the ResourceArn field's value.
3241func (s *RegisterResourceInput) SetResourceArn(v string) *RegisterResourceInput {
3242	s.ResourceArn = &v
3243	return s
3244}
3245
3246// SetRoleArn sets the RoleArn field's value.
3247func (s *RegisterResourceInput) SetRoleArn(v string) *RegisterResourceInput {
3248	s.RoleArn = &v
3249	return s
3250}
3251
3252// SetUseServiceLinkedRole sets the UseServiceLinkedRole field's value.
3253func (s *RegisterResourceInput) SetUseServiceLinkedRole(v bool) *RegisterResourceInput {
3254	s.UseServiceLinkedRole = &v
3255	return s
3256}
3257
3258type RegisterResourceOutput struct {
3259	_ struct{} `type:"structure"`
3260}
3261
3262// String returns the string representation
3263func (s RegisterResourceOutput) String() string {
3264	return awsutil.Prettify(s)
3265}
3266
3267// GoString returns the string representation
3268func (s RegisterResourceOutput) GoString() string {
3269	return s.String()
3270}
3271
3272// A structure for the resource.
3273type Resource struct {
3274	_ struct{} `type:"structure"`
3275
3276	// The identifier for the Data Catalog. By default, the account ID. The Data
3277	// Catalog is the persistent metadata store. It contains database definitions,
3278	// table definitions, and other control information to manage your AWS Lake
3279	// Formation environment.
3280	Catalog *CatalogResource `type:"structure"`
3281
3282	// The location of an Amazon S3 path where permissions are granted or revoked.
3283	DataLocation *DataLocationResource `type:"structure"`
3284
3285	// The database for the resource. Unique to the Data Catalog. A database is
3286	// a set of associated table definitions organized into a logical group. You
3287	// can Grant and Revoke database permissions to a principal.
3288	Database *DatabaseResource `type:"structure"`
3289
3290	// The table for the resource. A table is a metadata definition that represents
3291	// your data. You can Grant and Revoke table privileges to a principal.
3292	Table *TableResource `type:"structure"`
3293
3294	// The table with columns for the resource. A principal with permissions to
3295	// this resource can select metadata from the columns of a table in the Data
3296	// Catalog and the underlying data in Amazon S3.
3297	TableWithColumns *TableWithColumnsResource `type:"structure"`
3298}
3299
3300// String returns the string representation
3301func (s Resource) String() string {
3302	return awsutil.Prettify(s)
3303}
3304
3305// GoString returns the string representation
3306func (s Resource) GoString() string {
3307	return s.String()
3308}
3309
3310// Validate inspects the fields of the type to determine if they are valid.
3311func (s *Resource) Validate() error {
3312	invalidParams := request.ErrInvalidParams{Context: "Resource"}
3313	if s.DataLocation != nil {
3314		if err := s.DataLocation.Validate(); err != nil {
3315			invalidParams.AddNested("DataLocation", err.(request.ErrInvalidParams))
3316		}
3317	}
3318	if s.Database != nil {
3319		if err := s.Database.Validate(); err != nil {
3320			invalidParams.AddNested("Database", err.(request.ErrInvalidParams))
3321		}
3322	}
3323	if s.Table != nil {
3324		if err := s.Table.Validate(); err != nil {
3325			invalidParams.AddNested("Table", err.(request.ErrInvalidParams))
3326		}
3327	}
3328	if s.TableWithColumns != nil {
3329		if err := s.TableWithColumns.Validate(); err != nil {
3330			invalidParams.AddNested("TableWithColumns", err.(request.ErrInvalidParams))
3331		}
3332	}
3333
3334	if invalidParams.Len() > 0 {
3335		return invalidParams
3336	}
3337	return nil
3338}
3339
3340// SetCatalog sets the Catalog field's value.
3341func (s *Resource) SetCatalog(v *CatalogResource) *Resource {
3342	s.Catalog = v
3343	return s
3344}
3345
3346// SetDataLocation sets the DataLocation field's value.
3347func (s *Resource) SetDataLocation(v *DataLocationResource) *Resource {
3348	s.DataLocation = v
3349	return s
3350}
3351
3352// SetDatabase sets the Database field's value.
3353func (s *Resource) SetDatabase(v *DatabaseResource) *Resource {
3354	s.Database = v
3355	return s
3356}
3357
3358// SetTable sets the Table field's value.
3359func (s *Resource) SetTable(v *TableResource) *Resource {
3360	s.Table = v
3361	return s
3362}
3363
3364// SetTableWithColumns sets the TableWithColumns field's value.
3365func (s *Resource) SetTableWithColumns(v *TableWithColumnsResource) *Resource {
3366	s.TableWithColumns = v
3367	return s
3368}
3369
3370// A structure containing information about an AWS Lake Formation resource.
3371type ResourceInfo struct {
3372	_ struct{} `type:"structure"`
3373
3374	// The date and time the resource was last modified.
3375	LastModified *time.Time `type:"timestamp"`
3376
3377	// The Amazon Resource Name (ARN) of the resource.
3378	ResourceArn *string `type:"string"`
3379
3380	// The IAM role that registered a resource.
3381	RoleArn *string `type:"string"`
3382}
3383
3384// String returns the string representation
3385func (s ResourceInfo) String() string {
3386	return awsutil.Prettify(s)
3387}
3388
3389// GoString returns the string representation
3390func (s ResourceInfo) GoString() string {
3391	return s.String()
3392}
3393
3394// SetLastModified sets the LastModified field's value.
3395func (s *ResourceInfo) SetLastModified(v time.Time) *ResourceInfo {
3396	s.LastModified = &v
3397	return s
3398}
3399
3400// SetResourceArn sets the ResourceArn field's value.
3401func (s *ResourceInfo) SetResourceArn(v string) *ResourceInfo {
3402	s.ResourceArn = &v
3403	return s
3404}
3405
3406// SetRoleArn sets the RoleArn field's value.
3407func (s *ResourceInfo) SetRoleArn(v string) *ResourceInfo {
3408	s.RoleArn = &v
3409	return s
3410}
3411
3412type RevokePermissionsInput struct {
3413	_ struct{} `type:"structure"`
3414
3415	// The identifier for the Data Catalog. By default, the account ID. The Data
3416	// Catalog is the persistent metadata store. It contains database definitions,
3417	// table definitions, and other control information to manage your AWS Lake
3418	// Formation environment.
3419	CatalogId *string `min:"1" type:"string"`
3420
3421	// The permissions revoked to the principal on the resource. For information
3422	// about permissions, see Security and Access Control to Metadata and Data (https://docs-aws.amazon.com/lake-formation/latest/dg/security-data-access.html).
3423	//
3424	// Permissions is a required field
3425	Permissions []*string `type:"list" required:"true"`
3426
3427	// Indicates a list of permissions for which to revoke the grant option allowing
3428	// the principal to pass permissions to other principals.
3429	PermissionsWithGrantOption []*string `type:"list"`
3430
3431	// The principal to be revoked permissions on the resource.
3432	//
3433	// Principal is a required field
3434	Principal *DataLakePrincipal `type:"structure" required:"true"`
3435
3436	// The resource to which permissions are to be revoked.
3437	//
3438	// Resource is a required field
3439	Resource *Resource `type:"structure" required:"true"`
3440}
3441
3442// String returns the string representation
3443func (s RevokePermissionsInput) String() string {
3444	return awsutil.Prettify(s)
3445}
3446
3447// GoString returns the string representation
3448func (s RevokePermissionsInput) GoString() string {
3449	return s.String()
3450}
3451
3452// Validate inspects the fields of the type to determine if they are valid.
3453func (s *RevokePermissionsInput) Validate() error {
3454	invalidParams := request.ErrInvalidParams{Context: "RevokePermissionsInput"}
3455	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
3456		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
3457	}
3458	if s.Permissions == nil {
3459		invalidParams.Add(request.NewErrParamRequired("Permissions"))
3460	}
3461	if s.Principal == nil {
3462		invalidParams.Add(request.NewErrParamRequired("Principal"))
3463	}
3464	if s.Resource == nil {
3465		invalidParams.Add(request.NewErrParamRequired("Resource"))
3466	}
3467	if s.Principal != nil {
3468		if err := s.Principal.Validate(); err != nil {
3469			invalidParams.AddNested("Principal", err.(request.ErrInvalidParams))
3470		}
3471	}
3472	if s.Resource != nil {
3473		if err := s.Resource.Validate(); err != nil {
3474			invalidParams.AddNested("Resource", err.(request.ErrInvalidParams))
3475		}
3476	}
3477
3478	if invalidParams.Len() > 0 {
3479		return invalidParams
3480	}
3481	return nil
3482}
3483
3484// SetCatalogId sets the CatalogId field's value.
3485func (s *RevokePermissionsInput) SetCatalogId(v string) *RevokePermissionsInput {
3486	s.CatalogId = &v
3487	return s
3488}
3489
3490// SetPermissions sets the Permissions field's value.
3491func (s *RevokePermissionsInput) SetPermissions(v []*string) *RevokePermissionsInput {
3492	s.Permissions = v
3493	return s
3494}
3495
3496// SetPermissionsWithGrantOption sets the PermissionsWithGrantOption field's value.
3497func (s *RevokePermissionsInput) SetPermissionsWithGrantOption(v []*string) *RevokePermissionsInput {
3498	s.PermissionsWithGrantOption = v
3499	return s
3500}
3501
3502// SetPrincipal sets the Principal field's value.
3503func (s *RevokePermissionsInput) SetPrincipal(v *DataLakePrincipal) *RevokePermissionsInput {
3504	s.Principal = v
3505	return s
3506}
3507
3508// SetResource sets the Resource field's value.
3509func (s *RevokePermissionsInput) SetResource(v *Resource) *RevokePermissionsInput {
3510	s.Resource = v
3511	return s
3512}
3513
3514type RevokePermissionsOutput struct {
3515	_ struct{} `type:"structure"`
3516}
3517
3518// String returns the string representation
3519func (s RevokePermissionsOutput) String() string {
3520	return awsutil.Prettify(s)
3521}
3522
3523// GoString returns the string representation
3524func (s RevokePermissionsOutput) GoString() string {
3525	return s.String()
3526}
3527
3528// A structure for the table object. A table is a metadata definition that represents
3529// your data. You can Grant and Revoke table privileges to a principal.
3530type TableResource struct {
3531	_ struct{} `type:"structure"`
3532
3533	// The identifier for the Data Catalog. By default, it is the account ID of
3534	// the caller.
3535	CatalogId *string `min:"1" type:"string"`
3536
3537	// The name of the database for the table. Unique to a Data Catalog. A database
3538	// is a set of associated table definitions organized into a logical group.
3539	// You can Grant and Revoke database privileges to a principal.
3540	//
3541	// DatabaseName is a required field
3542	DatabaseName *string `min:"1" type:"string" required:"true"`
3543
3544	// The name of the table.
3545	Name *string `min:"1" type:"string"`
3546
3547	// A wildcard object representing every table under a database.
3548	//
3549	// At least one of TableResource$Name or TableResource$TableWildcard is required.
3550	TableWildcard *TableWildcard `type:"structure"`
3551}
3552
3553// String returns the string representation
3554func (s TableResource) String() string {
3555	return awsutil.Prettify(s)
3556}
3557
3558// GoString returns the string representation
3559func (s TableResource) GoString() string {
3560	return s.String()
3561}
3562
3563// Validate inspects the fields of the type to determine if they are valid.
3564func (s *TableResource) Validate() error {
3565	invalidParams := request.ErrInvalidParams{Context: "TableResource"}
3566	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
3567		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
3568	}
3569	if s.DatabaseName == nil {
3570		invalidParams.Add(request.NewErrParamRequired("DatabaseName"))
3571	}
3572	if s.DatabaseName != nil && len(*s.DatabaseName) < 1 {
3573		invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1))
3574	}
3575	if s.Name != nil && len(*s.Name) < 1 {
3576		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
3577	}
3578
3579	if invalidParams.Len() > 0 {
3580		return invalidParams
3581	}
3582	return nil
3583}
3584
3585// SetCatalogId sets the CatalogId field's value.
3586func (s *TableResource) SetCatalogId(v string) *TableResource {
3587	s.CatalogId = &v
3588	return s
3589}
3590
3591// SetDatabaseName sets the DatabaseName field's value.
3592func (s *TableResource) SetDatabaseName(v string) *TableResource {
3593	s.DatabaseName = &v
3594	return s
3595}
3596
3597// SetName sets the Name field's value.
3598func (s *TableResource) SetName(v string) *TableResource {
3599	s.Name = &v
3600	return s
3601}
3602
3603// SetTableWildcard sets the TableWildcard field's value.
3604func (s *TableResource) SetTableWildcard(v *TableWildcard) *TableResource {
3605	s.TableWildcard = v
3606	return s
3607}
3608
3609// A wildcard object representing every table under a database.
3610type TableWildcard struct {
3611	_ struct{} `type:"structure"`
3612}
3613
3614// String returns the string representation
3615func (s TableWildcard) String() string {
3616	return awsutil.Prettify(s)
3617}
3618
3619// GoString returns the string representation
3620func (s TableWildcard) GoString() string {
3621	return s.String()
3622}
3623
3624// A structure for a table with columns object. This object is only used when
3625// granting a SELECT permission.
3626//
3627// This object must take a value for at least one of ColumnsNames, ColumnsIndexes,
3628// or ColumnsWildcard.
3629type TableWithColumnsResource struct {
3630	_ struct{} `type:"structure"`
3631
3632	// The identifier for the Data Catalog. By default, it is the account ID of
3633	// the caller.
3634	CatalogId *string `min:"1" type:"string"`
3635
3636	// The list of column names for the table. At least one of ColumnNames or ColumnWildcard
3637	// is required.
3638	ColumnNames []*string `type:"list"`
3639
3640	// A wildcard specified by a ColumnWildcard object. At least one of ColumnNames
3641	// or ColumnWildcard is required.
3642	ColumnWildcard *ColumnWildcard `type:"structure"`
3643
3644	// The name of the database for the table with columns resource. Unique to the
3645	// Data Catalog. A database is a set of associated table definitions organized
3646	// into a logical group. You can Grant and Revoke database privileges to a principal.
3647	//
3648	// DatabaseName is a required field
3649	DatabaseName *string `min:"1" type:"string" required:"true"`
3650
3651	// The name of the table resource. A table is a metadata definition that represents
3652	// your data. You can Grant and Revoke table privileges to a principal.
3653	//
3654	// Name is a required field
3655	Name *string `min:"1" type:"string" required:"true"`
3656}
3657
3658// String returns the string representation
3659func (s TableWithColumnsResource) String() string {
3660	return awsutil.Prettify(s)
3661}
3662
3663// GoString returns the string representation
3664func (s TableWithColumnsResource) GoString() string {
3665	return s.String()
3666}
3667
3668// Validate inspects the fields of the type to determine if they are valid.
3669func (s *TableWithColumnsResource) Validate() error {
3670	invalidParams := request.ErrInvalidParams{Context: "TableWithColumnsResource"}
3671	if s.CatalogId != nil && len(*s.CatalogId) < 1 {
3672		invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1))
3673	}
3674	if s.DatabaseName == nil {
3675		invalidParams.Add(request.NewErrParamRequired("DatabaseName"))
3676	}
3677	if s.DatabaseName != nil && len(*s.DatabaseName) < 1 {
3678		invalidParams.Add(request.NewErrParamMinLen("DatabaseName", 1))
3679	}
3680	if s.Name == nil {
3681		invalidParams.Add(request.NewErrParamRequired("Name"))
3682	}
3683	if s.Name != nil && len(*s.Name) < 1 {
3684		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
3685	}
3686
3687	if invalidParams.Len() > 0 {
3688		return invalidParams
3689	}
3690	return nil
3691}
3692
3693// SetCatalogId sets the CatalogId field's value.
3694func (s *TableWithColumnsResource) SetCatalogId(v string) *TableWithColumnsResource {
3695	s.CatalogId = &v
3696	return s
3697}
3698
3699// SetColumnNames sets the ColumnNames field's value.
3700func (s *TableWithColumnsResource) SetColumnNames(v []*string) *TableWithColumnsResource {
3701	s.ColumnNames = v
3702	return s
3703}
3704
3705// SetColumnWildcard sets the ColumnWildcard field's value.
3706func (s *TableWithColumnsResource) SetColumnWildcard(v *ColumnWildcard) *TableWithColumnsResource {
3707	s.ColumnWildcard = v
3708	return s
3709}
3710
3711// SetDatabaseName sets the DatabaseName field's value.
3712func (s *TableWithColumnsResource) SetDatabaseName(v string) *TableWithColumnsResource {
3713	s.DatabaseName = &v
3714	return s
3715}
3716
3717// SetName sets the Name field's value.
3718func (s *TableWithColumnsResource) SetName(v string) *TableWithColumnsResource {
3719	s.Name = &v
3720	return s
3721}
3722
3723type UpdateResourceInput struct {
3724	_ struct{} `type:"structure"`
3725
3726	// The resource ARN.
3727	//
3728	// ResourceArn is a required field
3729	ResourceArn *string `type:"string" required:"true"`
3730
3731	// The new role to use for the given resource registered in AWS Lake Formation.
3732	//
3733	// RoleArn is a required field
3734	RoleArn *string `type:"string" required:"true"`
3735}
3736
3737// String returns the string representation
3738func (s UpdateResourceInput) String() string {
3739	return awsutil.Prettify(s)
3740}
3741
3742// GoString returns the string representation
3743func (s UpdateResourceInput) GoString() string {
3744	return s.String()
3745}
3746
3747// Validate inspects the fields of the type to determine if they are valid.
3748func (s *UpdateResourceInput) Validate() error {
3749	invalidParams := request.ErrInvalidParams{Context: "UpdateResourceInput"}
3750	if s.ResourceArn == nil {
3751		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
3752	}
3753	if s.RoleArn == nil {
3754		invalidParams.Add(request.NewErrParamRequired("RoleArn"))
3755	}
3756
3757	if invalidParams.Len() > 0 {
3758		return invalidParams
3759	}
3760	return nil
3761}
3762
3763// SetResourceArn sets the ResourceArn field's value.
3764func (s *UpdateResourceInput) SetResourceArn(v string) *UpdateResourceInput {
3765	s.ResourceArn = &v
3766	return s
3767}
3768
3769// SetRoleArn sets the RoleArn field's value.
3770func (s *UpdateResourceInput) SetRoleArn(v string) *UpdateResourceInput {
3771	s.RoleArn = &v
3772	return s
3773}
3774
3775type UpdateResourceOutput struct {
3776	_ struct{} `type:"structure"`
3777}
3778
3779// String returns the string representation
3780func (s UpdateResourceOutput) String() string {
3781	return awsutil.Prettify(s)
3782}
3783
3784// GoString returns the string representation
3785func (s UpdateResourceOutput) GoString() string {
3786	return s.String()
3787}
3788
3789const (
3790	// ComparisonOperatorEq is a ComparisonOperator enum value
3791	ComparisonOperatorEq = "EQ"
3792
3793	// ComparisonOperatorNe is a ComparisonOperator enum value
3794	ComparisonOperatorNe = "NE"
3795
3796	// ComparisonOperatorLe is a ComparisonOperator enum value
3797	ComparisonOperatorLe = "LE"
3798
3799	// ComparisonOperatorLt is a ComparisonOperator enum value
3800	ComparisonOperatorLt = "LT"
3801
3802	// ComparisonOperatorGe is a ComparisonOperator enum value
3803	ComparisonOperatorGe = "GE"
3804
3805	// ComparisonOperatorGt is a ComparisonOperator enum value
3806	ComparisonOperatorGt = "GT"
3807
3808	// ComparisonOperatorContains is a ComparisonOperator enum value
3809	ComparisonOperatorContains = "CONTAINS"
3810
3811	// ComparisonOperatorNotContains is a ComparisonOperator enum value
3812	ComparisonOperatorNotContains = "NOT_CONTAINS"
3813
3814	// ComparisonOperatorBeginsWith is a ComparisonOperator enum value
3815	ComparisonOperatorBeginsWith = "BEGINS_WITH"
3816
3817	// ComparisonOperatorIn is a ComparisonOperator enum value
3818	ComparisonOperatorIn = "IN"
3819
3820	// ComparisonOperatorBetween is a ComparisonOperator enum value
3821	ComparisonOperatorBetween = "BETWEEN"
3822)
3823
3824// ComparisonOperator_Values returns all elements of the ComparisonOperator enum
3825func ComparisonOperator_Values() []string {
3826	return []string{
3827		ComparisonOperatorEq,
3828		ComparisonOperatorNe,
3829		ComparisonOperatorLe,
3830		ComparisonOperatorLt,
3831		ComparisonOperatorGe,
3832		ComparisonOperatorGt,
3833		ComparisonOperatorContains,
3834		ComparisonOperatorNotContains,
3835		ComparisonOperatorBeginsWith,
3836		ComparisonOperatorIn,
3837		ComparisonOperatorBetween,
3838	}
3839}
3840
3841const (
3842	// DataLakeResourceTypeCatalog is a DataLakeResourceType enum value
3843	DataLakeResourceTypeCatalog = "CATALOG"
3844
3845	// DataLakeResourceTypeDatabase is a DataLakeResourceType enum value
3846	DataLakeResourceTypeDatabase = "DATABASE"
3847
3848	// DataLakeResourceTypeTable is a DataLakeResourceType enum value
3849	DataLakeResourceTypeTable = "TABLE"
3850
3851	// DataLakeResourceTypeDataLocation is a DataLakeResourceType enum value
3852	DataLakeResourceTypeDataLocation = "DATA_LOCATION"
3853)
3854
3855// DataLakeResourceType_Values returns all elements of the DataLakeResourceType enum
3856func DataLakeResourceType_Values() []string {
3857	return []string{
3858		DataLakeResourceTypeCatalog,
3859		DataLakeResourceTypeDatabase,
3860		DataLakeResourceTypeTable,
3861		DataLakeResourceTypeDataLocation,
3862	}
3863}
3864
3865const (
3866	// FieldNameStringResourceArn is a FieldNameString enum value
3867	FieldNameStringResourceArn = "RESOURCE_ARN"
3868
3869	// FieldNameStringRoleArn is a FieldNameString enum value
3870	FieldNameStringRoleArn = "ROLE_ARN"
3871
3872	// FieldNameStringLastModified is a FieldNameString enum value
3873	FieldNameStringLastModified = "LAST_MODIFIED"
3874)
3875
3876// FieldNameString_Values returns all elements of the FieldNameString enum
3877func FieldNameString_Values() []string {
3878	return []string{
3879		FieldNameStringResourceArn,
3880		FieldNameStringRoleArn,
3881		FieldNameStringLastModified,
3882	}
3883}
3884
3885const (
3886	// PermissionAll is a Permission enum value
3887	PermissionAll = "ALL"
3888
3889	// PermissionSelect is a Permission enum value
3890	PermissionSelect = "SELECT"
3891
3892	// PermissionAlter is a Permission enum value
3893	PermissionAlter = "ALTER"
3894
3895	// PermissionDrop is a Permission enum value
3896	PermissionDrop = "DROP"
3897
3898	// PermissionDelete is a Permission enum value
3899	PermissionDelete = "DELETE"
3900
3901	// PermissionInsert is a Permission enum value
3902	PermissionInsert = "INSERT"
3903
3904	// PermissionDescribe is a Permission enum value
3905	PermissionDescribe = "DESCRIBE"
3906
3907	// PermissionCreateDatabase is a Permission enum value
3908	PermissionCreateDatabase = "CREATE_DATABASE"
3909
3910	// PermissionCreateTable is a Permission enum value
3911	PermissionCreateTable = "CREATE_TABLE"
3912
3913	// PermissionDataLocationAccess is a Permission enum value
3914	PermissionDataLocationAccess = "DATA_LOCATION_ACCESS"
3915)
3916
3917// Permission_Values returns all elements of the Permission enum
3918func Permission_Values() []string {
3919	return []string{
3920		PermissionAll,
3921		PermissionSelect,
3922		PermissionAlter,
3923		PermissionDrop,
3924		PermissionDelete,
3925		PermissionInsert,
3926		PermissionDescribe,
3927		PermissionCreateDatabase,
3928		PermissionCreateTable,
3929		PermissionDataLocationAccess,
3930	}
3931}
3932