diff --git a/enumeration/remote/aws/cloudtrail_enumerator.go b/enumeration/remote/aws/cloudtrail_enumerator.go new file mode 100644 index 00000000..65c10866 --- /dev/null +++ b/enumeration/remote/aws/cloudtrail_enumerator.go @@ -0,0 +1,46 @@ +package aws + +import ( + "github.com/snyk/driftctl/enumeration/remote/aws/repository" + remoteerror "github.com/snyk/driftctl/enumeration/remote/error" + "github.com/snyk/driftctl/enumeration/resource" + "github.com/snyk/driftctl/enumeration/resource/aws" +) + +type CloudtrailEnumerator struct { + repository repository.CloudtrailRepository + factory resource.ResourceFactory +} + +func NewCloudtrailEnumerator(repo repository.CloudtrailRepository, factory resource.ResourceFactory) *CloudtrailEnumerator { + return &CloudtrailEnumerator{ + repository: repo, + factory: factory, + } +} + +func (e *CloudtrailEnumerator) SupportedType() resource.ResourceType { + return aws.AwsCloudtrailResourceType +} + +func (e *CloudtrailEnumerator) Enumerate() ([]*resource.Resource, error) { + trails, err := e.repository.ListAllTrails() + if err != nil { + return nil, remoteerror.NewResourceListingError(err, string(e.SupportedType())) + } + + results := make([]*resource.Resource, 0, len(trails)) + + for _, trail := range trails { + results = append( + results, + e.factory.CreateAbstractResource( + string(e.SupportedType()), + *trail.Name, + map[string]interface{}{}, + ), + ) + } + + return results, err +} diff --git a/enumeration/remote/aws/init.go b/enumeration/remote/aws/init.go index f6998430..69375944 100644 --- a/enumeration/remote/aws/init.go +++ b/enumeration/remote/aws/init.go @@ -49,6 +49,7 @@ func Init(version string, alerter alerter.AlerterInterface, providerLibrary *ter kmsRepository := repository.NewKMSRepository(provider.session, repositoryCache) iamRepository := repository.NewIAMRepository(provider.session, repositoryCache) cloudformationRepository := repository.NewCloudformationRepository(provider.session, repositoryCache) + cloudtrailRepository := repository.NewCloudtrailRepository(provider.session, repositoryCache) apigatewayRepository := repository.NewApiGatewayRepository(provider.session, repositoryCache) appAutoScalingRepository := repository.NewAppAutoScalingRepository(provider.session, repositoryCache) apigatewayv2Repository := repository.NewApiGatewayV2Repository(provider.session, repositoryCache) @@ -195,6 +196,9 @@ func Init(version string, alerter alerter.AlerterInterface, providerLibrary *ter remoteLibrary.AddEnumerator(NewCloudformationStackEnumerator(cloudformationRepository, factory)) remoteLibrary.AddDetailsFetcher(aws.AwsCloudformationStackResourceType, common.NewGenericDetailsFetcher(aws.AwsCloudformationStackResourceType, provider, deserializer)) + remoteLibrary.AddEnumerator(NewCloudtrailEnumerator(cloudtrailRepository, factory)) + remoteLibrary.AddDetailsFetcher(aws.AwsCloudtrailResourceType, common.NewGenericDetailsFetcher(aws.AwsCloudtrailResourceType, provider, deserializer)) + remoteLibrary.AddEnumerator(NewApiGatewayRestApiEnumerator(apigatewayRepository, factory)) remoteLibrary.AddEnumerator(NewApiGatewayAccountEnumerator(apigatewayRepository, factory)) remoteLibrary.AddEnumerator(NewApiGatewayApiKeyEnumerator(apigatewayRepository, factory)) diff --git a/enumeration/remote/aws/repository/cloudtrail_repository.go b/enumeration/remote/aws/repository/cloudtrail_repository.go new file mode 100644 index 00000000..db4bfd03 --- /dev/null +++ b/enumeration/remote/aws/repository/cloudtrail_repository.go @@ -0,0 +1,48 @@ +package repository + +import ( + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/cloudtrail" + "github.com/aws/aws-sdk-go/service/cloudtrail/cloudtrailiface" + "github.com/snyk/driftctl/enumeration/remote/cache" +) + +type CloudtrailRepository interface { + ListAllTrails() ([]*cloudtrail.TrailInfo, error) +} + +type cloudtrailRepository struct { + client cloudtrailiface.CloudTrailAPI + cache cache.Cache +} + +func NewCloudtrailRepository(session *session.Session, c cache.Cache) *cloudtrailRepository { + return &cloudtrailRepository{ + cloudtrail.New(session), + c, + } +} + +func (r *cloudtrailRepository) ListAllTrails() ([]*cloudtrail.TrailInfo, error) { + cacheKey := "ListAllTrails" + if v := r.cache.Get(cacheKey); v != nil { + return v.([]*cloudtrail.TrailInfo), nil + } + + var trails []*cloudtrail.TrailInfo + input := cloudtrail.ListTrailsInput{} + err := r.client.ListTrailsPages(&input, + func(resp *cloudtrail.ListTrailsOutput, lastPage bool) bool { + if resp.Trails != nil { + trails = append(trails, resp.Trails...) + } + return !lastPage + }, + ) + if err != nil { + return nil, err + } + + r.cache.Put(cacheKey, trails) + return trails, nil +} diff --git a/enumeration/remote/aws/repository/cloudtrail_repository_test.go b/enumeration/remote/aws/repository/cloudtrail_repository_test.go new file mode 100644 index 00000000..f309cd0a --- /dev/null +++ b/enumeration/remote/aws/repository/cloudtrail_repository_test.go @@ -0,0 +1,89 @@ +package repository + +import ( + "strings" + "testing" + + "github.com/snyk/driftctl/enumeration/remote/cache" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudtrail" + awstest "github.com/snyk/driftctl/test/aws" + + "github.com/stretchr/testify/mock" + + "github.com/r3labs/diff/v2" + "github.com/stretchr/testify/assert" +) + +func Test_cloudtrailRepository_ListAllTrails(t *testing.T) { + tests := []struct { + name string + mocks func(client *awstest.MockFakeCloudtrail) + want []*cloudtrail.TrailInfo + wantErr error + }{ + { + name: "list multiple trail", + mocks: func(client *awstest.MockFakeCloudtrail) { + client.On("ListTrailsPages", + &cloudtrail.ListTrailsInput{}, + mock.MatchedBy(func(callback func(res *cloudtrail.ListTrailsOutput, lastPage bool) bool) bool { + callback(&cloudtrail.ListTrailsOutput{ + Trails: []*cloudtrail.TrailInfo{ + {Name: aws.String("trail1")}, + {Name: aws.String("trail2")}, + {Name: aws.String("trail3")}, + }, + }, false) + callback(&cloudtrail.ListTrailsOutput{ + Trails: []*cloudtrail.TrailInfo{ + {Name: aws.String("trail4")}, + {Name: aws.String("trail5")}, + {Name: aws.String("trail6")}, + }, + }, true) + return true + })).Return(nil).Once() + }, + want: []*cloudtrail.TrailInfo{ + {Name: aws.String("trail1")}, + {Name: aws.String("trail2")}, + {Name: aws.String("trail3")}, + {Name: aws.String("trail4")}, + {Name: aws.String("trail5")}, + {Name: aws.String("trail6")}, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + store := cache.New(1) + client := awstest.MockFakeCloudtrail{} + tt.mocks(&client) + r := &cloudtrailRepository{ + client: &client, + cache: store, + } + got, err := r.ListAllTrails() + assert.Equal(t, tt.wantErr, err) + + if err == nil { + // Check that results were cached + cachedData, err := r.ListAllTrails() + assert.NoError(t, err) + assert.Equal(t, got, cachedData) + assert.IsType(t, []*cloudtrail.TrailInfo{}, store.Get("ListAllTrails")) + } + + changelog, err := diff.Diff(got, tt.want) + assert.Nil(t, err) + if len(changelog) > 0 { + for _, change := range changelog { + t.Errorf("%s: %s -> %s", strings.Join(change.Path, "."), change.From, change.To) + } + t.Fail() + } + }) + } +} diff --git a/enumeration/resource/aws/aws_cloudtrail.go b/enumeration/resource/aws/aws_cloudtrail.go new file mode 100644 index 00000000..e9d2d397 --- /dev/null +++ b/enumeration/resource/aws/aws_cloudtrail.go @@ -0,0 +1,3 @@ +package aws + +const AwsCloudtrailResourceType = "aws_cloudtrail" diff --git a/enumeration/resource/resource_types.go b/enumeration/resource/resource_types.go index be2a250a..1c53a600 100644 --- a/enumeration/resource/resource_types.go +++ b/enumeration/resource/resource_types.go @@ -175,6 +175,7 @@ var supportedTypes = map[string]ResourceTypeMeta{ "aws_launch_configuration": {}, "aws_elb": {}, "aws_elasticache_cluster": {}, + "aws_cloudtrail": {}, "github_branch_protection": {}, "github_membership": {}, diff --git a/pkg/iac/terraform/state/terraform_state_reader_test.go b/pkg/iac/terraform/state/terraform_state_reader_test.go index 91ea33dd..92291363 100644 --- a/pkg/iac/terraform/state/terraform_state_reader_test.go +++ b/pkg/iac/terraform/state/terraform_state_reader_test.go @@ -210,6 +210,7 @@ func TestTerraformStateReader_AWS_Resources(t *testing.T) { {name: "ElastiCache Cluster", dirName: "aws_elasticache_cluster", wantErr: false}, {name: "IAM Group", dirName: "aws_iam_group", wantErr: false}, {name: "ECR Repository Policy", dirName: "aws_ecr_repository_policy", wantErr: false}, + {name: "cloudtrail", dirName: "aws_cloudtrail", wantErr: false}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/pkg/iac/terraform/state/test/aws_cloudtrail/results.golden.json b/pkg/iac/terraform/state/test/aws_cloudtrail/results.golden.json new file mode 100755 index 00000000..bd42acef --- /dev/null +++ b/pkg/iac/terraform/state/test/aws_cloudtrail/results.golden.json @@ -0,0 +1,23 @@ +[ + { + "Id": "testtrailtrail", + "Type": "aws_cloudtrail", + "Attrs": { + "arn": "arn:aws:cloudtrail:eu-west-2:526954929923:trail/testtrailtrail", + "cloud_watch_logs_group_arn": "", + "cloud_watch_logs_role_arn": "", + "enable_log_file_validation": false, + "enable_logging": true, + "home_region": "eu-west-2", + "id": "testtrailtrail", + "include_global_service_events": true, + "is_multi_region_trail": false, + "is_organization_trail": false, + "kms_key_id": "", + "name": "testtrailtrail", + "s3_bucket_name": "testtrailbuckettestestest", + "s3_key_prefix": "", + "sns_topic_name": "" + } + } +] \ No newline at end of file diff --git a/pkg/iac/terraform/state/test/aws_cloudtrail/terraform.tfstate b/pkg/iac/terraform/state/test/aws_cloudtrail/terraform.tfstate new file mode 100644 index 00000000..a67920da --- /dev/null +++ b/pkg/iac/terraform/state/test/aws_cloudtrail/terraform.tfstate @@ -0,0 +1,47 @@ +{ + "version": 4, + "terraform_version": "0.14.2", + "serial": 72, + "lineage": "0a405b90-f526-2004-0d4b-f5fd84ca6664", + "outputs": {}, + "resources": [ + { + "mode": "managed", + "type": "aws_cloudtrail", + "name": "testtrailtrail", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "advanced_event_selector": [], + "arn": "arn:aws:cloudtrail:eu-west-2:526954929923:trail/testtrailtrail", + "cloud_watch_logs_group_arn": "", + "cloud_watch_logs_role_arn": "", + "enable_log_file_validation": false, + "enable_logging": true, + "event_selector": [], + "home_region": "eu-west-2", + "id": "testtrailtrail", + "include_global_service_events": true, + "insight_selector": [], + "is_multi_region_trail": false, + "is_organization_trail": false, + "kms_key_id": "", + "name": "testtrailtrail", + "s3_bucket_name": "testtrailbuckettestestest", + "s3_key_prefix": "", + "sns_topic_name": "", + "tags": null, + "tags_all": {} + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "aws_s3_bucket.testtrailbuckettestestest" + ] + } + ] + } + ] +} diff --git a/pkg/resource/aws/aws_cloudtrail.go b/pkg/resource/aws/aws_cloudtrail.go new file mode 100644 index 00000000..9c5f6d2d --- /dev/null +++ b/pkg/resource/aws/aws_cloudtrail.go @@ -0,0 +1,16 @@ +package aws + +import ( + "github.com/snyk/driftctl/enumeration/resource" + dctlresource "github.com/snyk/driftctl/pkg/resource" +) + +const AwsCloudtrailResourceType = "aws_cloudtrail" + +func initAwsCloudtrailMetaData(resourceSchemaRepository dctlresource.SchemaRepositoryInterface) { + /*resourceSchemaRepository.SetNormalizeFunc(AwsCloudfrontDistributionResourceType, func(res *resource.Resource) { + val := res.Attrs + })*/ + resourceSchemaRepository.SetFlags(AwsCloudfrontDistributionResourceType, resource.FlagDeepMode) + +} diff --git a/pkg/resource/aws/metadatas.go b/pkg/resource/aws/metadatas.go index 512dd2ae..71c86bbb 100644 --- a/pkg/resource/aws/metadatas.go +++ b/pkg/resource/aws/metadatas.go @@ -69,4 +69,5 @@ func InitResourcesMetadata(resourceSchemaRepository resource.SchemaRepositoryInt initAwsRDSClusterMetaData(resourceSchemaRepository) initAwsCloudformationStackMetaData(resourceSchemaRepository) initAwsAppAutoscalingTargetMetaData(resourceSchemaRepository) + initAwsCloudtrailMetaData(resourceSchemaRepository) } diff --git a/pkg/resource/resource_types.go b/pkg/resource/resource_types.go index 567f770e..96d41f5e 100644 --- a/pkg/resource/resource_types.go +++ b/pkg/resource/resource_types.go @@ -177,6 +177,7 @@ var supportedTypes = map[string]ResourceTypeMeta{ "aws_launch_configuration": {}, "aws_elb": {}, "aws_elasticache_cluster": {}, + "aws_cloudtrail": {}, "github_branch_protection": {}, "github_membership": {}, diff --git a/test/aws/cloudtrail.go b/test/aws/cloudtrail.go new file mode 100644 index 00000000..404ab3a9 --- /dev/null +++ b/test/aws/cloudtrail.go @@ -0,0 +1,9 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/service/cloudtrail/cloudtrailiface" +) + +type FakeCloudtrail interface { + cloudtrailiface.CloudTrailAPI +} diff --git a/test/aws/mock_FakeCloudtrail.go b/test/aws/mock_FakeCloudtrail.go new file mode 100644 index 00000000..85b9d125 --- /dev/null +++ b/test/aws/mock_FakeCloudtrail.go @@ -0,0 +1,1577 @@ +// Code generated by mockery v2.14.0. DO NOT EDIT. + +package aws + +import ( + context "context" + + cloudtrail "github.com/aws/aws-sdk-go/service/cloudtrail" + + mock "github.com/stretchr/testify/mock" + + request "github.com/aws/aws-sdk-go/aws/request" +) + +// MockFakeCloudtrail is an autogenerated mock type for the FakeCloudtrail type +type MockFakeCloudtrail struct { + mock.Mock +} + +// AddTags provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) AddTags(_a0 *cloudtrail.AddTagsInput) (*cloudtrail.AddTagsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.AddTagsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.AddTagsInput) *cloudtrail.AddTagsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.AddTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.AddTagsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// AddTagsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) AddTagsRequest(_a0 *cloudtrail.AddTagsInput) (*request.Request, *cloudtrail.AddTagsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.AddTagsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.AddTagsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.AddTagsInput) *cloudtrail.AddTagsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.AddTagsOutput) + } + } + + return r0, r1 +} + +// AddTagsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) AddTagsWithContext(_a0 context.Context, _a1 *cloudtrail.AddTagsInput, _a2 ...request.Option) (*cloudtrail.AddTagsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.AddTagsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.AddTagsInput, ...request.Option) *cloudtrail.AddTagsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.AddTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.AddTagsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateTrail provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) CreateTrail(_a0 *cloudtrail.CreateTrailInput) (*cloudtrail.CreateTrailOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.CreateTrailOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.CreateTrailInput) *cloudtrail.CreateTrailOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.CreateTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.CreateTrailInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateTrailRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) CreateTrailRequest(_a0 *cloudtrail.CreateTrailInput) (*request.Request, *cloudtrail.CreateTrailOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.CreateTrailInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.CreateTrailOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.CreateTrailInput) *cloudtrail.CreateTrailOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.CreateTrailOutput) + } + } + + return r0, r1 +} + +// CreateTrailWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) CreateTrailWithContext(_a0 context.Context, _a1 *cloudtrail.CreateTrailInput, _a2 ...request.Option) (*cloudtrail.CreateTrailOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.CreateTrailOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.CreateTrailInput, ...request.Option) *cloudtrail.CreateTrailOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.CreateTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.CreateTrailInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteTrail provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) DeleteTrail(_a0 *cloudtrail.DeleteTrailInput) (*cloudtrail.DeleteTrailOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.DeleteTrailOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.DeleteTrailInput) *cloudtrail.DeleteTrailOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.DeleteTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.DeleteTrailInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteTrailRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) DeleteTrailRequest(_a0 *cloudtrail.DeleteTrailInput) (*request.Request, *cloudtrail.DeleteTrailOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.DeleteTrailInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.DeleteTrailOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.DeleteTrailInput) *cloudtrail.DeleteTrailOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.DeleteTrailOutput) + } + } + + return r0, r1 +} + +// DeleteTrailWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) DeleteTrailWithContext(_a0 context.Context, _a1 *cloudtrail.DeleteTrailInput, _a2 ...request.Option) (*cloudtrail.DeleteTrailOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.DeleteTrailOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.DeleteTrailInput, ...request.Option) *cloudtrail.DeleteTrailOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.DeleteTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.DeleteTrailInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DescribeTrails provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) DescribeTrails(_a0 *cloudtrail.DescribeTrailsInput) (*cloudtrail.DescribeTrailsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.DescribeTrailsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.DescribeTrailsInput) *cloudtrail.DescribeTrailsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.DescribeTrailsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.DescribeTrailsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DescribeTrailsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) DescribeTrailsRequest(_a0 *cloudtrail.DescribeTrailsInput) (*request.Request, *cloudtrail.DescribeTrailsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.DescribeTrailsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.DescribeTrailsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.DescribeTrailsInput) *cloudtrail.DescribeTrailsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.DescribeTrailsOutput) + } + } + + return r0, r1 +} + +// DescribeTrailsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) DescribeTrailsWithContext(_a0 context.Context, _a1 *cloudtrail.DescribeTrailsInput, _a2 ...request.Option) (*cloudtrail.DescribeTrailsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.DescribeTrailsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.DescribeTrailsInput, ...request.Option) *cloudtrail.DescribeTrailsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.DescribeTrailsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.DescribeTrailsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetEventSelectors provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetEventSelectors(_a0 *cloudtrail.GetEventSelectorsInput) (*cloudtrail.GetEventSelectorsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.GetEventSelectorsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.GetEventSelectorsInput) *cloudtrail.GetEventSelectorsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetEventSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.GetEventSelectorsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetEventSelectorsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetEventSelectorsRequest(_a0 *cloudtrail.GetEventSelectorsInput) (*request.Request, *cloudtrail.GetEventSelectorsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.GetEventSelectorsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.GetEventSelectorsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.GetEventSelectorsInput) *cloudtrail.GetEventSelectorsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.GetEventSelectorsOutput) + } + } + + return r0, r1 +} + +// GetEventSelectorsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) GetEventSelectorsWithContext(_a0 context.Context, _a1 *cloudtrail.GetEventSelectorsInput, _a2 ...request.Option) (*cloudtrail.GetEventSelectorsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.GetEventSelectorsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.GetEventSelectorsInput, ...request.Option) *cloudtrail.GetEventSelectorsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetEventSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.GetEventSelectorsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetInsightSelectors provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetInsightSelectors(_a0 *cloudtrail.GetInsightSelectorsInput) (*cloudtrail.GetInsightSelectorsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.GetInsightSelectorsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.GetInsightSelectorsInput) *cloudtrail.GetInsightSelectorsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetInsightSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.GetInsightSelectorsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetInsightSelectorsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetInsightSelectorsRequest(_a0 *cloudtrail.GetInsightSelectorsInput) (*request.Request, *cloudtrail.GetInsightSelectorsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.GetInsightSelectorsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.GetInsightSelectorsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.GetInsightSelectorsInput) *cloudtrail.GetInsightSelectorsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.GetInsightSelectorsOutput) + } + } + + return r0, r1 +} + +// GetInsightSelectorsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) GetInsightSelectorsWithContext(_a0 context.Context, _a1 *cloudtrail.GetInsightSelectorsInput, _a2 ...request.Option) (*cloudtrail.GetInsightSelectorsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.GetInsightSelectorsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.GetInsightSelectorsInput, ...request.Option) *cloudtrail.GetInsightSelectorsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetInsightSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.GetInsightSelectorsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetTrail provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetTrail(_a0 *cloudtrail.GetTrailInput) (*cloudtrail.GetTrailOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.GetTrailOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.GetTrailInput) *cloudtrail.GetTrailOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.GetTrailInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetTrailRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetTrailRequest(_a0 *cloudtrail.GetTrailInput) (*request.Request, *cloudtrail.GetTrailOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.GetTrailInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.GetTrailOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.GetTrailInput) *cloudtrail.GetTrailOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.GetTrailOutput) + } + } + + return r0, r1 +} + +// GetTrailStatus provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetTrailStatus(_a0 *cloudtrail.GetTrailStatusInput) (*cloudtrail.GetTrailStatusOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.GetTrailStatusOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.GetTrailStatusInput) *cloudtrail.GetTrailStatusOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetTrailStatusOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.GetTrailStatusInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetTrailStatusRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) GetTrailStatusRequest(_a0 *cloudtrail.GetTrailStatusInput) (*request.Request, *cloudtrail.GetTrailStatusOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.GetTrailStatusInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.GetTrailStatusOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.GetTrailStatusInput) *cloudtrail.GetTrailStatusOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.GetTrailStatusOutput) + } + } + + return r0, r1 +} + +// GetTrailStatusWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) GetTrailStatusWithContext(_a0 context.Context, _a1 *cloudtrail.GetTrailStatusInput, _a2 ...request.Option) (*cloudtrail.GetTrailStatusOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.GetTrailStatusOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.GetTrailStatusInput, ...request.Option) *cloudtrail.GetTrailStatusOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetTrailStatusOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.GetTrailStatusInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetTrailWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) GetTrailWithContext(_a0 context.Context, _a1 *cloudtrail.GetTrailInput, _a2 ...request.Option) (*cloudtrail.GetTrailOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.GetTrailOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.GetTrailInput, ...request.Option) *cloudtrail.GetTrailOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.GetTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.GetTrailInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListPublicKeys provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) ListPublicKeys(_a0 *cloudtrail.ListPublicKeysInput) (*cloudtrail.ListPublicKeysOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.ListPublicKeysOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.ListPublicKeysInput) *cloudtrail.ListPublicKeysOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.ListPublicKeysOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.ListPublicKeysInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListPublicKeysPages provides a mock function with given fields: _a0, _a1 +func (_m *MockFakeCloudtrail) ListPublicKeysPages(_a0 *cloudtrail.ListPublicKeysInput, _a1 func(*cloudtrail.ListPublicKeysOutput, bool) bool) error { + ret := _m.Called(_a0, _a1) + + var r0 error + if rf, ok := ret.Get(0).(func(*cloudtrail.ListPublicKeysInput, func(*cloudtrail.ListPublicKeysOutput, bool) bool) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListPublicKeysPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3 +func (_m *MockFakeCloudtrail) ListPublicKeysPagesWithContext(_a0 context.Context, _a1 *cloudtrail.ListPublicKeysInput, _a2 func(*cloudtrail.ListPublicKeysOutput, bool) bool, _a3 ...request.Option) error { + _va := make([]interface{}, len(_a3)) + for _i := range _a3 { + _va[_i] = _a3[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1, _a2) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.ListPublicKeysInput, func(*cloudtrail.ListPublicKeysOutput, bool) bool, ...request.Option) error); ok { + r0 = rf(_a0, _a1, _a2, _a3...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListPublicKeysRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) ListPublicKeysRequest(_a0 *cloudtrail.ListPublicKeysInput) (*request.Request, *cloudtrail.ListPublicKeysOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.ListPublicKeysInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.ListPublicKeysOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.ListPublicKeysInput) *cloudtrail.ListPublicKeysOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.ListPublicKeysOutput) + } + } + + return r0, r1 +} + +// ListPublicKeysWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) ListPublicKeysWithContext(_a0 context.Context, _a1 *cloudtrail.ListPublicKeysInput, _a2 ...request.Option) (*cloudtrail.ListPublicKeysOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.ListPublicKeysOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.ListPublicKeysInput, ...request.Option) *cloudtrail.ListPublicKeysOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.ListPublicKeysOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.ListPublicKeysInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListTags provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) ListTags(_a0 *cloudtrail.ListTagsInput) (*cloudtrail.ListTagsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.ListTagsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.ListTagsInput) *cloudtrail.ListTagsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.ListTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.ListTagsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListTagsPages provides a mock function with given fields: _a0, _a1 +func (_m *MockFakeCloudtrail) ListTagsPages(_a0 *cloudtrail.ListTagsInput, _a1 func(*cloudtrail.ListTagsOutput, bool) bool) error { + ret := _m.Called(_a0, _a1) + + var r0 error + if rf, ok := ret.Get(0).(func(*cloudtrail.ListTagsInput, func(*cloudtrail.ListTagsOutput, bool) bool) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListTagsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3 +func (_m *MockFakeCloudtrail) ListTagsPagesWithContext(_a0 context.Context, _a1 *cloudtrail.ListTagsInput, _a2 func(*cloudtrail.ListTagsOutput, bool) bool, _a3 ...request.Option) error { + _va := make([]interface{}, len(_a3)) + for _i := range _a3 { + _va[_i] = _a3[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1, _a2) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.ListTagsInput, func(*cloudtrail.ListTagsOutput, bool) bool, ...request.Option) error); ok { + r0 = rf(_a0, _a1, _a2, _a3...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListTagsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) ListTagsRequest(_a0 *cloudtrail.ListTagsInput) (*request.Request, *cloudtrail.ListTagsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.ListTagsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.ListTagsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.ListTagsInput) *cloudtrail.ListTagsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.ListTagsOutput) + } + } + + return r0, r1 +} + +// ListTagsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) ListTagsWithContext(_a0 context.Context, _a1 *cloudtrail.ListTagsInput, _a2 ...request.Option) (*cloudtrail.ListTagsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.ListTagsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.ListTagsInput, ...request.Option) *cloudtrail.ListTagsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.ListTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.ListTagsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListTrails provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) ListTrails(_a0 *cloudtrail.ListTrailsInput) (*cloudtrail.ListTrailsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.ListTrailsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.ListTrailsInput) *cloudtrail.ListTrailsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.ListTrailsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.ListTrailsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListTrailsPages provides a mock function with given fields: _a0, _a1 +func (_m *MockFakeCloudtrail) ListTrailsPages(_a0 *cloudtrail.ListTrailsInput, _a1 func(*cloudtrail.ListTrailsOutput, bool) bool) error { + ret := _m.Called(_a0, _a1) + + var r0 error + if rf, ok := ret.Get(0).(func(*cloudtrail.ListTrailsInput, func(*cloudtrail.ListTrailsOutput, bool) bool) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListTrailsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3 +func (_m *MockFakeCloudtrail) ListTrailsPagesWithContext(_a0 context.Context, _a1 *cloudtrail.ListTrailsInput, _a2 func(*cloudtrail.ListTrailsOutput, bool) bool, _a3 ...request.Option) error { + _va := make([]interface{}, len(_a3)) + for _i := range _a3 { + _va[_i] = _a3[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1, _a2) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.ListTrailsInput, func(*cloudtrail.ListTrailsOutput, bool) bool, ...request.Option) error); ok { + r0 = rf(_a0, _a1, _a2, _a3...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListTrailsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) ListTrailsRequest(_a0 *cloudtrail.ListTrailsInput) (*request.Request, *cloudtrail.ListTrailsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.ListTrailsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.ListTrailsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.ListTrailsInput) *cloudtrail.ListTrailsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.ListTrailsOutput) + } + } + + return r0, r1 +} + +// ListTrailsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) ListTrailsWithContext(_a0 context.Context, _a1 *cloudtrail.ListTrailsInput, _a2 ...request.Option) (*cloudtrail.ListTrailsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.ListTrailsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.ListTrailsInput, ...request.Option) *cloudtrail.ListTrailsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.ListTrailsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.ListTrailsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LookupEvents provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) LookupEvents(_a0 *cloudtrail.LookupEventsInput) (*cloudtrail.LookupEventsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.LookupEventsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.LookupEventsInput) *cloudtrail.LookupEventsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.LookupEventsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.LookupEventsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LookupEventsPages provides a mock function with given fields: _a0, _a1 +func (_m *MockFakeCloudtrail) LookupEventsPages(_a0 *cloudtrail.LookupEventsInput, _a1 func(*cloudtrail.LookupEventsOutput, bool) bool) error { + ret := _m.Called(_a0, _a1) + + var r0 error + if rf, ok := ret.Get(0).(func(*cloudtrail.LookupEventsInput, func(*cloudtrail.LookupEventsOutput, bool) bool) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// LookupEventsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3 +func (_m *MockFakeCloudtrail) LookupEventsPagesWithContext(_a0 context.Context, _a1 *cloudtrail.LookupEventsInput, _a2 func(*cloudtrail.LookupEventsOutput, bool) bool, _a3 ...request.Option) error { + _va := make([]interface{}, len(_a3)) + for _i := range _a3 { + _va[_i] = _a3[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1, _a2) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.LookupEventsInput, func(*cloudtrail.LookupEventsOutput, bool) bool, ...request.Option) error); ok { + r0 = rf(_a0, _a1, _a2, _a3...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// LookupEventsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) LookupEventsRequest(_a0 *cloudtrail.LookupEventsInput) (*request.Request, *cloudtrail.LookupEventsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.LookupEventsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.LookupEventsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.LookupEventsInput) *cloudtrail.LookupEventsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.LookupEventsOutput) + } + } + + return r0, r1 +} + +// LookupEventsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) LookupEventsWithContext(_a0 context.Context, _a1 *cloudtrail.LookupEventsInput, _a2 ...request.Option) (*cloudtrail.LookupEventsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.LookupEventsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.LookupEventsInput, ...request.Option) *cloudtrail.LookupEventsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.LookupEventsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.LookupEventsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PutEventSelectors provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) PutEventSelectors(_a0 *cloudtrail.PutEventSelectorsInput) (*cloudtrail.PutEventSelectorsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.PutEventSelectorsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.PutEventSelectorsInput) *cloudtrail.PutEventSelectorsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.PutEventSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.PutEventSelectorsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PutEventSelectorsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) PutEventSelectorsRequest(_a0 *cloudtrail.PutEventSelectorsInput) (*request.Request, *cloudtrail.PutEventSelectorsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.PutEventSelectorsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.PutEventSelectorsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.PutEventSelectorsInput) *cloudtrail.PutEventSelectorsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.PutEventSelectorsOutput) + } + } + + return r0, r1 +} + +// PutEventSelectorsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) PutEventSelectorsWithContext(_a0 context.Context, _a1 *cloudtrail.PutEventSelectorsInput, _a2 ...request.Option) (*cloudtrail.PutEventSelectorsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.PutEventSelectorsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.PutEventSelectorsInput, ...request.Option) *cloudtrail.PutEventSelectorsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.PutEventSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.PutEventSelectorsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PutInsightSelectors provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) PutInsightSelectors(_a0 *cloudtrail.PutInsightSelectorsInput) (*cloudtrail.PutInsightSelectorsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.PutInsightSelectorsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.PutInsightSelectorsInput) *cloudtrail.PutInsightSelectorsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.PutInsightSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.PutInsightSelectorsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PutInsightSelectorsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) PutInsightSelectorsRequest(_a0 *cloudtrail.PutInsightSelectorsInput) (*request.Request, *cloudtrail.PutInsightSelectorsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.PutInsightSelectorsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.PutInsightSelectorsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.PutInsightSelectorsInput) *cloudtrail.PutInsightSelectorsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.PutInsightSelectorsOutput) + } + } + + return r0, r1 +} + +// PutInsightSelectorsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) PutInsightSelectorsWithContext(_a0 context.Context, _a1 *cloudtrail.PutInsightSelectorsInput, _a2 ...request.Option) (*cloudtrail.PutInsightSelectorsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.PutInsightSelectorsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.PutInsightSelectorsInput, ...request.Option) *cloudtrail.PutInsightSelectorsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.PutInsightSelectorsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.PutInsightSelectorsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoveTags provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) RemoveTags(_a0 *cloudtrail.RemoveTagsInput) (*cloudtrail.RemoveTagsOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.RemoveTagsOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.RemoveTagsInput) *cloudtrail.RemoveTagsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.RemoveTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.RemoveTagsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoveTagsRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) RemoveTagsRequest(_a0 *cloudtrail.RemoveTagsInput) (*request.Request, *cloudtrail.RemoveTagsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.RemoveTagsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.RemoveTagsOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.RemoveTagsInput) *cloudtrail.RemoveTagsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.RemoveTagsOutput) + } + } + + return r0, r1 +} + +// RemoveTagsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) RemoveTagsWithContext(_a0 context.Context, _a1 *cloudtrail.RemoveTagsInput, _a2 ...request.Option) (*cloudtrail.RemoveTagsOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.RemoveTagsOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.RemoveTagsInput, ...request.Option) *cloudtrail.RemoveTagsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.RemoveTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.RemoveTagsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StartLogging provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) StartLogging(_a0 *cloudtrail.StartLoggingInput) (*cloudtrail.StartLoggingOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.StartLoggingOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.StartLoggingInput) *cloudtrail.StartLoggingOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.StartLoggingOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.StartLoggingInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StartLoggingRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) StartLoggingRequest(_a0 *cloudtrail.StartLoggingInput) (*request.Request, *cloudtrail.StartLoggingOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.StartLoggingInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.StartLoggingOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.StartLoggingInput) *cloudtrail.StartLoggingOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.StartLoggingOutput) + } + } + + return r0, r1 +} + +// StartLoggingWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) StartLoggingWithContext(_a0 context.Context, _a1 *cloudtrail.StartLoggingInput, _a2 ...request.Option) (*cloudtrail.StartLoggingOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.StartLoggingOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.StartLoggingInput, ...request.Option) *cloudtrail.StartLoggingOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.StartLoggingOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.StartLoggingInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StopLogging provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) StopLogging(_a0 *cloudtrail.StopLoggingInput) (*cloudtrail.StopLoggingOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.StopLoggingOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.StopLoggingInput) *cloudtrail.StopLoggingOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.StopLoggingOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.StopLoggingInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StopLoggingRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) StopLoggingRequest(_a0 *cloudtrail.StopLoggingInput) (*request.Request, *cloudtrail.StopLoggingOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.StopLoggingInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.StopLoggingOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.StopLoggingInput) *cloudtrail.StopLoggingOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.StopLoggingOutput) + } + } + + return r0, r1 +} + +// StopLoggingWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) StopLoggingWithContext(_a0 context.Context, _a1 *cloudtrail.StopLoggingInput, _a2 ...request.Option) (*cloudtrail.StopLoggingOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.StopLoggingOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.StopLoggingInput, ...request.Option) *cloudtrail.StopLoggingOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.StopLoggingOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.StopLoggingInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateTrail provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) UpdateTrail(_a0 *cloudtrail.UpdateTrailInput) (*cloudtrail.UpdateTrailOutput, error) { + ret := _m.Called(_a0) + + var r0 *cloudtrail.UpdateTrailOutput + if rf, ok := ret.Get(0).(func(*cloudtrail.UpdateTrailInput) *cloudtrail.UpdateTrailOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.UpdateTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*cloudtrail.UpdateTrailInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateTrailRequest provides a mock function with given fields: _a0 +func (_m *MockFakeCloudtrail) UpdateTrailRequest(_a0 *cloudtrail.UpdateTrailInput) (*request.Request, *cloudtrail.UpdateTrailOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*cloudtrail.UpdateTrailInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *cloudtrail.UpdateTrailOutput + if rf, ok := ret.Get(1).(func(*cloudtrail.UpdateTrailInput) *cloudtrail.UpdateTrailOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*cloudtrail.UpdateTrailOutput) + } + } + + return r0, r1 +} + +// UpdateTrailWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *MockFakeCloudtrail) UpdateTrailWithContext(_a0 context.Context, _a1 *cloudtrail.UpdateTrailInput, _a2 ...request.Option) (*cloudtrail.UpdateTrailOutput, error) { + _va := make([]interface{}, len(_a2)) + for _i := range _a2 { + _va[_i] = _a2[_i] + } + var _ca []interface{} + _ca = append(_ca, _a0, _a1) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *cloudtrail.UpdateTrailOutput + if rf, ok := ret.Get(0).(func(context.Context, *cloudtrail.UpdateTrailInput, ...request.Option) *cloudtrail.UpdateTrailOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*cloudtrail.UpdateTrailOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *cloudtrail.UpdateTrailInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type mockConstructorTestingTNewMockFakeCloudtrail interface { + mock.TestingT + Cleanup(func()) +} + +// NewMockFakeCloudtrail creates a new instance of MockFakeCloudtrail. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewMockFakeCloudtrail(t mockConstructorTestingTNewMockFakeCloudtrail) *MockFakeCloudtrail { + mock := &MockFakeCloudtrail{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +}