// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.

package cloudtrail

import (
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/aws/request"
	"github.com/aws/aws-sdk-go/private/protocol"
	"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)

const opAddTags = "AddTags"

// AddTagsRequest generates a "aws/request.Request" representing the
// client's request for the AddTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AddTags for more information on using the AddTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the AddTagsRequest method.
//	req, resp := client.AddTagsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
	op := &request.Operation{
		Name:       opAddTags,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &AddTagsInput{}
	}

	output = &AddTagsOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// AddTags API operation for AWS CloudTrail.
//
// Adds one or more tags to a trail, event data store, or channel, up to a limit
// of 50. Overwrites an existing tag's value when a new value is specified for
// an existing tag key. Tag key names must be unique; you cannot have two keys
// with the same name but different values. If you specify a key without a value,
// the tag will be created with the specified key and a value of null. You can
// tag a trail or event data store that applies to all Amazon Web Services Regions
// only from the Region in which the trail or event data store was created (also
// known as its home Region).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation AddTags for usage and error information.
//
// Returned Error Types:
//
//   - ResourceNotFoundException
//     This exception is thrown when the specified resource is not found.
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - ChannelARNInvalidException
//     This exception is thrown when the specified value of ChannelARN is not valid.
//
//   - ResourceTypeNotSupportedException
//     This exception is thrown when the specified resource type is not supported
//     by CloudTrail.
//
//   - TagsLimitExceededException
//     The number of tags per trail, event data store, or channel has exceeded the
//     permitted amount. Currently, the limit is 50.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - InvalidTagParameterException
//     This exception is thrown when the specified tag key or values are not valid.
//     It can also occur if there are duplicate tags or too many tags on the resource.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - ChannelNotFoundException
//     This exception is thrown when CloudTrail cannot find the specified channel.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
	req, out := c.AddTagsRequest(input)
	return out, req.Send()
}

// AddTagsWithContext is the same as AddTags with the addition of
// the ability to pass a context and additional request options.
//
// See AddTags for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
	req, out := c.AddTagsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opCancelQuery = "CancelQuery"

// CancelQueryRequest generates a "aws/request.Request" representing the
// client's request for the CancelQuery operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CancelQuery for more information on using the CancelQuery
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the CancelQueryRequest method.
//	req, resp := client.CancelQueryRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery
func (c *CloudTrail) CancelQueryRequest(input *CancelQueryInput) (req *request.Request, output *CancelQueryOutput) {
	op := &request.Operation{
		Name:       opCancelQuery,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &CancelQueryInput{}
	}

	output = &CancelQueryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CancelQuery API operation for AWS CloudTrail.
//
// Cancels a query if the query is not in a terminated state, such as CANCELLED,
// FAILED, TIMED_OUT, or FINISHED. You must specify an ARN value for EventDataStore.
// The ID of the query that you want to cancel is also required. When you run
// CancelQuery, the query status might show as CANCELLED even if the operation
// is not yet finished.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation CancelQuery for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InactiveQueryException
//     The specified query cannot be canceled because it is in the FINISHED, FAILED,
//     TIMED_OUT, or CANCELLED state.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - QueryIdNotFoundException
//     The query ID does not exist or does not map to a query.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CancelQuery
func (c *CloudTrail) CancelQuery(input *CancelQueryInput) (*CancelQueryOutput, error) {
	req, out := c.CancelQueryRequest(input)
	return out, req.Send()
}

// CancelQueryWithContext is the same as CancelQuery with the addition of
// the ability to pass a context and additional request options.
//
// See CancelQuery for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) CancelQueryWithContext(ctx aws.Context, input *CancelQueryInput, opts ...request.Option) (*CancelQueryOutput, error) {
	req, out := c.CancelQueryRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opCreateChannel = "CreateChannel"

// CreateChannelRequest generates a "aws/request.Request" representing the
// client's request for the CreateChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateChannel for more information on using the CreateChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the CreateChannelRequest method.
//	req, resp := client.CreateChannelRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel
func (c *CloudTrail) CreateChannelRequest(input *CreateChannelInput) (req *request.Request, output *CreateChannelOutput) {
	op := &request.Operation{
		Name:       opCreateChannel,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &CreateChannelInput{}
	}

	output = &CreateChannelOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateChannel API operation for AWS CloudTrail.
//
// Creates a channel for CloudTrail to ingest events from a partner or external
// source. After you create a channel, a CloudTrail Lake event data store can
// log events from the partner or source that you specify.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation CreateChannel for usage and error information.
//
// Returned Error Types:
//
//   - ChannelMaxLimitExceededException
//     This exception is thrown when the maximum number of channels limit is exceeded.
//
//   - InvalidSourceException
//     This exception is thrown when the specified value of Source is not valid.
//
//   - ChannelAlreadyExistsException
//     This exception is thrown when the provided channel already exists.
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InvalidEventDataStoreCategoryException
//     This exception is thrown when event categories of specified event data stores
//     are not valid.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - InvalidTagParameterException
//     This exception is thrown when the specified tag key or values are not valid.
//     It can also occur if there are duplicate tags or too many tags on the resource.
//
//   - TagsLimitExceededException
//     The number of tags per trail, event data store, or channel has exceeded the
//     permitted amount. Currently, the limit is 50.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel
func (c *CloudTrail) CreateChannel(input *CreateChannelInput) (*CreateChannelOutput, error) {
	req, out := c.CreateChannelRequest(input)
	return out, req.Send()
}

// CreateChannelWithContext is the same as CreateChannel with the addition of
// the ability to pass a context and additional request options.
//
// See CreateChannel for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) CreateChannelWithContext(ctx aws.Context, input *CreateChannelInput, opts ...request.Option) (*CreateChannelOutput, error) {
	req, out := c.CreateChannelRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opCreateEventDataStore = "CreateEventDataStore"

// CreateEventDataStoreRequest generates a "aws/request.Request" representing the
// client's request for the CreateEventDataStore operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateEventDataStore for more information on using the CreateEventDataStore
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the CreateEventDataStoreRequest method.
//	req, resp := client.CreateEventDataStoreRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore
func (c *CloudTrail) CreateEventDataStoreRequest(input *CreateEventDataStoreInput) (req *request.Request, output *CreateEventDataStoreOutput) {
	op := &request.Operation{
		Name:       opCreateEventDataStore,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &CreateEventDataStoreInput{}
	}

	output = &CreateEventDataStoreOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateEventDataStore API operation for AWS CloudTrail.
//
// Creates a new event data store.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation CreateEventDataStore for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreAlreadyExistsException
//     An event data store with that name already exists.
//
//   - EventDataStoreMaxLimitExceededException
//     Your account has used the maximum number of event data stores.
//
//   - InvalidEventSelectorsException
//     This exception is thrown when the PutEventSelectors operation is called with
//     a number of event selectors, advanced event selectors, or data resources
//     that is not valid. The combination of event selectors or advanced event selectors
//     and data resources is not valid. A trail can have up to 5 event selectors.
//     If a trail uses advanced event selectors, a maximum of 500 total values for
//     all conditions in all advanced event selectors is allowed. A trail is limited
//     to 250 data resources. These data resources can be distributed across event
//     selectors, but the overall total cannot exceed 250.
//
//     You can:
//
//   - Specify a valid number of event selectors (1 to 5) for a trail.
//
//   - Specify a valid number of data resources (1 to 250) for an event selector.
//     The limit of number of resources on an individual event selector is configurable
//     up to 250. However, this upper limit is allowed only if the total number
//     of data resources does not exceed 250 across all event selectors for a
//     trail.
//
//   - Specify up to 500 values for all conditions in all advanced event selectors
//     for a trail.
//
//   - Specify a valid value for a parameter. For example, specifying the ReadWriteType
//     parameter with a value of read-only is not valid.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - InvalidTagParameterException
//     This exception is thrown when the specified tag key or values are not valid.
//     It can also occur if there are duplicate tags or too many tags on the resource.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - InvalidKmsKeyIdException
//     This exception is thrown when the KMS key ARN is not valid.
//
//   - KmsKeyNotFoundException
//     This exception is thrown when the KMS key does not exist, when the S3 bucket
//     and the KMS key are not in the same Region, or when the KMS key associated
//     with the Amazon SNS topic either does not exist or is not in the same Region.
//
//   - KmsException
//     This exception is thrown when there is an issue with the specified KMS key
//     and the trail or event data store can't be updated.
//
//   - AccessNotEnabledException
//     This exception is thrown when trusted access has not been enabled between
//     CloudTrail and Organizations. For more information, see Enabling Trusted
//     Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
//     and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - OrganizationsNotInUseException
//     This exception is thrown when the request is made from an Amazon Web Services
//     account that is not a member of an organization. To make this request, sign
//     in using the credentials of an account that belongs to an organization.
//
//   - OrganizationNotInAllFeaturesModeException
//     This exception is thrown when Organizations is not configured to support
//     all features. All features must be enabled in Organizations to support creating
//     an organization trail or event data store.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateEventDataStore
func (c *CloudTrail) CreateEventDataStore(input *CreateEventDataStoreInput) (*CreateEventDataStoreOutput, error) {
	req, out := c.CreateEventDataStoreRequest(input)
	return out, req.Send()
}

// CreateEventDataStoreWithContext is the same as CreateEventDataStore with the addition of
// the ability to pass a context and additional request options.
//
// See CreateEventDataStore for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) CreateEventDataStoreWithContext(ctx aws.Context, input *CreateEventDataStoreInput, opts ...request.Option) (*CreateEventDataStoreOutput, error) {
	req, out := c.CreateEventDataStoreRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opCreateTrail = "CreateTrail"

// CreateTrailRequest generates a "aws/request.Request" representing the
// client's request for the CreateTrail operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateTrail for more information on using the CreateTrail
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the CreateTrailRequest method.
//	req, resp := client.CreateTrailRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput) {
	op := &request.Operation{
		Name:       opCreateTrail,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &CreateTrailInput{}
	}

	output = &CreateTrailOutput{}
	req = c.newRequest(op, input, output)
	return
}

// CreateTrail API operation for AWS CloudTrail.
//
// Creates a trail that specifies the settings for delivery of log data to an
// Amazon S3 bucket.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation CreateTrail for usage and error information.
//
// Returned Error Types:
//
//   - MaximumNumberOfTrailsExceededException
//     This exception is thrown when the maximum number of trails is reached.
//
//   - TrailAlreadyExistsException
//     This exception is thrown when the specified trail already exists.
//
//   - S3BucketDoesNotExistException
//     This exception is thrown when the specified S3 bucket does not exist.
//
//   - InsufficientS3BucketPolicyException
//     This exception is thrown when the policy on the S3 bucket is not sufficient.
//
//   - InsufficientSnsTopicPolicyException
//     This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - InvalidS3BucketNameException
//     This exception is thrown when the provided S3 bucket name is not valid.
//
//   - InvalidS3PrefixException
//     This exception is thrown when the provided S3 prefix is not valid.
//
//   - InvalidSnsTopicNameException
//     This exception is thrown when the provided SNS topic name is not valid.
//
//   - InvalidKmsKeyIdException
//     This exception is thrown when the KMS key ARN is not valid.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - TrailNotProvidedException
//     This exception is no longer in use.
//
//   - TagsLimitExceededException
//     The number of tags per trail, event data store, or channel has exceeded the
//     permitted amount. Currently, the limit is 50.
//
//   - InvalidParameterCombinationException
//     This exception is thrown when the combination of parameters provided is not
//     valid.
//
//   - KmsKeyNotFoundException
//     This exception is thrown when the KMS key does not exist, when the S3 bucket
//     and the KMS key are not in the same Region, or when the KMS key associated
//     with the Amazon SNS topic either does not exist or is not in the same Region.
//
//   - KmsKeyDisabledException
//     This exception is no longer in use.
//
//   - KmsException
//     This exception is thrown when there is an issue with the specified KMS key
//     and the trail or event data store can't be updated.
//
//   - InvalidCloudWatchLogsLogGroupArnException
//     This exception is thrown when the provided CloudWatch Logs log group is not
//     valid.
//
//   - InvalidCloudWatchLogsRoleArnException
//     This exception is thrown when the provided role is not valid.
//
//   - CloudWatchLogsDeliveryUnavailableException
//     Cannot set a CloudWatch Logs delivery for this Region.
//
//   - InvalidTagParameterException
//     This exception is thrown when the specified tag key or values are not valid.
//     It can also occur if there are duplicate tags or too many tags on the resource.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - AccessNotEnabledException
//     This exception is thrown when trusted access has not been enabled between
//     CloudTrail and Organizations. For more information, see Enabling Trusted
//     Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
//     and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - OrganizationsNotInUseException
//     This exception is thrown when the request is made from an Amazon Web Services
//     account that is not a member of an organization. To make this request, sign
//     in using the credentials of an account that belongs to an organization.
//
//   - OrganizationNotInAllFeaturesModeException
//     This exception is thrown when Organizations is not configured to support
//     all features. All features must be enabled in Organizations to support creating
//     an organization trail or event data store.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - CloudTrailInvalidClientTokenIdException
//     This exception is thrown when a call results in the InvalidClientTokenId
//     error code. This can occur when you are creating or updating a trail to send
//     notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
//     account.
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) {
	req, out := c.CreateTrailRequest(input)
	return out, req.Send()
}

// CreateTrailWithContext is the same as CreateTrail with the addition of
// the ability to pass a context and additional request options.
//
// See CreateTrail for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error) {
	req, out := c.CreateTrailRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDeleteChannel = "DeleteChannel"

// DeleteChannelRequest generates a "aws/request.Request" representing the
// client's request for the DeleteChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteChannel for more information on using the DeleteChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DeleteChannelRequest method.
//	req, resp := client.DeleteChannelRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel
func (c *CloudTrail) DeleteChannelRequest(input *DeleteChannelInput) (req *request.Request, output *DeleteChannelOutput) {
	op := &request.Operation{
		Name:       opDeleteChannel,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &DeleteChannelInput{}
	}

	output = &DeleteChannelOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// DeleteChannel API operation for AWS CloudTrail.
//
// Deletes a channel.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation DeleteChannel for usage and error information.
//
// Returned Error Types:
//
//   - ChannelARNInvalidException
//     This exception is thrown when the specified value of ChannelARN is not valid.
//
//   - ChannelNotFoundException
//     This exception is thrown when CloudTrail cannot find the specified channel.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteChannel
func (c *CloudTrail) DeleteChannel(input *DeleteChannelInput) (*DeleteChannelOutput, error) {
	req, out := c.DeleteChannelRequest(input)
	return out, req.Send()
}

// DeleteChannelWithContext is the same as DeleteChannel with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteChannel for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) DeleteChannelWithContext(ctx aws.Context, input *DeleteChannelInput, opts ...request.Option) (*DeleteChannelOutput, error) {
	req, out := c.DeleteChannelRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDeleteEventDataStore = "DeleteEventDataStore"

// DeleteEventDataStoreRequest generates a "aws/request.Request" representing the
// client's request for the DeleteEventDataStore operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteEventDataStore for more information on using the DeleteEventDataStore
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DeleteEventDataStoreRequest method.
//	req, resp := client.DeleteEventDataStoreRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore
func (c *CloudTrail) DeleteEventDataStoreRequest(input *DeleteEventDataStoreInput) (req *request.Request, output *DeleteEventDataStoreOutput) {
	op := &request.Operation{
		Name:       opDeleteEventDataStore,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &DeleteEventDataStoreInput{}
	}

	output = &DeleteEventDataStoreOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// DeleteEventDataStore API operation for AWS CloudTrail.
//
// Disables the event data store specified by EventDataStore, which accepts
// an event data store ARN. After you run DeleteEventDataStore, the event data
// store enters a PENDING_DELETION state, and is automatically deleted after
// a wait period of seven days. TerminationProtectionEnabled must be set to
// False on the event data store; this operation cannot work if TerminationProtectionEnabled
// is True.
//
// After you run DeleteEventDataStore on an event data store, you cannot run
// ListQueries, DescribeQuery, or GetQueryResults on queries that are using
// an event data store in a PENDING_DELETION state. An event data store in the
// PENDING_DELETION state does not incur costs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation DeleteEventDataStore for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - EventDataStoreTerminationProtectedException
//     The event data store cannot be deleted because termination protection is
//     enabled for it.
//
//   - EventDataStoreHasOngoingImportException
//     This exception is thrown when you try to update or delete an event data store
//     that currently has an import in progress.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - ChannelExistsForEDSException
//     This exception is thrown when the specified event data store cannot yet be
//     deleted because it is in use by a channel.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteEventDataStore
func (c *CloudTrail) DeleteEventDataStore(input *DeleteEventDataStoreInput) (*DeleteEventDataStoreOutput, error) {
	req, out := c.DeleteEventDataStoreRequest(input)
	return out, req.Send()
}

// DeleteEventDataStoreWithContext is the same as DeleteEventDataStore with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteEventDataStore for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) DeleteEventDataStoreWithContext(ctx aws.Context, input *DeleteEventDataStoreInput, opts ...request.Option) (*DeleteEventDataStoreOutput, error) {
	req, out := c.DeleteEventDataStoreRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDeleteResourcePolicy = "DeleteResourcePolicy"

// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteResourcePolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteResourcePolicy for more information on using the DeleteResourcePolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DeleteResourcePolicyRequest method.
//	req, resp := client.DeleteResourcePolicyRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy
func (c *CloudTrail) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) {
	op := &request.Operation{
		Name:       opDeleteResourcePolicy,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &DeleteResourcePolicyInput{}
	}

	output = &DeleteResourcePolicyOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// DeleteResourcePolicy API operation for AWS CloudTrail.
//
// Deletes the resource-based policy attached to the CloudTrail channel.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation DeleteResourcePolicy for usage and error information.
//
// Returned Error Types:
//
//   - ResourceARNNotValidException
//     This exception is thrown when the provided resource does not exist, or the
//     ARN format of the resource is not valid. The following is the valid format
//     for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
//
//   - ResourceNotFoundException
//     This exception is thrown when the specified resource is not found.
//
//   - ResourcePolicyNotFoundException
//     This exception is thrown when the specified resource policy is not found.
//
//   - ResourceTypeNotSupportedException
//     This exception is thrown when the specified resource type is not supported
//     by CloudTrail.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteResourcePolicy
func (c *CloudTrail) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) {
	req, out := c.DeleteResourcePolicyRequest(input)
	return out, req.Send()
}

// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteResourcePolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) {
	req, out := c.DeleteResourcePolicyRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDeleteTrail = "DeleteTrail"

// DeleteTrailRequest generates a "aws/request.Request" representing the
// client's request for the DeleteTrail operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteTrail for more information on using the DeleteTrail
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DeleteTrailRequest method.
//	req, resp := client.DeleteTrailRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput) {
	op := &request.Operation{
		Name:       opDeleteTrail,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &DeleteTrailInput{}
	}

	output = &DeleteTrailOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// DeleteTrail API operation for AWS CloudTrail.
//
// Deletes a trail. This operation must be called from the Region in which the
// trail was created. DeleteTrail cannot be called on the shadow trails (replicated
// trails in other Regions) of a trail that is enabled in all Regions.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation DeleteTrail for usage and error information.
//
// Returned Error Types:
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - InvalidHomeRegionException
//     This exception is thrown when an operation is called on a trail from a Region
//     other than the Region in which the trail was created.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) {
	req, out := c.DeleteTrailRequest(input)
	return out, req.Send()
}

// DeleteTrailWithContext is the same as DeleteTrail with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteTrail for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error) {
	req, out := c.DeleteTrailRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDeregisterOrganizationDelegatedAdmin = "DeregisterOrganizationDelegatedAdmin"

// DeregisterOrganizationDelegatedAdminRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterOrganizationDelegatedAdmin operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeregisterOrganizationDelegatedAdmin for more information on using the DeregisterOrganizationDelegatedAdmin
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DeregisterOrganizationDelegatedAdminRequest method.
//	req, resp := client.DeregisterOrganizationDelegatedAdminRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin
func (c *CloudTrail) DeregisterOrganizationDelegatedAdminRequest(input *DeregisterOrganizationDelegatedAdminInput) (req *request.Request, output *DeregisterOrganizationDelegatedAdminOutput) {
	op := &request.Operation{
		Name:       opDeregisterOrganizationDelegatedAdmin,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &DeregisterOrganizationDelegatedAdminInput{}
	}

	output = &DeregisterOrganizationDelegatedAdminOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// DeregisterOrganizationDelegatedAdmin API operation for AWS CloudTrail.
//
// Removes CloudTrail delegated administrator permissions from a member account
// in an organization.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation DeregisterOrganizationDelegatedAdmin for usage and error information.
//
// Returned Error Types:
//
//   - AccountNotFoundException
//     This exception is thrown when the specified account is not found or not part
//     of an organization.
//
//   - AccountNotRegisteredException
//     This exception is thrown when the specified account is not registered as
//     the CloudTrail delegated administrator.
//
//   - AccessNotEnabledException
//     This exception is thrown when trusted access has not been enabled between
//     CloudTrail and Organizations. For more information, see Enabling Trusted
//     Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
//     and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - NotOrganizationManagementAccountException
//     This exception is thrown when the account making the request is not the organization's
//     management account.
//
//   - OrganizationNotInAllFeaturesModeException
//     This exception is thrown when Organizations is not configured to support
//     all features. All features must be enabled in Organizations to support creating
//     an organization trail or event data store.
//
//   - OrganizationsNotInUseException
//     This exception is thrown when the request is made from an Amazon Web Services
//     account that is not a member of an organization. To make this request, sign
//     in using the credentials of an account that belongs to an organization.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeregisterOrganizationDelegatedAdmin
func (c *CloudTrail) DeregisterOrganizationDelegatedAdmin(input *DeregisterOrganizationDelegatedAdminInput) (*DeregisterOrganizationDelegatedAdminOutput, error) {
	req, out := c.DeregisterOrganizationDelegatedAdminRequest(input)
	return out, req.Send()
}

// DeregisterOrganizationDelegatedAdminWithContext is the same as DeregisterOrganizationDelegatedAdmin with the addition of
// the ability to pass a context and additional request options.
//
// See DeregisterOrganizationDelegatedAdmin for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) DeregisterOrganizationDelegatedAdminWithContext(ctx aws.Context, input *DeregisterOrganizationDelegatedAdminInput, opts ...request.Option) (*DeregisterOrganizationDelegatedAdminOutput, error) {
	req, out := c.DeregisterOrganizationDelegatedAdminRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDescribeQuery = "DescribeQuery"

// DescribeQueryRequest generates a "aws/request.Request" representing the
// client's request for the DescribeQuery operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeQuery for more information on using the DescribeQuery
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DescribeQueryRequest method.
//	req, resp := client.DescribeQueryRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery
func (c *CloudTrail) DescribeQueryRequest(input *DescribeQueryInput) (req *request.Request, output *DescribeQueryOutput) {
	op := &request.Operation{
		Name:       opDescribeQuery,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &DescribeQueryInput{}
	}

	output = &DescribeQueryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DescribeQuery API operation for AWS CloudTrail.
//
// Returns metadata about a query, including query run time in milliseconds,
// number of events scanned and matched, and query status. If the query results
// were delivered to an S3 bucket, the response also provides the S3 URI and
// the delivery status.
//
// You must specify either a QueryID or a QueryAlias. Specifying the QueryAlias
// parameter returns information about the last query run for the alias.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation DescribeQuery for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - QueryIdNotFoundException
//     The query ID does not exist or does not map to a query.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeQuery
func (c *CloudTrail) DescribeQuery(input *DescribeQueryInput) (*DescribeQueryOutput, error) {
	req, out := c.DescribeQueryRequest(input)
	return out, req.Send()
}

// DescribeQueryWithContext is the same as DescribeQuery with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeQuery for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) DescribeQueryWithContext(ctx aws.Context, input *DescribeQueryInput, opts ...request.Option) (*DescribeQueryOutput, error) {
	req, out := c.DescribeQueryRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opDescribeTrails = "DescribeTrails"

// DescribeTrailsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeTrails operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeTrails for more information on using the DescribeTrails
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the DescribeTrailsRequest method.
//	req, resp := client.DescribeTrailsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput) {
	op := &request.Operation{
		Name:       opDescribeTrails,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &DescribeTrailsInput{}
	}

	output = &DescribeTrailsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// DescribeTrails API operation for AWS CloudTrail.
//
// Retrieves settings for one or more trails associated with the current Region
// for your account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation DescribeTrails for usage and error information.
//
// Returned Error Types:
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error) {
	req, out := c.DescribeTrailsRequest(input)
	return out, req.Send()
}

// DescribeTrailsWithContext is the same as DescribeTrails with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeTrails for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error) {
	req, out := c.DescribeTrailsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetChannel = "GetChannel"

// GetChannelRequest generates a "aws/request.Request" representing the
// client's request for the GetChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetChannel for more information on using the GetChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetChannelRequest method.
//	req, resp := client.GetChannelRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel
func (c *CloudTrail) GetChannelRequest(input *GetChannelInput) (req *request.Request, output *GetChannelOutput) {
	op := &request.Operation{
		Name:       opGetChannel,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetChannelInput{}
	}

	output = &GetChannelOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetChannel API operation for AWS CloudTrail.
//
// Returns information about a specific channel.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetChannel for usage and error information.
//
// Returned Error Types:
//
//   - ChannelARNInvalidException
//     This exception is thrown when the specified value of ChannelARN is not valid.
//
//   - ChannelNotFoundException
//     This exception is thrown when CloudTrail cannot find the specified channel.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetChannel
func (c *CloudTrail) GetChannel(input *GetChannelInput) (*GetChannelOutput, error) {
	req, out := c.GetChannelRequest(input)
	return out, req.Send()
}

// GetChannelWithContext is the same as GetChannel with the addition of
// the ability to pass a context and additional request options.
//
// See GetChannel for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetChannelWithContext(ctx aws.Context, input *GetChannelInput, opts ...request.Option) (*GetChannelOutput, error) {
	req, out := c.GetChannelRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetEventDataStore = "GetEventDataStore"

// GetEventDataStoreRequest generates a "aws/request.Request" representing the
// client's request for the GetEventDataStore operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetEventDataStore for more information on using the GetEventDataStore
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetEventDataStoreRequest method.
//	req, resp := client.GetEventDataStoreRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore
func (c *CloudTrail) GetEventDataStoreRequest(input *GetEventDataStoreInput) (req *request.Request, output *GetEventDataStoreOutput) {
	op := &request.Operation{
		Name:       opGetEventDataStore,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetEventDataStoreInput{}
	}

	output = &GetEventDataStoreOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetEventDataStore API operation for AWS CloudTrail.
//
// Returns information about an event data store specified as either an ARN
// or the ID portion of the ARN.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetEventDataStore for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventDataStore
func (c *CloudTrail) GetEventDataStore(input *GetEventDataStoreInput) (*GetEventDataStoreOutput, error) {
	req, out := c.GetEventDataStoreRequest(input)
	return out, req.Send()
}

// GetEventDataStoreWithContext is the same as GetEventDataStore with the addition of
// the ability to pass a context and additional request options.
//
// See GetEventDataStore for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetEventDataStoreWithContext(ctx aws.Context, input *GetEventDataStoreInput, opts ...request.Option) (*GetEventDataStoreOutput, error) {
	req, out := c.GetEventDataStoreRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetEventSelectors = "GetEventSelectors"

// GetEventSelectorsRequest generates a "aws/request.Request" representing the
// client's request for the GetEventSelectors operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetEventSelectors for more information on using the GetEventSelectors
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetEventSelectorsRequest method.
//	req, resp := client.GetEventSelectorsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput) {
	op := &request.Operation{
		Name:       opGetEventSelectors,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetEventSelectorsInput{}
	}

	output = &GetEventSelectorsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetEventSelectors API operation for AWS CloudTrail.
//
// Describes the settings for the event selectors that you configured for your
// trail. The information returned for your event selectors includes the following:
//
//   - If your event selector includes read-only events, write-only events,
//     or all events. This applies to both management events and data events.
//
//   - If your event selector includes management events.
//
//   - If your event selector includes data events, the resources on which
//     you are logging data events.
//
// For more information about logging management and data events, see the following
// topics in the CloudTrail User Guide:
//
//   - Logging management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html)
//
//   - Logging data events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetEventSelectors for usage and error information.
//
// Returned Error Types:
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error) {
	req, out := c.GetEventSelectorsRequest(input)
	return out, req.Send()
}

// GetEventSelectorsWithContext is the same as GetEventSelectors with the addition of
// the ability to pass a context and additional request options.
//
// See GetEventSelectors for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error) {
	req, out := c.GetEventSelectorsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetImport = "GetImport"

// GetImportRequest generates a "aws/request.Request" representing the
// client's request for the GetImport operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetImport for more information on using the GetImport
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetImportRequest method.
//	req, resp := client.GetImportRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport
func (c *CloudTrail) GetImportRequest(input *GetImportInput) (req *request.Request, output *GetImportOutput) {
	op := &request.Operation{
		Name:       opGetImport,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetImportInput{}
	}

	output = &GetImportOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetImport API operation for AWS CloudTrail.
//
// Returns information about a specific import.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetImport for usage and error information.
//
// Returned Error Types:
//
//   - ImportNotFoundException
//     The specified import was not found.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetImport
func (c *CloudTrail) GetImport(input *GetImportInput) (*GetImportOutput, error) {
	req, out := c.GetImportRequest(input)
	return out, req.Send()
}

// GetImportWithContext is the same as GetImport with the addition of
// the ability to pass a context and additional request options.
//
// See GetImport for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetImportWithContext(ctx aws.Context, input *GetImportInput, opts ...request.Option) (*GetImportOutput, error) {
	req, out := c.GetImportRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetInsightSelectors = "GetInsightSelectors"

// GetInsightSelectorsRequest generates a "aws/request.Request" representing the
// client's request for the GetInsightSelectors operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetInsightSelectors for more information on using the GetInsightSelectors
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetInsightSelectorsRequest method.
//	req, resp := client.GetInsightSelectorsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
func (c *CloudTrail) GetInsightSelectorsRequest(input *GetInsightSelectorsInput) (req *request.Request, output *GetInsightSelectorsOutput) {
	op := &request.Operation{
		Name:       opGetInsightSelectors,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetInsightSelectorsInput{}
	}

	output = &GetInsightSelectorsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetInsightSelectors API operation for AWS CloudTrail.
//
// Describes the settings for the Insights event selectors that you configured
// for your trail. GetInsightSelectors shows if CloudTrail Insights event logging
// is enabled on the trail, and if it is, which insight types are enabled. If
// you run GetInsightSelectors on a trail that does not have Insights events
// enabled, the operation throws the exception InsightNotEnabledException
//
// For more information, see Logging CloudTrail Insights Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html)
// in the CloudTrail User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetInsightSelectors for usage and error information.
//
// Returned Error Types:
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - InsightNotEnabledException
//     If you run GetInsightSelectors on a trail that does not have Insights events
//     enabled, the operation throws the exception InsightNotEnabledException.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
func (c *CloudTrail) GetInsightSelectors(input *GetInsightSelectorsInput) (*GetInsightSelectorsOutput, error) {
	req, out := c.GetInsightSelectorsRequest(input)
	return out, req.Send()
}

// GetInsightSelectorsWithContext is the same as GetInsightSelectors with the addition of
// the ability to pass a context and additional request options.
//
// See GetInsightSelectors for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetInsightSelectorsWithContext(ctx aws.Context, input *GetInsightSelectorsInput, opts ...request.Option) (*GetInsightSelectorsOutput, error) {
	req, out := c.GetInsightSelectorsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetQueryResults = "GetQueryResults"

// GetQueryResultsRequest generates a "aws/request.Request" representing the
// client's request for the GetQueryResults operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetQueryResults for more information on using the GetQueryResults
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetQueryResultsRequest method.
//	req, resp := client.GetQueryResultsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults
func (c *CloudTrail) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) {
	op := &request.Operation{
		Name:       opGetQueryResults,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &GetQueryResultsInput{}
	}

	output = &GetQueryResultsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetQueryResults API operation for AWS CloudTrail.
//
// Gets event data results of a query. You must specify the QueryID value returned
// by the StartQuery operation.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetQueryResults for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidMaxResultsException
//     This exception is thrown if the limit specified is not valid.
//
//   - InvalidNextTokenException
//     A token that is not valid, or a token that was previously used in a request
//     with different parameters. This exception is thrown if the token is not valid.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - QueryIdNotFoundException
//     The query ID does not exist or does not map to a query.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetQueryResults
func (c *CloudTrail) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) {
	req, out := c.GetQueryResultsRequest(input)
	return out, req.Send()
}

// GetQueryResultsWithContext is the same as GetQueryResults with the addition of
// the ability to pass a context and additional request options.
//
// See GetQueryResults for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) {
	req, out := c.GetQueryResultsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// GetQueryResultsPages iterates over the pages of a GetQueryResults operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See GetQueryResults method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a GetQueryResults operation.
//	pageNum := 0
//	err := client.GetQueryResultsPages(params,
//	    func(page *cloudtrail.GetQueryResultsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) GetQueryResultsPages(input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool) error {
	return c.GetQueryResultsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// GetQueryResultsPagesWithContext same as GetQueryResultsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetQueryResultsPagesWithContext(ctx aws.Context, input *GetQueryResultsInput, fn func(*GetQueryResultsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *GetQueryResultsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.GetQueryResultsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*GetQueryResultsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opGetResourcePolicy = "GetResourcePolicy"

// GetResourcePolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetResourcePolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetResourcePolicy for more information on using the GetResourcePolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetResourcePolicyRequest method.
//	req, resp := client.GetResourcePolicyRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy
func (c *CloudTrail) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) {
	op := &request.Operation{
		Name:       opGetResourcePolicy,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetResourcePolicyInput{}
	}

	output = &GetResourcePolicyOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetResourcePolicy API operation for AWS CloudTrail.
//
// Retrieves the JSON text of the resource-based policy document attached to
// the CloudTrail channel.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetResourcePolicy for usage and error information.
//
// Returned Error Types:
//
//   - ResourceARNNotValidException
//     This exception is thrown when the provided resource does not exist, or the
//     ARN format of the resource is not valid. The following is the valid format
//     for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
//
//   - ResourceNotFoundException
//     This exception is thrown when the specified resource is not found.
//
//   - ResourcePolicyNotFoundException
//     This exception is thrown when the specified resource policy is not found.
//
//   - ResourceTypeNotSupportedException
//     This exception is thrown when the specified resource type is not supported
//     by CloudTrail.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetResourcePolicy
func (c *CloudTrail) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) {
	req, out := c.GetResourcePolicyRequest(input)
	return out, req.Send()
}

// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See GetResourcePolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) {
	req, out := c.GetResourcePolicyRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetTrail = "GetTrail"

// GetTrailRequest generates a "aws/request.Request" representing the
// client's request for the GetTrail operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetTrail for more information on using the GetTrail
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetTrailRequest method.
//	req, resp := client.GetTrailRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
func (c *CloudTrail) GetTrailRequest(input *GetTrailInput) (req *request.Request, output *GetTrailOutput) {
	op := &request.Operation{
		Name:       opGetTrail,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetTrailInput{}
	}

	output = &GetTrailOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetTrail API operation for AWS CloudTrail.
//
// Returns settings information for a specified trail.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetTrail for usage and error information.
//
// Returned Error Types:
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
func (c *CloudTrail) GetTrail(input *GetTrailInput) (*GetTrailOutput, error) {
	req, out := c.GetTrailRequest(input)
	return out, req.Send()
}

// GetTrailWithContext is the same as GetTrail with the addition of
// the ability to pass a context and additional request options.
//
// See GetTrail for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetTrailWithContext(ctx aws.Context, input *GetTrailInput, opts ...request.Option) (*GetTrailOutput, error) {
	req, out := c.GetTrailRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opGetTrailStatus = "GetTrailStatus"

// GetTrailStatusRequest generates a "aws/request.Request" representing the
// client's request for the GetTrailStatus operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetTrailStatus for more information on using the GetTrailStatus
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the GetTrailStatusRequest method.
//	req, resp := client.GetTrailStatusRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput) {
	op := &request.Operation{
		Name:       opGetTrailStatus,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &GetTrailStatusInput{}
	}

	output = &GetTrailStatusOutput{}
	req = c.newRequest(op, input, output)
	return
}

// GetTrailStatus API operation for AWS CloudTrail.
//
// Returns a JSON-formatted list of information about the specified trail. Fields
// include information on delivery errors, Amazon SNS and Amazon S3 errors,
// and start and stop logging times for each trail. This operation returns trail
// status from a single Region. To return trail status from all Regions, you
// must call the operation on each Region.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation GetTrailStatus for usage and error information.
//
// Returned Error Types:
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error) {
	req, out := c.GetTrailStatusRequest(input)
	return out, req.Send()
}

// GetTrailStatusWithContext is the same as GetTrailStatus with the addition of
// the ability to pass a context and additional request options.
//
// See GetTrailStatus for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error) {
	req, out := c.GetTrailStatusRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opListChannels = "ListChannels"

// ListChannelsRequest generates a "aws/request.Request" representing the
// client's request for the ListChannels operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListChannels for more information on using the ListChannels
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListChannelsRequest method.
//	req, resp := client.ListChannelsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels
func (c *CloudTrail) ListChannelsRequest(input *ListChannelsInput) (req *request.Request, output *ListChannelsOutput) {
	op := &request.Operation{
		Name:       opListChannels,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListChannelsInput{}
	}

	output = &ListChannelsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListChannels API operation for AWS CloudTrail.
//
// Lists the channels in the current account, and their source names.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListChannels for usage and error information.
//
// Returned Error Types:
//
//   - InvalidNextTokenException
//     A token that is not valid, or a token that was previously used in a request
//     with different parameters. This exception is thrown if the token is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListChannels
func (c *CloudTrail) ListChannels(input *ListChannelsInput) (*ListChannelsOutput, error) {
	req, out := c.ListChannelsRequest(input)
	return out, req.Send()
}

// ListChannelsWithContext is the same as ListChannels with the addition of
// the ability to pass a context and additional request options.
//
// See ListChannels for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListChannelsWithContext(ctx aws.Context, input *ListChannelsInput, opts ...request.Option) (*ListChannelsOutput, error) {
	req, out := c.ListChannelsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListChannelsPages iterates over the pages of a ListChannels operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListChannels method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListChannels operation.
//	pageNum := 0
//	err := client.ListChannelsPages(params,
//	    func(page *cloudtrail.ListChannelsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListChannelsPages(input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool) error {
	return c.ListChannelsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListChannelsPagesWithContext same as ListChannelsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListChannelsPagesWithContext(ctx aws.Context, input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListChannelsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListChannelsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListEventDataStores = "ListEventDataStores"

// ListEventDataStoresRequest generates a "aws/request.Request" representing the
// client's request for the ListEventDataStores operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListEventDataStores for more information on using the ListEventDataStores
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListEventDataStoresRequest method.
//	req, resp := client.ListEventDataStoresRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores
func (c *CloudTrail) ListEventDataStoresRequest(input *ListEventDataStoresInput) (req *request.Request, output *ListEventDataStoresOutput) {
	op := &request.Operation{
		Name:       opListEventDataStores,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListEventDataStoresInput{}
	}

	output = &ListEventDataStoresOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListEventDataStores API operation for AWS CloudTrail.
//
// Returns information about all event data stores in the account, in the current
// Region.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListEventDataStores for usage and error information.
//
// Returned Error Types:
//
//   - InvalidMaxResultsException
//     This exception is thrown if the limit specified is not valid.
//
//   - InvalidNextTokenException
//     A token that is not valid, or a token that was previously used in a request
//     with different parameters. This exception is thrown if the token is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListEventDataStores
func (c *CloudTrail) ListEventDataStores(input *ListEventDataStoresInput) (*ListEventDataStoresOutput, error) {
	req, out := c.ListEventDataStoresRequest(input)
	return out, req.Send()
}

// ListEventDataStoresWithContext is the same as ListEventDataStores with the addition of
// the ability to pass a context and additional request options.
//
// See ListEventDataStores for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListEventDataStoresWithContext(ctx aws.Context, input *ListEventDataStoresInput, opts ...request.Option) (*ListEventDataStoresOutput, error) {
	req, out := c.ListEventDataStoresRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListEventDataStoresPages iterates over the pages of a ListEventDataStores operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListEventDataStores method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListEventDataStores operation.
//	pageNum := 0
//	err := client.ListEventDataStoresPages(params,
//	    func(page *cloudtrail.ListEventDataStoresOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListEventDataStoresPages(input *ListEventDataStoresInput, fn func(*ListEventDataStoresOutput, bool) bool) error {
	return c.ListEventDataStoresPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListEventDataStoresPagesWithContext same as ListEventDataStoresPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListEventDataStoresPagesWithContext(ctx aws.Context, input *ListEventDataStoresInput, fn func(*ListEventDataStoresOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListEventDataStoresInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListEventDataStoresRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListEventDataStoresOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListImportFailures = "ListImportFailures"

// ListImportFailuresRequest generates a "aws/request.Request" representing the
// client's request for the ListImportFailures operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListImportFailures for more information on using the ListImportFailures
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListImportFailuresRequest method.
//	req, resp := client.ListImportFailuresRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures
func (c *CloudTrail) ListImportFailuresRequest(input *ListImportFailuresInput) (req *request.Request, output *ListImportFailuresOutput) {
	op := &request.Operation{
		Name:       opListImportFailures,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListImportFailuresInput{}
	}

	output = &ListImportFailuresOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListImportFailures API operation for AWS CloudTrail.
//
// Returns a list of failures for the specified import.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListImportFailures for usage and error information.
//
// Returned Error Types:
//
//   - InvalidNextTokenException
//     A token that is not valid, or a token that was previously used in a request
//     with different parameters. This exception is thrown if the token is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImportFailures
func (c *CloudTrail) ListImportFailures(input *ListImportFailuresInput) (*ListImportFailuresOutput, error) {
	req, out := c.ListImportFailuresRequest(input)
	return out, req.Send()
}

// ListImportFailuresWithContext is the same as ListImportFailures with the addition of
// the ability to pass a context and additional request options.
//
// See ListImportFailures for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListImportFailuresWithContext(ctx aws.Context, input *ListImportFailuresInput, opts ...request.Option) (*ListImportFailuresOutput, error) {
	req, out := c.ListImportFailuresRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListImportFailuresPages iterates over the pages of a ListImportFailures operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListImportFailures method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListImportFailures operation.
//	pageNum := 0
//	err := client.ListImportFailuresPages(params,
//	    func(page *cloudtrail.ListImportFailuresOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListImportFailuresPages(input *ListImportFailuresInput, fn func(*ListImportFailuresOutput, bool) bool) error {
	return c.ListImportFailuresPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListImportFailuresPagesWithContext same as ListImportFailuresPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListImportFailuresPagesWithContext(ctx aws.Context, input *ListImportFailuresInput, fn func(*ListImportFailuresOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListImportFailuresInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListImportFailuresRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListImportFailuresOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListImports = "ListImports"

// ListImportsRequest generates a "aws/request.Request" representing the
// client's request for the ListImports operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListImports for more information on using the ListImports
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListImportsRequest method.
//	req, resp := client.ListImportsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports
func (c *CloudTrail) ListImportsRequest(input *ListImportsInput) (req *request.Request, output *ListImportsOutput) {
	op := &request.Operation{
		Name:       opListImports,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListImportsInput{}
	}

	output = &ListImportsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListImports API operation for AWS CloudTrail.
//
// Returns information on all imports, or a select set of imports by ImportStatus
// or Destination.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListImports for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - InvalidNextTokenException
//     A token that is not valid, or a token that was previously used in a request
//     with different parameters. This exception is thrown if the token is not valid.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListImports
func (c *CloudTrail) ListImports(input *ListImportsInput) (*ListImportsOutput, error) {
	req, out := c.ListImportsRequest(input)
	return out, req.Send()
}

// ListImportsWithContext is the same as ListImports with the addition of
// the ability to pass a context and additional request options.
//
// See ListImports for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListImportsWithContext(ctx aws.Context, input *ListImportsInput, opts ...request.Option) (*ListImportsOutput, error) {
	req, out := c.ListImportsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListImportsPages iterates over the pages of a ListImports operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListImports method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListImports operation.
//	pageNum := 0
//	err := client.ListImportsPages(params,
//	    func(page *cloudtrail.ListImportsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListImportsPages(input *ListImportsInput, fn func(*ListImportsOutput, bool) bool) error {
	return c.ListImportsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListImportsPagesWithContext same as ListImportsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListImportsPagesWithContext(ctx aws.Context, input *ListImportsInput, fn func(*ListImportsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListImportsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListImportsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListImportsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListPublicKeys = "ListPublicKeys"

// ListPublicKeysRequest generates a "aws/request.Request" representing the
// client's request for the ListPublicKeys operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListPublicKeys for more information on using the ListPublicKeys
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListPublicKeysRequest method.
//	req, resp := client.ListPublicKeysRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) {
	op := &request.Operation{
		Name:       opListPublicKeys,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListPublicKeysInput{}
	}

	output = &ListPublicKeysOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListPublicKeys API operation for AWS CloudTrail.
//
// Returns all public keys whose private keys were used to sign the digest files
// within the specified time range. The public key is needed to validate digest
// files that were signed with its corresponding private key.
//
// CloudTrail uses different private and public key pairs per Region. Each digest
// file is signed with a private key unique to its Region. When you validate
// a digest file from a specific Region, you must look in the same Region for
// its corresponding public key.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListPublicKeys for usage and error information.
//
// Returned Error Types:
//
//   - InvalidTimeRangeException
//     Occurs if the timestamp values are not valid. Either the start time occurs
//     after the end time, or the time range is outside the range of possible values.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - InvalidTokenException
//     Reserved for future use.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) {
	req, out := c.ListPublicKeysRequest(input)
	return out, req.Send()
}

// ListPublicKeysWithContext is the same as ListPublicKeys with the addition of
// the ability to pass a context and additional request options.
//
// See ListPublicKeys for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) {
	req, out := c.ListPublicKeysRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListPublicKeysPages iterates over the pages of a ListPublicKeys operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListPublicKeys method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListPublicKeys operation.
//	pageNum := 0
//	err := client.ListPublicKeysPages(params,
//	    func(page *cloudtrail.ListPublicKeysOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListPublicKeysPages(input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool) error {
	return c.ListPublicKeysPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListPublicKeysPagesWithContext same as ListPublicKeysPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListPublicKeysPagesWithContext(ctx aws.Context, input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListPublicKeysInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListPublicKeysRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListPublicKeysOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListQueries = "ListQueries"

// ListQueriesRequest generates a "aws/request.Request" representing the
// client's request for the ListQueries operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListQueries for more information on using the ListQueries
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListQueriesRequest method.
//	req, resp := client.ListQueriesRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries
func (c *CloudTrail) ListQueriesRequest(input *ListQueriesInput) (req *request.Request, output *ListQueriesOutput) {
	op := &request.Operation{
		Name:       opListQueries,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListQueriesInput{}
	}

	output = &ListQueriesOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListQueries API operation for AWS CloudTrail.
//
// Returns a list of queries and query statuses for the past seven days. You
// must specify an ARN value for EventDataStore. Optionally, to shorten the
// list of results, you can specify a time range, formatted as timestamps, by
// adding StartTime and EndTime parameters, and a QueryStatus value. Valid values
// for QueryStatus include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or
// CANCELLED.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListQueries for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidDateRangeException
//     A date range for the query was specified that is not valid. Be sure that
//     the start time is chronologically before the end time. For more information
//     about writing a query, see Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
//     in the CloudTrail User Guide.
//
//   - InvalidMaxResultsException
//     This exception is thrown if the limit specified is not valid.
//
//   - InvalidNextTokenException
//     A token that is not valid, or a token that was previously used in a request
//     with different parameters. This exception is thrown if the token is not valid.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - InvalidQueryStatusException
//     The query status is not valid for the operation.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListQueries
func (c *CloudTrail) ListQueries(input *ListQueriesInput) (*ListQueriesOutput, error) {
	req, out := c.ListQueriesRequest(input)
	return out, req.Send()
}

// ListQueriesWithContext is the same as ListQueries with the addition of
// the ability to pass a context and additional request options.
//
// See ListQueries for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListQueriesWithContext(ctx aws.Context, input *ListQueriesInput, opts ...request.Option) (*ListQueriesOutput, error) {
	req, out := c.ListQueriesRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListQueriesPages iterates over the pages of a ListQueries operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListQueries method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListQueries operation.
//	pageNum := 0
//	err := client.ListQueriesPages(params,
//	    func(page *cloudtrail.ListQueriesOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListQueriesPages(input *ListQueriesInput, fn func(*ListQueriesOutput, bool) bool) error {
	return c.ListQueriesPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListQueriesPagesWithContext same as ListQueriesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListQueriesPagesWithContext(ctx aws.Context, input *ListQueriesInput, fn func(*ListQueriesOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListQueriesInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListQueriesRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListQueriesOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListTags = "ListTags"

// ListTagsRequest generates a "aws/request.Request" representing the
// client's request for the ListTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTags for more information on using the ListTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListTagsRequest method.
//	req, resp := client.ListTagsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
	op := &request.Operation{
		Name:       opListTags,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListTagsInput{}
	}

	output = &ListTagsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListTags API operation for AWS CloudTrail.
//
// Lists the tags for the specified trails, event data stores, or channels in
// the current Region.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListTags for usage and error information.
//
// Returned Error Types:
//
//   - ResourceNotFoundException
//     This exception is thrown when the specified resource is not found.
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - ChannelARNInvalidException
//     This exception is thrown when the specified value of ChannelARN is not valid.
//
//   - ResourceTypeNotSupportedException
//     This exception is thrown when the specified resource type is not supported
//     by CloudTrail.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - InvalidTokenException
//     Reserved for future use.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
	req, out := c.ListTagsRequest(input)
	return out, req.Send()
}

// ListTagsWithContext is the same as ListTags with the addition of
// the ability to pass a context and additional request options.
//
// See ListTags for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
	req, out := c.ListTagsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListTagsPages iterates over the pages of a ListTags operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListTags method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListTags operation.
//	pageNum := 0
//	err := client.ListTagsPages(params,
//	    func(page *cloudtrail.ListTagsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
	return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListTagsPagesWithContext same as ListTagsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListTagsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListTagsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opListTrails = "ListTrails"

// ListTrailsRequest generates a "aws/request.Request" representing the
// client's request for the ListTrails operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTrails for more information on using the ListTrails
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the ListTrailsRequest method.
//	req, resp := client.ListTrailsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
func (c *CloudTrail) ListTrailsRequest(input *ListTrailsInput) (req *request.Request, output *ListTrailsOutput) {
	op := &request.Operation{
		Name:       opListTrails,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &ListTrailsInput{}
	}

	output = &ListTrailsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// ListTrails API operation for AWS CloudTrail.
//
// Lists trails that are in the current account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation ListTrails for usage and error information.
//
// Returned Error Types:
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
func (c *CloudTrail) ListTrails(input *ListTrailsInput) (*ListTrailsOutput, error) {
	req, out := c.ListTrailsRequest(input)
	return out, req.Send()
}

// ListTrailsWithContext is the same as ListTrails with the addition of
// the ability to pass a context and additional request options.
//
// See ListTrails for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListTrailsWithContext(ctx aws.Context, input *ListTrailsInput, opts ...request.Option) (*ListTrailsOutput, error) {
	req, out := c.ListTrailsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// ListTrailsPages iterates over the pages of a ListTrails operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListTrails method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a ListTrails operation.
//	pageNum := 0
//	err := client.ListTrailsPages(params,
//	    func(page *cloudtrail.ListTrailsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) ListTrailsPages(input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool) error {
	return c.ListTrailsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// ListTrailsPagesWithContext same as ListTrailsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) ListTrailsPagesWithContext(ctx aws.Context, input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *ListTrailsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.ListTrailsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*ListTrailsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opLookupEvents = "LookupEvents"

// LookupEventsRequest generates a "aws/request.Request" representing the
// client's request for the LookupEvents operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See LookupEvents for more information on using the LookupEvents
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the LookupEventsRequest method.
//	req, resp := client.LookupEventsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput) {
	op := &request.Operation{
		Name:       opLookupEvents,
		HTTPMethod: "POST",
		HTTPPath:   "/",
		Paginator: &request.Paginator{
			InputTokens:     []string{"NextToken"},
			OutputTokens:    []string{"NextToken"},
			LimitToken:      "MaxResults",
			TruncationToken: "",
		},
	}

	if input == nil {
		input = &LookupEventsInput{}
	}

	output = &LookupEventsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// LookupEvents API operation for AWS CloudTrail.
//
// Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events)
// or CloudTrail Insights events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events)
// that are captured by CloudTrail. You can look up events that occurred in
// a Region within the last 90 days. Lookup supports the following attributes
// for management events:
//
//   - Amazon Web Services access key
//
//   - Event ID
//
//   - Event name
//
//   - Event source
//
//   - Read only
//
//   - Resource name
//
//   - Resource type
//
//   - User name
//
// Lookup supports the following attributes for Insights events:
//
//   - Event ID
//
//   - Event name
//
//   - Event source
//
// All attributes are optional. The default number of results returned is 50,
// with a maximum of 50 possible. The response includes a token that you can
// use to get the next page of results.
//
// The rate of lookup requests is limited to two per second, per account, per
// Region. If this limit is exceeded, a throttling error occurs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation LookupEvents for usage and error information.
//
// Returned Error Types:
//
//   - InvalidLookupAttributesException
//     Occurs when a lookup attribute is specified that is not valid.
//
//   - InvalidTimeRangeException
//     Occurs if the timestamp values are not valid. Either the start time occurs
//     after the end time, or the time range is outside the range of possible values.
//
//   - InvalidMaxResultsException
//     This exception is thrown if the limit specified is not valid.
//
//   - InvalidNextTokenException
//     A token that is not valid, or a token that was previously used in a request
//     with different parameters. This exception is thrown if the token is not valid.
//
//   - InvalidEventCategoryException
//     Occurs if an event category that is not valid is specified as a value of
//     EventCategory.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error) {
	req, out := c.LookupEventsRequest(input)
	return out, req.Send()
}

// LookupEventsWithContext is the same as LookupEvents with the addition of
// the ability to pass a context and additional request options.
//
// See LookupEvents for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error) {
	req, out := c.LookupEventsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// LookupEventsPages iterates over the pages of a LookupEvents operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See LookupEvents method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
//	// Example iterating over at most 3 pages of a LookupEvents operation.
//	pageNum := 0
//	err := client.LookupEventsPages(params,
//	    func(page *cloudtrail.LookupEventsOutput, lastPage bool) bool {
//	        pageNum++
//	        fmt.Println(page)
//	        return pageNum <= 3
//	    })
func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error {
	return c.LookupEventsPagesWithContext(aws.BackgroundContext(), input, fn)
}

// LookupEventsPagesWithContext same as LookupEventsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error {
	p := request.Pagination{
		NewRequest: func() (*request.Request, error) {
			var inCpy *LookupEventsInput
			if input != nil {
				tmp := *input
				inCpy = &tmp
			}
			req, _ := c.LookupEventsRequest(inCpy)
			req.SetContext(ctx)
			req.ApplyOptions(opts...)
			return req, nil
		},
	}

	for p.Next() {
		if !fn(p.Page().(*LookupEventsOutput), !p.HasNextPage()) {
			break
		}
	}

	return p.Err()
}

const opPutEventSelectors = "PutEventSelectors"

// PutEventSelectorsRequest generates a "aws/request.Request" representing the
// client's request for the PutEventSelectors operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PutEventSelectors for more information on using the PutEventSelectors
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the PutEventSelectorsRequest method.
//	req, resp := client.PutEventSelectorsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput) {
	op := &request.Operation{
		Name:       opPutEventSelectors,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &PutEventSelectorsInput{}
	}

	output = &PutEventSelectorsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// PutEventSelectors API operation for AWS CloudTrail.
//
// Configures an event selector or advanced event selectors for your trail.
// Use event selectors or advanced event selectors to specify management and
// data event settings for your trail. If you want your trail to log Insights
// events, be sure the event selector enables logging of the Insights event
// types you want configured for your trail. For more information about logging
// Insights events, see Logging Insights events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html)
// in the CloudTrail User Guide. By default, trails created without specific
// event selectors are configured to log all read and write management events,
// and no data events.
//
// When an event occurs in your account, CloudTrail evaluates the event selectors
// or advanced event selectors in all trails. For each trail, if the event matches
// any event selector, the trail processes and logs the event. If the event
// doesn't match any event selector, the trail doesn't log the event.
//
// # Example
//
// You create an event selector for a trail and specify that you want write-only
// events.
//
// The EC2 GetConsoleOutput and RunInstances API operations occur in your account.
//
// CloudTrail evaluates whether the events match your event selectors.
//
// The RunInstances is a write-only event and it matches your event selector.
// The trail logs the event.
//
// The GetConsoleOutput is a read-only event that doesn't match your event selector.
// The trail doesn't log the event.
//
// The PutEventSelectors operation must be called from the Region in which the
// trail was created; otherwise, an InvalidHomeRegionException exception is
// thrown.
//
// You can configure up to five event selectors for each trail. For more information,
// see Logging management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html),
// Logging data events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html),
// and Quotas in CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
// in the CloudTrail User Guide.
//
// You can add advanced event selectors, and conditions for your advanced event
// selectors, up to a maximum of 500 values for all conditions and selectors
// on a trail. You can use either AdvancedEventSelectors or EventSelectors,
// but not both. If you apply AdvancedEventSelectors to a trail, any existing
// EventSelectors are overwritten. For more information about advanced event
// selectors, see Logging data events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
// in the CloudTrail User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation PutEventSelectors for usage and error information.
//
// Returned Error Types:
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - InvalidHomeRegionException
//     This exception is thrown when an operation is called on a trail from a Region
//     other than the Region in which the trail was created.
//
//   - InvalidEventSelectorsException
//     This exception is thrown when the PutEventSelectors operation is called with
//     a number of event selectors, advanced event selectors, or data resources
//     that is not valid. The combination of event selectors or advanced event selectors
//     and data resources is not valid. A trail can have up to 5 event selectors.
//     If a trail uses advanced event selectors, a maximum of 500 total values for
//     all conditions in all advanced event selectors is allowed. A trail is limited
//     to 250 data resources. These data resources can be distributed across event
//     selectors, but the overall total cannot exceed 250.
//
//     You can:
//
//   - Specify a valid number of event selectors (1 to 5) for a trail.
//
//   - Specify a valid number of data resources (1 to 250) for an event selector.
//     The limit of number of resources on an individual event selector is configurable
//     up to 250. However, this upper limit is allowed only if the total number
//     of data resources does not exceed 250 across all event selectors for a
//     trail.
//
//   - Specify up to 500 values for all conditions in all advanced event selectors
//     for a trail.
//
//   - Specify a valid value for a parameter. For example, specifying the ReadWriteType
//     parameter with a value of read-only is not valid.
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error) {
	req, out := c.PutEventSelectorsRequest(input)
	return out, req.Send()
}

// PutEventSelectorsWithContext is the same as PutEventSelectors with the addition of
// the ability to pass a context and additional request options.
//
// See PutEventSelectors for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error) {
	req, out := c.PutEventSelectorsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opPutInsightSelectors = "PutInsightSelectors"

// PutInsightSelectorsRequest generates a "aws/request.Request" representing the
// client's request for the PutInsightSelectors operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PutInsightSelectors for more information on using the PutInsightSelectors
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the PutInsightSelectorsRequest method.
//	req, resp := client.PutInsightSelectorsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
func (c *CloudTrail) PutInsightSelectorsRequest(input *PutInsightSelectorsInput) (req *request.Request, output *PutInsightSelectorsOutput) {
	op := &request.Operation{
		Name:       opPutInsightSelectors,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &PutInsightSelectorsInput{}
	}

	output = &PutInsightSelectorsOutput{}
	req = c.newRequest(op, input, output)
	return
}

// PutInsightSelectors API operation for AWS CloudTrail.
//
// Lets you enable Insights event logging by specifying the Insights selectors
// that you want to enable on an existing trail. You also use PutInsightSelectors
// to turn off Insights event logging, by passing an empty list of insight types.
// The valid Insights event types in this release are ApiErrorRateInsight and
// ApiCallRateInsight.
//
// To log CloudTrail Insights events on API call volume, the trail must log
// write management events. To log CloudTrail Insights events on API error rate,
// the trail must log read or write management events. You can call GetEventSelectors
// on a trail to check whether the trail logs management events.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation PutInsightSelectors for usage and error information.
//
// Returned Error Types:
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - InvalidHomeRegionException
//     This exception is thrown when an operation is called on a trail from a Region
//     other than the Region in which the trail was created.
//
//   - InvalidInsightSelectorsException
//     The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
//     or GetInsightSelectors request is not valid, or the specified insight type
//     in the InsightSelectors statement is not a valid insight type.
//
//   - InsufficientS3BucketPolicyException
//     This exception is thrown when the policy on the S3 bucket is not sufficient.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - S3BucketDoesNotExistException
//     This exception is thrown when the specified S3 bucket does not exist.
//
//   - KmsException
//     This exception is thrown when there is an issue with the specified KMS key
//     and the trail or event data store can't be updated.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
func (c *CloudTrail) PutInsightSelectors(input *PutInsightSelectorsInput) (*PutInsightSelectorsOutput, error) {
	req, out := c.PutInsightSelectorsRequest(input)
	return out, req.Send()
}

// PutInsightSelectorsWithContext is the same as PutInsightSelectors with the addition of
// the ability to pass a context and additional request options.
//
// See PutInsightSelectors for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) PutInsightSelectorsWithContext(ctx aws.Context, input *PutInsightSelectorsInput, opts ...request.Option) (*PutInsightSelectorsOutput, error) {
	req, out := c.PutInsightSelectorsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opPutResourcePolicy = "PutResourcePolicy"

// PutResourcePolicyRequest generates a "aws/request.Request" representing the
// client's request for the PutResourcePolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PutResourcePolicy for more information on using the PutResourcePolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the PutResourcePolicyRequest method.
//	req, resp := client.PutResourcePolicyRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy
func (c *CloudTrail) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) {
	op := &request.Operation{
		Name:       opPutResourcePolicy,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &PutResourcePolicyInput{}
	}

	output = &PutResourcePolicyOutput{}
	req = c.newRequest(op, input, output)
	return
}

// PutResourcePolicy API operation for AWS CloudTrail.
//
// Attaches a resource-based permission policy to a CloudTrail channel that
// is used for an integration with an event source outside of Amazon Web Services.
// For more information about resource-based policies, see CloudTrail resource-based
// policy examples (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html)
// in the CloudTrail User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation PutResourcePolicy for usage and error information.
//
// Returned Error Types:
//
//   - ResourceARNNotValidException
//     This exception is thrown when the provided resource does not exist, or the
//     ARN format of the resource is not valid. The following is the valid format
//     for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
//
//   - ResourcePolicyNotValidException
//     This exception is thrown when the resouce-based policy has syntax errors,
//     or contains a principal that is not valid.
//
//     The following are requirements for the resource policy:
//
//   - Contains only one action: cloudtrail-data:PutAuditEvents
//
//   - Contains at least one statement. The policy can have a maximum of 20
//     statements.
//
//   - Each statement contains at least one principal. A statement can have
//     a maximum of 50 principals.
//
//   - ResourceNotFoundException
//     This exception is thrown when the specified resource is not found.
//
//   - ResourceTypeNotSupportedException
//     This exception is thrown when the specified resource type is not supported
//     by CloudTrail.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutResourcePolicy
func (c *CloudTrail) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) {
	req, out := c.PutResourcePolicyRequest(input)
	return out, req.Send()
}

// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See PutResourcePolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) {
	req, out := c.PutResourcePolicyRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opRegisterOrganizationDelegatedAdmin = "RegisterOrganizationDelegatedAdmin"

// RegisterOrganizationDelegatedAdminRequest generates a "aws/request.Request" representing the
// client's request for the RegisterOrganizationDelegatedAdmin operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RegisterOrganizationDelegatedAdmin for more information on using the RegisterOrganizationDelegatedAdmin
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the RegisterOrganizationDelegatedAdminRequest method.
//	req, resp := client.RegisterOrganizationDelegatedAdminRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin
func (c *CloudTrail) RegisterOrganizationDelegatedAdminRequest(input *RegisterOrganizationDelegatedAdminInput) (req *request.Request, output *RegisterOrganizationDelegatedAdminOutput) {
	op := &request.Operation{
		Name:       opRegisterOrganizationDelegatedAdmin,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &RegisterOrganizationDelegatedAdminInput{}
	}

	output = &RegisterOrganizationDelegatedAdminOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// RegisterOrganizationDelegatedAdmin API operation for AWS CloudTrail.
//
// Registers an organization’s member account as the CloudTrail delegated
// administrator.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation RegisterOrganizationDelegatedAdmin for usage and error information.
//
// Returned Error Types:
//
//   - AccountRegisteredException
//     This exception is thrown when the account is already registered as the CloudTrail
//     delegated administrator.
//
//   - AccountNotFoundException
//     This exception is thrown when the specified account is not found or not part
//     of an organization.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - CannotDelegateManagementAccountException
//     This exception is thrown when the management account of an organization is
//     registered as the CloudTrail delegated administrator.
//
//   - AccessNotEnabledException
//     This exception is thrown when trusted access has not been enabled between
//     CloudTrail and Organizations. For more information, see Enabling Trusted
//     Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
//     and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - DelegatedAdminAccountLimitExceededException
//     This exception is thrown when the maximum number of CloudTrail delegated
//     administrators is reached.
//
//   - NotOrganizationManagementAccountException
//     This exception is thrown when the account making the request is not the organization's
//     management account.
//
//   - OrganizationNotInAllFeaturesModeException
//     This exception is thrown when Organizations is not configured to support
//     all features. All features must be enabled in Organizations to support creating
//     an organization trail or event data store.
//
//   - OrganizationsNotInUseException
//     This exception is thrown when the request is made from an Amazon Web Services
//     account that is not a member of an organization. To make this request, sign
//     in using the credentials of an account that belongs to an organization.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RegisterOrganizationDelegatedAdmin
func (c *CloudTrail) RegisterOrganizationDelegatedAdmin(input *RegisterOrganizationDelegatedAdminInput) (*RegisterOrganizationDelegatedAdminOutput, error) {
	req, out := c.RegisterOrganizationDelegatedAdminRequest(input)
	return out, req.Send()
}

// RegisterOrganizationDelegatedAdminWithContext is the same as RegisterOrganizationDelegatedAdmin with the addition of
// the ability to pass a context and additional request options.
//
// See RegisterOrganizationDelegatedAdmin for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) RegisterOrganizationDelegatedAdminWithContext(ctx aws.Context, input *RegisterOrganizationDelegatedAdminInput, opts ...request.Option) (*RegisterOrganizationDelegatedAdminOutput, error) {
	req, out := c.RegisterOrganizationDelegatedAdminRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opRemoveTags = "RemoveTags"

// RemoveTagsRequest generates a "aws/request.Request" representing the
// client's request for the RemoveTags operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RemoveTags for more information on using the RemoveTags
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the RemoveTagsRequest method.
//	req, resp := client.RemoveTagsRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
	op := &request.Operation{
		Name:       opRemoveTags,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &RemoveTagsInput{}
	}

	output = &RemoveTagsOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// RemoveTags API operation for AWS CloudTrail.
//
// Removes the specified tags from a trail, event data store, or channel.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation RemoveTags for usage and error information.
//
// Returned Error Types:
//
//   - ResourceNotFoundException
//     This exception is thrown when the specified resource is not found.
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - ChannelARNInvalidException
//     This exception is thrown when the specified value of ChannelARN is not valid.
//
//   - ResourceTypeNotSupportedException
//     This exception is thrown when the specified resource type is not supported
//     by CloudTrail.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - InvalidTagParameterException
//     This exception is thrown when the specified tag key or values are not valid.
//     It can also occur if there are duplicate tags or too many tags on the resource.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - ChannelNotFoundException
//     This exception is thrown when CloudTrail cannot find the specified channel.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
	req, out := c.RemoveTagsRequest(input)
	return out, req.Send()
}

// RemoveTagsWithContext is the same as RemoveTags with the addition of
// the ability to pass a context and additional request options.
//
// See RemoveTags for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) {
	req, out := c.RemoveTagsRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opRestoreEventDataStore = "RestoreEventDataStore"

// RestoreEventDataStoreRequest generates a "aws/request.Request" representing the
// client's request for the RestoreEventDataStore operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RestoreEventDataStore for more information on using the RestoreEventDataStore
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the RestoreEventDataStoreRequest method.
//	req, resp := client.RestoreEventDataStoreRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore
func (c *CloudTrail) RestoreEventDataStoreRequest(input *RestoreEventDataStoreInput) (req *request.Request, output *RestoreEventDataStoreOutput) {
	op := &request.Operation{
		Name:       opRestoreEventDataStore,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &RestoreEventDataStoreInput{}
	}

	output = &RestoreEventDataStoreOutput{}
	req = c.newRequest(op, input, output)
	return
}

// RestoreEventDataStore API operation for AWS CloudTrail.
//
// Restores a deleted event data store specified by EventDataStore, which accepts
// an event data store ARN. You can only restore a deleted event data store
// within the seven-day wait period after deletion. Restoring an event data
// store can take several minutes, depending on the size of the event data store.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation RestoreEventDataStore for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - EventDataStoreMaxLimitExceededException
//     Your account has used the maximum number of event data stores.
//
//   - InvalidEventDataStoreStatusException
//     The event data store is not in a status that supports the operation.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - AccessNotEnabledException
//     This exception is thrown when trusted access has not been enabled between
//     CloudTrail and Organizations. For more information, see Enabling Trusted
//     Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
//     and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
//   - OrganizationsNotInUseException
//     This exception is thrown when the request is made from an Amazon Web Services
//     account that is not a member of an organization. To make this request, sign
//     in using the credentials of an account that belongs to an organization.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - OrganizationNotInAllFeaturesModeException
//     This exception is thrown when Organizations is not configured to support
//     all features. All features must be enabled in Organizations to support creating
//     an organization trail or event data store.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RestoreEventDataStore
func (c *CloudTrail) RestoreEventDataStore(input *RestoreEventDataStoreInput) (*RestoreEventDataStoreOutput, error) {
	req, out := c.RestoreEventDataStoreRequest(input)
	return out, req.Send()
}

// RestoreEventDataStoreWithContext is the same as RestoreEventDataStore with the addition of
// the ability to pass a context and additional request options.
//
// See RestoreEventDataStore for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) RestoreEventDataStoreWithContext(ctx aws.Context, input *RestoreEventDataStoreInput, opts ...request.Option) (*RestoreEventDataStoreOutput, error) {
	req, out := c.RestoreEventDataStoreRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opStartEventDataStoreIngestion = "StartEventDataStoreIngestion"

// StartEventDataStoreIngestionRequest generates a "aws/request.Request" representing the
// client's request for the StartEventDataStoreIngestion operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StartEventDataStoreIngestion for more information on using the StartEventDataStoreIngestion
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the StartEventDataStoreIngestionRequest method.
//	req, resp := client.StartEventDataStoreIngestionRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion
func (c *CloudTrail) StartEventDataStoreIngestionRequest(input *StartEventDataStoreIngestionInput) (req *request.Request, output *StartEventDataStoreIngestionOutput) {
	op := &request.Operation{
		Name:       opStartEventDataStoreIngestion,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &StartEventDataStoreIngestionInput{}
	}

	output = &StartEventDataStoreIngestionOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// StartEventDataStoreIngestion API operation for AWS CloudTrail.
//
// Starts the ingestion of live events on an event data store specified as either
// an ARN or the ID portion of the ARN. To start ingestion, the event data store
// Status must be STOPPED_INGESTION and the eventCategory must be Management,
// Data, or ConfigurationItem.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation StartEventDataStoreIngestion for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InvalidEventDataStoreStatusException
//     The event data store is not in a status that supports the operation.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - InvalidEventDataStoreCategoryException
//     This exception is thrown when event categories of specified event data stores
//     are not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartEventDataStoreIngestion
func (c *CloudTrail) StartEventDataStoreIngestion(input *StartEventDataStoreIngestionInput) (*StartEventDataStoreIngestionOutput, error) {
	req, out := c.StartEventDataStoreIngestionRequest(input)
	return out, req.Send()
}

// StartEventDataStoreIngestionWithContext is the same as StartEventDataStoreIngestion with the addition of
// the ability to pass a context and additional request options.
//
// See StartEventDataStoreIngestion for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) StartEventDataStoreIngestionWithContext(ctx aws.Context, input *StartEventDataStoreIngestionInput, opts ...request.Option) (*StartEventDataStoreIngestionOutput, error) {
	req, out := c.StartEventDataStoreIngestionRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opStartImport = "StartImport"

// StartImportRequest generates a "aws/request.Request" representing the
// client's request for the StartImport operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StartImport for more information on using the StartImport
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the StartImportRequest method.
//	req, resp := client.StartImportRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport
func (c *CloudTrail) StartImportRequest(input *StartImportInput) (req *request.Request, output *StartImportOutput) {
	op := &request.Operation{
		Name:       opStartImport,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &StartImportInput{}
	}

	output = &StartImportOutput{}
	req = c.newRequest(op, input, output)
	return
}

// StartImport API operation for AWS CloudTrail.
//
// Starts an import of logged trail events from a source S3 bucket to a destination
// event data store. By default, CloudTrail only imports events contained in
// the S3 bucket's CloudTrail prefix and the prefixes inside the CloudTrail
// prefix, and does not check prefixes for other Amazon Web Services services.
// If you want to import CloudTrail events contained in another prefix, you
// must include the prefix in the S3LocationUri. For more considerations about
// importing trail events, see Considerations (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-copy-trail-to-lake.html#cloudtrail-trail-copy-considerations).
//
// When you start a new import, the Destinations and ImportSource parameters
// are required. Before starting a new import, disable any access control lists
// (ACLs) attached to the source S3 bucket. For more information about disabling
// ACLs, see Controlling ownership of objects and disabling ACLs for your bucket
// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html).
//
// When you retry an import, the ImportID parameter is required.
//
// If the destination event data store is for an organization, you must use
// the management account to import trail events. You cannot use the delegated
// administrator account for the organization.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation StartImport for usage and error information.
//
// Returned Error Types:
//
//   - AccountHasOngoingImportException
//     This exception is thrown when you start a new import and a previous import
//     is still in progress.
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InvalidEventDataStoreStatusException
//     The event data store is not in a status that supports the operation.
//
//   - InvalidEventDataStoreCategoryException
//     This exception is thrown when event categories of specified event data stores
//     are not valid.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidImportSourceException
//     This exception is thrown when the provided source S3 bucket is not valid
//     for import.
//
//   - ImportNotFoundException
//     The specified import was not found.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartImport
func (c *CloudTrail) StartImport(input *StartImportInput) (*StartImportOutput, error) {
	req, out := c.StartImportRequest(input)
	return out, req.Send()
}

// StartImportWithContext is the same as StartImport with the addition of
// the ability to pass a context and additional request options.
//
// See StartImport for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) StartImportWithContext(ctx aws.Context, input *StartImportInput, opts ...request.Option) (*StartImportOutput, error) {
	req, out := c.StartImportRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opStartLogging = "StartLogging"

// StartLoggingRequest generates a "aws/request.Request" representing the
// client's request for the StartLogging operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StartLogging for more information on using the StartLogging
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the StartLoggingRequest method.
//	req, resp := client.StartLoggingRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput) {
	op := &request.Operation{
		Name:       opStartLogging,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &StartLoggingInput{}
	}

	output = &StartLoggingOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// StartLogging API operation for AWS CloudTrail.
//
// Starts the recording of Amazon Web Services API calls and log file delivery
// for a trail. For a trail that is enabled in all Regions, this operation must
// be called from the Region in which the trail was created. This operation
// cannot be called on the shadow trails (replicated trails in other Regions)
// of a trail that is enabled in all Regions.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation StartLogging for usage and error information.
//
// Returned Error Types:
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - InvalidHomeRegionException
//     This exception is thrown when an operation is called on a trail from a Region
//     other than the Region in which the trail was created.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) {
	req, out := c.StartLoggingRequest(input)
	return out, req.Send()
}

// StartLoggingWithContext is the same as StartLogging with the addition of
// the ability to pass a context and additional request options.
//
// See StartLogging for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error) {
	req, out := c.StartLoggingRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opStartQuery = "StartQuery"

// StartQueryRequest generates a "aws/request.Request" representing the
// client's request for the StartQuery operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StartQuery for more information on using the StartQuery
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the StartQueryRequest method.
//	req, resp := client.StartQueryRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery
func (c *CloudTrail) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) {
	op := &request.Operation{
		Name:       opStartQuery,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &StartQueryInput{}
	}

	output = &StartQueryOutput{}
	req = c.newRequest(op, input, output)
	return
}

// StartQuery API operation for AWS CloudTrail.
//
// Starts a CloudTrail Lake query. Use the QueryStatement parameter to provide
// your SQL query, enclosed in single quotation marks. Use the optional DeliveryS3Uri
// parameter to deliver the query results to an S3 bucket.
//
// StartQuery requires you specify either the QueryStatement parameter, or a
// QueryAlias and any QueryParameters. In the current release, the QueryAlias
// and QueryParameters parameters are used only for the queries that populate
// the CloudTrail Lake dashboards.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation StartQuery for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - InvalidQueryStatementException
//     The query that was submitted has validation errors, or uses incorrect syntax
//     or unsupported keywords. For more information about writing a query, see
//     Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
//     in the CloudTrail User Guide.
//
//   - MaxConcurrentQueriesException
//     You are already running the maximum number of concurrent queries. Wait a
//     minute for some queries to finish, and then run the query again.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - InvalidS3PrefixException
//     This exception is thrown when the provided S3 prefix is not valid.
//
//   - InvalidS3BucketNameException
//     This exception is thrown when the provided S3 bucket name is not valid.
//
//   - InsufficientS3BucketPolicyException
//     This exception is thrown when the policy on the S3 bucket is not sufficient.
//
//   - S3BucketDoesNotExistException
//     This exception is thrown when the specified S3 bucket does not exist.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartQuery
func (c *CloudTrail) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) {
	req, out := c.StartQueryRequest(input)
	return out, req.Send()
}

// StartQueryWithContext is the same as StartQuery with the addition of
// the ability to pass a context and additional request options.
//
// See StartQuery for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) {
	req, out := c.StartQueryRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opStopEventDataStoreIngestion = "StopEventDataStoreIngestion"

// StopEventDataStoreIngestionRequest generates a "aws/request.Request" representing the
// client's request for the StopEventDataStoreIngestion operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StopEventDataStoreIngestion for more information on using the StopEventDataStoreIngestion
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the StopEventDataStoreIngestionRequest method.
//	req, resp := client.StopEventDataStoreIngestionRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion
func (c *CloudTrail) StopEventDataStoreIngestionRequest(input *StopEventDataStoreIngestionInput) (req *request.Request, output *StopEventDataStoreIngestionOutput) {
	op := &request.Operation{
		Name:       opStopEventDataStoreIngestion,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &StopEventDataStoreIngestionInput{}
	}

	output = &StopEventDataStoreIngestionOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// StopEventDataStoreIngestion API operation for AWS CloudTrail.
//
// Stops the ingestion of live events on an event data store specified as either
// an ARN or the ID portion of the ARN. To stop ingestion, the event data store
// Status must be ENABLED and the eventCategory must be Management, Data, or
// ConfigurationItem.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation StopEventDataStoreIngestion for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InvalidEventDataStoreStatusException
//     The event data store is not in a status that supports the operation.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - InvalidEventDataStoreCategoryException
//     This exception is thrown when event categories of specified event data stores
//     are not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopEventDataStoreIngestion
func (c *CloudTrail) StopEventDataStoreIngestion(input *StopEventDataStoreIngestionInput) (*StopEventDataStoreIngestionOutput, error) {
	req, out := c.StopEventDataStoreIngestionRequest(input)
	return out, req.Send()
}

// StopEventDataStoreIngestionWithContext is the same as StopEventDataStoreIngestion with the addition of
// the ability to pass a context and additional request options.
//
// See StopEventDataStoreIngestion for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) StopEventDataStoreIngestionWithContext(ctx aws.Context, input *StopEventDataStoreIngestionInput, opts ...request.Option) (*StopEventDataStoreIngestionOutput, error) {
	req, out := c.StopEventDataStoreIngestionRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opStopImport = "StopImport"

// StopImportRequest generates a "aws/request.Request" representing the
// client's request for the StopImport operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StopImport for more information on using the StopImport
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the StopImportRequest method.
//	req, resp := client.StopImportRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport
func (c *CloudTrail) StopImportRequest(input *StopImportInput) (req *request.Request, output *StopImportOutput) {
	op := &request.Operation{
		Name:       opStopImport,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &StopImportInput{}
	}

	output = &StopImportOutput{}
	req = c.newRequest(op, input, output)
	return
}

// StopImport API operation for AWS CloudTrail.
//
// Stops a specified import.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation StopImport for usage and error information.
//
// Returned Error Types:
//
//   - ImportNotFoundException
//     The specified import was not found.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopImport
func (c *CloudTrail) StopImport(input *StopImportInput) (*StopImportOutput, error) {
	req, out := c.StopImportRequest(input)
	return out, req.Send()
}

// StopImportWithContext is the same as StopImport with the addition of
// the ability to pass a context and additional request options.
//
// See StopImport for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) StopImportWithContext(ctx aws.Context, input *StopImportInput, opts ...request.Option) (*StopImportOutput, error) {
	req, out := c.StopImportRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opStopLogging = "StopLogging"

// StopLoggingRequest generates a "aws/request.Request" representing the
// client's request for the StopLogging operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StopLogging for more information on using the StopLogging
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the StopLoggingRequest method.
//	req, resp := client.StopLoggingRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput) {
	op := &request.Operation{
		Name:       opStopLogging,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &StopLoggingInput{}
	}

	output = &StopLoggingOutput{}
	req = c.newRequest(op, input, output)
	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
	return
}

// StopLogging API operation for AWS CloudTrail.
//
// Suspends the recording of Amazon Web Services API calls and log file delivery
// for the specified trail. Under most circumstances, there is no need to use
// this action. You can update a trail without stopping it first. This action
// is the only way to stop recording. For a trail enabled in all Regions, this
// operation must be called from the Region in which the trail was created,
// or an InvalidHomeRegionException will occur. This operation cannot be called
// on the shadow trails (replicated trails in other Regions) of a trail enabled
// in all Regions.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation StopLogging for usage and error information.
//
// Returned Error Types:
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - InvalidHomeRegionException
//     This exception is thrown when an operation is called on a trail from a Region
//     other than the Region in which the trail was created.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) {
	req, out := c.StopLoggingRequest(input)
	return out, req.Send()
}

// StopLoggingWithContext is the same as StopLogging with the addition of
// the ability to pass a context and additional request options.
//
// See StopLogging for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error) {
	req, out := c.StopLoggingRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opUpdateChannel = "UpdateChannel"

// UpdateChannelRequest generates a "aws/request.Request" representing the
// client's request for the UpdateChannel operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateChannel for more information on using the UpdateChannel
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the UpdateChannelRequest method.
//	req, resp := client.UpdateChannelRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel
func (c *CloudTrail) UpdateChannelRequest(input *UpdateChannelInput) (req *request.Request, output *UpdateChannelOutput) {
	op := &request.Operation{
		Name:       opUpdateChannel,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &UpdateChannelInput{}
	}

	output = &UpdateChannelOutput{}
	req = c.newRequest(op, input, output)
	return
}

// UpdateChannel API operation for AWS CloudTrail.
//
// Updates a channel specified by a required channel ARN or UUID.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation UpdateChannel for usage and error information.
//
// Returned Error Types:
//
//   - ChannelARNInvalidException
//     This exception is thrown when the specified value of ChannelARN is not valid.
//
//   - ChannelNotFoundException
//     This exception is thrown when CloudTrail cannot find the specified channel.
//
//   - ChannelAlreadyExistsException
//     This exception is thrown when the provided channel already exists.
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InvalidEventDataStoreCategoryException
//     This exception is thrown when event categories of specified event data stores
//     are not valid.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateChannel
func (c *CloudTrail) UpdateChannel(input *UpdateChannelInput) (*UpdateChannelOutput, error) {
	req, out := c.UpdateChannelRequest(input)
	return out, req.Send()
}

// UpdateChannelWithContext is the same as UpdateChannel with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateChannel for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) UpdateChannelWithContext(ctx aws.Context, input *UpdateChannelInput, opts ...request.Option) (*UpdateChannelOutput, error) {
	req, out := c.UpdateChannelRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opUpdateEventDataStore = "UpdateEventDataStore"

// UpdateEventDataStoreRequest generates a "aws/request.Request" representing the
// client's request for the UpdateEventDataStore operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateEventDataStore for more information on using the UpdateEventDataStore
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the UpdateEventDataStoreRequest method.
//	req, resp := client.UpdateEventDataStoreRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore
func (c *CloudTrail) UpdateEventDataStoreRequest(input *UpdateEventDataStoreInput) (req *request.Request, output *UpdateEventDataStoreOutput) {
	op := &request.Operation{
		Name:       opUpdateEventDataStore,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &UpdateEventDataStoreInput{}
	}

	output = &UpdateEventDataStoreOutput{}
	req = c.newRequest(op, input, output)
	return
}

// UpdateEventDataStore API operation for AWS CloudTrail.
//
// Updates an event data store. The required EventDataStore value is an ARN
// or the ID portion of the ARN. Other parameters are optional, but at least
// one optional parameter must be specified, or CloudTrail throws an error.
// RetentionPeriod is in days, and valid values are integers between 90 and
// 2557. By default, TerminationProtection is enabled.
//
// For event data stores for CloudTrail events, AdvancedEventSelectors includes
// or excludes management and data events in your event data store. For more
// information about AdvancedEventSelectors, see AdvancedEventSelectors (https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedEventSelector.html).
//
// For event data stores for Config configuration items, Audit Manager evidence,
// or non-Amazon Web Services events, AdvancedEventSelectors includes events
// of that type in your event data store.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation UpdateEventDataStore for usage and error information.
//
// Returned Error Types:
//
//   - EventDataStoreAlreadyExistsException
//     An event data store with that name already exists.
//
//   - EventDataStoreARNInvalidException
//     The specified event data store ARN is not valid or does not map to an event
//     data store in your account.
//
//   - EventDataStoreNotFoundException
//     The specified event data store was not found.
//
//   - InvalidEventSelectorsException
//     This exception is thrown when the PutEventSelectors operation is called with
//     a number of event selectors, advanced event selectors, or data resources
//     that is not valid. The combination of event selectors or advanced event selectors
//     and data resources is not valid. A trail can have up to 5 event selectors.
//     If a trail uses advanced event selectors, a maximum of 500 total values for
//     all conditions in all advanced event selectors is allowed. A trail is limited
//     to 250 data resources. These data resources can be distributed across event
//     selectors, but the overall total cannot exceed 250.
//
//     You can:
//
//   - Specify a valid number of event selectors (1 to 5) for a trail.
//
//   - Specify a valid number of data resources (1 to 250) for an event selector.
//     The limit of number of resources on an individual event selector is configurable
//     up to 250. However, this upper limit is allowed only if the total number
//     of data resources does not exceed 250 across all event selectors for a
//     trail.
//
//   - Specify up to 500 values for all conditions in all advanced event selectors
//     for a trail.
//
//   - Specify a valid value for a parameter. For example, specifying the ReadWriteType
//     parameter with a value of read-only is not valid.
//
//   - EventDataStoreHasOngoingImportException
//     This exception is thrown when you try to update or delete an event data store
//     that currently has an import in progress.
//
//   - InactiveEventDataStoreException
//     The event data store is inactive.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - InvalidKmsKeyIdException
//     This exception is thrown when the KMS key ARN is not valid.
//
//   - KmsKeyNotFoundException
//     This exception is thrown when the KMS key does not exist, when the S3 bucket
//     and the KMS key are not in the same Region, or when the KMS key associated
//     with the Amazon SNS topic either does not exist or is not in the same Region.
//
//   - KmsException
//     This exception is thrown when there is an issue with the specified KMS key
//     and the trail or event data store can't be updated.
//
//   - AccessNotEnabledException
//     This exception is thrown when trusted access has not been enabled between
//     CloudTrail and Organizations. For more information, see Enabling Trusted
//     Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
//     and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
//   - OrganizationsNotInUseException
//     This exception is thrown when the request is made from an Amazon Web Services
//     account that is not a member of an organization. To make this request, sign
//     in using the credentials of an account that belongs to an organization.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - OrganizationNotInAllFeaturesModeException
//     This exception is thrown when Organizations is not configured to support
//     all features. All features must be enabled in Organizations to support creating
//     an organization trail or event data store.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateEventDataStore
func (c *CloudTrail) UpdateEventDataStore(input *UpdateEventDataStoreInput) (*UpdateEventDataStoreOutput, error) {
	req, out := c.UpdateEventDataStoreRequest(input)
	return out, req.Send()
}

// UpdateEventDataStoreWithContext is the same as UpdateEventDataStore with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateEventDataStore for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) UpdateEventDataStoreWithContext(ctx aws.Context, input *UpdateEventDataStoreInput, opts ...request.Option) (*UpdateEventDataStoreOutput, error) {
	req, out := c.UpdateEventDataStoreRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

const opUpdateTrail = "UpdateTrail"

// UpdateTrailRequest generates a "aws/request.Request" representing the
// client's request for the UpdateTrail operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateTrail for more information on using the UpdateTrail
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//	// Example sending a request using the UpdateTrailRequest method.
//	req, resp := client.UpdateTrailRequest(params)
//
//	err := req.Send()
//	if err == nil { // resp is now filled
//	    fmt.Println(resp)
//	}
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput) {
	op := &request.Operation{
		Name:       opUpdateTrail,
		HTTPMethod: "POST",
		HTTPPath:   "/",
	}

	if input == nil {
		input = &UpdateTrailInput{}
	}

	output = &UpdateTrailOutput{}
	req = c.newRequest(op, input, output)
	return
}

// UpdateTrail API operation for AWS CloudTrail.
//
// Updates trail settings that control what events you are logging, and how
// to handle log files. Changes to a trail do not require stopping the CloudTrail
// service. Use this action to designate an existing bucket for log delivery.
// If the existing bucket has previously been a target for CloudTrail log files,
// an IAM policy exists for the bucket. UpdateTrail must be called from the
// Region in which the trail was created; otherwise, an InvalidHomeRegionException
// is thrown.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS CloudTrail's
// API operation UpdateTrail for usage and error information.
//
// Returned Error Types:
//
//   - S3BucketDoesNotExistException
//     This exception is thrown when the specified S3 bucket does not exist.
//
//   - InsufficientS3BucketPolicyException
//     This exception is thrown when the policy on the S3 bucket is not sufficient.
//
//   - InsufficientSnsTopicPolicyException
//     This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
//
//   - InsufficientEncryptionPolicyException
//     This exception is thrown when the policy on the S3 bucket or KMS key does
//     not have sufficient permissions for the operation.
//
//   - TrailNotFoundException
//     This exception is thrown when the trail with the given name is not found.
//
//   - InvalidS3BucketNameException
//     This exception is thrown when the provided S3 bucket name is not valid.
//
//   - InvalidS3PrefixException
//     This exception is thrown when the provided S3 prefix is not valid.
//
//   - InvalidSnsTopicNameException
//     This exception is thrown when the provided SNS topic name is not valid.
//
//   - InvalidKmsKeyIdException
//     This exception is thrown when the KMS key ARN is not valid.
//
//   - InvalidTrailNameException
//     This exception is thrown when the provided trail name is not valid. Trail
//     names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
//
//   - TrailNotProvidedException
//     This exception is no longer in use.
//
//   - InvalidEventSelectorsException
//     This exception is thrown when the PutEventSelectors operation is called with
//     a number of event selectors, advanced event selectors, or data resources
//     that is not valid. The combination of event selectors or advanced event selectors
//     and data resources is not valid. A trail can have up to 5 event selectors.
//     If a trail uses advanced event selectors, a maximum of 500 total values for
//     all conditions in all advanced event selectors is allowed. A trail is limited
//     to 250 data resources. These data resources can be distributed across event
//     selectors, but the overall total cannot exceed 250.
//
//     You can:
//
//   - Specify a valid number of event selectors (1 to 5) for a trail.
//
//   - Specify a valid number of data resources (1 to 250) for an event selector.
//     The limit of number of resources on an individual event selector is configurable
//     up to 250. However, this upper limit is allowed only if the total number
//     of data resources does not exceed 250 across all event selectors for a
//     trail.
//
//   - Specify up to 500 values for all conditions in all advanced event selectors
//     for a trail.
//
//   - Specify a valid value for a parameter. For example, specifying the ReadWriteType
//     parameter with a value of read-only is not valid.
//
//   - ARNInvalidException
//     This exception is thrown when an operation is called with a trail ARN that
//     is not valid. The following is the format of a trail ARN.
//
//     arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
//     This exception is also thrown when you call AddTags or RemoveTags on a trail,
//     event data store, or channel with a resource ARN that is not valid.
//
//     The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
//     The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
//
//   - ConflictException
//     This exception is thrown when the specified resource is not ready for an
//     operation. This can occur when you try to run an operation on a resource
//     before CloudTrail has time to fully load the resource, or because another
//     operation is modifying the resource. If this exception occurs, wait a few
//     minutes, and then try the operation again.
//
//   - InvalidParameterCombinationException
//     This exception is thrown when the combination of parameters provided is not
//     valid.
//
//   - InvalidHomeRegionException
//     This exception is thrown when an operation is called on a trail from a Region
//     other than the Region in which the trail was created.
//
//   - KmsKeyNotFoundException
//     This exception is thrown when the KMS key does not exist, when the S3 bucket
//     and the KMS key are not in the same Region, or when the KMS key associated
//     with the Amazon SNS topic either does not exist or is not in the same Region.
//
//   - KmsKeyDisabledException
//     This exception is no longer in use.
//
//   - KmsException
//     This exception is thrown when there is an issue with the specified KMS key
//     and the trail or event data store can't be updated.
//
//   - InvalidCloudWatchLogsLogGroupArnException
//     This exception is thrown when the provided CloudWatch Logs log group is not
//     valid.
//
//   - InvalidCloudWatchLogsRoleArnException
//     This exception is thrown when the provided role is not valid.
//
//   - CloudWatchLogsDeliveryUnavailableException
//     Cannot set a CloudWatch Logs delivery for this Region.
//
//   - UnsupportedOperationException
//     This exception is thrown when the requested operation is not supported.
//
//   - OperationNotPermittedException
//     This exception is thrown when the requested operation is not permitted.
//
//   - AccessNotEnabledException
//     This exception is thrown when trusted access has not been enabled between
//     CloudTrail and Organizations. For more information, see Enabling Trusted
//     Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
//     and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
//
//   - InsufficientDependencyServiceAccessPermissionException
//     This exception is thrown when the IAM identity that is used to create the
//     organization resource lacks one or more required permissions for creating
//     an organization resource in a required service.
//
//   - OrganizationsNotInUseException
//     This exception is thrown when the request is made from an Amazon Web Services
//     account that is not a member of an organization. To make this request, sign
//     in using the credentials of an account that belongs to an organization.
//
//   - NotOrganizationMasterAccountException
//     This exception is thrown when the Amazon Web Services account making the
//     request to create or update an organization trail or event data store is
//     not the management account for an organization in Organizations. For more
//     information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
//     or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
//
//   - OrganizationNotInAllFeaturesModeException
//     This exception is thrown when Organizations is not configured to support
//     all features. All features must be enabled in Organizations to support creating
//     an organization trail or event data store.
//
//   - NoManagementAccountSLRExistsException
//     This exception is thrown when the management account does not have a service-linked
//     role.
//
//   - CloudTrailInvalidClientTokenIdException
//     This exception is thrown when a call results in the InvalidClientTokenId
//     error code. This can occur when you are creating or updating a trail to send
//     notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
//     account.
//
//   - InvalidParameterException
//     The request includes a parameter that is not valid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) {
	req, out := c.UpdateTrailRequest(input)
	return out, req.Send()
}

// UpdateTrailWithContext is the same as UpdateTrail with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateTrail for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error) {
	req, out := c.UpdateTrailRequest(input)
	req.SetContext(ctx)
	req.ApplyOptions(opts...)
	return out, req.Send()
}

// This exception is thrown when an operation is called with a trail ARN that
// is not valid. The following is the format of a trail ARN.
//
// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
//
// This exception is also thrown when you call AddTags or RemoveTags on a trail,
// event data store, or channel with a resource ARN that is not valid.
//
// The following is the format of an event data store ARN: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
//
// The following is the format of a channel ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
type ARNInvalidException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ARNInvalidException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ARNInvalidException) GoString() string {
	return s.String()
}

func newErrorARNInvalidException(v protocol.ResponseMetadata) error {
	return &ARNInvalidException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ARNInvalidException) Code() string {
	return "CloudTrailARNInvalidException"
}

// Message returns the exception's message.
func (s *ARNInvalidException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ARNInvalidException) OrigErr() error {
	return nil
}

func (s *ARNInvalidException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ARNInvalidException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ARNInvalidException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when trusted access has not been enabled between
// CloudTrail and Organizations. For more information, see Enabling Trusted
// Access with Other Amazon Web Services Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
type AccessNotEnabledException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccessNotEnabledException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccessNotEnabledException) GoString() string {
	return s.String()
}

func newErrorAccessNotEnabledException(v protocol.ResponseMetadata) error {
	return &AccessNotEnabledException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *AccessNotEnabledException) Code() string {
	return "CloudTrailAccessNotEnabledException"
}

// Message returns the exception's message.
func (s *AccessNotEnabledException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *AccessNotEnabledException) OrigErr() error {
	return nil
}

func (s *AccessNotEnabledException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *AccessNotEnabledException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *AccessNotEnabledException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when you start a new import and a previous import
// is still in progress.
type AccountHasOngoingImportException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountHasOngoingImportException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountHasOngoingImportException) GoString() string {
	return s.String()
}

func newErrorAccountHasOngoingImportException(v protocol.ResponseMetadata) error {
	return &AccountHasOngoingImportException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *AccountHasOngoingImportException) Code() string {
	return "AccountHasOngoingImportException"
}

// Message returns the exception's message.
func (s *AccountHasOngoingImportException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *AccountHasOngoingImportException) OrigErr() error {
	return nil
}

func (s *AccountHasOngoingImportException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *AccountHasOngoingImportException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *AccountHasOngoingImportException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified account is not found or not part
// of an organization.
type AccountNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountNotFoundException) GoString() string {
	return s.String()
}

func newErrorAccountNotFoundException(v protocol.ResponseMetadata) error {
	return &AccountNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *AccountNotFoundException) Code() string {
	return "AccountNotFoundException"
}

// Message returns the exception's message.
func (s *AccountNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *AccountNotFoundException) OrigErr() error {
	return nil
}

func (s *AccountNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *AccountNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *AccountNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified account is not registered as
// the CloudTrail delegated administrator.
type AccountNotRegisteredException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountNotRegisteredException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountNotRegisteredException) GoString() string {
	return s.String()
}

func newErrorAccountNotRegisteredException(v protocol.ResponseMetadata) error {
	return &AccountNotRegisteredException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *AccountNotRegisteredException) Code() string {
	return "AccountNotRegisteredException"
}

// Message returns the exception's message.
func (s *AccountNotRegisteredException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *AccountNotRegisteredException) OrigErr() error {
	return nil
}

func (s *AccountNotRegisteredException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *AccountNotRegisteredException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *AccountNotRegisteredException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the account is already registered as the CloudTrail
// delegated administrator.
type AccountRegisteredException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountRegisteredException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AccountRegisteredException) GoString() string {
	return s.String()
}

func newErrorAccountRegisteredException(v protocol.ResponseMetadata) error {
	return &AccountRegisteredException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *AccountRegisteredException) Code() string {
	return "AccountRegisteredException"
}

// Message returns the exception's message.
func (s *AccountRegisteredException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *AccountRegisteredException) OrigErr() error {
	return nil
}

func (s *AccountRegisteredException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *AccountRegisteredException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *AccountRegisteredException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Specifies the tags to add to a trail, event data store, or channel.
type AddTagsInput struct {
	_ struct{} `type:"structure"`

	// Specifies the ARN of the trail, event data store, or channel to which one
	// or more tags will be added.
	//
	// The format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// The format of an event data store ARN is: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
	//
	// The format of a channel ARN is: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
	//
	// ResourceId is a required field
	ResourceId *string `type:"string" required:"true"`

	// Contains a list of tags, up to a limit of 50
	//
	// TagsList is a required field
	TagsList []*Tag `type:"list" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AddTagsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AddTagsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AddTagsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
	if s.ResourceId == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceId"))
	}
	if s.TagsList == nil {
		invalidParams.Add(request.NewErrParamRequired("TagsList"))
	}
	if s.TagsList != nil {
		for i, v := range s.TagsList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetResourceId sets the ResourceId field's value.
func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput {
	s.ResourceId = &v
	return s
}

// SetTagsList sets the TagsList field's value.
func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput {
	s.TagsList = v
	return s
}

// Returns the objects or data if successful. Otherwise, returns an error.
type AddTagsOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AddTagsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AddTagsOutput) GoString() string {
	return s.String()
}

// Advanced event selectors let you create fine-grained selectors for the following
// CloudTrail event record fields. They help you control costs by logging only
// those events that are important to you. For more information about advanced
// event selectors, see Logging data events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
// in the CloudTrail User Guide.
//
//   - readOnly
//
//   - eventSource
//
//   - eventName
//
//   - eventCategory
//
//   - resources.type
//
//   - resources.ARN
//
// You cannot apply both event selectors and advanced event selectors to a trail.
type AdvancedEventSelector struct {
	_ struct{} `type:"structure"`

	// Contains all selector statements in an advanced event selector.
	//
	// FieldSelectors is a required field
	FieldSelectors []*AdvancedFieldSelector `min:"1" type:"list" required:"true"`

	// An optional, descriptive name for an advanced event selector, such as "Log
	// data events for only two S3 buckets".
	Name *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AdvancedEventSelector) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AdvancedEventSelector) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AdvancedEventSelector) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AdvancedEventSelector"}
	if s.FieldSelectors == nil {
		invalidParams.Add(request.NewErrParamRequired("FieldSelectors"))
	}
	if s.FieldSelectors != nil && len(s.FieldSelectors) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("FieldSelectors", 1))
	}
	if s.FieldSelectors != nil {
		for i, v := range s.FieldSelectors {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FieldSelectors", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetFieldSelectors sets the FieldSelectors field's value.
func (s *AdvancedEventSelector) SetFieldSelectors(v []*AdvancedFieldSelector) *AdvancedEventSelector {
	s.FieldSelectors = v
	return s
}

// SetName sets the Name field's value.
func (s *AdvancedEventSelector) SetName(v string) *AdvancedEventSelector {
	s.Name = &v
	return s
}

// A single selector statement in an advanced event selector.
type AdvancedFieldSelector struct {
	_ struct{} `type:"structure"`

	// An operator that includes events that match the last few characters of the
	// event record field specified as the value of Field.
	EndsWith []*string `min:"1" type:"list"`

	// An operator that includes events that match the exact value of the event
	// record field specified as the value of Field. This is the only valid operator
	// that you can use with the readOnly, eventCategory, and resources.type fields.
	Equals []*string `min:"1" type:"list"`

	// A field in a CloudTrail event record on which to filter events to be logged.
	// For event data stores for Config configuration items, Audit Manager evidence,
	// or non-Amazon Web Services events, the field is used only for selecting events
	// as filtering is not supported.
	//
	// For CloudTrail event records, supported fields include readOnly, eventCategory,
	// eventSource (for management events), eventName, resources.type, and resources.ARN.
	//
	// For event data stores for Config configuration items, Audit Manager evidence,
	// or non-Amazon Web Services events, the only supported field is eventCategory.
	//
	//    * readOnly - Optional. Can be set to Equals a value of true or false.
	//    If you do not add this field, CloudTrail logs both read and write events.
	//    A value of true logs only read events. A value of false logs only write
	//    events.
	//
	//    * eventSource - For filtering management events only. This can be set
	//    only to NotEquals kms.amazonaws.com.
	//
	//    * eventName - Can use any operator. You can use it to filter in or filter
	//    out any data event logged to CloudTrail, such as PutBucket or GetSnapshotBlock.
	//    You can have multiple values for this field, separated by commas.
	//
	//    * eventCategory - This is required and must be set to Equals. For CloudTrail
	//    event records, the value must be Management or Data. For Config configuration
	//    items, the value must be ConfigurationItem. For Audit Manager evidence,
	//    the value must be Evidence. For non-Amazon Web Services events, the value
	//    must be ActivityAuditLog.
	//
	//    * resources.type - This field is required for CloudTrail data events.
	//    resources.type can only use the Equals operator, and the value can be
	//    one of the following: AWS::DynamoDB::Table AWS::Lambda::Function AWS::S3::Object
	//    AWS::CloudTrail::Channel AWS::CodeWhisperer::Profile AWS::Cognito::IdentityPool
	//    AWS::DynamoDB::Stream AWS::EC2::Snapshot AWS::EMRWAL::Workspace AWS::FinSpace::Environment
	//    AWS::Glue::Table AWS::GuardDuty::Detector AWS::KendraRanking::ExecutionPlan
	//    AWS::ManagedBlockchain::Node AWS::SageMaker::ExperimentTrialComponent
	//    AWS::SageMaker::FeatureGroup AWS::S3::AccessPoint AWS::S3ObjectLambda::AccessPoint
	//    AWS::S3Outposts::Object You can have only one resources.type field per
	//    selector. To log data events on more than one resource type, add another
	//    selector.
	//
	//    * resources.ARN - You can use any operator with resources.ARN, but if
	//    you use Equals or NotEquals, the value must exactly match the ARN of a
	//    valid resource of the type you've specified in the template as the value
	//    of resources.type. For example, if resources.type equals AWS::S3::Object,
	//    the ARN must be in one of the following formats. To log all data events
	//    for all objects in a specific S3 bucket, use the StartsWith operator,
	//    and include only the bucket ARN as the matching value. The trailing slash
	//    is intentional; do not exclude it. Replace the text between less than
	//    and greater than symbols (<>) with resource-specific information. arn:<partition>:s3:::<bucket_name>/
	//    arn:<partition>:s3:::<bucket_name>/<object_path>/ When resources.type
	//    equals AWS::DynamoDB::Table, and the operator is set to Equals or NotEquals,
	//    the ARN must be in the following format: arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>
	//    When resources.type equals AWS::Lambda::Function, and the operator is
	//    set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:lambda:<region>:<account_ID>:function:<function_name>
	//    When resources.type equals AWS::CloudTrail::Channel, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:cloudtrail:<region>:<account_ID>:channel/<channel_UUID>
	//    When resources.type equals AWS::CodeWhisperer::Profile, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:codewhisperer:<region>:<account_ID>:profile/<profile_ID>
	//    When resources.type equals AWS::Cognito::IdentityPool, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:cognito-identity:<region>:<account_ID>:identitypool/<identity_pool_ID>
	//    When resources.type equals AWS::DynamoDB::Stream, and the operator is
	//    set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:dynamodb:<region>:<account_ID>:table/<table_name>/stream/<date_time>
	//    When resources.type equals AWS::EC2::Snapshot, and the operator is set
	//    to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:ec2:<region>::snapshot/<snapshot_ID>
	//    When resources.type equals AWS::EMRWAL::Workspace, and the operator is
	//    set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:emrwal:<region>::workspace/<workspace_name>
	//    When resources.type equals AWS::FinSpace::Environment, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:finspace:<region>:<account_ID>:environment/<environment_ID>
	//    When resources.type equals AWS::Glue::Table, and the operator is set to
	//    Equals or NotEquals, the ARN must be in the following format: arn:<partition>:glue:<region>:<account_ID>:table/<database_name>/<table_name>
	//    When resources.type equals AWS::GuardDuty::Detector, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:guardduty:<region>:<account_ID>:detector/<detector_ID>
	//    When resources.type equals AWS::KendraRanking::ExecutionPlan, and the
	//    operator is set to Equals or NotEquals, the ARN must be in the following
	//    format: arn:<partition>:kendra-ranking:<region>:<account_ID>:rescore-execution-plan/<rescore_execution_plan_ID>
	//    When resources.type equals AWS::ManagedBlockchain::Node, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:managedblockchain:<region>:<account_ID>:nodes/<node_ID>
	//    When resources.type equals AWS::SageMaker::ExperimentTrialComponent, and
	//    the operator is set to Equals or NotEquals, the ARN must be in the following
	//    format: arn:<partition>:sagemaker:<region>:<account_ID>:experiment-trial-component/<experiment_trial_component_name>
	//    When resources.type equals AWS::SageMaker::FeatureGroup, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:sagemaker:<region>:<account_ID>:feature-group/<feature_group_name>
	//    When resources.type equals AWS::S3::AccessPoint, and the operator is set
	//    to Equals or NotEquals, the ARN must be in one of the following formats.
	//    To log events on all objects in an S3 access point, we recommend that
	//    you use only the access point ARN, don’t include the object path, and
	//    use the StartsWith or NotStartsWith operators. arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>
	//    arn:<partition>:s3:<region>:<account_ID>:accesspoint/<access_point_name>/object/<object_path>
	//    When resources.type equals AWS::S3ObjectLambda::AccessPoint, and the operator
	//    is set to Equals or NotEquals, the ARN must be in the following format:
	//    arn:<partition>:s3-object-lambda:<region>:<account_ID>:accesspoint/<access_point_name>
	//    When resources.type equals AWS::S3Outposts::Object, and the operator is
	//    set to Equals or NotEquals, the ARN must be in the following format: arn:<partition>:s3-outposts:<region>:<account_ID>:<object_path>
	//
	// Field is a required field
	Field *string `min:"1" type:"string" required:"true"`

	// An operator that excludes events that match the last few characters of the
	// event record field specified as the value of Field.
	NotEndsWith []*string `min:"1" type:"list"`

	// An operator that excludes events that match the exact value of the event
	// record field specified as the value of Field.
	NotEquals []*string `min:"1" type:"list"`

	// An operator that excludes events that match the first few characters of the
	// event record field specified as the value of Field.
	NotStartsWith []*string `min:"1" type:"list"`

	// An operator that includes events that match the first few characters of the
	// event record field specified as the value of Field.
	StartsWith []*string `min:"1" type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AdvancedFieldSelector) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s AdvancedFieldSelector) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *AdvancedFieldSelector) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "AdvancedFieldSelector"}
	if s.EndsWith != nil && len(s.EndsWith) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("EndsWith", 1))
	}
	if s.Equals != nil && len(s.Equals) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Equals", 1))
	}
	if s.Field == nil {
		invalidParams.Add(request.NewErrParamRequired("Field"))
	}
	if s.Field != nil && len(*s.Field) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Field", 1))
	}
	if s.NotEndsWith != nil && len(s.NotEndsWith) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("NotEndsWith", 1))
	}
	if s.NotEquals != nil && len(s.NotEquals) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("NotEquals", 1))
	}
	if s.NotStartsWith != nil && len(s.NotStartsWith) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("NotStartsWith", 1))
	}
	if s.StartsWith != nil && len(s.StartsWith) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("StartsWith", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEndsWith sets the EndsWith field's value.
func (s *AdvancedFieldSelector) SetEndsWith(v []*string) *AdvancedFieldSelector {
	s.EndsWith = v
	return s
}

// SetEquals sets the Equals field's value.
func (s *AdvancedFieldSelector) SetEquals(v []*string) *AdvancedFieldSelector {
	s.Equals = v
	return s
}

// SetField sets the Field field's value.
func (s *AdvancedFieldSelector) SetField(v string) *AdvancedFieldSelector {
	s.Field = &v
	return s
}

// SetNotEndsWith sets the NotEndsWith field's value.
func (s *AdvancedFieldSelector) SetNotEndsWith(v []*string) *AdvancedFieldSelector {
	s.NotEndsWith = v
	return s
}

// SetNotEquals sets the NotEquals field's value.
func (s *AdvancedFieldSelector) SetNotEquals(v []*string) *AdvancedFieldSelector {
	s.NotEquals = v
	return s
}

// SetNotStartsWith sets the NotStartsWith field's value.
func (s *AdvancedFieldSelector) SetNotStartsWith(v []*string) *AdvancedFieldSelector {
	s.NotStartsWith = v
	return s
}

// SetStartsWith sets the StartsWith field's value.
func (s *AdvancedFieldSelector) SetStartsWith(v []*string) *AdvancedFieldSelector {
	s.StartsWith = v
	return s
}

type CancelQueryInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or the ID suffix of the ARN) of an event data store on which the
	// specified query is running.
	//
	// Deprecated: EventDataStore is no longer required by CancelQueryRequest
	EventDataStore *string `min:"3" deprecated:"true" type:"string"`

	// The ID of the query that you want to cancel. The QueryId comes from the response
	// of a StartQuery operation.
	//
	// QueryId is a required field
	QueryId *string `min:"36" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CancelQueryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CancelQueryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CancelQueryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CancelQueryInput"}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}
	if s.QueryId == nil {
		invalidParams.Add(request.NewErrParamRequired("QueryId"))
	}
	if s.QueryId != nil && len(*s.QueryId) < 36 {
		invalidParams.Add(request.NewErrParamMinLen("QueryId", 36))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *CancelQueryInput) SetEventDataStore(v string) *CancelQueryInput {
	s.EventDataStore = &v
	return s
}

// SetQueryId sets the QueryId field's value.
func (s *CancelQueryInput) SetQueryId(v string) *CancelQueryInput {
	s.QueryId = &v
	return s
}

type CancelQueryOutput struct {
	_ struct{} `type:"structure"`

	// The ID of the canceled query.
	//
	// QueryId is a required field
	QueryId *string `min:"36" type:"string" required:"true"`

	// Shows the status of a query after a CancelQuery request. Typically, the values
	// shown are either RUNNING or CANCELLED.
	//
	// QueryStatus is a required field
	QueryStatus *string `type:"string" required:"true" enum:"QueryStatus"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CancelQueryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CancelQueryOutput) GoString() string {
	return s.String()
}

// SetQueryId sets the QueryId field's value.
func (s *CancelQueryOutput) SetQueryId(v string) *CancelQueryOutput {
	s.QueryId = &v
	return s
}

// SetQueryStatus sets the QueryStatus field's value.
func (s *CancelQueryOutput) SetQueryStatus(v string) *CancelQueryOutput {
	s.QueryStatus = &v
	return s
}

// This exception is thrown when the management account of an organization is
// registered as the CloudTrail delegated administrator.
type CannotDelegateManagementAccountException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CannotDelegateManagementAccountException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CannotDelegateManagementAccountException) GoString() string {
	return s.String()
}

func newErrorCannotDelegateManagementAccountException(v protocol.ResponseMetadata) error {
	return &CannotDelegateManagementAccountException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *CannotDelegateManagementAccountException) Code() string {
	return "CannotDelegateManagementAccountException"
}

// Message returns the exception's message.
func (s *CannotDelegateManagementAccountException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CannotDelegateManagementAccountException) OrigErr() error {
	return nil
}

func (s *CannotDelegateManagementAccountException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *CannotDelegateManagementAccountException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *CannotDelegateManagementAccountException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Contains information about a returned CloudTrail channel.
type Channel struct {
	_ struct{} `type:"structure"`

	// The Amazon Resource Name (ARN) of a channel.
	ChannelArn *string `min:"3" type:"string"`

	// The name of the CloudTrail channel. For service-linked channels, the name
	// is aws-service-channel/service-name/custom-suffix where service-name represents
	// the name of the Amazon Web Services service that created the channel and
	// custom-suffix represents the suffix created by the Amazon Web Services service.
	Name *string `min:"3" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Channel) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Channel) GoString() string {
	return s.String()
}

// SetChannelArn sets the ChannelArn field's value.
func (s *Channel) SetChannelArn(v string) *Channel {
	s.ChannelArn = &v
	return s
}

// SetName sets the Name field's value.
func (s *Channel) SetName(v string) *Channel {
	s.Name = &v
	return s
}

// This exception is thrown when the specified value of ChannelARN is not valid.
type ChannelARNInvalidException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelARNInvalidException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelARNInvalidException) GoString() string {
	return s.String()
}

func newErrorChannelARNInvalidException(v protocol.ResponseMetadata) error {
	return &ChannelARNInvalidException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ChannelARNInvalidException) Code() string {
	return "ChannelARNInvalidException"
}

// Message returns the exception's message.
func (s *ChannelARNInvalidException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ChannelARNInvalidException) OrigErr() error {
	return nil
}

func (s *ChannelARNInvalidException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ChannelARNInvalidException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ChannelARNInvalidException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided channel already exists.
type ChannelAlreadyExistsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelAlreadyExistsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelAlreadyExistsException) GoString() string {
	return s.String()
}

func newErrorChannelAlreadyExistsException(v protocol.ResponseMetadata) error {
	return &ChannelAlreadyExistsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ChannelAlreadyExistsException) Code() string {
	return "ChannelAlreadyExistsException"
}

// Message returns the exception's message.
func (s *ChannelAlreadyExistsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ChannelAlreadyExistsException) OrigErr() error {
	return nil
}

func (s *ChannelAlreadyExistsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ChannelAlreadyExistsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ChannelAlreadyExistsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified event data store cannot yet be
// deleted because it is in use by a channel.
type ChannelExistsForEDSException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelExistsForEDSException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelExistsForEDSException) GoString() string {
	return s.String()
}

func newErrorChannelExistsForEDSException(v protocol.ResponseMetadata) error {
	return &ChannelExistsForEDSException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ChannelExistsForEDSException) Code() string {
	return "ChannelExistsForEDSException"
}

// Message returns the exception's message.
func (s *ChannelExistsForEDSException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ChannelExistsForEDSException) OrigErr() error {
	return nil
}

func (s *ChannelExistsForEDSException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ChannelExistsForEDSException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ChannelExistsForEDSException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the maximum number of channels limit is exceeded.
type ChannelMaxLimitExceededException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelMaxLimitExceededException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelMaxLimitExceededException) GoString() string {
	return s.String()
}

func newErrorChannelMaxLimitExceededException(v protocol.ResponseMetadata) error {
	return &ChannelMaxLimitExceededException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ChannelMaxLimitExceededException) Code() string {
	return "ChannelMaxLimitExceededException"
}

// Message returns the exception's message.
func (s *ChannelMaxLimitExceededException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ChannelMaxLimitExceededException) OrigErr() error {
	return nil
}

func (s *ChannelMaxLimitExceededException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ChannelMaxLimitExceededException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ChannelMaxLimitExceededException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when CloudTrail cannot find the specified channel.
type ChannelNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ChannelNotFoundException) GoString() string {
	return s.String()
}

func newErrorChannelNotFoundException(v protocol.ResponseMetadata) error {
	return &ChannelNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ChannelNotFoundException) Code() string {
	return "ChannelNotFoundException"
}

// Message returns the exception's message.
func (s *ChannelNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ChannelNotFoundException) OrigErr() error {
	return nil
}

func (s *ChannelNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ChannelNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ChannelNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when a call results in the InvalidClientTokenId
// error code. This can occur when you are creating or updating a trail to send
// notifications to an Amazon SNS topic that is in a suspended Amazon Web Services
// account.
type CloudTrailInvalidClientTokenIdException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CloudTrailInvalidClientTokenIdException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CloudTrailInvalidClientTokenIdException) GoString() string {
	return s.String()
}

func newErrorCloudTrailInvalidClientTokenIdException(v protocol.ResponseMetadata) error {
	return &CloudTrailInvalidClientTokenIdException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *CloudTrailInvalidClientTokenIdException) Code() string {
	return "CloudTrailInvalidClientTokenIdException"
}

// Message returns the exception's message.
func (s *CloudTrailInvalidClientTokenIdException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudTrailInvalidClientTokenIdException) OrigErr() error {
	return nil
}

func (s *CloudTrailInvalidClientTokenIdException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *CloudTrailInvalidClientTokenIdException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *CloudTrailInvalidClientTokenIdException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Cannot set a CloudWatch Logs delivery for this Region.
type CloudWatchLogsDeliveryUnavailableException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CloudWatchLogsDeliveryUnavailableException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CloudWatchLogsDeliveryUnavailableException) GoString() string {
	return s.String()
}

func newErrorCloudWatchLogsDeliveryUnavailableException(v protocol.ResponseMetadata) error {
	return &CloudWatchLogsDeliveryUnavailableException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *CloudWatchLogsDeliveryUnavailableException) Code() string {
	return "CloudWatchLogsDeliveryUnavailableException"
}

// Message returns the exception's message.
func (s *CloudWatchLogsDeliveryUnavailableException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *CloudWatchLogsDeliveryUnavailableException) OrigErr() error {
	return nil
}

func (s *CloudWatchLogsDeliveryUnavailableException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *CloudWatchLogsDeliveryUnavailableException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *CloudWatchLogsDeliveryUnavailableException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified resource is not ready for an
// operation. This can occur when you try to run an operation on a resource
// before CloudTrail has time to fully load the resource, or because another
// operation is modifying the resource. If this exception occurs, wait a few
// minutes, and then try the operation again.
type ConflictException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ConflictException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ConflictException) GoString() string {
	return s.String()
}

func newErrorConflictException(v protocol.ResponseMetadata) error {
	return &ConflictException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ConflictException) Code() string {
	return "ConflictException"
}

// Message returns the exception's message.
func (s *ConflictException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ConflictException) OrigErr() error {
	return nil
}

func (s *ConflictException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ConflictException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ConflictException) RequestID() string {
	return s.RespMetadata.RequestID
}

type CreateChannelInput struct {
	_ struct{} `type:"structure"`

	// One or more event data stores to which events arriving through a channel
	// will be logged.
	//
	// Destinations is a required field
	Destinations []*Destination `min:"1" type:"list" required:"true"`

	// The name of the channel.
	//
	// Name is a required field
	Name *string `min:"3" type:"string" required:"true"`

	// The name of the partner or external event source. You cannot change this
	// name after you create the channel. A maximum of one channel is allowed per
	// source.
	//
	// A source can be either Custom for all valid non-Amazon Web Services events,
	// or the name of a partner event source. For information about the source names
	// for available partners, see Additional information about integration partners
	// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store-integration.html#cloudtrail-lake-partner-information)
	// in the CloudTrail User Guide.
	//
	// Source is a required field
	Source *string `min:"1" type:"string" required:"true"`

	// A list of tags.
	Tags []*Tag `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateChannelInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateChannelInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateChannelInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateChannelInput"}
	if s.Destinations == nil {
		invalidParams.Add(request.NewErrParamRequired("Destinations"))
	}
	if s.Destinations != nil && len(s.Destinations) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Destinations", 1))
	}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 3))
	}
	if s.Source == nil {
		invalidParams.Add(request.NewErrParamRequired("Source"))
	}
	if s.Source != nil && len(*s.Source) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Source", 1))
	}
	if s.Destinations != nil {
		for i, v := range s.Destinations {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.Tags != nil {
		for i, v := range s.Tags {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDestinations sets the Destinations field's value.
func (s *CreateChannelInput) SetDestinations(v []*Destination) *CreateChannelInput {
	s.Destinations = v
	return s
}

// SetName sets the Name field's value.
func (s *CreateChannelInput) SetName(v string) *CreateChannelInput {
	s.Name = &v
	return s
}

// SetSource sets the Source field's value.
func (s *CreateChannelInput) SetSource(v string) *CreateChannelInput {
	s.Source = &v
	return s
}

// SetTags sets the Tags field's value.
func (s *CreateChannelInput) SetTags(v []*Tag) *CreateChannelInput {
	s.Tags = v
	return s
}

type CreateChannelOutput struct {
	_ struct{} `type:"structure"`

	// The Amazon Resource Name (ARN) of the new channel.
	ChannelArn *string `min:"3" type:"string"`

	// The event data stores that log the events arriving through the channel.
	Destinations []*Destination `min:"1" type:"list"`

	// The name of the new channel.
	Name *string `min:"3" type:"string"`

	// The partner or external event source name.
	Source *string `min:"1" type:"string"`

	// A list of tags.
	Tags []*Tag `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateChannelOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateChannelOutput) GoString() string {
	return s.String()
}

// SetChannelArn sets the ChannelArn field's value.
func (s *CreateChannelOutput) SetChannelArn(v string) *CreateChannelOutput {
	s.ChannelArn = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *CreateChannelOutput) SetDestinations(v []*Destination) *CreateChannelOutput {
	s.Destinations = v
	return s
}

// SetName sets the Name field's value.
func (s *CreateChannelOutput) SetName(v string) *CreateChannelOutput {
	s.Name = &v
	return s
}

// SetSource sets the Source field's value.
func (s *CreateChannelOutput) SetSource(v string) *CreateChannelOutput {
	s.Source = &v
	return s
}

// SetTags sets the Tags field's value.
func (s *CreateChannelOutput) SetTags(v []*Tag) *CreateChannelOutput {
	s.Tags = v
	return s
}

type CreateEventDataStoreInput struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors to use to select the events for the data store.
	// You can configure up to five advanced event selectors for each event data
	// store.
	//
	// For more information about how to use advanced event selectors to log CloudTrail
	// events, see Log events by using advanced event selectors (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced)
	// in the CloudTrail User Guide.
	//
	// For more information about how to use advanced event selectors to include
	// Config configuration items in your event data store, see Create an event
	// data store for Config configuration items (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-lake-cli.html#lake-cli-create-eds-config)
	// in the CloudTrail User Guide.
	//
	// For more information about how to use advanced event selectors to include
	// non-Amazon Web Services events in your event data store, see Create an integration
	// to log events from outside Amazon Web Services (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-lake-cli.html#lake-cli-create-integration)
	// in the CloudTrail User Guide.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail.
	// The value can be an alias name prefixed by alias/, a fully specified ARN
	// to an alias, a fully specified ARN to a key, or a globally unique identifier.
	//
	// Disabling or deleting the KMS key, or removing CloudTrail permissions on
	// the key, prevents CloudTrail from logging events to the event data store,
	// and prevents users from querying the data in the event data store that was
	// encrypted with the key. After you associate an event data store with a KMS
	// key, the KMS key cannot be removed or changed. Before you disable or delete
	// a KMS key that you are using with an event data store, delete or back up
	// your event data store.
	//
	// CloudTrail also supports KMS multi-Region keys. For more information about
	// multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
	// in the Key Management Service Developer Guide.
	//
	// Examples:
	//
	//    * alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	//
	//    * 12345678-1234-1234-1234-123456789012
	KmsKeyId *string `min:"1" type:"string"`

	// Specifies whether the event data store includes events from all Regions,
	// or only from the Region in which the event data store is created.
	MultiRegionEnabled *bool `type:"boolean"`

	// The name of the event data store.
	//
	// Name is a required field
	Name *string `min:"3" type:"string" required:"true"`

	// Specifies whether an event data store collects events logged for an organization
	// in Organizations.
	OrganizationEnabled *bool `type:"boolean"`

	// The retention period of the event data store, in days. You can set a retention
	// period of up to 2557 days, the equivalent of seven years.
	RetentionPeriod *int64 `min:"7" type:"integer"`

	// Specifies whether the event data store should start ingesting live events.
	// The default is true.
	StartIngestion *bool `type:"boolean"`

	// A list of tags.
	TagsList []*Tag `type:"list"`

	// Specifies whether termination protection is enabled for the event data store.
	// If termination protection is enabled, you cannot delete the event data store
	// until termination protection is disabled.
	TerminationProtectionEnabled *bool `type:"boolean"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateEventDataStoreInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateEventDataStoreInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateEventDataStoreInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateEventDataStoreInput"}
	if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1))
	}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.Name != nil && len(*s.Name) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 3))
	}
	if s.RetentionPeriod != nil && *s.RetentionPeriod < 7 {
		invalidParams.Add(request.NewErrParamMinValue("RetentionPeriod", 7))
	}
	if s.AdvancedEventSelectors != nil {
		for i, v := range s.AdvancedEventSelectors {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
			}
		}
	}
	if s.TagsList != nil {
		for i, v := range s.TagsList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *CreateEventDataStoreInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *CreateEventDataStoreInput {
	s.AdvancedEventSelectors = v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *CreateEventDataStoreInput) SetKmsKeyId(v string) *CreateEventDataStoreInput {
	s.KmsKeyId = &v
	return s
}

// SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
func (s *CreateEventDataStoreInput) SetMultiRegionEnabled(v bool) *CreateEventDataStoreInput {
	s.MultiRegionEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *CreateEventDataStoreInput) SetName(v string) *CreateEventDataStoreInput {
	s.Name = &v
	return s
}

// SetOrganizationEnabled sets the OrganizationEnabled field's value.
func (s *CreateEventDataStoreInput) SetOrganizationEnabled(v bool) *CreateEventDataStoreInput {
	s.OrganizationEnabled = &v
	return s
}

// SetRetentionPeriod sets the RetentionPeriod field's value.
func (s *CreateEventDataStoreInput) SetRetentionPeriod(v int64) *CreateEventDataStoreInput {
	s.RetentionPeriod = &v
	return s
}

// SetStartIngestion sets the StartIngestion field's value.
func (s *CreateEventDataStoreInput) SetStartIngestion(v bool) *CreateEventDataStoreInput {
	s.StartIngestion = &v
	return s
}

// SetTagsList sets the TagsList field's value.
func (s *CreateEventDataStoreInput) SetTagsList(v []*Tag) *CreateEventDataStoreInput {
	s.TagsList = v
	return s
}

// SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
func (s *CreateEventDataStoreInput) SetTerminationProtectionEnabled(v bool) *CreateEventDataStoreInput {
	s.TerminationProtectionEnabled = &v
	return s
}

type CreateEventDataStoreOutput struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors that were used to select the events for the
	// data store.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// The timestamp that shows when the event data store was created.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The ARN of the event data store.
	EventDataStoreArn *string `min:"3" type:"string"`

	// Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
	// The value is a fully specified ARN to a KMS key in the following format.
	//
	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `min:"1" type:"string"`

	// Indicates whether the event data store collects events from all Regions,
	// or only from the Region in which it was created.
	MultiRegionEnabled *bool `type:"boolean"`

	// The name of the event data store.
	Name *string `min:"3" type:"string"`

	// Indicates whether an event data store is collecting logged events for an
	// organization in Organizations.
	OrganizationEnabled *bool `type:"boolean"`

	// The retention period of an event data store, in days.
	RetentionPeriod *int64 `min:"7" type:"integer"`

	// The status of event data store creation.
	Status *string `type:"string" enum:"EventDataStoreStatus"`

	// A list of tags.
	TagsList []*Tag `type:"list"`

	// Indicates whether termination protection is enabled for the event data store.
	TerminationProtectionEnabled *bool `type:"boolean"`

	// The timestamp that shows when an event data store was updated, if applicable.
	// UpdatedTimestamp is always either the same or newer than the time shown in
	// CreatedTimestamp.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateEventDataStoreOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateEventDataStoreOutput) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *CreateEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *CreateEventDataStoreOutput {
	s.AdvancedEventSelectors = v
	return s
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *CreateEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *CreateEventDataStoreOutput {
	s.CreatedTimestamp = &v
	return s
}

// SetEventDataStoreArn sets the EventDataStoreArn field's value.
func (s *CreateEventDataStoreOutput) SetEventDataStoreArn(v string) *CreateEventDataStoreOutput {
	s.EventDataStoreArn = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *CreateEventDataStoreOutput) SetKmsKeyId(v string) *CreateEventDataStoreOutput {
	s.KmsKeyId = &v
	return s
}

// SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
func (s *CreateEventDataStoreOutput) SetMultiRegionEnabled(v bool) *CreateEventDataStoreOutput {
	s.MultiRegionEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *CreateEventDataStoreOutput) SetName(v string) *CreateEventDataStoreOutput {
	s.Name = &v
	return s
}

// SetOrganizationEnabled sets the OrganizationEnabled field's value.
func (s *CreateEventDataStoreOutput) SetOrganizationEnabled(v bool) *CreateEventDataStoreOutput {
	s.OrganizationEnabled = &v
	return s
}

// SetRetentionPeriod sets the RetentionPeriod field's value.
func (s *CreateEventDataStoreOutput) SetRetentionPeriod(v int64) *CreateEventDataStoreOutput {
	s.RetentionPeriod = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *CreateEventDataStoreOutput) SetStatus(v string) *CreateEventDataStoreOutput {
	s.Status = &v
	return s
}

// SetTagsList sets the TagsList field's value.
func (s *CreateEventDataStoreOutput) SetTagsList(v []*Tag) *CreateEventDataStoreOutput {
	s.TagsList = v
	return s
}

// SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
func (s *CreateEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *CreateEventDataStoreOutput {
	s.TerminationProtectionEnabled = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *CreateEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *CreateEventDataStoreOutput {
	s.UpdatedTimestamp = &v
	return s
}

// Specifies the settings for each trail.
type CreateTrailInput struct {
	_ struct{} `type:"structure"`

	// Specifies a log group name using an Amazon Resource Name (ARN), a unique
	// identifier that represents the log group to which CloudTrail logs will be
	// delivered. You must use a log group that exists in your account.
	//
	// Not required unless you specify CloudWatchLogsRoleArn.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group. You must use a role that exists in your account.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether log file integrity validation is enabled. The default is
	// false.
	//
	// When you disable log file integrity validation, the chain of digest files
	// is broken after one hour. CloudTrail does not create digest files for log
	// files that were delivered during a period in which log file integrity validation
	// was disabled. For example, if you enable log file integrity validation at
	// noon on January 1, disable it at noon on January 2, and re-enable it at noon
	// on January 10, digest files will not be created for the log files delivered
	// from noon on January 2 to noon on January 10. The same applies whenever you
	// stop CloudTrail logging or delete a trail.
	EnableLogFileValidation *bool `type:"boolean"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail is created in the current Region or in all Regions.
	// The default is false, which creates a trail only in the Region where you
	// are signed in. As a best practice, consider creating trails that log events
	// in all Regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is created for all accounts in an organization
	// in Organizations, or only for the current Amazon Web Services account. The
	// default is false, and cannot be true unless the call is made on behalf of
	// an Amazon Web Services account that is the management account or delegated
	// administrator account for an organization in Organizations.
	IsOrganizationTrail *bool `type:"boolean"`

	// Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
	// The value can be an alias name prefixed by alias/, a fully specified ARN
	// to an alias, a fully specified ARN to a key, or a globally unique identifier.
	//
	// CloudTrail also supports KMS multi-Region keys. For more information about
	// multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
	// in the Key Management Service Developer Guide.
	//
	// Examples:
	//
	//    * alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	//
	//    * 12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies the name of the trail. The name must meet the following requirements:
	//
	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
	//    (_), or dashes (-)
	//
	//    * Start with a letter or number, and end with a letter or number
	//
	//    * Be between 3 and 128 characters
	//
	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
	//    and my--namespace are not valid.
	//
	//    * Not be in IP address format (for example, 192.168.5.4)
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
	//
	// S3BucketName is a required field
	S3BucketName *string `type:"string" required:"true"`

	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
	// you have designated for log file delivery. For more information, see Finding
	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	// The maximum length is 200 characters.
	S3KeyPrefix *string `type:"string"`

	// Specifies the name of the Amazon SNS topic defined for notification of log
	// file delivery. The maximum length is 256 characters.
	SnsTopicName *string `type:"string"`

	// A list of tags.
	TagsList []*Tag `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateTrailInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateTrailInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateTrailInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}
	if s.S3BucketName == nil {
		invalidParams.Add(request.NewErrParamRequired("S3BucketName"))
	}
	if s.TagsList != nil {
		for i, v := range s.TagsList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput {
	s.CloudWatchLogsLogGroupArn = &v
	return s
}

// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput {
	s.CloudWatchLogsRoleArn = &v
	return s
}

// SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput {
	s.EnableLogFileValidation = &v
	return s
}

// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput {
	s.IncludeGlobalServiceEvents = &v
	return s
}

// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput {
	s.IsMultiRegionTrail = &v
	return s
}

// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
func (s *CreateTrailInput) SetIsOrganizationTrail(v bool) *CreateTrailInput {
	s.IsOrganizationTrail = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput {
	s.KmsKeyId = &v
	return s
}

// SetName sets the Name field's value.
func (s *CreateTrailInput) SetName(v string) *CreateTrailInput {
	s.Name = &v
	return s
}

// SetS3BucketName sets the S3BucketName field's value.
func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput {
	s.S3BucketName = &v
	return s
}

// SetS3KeyPrefix sets the S3KeyPrefix field's value.
func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput {
	s.S3KeyPrefix = &v
	return s
}

// SetSnsTopicName sets the SnsTopicName field's value.
func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput {
	s.SnsTopicName = &v
	return s
}

// SetTagsList sets the TagsList field's value.
func (s *CreateTrailInput) SetTagsList(v []*Tag) *CreateTrailInput {
	s.TagsList = v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type CreateTrailOutput struct {
	_ struct{} `type:"structure"`

	// Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
	// logs will be delivered.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail exists in one Region or in all Regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is an organization trail.
	IsOrganizationTrail *bool `type:"boolean"`

	// Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
	// The value is a fully specified ARN to a KMS key in the following format.
	//
	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies whether log file integrity validation is enabled.
	LogFileValidationEnabled *bool `type:"boolean"`

	// Specifies the name of the trail.
	Name *string `type:"string"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files.
	S3BucketName *string `type:"string"`

	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
	// you have designated for log file delivery. For more information, see Finding
	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	S3KeyPrefix *string `type:"string"`

	// Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
	// when log files are delivered. The format of a topic ARN is:
	//
	// arn:aws:sns:us-east-2:123456789012:MyTopic
	SnsTopicARN *string `type:"string"`

	// This field is no longer in use. Use SnsTopicARN.
	//
	// Deprecated: SnsTopicName has been deprecated
	SnsTopicName *string `deprecated:"true" type:"string"`

	// Specifies the ARN of the trail that was created. The format of a trail ARN
	// is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateTrailOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s CreateTrailOutput) GoString() string {
	return s.String()
}

// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput {
	s.CloudWatchLogsLogGroupArn = &v
	return s
}

// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput {
	s.CloudWatchLogsRoleArn = &v
	return s
}

// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput {
	s.IncludeGlobalServiceEvents = &v
	return s
}

// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput {
	s.IsMultiRegionTrail = &v
	return s
}

// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
func (s *CreateTrailOutput) SetIsOrganizationTrail(v bool) *CreateTrailOutput {
	s.IsOrganizationTrail = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput {
	s.KmsKeyId = &v
	return s
}

// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput {
	s.LogFileValidationEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput {
	s.Name = &v
	return s
}

// SetS3BucketName sets the S3BucketName field's value.
func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput {
	s.S3BucketName = &v
	return s
}

// SetS3KeyPrefix sets the S3KeyPrefix field's value.
func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput {
	s.S3KeyPrefix = &v
	return s
}

// SetSnsTopicARN sets the SnsTopicARN field's value.
func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput {
	s.SnsTopicARN = &v
	return s
}

// SetSnsTopicName sets the SnsTopicName field's value.
func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput {
	s.SnsTopicName = &v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput {
	s.TrailARN = &v
	return s
}

// The Amazon S3 buckets, Lambda functions, or Amazon DynamoDB tables that you
// specify in your event selectors for your trail to log data events. Data events
// provide information about the resource operations performed on or within
// a resource itself. These are also known as data plane operations. You can
// specify up to 250 data resources for a trail.
//
// The total number of allowed data resources is 250. This number can be distributed
// between 1 and 5 event selectors, but the total cannot exceed 250 across all
// selectors for the trail.
//
// If you are using advanced event selectors, the maximum total number of values
// for all conditions, across all advanced event selectors for the trail, is
// 500.
//
// The following example demonstrates how logging works when you configure logging
// of all data events for an S3 bucket named bucket-1. In this example, the
// CloudTrail user specified an empty prefix, and the option to log both Read
// and Write data events.
//
// A user uploads an image file to bucket-1.
//
// The PutObject API operation is an Amazon S3 object-level API. It is recorded
// as a data event in CloudTrail. Because the CloudTrail user specified an S3
// bucket with an empty prefix, events that occur on any object in that bucket
// are logged. The trail processes and logs the event.
//
// A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2.
//
// The PutObject API operation occurred for an object in an S3 bucket that the
// CloudTrail user didn't specify for the trail. The trail doesn’t log the
// event.
//
// The following example demonstrates how logging works when you configure logging
// of Lambda data events for a Lambda function named MyLambdaFunction, but not
// for all Lambda functions.
//
// A user runs a script that includes a call to the MyLambdaFunction function
// and the MyOtherLambdaFunction function.
//
// The Invoke API operation on MyLambdaFunction is an Lambda API. It is recorded
// as a data event in CloudTrail. Because the CloudTrail user specified logging
// data events for MyLambdaFunction, any invocations of that function are logged.
// The trail processes and logs the event.
//
// The Invoke API operation on MyOtherLambdaFunction is an Lambda API. Because
// the CloudTrail user did not specify logging data events for all Lambda functions,
// the Invoke operation for MyOtherLambdaFunction does not match the function
// specified for the trail. The trail doesn’t log the event.
type DataResource struct {
	_ struct{} `type:"structure"`

	// The resource type in which you want to log data events. You can specify the
	// following basic event selector resource types:
	//
	//    * AWS::DynamoDB::Table
	//
	//    * AWS::Lambda::Function
	//
	//    * AWS::S3::Object
	//
	// The following resource types are also available through advanced event selectors.
	// Basic event selector resource types are valid in advanced event selectors,
	// but advanced event selector resource types are not valid in basic event selectors.
	// For more information, see AdvancedFieldSelector (https://docs.aws.amazon.com/awscloudtrail/latest/APIReference/API_AdvancedFieldSelector.html).
	//
	//    * AWS::CloudTrail::Channel
	//
	//    * AWS::CodeWhisperer::Profile
	//
	//    * AWS::Cognito::IdentityPool
	//
	//    * AWS::DynamoDB::Stream
	//
	//    * AWS::EC2::Snapshot
	//
	//    * AWS::EMRWAL::Workspace
	//
	//    * AWS::FinSpace::Environment
	//
	//    * AWS::Glue::Table
	//
	//    * AWS::GuardDuty::Detector
	//
	//    * AWS::KendraRanking::ExecutionPlan
	//
	//    * AWS::ManagedBlockchain::Node
	//
	//    * AWS::SageMaker::ExperimentTrialComponent
	//
	//    * AWS::SageMaker::FeatureGroup
	//
	//    * AWS::S3::AccessPoint
	//
	//    * AWS::S3ObjectLambda::AccessPoint
	//
	//    * AWS::S3Outposts::Object
	Type *string `type:"string"`

	// An array of Amazon Resource Name (ARN) strings or partial ARN strings for
	// the specified objects.
	//
	//    * To log data events for all objects in all S3 buckets in your Amazon
	//    Web Services account, specify the prefix as arn:aws:s3. This also enables
	//    logging of data event activity performed by any user or role in your Amazon
	//    Web Services account, even if that activity is performed on a bucket that
	//    belongs to another Amazon Web Services account.
	//
	//    * To log data events for all objects in an S3 bucket, specify the bucket
	//    and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs
	//    data events for all objects in this S3 bucket.
	//
	//    * To log data events for specific objects, specify the S3 bucket and object
	//    prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data
	//    events for objects in this S3 bucket that match the prefix.
	//
	//    * To log data events for all Lambda functions in your Amazon Web Services
	//    account, specify the prefix as arn:aws:lambda. This also enables logging
	//    of Invoke activity performed by any user or role in your Amazon Web Services
	//    account, even if that activity is performed on a function that belongs
	//    to another Amazon Web Services account.
	//
	//    * To log data events for a specific Lambda function, specify the function
	//    ARN. Lambda function ARNs are exact. For example, if you specify a function
	//    ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events
	//    will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld.
	//    They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2.
	//
	//    * To log data events for all DynamoDB tables in your Amazon Web Services
	//    account, specify the prefix as arn:aws:dynamodb.
	Values []*string `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DataResource) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DataResource) GoString() string {
	return s.String()
}

// SetType sets the Type field's value.
func (s *DataResource) SetType(v string) *DataResource {
	s.Type = &v
	return s
}

// SetValues sets the Values field's value.
func (s *DataResource) SetValues(v []*string) *DataResource {
	s.Values = v
	return s
}

// This exception is thrown when the maximum number of CloudTrail delegated
// administrators is reached.
type DelegatedAdminAccountLimitExceededException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DelegatedAdminAccountLimitExceededException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DelegatedAdminAccountLimitExceededException) GoString() string {
	return s.String()
}

func newErrorDelegatedAdminAccountLimitExceededException(v protocol.ResponseMetadata) error {
	return &DelegatedAdminAccountLimitExceededException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *DelegatedAdminAccountLimitExceededException) Code() string {
	return "DelegatedAdminAccountLimitExceededException"
}

// Message returns the exception's message.
func (s *DelegatedAdminAccountLimitExceededException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *DelegatedAdminAccountLimitExceededException) OrigErr() error {
	return nil
}

func (s *DelegatedAdminAccountLimitExceededException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *DelegatedAdminAccountLimitExceededException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *DelegatedAdminAccountLimitExceededException) RequestID() string {
	return s.RespMetadata.RequestID
}

type DeleteChannelInput struct {
	_ struct{} `type:"structure"`

	// The ARN or the UUID value of the channel that you want to delete.
	//
	// Channel is a required field
	Channel *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteChannelInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteChannelInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteChannelInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteChannelInput"}
	if s.Channel == nil {
		invalidParams.Add(request.NewErrParamRequired("Channel"))
	}
	if s.Channel != nil && len(*s.Channel) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Channel", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetChannel sets the Channel field's value.
func (s *DeleteChannelInput) SetChannel(v string) *DeleteChannelInput {
	s.Channel = &v
	return s
}

type DeleteChannelOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteChannelOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteChannelOutput) GoString() string {
	return s.String()
}

type DeleteEventDataStoreInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or the ID suffix of the ARN) of the event data store to delete.
	//
	// EventDataStore is a required field
	EventDataStore *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteEventDataStoreInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteEventDataStoreInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteEventDataStoreInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteEventDataStoreInput"}
	if s.EventDataStore == nil {
		invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
	}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *DeleteEventDataStoreInput) SetEventDataStore(v string) *DeleteEventDataStoreInput {
	s.EventDataStore = &v
	return s
}

type DeleteEventDataStoreOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteEventDataStoreOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteEventDataStoreOutput) GoString() string {
	return s.String()
}

type DeleteResourcePolicyInput struct {
	_ struct{} `type:"structure"`

	// The Amazon Resource Name (ARN) of the CloudTrail channel you're deleting
	// the resource-based policy from. The following is the format of a resource
	// ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
	//
	// ResourceArn is a required field
	ResourceArn *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteResourcePolicyInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteResourcePolicyInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteResourcePolicyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"}
	if s.ResourceArn == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
	}
	if s.ResourceArn != nil && len(*s.ResourceArn) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetResourceArn sets the ResourceArn field's value.
func (s *DeleteResourcePolicyInput) SetResourceArn(v string) *DeleteResourcePolicyInput {
	s.ResourceArn = &v
	return s
}

type DeleteResourcePolicyOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteResourcePolicyOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteResourcePolicyOutput) GoString() string {
	return s.String()
}

// The request that specifies the name of a trail to delete.
type DeleteTrailInput struct {
	_ struct{} `type:"structure"`

	// Specifies the name or the CloudTrail ARN of the trail to be deleted. The
	// following is the format of a trail ARN. arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteTrailInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteTrailInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteTrailInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput {
	s.Name = &v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type DeleteTrailOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteTrailOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeleteTrailOutput) GoString() string {
	return s.String()
}

// Removes CloudTrail delegated administrator permissions from a specified member
// account in an organization that is currently designated as a delegated administrator.
type DeregisterOrganizationDelegatedAdminInput struct {
	_ struct{} `type:"structure"`

	// A delegated administrator account ID. This is a member account in an organization
	// that is currently designated as a delegated administrator.
	//
	// DelegatedAdminAccountId is a required field
	DelegatedAdminAccountId *string `min:"12" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeregisterOrganizationDelegatedAdminInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeregisterOrganizationDelegatedAdminInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DeregisterOrganizationDelegatedAdminInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DeregisterOrganizationDelegatedAdminInput"}
	if s.DelegatedAdminAccountId == nil {
		invalidParams.Add(request.NewErrParamRequired("DelegatedAdminAccountId"))
	}
	if s.DelegatedAdminAccountId != nil && len(*s.DelegatedAdminAccountId) < 12 {
		invalidParams.Add(request.NewErrParamMinLen("DelegatedAdminAccountId", 12))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDelegatedAdminAccountId sets the DelegatedAdminAccountId field's value.
func (s *DeregisterOrganizationDelegatedAdminInput) SetDelegatedAdminAccountId(v string) *DeregisterOrganizationDelegatedAdminInput {
	s.DelegatedAdminAccountId = &v
	return s
}

// Returns the following response if successful. Otherwise, returns an error.
type DeregisterOrganizationDelegatedAdminOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeregisterOrganizationDelegatedAdminOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DeregisterOrganizationDelegatedAdminOutput) GoString() string {
	return s.String()
}

type DescribeQueryInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or the ID suffix of the ARN) of an event data store on which the
	// specified query was run.
	//
	// Deprecated: EventDataStore is no longer required by DescribeQueryRequest
	EventDataStore *string `min:"3" deprecated:"true" type:"string"`

	// The alias that identifies a query template.
	QueryAlias *string `min:"1" type:"string"`

	// The query ID.
	QueryId *string `min:"36" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeQueryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeQueryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeQueryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "DescribeQueryInput"}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}
	if s.QueryAlias != nil && len(*s.QueryAlias) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("QueryAlias", 1))
	}
	if s.QueryId != nil && len(*s.QueryId) < 36 {
		invalidParams.Add(request.NewErrParamMinLen("QueryId", 36))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *DescribeQueryInput) SetEventDataStore(v string) *DescribeQueryInput {
	s.EventDataStore = &v
	return s
}

// SetQueryAlias sets the QueryAlias field's value.
func (s *DescribeQueryInput) SetQueryAlias(v string) *DescribeQueryInput {
	s.QueryAlias = &v
	return s
}

// SetQueryId sets the QueryId field's value.
func (s *DescribeQueryInput) SetQueryId(v string) *DescribeQueryInput {
	s.QueryId = &v
	return s
}

type DescribeQueryOutput struct {
	_ struct{} `type:"structure"`

	// The URI for the S3 bucket where CloudTrail delivered query results, if applicable.
	DeliveryS3Uri *string `type:"string"`

	// The delivery status.
	DeliveryStatus *string `type:"string" enum:"DeliveryStatus"`

	// The error message returned if a query failed.
	ErrorMessage *string `min:"4" type:"string"`

	// The ID of the query.
	QueryId *string `min:"36" type:"string"`

	// Metadata about a query, including the number of events that were matched,
	// the total number of events scanned, the query run time in milliseconds, and
	// the query's creation time.
	QueryStatistics *QueryStatisticsForDescribeQuery `type:"structure"`

	// The status of a query. Values for QueryStatus include QUEUED, RUNNING, FINISHED,
	// FAILED, TIMED_OUT, or CANCELLED
	QueryStatus *string `type:"string" enum:"QueryStatus"`

	// The SQL code of a query.
	QueryString *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeQueryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeQueryOutput) GoString() string {
	return s.String()
}

// SetDeliveryS3Uri sets the DeliveryS3Uri field's value.
func (s *DescribeQueryOutput) SetDeliveryS3Uri(v string) *DescribeQueryOutput {
	s.DeliveryS3Uri = &v
	return s
}

// SetDeliveryStatus sets the DeliveryStatus field's value.
func (s *DescribeQueryOutput) SetDeliveryStatus(v string) *DescribeQueryOutput {
	s.DeliveryStatus = &v
	return s
}

// SetErrorMessage sets the ErrorMessage field's value.
func (s *DescribeQueryOutput) SetErrorMessage(v string) *DescribeQueryOutput {
	s.ErrorMessage = &v
	return s
}

// SetQueryId sets the QueryId field's value.
func (s *DescribeQueryOutput) SetQueryId(v string) *DescribeQueryOutput {
	s.QueryId = &v
	return s
}

// SetQueryStatistics sets the QueryStatistics field's value.
func (s *DescribeQueryOutput) SetQueryStatistics(v *QueryStatisticsForDescribeQuery) *DescribeQueryOutput {
	s.QueryStatistics = v
	return s
}

// SetQueryStatus sets the QueryStatus field's value.
func (s *DescribeQueryOutput) SetQueryStatus(v string) *DescribeQueryOutput {
	s.QueryStatus = &v
	return s
}

// SetQueryString sets the QueryString field's value.
func (s *DescribeQueryOutput) SetQueryString(v string) *DescribeQueryOutput {
	s.QueryString = &v
	return s
}

// Returns information about the trail.
type DescribeTrailsInput struct {
	_ struct{} `type:"structure"`

	// Specifies whether to include shadow trails in the response. A shadow trail
	// is the replication in a Region of a trail that was created in a different
	// Region, or in the case of an organization trail, the replication of an organization
	// trail in member accounts. If you do not include shadow trails, organization
	// trails in a member account and Region replication trails will not be returned.
	// The default is true.
	IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"`

	// Specifies a list of trail names, trail ARNs, or both, of the trails to describe.
	// The format of a trail ARN is:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// If an empty list is specified, information for the trail in the current Region
	// is returned.
	//
	//    * If an empty list is specified and IncludeShadowTrails is false, then
	//    information for all trails in the current Region is returned.
	//
	//    * If an empty list is specified and IncludeShadowTrails is null or true,
	//    then information for all trails in the current Region and any associated
	//    shadow trails in other Regions is returned.
	//
	// If one or more trail names are specified, information is returned only if
	// the names match the names of trails belonging only to the current Region
	// and current account. To return information about a trail in another Region,
	// you must specify its trail ARN.
	TrailNameList []*string `locationName:"trailNameList" type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeTrailsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeTrailsInput) GoString() string {
	return s.String()
}

// SetIncludeShadowTrails sets the IncludeShadowTrails field's value.
func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput {
	s.IncludeShadowTrails = &v
	return s
}

// SetTrailNameList sets the TrailNameList field's value.
func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput {
	s.TrailNameList = v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type DescribeTrailsOutput struct {
	_ struct{} `type:"structure"`

	// The list of trail objects. Trail objects with string values are only returned
	// if values for the objects exist in a trail's configuration. For example,
	// SNSTopicName and SNSTopicARN are only returned in results if a trail is configured
	// to send SNS notifications. Similarly, KMSKeyId only appears in results if
	// a trail's log files are encrypted with KMS customer managed keys.
	TrailList []*Trail `locationName:"trailList" type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeTrailsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s DescribeTrailsOutput) GoString() string {
	return s.String()
}

// SetTrailList sets the TrailList field's value.
func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput {
	s.TrailList = v
	return s
}

// Contains information about the destination receiving events.
type Destination struct {
	_ struct{} `type:"structure"`

	// For channels used for a CloudTrail Lake integration, the location is the
	// ARN of an event data store that receives events from a channel. For service-linked
	// channels, the location is the name of the Amazon Web Services service.
	//
	// Location is a required field
	Location *string `min:"3" type:"string" required:"true"`

	// The type of destination for events arriving from a channel. For channels
	// used for a CloudTrail Lake integration, the value is EventDataStore. For
	// service-linked channels, the value is AWS_SERVICE.
	//
	// Type is a required field
	Type *string `type:"string" required:"true" enum:"DestinationType"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Destination) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Destination) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *Destination) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "Destination"}
	if s.Location == nil {
		invalidParams.Add(request.NewErrParamRequired("Location"))
	}
	if s.Location != nil && len(*s.Location) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Location", 3))
	}
	if s.Type == nil {
		invalidParams.Add(request.NewErrParamRequired("Type"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetLocation sets the Location field's value.
func (s *Destination) SetLocation(v string) *Destination {
	s.Location = &v
	return s
}

// SetType sets the Type field's value.
func (s *Destination) SetType(v string) *Destination {
	s.Type = &v
	return s
}

// Contains information about an event that was returned by a lookup request.
// The result includes a representation of a CloudTrail event.
type Event struct {
	_ struct{} `type:"structure"`

	// The Amazon Web Services access key ID that was used to sign the request.
	// If the request was made with temporary security credentials, this is the
	// access key ID of the temporary credentials.
	AccessKeyId *string `type:"string"`

	// A JSON string that contains a representation of the event returned.
	CloudTrailEvent *string `type:"string"`

	// The CloudTrail ID of the event returned.
	EventId *string `type:"string"`

	// The name of the event returned.
	EventName *string `type:"string"`

	// The Amazon Web Services service to which the request was made.
	EventSource *string `type:"string"`

	// The date and time of the event returned.
	EventTime *time.Time `type:"timestamp"`

	// Information about whether the event is a write event or a read event.
	ReadOnly *string `type:"string"`

	// A list of resources referenced by the event returned.
	Resources []*Resource `type:"list"`

	// A user name or role name of the requester that called the API in the event
	// returned.
	Username *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Event) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Event) GoString() string {
	return s.String()
}

// SetAccessKeyId sets the AccessKeyId field's value.
func (s *Event) SetAccessKeyId(v string) *Event {
	s.AccessKeyId = &v
	return s
}

// SetCloudTrailEvent sets the CloudTrailEvent field's value.
func (s *Event) SetCloudTrailEvent(v string) *Event {
	s.CloudTrailEvent = &v
	return s
}

// SetEventId sets the EventId field's value.
func (s *Event) SetEventId(v string) *Event {
	s.EventId = &v
	return s
}

// SetEventName sets the EventName field's value.
func (s *Event) SetEventName(v string) *Event {
	s.EventName = &v
	return s
}

// SetEventSource sets the EventSource field's value.
func (s *Event) SetEventSource(v string) *Event {
	s.EventSource = &v
	return s
}

// SetEventTime sets the EventTime field's value.
func (s *Event) SetEventTime(v time.Time) *Event {
	s.EventTime = &v
	return s
}

// SetReadOnly sets the ReadOnly field's value.
func (s *Event) SetReadOnly(v string) *Event {
	s.ReadOnly = &v
	return s
}

// SetResources sets the Resources field's value.
func (s *Event) SetResources(v []*Resource) *Event {
	s.Resources = v
	return s
}

// SetUsername sets the Username field's value.
func (s *Event) SetUsername(v string) *Event {
	s.Username = &v
	return s
}

// A storage lake of event data against which you can run complex SQL-based
// queries. An event data store can include events that you have logged on your
// account from the last 90 to 2557 days (about three months to up to seven
// years). To select events for an event data store, use advanced event selectors
// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced).
type EventDataStore struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors that were used to select events for the data
	// store.
	//
	// Deprecated: AdvancedEventSelectors is no longer returned by ListEventDataStores
	AdvancedEventSelectors []*AdvancedEventSelector `deprecated:"true" type:"list"`

	// The timestamp of the event data store's creation.
	//
	// Deprecated: CreatedTimestamp is no longer returned by ListEventDataStores
	CreatedTimestamp *time.Time `deprecated:"true" type:"timestamp"`

	// The ARN of the event data store.
	EventDataStoreArn *string `min:"3" type:"string"`

	// Indicates whether the event data store includes events from all Regions,
	// or only from the Region in which it was created.
	//
	// Deprecated: MultiRegionEnabled is no longer returned by ListEventDataStores
	MultiRegionEnabled *bool `deprecated:"true" type:"boolean"`

	// The name of the event data store.
	Name *string `min:"3" type:"string"`

	// Indicates that an event data store is collecting logged events for an organization.
	//
	// Deprecated: OrganizationEnabled is no longer returned by ListEventDataStores
	OrganizationEnabled *bool `deprecated:"true" type:"boolean"`

	// The retention period, in days.
	//
	// Deprecated: RetentionPeriod is no longer returned by ListEventDataStores
	RetentionPeriod *int64 `min:"7" deprecated:"true" type:"integer"`

	// The status of an event data store.
	//
	// Deprecated: Status is no longer returned by ListEventDataStores
	Status *string `deprecated:"true" type:"string" enum:"EventDataStoreStatus"`

	// Indicates whether the event data store is protected from termination.
	//
	// Deprecated: TerminationProtectionEnabled is no longer returned by ListEventDataStores
	TerminationProtectionEnabled *bool `deprecated:"true" type:"boolean"`

	// The timestamp showing when an event data store was updated, if applicable.
	// UpdatedTimestamp is always either the same or newer than the time shown in
	// CreatedTimestamp.
	//
	// Deprecated: UpdatedTimestamp is no longer returned by ListEventDataStores
	UpdatedTimestamp *time.Time `deprecated:"true" type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStore) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStore) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *EventDataStore) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *EventDataStore {
	s.AdvancedEventSelectors = v
	return s
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *EventDataStore) SetCreatedTimestamp(v time.Time) *EventDataStore {
	s.CreatedTimestamp = &v
	return s
}

// SetEventDataStoreArn sets the EventDataStoreArn field's value.
func (s *EventDataStore) SetEventDataStoreArn(v string) *EventDataStore {
	s.EventDataStoreArn = &v
	return s
}

// SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
func (s *EventDataStore) SetMultiRegionEnabled(v bool) *EventDataStore {
	s.MultiRegionEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *EventDataStore) SetName(v string) *EventDataStore {
	s.Name = &v
	return s
}

// SetOrganizationEnabled sets the OrganizationEnabled field's value.
func (s *EventDataStore) SetOrganizationEnabled(v bool) *EventDataStore {
	s.OrganizationEnabled = &v
	return s
}

// SetRetentionPeriod sets the RetentionPeriod field's value.
func (s *EventDataStore) SetRetentionPeriod(v int64) *EventDataStore {
	s.RetentionPeriod = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *EventDataStore) SetStatus(v string) *EventDataStore {
	s.Status = &v
	return s
}

// SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
func (s *EventDataStore) SetTerminationProtectionEnabled(v bool) *EventDataStore {
	s.TerminationProtectionEnabled = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *EventDataStore) SetUpdatedTimestamp(v time.Time) *EventDataStore {
	s.UpdatedTimestamp = &v
	return s
}

// The specified event data store ARN is not valid or does not map to an event
// data store in your account.
type EventDataStoreARNInvalidException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreARNInvalidException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreARNInvalidException) GoString() string {
	return s.String()
}

func newErrorEventDataStoreARNInvalidException(v protocol.ResponseMetadata) error {
	return &EventDataStoreARNInvalidException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *EventDataStoreARNInvalidException) Code() string {
	return "EventDataStoreARNInvalidException"
}

// Message returns the exception's message.
func (s *EventDataStoreARNInvalidException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *EventDataStoreARNInvalidException) OrigErr() error {
	return nil
}

func (s *EventDataStoreARNInvalidException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *EventDataStoreARNInvalidException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *EventDataStoreARNInvalidException) RequestID() string {
	return s.RespMetadata.RequestID
}

// An event data store with that name already exists.
type EventDataStoreAlreadyExistsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreAlreadyExistsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreAlreadyExistsException) GoString() string {
	return s.String()
}

func newErrorEventDataStoreAlreadyExistsException(v protocol.ResponseMetadata) error {
	return &EventDataStoreAlreadyExistsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *EventDataStoreAlreadyExistsException) Code() string {
	return "EventDataStoreAlreadyExistsException"
}

// Message returns the exception's message.
func (s *EventDataStoreAlreadyExistsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *EventDataStoreAlreadyExistsException) OrigErr() error {
	return nil
}

func (s *EventDataStoreAlreadyExistsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *EventDataStoreAlreadyExistsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *EventDataStoreAlreadyExistsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when you try to update or delete an event data store
// that currently has an import in progress.
type EventDataStoreHasOngoingImportException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreHasOngoingImportException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreHasOngoingImportException) GoString() string {
	return s.String()
}

func newErrorEventDataStoreHasOngoingImportException(v protocol.ResponseMetadata) error {
	return &EventDataStoreHasOngoingImportException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *EventDataStoreHasOngoingImportException) Code() string {
	return "EventDataStoreHasOngoingImportException"
}

// Message returns the exception's message.
func (s *EventDataStoreHasOngoingImportException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *EventDataStoreHasOngoingImportException) OrigErr() error {
	return nil
}

func (s *EventDataStoreHasOngoingImportException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *EventDataStoreHasOngoingImportException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *EventDataStoreHasOngoingImportException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Your account has used the maximum number of event data stores.
type EventDataStoreMaxLimitExceededException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreMaxLimitExceededException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreMaxLimitExceededException) GoString() string {
	return s.String()
}

func newErrorEventDataStoreMaxLimitExceededException(v protocol.ResponseMetadata) error {
	return &EventDataStoreMaxLimitExceededException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *EventDataStoreMaxLimitExceededException) Code() string {
	return "EventDataStoreMaxLimitExceededException"
}

// Message returns the exception's message.
func (s *EventDataStoreMaxLimitExceededException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *EventDataStoreMaxLimitExceededException) OrigErr() error {
	return nil
}

func (s *EventDataStoreMaxLimitExceededException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *EventDataStoreMaxLimitExceededException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *EventDataStoreMaxLimitExceededException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The specified event data store was not found.
type EventDataStoreNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreNotFoundException) GoString() string {
	return s.String()
}

func newErrorEventDataStoreNotFoundException(v protocol.ResponseMetadata) error {
	return &EventDataStoreNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *EventDataStoreNotFoundException) Code() string {
	return "EventDataStoreNotFoundException"
}

// Message returns the exception's message.
func (s *EventDataStoreNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *EventDataStoreNotFoundException) OrigErr() error {
	return nil
}

func (s *EventDataStoreNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *EventDataStoreNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *EventDataStoreNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The event data store cannot be deleted because termination protection is
// enabled for it.
type EventDataStoreTerminationProtectedException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreTerminationProtectedException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventDataStoreTerminationProtectedException) GoString() string {
	return s.String()
}

func newErrorEventDataStoreTerminationProtectedException(v protocol.ResponseMetadata) error {
	return &EventDataStoreTerminationProtectedException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *EventDataStoreTerminationProtectedException) Code() string {
	return "EventDataStoreTerminationProtectedException"
}

// Message returns the exception's message.
func (s *EventDataStoreTerminationProtectedException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *EventDataStoreTerminationProtectedException) OrigErr() error {
	return nil
}

func (s *EventDataStoreTerminationProtectedException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *EventDataStoreTerminationProtectedException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *EventDataStoreTerminationProtectedException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Use event selectors to further specify the management and data event settings
// for your trail. By default, trails created without specific event selectors
// will be configured to log all read and write management events, and no data
// events. When an event occurs in your account, CloudTrail evaluates the event
// selector for all trails. For each trail, if the event matches any event selector,
// the trail processes and logs the event. If the event doesn't match any event
// selector, the trail doesn't log the event.
//
// You can configure up to five event selectors for a trail.
//
// You cannot apply both event selectors and advanced event selectors to a trail.
type EventSelector struct {
	_ struct{} `type:"structure"`

	// CloudTrail supports data event logging for Amazon S3 objects, Lambda functions,
	// and Amazon DynamoDB tables with basic event selectors. You can specify up
	// to 250 resources for an individual event selector, but the total number of
	// data resources cannot exceed 250 across all event selectors in a trail. This
	// limit does not apply if you configure resource logging for all data events.
	//
	// For more information, see Data Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
	// and Limits in CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
	// in the CloudTrail User Guide.
	DataResources []*DataResource `type:"list"`

	// An optional list of service event sources from which you do not want management
	// events to be logged on your trail. In this release, the list can be empty
	// (disables the filter), or it can filter out Key Management Service or Amazon
	// RDS Data API events by containing kms.amazonaws.com or rdsdata.amazonaws.com.
	// By default, ExcludeManagementEventSources is empty, and KMS and Amazon RDS
	// Data API events are logged to your trail. You can exclude management event
	// sources only in Regions that support the event source.
	ExcludeManagementEventSources []*string `type:"list"`

	// Specify if you want your event selector to include management events for
	// your trail.
	//
	// For more information, see Management Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-events-with-cloudtrail.html)
	// in the CloudTrail User Guide.
	//
	// By default, the value is true.
	//
	// The first copy of management events is free. You are charged for additional
	// copies of management events that you are logging on any subsequent trail
	// in the same Region. For more information about CloudTrail pricing, see CloudTrail
	// Pricing (http://aws.amazon.com/cloudtrail/pricing/).
	IncludeManagementEvents *bool `type:"boolean"`

	// Specify if you want your trail to log read-only events, write-only events,
	// or all. For example, the EC2 GetConsoleOutput is a read-only API operation
	// and RunInstances is a write-only API operation.
	//
	// By default, the value is All.
	ReadWriteType *string `type:"string" enum:"ReadWriteType"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventSelector) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s EventSelector) GoString() string {
	return s.String()
}

// SetDataResources sets the DataResources field's value.
func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector {
	s.DataResources = v
	return s
}

// SetExcludeManagementEventSources sets the ExcludeManagementEventSources field's value.
func (s *EventSelector) SetExcludeManagementEventSources(v []*string) *EventSelector {
	s.ExcludeManagementEventSources = v
	return s
}

// SetIncludeManagementEvents sets the IncludeManagementEvents field's value.
func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector {
	s.IncludeManagementEvents = &v
	return s
}

// SetReadWriteType sets the ReadWriteType field's value.
func (s *EventSelector) SetReadWriteType(v string) *EventSelector {
	s.ReadWriteType = &v
	return s
}

type GetChannelInput struct {
	_ struct{} `type:"structure"`

	// The ARN or UUID of a channel.
	//
	// Channel is a required field
	Channel *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetChannelInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetChannelInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetChannelInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetChannelInput"}
	if s.Channel == nil {
		invalidParams.Add(request.NewErrParamRequired("Channel"))
	}
	if s.Channel != nil && len(*s.Channel) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Channel", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetChannel sets the Channel field's value.
func (s *GetChannelInput) SetChannel(v string) *GetChannelInput {
	s.Channel = &v
	return s
}

type GetChannelOutput struct {
	_ struct{} `type:"structure"`

	// The ARN of an channel returned by a GetChannel request.
	ChannelArn *string `min:"3" type:"string"`

	// The destinations for the channel. For channels created for integrations,
	// the destinations are the event data stores that log events arriving through
	// the channel. For service-linked channels, the destination is the Amazon Web
	// Services service that created the service-linked channel to receive events.
	Destinations []*Destination `min:"1" type:"list"`

	// A table showing information about the most recent successful and failed attempts
	// to ingest events.
	IngestionStatus *IngestionStatus `type:"structure"`

	// The name of the CloudTrail channel. For service-linked channels, the name
	// is aws-service-channel/service-name/custom-suffix where service-name represents
	// the name of the Amazon Web Services service that created the channel and
	// custom-suffix represents the suffix generated by the Amazon Web Services
	// service.
	Name *string `min:"3" type:"string"`

	// The source for the CloudTrail channel.
	Source *string `min:"1" type:"string"`

	// Provides information about the advanced event selectors configured for the
	// channel, and whether the channel applies to all Regions or a single Region.
	SourceConfig *SourceConfig `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetChannelOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetChannelOutput) GoString() string {
	return s.String()
}

// SetChannelArn sets the ChannelArn field's value.
func (s *GetChannelOutput) SetChannelArn(v string) *GetChannelOutput {
	s.ChannelArn = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *GetChannelOutput) SetDestinations(v []*Destination) *GetChannelOutput {
	s.Destinations = v
	return s
}

// SetIngestionStatus sets the IngestionStatus field's value.
func (s *GetChannelOutput) SetIngestionStatus(v *IngestionStatus) *GetChannelOutput {
	s.IngestionStatus = v
	return s
}

// SetName sets the Name field's value.
func (s *GetChannelOutput) SetName(v string) *GetChannelOutput {
	s.Name = &v
	return s
}

// SetSource sets the Source field's value.
func (s *GetChannelOutput) SetSource(v string) *GetChannelOutput {
	s.Source = &v
	return s
}

// SetSourceConfig sets the SourceConfig field's value.
func (s *GetChannelOutput) SetSourceConfig(v *SourceConfig) *GetChannelOutput {
	s.SourceConfig = v
	return s
}

type GetEventDataStoreInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or ID suffix of the ARN) of the event data store about which you
	// want information.
	//
	// EventDataStore is a required field
	EventDataStore *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventDataStoreInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventDataStoreInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetEventDataStoreInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetEventDataStoreInput"}
	if s.EventDataStore == nil {
		invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
	}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *GetEventDataStoreInput) SetEventDataStore(v string) *GetEventDataStoreInput {
	s.EventDataStore = &v
	return s
}

type GetEventDataStoreOutput struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors used to select events for the data store.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// The timestamp of the event data store's creation.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The event data store Amazon Resource Number (ARN).
	EventDataStoreArn *string `min:"3" type:"string"`

	// Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
	// The value is a fully specified ARN to a KMS key in the following format.
	//
	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `min:"1" type:"string"`

	// Indicates whether the event data store includes events from all Regions,
	// or only from the Region in which it was created.
	MultiRegionEnabled *bool `type:"boolean"`

	// The name of the event data store.
	Name *string `min:"3" type:"string"`

	// Indicates whether an event data store is collecting logged events for an
	// organization in Organizations.
	OrganizationEnabled *bool `type:"boolean"`

	// The retention period of the event data store, in days.
	RetentionPeriod *int64 `min:"7" type:"integer"`

	// The status of an event data store.
	Status *string `type:"string" enum:"EventDataStoreStatus"`

	// Indicates that termination protection is enabled.
	TerminationProtectionEnabled *bool `type:"boolean"`

	// Shows the time that an event data store was updated, if applicable. UpdatedTimestamp
	// is always either the same or newer than the time shown in CreatedTimestamp.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventDataStoreOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventDataStoreOutput) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *GetEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *GetEventDataStoreOutput {
	s.AdvancedEventSelectors = v
	return s
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *GetEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *GetEventDataStoreOutput {
	s.CreatedTimestamp = &v
	return s
}

// SetEventDataStoreArn sets the EventDataStoreArn field's value.
func (s *GetEventDataStoreOutput) SetEventDataStoreArn(v string) *GetEventDataStoreOutput {
	s.EventDataStoreArn = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *GetEventDataStoreOutput) SetKmsKeyId(v string) *GetEventDataStoreOutput {
	s.KmsKeyId = &v
	return s
}

// SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
func (s *GetEventDataStoreOutput) SetMultiRegionEnabled(v bool) *GetEventDataStoreOutput {
	s.MultiRegionEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *GetEventDataStoreOutput) SetName(v string) *GetEventDataStoreOutput {
	s.Name = &v
	return s
}

// SetOrganizationEnabled sets the OrganizationEnabled field's value.
func (s *GetEventDataStoreOutput) SetOrganizationEnabled(v bool) *GetEventDataStoreOutput {
	s.OrganizationEnabled = &v
	return s
}

// SetRetentionPeriod sets the RetentionPeriod field's value.
func (s *GetEventDataStoreOutput) SetRetentionPeriod(v int64) *GetEventDataStoreOutput {
	s.RetentionPeriod = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *GetEventDataStoreOutput) SetStatus(v string) *GetEventDataStoreOutput {
	s.Status = &v
	return s
}

// SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
func (s *GetEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *GetEventDataStoreOutput {
	s.TerminationProtectionEnabled = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *GetEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *GetEventDataStoreOutput {
	s.UpdatedTimestamp = &v
	return s
}

type GetEventSelectorsInput struct {
	_ struct{} `type:"structure"`

	// Specifies the name of the trail or trail ARN. If you specify a trail name,
	// the string must meet the following requirements:
	//
	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
	//    (_), or dashes (-)
	//
	//    * Start with a letter or number, and end with a letter or number
	//
	//    * Be between 3 and 128 characters
	//
	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
	//    and my--namespace are not valid.
	//
	//    * Not be in IP address format (for example, 192.168.5.4)
	//
	// If you specify a trail ARN, it must be in the format:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// TrailName is a required field
	TrailName *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventSelectorsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventSelectorsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetEventSelectorsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetEventSelectorsInput"}
	if s.TrailName == nil {
		invalidParams.Add(request.NewErrParamRequired("TrailName"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetTrailName sets the TrailName field's value.
func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput {
	s.TrailName = &v
	return s
}

type GetEventSelectorsOutput struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors that are configured for the trail.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// The event selectors that are configured for the trail.
	EventSelectors []*EventSelector `type:"list"`

	// The specified trail ARN that has the event selectors.
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventSelectorsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetEventSelectorsOutput) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *GetEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *GetEventSelectorsOutput {
	s.AdvancedEventSelectors = v
	return s
}

// SetEventSelectors sets the EventSelectors field's value.
func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput {
	s.EventSelectors = v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput {
	s.TrailARN = &v
	return s
}

type GetImportInput struct {
	_ struct{} `type:"structure"`

	// The ID for the import.
	//
	// ImportId is a required field
	ImportId *string `min:"36" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetImportInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetImportInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetImportInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetImportInput"}
	if s.ImportId == nil {
		invalidParams.Add(request.NewErrParamRequired("ImportId"))
	}
	if s.ImportId != nil && len(*s.ImportId) < 36 {
		invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetImportId sets the ImportId field's value.
func (s *GetImportInput) SetImportId(v string) *GetImportInput {
	s.ImportId = &v
	return s
}

type GetImportOutput struct {
	_ struct{} `type:"structure"`

	// The timestamp of the import's creation.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The ARN of the destination event data store.
	Destinations []*string `min:"1" type:"list"`

	// Used with StartEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	EndEventTime *time.Time `type:"timestamp"`

	// The ID of the import.
	ImportId *string `min:"36" type:"string"`

	// The source S3 bucket.
	ImportSource *ImportSource `type:"structure"`

	// Provides statistics for the import. CloudTrail does not update import statistics
	// in real-time. Returned values for parameters such as EventsCompleted may
	// be lower than the actual value, because CloudTrail updates statistics incrementally
	// over the course of the import.
	ImportStatistics *ImportStatistics `type:"structure"`

	// The status of the import.
	ImportStatus *string `type:"string" enum:"ImportStatus"`

	// Used with EndEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	StartEventTime *time.Time `type:"timestamp"`

	// The timestamp of when the import was updated.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetImportOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetImportOutput) GoString() string {
	return s.String()
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *GetImportOutput) SetCreatedTimestamp(v time.Time) *GetImportOutput {
	s.CreatedTimestamp = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *GetImportOutput) SetDestinations(v []*string) *GetImportOutput {
	s.Destinations = v
	return s
}

// SetEndEventTime sets the EndEventTime field's value.
func (s *GetImportOutput) SetEndEventTime(v time.Time) *GetImportOutput {
	s.EndEventTime = &v
	return s
}

// SetImportId sets the ImportId field's value.
func (s *GetImportOutput) SetImportId(v string) *GetImportOutput {
	s.ImportId = &v
	return s
}

// SetImportSource sets the ImportSource field's value.
func (s *GetImportOutput) SetImportSource(v *ImportSource) *GetImportOutput {
	s.ImportSource = v
	return s
}

// SetImportStatistics sets the ImportStatistics field's value.
func (s *GetImportOutput) SetImportStatistics(v *ImportStatistics) *GetImportOutput {
	s.ImportStatistics = v
	return s
}

// SetImportStatus sets the ImportStatus field's value.
func (s *GetImportOutput) SetImportStatus(v string) *GetImportOutput {
	s.ImportStatus = &v
	return s
}

// SetStartEventTime sets the StartEventTime field's value.
func (s *GetImportOutput) SetStartEventTime(v time.Time) *GetImportOutput {
	s.StartEventTime = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *GetImportOutput) SetUpdatedTimestamp(v time.Time) *GetImportOutput {
	s.UpdatedTimestamp = &v
	return s
}

type GetInsightSelectorsInput struct {
	_ struct{} `type:"structure"`

	// Specifies the name of the trail or trail ARN. If you specify a trail name,
	// the string must meet the following requirements:
	//
	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
	//    (_), or dashes (-)
	//
	//    * Start with a letter or number, and end with a letter or number
	//
	//    * Be between 3 and 128 characters
	//
	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
	//    and my--namespace are not valid.
	//
	//    * Not be in IP address format (for example, 192.168.5.4)
	//
	// If you specify a trail ARN, it must be in the format:
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// TrailName is a required field
	TrailName *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetInsightSelectorsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetInsightSelectorsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetInsightSelectorsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetInsightSelectorsInput"}
	if s.TrailName == nil {
		invalidParams.Add(request.NewErrParamRequired("TrailName"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetTrailName sets the TrailName field's value.
func (s *GetInsightSelectorsInput) SetTrailName(v string) *GetInsightSelectorsInput {
	s.TrailName = &v
	return s
}

type GetInsightSelectorsOutput struct {
	_ struct{} `type:"structure"`

	// A JSON string that contains the insight types you want to log on a trail.
	// In this release, ApiErrorRateInsight and ApiCallRateInsight are supported
	// as insight types.
	InsightSelectors []*InsightSelector `type:"list"`

	// The Amazon Resource Name (ARN) of a trail for which you want to get Insights
	// selectors.
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetInsightSelectorsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetInsightSelectorsOutput) GoString() string {
	return s.String()
}

// SetInsightSelectors sets the InsightSelectors field's value.
func (s *GetInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *GetInsightSelectorsOutput {
	s.InsightSelectors = v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *GetInsightSelectorsOutput) SetTrailARN(v string) *GetInsightSelectorsOutput {
	s.TrailARN = &v
	return s
}

type GetQueryResultsInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or ID suffix of the ARN) of the event data store against which the
	// query was run.
	//
	// Deprecated: EventDataStore is no longer required by GetQueryResultsRequest
	EventDataStore *string `min:"3" deprecated:"true" type:"string"`

	// The maximum number of query results to display on a single page.
	MaxQueryResults *int64 `min:"1" type:"integer"`

	// A token you can use to get the next page of query results.
	NextToken *string `min:"4" type:"string"`

	// The ID of the query for which you want to get results.
	//
	// QueryId is a required field
	QueryId *string `min:"36" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetQueryResultsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetQueryResultsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetQueryResultsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}
	if s.MaxQueryResults != nil && *s.MaxQueryResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxQueryResults", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 4 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
	}
	if s.QueryId == nil {
		invalidParams.Add(request.NewErrParamRequired("QueryId"))
	}
	if s.QueryId != nil && len(*s.QueryId) < 36 {
		invalidParams.Add(request.NewErrParamMinLen("QueryId", 36))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *GetQueryResultsInput) SetEventDataStore(v string) *GetQueryResultsInput {
	s.EventDataStore = &v
	return s
}

// SetMaxQueryResults sets the MaxQueryResults field's value.
func (s *GetQueryResultsInput) SetMaxQueryResults(v int64) *GetQueryResultsInput {
	s.MaxQueryResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *GetQueryResultsInput) SetNextToken(v string) *GetQueryResultsInput {
	s.NextToken = &v
	return s
}

// SetQueryId sets the QueryId field's value.
func (s *GetQueryResultsInput) SetQueryId(v string) *GetQueryResultsInput {
	s.QueryId = &v
	return s
}

type GetQueryResultsOutput struct {
	_ struct{} `type:"structure"`

	// The error message returned if a query failed.
	ErrorMessage *string `min:"4" type:"string"`

	// A token you can use to get the next page of query results.
	NextToken *string `min:"4" type:"string"`

	// Contains the individual event results of the query.
	QueryResultRows [][]map[string]*string `type:"list"`

	// Shows the count of query results.
	QueryStatistics *QueryStatistics `type:"structure"`

	// The status of the query. Values include QUEUED, RUNNING, FINISHED, FAILED,
	// TIMED_OUT, or CANCELLED.
	QueryStatus *string `type:"string" enum:"QueryStatus"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetQueryResultsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetQueryResultsOutput) GoString() string {
	return s.String()
}

// SetErrorMessage sets the ErrorMessage field's value.
func (s *GetQueryResultsOutput) SetErrorMessage(v string) *GetQueryResultsOutput {
	s.ErrorMessage = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *GetQueryResultsOutput) SetNextToken(v string) *GetQueryResultsOutput {
	s.NextToken = &v
	return s
}

// SetQueryResultRows sets the QueryResultRows field's value.
func (s *GetQueryResultsOutput) SetQueryResultRows(v [][]map[string]*string) *GetQueryResultsOutput {
	s.QueryResultRows = v
	return s
}

// SetQueryStatistics sets the QueryStatistics field's value.
func (s *GetQueryResultsOutput) SetQueryStatistics(v *QueryStatistics) *GetQueryResultsOutput {
	s.QueryStatistics = v
	return s
}

// SetQueryStatus sets the QueryStatus field's value.
func (s *GetQueryResultsOutput) SetQueryStatus(v string) *GetQueryResultsOutput {
	s.QueryStatus = &v
	return s
}

type GetResourcePolicyInput struct {
	_ struct{} `type:"structure"`

	// The Amazon Resource Name (ARN) of the CloudTrail channel attached to the
	// resource-based policy. The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
	//
	// ResourceArn is a required field
	ResourceArn *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourcePolicyInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourcePolicyInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetResourcePolicyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetResourcePolicyInput"}
	if s.ResourceArn == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
	}
	if s.ResourceArn != nil && len(*s.ResourceArn) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetResourceArn sets the ResourceArn field's value.
func (s *GetResourcePolicyInput) SetResourceArn(v string) *GetResourcePolicyInput {
	s.ResourceArn = &v
	return s
}

type GetResourcePolicyOutput struct {
	_ struct{} `type:"structure"`

	// The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based
	// policy.
	ResourceArn *string `min:"3" type:"string"`

	// A JSON-formatted string that contains the resource-based policy attached
	// to the CloudTrail channel.
	ResourcePolicy *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourcePolicyOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetResourcePolicyOutput) GoString() string {
	return s.String()
}

// SetResourceArn sets the ResourceArn field's value.
func (s *GetResourcePolicyOutput) SetResourceArn(v string) *GetResourcePolicyOutput {
	s.ResourceArn = &v
	return s
}

// SetResourcePolicy sets the ResourcePolicy field's value.
func (s *GetResourcePolicyOutput) SetResourcePolicy(v string) *GetResourcePolicyOutput {
	s.ResourcePolicy = &v
	return s
}

type GetTrailInput struct {
	_ struct{} `type:"structure"`

	// The name or the Amazon Resource Name (ARN) of the trail for which you want
	// to retrieve settings information.
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetTrailInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetTrailInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *GetTrailInput) SetName(v string) *GetTrailInput {
	s.Name = &v
	return s
}

type GetTrailOutput struct {
	_ struct{} `type:"structure"`

	// The settings for a trail.
	Trail *Trail `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailOutput) GoString() string {
	return s.String()
}

// SetTrail sets the Trail field's value.
func (s *GetTrailOutput) SetTrail(v *Trail) *GetTrailOutput {
	s.Trail = v
	return s
}

// The name of a trail about which you want the current status.
type GetTrailStatusInput struct {
	_ struct{} `type:"structure"`

	// Specifies the name or the CloudTrail ARN of the trail for which you are requesting
	// status. To get the status of a shadow trail (a replication of the trail in
	// another Region), you must specify its ARN. The following is the format of
	// a trail ARN.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailStatusInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailStatusInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *GetTrailStatusInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput {
	s.Name = &v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type GetTrailStatusOutput struct {
	_ struct{} `type:"structure"`

	// Whether the CloudTrail trail is currently logging Amazon Web Services API
	// calls.
	IsLogging *bool `type:"boolean"`

	// Displays any CloudWatch Logs error that CloudTrail encountered when attempting
	// to deliver logs to CloudWatch Logs.
	LatestCloudWatchLogsDeliveryError *string `type:"string"`

	// Displays the most recent date and time when CloudTrail delivered logs to
	// CloudWatch Logs.
	LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"`

	// This field is no longer in use.
	LatestDeliveryAttemptSucceeded *string `type:"string"`

	// This field is no longer in use.
	LatestDeliveryAttemptTime *string `type:"string"`

	// Displays any Amazon S3 error that CloudTrail encountered when attempting
	// to deliver log files to the designated bucket. For more information, see
	// Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
	// in the Amazon S3 API Reference.
	//
	// This error occurs only when there is a problem with the destination S3 bucket,
	// and does not occur for requests that time out. To resolve the issue, create
	// a new bucket, and then call UpdateTrail to specify the new bucket; or fix
	// the existing objects so that CloudTrail can again write to the bucket.
	LatestDeliveryError *string `type:"string"`

	// Specifies the date and time that CloudTrail last delivered log files to an
	// account's Amazon S3 bucket.
	LatestDeliveryTime *time.Time `type:"timestamp"`

	// Displays any Amazon S3 error that CloudTrail encountered when attempting
	// to deliver a digest file to the designated bucket. For more information,
	// see Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
	// in the Amazon S3 API Reference.
	//
	// This error occurs only when there is a problem with the destination S3 bucket,
	// and does not occur for requests that time out. To resolve the issue, create
	// a new bucket, and then call UpdateTrail to specify the new bucket; or fix
	// the existing objects so that CloudTrail can again write to the bucket.
	LatestDigestDeliveryError *string `type:"string"`

	// Specifies the date and time that CloudTrail last delivered a digest file
	// to an account's Amazon S3 bucket.
	LatestDigestDeliveryTime *time.Time `type:"timestamp"`

	// This field is no longer in use.
	LatestNotificationAttemptSucceeded *string `type:"string"`

	// This field is no longer in use.
	LatestNotificationAttemptTime *string `type:"string"`

	// Displays any Amazon SNS error that CloudTrail encountered when attempting
	// to send a notification. For more information about Amazon SNS errors, see
	// the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
	LatestNotificationError *string `type:"string"`

	// Specifies the date and time of the most recent Amazon SNS notification that
	// CloudTrail has written a new log file to an account's Amazon S3 bucket.
	LatestNotificationTime *time.Time `type:"timestamp"`

	// Specifies the most recent date and time when CloudTrail started recording
	// API calls for an Amazon Web Services account.
	StartLoggingTime *time.Time `type:"timestamp"`

	// Specifies the most recent date and time when CloudTrail stopped recording
	// API calls for an Amazon Web Services account.
	StopLoggingTime *time.Time `type:"timestamp"`

	// This field is no longer in use.
	TimeLoggingStarted *string `type:"string"`

	// This field is no longer in use.
	TimeLoggingStopped *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailStatusOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s GetTrailStatusOutput) GoString() string {
	return s.String()
}

// SetIsLogging sets the IsLogging field's value.
func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput {
	s.IsLogging = &v
	return s
}

// SetLatestCloudWatchLogsDeliveryError sets the LatestCloudWatchLogsDeliveryError field's value.
func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput {
	s.LatestCloudWatchLogsDeliveryError = &v
	return s
}

// SetLatestCloudWatchLogsDeliveryTime sets the LatestCloudWatchLogsDeliveryTime field's value.
func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput {
	s.LatestCloudWatchLogsDeliveryTime = &v
	return s
}

// SetLatestDeliveryAttemptSucceeded sets the LatestDeliveryAttemptSucceeded field's value.
func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput {
	s.LatestDeliveryAttemptSucceeded = &v
	return s
}

// SetLatestDeliveryAttemptTime sets the LatestDeliveryAttemptTime field's value.
func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput {
	s.LatestDeliveryAttemptTime = &v
	return s
}

// SetLatestDeliveryError sets the LatestDeliveryError field's value.
func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput {
	s.LatestDeliveryError = &v
	return s
}

// SetLatestDeliveryTime sets the LatestDeliveryTime field's value.
func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput {
	s.LatestDeliveryTime = &v
	return s
}

// SetLatestDigestDeliveryError sets the LatestDigestDeliveryError field's value.
func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput {
	s.LatestDigestDeliveryError = &v
	return s
}

// SetLatestDigestDeliveryTime sets the LatestDigestDeliveryTime field's value.
func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput {
	s.LatestDigestDeliveryTime = &v
	return s
}

// SetLatestNotificationAttemptSucceeded sets the LatestNotificationAttemptSucceeded field's value.
func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput {
	s.LatestNotificationAttemptSucceeded = &v
	return s
}

// SetLatestNotificationAttemptTime sets the LatestNotificationAttemptTime field's value.
func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput {
	s.LatestNotificationAttemptTime = &v
	return s
}

// SetLatestNotificationError sets the LatestNotificationError field's value.
func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput {
	s.LatestNotificationError = &v
	return s
}

// SetLatestNotificationTime sets the LatestNotificationTime field's value.
func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput {
	s.LatestNotificationTime = &v
	return s
}

// SetStartLoggingTime sets the StartLoggingTime field's value.
func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput {
	s.StartLoggingTime = &v
	return s
}

// SetStopLoggingTime sets the StopLoggingTime field's value.
func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput {
	s.StopLoggingTime = &v
	return s
}

// SetTimeLoggingStarted sets the TimeLoggingStarted field's value.
func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput {
	s.TimeLoggingStarted = &v
	return s
}

// SetTimeLoggingStopped sets the TimeLoggingStopped field's value.
func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput {
	s.TimeLoggingStopped = &v
	return s
}

// Provides information about an import failure.
type ImportFailureListItem struct {
	_ struct{} `type:"structure"`

	// Provides the reason the import failed.
	ErrorMessage *string `type:"string"`

	// The type of import error.
	ErrorType *string `type:"string"`

	// When the import was last updated.
	LastUpdatedTime *time.Time `type:"timestamp"`

	// The location of the failure in the S3 bucket.
	Location *string `type:"string"`

	// The status of the import.
	Status *string `type:"string" enum:"ImportFailureStatus"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportFailureListItem) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportFailureListItem) GoString() string {
	return s.String()
}

// SetErrorMessage sets the ErrorMessage field's value.
func (s *ImportFailureListItem) SetErrorMessage(v string) *ImportFailureListItem {
	s.ErrorMessage = &v
	return s
}

// SetErrorType sets the ErrorType field's value.
func (s *ImportFailureListItem) SetErrorType(v string) *ImportFailureListItem {
	s.ErrorType = &v
	return s
}

// SetLastUpdatedTime sets the LastUpdatedTime field's value.
func (s *ImportFailureListItem) SetLastUpdatedTime(v time.Time) *ImportFailureListItem {
	s.LastUpdatedTime = &v
	return s
}

// SetLocation sets the Location field's value.
func (s *ImportFailureListItem) SetLocation(v string) *ImportFailureListItem {
	s.Location = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *ImportFailureListItem) SetStatus(v string) *ImportFailureListItem {
	s.Status = &v
	return s
}

// The specified import was not found.
type ImportNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportNotFoundException) GoString() string {
	return s.String()
}

func newErrorImportNotFoundException(v protocol.ResponseMetadata) error {
	return &ImportNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ImportNotFoundException) Code() string {
	return "ImportNotFoundException"
}

// Message returns the exception's message.
func (s *ImportNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ImportNotFoundException) OrigErr() error {
	return nil
}

func (s *ImportNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ImportNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ImportNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The import source.
type ImportSource struct {
	_ struct{} `type:"structure"`

	// The source S3 bucket.
	//
	// S3 is a required field
	S3 *S3ImportSource `type:"structure" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportSource) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportSource) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ImportSource) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ImportSource"}
	if s.S3 == nil {
		invalidParams.Add(request.NewErrParamRequired("S3"))
	}
	if s.S3 != nil {
		if err := s.S3.Validate(); err != nil {
			invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetS3 sets the S3 field's value.
func (s *ImportSource) SetS3(v *S3ImportSource) *ImportSource {
	s.S3 = v
	return s
}

// Provides statistics for the specified ImportID. CloudTrail does not update
// import statistics in real-time. Returned values for parameters such as EventsCompleted
// may be lower than the actual value, because CloudTrail updates statistics
// incrementally over the course of the import.
type ImportStatistics struct {
	_ struct{} `type:"structure"`

	// The number of trail events imported into the event data store.
	EventsCompleted *int64 `type:"long"`

	// The number of failed entries.
	FailedEntries *int64 `type:"long"`

	// The number of log files that completed import.
	FilesCompleted *int64 `type:"long"`

	// The number of S3 prefixes that completed import.
	PrefixesCompleted *int64 `type:"long"`

	// The number of S3 prefixes found for the import.
	PrefixesFound *int64 `type:"long"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportStatistics) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportStatistics) GoString() string {
	return s.String()
}

// SetEventsCompleted sets the EventsCompleted field's value.
func (s *ImportStatistics) SetEventsCompleted(v int64) *ImportStatistics {
	s.EventsCompleted = &v
	return s
}

// SetFailedEntries sets the FailedEntries field's value.
func (s *ImportStatistics) SetFailedEntries(v int64) *ImportStatistics {
	s.FailedEntries = &v
	return s
}

// SetFilesCompleted sets the FilesCompleted field's value.
func (s *ImportStatistics) SetFilesCompleted(v int64) *ImportStatistics {
	s.FilesCompleted = &v
	return s
}

// SetPrefixesCompleted sets the PrefixesCompleted field's value.
func (s *ImportStatistics) SetPrefixesCompleted(v int64) *ImportStatistics {
	s.PrefixesCompleted = &v
	return s
}

// SetPrefixesFound sets the PrefixesFound field's value.
func (s *ImportStatistics) SetPrefixesFound(v int64) *ImportStatistics {
	s.PrefixesFound = &v
	return s
}

// Contains information about an import that was returned by a lookup request.
type ImportsListItem struct {
	_ struct{} `type:"structure"`

	// The timestamp of the import's creation.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The ARN of the destination event data store.
	Destinations []*string `min:"1" type:"list"`

	// The ID of the import.
	ImportId *string `min:"36" type:"string"`

	// The status of the import.
	ImportStatus *string `type:"string" enum:"ImportStatus"`

	// The timestamp of the import's last update.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportsListItem) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ImportsListItem) GoString() string {
	return s.String()
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *ImportsListItem) SetCreatedTimestamp(v time.Time) *ImportsListItem {
	s.CreatedTimestamp = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *ImportsListItem) SetDestinations(v []*string) *ImportsListItem {
	s.Destinations = v
	return s
}

// SetImportId sets the ImportId field's value.
func (s *ImportsListItem) SetImportId(v string) *ImportsListItem {
	s.ImportId = &v
	return s
}

// SetImportStatus sets the ImportStatus field's value.
func (s *ImportsListItem) SetImportStatus(v string) *ImportsListItem {
	s.ImportStatus = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *ImportsListItem) SetUpdatedTimestamp(v time.Time) *ImportsListItem {
	s.UpdatedTimestamp = &v
	return s
}

// The event data store is inactive.
type InactiveEventDataStoreException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InactiveEventDataStoreException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InactiveEventDataStoreException) GoString() string {
	return s.String()
}

func newErrorInactiveEventDataStoreException(v protocol.ResponseMetadata) error {
	return &InactiveEventDataStoreException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InactiveEventDataStoreException) Code() string {
	return "InactiveEventDataStoreException"
}

// Message returns the exception's message.
func (s *InactiveEventDataStoreException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InactiveEventDataStoreException) OrigErr() error {
	return nil
}

func (s *InactiveEventDataStoreException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InactiveEventDataStoreException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InactiveEventDataStoreException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The specified query cannot be canceled because it is in the FINISHED, FAILED,
// TIMED_OUT, or CANCELLED state.
type InactiveQueryException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InactiveQueryException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InactiveQueryException) GoString() string {
	return s.String()
}

func newErrorInactiveQueryException(v protocol.ResponseMetadata) error {
	return &InactiveQueryException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InactiveQueryException) Code() string {
	return "InactiveQueryException"
}

// Message returns the exception's message.
func (s *InactiveQueryException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InactiveQueryException) OrigErr() error {
	return nil
}

func (s *InactiveQueryException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InactiveQueryException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InactiveQueryException) RequestID() string {
	return s.RespMetadata.RequestID
}

// A table showing information about the most recent successful and failed attempts
// to ingest events.
type IngestionStatus struct {
	_ struct{} `type:"structure"`

	// The event ID of the most recent attempt to ingest events.
	LatestIngestionAttemptEventID *string `min:"36" type:"string"`

	// The time stamp of the most recent attempt to ingest events on the channel.
	LatestIngestionAttemptTime *time.Time `type:"timestamp"`

	// The error code for the most recent failure to ingest events.
	LatestIngestionErrorCode *string `min:"4" type:"string"`

	// The event ID of the most recent successful ingestion of events.
	LatestIngestionSuccessEventID *string `min:"36" type:"string"`

	// The time stamp of the most recent successful ingestion of events for the
	// channel.
	LatestIngestionSuccessTime *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s IngestionStatus) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s IngestionStatus) GoString() string {
	return s.String()
}

// SetLatestIngestionAttemptEventID sets the LatestIngestionAttemptEventID field's value.
func (s *IngestionStatus) SetLatestIngestionAttemptEventID(v string) *IngestionStatus {
	s.LatestIngestionAttemptEventID = &v
	return s
}

// SetLatestIngestionAttemptTime sets the LatestIngestionAttemptTime field's value.
func (s *IngestionStatus) SetLatestIngestionAttemptTime(v time.Time) *IngestionStatus {
	s.LatestIngestionAttemptTime = &v
	return s
}

// SetLatestIngestionErrorCode sets the LatestIngestionErrorCode field's value.
func (s *IngestionStatus) SetLatestIngestionErrorCode(v string) *IngestionStatus {
	s.LatestIngestionErrorCode = &v
	return s
}

// SetLatestIngestionSuccessEventID sets the LatestIngestionSuccessEventID field's value.
func (s *IngestionStatus) SetLatestIngestionSuccessEventID(v string) *IngestionStatus {
	s.LatestIngestionSuccessEventID = &v
	return s
}

// SetLatestIngestionSuccessTime sets the LatestIngestionSuccessTime field's value.
func (s *IngestionStatus) SetLatestIngestionSuccessTime(v time.Time) *IngestionStatus {
	s.LatestIngestionSuccessTime = &v
	return s
}

// If you run GetInsightSelectors on a trail that does not have Insights events
// enabled, the operation throws the exception InsightNotEnabledException.
type InsightNotEnabledException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsightNotEnabledException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsightNotEnabledException) GoString() string {
	return s.String()
}

func newErrorInsightNotEnabledException(v protocol.ResponseMetadata) error {
	return &InsightNotEnabledException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InsightNotEnabledException) Code() string {
	return "InsightNotEnabledException"
}

// Message returns the exception's message.
func (s *InsightNotEnabledException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InsightNotEnabledException) OrigErr() error {
	return nil
}

func (s *InsightNotEnabledException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InsightNotEnabledException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InsightNotEnabledException) RequestID() string {
	return s.RespMetadata.RequestID
}

// A JSON string that contains a list of Insights types that are logged on a
// trail.
type InsightSelector struct {
	_ struct{} `type:"structure"`

	// The type of Insights events to log on a trail. ApiCallRateInsight and ApiErrorRateInsight
	// are valid Insight types.
	//
	// The ApiCallRateInsight Insights type analyzes write-only management API calls
	// that are aggregated per minute against a baseline API call volume.
	//
	// The ApiErrorRateInsight Insights type analyzes management API calls that
	// result in error codes. The error is shown if the API call is unsuccessful.
	InsightType *string `type:"string" enum:"InsightType"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsightSelector) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsightSelector) GoString() string {
	return s.String()
}

// SetInsightType sets the InsightType field's value.
func (s *InsightSelector) SetInsightType(v string) *InsightSelector {
	s.InsightType = &v
	return s
}

// This exception is thrown when the IAM identity that is used to create the
// organization resource lacks one or more required permissions for creating
// an organization resource in a required service.
type InsufficientDependencyServiceAccessPermissionException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientDependencyServiceAccessPermissionException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientDependencyServiceAccessPermissionException) GoString() string {
	return s.String()
}

func newErrorInsufficientDependencyServiceAccessPermissionException(v protocol.ResponseMetadata) error {
	return &InsufficientDependencyServiceAccessPermissionException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InsufficientDependencyServiceAccessPermissionException) Code() string {
	return "InsufficientDependencyServiceAccessPermissionException"
}

// Message returns the exception's message.
func (s *InsufficientDependencyServiceAccessPermissionException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InsufficientDependencyServiceAccessPermissionException) OrigErr() error {
	return nil
}

func (s *InsufficientDependencyServiceAccessPermissionException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InsufficientDependencyServiceAccessPermissionException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InsufficientDependencyServiceAccessPermissionException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the policy on the S3 bucket or KMS key does
// not have sufficient permissions for the operation.
type InsufficientEncryptionPolicyException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientEncryptionPolicyException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientEncryptionPolicyException) GoString() string {
	return s.String()
}

func newErrorInsufficientEncryptionPolicyException(v protocol.ResponseMetadata) error {
	return &InsufficientEncryptionPolicyException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InsufficientEncryptionPolicyException) Code() string {
	return "InsufficientEncryptionPolicyException"
}

// Message returns the exception's message.
func (s *InsufficientEncryptionPolicyException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InsufficientEncryptionPolicyException) OrigErr() error {
	return nil
}

func (s *InsufficientEncryptionPolicyException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InsufficientEncryptionPolicyException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InsufficientEncryptionPolicyException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the policy on the S3 bucket is not sufficient.
type InsufficientS3BucketPolicyException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientS3BucketPolicyException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientS3BucketPolicyException) GoString() string {
	return s.String()
}

func newErrorInsufficientS3BucketPolicyException(v protocol.ResponseMetadata) error {
	return &InsufficientS3BucketPolicyException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InsufficientS3BucketPolicyException) Code() string {
	return "InsufficientS3BucketPolicyException"
}

// Message returns the exception's message.
func (s *InsufficientS3BucketPolicyException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InsufficientS3BucketPolicyException) OrigErr() error {
	return nil
}

func (s *InsufficientS3BucketPolicyException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InsufficientS3BucketPolicyException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InsufficientS3BucketPolicyException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the policy on the Amazon SNS topic is not sufficient.
type InsufficientSnsTopicPolicyException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientSnsTopicPolicyException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InsufficientSnsTopicPolicyException) GoString() string {
	return s.String()
}

func newErrorInsufficientSnsTopicPolicyException(v protocol.ResponseMetadata) error {
	return &InsufficientSnsTopicPolicyException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InsufficientSnsTopicPolicyException) Code() string {
	return "InsufficientSnsTopicPolicyException"
}

// Message returns the exception's message.
func (s *InsufficientSnsTopicPolicyException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InsufficientSnsTopicPolicyException) OrigErr() error {
	return nil
}

func (s *InsufficientSnsTopicPolicyException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InsufficientSnsTopicPolicyException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InsufficientSnsTopicPolicyException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided CloudWatch Logs log group is not
// valid.
type InvalidCloudWatchLogsLogGroupArnException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidCloudWatchLogsLogGroupArnException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidCloudWatchLogsLogGroupArnException) GoString() string {
	return s.String()
}

func newErrorInvalidCloudWatchLogsLogGroupArnException(v protocol.ResponseMetadata) error {
	return &InvalidCloudWatchLogsLogGroupArnException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidCloudWatchLogsLogGroupArnException) Code() string {
	return "InvalidCloudWatchLogsLogGroupArnException"
}

// Message returns the exception's message.
func (s *InvalidCloudWatchLogsLogGroupArnException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidCloudWatchLogsLogGroupArnException) OrigErr() error {
	return nil
}

func (s *InvalidCloudWatchLogsLogGroupArnException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidCloudWatchLogsLogGroupArnException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidCloudWatchLogsLogGroupArnException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided role is not valid.
type InvalidCloudWatchLogsRoleArnException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidCloudWatchLogsRoleArnException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidCloudWatchLogsRoleArnException) GoString() string {
	return s.String()
}

func newErrorInvalidCloudWatchLogsRoleArnException(v protocol.ResponseMetadata) error {
	return &InvalidCloudWatchLogsRoleArnException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidCloudWatchLogsRoleArnException) Code() string {
	return "InvalidCloudWatchLogsRoleArnException"
}

// Message returns the exception's message.
func (s *InvalidCloudWatchLogsRoleArnException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidCloudWatchLogsRoleArnException) OrigErr() error {
	return nil
}

func (s *InvalidCloudWatchLogsRoleArnException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidCloudWatchLogsRoleArnException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidCloudWatchLogsRoleArnException) RequestID() string {
	return s.RespMetadata.RequestID
}

// A date range for the query was specified that is not valid. Be sure that
// the start time is chronologically before the end time. For more information
// about writing a query, see Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
// in the CloudTrail User Guide.
type InvalidDateRangeException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidDateRangeException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidDateRangeException) GoString() string {
	return s.String()
}

func newErrorInvalidDateRangeException(v protocol.ResponseMetadata) error {
	return &InvalidDateRangeException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidDateRangeException) Code() string {
	return "InvalidDateRangeException"
}

// Message returns the exception's message.
func (s *InvalidDateRangeException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidDateRangeException) OrigErr() error {
	return nil
}

func (s *InvalidDateRangeException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidDateRangeException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidDateRangeException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Occurs if an event category that is not valid is specified as a value of
// EventCategory.
type InvalidEventCategoryException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventCategoryException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventCategoryException) GoString() string {
	return s.String()
}

func newErrorInvalidEventCategoryException(v protocol.ResponseMetadata) error {
	return &InvalidEventCategoryException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidEventCategoryException) Code() string {
	return "InvalidEventCategoryException"
}

// Message returns the exception's message.
func (s *InvalidEventCategoryException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidEventCategoryException) OrigErr() error {
	return nil
}

func (s *InvalidEventCategoryException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidEventCategoryException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidEventCategoryException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when event categories of specified event data stores
// are not valid.
type InvalidEventDataStoreCategoryException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventDataStoreCategoryException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventDataStoreCategoryException) GoString() string {
	return s.String()
}

func newErrorInvalidEventDataStoreCategoryException(v protocol.ResponseMetadata) error {
	return &InvalidEventDataStoreCategoryException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidEventDataStoreCategoryException) Code() string {
	return "InvalidEventDataStoreCategoryException"
}

// Message returns the exception's message.
func (s *InvalidEventDataStoreCategoryException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidEventDataStoreCategoryException) OrigErr() error {
	return nil
}

func (s *InvalidEventDataStoreCategoryException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidEventDataStoreCategoryException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidEventDataStoreCategoryException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The event data store is not in a status that supports the operation.
type InvalidEventDataStoreStatusException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventDataStoreStatusException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventDataStoreStatusException) GoString() string {
	return s.String()
}

func newErrorInvalidEventDataStoreStatusException(v protocol.ResponseMetadata) error {
	return &InvalidEventDataStoreStatusException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidEventDataStoreStatusException) Code() string {
	return "InvalidEventDataStoreStatusException"
}

// Message returns the exception's message.
func (s *InvalidEventDataStoreStatusException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidEventDataStoreStatusException) OrigErr() error {
	return nil
}

func (s *InvalidEventDataStoreStatusException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidEventDataStoreStatusException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidEventDataStoreStatusException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the PutEventSelectors operation is called with
// a number of event selectors, advanced event selectors, or data resources
// that is not valid. The combination of event selectors or advanced event selectors
// and data resources is not valid. A trail can have up to 5 event selectors.
// If a trail uses advanced event selectors, a maximum of 500 total values for
// all conditions in all advanced event selectors is allowed. A trail is limited
// to 250 data resources. These data resources can be distributed across event
// selectors, but the overall total cannot exceed 250.
//
// You can:
//
//   - Specify a valid number of event selectors (1 to 5) for a trail.
//
//   - Specify a valid number of data resources (1 to 250) for an event selector.
//     The limit of number of resources on an individual event selector is configurable
//     up to 250. However, this upper limit is allowed only if the total number
//     of data resources does not exceed 250 across all event selectors for a
//     trail.
//
//   - Specify up to 500 values for all conditions in all advanced event selectors
//     for a trail.
//
//   - Specify a valid value for a parameter. For example, specifying the ReadWriteType
//     parameter with a value of read-only is not valid.
type InvalidEventSelectorsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventSelectorsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidEventSelectorsException) GoString() string {
	return s.String()
}

func newErrorInvalidEventSelectorsException(v protocol.ResponseMetadata) error {
	return &InvalidEventSelectorsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidEventSelectorsException) Code() string {
	return "InvalidEventSelectorsException"
}

// Message returns the exception's message.
func (s *InvalidEventSelectorsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidEventSelectorsException) OrigErr() error {
	return nil
}

func (s *InvalidEventSelectorsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidEventSelectorsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidEventSelectorsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when an operation is called on a trail from a Region
// other than the Region in which the trail was created.
type InvalidHomeRegionException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidHomeRegionException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidHomeRegionException) GoString() string {
	return s.String()
}

func newErrorInvalidHomeRegionException(v protocol.ResponseMetadata) error {
	return &InvalidHomeRegionException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidHomeRegionException) Code() string {
	return "InvalidHomeRegionException"
}

// Message returns the exception's message.
func (s *InvalidHomeRegionException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidHomeRegionException) OrigErr() error {
	return nil
}

func (s *InvalidHomeRegionException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidHomeRegionException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidHomeRegionException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided source S3 bucket is not valid
// for import.
type InvalidImportSourceException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidImportSourceException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidImportSourceException) GoString() string {
	return s.String()
}

func newErrorInvalidImportSourceException(v protocol.ResponseMetadata) error {
	return &InvalidImportSourceException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidImportSourceException) Code() string {
	return "InvalidImportSourceException"
}

// Message returns the exception's message.
func (s *InvalidImportSourceException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidImportSourceException) OrigErr() error {
	return nil
}

func (s *InvalidImportSourceException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidImportSourceException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidImportSourceException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
// or GetInsightSelectors request is not valid, or the specified insight type
// in the InsightSelectors statement is not a valid insight type.
type InvalidInsightSelectorsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidInsightSelectorsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidInsightSelectorsException) GoString() string {
	return s.String()
}

func newErrorInvalidInsightSelectorsException(v protocol.ResponseMetadata) error {
	return &InvalidInsightSelectorsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidInsightSelectorsException) Code() string {
	return "InvalidInsightSelectorsException"
}

// Message returns the exception's message.
func (s *InvalidInsightSelectorsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidInsightSelectorsException) OrigErr() error {
	return nil
}

func (s *InvalidInsightSelectorsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidInsightSelectorsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidInsightSelectorsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the KMS key ARN is not valid.
type InvalidKmsKeyIdException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidKmsKeyIdException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidKmsKeyIdException) GoString() string {
	return s.String()
}

func newErrorInvalidKmsKeyIdException(v protocol.ResponseMetadata) error {
	return &InvalidKmsKeyIdException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidKmsKeyIdException) Code() string {
	return "InvalidKmsKeyIdException"
}

// Message returns the exception's message.
func (s *InvalidKmsKeyIdException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidKmsKeyIdException) OrigErr() error {
	return nil
}

func (s *InvalidKmsKeyIdException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidKmsKeyIdException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidKmsKeyIdException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Occurs when a lookup attribute is specified that is not valid.
type InvalidLookupAttributesException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidLookupAttributesException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidLookupAttributesException) GoString() string {
	return s.String()
}

func newErrorInvalidLookupAttributesException(v protocol.ResponseMetadata) error {
	return &InvalidLookupAttributesException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidLookupAttributesException) Code() string {
	return "InvalidLookupAttributesException"
}

// Message returns the exception's message.
func (s *InvalidLookupAttributesException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidLookupAttributesException) OrigErr() error {
	return nil
}

func (s *InvalidLookupAttributesException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidLookupAttributesException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidLookupAttributesException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown if the limit specified is not valid.
type InvalidMaxResultsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidMaxResultsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidMaxResultsException) GoString() string {
	return s.String()
}

func newErrorInvalidMaxResultsException(v protocol.ResponseMetadata) error {
	return &InvalidMaxResultsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidMaxResultsException) Code() string {
	return "InvalidMaxResultsException"
}

// Message returns the exception's message.
func (s *InvalidMaxResultsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidMaxResultsException) OrigErr() error {
	return nil
}

func (s *InvalidMaxResultsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidMaxResultsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidMaxResultsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// A token that is not valid, or a token that was previously used in a request
// with different parameters. This exception is thrown if the token is not valid.
type InvalidNextTokenException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidNextTokenException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidNextTokenException) GoString() string {
	return s.String()
}

func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error {
	return &InvalidNextTokenException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidNextTokenException) Code() string {
	return "InvalidNextTokenException"
}

// Message returns the exception's message.
func (s *InvalidNextTokenException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidNextTokenException) OrigErr() error {
	return nil
}

func (s *InvalidNextTokenException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidNextTokenException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidNextTokenException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the combination of parameters provided is not
// valid.
type InvalidParameterCombinationException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidParameterCombinationException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidParameterCombinationException) GoString() string {
	return s.String()
}

func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error {
	return &InvalidParameterCombinationException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidParameterCombinationException) Code() string {
	return "InvalidParameterCombinationException"
}

// Message returns the exception's message.
func (s *InvalidParameterCombinationException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidParameterCombinationException) OrigErr() error {
	return nil
}

func (s *InvalidParameterCombinationException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidParameterCombinationException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidParameterCombinationException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The request includes a parameter that is not valid.
type InvalidParameterException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidParameterException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidParameterException) GoString() string {
	return s.String()
}

func newErrorInvalidParameterException(v protocol.ResponseMetadata) error {
	return &InvalidParameterException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidParameterException) Code() string {
	return "InvalidParameterException"
}

// Message returns the exception's message.
func (s *InvalidParameterException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidParameterException) OrigErr() error {
	return nil
}

func (s *InvalidParameterException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidParameterException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidParameterException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The query that was submitted has validation errors, or uses incorrect syntax
// or unsupported keywords. For more information about writing a query, see
// Create or edit a query (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html)
// in the CloudTrail User Guide.
type InvalidQueryStatementException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidQueryStatementException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidQueryStatementException) GoString() string {
	return s.String()
}

func newErrorInvalidQueryStatementException(v protocol.ResponseMetadata) error {
	return &InvalidQueryStatementException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidQueryStatementException) Code() string {
	return "InvalidQueryStatementException"
}

// Message returns the exception's message.
func (s *InvalidQueryStatementException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidQueryStatementException) OrigErr() error {
	return nil
}

func (s *InvalidQueryStatementException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidQueryStatementException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidQueryStatementException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The query status is not valid for the operation.
type InvalidQueryStatusException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidQueryStatusException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidQueryStatusException) GoString() string {
	return s.String()
}

func newErrorInvalidQueryStatusException(v protocol.ResponseMetadata) error {
	return &InvalidQueryStatusException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidQueryStatusException) Code() string {
	return "InvalidQueryStatusException"
}

// Message returns the exception's message.
func (s *InvalidQueryStatusException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidQueryStatusException) OrigErr() error {
	return nil
}

func (s *InvalidQueryStatusException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidQueryStatusException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidQueryStatusException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided S3 bucket name is not valid.
type InvalidS3BucketNameException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidS3BucketNameException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidS3BucketNameException) GoString() string {
	return s.String()
}

func newErrorInvalidS3BucketNameException(v protocol.ResponseMetadata) error {
	return &InvalidS3BucketNameException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidS3BucketNameException) Code() string {
	return "InvalidS3BucketNameException"
}

// Message returns the exception's message.
func (s *InvalidS3BucketNameException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidS3BucketNameException) OrigErr() error {
	return nil
}

func (s *InvalidS3BucketNameException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidS3BucketNameException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidS3BucketNameException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided S3 prefix is not valid.
type InvalidS3PrefixException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidS3PrefixException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidS3PrefixException) GoString() string {
	return s.String()
}

func newErrorInvalidS3PrefixException(v protocol.ResponseMetadata) error {
	return &InvalidS3PrefixException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidS3PrefixException) Code() string {
	return "InvalidS3PrefixException"
}

// Message returns the exception's message.
func (s *InvalidS3PrefixException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidS3PrefixException) OrigErr() error {
	return nil
}

func (s *InvalidS3PrefixException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidS3PrefixException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidS3PrefixException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided SNS topic name is not valid.
type InvalidSnsTopicNameException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidSnsTopicNameException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidSnsTopicNameException) GoString() string {
	return s.String()
}

func newErrorInvalidSnsTopicNameException(v protocol.ResponseMetadata) error {
	return &InvalidSnsTopicNameException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidSnsTopicNameException) Code() string {
	return "InvalidSnsTopicNameException"
}

// Message returns the exception's message.
func (s *InvalidSnsTopicNameException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidSnsTopicNameException) OrigErr() error {
	return nil
}

func (s *InvalidSnsTopicNameException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidSnsTopicNameException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidSnsTopicNameException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified value of Source is not valid.
type InvalidSourceException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidSourceException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidSourceException) GoString() string {
	return s.String()
}

func newErrorInvalidSourceException(v protocol.ResponseMetadata) error {
	return &InvalidSourceException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidSourceException) Code() string {
	return "InvalidSourceException"
}

// Message returns the exception's message.
func (s *InvalidSourceException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidSourceException) OrigErr() error {
	return nil
}

func (s *InvalidSourceException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidSourceException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidSourceException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified tag key or values are not valid.
// It can also occur if there are duplicate tags or too many tags on the resource.
type InvalidTagParameterException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTagParameterException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTagParameterException) GoString() string {
	return s.String()
}

func newErrorInvalidTagParameterException(v protocol.ResponseMetadata) error {
	return &InvalidTagParameterException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidTagParameterException) Code() string {
	return "InvalidTagParameterException"
}

// Message returns the exception's message.
func (s *InvalidTagParameterException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidTagParameterException) OrigErr() error {
	return nil
}

func (s *InvalidTagParameterException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidTagParameterException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidTagParameterException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Occurs if the timestamp values are not valid. Either the start time occurs
// after the end time, or the time range is outside the range of possible values.
type InvalidTimeRangeException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTimeRangeException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTimeRangeException) GoString() string {
	return s.String()
}

func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error {
	return &InvalidTimeRangeException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidTimeRangeException) Code() string {
	return "InvalidTimeRangeException"
}

// Message returns the exception's message.
func (s *InvalidTimeRangeException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidTimeRangeException) OrigErr() error {
	return nil
}

func (s *InvalidTimeRangeException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidTimeRangeException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidTimeRangeException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Reserved for future use.
type InvalidTokenException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTokenException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTokenException) GoString() string {
	return s.String()
}

func newErrorInvalidTokenException(v protocol.ResponseMetadata) error {
	return &InvalidTokenException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidTokenException) Code() string {
	return "InvalidTokenException"
}

// Message returns the exception's message.
func (s *InvalidTokenException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidTokenException) OrigErr() error {
	return nil
}

func (s *InvalidTokenException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidTokenException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidTokenException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the provided trail name is not valid. Trail
// names must meet the following requirements:
//
//   - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
//     (_), or dashes (-)
//
//   - Start with a letter or number, and end with a letter or number
//
//   - Be between 3 and 128 characters
//
//   - Have no adjacent periods, underscores or dashes. Names like my-_namespace
//     and my--namespace are not valid.
//
//   - Not be in IP address format (for example, 192.168.5.4)
type InvalidTrailNameException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTrailNameException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s InvalidTrailNameException) GoString() string {
	return s.String()
}

func newErrorInvalidTrailNameException(v protocol.ResponseMetadata) error {
	return &InvalidTrailNameException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *InvalidTrailNameException) Code() string {
	return "InvalidTrailNameException"
}

// Message returns the exception's message.
func (s *InvalidTrailNameException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InvalidTrailNameException) OrigErr() error {
	return nil
}

func (s *InvalidTrailNameException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *InvalidTrailNameException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *InvalidTrailNameException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when there is an issue with the specified KMS key
// and the trail or event data store can't be updated.
type KmsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s KmsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s KmsException) GoString() string {
	return s.String()
}

func newErrorKmsException(v protocol.ResponseMetadata) error {
	return &KmsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *KmsException) Code() string {
	return "KmsException"
}

// Message returns the exception's message.
func (s *KmsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *KmsException) OrigErr() error {
	return nil
}

func (s *KmsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *KmsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *KmsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is no longer in use.
//
// Deprecated: KmsKeyDisabledException has been deprecated
type KmsKeyDisabledException struct {
	_            struct{}                  `deprecated:"true" type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s KmsKeyDisabledException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s KmsKeyDisabledException) GoString() string {
	return s.String()
}

func newErrorKmsKeyDisabledException(v protocol.ResponseMetadata) error {
	return &KmsKeyDisabledException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *KmsKeyDisabledException) Code() string {
	return "KmsKeyDisabledException"
}

// Message returns the exception's message.
func (s *KmsKeyDisabledException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *KmsKeyDisabledException) OrigErr() error {
	return nil
}

func (s *KmsKeyDisabledException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *KmsKeyDisabledException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *KmsKeyDisabledException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the KMS key does not exist, when the S3 bucket
// and the KMS key are not in the same Region, or when the KMS key associated
// with the Amazon SNS topic either does not exist or is not in the same Region.
type KmsKeyNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s KmsKeyNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s KmsKeyNotFoundException) GoString() string {
	return s.String()
}

func newErrorKmsKeyNotFoundException(v protocol.ResponseMetadata) error {
	return &KmsKeyNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *KmsKeyNotFoundException) Code() string {
	return "KmsKeyNotFoundException"
}

// Message returns the exception's message.
func (s *KmsKeyNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *KmsKeyNotFoundException) OrigErr() error {
	return nil
}

func (s *KmsKeyNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *KmsKeyNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *KmsKeyNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

type ListChannelsInput struct {
	_ struct{} `type:"structure"`

	// The maximum number of CloudTrail channels to display on a single page.
	MaxResults *int64 `min:"1" type:"integer"`

	// The token to use to get the next page of results after a previous API call.
	// This token must be passed in with the same parameters that were specified
	// in the original call. For example, if the original call specified an AttributeKey
	// of 'Username' with a value of 'root', the call with NextToken should include
	// those same parameters.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListChannelsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListChannelsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListChannelsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"}
	if s.MaxResults != nil && *s.MaxResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 4 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput {
	s.NextToken = &v
	return s
}

type ListChannelsOutput struct {
	_ struct{} `type:"structure"`

	// The list of channels in the account.
	Channels []*Channel `type:"list"`

	// The token to use to get the next page of results after a previous API call.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListChannelsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListChannelsOutput) GoString() string {
	return s.String()
}

// SetChannels sets the Channels field's value.
func (s *ListChannelsOutput) SetChannels(v []*Channel) *ListChannelsOutput {
	s.Channels = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput {
	s.NextToken = &v
	return s
}

type ListEventDataStoresInput struct {
	_ struct{} `type:"structure"`

	// The maximum number of event data stores to display on a single page.
	MaxResults *int64 `min:"1" type:"integer"`

	// A token you can use to get the next page of event data store results.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListEventDataStoresInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListEventDataStoresInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListEventDataStoresInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListEventDataStoresInput"}
	if s.MaxResults != nil && *s.MaxResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 4 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListEventDataStoresInput) SetMaxResults(v int64) *ListEventDataStoresInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListEventDataStoresInput) SetNextToken(v string) *ListEventDataStoresInput {
	s.NextToken = &v
	return s
}

type ListEventDataStoresOutput struct {
	_ struct{} `type:"structure"`

	// Contains information about event data stores in the account, in the current
	// Region.
	EventDataStores []*EventDataStore `type:"list"`

	// A token you can use to get the next page of results.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListEventDataStoresOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListEventDataStoresOutput) GoString() string {
	return s.String()
}

// SetEventDataStores sets the EventDataStores field's value.
func (s *ListEventDataStoresOutput) SetEventDataStores(v []*EventDataStore) *ListEventDataStoresOutput {
	s.EventDataStores = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListEventDataStoresOutput) SetNextToken(v string) *ListEventDataStoresOutput {
	s.NextToken = &v
	return s
}

type ListImportFailuresInput struct {
	_ struct{} `type:"structure"`

	// The ID of the import.
	//
	// ImportId is a required field
	ImportId *string `min:"36" type:"string" required:"true"`

	// The maximum number of failures to display on a single page.
	MaxResults *int64 `min:"1" type:"integer"`

	// A token you can use to get the next page of import failures.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportFailuresInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportFailuresInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListImportFailuresInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListImportFailuresInput"}
	if s.ImportId == nil {
		invalidParams.Add(request.NewErrParamRequired("ImportId"))
	}
	if s.ImportId != nil && len(*s.ImportId) < 36 {
		invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
	}
	if s.MaxResults != nil && *s.MaxResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 4 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetImportId sets the ImportId field's value.
func (s *ListImportFailuresInput) SetImportId(v string) *ListImportFailuresInput {
	s.ImportId = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListImportFailuresInput) SetMaxResults(v int64) *ListImportFailuresInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListImportFailuresInput) SetNextToken(v string) *ListImportFailuresInput {
	s.NextToken = &v
	return s
}

type ListImportFailuresOutput struct {
	_ struct{} `type:"structure"`

	// Contains information about the import failures.
	Failures []*ImportFailureListItem `type:"list"`

	// A token you can use to get the next page of results.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportFailuresOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportFailuresOutput) GoString() string {
	return s.String()
}

// SetFailures sets the Failures field's value.
func (s *ListImportFailuresOutput) SetFailures(v []*ImportFailureListItem) *ListImportFailuresOutput {
	s.Failures = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListImportFailuresOutput) SetNextToken(v string) *ListImportFailuresOutput {
	s.NextToken = &v
	return s
}

type ListImportsInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the destination event data store.
	Destination *string `min:"3" type:"string"`

	// The status of the import.
	ImportStatus *string `type:"string" enum:"ImportStatus"`

	// The maximum number of imports to display on a single page.
	MaxResults *int64 `min:"1" type:"integer"`

	// A token you can use to get the next page of import results.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListImportsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListImportsInput"}
	if s.Destination != nil && len(*s.Destination) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Destination", 3))
	}
	if s.MaxResults != nil && *s.MaxResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 4 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDestination sets the Destination field's value.
func (s *ListImportsInput) SetDestination(v string) *ListImportsInput {
	s.Destination = &v
	return s
}

// SetImportStatus sets the ImportStatus field's value.
func (s *ListImportsInput) SetImportStatus(v string) *ListImportsInput {
	s.ImportStatus = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListImportsInput) SetMaxResults(v int64) *ListImportsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListImportsInput) SetNextToken(v string) *ListImportsInput {
	s.NextToken = &v
	return s
}

type ListImportsOutput struct {
	_ struct{} `type:"structure"`

	// The list of returned imports.
	Imports []*ImportsListItem `type:"list"`

	// A token you can use to get the next page of import results.
	NextToken *string `min:"4" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListImportsOutput) GoString() string {
	return s.String()
}

// SetImports sets the Imports field's value.
func (s *ListImportsOutput) SetImports(v []*ImportsListItem) *ListImportsOutput {
	s.Imports = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListImportsOutput) SetNextToken(v string) *ListImportsOutput {
	s.NextToken = &v
	return s
}

// Requests the public keys for a specified time range.
type ListPublicKeysInput struct {
	_ struct{} `type:"structure"`

	// Optionally specifies, in UTC, the end of the time range to look up public
	// keys for CloudTrail digest files. If not specified, the current time is used.
	EndTime *time.Time `type:"timestamp"`

	// Reserved for future use.
	NextToken *string `type:"string"`

	// Optionally specifies, in UTC, the start of the time range to look up public
	// keys for CloudTrail digest files. If not specified, the current time is used,
	// and the current public key is returned.
	StartTime *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListPublicKeysInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListPublicKeysInput) GoString() string {
	return s.String()
}

// SetEndTime sets the EndTime field's value.
func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput {
	s.EndTime = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput {
	s.NextToken = &v
	return s
}

// SetStartTime sets the StartTime field's value.
func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput {
	s.StartTime = &v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type ListPublicKeysOutput struct {
	_ struct{} `type:"structure"`

	// Reserved for future use.
	NextToken *string `type:"string"`

	// Contains an array of PublicKey objects.
	//
	// The returned public keys may have validity time ranges that overlap.
	PublicKeyList []*PublicKey `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListPublicKeysOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListPublicKeysOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput {
	s.NextToken = &v
	return s
}

// SetPublicKeyList sets the PublicKeyList field's value.
func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput {
	s.PublicKeyList = v
	return s
}

type ListQueriesInput struct {
	_ struct{} `type:"structure"`

	// Use with StartTime to bound a ListQueries request, and limit its results
	// to only those queries run within a specified time period.
	EndTime *time.Time `type:"timestamp"`

	// The ARN (or the ID suffix of the ARN) of an event data store on which queries
	// were run.
	//
	// EventDataStore is a required field
	EventDataStore *string `min:"3" type:"string" required:"true"`

	// The maximum number of queries to show on a page.
	MaxResults *int64 `min:"1" type:"integer"`

	// A token you can use to get the next page of results.
	NextToken *string `min:"4" type:"string"`

	// The status of queries that you want to return in results. Valid values for
	// QueryStatus include QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT, or CANCELLED.
	QueryStatus *string `type:"string" enum:"QueryStatus"`

	// Use with EndTime to bound a ListQueries request, and limit its results to
	// only those queries run within a specified time period.
	StartTime *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListQueriesInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListQueriesInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListQueriesInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListQueriesInput"}
	if s.EventDataStore == nil {
		invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
	}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}
	if s.MaxResults != nil && *s.MaxResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
	}
	if s.NextToken != nil && len(*s.NextToken) < 4 {
		invalidParams.Add(request.NewErrParamMinLen("NextToken", 4))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEndTime sets the EndTime field's value.
func (s *ListQueriesInput) SetEndTime(v time.Time) *ListQueriesInput {
	s.EndTime = &v
	return s
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *ListQueriesInput) SetEventDataStore(v string) *ListQueriesInput {
	s.EventDataStore = &v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *ListQueriesInput) SetMaxResults(v int64) *ListQueriesInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *ListQueriesInput) SetNextToken(v string) *ListQueriesInput {
	s.NextToken = &v
	return s
}

// SetQueryStatus sets the QueryStatus field's value.
func (s *ListQueriesInput) SetQueryStatus(v string) *ListQueriesInput {
	s.QueryStatus = &v
	return s
}

// SetStartTime sets the StartTime field's value.
func (s *ListQueriesInput) SetStartTime(v time.Time) *ListQueriesInput {
	s.StartTime = &v
	return s
}

type ListQueriesOutput struct {
	_ struct{} `type:"structure"`

	// A token you can use to get the next page of results.
	NextToken *string `min:"4" type:"string"`

	// Lists matching query results, and shows query ID, status, and creation time
	// of each query.
	Queries []*Query `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListQueriesOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListQueriesOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListQueriesOutput) SetNextToken(v string) *ListQueriesOutput {
	s.NextToken = &v
	return s
}

// SetQueries sets the Queries field's value.
func (s *ListQueriesOutput) SetQueries(v []*Query) *ListQueriesOutput {
	s.Queries = v
	return s
}

// Specifies a list of tags to return.
type ListTagsInput struct {
	_ struct{} `type:"structure"`

	// Reserved for future use.
	NextToken *string `type:"string"`

	// Specifies a list of trail, event data store, or channel ARNs whose tags will
	// be listed. The list has a limit of 20 ARNs.
	//
	// Example trail ARN format: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
	//
	// Example channel ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
	//
	// ResourceIdList is a required field
	ResourceIdList []*string `type:"list" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTagsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTagsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *ListTagsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
	if s.ResourceIdList == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceIdList"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetNextToken sets the NextToken field's value.
func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
	s.NextToken = &v
	return s
}

// SetResourceIdList sets the ResourceIdList field's value.
func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput {
	s.ResourceIdList = v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type ListTagsOutput struct {
	_ struct{} `type:"structure"`

	// Reserved for future use.
	NextToken *string `type:"string"`

	// A list of resource tags.
	ResourceTagList []*ResourceTag `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTagsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTagsOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
	s.NextToken = &v
	return s
}

// SetResourceTagList sets the ResourceTagList field's value.
func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput {
	s.ResourceTagList = v
	return s
}

type ListTrailsInput struct {
	_ struct{} `type:"structure"`

	// The token to use to get the next page of results after a previous API call.
	// This token must be passed in with the same parameters that were specified
	// in the original call. For example, if the original call specified an AttributeKey
	// of 'Username' with a value of 'root', the call with NextToken should include
	// those same parameters.
	NextToken *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTrailsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTrailsInput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListTrailsInput) SetNextToken(v string) *ListTrailsInput {
	s.NextToken = &v
	return s
}

type ListTrailsOutput struct {
	_ struct{} `type:"structure"`

	// The token to use to get the next page of results after a previous API call.
	// If the token does not appear, there are no more results to return. The token
	// must be passed in with the same parameters as the previous call. For example,
	// if the original call specified an AttributeKey of 'Username' with a value
	// of 'root', the call with NextToken should include those same parameters.
	NextToken *string `type:"string"`

	// Returns the name, ARN, and home Region of trails in the current account.
	Trails []*TrailInfo `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTrailsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ListTrailsOutput) GoString() string {
	return s.String()
}

// SetNextToken sets the NextToken field's value.
func (s *ListTrailsOutput) SetNextToken(v string) *ListTrailsOutput {
	s.NextToken = &v
	return s
}

// SetTrails sets the Trails field's value.
func (s *ListTrailsOutput) SetTrails(v []*TrailInfo) *ListTrailsOutput {
	s.Trails = v
	return s
}

// Specifies an attribute and value that filter the events returned.
type LookupAttribute struct {
	_ struct{} `type:"structure"`

	// Specifies an attribute on which to filter the events returned.
	//
	// AttributeKey is a required field
	AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"`

	// Specifies a value for the specified AttributeKey.
	//
	// AttributeValue is a required field
	AttributeValue *string `min:"1" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s LookupAttribute) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s LookupAttribute) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *LookupAttribute) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"}
	if s.AttributeKey == nil {
		invalidParams.Add(request.NewErrParamRequired("AttributeKey"))
	}
	if s.AttributeValue == nil {
		invalidParams.Add(request.NewErrParamRequired("AttributeValue"))
	}
	if s.AttributeValue != nil && len(*s.AttributeValue) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("AttributeValue", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAttributeKey sets the AttributeKey field's value.
func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute {
	s.AttributeKey = &v
	return s
}

// SetAttributeValue sets the AttributeValue field's value.
func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute {
	s.AttributeValue = &v
	return s
}

// Contains a request for LookupEvents.
type LookupEventsInput struct {
	_ struct{} `type:"structure"`

	// Specifies that only events that occur before or at the specified time are
	// returned. If the specified end time is before the specified start time, an
	// error is returned.
	EndTime *time.Time `type:"timestamp"`

	// Specifies the event category. If you do not specify an event category, events
	// of the category are not returned in the response. For example, if you do
	// not specify insight as the value of EventCategory, no Insights events are
	// returned.
	EventCategory *string `type:"string" enum:"EventCategory"`

	// Contains a list of lookup attributes. Currently the list can contain only
	// one item.
	LookupAttributes []*LookupAttribute `type:"list"`

	// The number of events to return. Possible values are 1 through 50. The default
	// is 50.
	MaxResults *int64 `min:"1" type:"integer"`

	// The token to use to get the next page of results after a previous API call.
	// This token must be passed in with the same parameters that were specified
	// in the original call. For example, if the original call specified an AttributeKey
	// of 'Username' with a value of 'root', the call with NextToken should include
	// those same parameters.
	NextToken *string `type:"string"`

	// Specifies that only events that occur after or at the specified time are
	// returned. If the specified start time is after the specified end time, an
	// error is returned.
	StartTime *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s LookupEventsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s LookupEventsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *LookupEventsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"}
	if s.MaxResults != nil && *s.MaxResults < 1 {
		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
	}
	if s.LookupAttributes != nil {
		for i, v := range s.LookupAttributes {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEndTime sets the EndTime field's value.
func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput {
	s.EndTime = &v
	return s
}

// SetEventCategory sets the EventCategory field's value.
func (s *LookupEventsInput) SetEventCategory(v string) *LookupEventsInput {
	s.EventCategory = &v
	return s
}

// SetLookupAttributes sets the LookupAttributes field's value.
func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput {
	s.LookupAttributes = v
	return s
}

// SetMaxResults sets the MaxResults field's value.
func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput {
	s.MaxResults = &v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput {
	s.NextToken = &v
	return s
}

// SetStartTime sets the StartTime field's value.
func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput {
	s.StartTime = &v
	return s
}

// Contains a response to a LookupEvents action.
type LookupEventsOutput struct {
	_ struct{} `type:"structure"`

	// A list of events returned based on the lookup attributes specified and the
	// CloudTrail event. The events list is sorted by time. The most recent event
	// is listed first.
	Events []*Event `type:"list"`

	// The token to use to get the next page of results after a previous API call.
	// If the token does not appear, there are no more results to return. The token
	// must be passed in with the same parameters as the previous call. For example,
	// if the original call specified an AttributeKey of 'Username' with a value
	// of 'root', the call with NextToken should include those same parameters.
	NextToken *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s LookupEventsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s LookupEventsOutput) GoString() string {
	return s.String()
}

// SetEvents sets the Events field's value.
func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput {
	s.Events = v
	return s
}

// SetNextToken sets the NextToken field's value.
func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput {
	s.NextToken = &v
	return s
}

// You are already running the maximum number of concurrent queries. Wait a
// minute for some queries to finish, and then run the query again.
type MaxConcurrentQueriesException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MaxConcurrentQueriesException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MaxConcurrentQueriesException) GoString() string {
	return s.String()
}

func newErrorMaxConcurrentQueriesException(v protocol.ResponseMetadata) error {
	return &MaxConcurrentQueriesException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *MaxConcurrentQueriesException) Code() string {
	return "MaxConcurrentQueriesException"
}

// Message returns the exception's message.
func (s *MaxConcurrentQueriesException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *MaxConcurrentQueriesException) OrigErr() error {
	return nil
}

func (s *MaxConcurrentQueriesException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *MaxConcurrentQueriesException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *MaxConcurrentQueriesException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the maximum number of trails is reached.
type MaximumNumberOfTrailsExceededException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MaximumNumberOfTrailsExceededException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s MaximumNumberOfTrailsExceededException) GoString() string {
	return s.String()
}

func newErrorMaximumNumberOfTrailsExceededException(v protocol.ResponseMetadata) error {
	return &MaximumNumberOfTrailsExceededException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *MaximumNumberOfTrailsExceededException) Code() string {
	return "MaximumNumberOfTrailsExceededException"
}

// Message returns the exception's message.
func (s *MaximumNumberOfTrailsExceededException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *MaximumNumberOfTrailsExceededException) OrigErr() error {
	return nil
}

func (s *MaximumNumberOfTrailsExceededException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *MaximumNumberOfTrailsExceededException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *MaximumNumberOfTrailsExceededException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the management account does not have a service-linked
// role.
type NoManagementAccountSLRExistsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NoManagementAccountSLRExistsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NoManagementAccountSLRExistsException) GoString() string {
	return s.String()
}

func newErrorNoManagementAccountSLRExistsException(v protocol.ResponseMetadata) error {
	return &NoManagementAccountSLRExistsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *NoManagementAccountSLRExistsException) Code() string {
	return "NoManagementAccountSLRExistsException"
}

// Message returns the exception's message.
func (s *NoManagementAccountSLRExistsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *NoManagementAccountSLRExistsException) OrigErr() error {
	return nil
}

func (s *NoManagementAccountSLRExistsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *NoManagementAccountSLRExistsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *NoManagementAccountSLRExistsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the account making the request is not the organization's
// management account.
type NotOrganizationManagementAccountException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NotOrganizationManagementAccountException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NotOrganizationManagementAccountException) GoString() string {
	return s.String()
}

func newErrorNotOrganizationManagementAccountException(v protocol.ResponseMetadata) error {
	return &NotOrganizationManagementAccountException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *NotOrganizationManagementAccountException) Code() string {
	return "NotOrganizationManagementAccountException"
}

// Message returns the exception's message.
func (s *NotOrganizationManagementAccountException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *NotOrganizationManagementAccountException) OrigErr() error {
	return nil
}

func (s *NotOrganizationManagementAccountException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *NotOrganizationManagementAccountException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *NotOrganizationManagementAccountException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the Amazon Web Services account making the
// request to create or update an organization trail or event data store is
// not the management account for an organization in Organizations. For more
// information, see Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html)
// or Create an event data store (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html).
type NotOrganizationMasterAccountException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NotOrganizationMasterAccountException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s NotOrganizationMasterAccountException) GoString() string {
	return s.String()
}

func newErrorNotOrganizationMasterAccountException(v protocol.ResponseMetadata) error {
	return &NotOrganizationMasterAccountException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *NotOrganizationMasterAccountException) Code() string {
	return "NotOrganizationMasterAccountException"
}

// Message returns the exception's message.
func (s *NotOrganizationMasterAccountException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *NotOrganizationMasterAccountException) OrigErr() error {
	return nil
}

func (s *NotOrganizationMasterAccountException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *NotOrganizationMasterAccountException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *NotOrganizationMasterAccountException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the requested operation is not permitted.
type OperationNotPermittedException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s OperationNotPermittedException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s OperationNotPermittedException) GoString() string {
	return s.String()
}

func newErrorOperationNotPermittedException(v protocol.ResponseMetadata) error {
	return &OperationNotPermittedException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *OperationNotPermittedException) Code() string {
	return "OperationNotPermittedException"
}

// Message returns the exception's message.
func (s *OperationNotPermittedException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *OperationNotPermittedException) OrigErr() error {
	return nil
}

func (s *OperationNotPermittedException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *OperationNotPermittedException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *OperationNotPermittedException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when Organizations is not configured to support
// all features. All features must be enabled in Organizations to support creating
// an organization trail or event data store.
type OrganizationNotInAllFeaturesModeException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s OrganizationNotInAllFeaturesModeException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s OrganizationNotInAllFeaturesModeException) GoString() string {
	return s.String()
}

func newErrorOrganizationNotInAllFeaturesModeException(v protocol.ResponseMetadata) error {
	return &OrganizationNotInAllFeaturesModeException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *OrganizationNotInAllFeaturesModeException) Code() string {
	return "OrganizationNotInAllFeaturesModeException"
}

// Message returns the exception's message.
func (s *OrganizationNotInAllFeaturesModeException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *OrganizationNotInAllFeaturesModeException) OrigErr() error {
	return nil
}

func (s *OrganizationNotInAllFeaturesModeException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *OrganizationNotInAllFeaturesModeException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *OrganizationNotInAllFeaturesModeException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the request is made from an Amazon Web Services
// account that is not a member of an organization. To make this request, sign
// in using the credentials of an account that belongs to an organization.
type OrganizationsNotInUseException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s OrganizationsNotInUseException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s OrganizationsNotInUseException) GoString() string {
	return s.String()
}

func newErrorOrganizationsNotInUseException(v protocol.ResponseMetadata) error {
	return &OrganizationsNotInUseException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *OrganizationsNotInUseException) Code() string {
	return "OrganizationsNotInUseException"
}

// Message returns the exception's message.
func (s *OrganizationsNotInUseException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *OrganizationsNotInUseException) OrigErr() error {
	return nil
}

func (s *OrganizationsNotInUseException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *OrganizationsNotInUseException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *OrganizationsNotInUseException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Contains information about a returned public key.
type PublicKey struct {
	_ struct{} `type:"structure"`

	// The fingerprint of the public key.
	Fingerprint *string `type:"string"`

	// The ending time of validity of the public key.
	ValidityEndTime *time.Time `type:"timestamp"`

	// The starting time of validity of the public key.
	ValidityStartTime *time.Time `type:"timestamp"`

	// The DER encoded public key value in PKCS#1 format.
	// Value is automatically base64 encoded/decoded by the SDK.
	Value []byte `type:"blob"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PublicKey) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PublicKey) GoString() string {
	return s.String()
}

// SetFingerprint sets the Fingerprint field's value.
func (s *PublicKey) SetFingerprint(v string) *PublicKey {
	s.Fingerprint = &v
	return s
}

// SetValidityEndTime sets the ValidityEndTime field's value.
func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey {
	s.ValidityEndTime = &v
	return s
}

// SetValidityStartTime sets the ValidityStartTime field's value.
func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey {
	s.ValidityStartTime = &v
	return s
}

// SetValue sets the Value field's value.
func (s *PublicKey) SetValue(v []byte) *PublicKey {
	s.Value = v
	return s
}

type PutEventSelectorsInput struct {
	_ struct{} `type:"structure"`

	// Specifies the settings for advanced event selectors. You can add advanced
	// event selectors, and conditions for your advanced event selectors, up to
	// a maximum of 500 values for all conditions and selectors on a trail. You
	// can use either AdvancedEventSelectors or EventSelectors, but not both. If
	// you apply AdvancedEventSelectors to a trail, any existing EventSelectors
	// are overwritten. For more information about advanced event selectors, see
	// Logging data events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
	// in the CloudTrail User Guide.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// Specifies the settings for your event selectors. You can configure up to
	// five event selectors for a trail. You can use either EventSelectors or AdvancedEventSelectors
	// in a PutEventSelectors request, but not both. If you apply EventSelectors
	// to a trail, any existing AdvancedEventSelectors are overwritten.
	EventSelectors []*EventSelector `type:"list"`

	// Specifies the name of the trail or trail ARN. If you specify a trail name,
	// the string must meet the following requirements:
	//
	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
	//    (_), or dashes (-)
	//
	//    * Start with a letter or number, and end with a letter or number
	//
	//    * Be between 3 and 128 characters
	//
	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
	//    and my--namespace are not valid.
	//
	//    * Not be in IP address format (for example, 192.168.5.4)
	//
	// If you specify a trail ARN, it must be in the following format.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// TrailName is a required field
	TrailName *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutEventSelectorsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutEventSelectorsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *PutEventSelectorsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "PutEventSelectorsInput"}
	if s.TrailName == nil {
		invalidParams.Add(request.NewErrParamRequired("TrailName"))
	}
	if s.AdvancedEventSelectors != nil {
		for i, v := range s.AdvancedEventSelectors {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *PutEventSelectorsInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsInput {
	s.AdvancedEventSelectors = v
	return s
}

// SetEventSelectors sets the EventSelectors field's value.
func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput {
	s.EventSelectors = v
	return s
}

// SetTrailName sets the TrailName field's value.
func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput {
	s.TrailName = &v
	return s
}

type PutEventSelectorsOutput struct {
	_ struct{} `type:"structure"`

	// Specifies the advanced event selectors configured for your trail.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// Specifies the event selectors configured for your trail.
	EventSelectors []*EventSelector `type:"list"`

	// Specifies the ARN of the trail that was updated with event selectors. The
	// following is the format of a trail ARN.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutEventSelectorsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutEventSelectorsOutput) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *PutEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsOutput {
	s.AdvancedEventSelectors = v
	return s
}

// SetEventSelectors sets the EventSelectors field's value.
func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput {
	s.EventSelectors = v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput {
	s.TrailARN = &v
	return s
}

type PutInsightSelectorsInput struct {
	_ struct{} `type:"structure"`

	// A JSON string that contains the insight types you want to log on a trail.
	// ApiCallRateInsight and ApiErrorRateInsight are valid Insight types.
	//
	// The ApiCallRateInsight Insights type analyzes write-only management API calls
	// that are aggregated per minute against a baseline API call volume.
	//
	// The ApiErrorRateInsight Insights type analyzes management API calls that
	// result in error codes. The error is shown if the API call is unsuccessful.
	//
	// InsightSelectors is a required field
	InsightSelectors []*InsightSelector `type:"list" required:"true"`

	// The name of the CloudTrail trail for which you want to change or add Insights
	// selectors.
	//
	// TrailName is a required field
	TrailName *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutInsightSelectorsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutInsightSelectorsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *PutInsightSelectorsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "PutInsightSelectorsInput"}
	if s.InsightSelectors == nil {
		invalidParams.Add(request.NewErrParamRequired("InsightSelectors"))
	}
	if s.TrailName == nil {
		invalidParams.Add(request.NewErrParamRequired("TrailName"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetInsightSelectors sets the InsightSelectors field's value.
func (s *PutInsightSelectorsInput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsInput {
	s.InsightSelectors = v
	return s
}

// SetTrailName sets the TrailName field's value.
func (s *PutInsightSelectorsInput) SetTrailName(v string) *PutInsightSelectorsInput {
	s.TrailName = &v
	return s
}

type PutInsightSelectorsOutput struct {
	_ struct{} `type:"structure"`

	// A JSON string that contains the Insights event types that you want to log
	// on a trail. The valid Insights types in this release are ApiErrorRateInsight
	// and ApiCallRateInsight.
	InsightSelectors []*InsightSelector `type:"list"`

	// The Amazon Resource Name (ARN) of a trail for which you want to change or
	// add Insights selectors.
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutInsightSelectorsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutInsightSelectorsOutput) GoString() string {
	return s.String()
}

// SetInsightSelectors sets the InsightSelectors field's value.
func (s *PutInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsOutput {
	s.InsightSelectors = v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *PutInsightSelectorsOutput) SetTrailARN(v string) *PutInsightSelectorsOutput {
	s.TrailARN = &v
	return s
}

type PutResourcePolicyInput struct {
	_ struct{} `type:"structure"`

	// The Amazon Resource Name (ARN) of the CloudTrail channel attached to the
	// resource-based policy. The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
	//
	// ResourceArn is a required field
	ResourceArn *string `min:"3" type:"string" required:"true"`

	// A JSON-formatted string for an Amazon Web Services resource-based policy.
	//
	// The following are requirements for the resource policy:
	//
	//    * Contains only one action: cloudtrail-data:PutAuditEvents
	//
	//    * Contains at least one statement. The policy can have a maximum of 20
	//    statements.
	//
	//    * Each statement contains at least one principal. A statement can have
	//    a maximum of 50 principals.
	//
	// ResourcePolicy is a required field
	ResourcePolicy *string `min:"1" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutResourcePolicyInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutResourcePolicyInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *PutResourcePolicyInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"}
	if s.ResourceArn == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
	}
	if s.ResourceArn != nil && len(*s.ResourceArn) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 3))
	}
	if s.ResourcePolicy == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourcePolicy"))
	}
	if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetResourceArn sets the ResourceArn field's value.
func (s *PutResourcePolicyInput) SetResourceArn(v string) *PutResourcePolicyInput {
	s.ResourceArn = &v
	return s
}

// SetResourcePolicy sets the ResourcePolicy field's value.
func (s *PutResourcePolicyInput) SetResourcePolicy(v string) *PutResourcePolicyInput {
	s.ResourcePolicy = &v
	return s
}

type PutResourcePolicyOutput struct {
	_ struct{} `type:"structure"`

	// The Amazon Resource Name (ARN) of the CloudTrail channel attached to the
	// resource-based policy.
	ResourceArn *string `min:"3" type:"string"`

	// The JSON-formatted string of the Amazon Web Services resource-based policy
	// attached to the CloudTrail channel.
	ResourcePolicy *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutResourcePolicyOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s PutResourcePolicyOutput) GoString() string {
	return s.String()
}

// SetResourceArn sets the ResourceArn field's value.
func (s *PutResourcePolicyOutput) SetResourceArn(v string) *PutResourcePolicyOutput {
	s.ResourceArn = &v
	return s
}

// SetResourcePolicy sets the ResourcePolicy field's value.
func (s *PutResourcePolicyOutput) SetResourcePolicy(v string) *PutResourcePolicyOutput {
	s.ResourcePolicy = &v
	return s
}

// A SQL string of criteria about events that you want to collect in an event
// data store.
type Query struct {
	_ struct{} `type:"structure"`

	// The creation time of a query.
	CreationTime *time.Time `type:"timestamp"`

	// The ID of a query.
	QueryId *string `min:"36" type:"string"`

	// The status of the query. This can be QUEUED, RUNNING, FINISHED, FAILED, TIMED_OUT,
	// or CANCELLED.
	QueryStatus *string `type:"string" enum:"QueryStatus"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Query) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Query) GoString() string {
	return s.String()
}

// SetCreationTime sets the CreationTime field's value.
func (s *Query) SetCreationTime(v time.Time) *Query {
	s.CreationTime = &v
	return s
}

// SetQueryId sets the QueryId field's value.
func (s *Query) SetQueryId(v string) *Query {
	s.QueryId = &v
	return s
}

// SetQueryStatus sets the QueryStatus field's value.
func (s *Query) SetQueryStatus(v string) *Query {
	s.QueryStatus = &v
	return s
}

// The query ID does not exist or does not map to a query.
type QueryIdNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s QueryIdNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s QueryIdNotFoundException) GoString() string {
	return s.String()
}

func newErrorQueryIdNotFoundException(v protocol.ResponseMetadata) error {
	return &QueryIdNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *QueryIdNotFoundException) Code() string {
	return "QueryIdNotFoundException"
}

// Message returns the exception's message.
func (s *QueryIdNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *QueryIdNotFoundException) OrigErr() error {
	return nil
}

func (s *QueryIdNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *QueryIdNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *QueryIdNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Metadata about a query, such as the number of results.
type QueryStatistics struct {
	_ struct{} `type:"structure"`

	// The total bytes that the query scanned in the event data store. This value
	// matches the number of bytes for which your account is billed for the query,
	// unless the query is still running.
	BytesScanned *int64 `type:"long"`

	// The number of results returned.
	ResultsCount *int64 `type:"integer"`

	// The total number of results returned by a query.
	TotalResultsCount *int64 `type:"integer"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s QueryStatistics) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s QueryStatistics) GoString() string {
	return s.String()
}

// SetBytesScanned sets the BytesScanned field's value.
func (s *QueryStatistics) SetBytesScanned(v int64) *QueryStatistics {
	s.BytesScanned = &v
	return s
}

// SetResultsCount sets the ResultsCount field's value.
func (s *QueryStatistics) SetResultsCount(v int64) *QueryStatistics {
	s.ResultsCount = &v
	return s
}

// SetTotalResultsCount sets the TotalResultsCount field's value.
func (s *QueryStatistics) SetTotalResultsCount(v int64) *QueryStatistics {
	s.TotalResultsCount = &v
	return s
}

// Gets metadata about a query, including the number of events that were matched,
// the total number of events scanned, the query run time in milliseconds, and
// the query's creation time.
type QueryStatisticsForDescribeQuery struct {
	_ struct{} `type:"structure"`

	// The total bytes that the query scanned in the event data store. This value
	// matches the number of bytes for which your account is billed for the query,
	// unless the query is still running.
	BytesScanned *int64 `type:"long"`

	// The creation time of the query.
	CreationTime *time.Time `type:"timestamp"`

	// The number of events that matched a query.
	EventsMatched *int64 `type:"long"`

	// The number of events that the query scanned in the event data store.
	EventsScanned *int64 `type:"long"`

	// The query's run time, in milliseconds.
	ExecutionTimeInMillis *int64 `type:"integer"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s QueryStatisticsForDescribeQuery) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s QueryStatisticsForDescribeQuery) GoString() string {
	return s.String()
}

// SetBytesScanned sets the BytesScanned field's value.
func (s *QueryStatisticsForDescribeQuery) SetBytesScanned(v int64) *QueryStatisticsForDescribeQuery {
	s.BytesScanned = &v
	return s
}

// SetCreationTime sets the CreationTime field's value.
func (s *QueryStatisticsForDescribeQuery) SetCreationTime(v time.Time) *QueryStatisticsForDescribeQuery {
	s.CreationTime = &v
	return s
}

// SetEventsMatched sets the EventsMatched field's value.
func (s *QueryStatisticsForDescribeQuery) SetEventsMatched(v int64) *QueryStatisticsForDescribeQuery {
	s.EventsMatched = &v
	return s
}

// SetEventsScanned sets the EventsScanned field's value.
func (s *QueryStatisticsForDescribeQuery) SetEventsScanned(v int64) *QueryStatisticsForDescribeQuery {
	s.EventsScanned = &v
	return s
}

// SetExecutionTimeInMillis sets the ExecutionTimeInMillis field's value.
func (s *QueryStatisticsForDescribeQuery) SetExecutionTimeInMillis(v int64) *QueryStatisticsForDescribeQuery {
	s.ExecutionTimeInMillis = &v
	return s
}

// Specifies an organization member account ID as a CloudTrail delegated administrator.
type RegisterOrganizationDelegatedAdminInput struct {
	_ struct{} `type:"structure"`

	// An organization member account ID that you want to designate as a delegated
	// administrator.
	//
	// MemberAccountId is a required field
	MemberAccountId *string `min:"12" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RegisterOrganizationDelegatedAdminInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RegisterOrganizationDelegatedAdminInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *RegisterOrganizationDelegatedAdminInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RegisterOrganizationDelegatedAdminInput"}
	if s.MemberAccountId == nil {
		invalidParams.Add(request.NewErrParamRequired("MemberAccountId"))
	}
	if s.MemberAccountId != nil && len(*s.MemberAccountId) < 12 {
		invalidParams.Add(request.NewErrParamMinLen("MemberAccountId", 12))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetMemberAccountId sets the MemberAccountId field's value.
func (s *RegisterOrganizationDelegatedAdminInput) SetMemberAccountId(v string) *RegisterOrganizationDelegatedAdminInput {
	s.MemberAccountId = &v
	return s
}

// Returns the following response if successful. Otherwise, returns an error.
type RegisterOrganizationDelegatedAdminOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RegisterOrganizationDelegatedAdminOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RegisterOrganizationDelegatedAdminOutput) GoString() string {
	return s.String()
}

// Specifies the tags to remove from a trail, event data store, or channel.
type RemoveTagsInput struct {
	_ struct{} `type:"structure"`

	// Specifies the ARN of the trail, event data store, or channel from which tags
	// should be removed.
	//
	// Example trail ARN format: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Example event data store ARN format: arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE
	//
	// Example channel ARN format: arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
	//
	// ResourceId is a required field
	ResourceId *string `type:"string" required:"true"`

	// Specifies a list of tags to be removed.
	//
	// TagsList is a required field
	TagsList []*Tag `type:"list" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RemoveTagsInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RemoveTagsInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *RemoveTagsInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
	if s.ResourceId == nil {
		invalidParams.Add(request.NewErrParamRequired("ResourceId"))
	}
	if s.TagsList == nil {
		invalidParams.Add(request.NewErrParamRequired("TagsList"))
	}
	if s.TagsList != nil {
		for i, v := range s.TagsList {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetResourceId sets the ResourceId field's value.
func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput {
	s.ResourceId = &v
	return s
}

// SetTagsList sets the TagsList field's value.
func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput {
	s.TagsList = v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type RemoveTagsOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RemoveTagsOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RemoveTagsOutput) GoString() string {
	return s.String()
}

// Specifies the type and name of a resource referenced by an event.
type Resource struct {
	_ struct{} `type:"structure"`

	// The name of the resource referenced by the event returned. These are user-created
	// names whose values will depend on the environment. For example, the resource
	// name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567"
	// for an EC2 Instance.
	ResourceName *string `type:"string"`

	// The type of a resource referenced by the event returned. When the resource
	// type cannot be determined, null is returned. Some examples of resource types
	// are: Instance for EC2, Trail for CloudTrail, DBInstance for Amazon RDS, and
	// AccessKey for IAM. To learn more about how to look up and filter events by
	// the resource types supported for a service, see Filtering CloudTrail Events
	// (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html#filtering-cloudtrail-events).
	ResourceType *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Resource) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Resource) GoString() string {
	return s.String()
}

// SetResourceName sets the ResourceName field's value.
func (s *Resource) SetResourceName(v string) *Resource {
	s.ResourceName = &v
	return s
}

// SetResourceType sets the ResourceType field's value.
func (s *Resource) SetResourceType(v string) *Resource {
	s.ResourceType = &v
	return s
}

// This exception is thrown when the provided resource does not exist, or the
// ARN format of the resource is not valid. The following is the valid format
// for a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.
type ResourceARNNotValidException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceARNNotValidException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceARNNotValidException) GoString() string {
	return s.String()
}

func newErrorResourceARNNotValidException(v protocol.ResponseMetadata) error {
	return &ResourceARNNotValidException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ResourceARNNotValidException) Code() string {
	return "ResourceARNNotValidException"
}

// Message returns the exception's message.
func (s *ResourceARNNotValidException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourceARNNotValidException) OrigErr() error {
	return nil
}

func (s *ResourceARNNotValidException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ResourceARNNotValidException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ResourceARNNotValidException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified resource is not found.
type ResourceNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceNotFoundException) GoString() string {
	return s.String()
}

func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
	return &ResourceNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ResourceNotFoundException) Code() string {
	return "ResourceNotFoundException"
}

// Message returns the exception's message.
func (s *ResourceNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourceNotFoundException) OrigErr() error {
	return nil
}

func (s *ResourceNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ResourceNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ResourceNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the specified resource policy is not found.
type ResourcePolicyNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourcePolicyNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourcePolicyNotFoundException) GoString() string {
	return s.String()
}

func newErrorResourcePolicyNotFoundException(v protocol.ResponseMetadata) error {
	return &ResourcePolicyNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ResourcePolicyNotFoundException) Code() string {
	return "ResourcePolicyNotFoundException"
}

// Message returns the exception's message.
func (s *ResourcePolicyNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourcePolicyNotFoundException) OrigErr() error {
	return nil
}

func (s *ResourcePolicyNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ResourcePolicyNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ResourcePolicyNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the resouce-based policy has syntax errors,
// or contains a principal that is not valid.
//
// The following are requirements for the resource policy:
//
//   - Contains only one action: cloudtrail-data:PutAuditEvents
//
//   - Contains at least one statement. The policy can have a maximum of 20
//     statements.
//
//   - Each statement contains at least one principal. A statement can have
//     a maximum of 50 principals.
type ResourcePolicyNotValidException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourcePolicyNotValidException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourcePolicyNotValidException) GoString() string {
	return s.String()
}

func newErrorResourcePolicyNotValidException(v protocol.ResponseMetadata) error {
	return &ResourcePolicyNotValidException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ResourcePolicyNotValidException) Code() string {
	return "ResourcePolicyNotValidException"
}

// Message returns the exception's message.
func (s *ResourcePolicyNotValidException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourcePolicyNotValidException) OrigErr() error {
	return nil
}

func (s *ResourcePolicyNotValidException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ResourcePolicyNotValidException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ResourcePolicyNotValidException) RequestID() string {
	return s.RespMetadata.RequestID
}

// A resource tag.
type ResourceTag struct {
	_ struct{} `type:"structure"`

	// Specifies the ARN of the resource.
	ResourceId *string `type:"string"`

	// A list of tags.
	TagsList []*Tag `type:"list"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceTag) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceTag) GoString() string {
	return s.String()
}

// SetResourceId sets the ResourceId field's value.
func (s *ResourceTag) SetResourceId(v string) *ResourceTag {
	s.ResourceId = &v
	return s
}

// SetTagsList sets the TagsList field's value.
func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag {
	s.TagsList = v
	return s
}

// This exception is thrown when the specified resource type is not supported
// by CloudTrail.
type ResourceTypeNotSupportedException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceTypeNotSupportedException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s ResourceTypeNotSupportedException) GoString() string {
	return s.String()
}

func newErrorResourceTypeNotSupportedException(v protocol.ResponseMetadata) error {
	return &ResourceTypeNotSupportedException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *ResourceTypeNotSupportedException) Code() string {
	return "ResourceTypeNotSupportedException"
}

// Message returns the exception's message.
func (s *ResourceTypeNotSupportedException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourceTypeNotSupportedException) OrigErr() error {
	return nil
}

func (s *ResourceTypeNotSupportedException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *ResourceTypeNotSupportedException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *ResourceTypeNotSupportedException) RequestID() string {
	return s.RespMetadata.RequestID
}

type RestoreEventDataStoreInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or the ID suffix of the ARN) of the event data store that you want
	// to restore.
	//
	// EventDataStore is a required field
	EventDataStore *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RestoreEventDataStoreInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RestoreEventDataStoreInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *RestoreEventDataStoreInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "RestoreEventDataStoreInput"}
	if s.EventDataStore == nil {
		invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
	}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *RestoreEventDataStoreInput) SetEventDataStore(v string) *RestoreEventDataStoreInput {
	s.EventDataStore = &v
	return s
}

type RestoreEventDataStoreOutput struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors that were used to select events.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// The timestamp of an event data store's creation.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The event data store ARN.
	EventDataStoreArn *string `min:"3" type:"string"`

	// Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
	// The value is a fully specified ARN to a KMS key in the following format.
	//
	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `min:"1" type:"string"`

	// Indicates whether the event data store is collecting events from all Regions,
	// or only from the Region in which the event data store was created.
	MultiRegionEnabled *bool `type:"boolean"`

	// The name of the event data store.
	Name *string `min:"3" type:"string"`

	// Indicates whether an event data store is collecting logged events for an
	// organization in Organizations.
	OrganizationEnabled *bool `type:"boolean"`

	// The retention period, in days.
	RetentionPeriod *int64 `min:"7" type:"integer"`

	// The status of the event data store.
	Status *string `type:"string" enum:"EventDataStoreStatus"`

	// Indicates that termination protection is enabled and the event data store
	// cannot be automatically deleted.
	TerminationProtectionEnabled *bool `type:"boolean"`

	// The timestamp that shows when an event data store was updated, if applicable.
	// UpdatedTimestamp is always either the same or newer than the time shown in
	// CreatedTimestamp.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RestoreEventDataStoreOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s RestoreEventDataStoreOutput) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *RestoreEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *RestoreEventDataStoreOutput {
	s.AdvancedEventSelectors = v
	return s
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *RestoreEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *RestoreEventDataStoreOutput {
	s.CreatedTimestamp = &v
	return s
}

// SetEventDataStoreArn sets the EventDataStoreArn field's value.
func (s *RestoreEventDataStoreOutput) SetEventDataStoreArn(v string) *RestoreEventDataStoreOutput {
	s.EventDataStoreArn = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *RestoreEventDataStoreOutput) SetKmsKeyId(v string) *RestoreEventDataStoreOutput {
	s.KmsKeyId = &v
	return s
}

// SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
func (s *RestoreEventDataStoreOutput) SetMultiRegionEnabled(v bool) *RestoreEventDataStoreOutput {
	s.MultiRegionEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *RestoreEventDataStoreOutput) SetName(v string) *RestoreEventDataStoreOutput {
	s.Name = &v
	return s
}

// SetOrganizationEnabled sets the OrganizationEnabled field's value.
func (s *RestoreEventDataStoreOutput) SetOrganizationEnabled(v bool) *RestoreEventDataStoreOutput {
	s.OrganizationEnabled = &v
	return s
}

// SetRetentionPeriod sets the RetentionPeriod field's value.
func (s *RestoreEventDataStoreOutput) SetRetentionPeriod(v int64) *RestoreEventDataStoreOutput {
	s.RetentionPeriod = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *RestoreEventDataStoreOutput) SetStatus(v string) *RestoreEventDataStoreOutput {
	s.Status = &v
	return s
}

// SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
func (s *RestoreEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *RestoreEventDataStoreOutput {
	s.TerminationProtectionEnabled = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *RestoreEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *RestoreEventDataStoreOutput {
	s.UpdatedTimestamp = &v
	return s
}

// This exception is thrown when the specified S3 bucket does not exist.
type S3BucketDoesNotExistException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s S3BucketDoesNotExistException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s S3BucketDoesNotExistException) GoString() string {
	return s.String()
}

func newErrorS3BucketDoesNotExistException(v protocol.ResponseMetadata) error {
	return &S3BucketDoesNotExistException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *S3BucketDoesNotExistException) Code() string {
	return "S3BucketDoesNotExistException"
}

// Message returns the exception's message.
func (s *S3BucketDoesNotExistException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *S3BucketDoesNotExistException) OrigErr() error {
	return nil
}

func (s *S3BucketDoesNotExistException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *S3BucketDoesNotExistException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *S3BucketDoesNotExistException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The settings for the source S3 bucket.
type S3ImportSource struct {
	_ struct{} `type:"structure"`

	// The IAM ARN role used to access the source S3 bucket.
	//
	// S3BucketAccessRoleArn is a required field
	S3BucketAccessRoleArn *string `type:"string" required:"true"`

	// The Region associated with the source S3 bucket.
	//
	// S3BucketRegion is a required field
	S3BucketRegion *string `type:"string" required:"true"`

	// The URI for the source S3 bucket.
	//
	// S3LocationUri is a required field
	S3LocationUri *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s S3ImportSource) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s S3ImportSource) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *S3ImportSource) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "S3ImportSource"}
	if s.S3BucketAccessRoleArn == nil {
		invalidParams.Add(request.NewErrParamRequired("S3BucketAccessRoleArn"))
	}
	if s.S3BucketRegion == nil {
		invalidParams.Add(request.NewErrParamRequired("S3BucketRegion"))
	}
	if s.S3LocationUri == nil {
		invalidParams.Add(request.NewErrParamRequired("S3LocationUri"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetS3BucketAccessRoleArn sets the S3BucketAccessRoleArn field's value.
func (s *S3ImportSource) SetS3BucketAccessRoleArn(v string) *S3ImportSource {
	s.S3BucketAccessRoleArn = &v
	return s
}

// SetS3BucketRegion sets the S3BucketRegion field's value.
func (s *S3ImportSource) SetS3BucketRegion(v string) *S3ImportSource {
	s.S3BucketRegion = &v
	return s
}

// SetS3LocationUri sets the S3LocationUri field's value.
func (s *S3ImportSource) SetS3LocationUri(v string) *S3ImportSource {
	s.S3LocationUri = &v
	return s
}

// Contains configuration information about the channel.
type SourceConfig struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors that are configured for the channel.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// Specifies whether the channel applies to a single Region or to all Regions.
	ApplyToAllRegions *bool `type:"boolean"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s SourceConfig) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s SourceConfig) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *SourceConfig) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *SourceConfig {
	s.AdvancedEventSelectors = v
	return s
}

// SetApplyToAllRegions sets the ApplyToAllRegions field's value.
func (s *SourceConfig) SetApplyToAllRegions(v bool) *SourceConfig {
	s.ApplyToAllRegions = &v
	return s
}

type StartEventDataStoreIngestionInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or ID suffix of the ARN) of the event data store for which you want
	// to start ingestion.
	//
	// EventDataStore is a required field
	EventDataStore *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartEventDataStoreIngestionInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartEventDataStoreIngestionInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *StartEventDataStoreIngestionInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "StartEventDataStoreIngestionInput"}
	if s.EventDataStore == nil {
		invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
	}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *StartEventDataStoreIngestionInput) SetEventDataStore(v string) *StartEventDataStoreIngestionInput {
	s.EventDataStore = &v
	return s
}

type StartEventDataStoreIngestionOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartEventDataStoreIngestionOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartEventDataStoreIngestionOutput) GoString() string {
	return s.String()
}

type StartImportInput struct {
	_ struct{} `type:"structure"`

	// The ARN of the destination event data store. Use this parameter for a new
	// import.
	Destinations []*string `min:"1" type:"list"`

	// Use with StartEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	// When you specify a time range, CloudTrail checks the prefix and log file
	// names to verify the names contain a date between the specified StartEventTime
	// and EndEventTime before attempting to import events.
	EndEventTime *time.Time `type:"timestamp"`

	// The ID of the import. Use this parameter when you are retrying an import.
	ImportId *string `min:"36" type:"string"`

	// The source S3 bucket for the import. Use this parameter for a new import.
	ImportSource *ImportSource `type:"structure"`

	// Use with EndEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	// When you specify a time range, CloudTrail checks the prefix and log file
	// names to verify the names contain a date between the specified StartEventTime
	// and EndEventTime before attempting to import events.
	StartEventTime *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartImportInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartImportInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *StartImportInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "StartImportInput"}
	if s.Destinations != nil && len(s.Destinations) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Destinations", 1))
	}
	if s.ImportId != nil && len(*s.ImportId) < 36 {
		invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
	}
	if s.ImportSource != nil {
		if err := s.ImportSource.Validate(); err != nil {
			invalidParams.AddNested("ImportSource", err.(request.ErrInvalidParams))
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDestinations sets the Destinations field's value.
func (s *StartImportInput) SetDestinations(v []*string) *StartImportInput {
	s.Destinations = v
	return s
}

// SetEndEventTime sets the EndEventTime field's value.
func (s *StartImportInput) SetEndEventTime(v time.Time) *StartImportInput {
	s.EndEventTime = &v
	return s
}

// SetImportId sets the ImportId field's value.
func (s *StartImportInput) SetImportId(v string) *StartImportInput {
	s.ImportId = &v
	return s
}

// SetImportSource sets the ImportSource field's value.
func (s *StartImportInput) SetImportSource(v *ImportSource) *StartImportInput {
	s.ImportSource = v
	return s
}

// SetStartEventTime sets the StartEventTime field's value.
func (s *StartImportInput) SetStartEventTime(v time.Time) *StartImportInput {
	s.StartEventTime = &v
	return s
}

type StartImportOutput struct {
	_ struct{} `type:"structure"`

	// The timestamp for the import's creation.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The ARN of the destination event data store.
	Destinations []*string `min:"1" type:"list"`

	// Used with StartEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	EndEventTime *time.Time `type:"timestamp"`

	// The ID of the import.
	ImportId *string `min:"36" type:"string"`

	// The source S3 bucket for the import.
	ImportSource *ImportSource `type:"structure"`

	// Shows the status of the import after a StartImport request. An import finishes
	// with a status of COMPLETED if there were no failures, or FAILED if there
	// were failures.
	ImportStatus *string `type:"string" enum:"ImportStatus"`

	// Used with EndEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	StartEventTime *time.Time `type:"timestamp"`

	// The timestamp of the import's last update, if applicable.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartImportOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartImportOutput) GoString() string {
	return s.String()
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *StartImportOutput) SetCreatedTimestamp(v time.Time) *StartImportOutput {
	s.CreatedTimestamp = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *StartImportOutput) SetDestinations(v []*string) *StartImportOutput {
	s.Destinations = v
	return s
}

// SetEndEventTime sets the EndEventTime field's value.
func (s *StartImportOutput) SetEndEventTime(v time.Time) *StartImportOutput {
	s.EndEventTime = &v
	return s
}

// SetImportId sets the ImportId field's value.
func (s *StartImportOutput) SetImportId(v string) *StartImportOutput {
	s.ImportId = &v
	return s
}

// SetImportSource sets the ImportSource field's value.
func (s *StartImportOutput) SetImportSource(v *ImportSource) *StartImportOutput {
	s.ImportSource = v
	return s
}

// SetImportStatus sets the ImportStatus field's value.
func (s *StartImportOutput) SetImportStatus(v string) *StartImportOutput {
	s.ImportStatus = &v
	return s
}

// SetStartEventTime sets the StartEventTime field's value.
func (s *StartImportOutput) SetStartEventTime(v time.Time) *StartImportOutput {
	s.StartEventTime = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *StartImportOutput) SetUpdatedTimestamp(v time.Time) *StartImportOutput {
	s.UpdatedTimestamp = &v
	return s
}

// The request to CloudTrail to start logging Amazon Web Services API calls
// for an account.
type StartLoggingInput struct {
	_ struct{} `type:"structure"`

	// Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
	// logs Amazon Web Services API calls. The following is the format of a trail
	// ARN.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartLoggingInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartLoggingInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *StartLoggingInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *StartLoggingInput) SetName(v string) *StartLoggingInput {
	s.Name = &v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type StartLoggingOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartLoggingOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartLoggingOutput) GoString() string {
	return s.String()
}

type StartQueryInput struct {
	_ struct{} `type:"structure"`

	// The URI for the S3 bucket where CloudTrail delivers the query results.
	DeliveryS3Uri *string `type:"string"`

	// The alias that identifies a query template.
	QueryAlias *string `min:"1" type:"string"`

	// The query parameters for the specified QueryAlias.
	QueryParameters []*string `min:"1" type:"list"`

	// The SQL code of your query.
	QueryStatement *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartQueryInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartQueryInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *StartQueryInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "StartQueryInput"}
	if s.QueryAlias != nil && len(*s.QueryAlias) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("QueryAlias", 1))
	}
	if s.QueryParameters != nil && len(s.QueryParameters) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("QueryParameters", 1))
	}
	if s.QueryStatement != nil && len(*s.QueryStatement) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("QueryStatement", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetDeliveryS3Uri sets the DeliveryS3Uri field's value.
func (s *StartQueryInput) SetDeliveryS3Uri(v string) *StartQueryInput {
	s.DeliveryS3Uri = &v
	return s
}

// SetQueryAlias sets the QueryAlias field's value.
func (s *StartQueryInput) SetQueryAlias(v string) *StartQueryInput {
	s.QueryAlias = &v
	return s
}

// SetQueryParameters sets the QueryParameters field's value.
func (s *StartQueryInput) SetQueryParameters(v []*string) *StartQueryInput {
	s.QueryParameters = v
	return s
}

// SetQueryStatement sets the QueryStatement field's value.
func (s *StartQueryInput) SetQueryStatement(v string) *StartQueryInput {
	s.QueryStatement = &v
	return s
}

type StartQueryOutput struct {
	_ struct{} `type:"structure"`

	// The ID of the started query.
	QueryId *string `min:"36" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartQueryOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StartQueryOutput) GoString() string {
	return s.String()
}

// SetQueryId sets the QueryId field's value.
func (s *StartQueryOutput) SetQueryId(v string) *StartQueryOutput {
	s.QueryId = &v
	return s
}

type StopEventDataStoreIngestionInput struct {
	_ struct{} `type:"structure"`

	// The ARN (or ID suffix of the ARN) of the event data store for which you want
	// to stop ingestion.
	//
	// EventDataStore is a required field
	EventDataStore *string `min:"3" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopEventDataStoreIngestionInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopEventDataStoreIngestionInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *StopEventDataStoreIngestionInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "StopEventDataStoreIngestionInput"}
	if s.EventDataStore == nil {
		invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
	}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *StopEventDataStoreIngestionInput) SetEventDataStore(v string) *StopEventDataStoreIngestionInput {
	s.EventDataStore = &v
	return s
}

type StopEventDataStoreIngestionOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopEventDataStoreIngestionOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopEventDataStoreIngestionOutput) GoString() string {
	return s.String()
}

type StopImportInput struct {
	_ struct{} `type:"structure"`

	// The ID of the import.
	//
	// ImportId is a required field
	ImportId *string `min:"36" type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopImportInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopImportInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *StopImportInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "StopImportInput"}
	if s.ImportId == nil {
		invalidParams.Add(request.NewErrParamRequired("ImportId"))
	}
	if s.ImportId != nil && len(*s.ImportId) < 36 {
		invalidParams.Add(request.NewErrParamMinLen("ImportId", 36))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetImportId sets the ImportId field's value.
func (s *StopImportInput) SetImportId(v string) *StopImportInput {
	s.ImportId = &v
	return s
}

type StopImportOutput struct {
	_ struct{} `type:"structure"`

	// The timestamp of the import's creation.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The ARN of the destination event data store.
	Destinations []*string `min:"1" type:"list"`

	// Used with StartEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	EndEventTime *time.Time `type:"timestamp"`

	// The ID for the import.
	ImportId *string `min:"36" type:"string"`

	// The source S3 bucket for the import.
	ImportSource *ImportSource `type:"structure"`

	// Returns information on the stopped import.
	ImportStatistics *ImportStatistics `type:"structure"`

	// The status of the import.
	ImportStatus *string `type:"string" enum:"ImportStatus"`

	// Used with EndEventTime to bound a StartImport request, and limit imported
	// trail events to only those events logged within a specified time period.
	StartEventTime *time.Time `type:"timestamp"`

	// The timestamp of the import's last update.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopImportOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopImportOutput) GoString() string {
	return s.String()
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *StopImportOutput) SetCreatedTimestamp(v time.Time) *StopImportOutput {
	s.CreatedTimestamp = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *StopImportOutput) SetDestinations(v []*string) *StopImportOutput {
	s.Destinations = v
	return s
}

// SetEndEventTime sets the EndEventTime field's value.
func (s *StopImportOutput) SetEndEventTime(v time.Time) *StopImportOutput {
	s.EndEventTime = &v
	return s
}

// SetImportId sets the ImportId field's value.
func (s *StopImportOutput) SetImportId(v string) *StopImportOutput {
	s.ImportId = &v
	return s
}

// SetImportSource sets the ImportSource field's value.
func (s *StopImportOutput) SetImportSource(v *ImportSource) *StopImportOutput {
	s.ImportSource = v
	return s
}

// SetImportStatistics sets the ImportStatistics field's value.
func (s *StopImportOutput) SetImportStatistics(v *ImportStatistics) *StopImportOutput {
	s.ImportStatistics = v
	return s
}

// SetImportStatus sets the ImportStatus field's value.
func (s *StopImportOutput) SetImportStatus(v string) *StopImportOutput {
	s.ImportStatus = &v
	return s
}

// SetStartEventTime sets the StartEventTime field's value.
func (s *StopImportOutput) SetStartEventTime(v time.Time) *StopImportOutput {
	s.StartEventTime = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *StopImportOutput) SetUpdatedTimestamp(v time.Time) *StopImportOutput {
	s.UpdatedTimestamp = &v
	return s
}

// Passes the request to CloudTrail to stop logging Amazon Web Services API
// calls for the specified account.
type StopLoggingInput struct {
	_ struct{} `type:"structure"`

	// Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
	// will stop logging Amazon Web Services API calls. The following is the format
	// of a trail ARN.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopLoggingInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopLoggingInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *StopLoggingInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetName sets the Name field's value.
func (s *StopLoggingInput) SetName(v string) *StopLoggingInput {
	s.Name = &v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type StopLoggingOutput struct {
	_ struct{} `type:"structure"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopLoggingOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s StopLoggingOutput) GoString() string {
	return s.String()
}

// A custom key-value pair associated with a resource such as a CloudTrail trail,
// event data store, or channel.
type Tag struct {
	_ struct{} `type:"structure"`

	// The key in a key-value pair. The key must be must be no longer than 128 Unicode
	// characters. The key must be unique for the resource to which it applies.
	//
	// Key is a required field
	Key *string `min:"1" type:"string" required:"true"`

	// The value in a key-value pair of a tag. The value must be no longer than
	// 256 Unicode characters.
	Value *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Tag) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Tag) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *Tag) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "Tag"}
	if s.Key == nil {
		invalidParams.Add(request.NewErrParamRequired("Key"))
	}
	if s.Key != nil && len(*s.Key) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Key", 1))
	}
	if s.Value != nil && len(*s.Value) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Value", 1))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetKey sets the Key field's value.
func (s *Tag) SetKey(v string) *Tag {
	s.Key = &v
	return s
}

// SetValue sets the Value field's value.
func (s *Tag) SetValue(v string) *Tag {
	s.Value = &v
	return s
}

// The number of tags per trail, event data store, or channel has exceeded the
// permitted amount. Currently, the limit is 50.
type TagsLimitExceededException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TagsLimitExceededException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TagsLimitExceededException) GoString() string {
	return s.String()
}

func newErrorTagsLimitExceededException(v protocol.ResponseMetadata) error {
	return &TagsLimitExceededException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *TagsLimitExceededException) Code() string {
	return "TagsLimitExceededException"
}

// Message returns the exception's message.
func (s *TagsLimitExceededException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *TagsLimitExceededException) OrigErr() error {
	return nil
}

func (s *TagsLimitExceededException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *TagsLimitExceededException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *TagsLimitExceededException) RequestID() string {
	return s.RespMetadata.RequestID
}

// The settings for a trail.
type Trail struct {
	_ struct{} `type:"structure"`

	// Specifies an Amazon Resource Name (ARN), a unique identifier that represents
	// the log group to which CloudTrail logs will be delivered.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies if the trail has custom event selectors.
	HasCustomEventSelectors *bool `type:"boolean"`

	// Specifies whether a trail has insight types specified in an InsightSelector
	// list.
	HasInsightSelectors *bool `type:"boolean"`

	// The Region in which the trail was created.
	HomeRegion *string `type:"string"`

	// Set to True to include Amazon Web Services API calls from Amazon Web Services
	// global services such as IAM. Otherwise, False.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail exists only in one Region or exists in all Regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is an organization trail.
	IsOrganizationTrail *bool `type:"boolean"`

	// Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
	// The value is a fully specified ARN to a KMS key in the following format.
	//
	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies whether log file validation is enabled.
	LogFileValidationEnabled *bool `type:"boolean"`

	// Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
	Name *string `type:"string"`

	// Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.
	// See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
	S3BucketName *string `type:"string"`

	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
	// you have designated for log file delivery. For more information, see Finding
	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	// The maximum length is 200 characters.
	S3KeyPrefix *string `type:"string"`

	// Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
	// when log files are delivered. The following is the format of a topic ARN.
	//
	// arn:aws:sns:us-east-2:123456789012:MyTopic
	SnsTopicARN *string `type:"string"`

	// This field is no longer in use. Use SnsTopicARN.
	//
	// Deprecated: SnsTopicName has been deprecated
	SnsTopicName *string `deprecated:"true" type:"string"`

	// Specifies the ARN of the trail. The following is the format of a trail ARN.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Trail) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s Trail) GoString() string {
	return s.String()
}

// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail {
	s.CloudWatchLogsLogGroupArn = &v
	return s
}

// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail {
	s.CloudWatchLogsRoleArn = &v
	return s
}

// SetHasCustomEventSelectors sets the HasCustomEventSelectors field's value.
func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail {
	s.HasCustomEventSelectors = &v
	return s
}

// SetHasInsightSelectors sets the HasInsightSelectors field's value.
func (s *Trail) SetHasInsightSelectors(v bool) *Trail {
	s.HasInsightSelectors = &v
	return s
}

// SetHomeRegion sets the HomeRegion field's value.
func (s *Trail) SetHomeRegion(v string) *Trail {
	s.HomeRegion = &v
	return s
}

// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail {
	s.IncludeGlobalServiceEvents = &v
	return s
}

// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail {
	s.IsMultiRegionTrail = &v
	return s
}

// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
func (s *Trail) SetIsOrganizationTrail(v bool) *Trail {
	s.IsOrganizationTrail = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *Trail) SetKmsKeyId(v string) *Trail {
	s.KmsKeyId = &v
	return s
}

// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail {
	s.LogFileValidationEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *Trail) SetName(v string) *Trail {
	s.Name = &v
	return s
}

// SetS3BucketName sets the S3BucketName field's value.
func (s *Trail) SetS3BucketName(v string) *Trail {
	s.S3BucketName = &v
	return s
}

// SetS3KeyPrefix sets the S3KeyPrefix field's value.
func (s *Trail) SetS3KeyPrefix(v string) *Trail {
	s.S3KeyPrefix = &v
	return s
}

// SetSnsTopicARN sets the SnsTopicARN field's value.
func (s *Trail) SetSnsTopicARN(v string) *Trail {
	s.SnsTopicARN = &v
	return s
}

// SetSnsTopicName sets the SnsTopicName field's value.
func (s *Trail) SetSnsTopicName(v string) *Trail {
	s.SnsTopicName = &v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *Trail) SetTrailARN(v string) *Trail {
	s.TrailARN = &v
	return s
}

// This exception is thrown when the specified trail already exists.
type TrailAlreadyExistsException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailAlreadyExistsException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailAlreadyExistsException) GoString() string {
	return s.String()
}

func newErrorTrailAlreadyExistsException(v protocol.ResponseMetadata) error {
	return &TrailAlreadyExistsException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *TrailAlreadyExistsException) Code() string {
	return "TrailAlreadyExistsException"
}

// Message returns the exception's message.
func (s *TrailAlreadyExistsException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *TrailAlreadyExistsException) OrigErr() error {
	return nil
}

func (s *TrailAlreadyExistsException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *TrailAlreadyExistsException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *TrailAlreadyExistsException) RequestID() string {
	return s.RespMetadata.RequestID
}

// Information about a CloudTrail trail, including the trail's name, home Region,
// and Amazon Resource Name (ARN).
type TrailInfo struct {
	_ struct{} `type:"structure"`

	// The Amazon Web Services Region in which a trail was created.
	HomeRegion *string `type:"string"`

	// The name of a trail.
	Name *string `type:"string"`

	// The ARN of a trail.
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailInfo) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailInfo) GoString() string {
	return s.String()
}

// SetHomeRegion sets the HomeRegion field's value.
func (s *TrailInfo) SetHomeRegion(v string) *TrailInfo {
	s.HomeRegion = &v
	return s
}

// SetName sets the Name field's value.
func (s *TrailInfo) SetName(v string) *TrailInfo {
	s.Name = &v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *TrailInfo) SetTrailARN(v string) *TrailInfo {
	s.TrailARN = &v
	return s
}

// This exception is thrown when the trail with the given name is not found.
type TrailNotFoundException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailNotFoundException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailNotFoundException) GoString() string {
	return s.String()
}

func newErrorTrailNotFoundException(v protocol.ResponseMetadata) error {
	return &TrailNotFoundException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *TrailNotFoundException) Code() string {
	return "TrailNotFoundException"
}

// Message returns the exception's message.
func (s *TrailNotFoundException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *TrailNotFoundException) OrigErr() error {
	return nil
}

func (s *TrailNotFoundException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *TrailNotFoundException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *TrailNotFoundException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is no longer in use.
type TrailNotProvidedException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailNotProvidedException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s TrailNotProvidedException) GoString() string {
	return s.String()
}

func newErrorTrailNotProvidedException(v protocol.ResponseMetadata) error {
	return &TrailNotProvidedException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *TrailNotProvidedException) Code() string {
	return "TrailNotProvidedException"
}

// Message returns the exception's message.
func (s *TrailNotProvidedException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *TrailNotProvidedException) OrigErr() error {
	return nil
}

func (s *TrailNotProvidedException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *TrailNotProvidedException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *TrailNotProvidedException) RequestID() string {
	return s.RespMetadata.RequestID
}

// This exception is thrown when the requested operation is not supported.
type UnsupportedOperationException struct {
	_            struct{}                  `type:"structure"`
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UnsupportedOperationException) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UnsupportedOperationException) GoString() string {
	return s.String()
}

func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error {
	return &UnsupportedOperationException{
		RespMetadata: v,
	}
}

// Code returns the exception type name.
func (s *UnsupportedOperationException) Code() string {
	return "UnsupportedOperationException"
}

// Message returns the exception's message.
func (s *UnsupportedOperationException) Message() string {
	if s.Message_ != nil {
		return *s.Message_
	}
	return ""
}

// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *UnsupportedOperationException) OrigErr() error {
	return nil
}

func (s *UnsupportedOperationException) Error() string {
	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}

// Status code returns the HTTP status code for the request's response error.
func (s *UnsupportedOperationException) StatusCode() int {
	return s.RespMetadata.StatusCode
}

// RequestID returns the service's response RequestID for request.
func (s *UnsupportedOperationException) RequestID() string {
	return s.RespMetadata.RequestID
}

type UpdateChannelInput struct {
	_ struct{} `type:"structure"`

	// The ARN or ID (the ARN suffix) of the channel that you want to update.
	//
	// Channel is a required field
	Channel *string `min:"3" type:"string" required:"true"`

	// The ARNs of event data stores that you want to log events arriving through
	// the channel.
	Destinations []*Destination `min:"1" type:"list"`

	// Changes the name of the channel.
	Name *string `min:"3" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateChannelInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateChannelInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateChannelInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateChannelInput"}
	if s.Channel == nil {
		invalidParams.Add(request.NewErrParamRequired("Channel"))
	}
	if s.Channel != nil && len(*s.Channel) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Channel", 3))
	}
	if s.Destinations != nil && len(s.Destinations) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("Destinations", 1))
	}
	if s.Name != nil && len(*s.Name) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 3))
	}
	if s.Destinations != nil {
		for i, v := range s.Destinations {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetChannel sets the Channel field's value.
func (s *UpdateChannelInput) SetChannel(v string) *UpdateChannelInput {
	s.Channel = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *UpdateChannelInput) SetDestinations(v []*Destination) *UpdateChannelInput {
	s.Destinations = v
	return s
}

// SetName sets the Name field's value.
func (s *UpdateChannelInput) SetName(v string) *UpdateChannelInput {
	s.Name = &v
	return s
}

type UpdateChannelOutput struct {
	_ struct{} `type:"structure"`

	// The ARN of the channel that was updated.
	ChannelArn *string `min:"3" type:"string"`

	// The event data stores that log events arriving through the channel.
	Destinations []*Destination `min:"1" type:"list"`

	// The name of the channel that was updated.
	Name *string `min:"3" type:"string"`

	// The event source of the channel that was updated.
	Source *string `min:"1" type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateChannelOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateChannelOutput) GoString() string {
	return s.String()
}

// SetChannelArn sets the ChannelArn field's value.
func (s *UpdateChannelOutput) SetChannelArn(v string) *UpdateChannelOutput {
	s.ChannelArn = &v
	return s
}

// SetDestinations sets the Destinations field's value.
func (s *UpdateChannelOutput) SetDestinations(v []*Destination) *UpdateChannelOutput {
	s.Destinations = v
	return s
}

// SetName sets the Name field's value.
func (s *UpdateChannelOutput) SetName(v string) *UpdateChannelOutput {
	s.Name = &v
	return s
}

// SetSource sets the Source field's value.
func (s *UpdateChannelOutput) SetSource(v string) *UpdateChannelOutput {
	s.Source = &v
	return s
}

type UpdateEventDataStoreInput struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors used to select events for the event data store.
	// You can configure up to five advanced event selectors for each event data
	// store.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// The ARN (or the ID suffix of the ARN) of the event data store that you want
	// to update.
	//
	// EventDataStore is a required field
	EventDataStore *string `min:"3" type:"string" required:"true"`

	// Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail.
	// The value can be an alias name prefixed by alias/, a fully specified ARN
	// to an alias, a fully specified ARN to a key, or a globally unique identifier.
	//
	// Disabling or deleting the KMS key, or removing CloudTrail permissions on
	// the key, prevents CloudTrail from logging events to the event data store,
	// and prevents users from querying the data in the event data store that was
	// encrypted with the key. After you associate an event data store with a KMS
	// key, the KMS key cannot be removed or changed. Before you disable or delete
	// a KMS key that you are using with an event data store, delete or back up
	// your event data store.
	//
	// CloudTrail also supports KMS multi-Region keys. For more information about
	// multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
	// in the Key Management Service Developer Guide.
	//
	// Examples:
	//
	//    * alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	//
	//    * 12345678-1234-1234-1234-123456789012
	KmsKeyId *string `min:"1" type:"string"`

	// Specifies whether an event data store collects events from all Regions, or
	// only from the Region in which it was created.
	MultiRegionEnabled *bool `type:"boolean"`

	// The event data store name.
	Name *string `min:"3" type:"string"`

	// Specifies whether an event data store collects events logged for an organization
	// in Organizations.
	OrganizationEnabled *bool `type:"boolean"`

	// The retention period, in days.
	RetentionPeriod *int64 `min:"7" type:"integer"`

	// Indicates that termination protection is enabled and the event data store
	// cannot be automatically deleted.
	TerminationProtectionEnabled *bool `type:"boolean"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateEventDataStoreInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateEventDataStoreInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateEventDataStoreInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateEventDataStoreInput"}
	if s.EventDataStore == nil {
		invalidParams.Add(request.NewErrParamRequired("EventDataStore"))
	}
	if s.EventDataStore != nil && len(*s.EventDataStore) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("EventDataStore", 3))
	}
	if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 {
		invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1))
	}
	if s.Name != nil && len(*s.Name) < 3 {
		invalidParams.Add(request.NewErrParamMinLen("Name", 3))
	}
	if s.RetentionPeriod != nil && *s.RetentionPeriod < 7 {
		invalidParams.Add(request.NewErrParamMinValue("RetentionPeriod", 7))
	}
	if s.AdvancedEventSelectors != nil {
		for i, v := range s.AdvancedEventSelectors {
			if v == nil {
				continue
			}
			if err := v.Validate(); err != nil {
				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
			}
		}
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *UpdateEventDataStoreInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *UpdateEventDataStoreInput {
	s.AdvancedEventSelectors = v
	return s
}

// SetEventDataStore sets the EventDataStore field's value.
func (s *UpdateEventDataStoreInput) SetEventDataStore(v string) *UpdateEventDataStoreInput {
	s.EventDataStore = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *UpdateEventDataStoreInput) SetKmsKeyId(v string) *UpdateEventDataStoreInput {
	s.KmsKeyId = &v
	return s
}

// SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
func (s *UpdateEventDataStoreInput) SetMultiRegionEnabled(v bool) *UpdateEventDataStoreInput {
	s.MultiRegionEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *UpdateEventDataStoreInput) SetName(v string) *UpdateEventDataStoreInput {
	s.Name = &v
	return s
}

// SetOrganizationEnabled sets the OrganizationEnabled field's value.
func (s *UpdateEventDataStoreInput) SetOrganizationEnabled(v bool) *UpdateEventDataStoreInput {
	s.OrganizationEnabled = &v
	return s
}

// SetRetentionPeriod sets the RetentionPeriod field's value.
func (s *UpdateEventDataStoreInput) SetRetentionPeriod(v int64) *UpdateEventDataStoreInput {
	s.RetentionPeriod = &v
	return s
}

// SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
func (s *UpdateEventDataStoreInput) SetTerminationProtectionEnabled(v bool) *UpdateEventDataStoreInput {
	s.TerminationProtectionEnabled = &v
	return s
}

type UpdateEventDataStoreOutput struct {
	_ struct{} `type:"structure"`

	// The advanced event selectors that are applied to the event data store.
	AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`

	// The timestamp that shows when an event data store was first created.
	CreatedTimestamp *time.Time `type:"timestamp"`

	// The ARN of the event data store.
	EventDataStoreArn *string `min:"3" type:"string"`

	// Specifies the KMS key ID that encrypts the events delivered by CloudTrail.
	// The value is a fully specified ARN to a KMS key in the following format.
	//
	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `min:"1" type:"string"`

	// Indicates whether the event data store includes events from all Regions,
	// or only from the Region in which it was created.
	MultiRegionEnabled *bool `type:"boolean"`

	// The name of the event data store.
	Name *string `min:"3" type:"string"`

	// Indicates whether an event data store is collecting logged events for an
	// organization in Organizations.
	OrganizationEnabled *bool `type:"boolean"`

	// The retention period, in days.
	RetentionPeriod *int64 `min:"7" type:"integer"`

	// The status of an event data store.
	Status *string `type:"string" enum:"EventDataStoreStatus"`

	// Indicates whether termination protection is enabled for the event data store.
	TerminationProtectionEnabled *bool `type:"boolean"`

	// The timestamp that shows when the event data store was last updated. UpdatedTimestamp
	// is always either the same or newer than the time shown in CreatedTimestamp.
	UpdatedTimestamp *time.Time `type:"timestamp"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateEventDataStoreOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateEventDataStoreOutput) GoString() string {
	return s.String()
}

// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
func (s *UpdateEventDataStoreOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *UpdateEventDataStoreOutput {
	s.AdvancedEventSelectors = v
	return s
}

// SetCreatedTimestamp sets the CreatedTimestamp field's value.
func (s *UpdateEventDataStoreOutput) SetCreatedTimestamp(v time.Time) *UpdateEventDataStoreOutput {
	s.CreatedTimestamp = &v
	return s
}

// SetEventDataStoreArn sets the EventDataStoreArn field's value.
func (s *UpdateEventDataStoreOutput) SetEventDataStoreArn(v string) *UpdateEventDataStoreOutput {
	s.EventDataStoreArn = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *UpdateEventDataStoreOutput) SetKmsKeyId(v string) *UpdateEventDataStoreOutput {
	s.KmsKeyId = &v
	return s
}

// SetMultiRegionEnabled sets the MultiRegionEnabled field's value.
func (s *UpdateEventDataStoreOutput) SetMultiRegionEnabled(v bool) *UpdateEventDataStoreOutput {
	s.MultiRegionEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *UpdateEventDataStoreOutput) SetName(v string) *UpdateEventDataStoreOutput {
	s.Name = &v
	return s
}

// SetOrganizationEnabled sets the OrganizationEnabled field's value.
func (s *UpdateEventDataStoreOutput) SetOrganizationEnabled(v bool) *UpdateEventDataStoreOutput {
	s.OrganizationEnabled = &v
	return s
}

// SetRetentionPeriod sets the RetentionPeriod field's value.
func (s *UpdateEventDataStoreOutput) SetRetentionPeriod(v int64) *UpdateEventDataStoreOutput {
	s.RetentionPeriod = &v
	return s
}

// SetStatus sets the Status field's value.
func (s *UpdateEventDataStoreOutput) SetStatus(v string) *UpdateEventDataStoreOutput {
	s.Status = &v
	return s
}

// SetTerminationProtectionEnabled sets the TerminationProtectionEnabled field's value.
func (s *UpdateEventDataStoreOutput) SetTerminationProtectionEnabled(v bool) *UpdateEventDataStoreOutput {
	s.TerminationProtectionEnabled = &v
	return s
}

// SetUpdatedTimestamp sets the UpdatedTimestamp field's value.
func (s *UpdateEventDataStoreOutput) SetUpdatedTimestamp(v time.Time) *UpdateEventDataStoreOutput {
	s.UpdatedTimestamp = &v
	return s
}

// Specifies settings to update for the trail.
type UpdateTrailInput struct {
	_ struct{} `type:"structure"`

	// Specifies a log group name using an Amazon Resource Name (ARN), a unique
	// identifier that represents the log group to which CloudTrail logs are delivered.
	// You must use a log group that exists in your account.
	//
	// Not required unless you specify CloudWatchLogsRoleArn.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group. You must use a role that exists in your account.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether log file validation is enabled. The default is false.
	//
	// When you disable log file integrity validation, the chain of digest files
	// is broken after one hour. CloudTrail does not create digest files for log
	// files that were delivered during a period in which log file integrity validation
	// was disabled. For example, if you enable log file integrity validation at
	// noon on January 1, disable it at noon on January 2, and re-enable it at noon
	// on January 10, digest files will not be created for the log files delivered
	// from noon on January 2 to noon on January 10. The same applies whenever you
	// stop CloudTrail logging or delete a trail.
	EnableLogFileValidation *bool `type:"boolean"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail applies only to the current Region or to all
	// Regions. The default is false. If the trail exists only in the current Region
	// and this value is set to true, shadow trails (replications of the trail)
	// will be created in the other Regions. If the trail exists in all Regions
	// and this value is set to false, the trail will remain in the Region where
	// it was created, and its shadow trails in other Regions will be deleted. As
	// a best practice, consider using trails that log events in all Regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is applied to all accounts in an organization
	// in Organizations, or only for the current Amazon Web Services account. The
	// default is false, and cannot be true unless the call is made on behalf of
	// an Amazon Web Services account that is the management account or delegated
	// administrator account for an organization in Organizations. If the trail
	// is not an organization trail and this is set to true, the trail will be created
	// in all Amazon Web Services accounts that belong to the organization. If the
	// trail is an organization trail and this is set to false, the trail will remain
	// in the current Amazon Web Services account but be deleted from all member
	// accounts in the organization.
	IsOrganizationTrail *bool `type:"boolean"`

	// Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
	// The value can be an alias name prefixed by "alias/", a fully specified ARN
	// to an alias, a fully specified ARN to a key, or a globally unique identifier.
	//
	// CloudTrail also supports KMS multi-Region keys. For more information about
	// multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
	// in the Key Management Service Developer Guide.
	//
	// Examples:
	//
	//    * alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
	//
	//    * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	//
	//    * 12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies the name of the trail or trail ARN. If Name is a trail name, the
	// string must meet the following requirements:
	//
	//    * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
	//    (_), or dashes (-)
	//
	//    * Start with a letter or number, and end with a letter or number
	//
	//    * Be between 3 and 128 characters
	//
	//    * Have no adjacent periods, underscores or dashes. Names like my-_namespace
	//    and my--namespace are not valid.
	//
	//    * Not be in IP address format (for example, 192.168.5.4)
	//
	// If Name is a trail ARN, it must be in the following format.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
	S3BucketName *string `type:"string"`

	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
	// you have designated for log file delivery. For more information, see Finding
	// Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	// The maximum length is 200 characters.
	S3KeyPrefix *string `type:"string"`

	// Specifies the name of the Amazon SNS topic defined for notification of log
	// file delivery. The maximum length is 256 characters.
	SnsTopicName *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateTrailInput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateTrailInput) GoString() string {
	return s.String()
}

// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateTrailInput) Validate() error {
	invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"}
	if s.Name == nil {
		invalidParams.Add(request.NewErrParamRequired("Name"))
	}

	if invalidParams.Len() > 0 {
		return invalidParams
	}
	return nil
}

// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput {
	s.CloudWatchLogsLogGroupArn = &v
	return s
}

// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput {
	s.CloudWatchLogsRoleArn = &v
	return s
}

// SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput {
	s.EnableLogFileValidation = &v
	return s
}

// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput {
	s.IncludeGlobalServiceEvents = &v
	return s
}

// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput {
	s.IsMultiRegionTrail = &v
	return s
}

// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
func (s *UpdateTrailInput) SetIsOrganizationTrail(v bool) *UpdateTrailInput {
	s.IsOrganizationTrail = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput {
	s.KmsKeyId = &v
	return s
}

// SetName sets the Name field's value.
func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput {
	s.Name = &v
	return s
}

// SetS3BucketName sets the S3BucketName field's value.
func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput {
	s.S3BucketName = &v
	return s
}

// SetS3KeyPrefix sets the S3KeyPrefix field's value.
func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput {
	s.S3KeyPrefix = &v
	return s
}

// SetSnsTopicName sets the SnsTopicName field's value.
func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput {
	s.SnsTopicName = &v
	return s
}

// Returns the objects or data listed below if successful. Otherwise, returns
// an error.
type UpdateTrailOutput struct {
	_ struct{} `type:"structure"`

	// Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
	// logs are delivered.
	CloudWatchLogsLogGroupArn *string `type:"string"`

	// Specifies the role for the CloudWatch Logs endpoint to assume to write to
	// a user's log group.
	CloudWatchLogsRoleArn *string `type:"string"`

	// Specifies whether the trail is publishing events from global services such
	// as IAM to the log files.
	IncludeGlobalServiceEvents *bool `type:"boolean"`

	// Specifies whether the trail exists in one Region or in all Regions.
	IsMultiRegionTrail *bool `type:"boolean"`

	// Specifies whether the trail is an organization trail.
	IsOrganizationTrail *bool `type:"boolean"`

	// Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
	// The value is a fully specified ARN to a KMS key in the following format.
	//
	// arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
	KmsKeyId *string `type:"string"`

	// Specifies whether log file integrity validation is enabled.
	LogFileValidationEnabled *bool `type:"boolean"`

	// Specifies the name of the trail.
	Name *string `type:"string"`

	// Specifies the name of the Amazon S3 bucket designated for publishing log
	// files.
	S3BucketName *string `type:"string"`

	// Specifies the Amazon S3 key prefix that comes after the name of the bucket
	// you have designated for log file delivery. For more information, see Finding
	// Your IAM Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
	S3KeyPrefix *string `type:"string"`

	// Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
	// when log files are delivered. The following is the format of a topic ARN.
	//
	// arn:aws:sns:us-east-2:123456789012:MyTopic
	SnsTopicARN *string `type:"string"`

	// This field is no longer in use. Use SnsTopicARN.
	//
	// Deprecated: SnsTopicName has been deprecated
	SnsTopicName *string `deprecated:"true" type:"string"`

	// Specifies the ARN of the trail that was updated. The following is the format
	// of a trail ARN.
	//
	// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
	TrailARN *string `type:"string"`
}

// String returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateTrailOutput) String() string {
	return awsutil.Prettify(s)
}

// GoString returns the string representation.
//
// API parameter values that are decorated as "sensitive" in the API will not
// be included in the string output. The member name will be present, but the
// value will be replaced with "sensitive".
func (s UpdateTrailOutput) GoString() string {
	return s.String()
}

// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput {
	s.CloudWatchLogsLogGroupArn = &v
	return s
}

// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput {
	s.CloudWatchLogsRoleArn = &v
	return s
}

// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput {
	s.IncludeGlobalServiceEvents = &v
	return s
}

// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput {
	s.IsMultiRegionTrail = &v
	return s
}

// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
func (s *UpdateTrailOutput) SetIsOrganizationTrail(v bool) *UpdateTrailOutput {
	s.IsOrganizationTrail = &v
	return s
}

// SetKmsKeyId sets the KmsKeyId field's value.
func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput {
	s.KmsKeyId = &v
	return s
}

// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput {
	s.LogFileValidationEnabled = &v
	return s
}

// SetName sets the Name field's value.
func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput {
	s.Name = &v
	return s
}

// SetS3BucketName sets the S3BucketName field's value.
func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput {
	s.S3BucketName = &v
	return s
}

// SetS3KeyPrefix sets the S3KeyPrefix field's value.
func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput {
	s.S3KeyPrefix = &v
	return s
}

// SetSnsTopicARN sets the SnsTopicARN field's value.
func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput {
	s.SnsTopicARN = &v
	return s
}

// SetSnsTopicName sets the SnsTopicName field's value.
func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput {
	s.SnsTopicName = &v
	return s
}

// SetTrailARN sets the TrailARN field's value.
func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput {
	s.TrailARN = &v
	return s
}

const (
	// DeliveryStatusSuccess is a DeliveryStatus enum value
	DeliveryStatusSuccess = "SUCCESS"

	// DeliveryStatusFailed is a DeliveryStatus enum value
	DeliveryStatusFailed = "FAILED"

	// DeliveryStatusFailedSigningFile is a DeliveryStatus enum value
	DeliveryStatusFailedSigningFile = "FAILED_SIGNING_FILE"

	// DeliveryStatusPending is a DeliveryStatus enum value
	DeliveryStatusPending = "PENDING"

	// DeliveryStatusResourceNotFound is a DeliveryStatus enum value
	DeliveryStatusResourceNotFound = "RESOURCE_NOT_FOUND"

	// DeliveryStatusAccessDenied is a DeliveryStatus enum value
	DeliveryStatusAccessDenied = "ACCESS_DENIED"

	// DeliveryStatusAccessDeniedSigningFile is a DeliveryStatus enum value
	DeliveryStatusAccessDeniedSigningFile = "ACCESS_DENIED_SIGNING_FILE"

	// DeliveryStatusCancelled is a DeliveryStatus enum value
	DeliveryStatusCancelled = "CANCELLED"

	// DeliveryStatusUnknown is a DeliveryStatus enum value
	DeliveryStatusUnknown = "UNKNOWN"
)

// DeliveryStatus_Values returns all elements of the DeliveryStatus enum
func DeliveryStatus_Values() []string {
	return []string{
		DeliveryStatusSuccess,
		DeliveryStatusFailed,
		DeliveryStatusFailedSigningFile,
		DeliveryStatusPending,
		DeliveryStatusResourceNotFound,
		DeliveryStatusAccessDenied,
		DeliveryStatusAccessDeniedSigningFile,
		DeliveryStatusCancelled,
		DeliveryStatusUnknown,
	}
}

const (
	// DestinationTypeEventDataStore is a DestinationType enum value
	DestinationTypeEventDataStore = "EVENT_DATA_STORE"

	// DestinationTypeAwsService is a DestinationType enum value
	DestinationTypeAwsService = "AWS_SERVICE"
)

// DestinationType_Values returns all elements of the DestinationType enum
func DestinationType_Values() []string {
	return []string{
		DestinationTypeEventDataStore,
		DestinationTypeAwsService,
	}
}

const (
	// EventCategoryInsight is a EventCategory enum value
	EventCategoryInsight = "insight"
)

// EventCategory_Values returns all elements of the EventCategory enum
func EventCategory_Values() []string {
	return []string{
		EventCategoryInsight,
	}
}

const (
	// EventDataStoreStatusCreated is a EventDataStoreStatus enum value
	EventDataStoreStatusCreated = "CREATED"

	// EventDataStoreStatusEnabled is a EventDataStoreStatus enum value
	EventDataStoreStatusEnabled = "ENABLED"

	// EventDataStoreStatusPendingDeletion is a EventDataStoreStatus enum value
	EventDataStoreStatusPendingDeletion = "PENDING_DELETION"

	// EventDataStoreStatusStartingIngestion is a EventDataStoreStatus enum value
	EventDataStoreStatusStartingIngestion = "STARTING_INGESTION"

	// EventDataStoreStatusStoppingIngestion is a EventDataStoreStatus enum value
	EventDataStoreStatusStoppingIngestion = "STOPPING_INGESTION"

	// EventDataStoreStatusStoppedIngestion is a EventDataStoreStatus enum value
	EventDataStoreStatusStoppedIngestion = "STOPPED_INGESTION"
)

// EventDataStoreStatus_Values returns all elements of the EventDataStoreStatus enum
func EventDataStoreStatus_Values() []string {
	return []string{
		EventDataStoreStatusCreated,
		EventDataStoreStatusEnabled,
		EventDataStoreStatusPendingDeletion,
		EventDataStoreStatusStartingIngestion,
		EventDataStoreStatusStoppingIngestion,
		EventDataStoreStatusStoppedIngestion,
	}
}

const (
	// ImportFailureStatusFailed is a ImportFailureStatus enum value
	ImportFailureStatusFailed = "FAILED"

	// ImportFailureStatusRetry is a ImportFailureStatus enum value
	ImportFailureStatusRetry = "RETRY"

	// ImportFailureStatusSucceeded is a ImportFailureStatus enum value
	ImportFailureStatusSucceeded = "SUCCEEDED"
)

// ImportFailureStatus_Values returns all elements of the ImportFailureStatus enum
func ImportFailureStatus_Values() []string {
	return []string{
		ImportFailureStatusFailed,
		ImportFailureStatusRetry,
		ImportFailureStatusSucceeded,
	}
}

const (
	// ImportStatusInitializing is a ImportStatus enum value
	ImportStatusInitializing = "INITIALIZING"

	// ImportStatusInProgress is a ImportStatus enum value
	ImportStatusInProgress = "IN_PROGRESS"

	// ImportStatusFailed is a ImportStatus enum value
	ImportStatusFailed = "FAILED"

	// ImportStatusStopped is a ImportStatus enum value
	ImportStatusStopped = "STOPPED"

	// ImportStatusCompleted is a ImportStatus enum value
	ImportStatusCompleted = "COMPLETED"
)

// ImportStatus_Values returns all elements of the ImportStatus enum
func ImportStatus_Values() []string {
	return []string{
		ImportStatusInitializing,
		ImportStatusInProgress,
		ImportStatusFailed,
		ImportStatusStopped,
		ImportStatusCompleted,
	}
}

const (
	// InsightTypeApiCallRateInsight is a InsightType enum value
	InsightTypeApiCallRateInsight = "ApiCallRateInsight"

	// InsightTypeApiErrorRateInsight is a InsightType enum value
	InsightTypeApiErrorRateInsight = "ApiErrorRateInsight"
)

// InsightType_Values returns all elements of the InsightType enum
func InsightType_Values() []string {
	return []string{
		InsightTypeApiCallRateInsight,
		InsightTypeApiErrorRateInsight,
	}
}

const (
	// LookupAttributeKeyEventId is a LookupAttributeKey enum value
	LookupAttributeKeyEventId = "EventId"

	// LookupAttributeKeyEventName is a LookupAttributeKey enum value
	LookupAttributeKeyEventName = "EventName"

	// LookupAttributeKeyReadOnly is a LookupAttributeKey enum value
	LookupAttributeKeyReadOnly = "ReadOnly"

	// LookupAttributeKeyUsername is a LookupAttributeKey enum value
	LookupAttributeKeyUsername = "Username"

	// LookupAttributeKeyResourceType is a LookupAttributeKey enum value
	LookupAttributeKeyResourceType = "ResourceType"

	// LookupAttributeKeyResourceName is a LookupAttributeKey enum value
	LookupAttributeKeyResourceName = "ResourceName"

	// LookupAttributeKeyEventSource is a LookupAttributeKey enum value
	LookupAttributeKeyEventSource = "EventSource"

	// LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value
	LookupAttributeKeyAccessKeyId = "AccessKeyId"
)

// LookupAttributeKey_Values returns all elements of the LookupAttributeKey enum
func LookupAttributeKey_Values() []string {
	return []string{
		LookupAttributeKeyEventId,
		LookupAttributeKeyEventName,
		LookupAttributeKeyReadOnly,
		LookupAttributeKeyUsername,
		LookupAttributeKeyResourceType,
		LookupAttributeKeyResourceName,
		LookupAttributeKeyEventSource,
		LookupAttributeKeyAccessKeyId,
	}
}

const (
	// QueryStatusQueued is a QueryStatus enum value
	QueryStatusQueued = "QUEUED"

	// QueryStatusRunning is a QueryStatus enum value
	QueryStatusRunning = "RUNNING"

	// QueryStatusFinished is a QueryStatus enum value
	QueryStatusFinished = "FINISHED"

	// QueryStatusFailed is a QueryStatus enum value
	QueryStatusFailed = "FAILED"

	// QueryStatusCancelled is a QueryStatus enum value
	QueryStatusCancelled = "CANCELLED"

	// QueryStatusTimedOut is a QueryStatus enum value
	QueryStatusTimedOut = "TIMED_OUT"
)

// QueryStatus_Values returns all elements of the QueryStatus enum
func QueryStatus_Values() []string {
	return []string{
		QueryStatusQueued,
		QueryStatusRunning,
		QueryStatusFinished,
		QueryStatusFailed,
		QueryStatusCancelled,
		QueryStatusTimedOut,
	}
}

const (
	// ReadWriteTypeReadOnly is a ReadWriteType enum value
	ReadWriteTypeReadOnly = "ReadOnly"

	// ReadWriteTypeWriteOnly is a ReadWriteType enum value
	ReadWriteTypeWriteOnly = "WriteOnly"

	// ReadWriteTypeAll is a ReadWriteType enum value
	ReadWriteTypeAll = "All"
)

// ReadWriteType_Values returns all elements of the ReadWriteType enum
func ReadWriteType_Values() []string {
	return []string{
		ReadWriteTypeReadOnly,
		ReadWriteTypeWriteOnly,
		ReadWriteTypeAll,
	}
}