internal/resources/providers/awslib/s3/mock_client.go (488 lines of code) (raw):
// Licensed to Elasticsearch B.V. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Elasticsearch B.V. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
// Code generated by mockery v2.53.3. DO NOT EDIT.
package s3
import (
context "context"
services3 "github.com/aws/aws-sdk-go-v2/service/s3"
mock "github.com/stretchr/testify/mock"
)
// MockClient is an autogenerated mock type for the Client type
type MockClient struct {
mock.Mock
}
type MockClient_Expecter struct {
mock *mock.Mock
}
func (_m *MockClient) EXPECT() *MockClient_Expecter {
return &MockClient_Expecter{mock: &_m.Mock}
}
// GetBucketAcl provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) GetBucketAcl(ctx context.Context, params *services3.GetBucketAclInput, optFns ...func(*services3.Options)) (*services3.GetBucketAclOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetBucketAcl")
}
var r0 *services3.GetBucketAclOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketAclInput, ...func(*services3.Options)) (*services3.GetBucketAclOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketAclInput, ...func(*services3.Options)) *services3.GetBucketAclOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.GetBucketAclOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.GetBucketAclInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetBucketAcl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBucketAcl'
type MockClient_GetBucketAcl_Call struct {
*mock.Call
}
// GetBucketAcl is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.GetBucketAclInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) GetBucketAcl(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetBucketAcl_Call {
return &MockClient_GetBucketAcl_Call{Call: _e.mock.On("GetBucketAcl",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_GetBucketAcl_Call) Run(run func(ctx context.Context, params *services3.GetBucketAclInput, optFns ...func(*services3.Options))) *MockClient_GetBucketAcl_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.GetBucketAclInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_GetBucketAcl_Call) Return(_a0 *services3.GetBucketAclOutput, _a1 error) *MockClient_GetBucketAcl_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetBucketAcl_Call) RunAndReturn(run func(context.Context, *services3.GetBucketAclInput, ...func(*services3.Options)) (*services3.GetBucketAclOutput, error)) *MockClient_GetBucketAcl_Call {
_c.Call.Return(run)
return _c
}
// GetBucketEncryption provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) GetBucketEncryption(ctx context.Context, params *services3.GetBucketEncryptionInput, optFns ...func(*services3.Options)) (*services3.GetBucketEncryptionOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetBucketEncryption")
}
var r0 *services3.GetBucketEncryptionOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketEncryptionInput, ...func(*services3.Options)) (*services3.GetBucketEncryptionOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketEncryptionInput, ...func(*services3.Options)) *services3.GetBucketEncryptionOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.GetBucketEncryptionOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.GetBucketEncryptionInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetBucketEncryption_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBucketEncryption'
type MockClient_GetBucketEncryption_Call struct {
*mock.Call
}
// GetBucketEncryption is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.GetBucketEncryptionInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) GetBucketEncryption(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetBucketEncryption_Call {
return &MockClient_GetBucketEncryption_Call{Call: _e.mock.On("GetBucketEncryption",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_GetBucketEncryption_Call) Run(run func(ctx context.Context, params *services3.GetBucketEncryptionInput, optFns ...func(*services3.Options))) *MockClient_GetBucketEncryption_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.GetBucketEncryptionInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_GetBucketEncryption_Call) Return(_a0 *services3.GetBucketEncryptionOutput, _a1 error) *MockClient_GetBucketEncryption_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetBucketEncryption_Call) RunAndReturn(run func(context.Context, *services3.GetBucketEncryptionInput, ...func(*services3.Options)) (*services3.GetBucketEncryptionOutput, error)) *MockClient_GetBucketEncryption_Call {
_c.Call.Return(run)
return _c
}
// GetBucketLocation provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) GetBucketLocation(ctx context.Context, params *services3.GetBucketLocationInput, optFns ...func(*services3.Options)) (*services3.GetBucketLocationOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetBucketLocation")
}
var r0 *services3.GetBucketLocationOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketLocationInput, ...func(*services3.Options)) (*services3.GetBucketLocationOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketLocationInput, ...func(*services3.Options)) *services3.GetBucketLocationOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.GetBucketLocationOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.GetBucketLocationInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetBucketLocation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBucketLocation'
type MockClient_GetBucketLocation_Call struct {
*mock.Call
}
// GetBucketLocation is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.GetBucketLocationInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) GetBucketLocation(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetBucketLocation_Call {
return &MockClient_GetBucketLocation_Call{Call: _e.mock.On("GetBucketLocation",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_GetBucketLocation_Call) Run(run func(ctx context.Context, params *services3.GetBucketLocationInput, optFns ...func(*services3.Options))) *MockClient_GetBucketLocation_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.GetBucketLocationInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_GetBucketLocation_Call) Return(_a0 *services3.GetBucketLocationOutput, _a1 error) *MockClient_GetBucketLocation_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetBucketLocation_Call) RunAndReturn(run func(context.Context, *services3.GetBucketLocationInput, ...func(*services3.Options)) (*services3.GetBucketLocationOutput, error)) *MockClient_GetBucketLocation_Call {
_c.Call.Return(run)
return _c
}
// GetBucketLogging provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) GetBucketLogging(ctx context.Context, params *services3.GetBucketLoggingInput, optFns ...func(*services3.Options)) (*services3.GetBucketLoggingOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetBucketLogging")
}
var r0 *services3.GetBucketLoggingOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketLoggingInput, ...func(*services3.Options)) (*services3.GetBucketLoggingOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketLoggingInput, ...func(*services3.Options)) *services3.GetBucketLoggingOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.GetBucketLoggingOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.GetBucketLoggingInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetBucketLogging_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBucketLogging'
type MockClient_GetBucketLogging_Call struct {
*mock.Call
}
// GetBucketLogging is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.GetBucketLoggingInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) GetBucketLogging(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetBucketLogging_Call {
return &MockClient_GetBucketLogging_Call{Call: _e.mock.On("GetBucketLogging",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_GetBucketLogging_Call) Run(run func(ctx context.Context, params *services3.GetBucketLoggingInput, optFns ...func(*services3.Options))) *MockClient_GetBucketLogging_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.GetBucketLoggingInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_GetBucketLogging_Call) Return(_a0 *services3.GetBucketLoggingOutput, _a1 error) *MockClient_GetBucketLogging_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetBucketLogging_Call) RunAndReturn(run func(context.Context, *services3.GetBucketLoggingInput, ...func(*services3.Options)) (*services3.GetBucketLoggingOutput, error)) *MockClient_GetBucketLogging_Call {
_c.Call.Return(run)
return _c
}
// GetBucketPolicy provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) GetBucketPolicy(ctx context.Context, params *services3.GetBucketPolicyInput, optFns ...func(*services3.Options)) (*services3.GetBucketPolicyOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetBucketPolicy")
}
var r0 *services3.GetBucketPolicyOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketPolicyInput, ...func(*services3.Options)) (*services3.GetBucketPolicyOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketPolicyInput, ...func(*services3.Options)) *services3.GetBucketPolicyOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.GetBucketPolicyOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.GetBucketPolicyInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetBucketPolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBucketPolicy'
type MockClient_GetBucketPolicy_Call struct {
*mock.Call
}
// GetBucketPolicy is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.GetBucketPolicyInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) GetBucketPolicy(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetBucketPolicy_Call {
return &MockClient_GetBucketPolicy_Call{Call: _e.mock.On("GetBucketPolicy",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_GetBucketPolicy_Call) Run(run func(ctx context.Context, params *services3.GetBucketPolicyInput, optFns ...func(*services3.Options))) *MockClient_GetBucketPolicy_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.GetBucketPolicyInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_GetBucketPolicy_Call) Return(_a0 *services3.GetBucketPolicyOutput, _a1 error) *MockClient_GetBucketPolicy_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetBucketPolicy_Call) RunAndReturn(run func(context.Context, *services3.GetBucketPolicyInput, ...func(*services3.Options)) (*services3.GetBucketPolicyOutput, error)) *MockClient_GetBucketPolicy_Call {
_c.Call.Return(run)
return _c
}
// GetBucketVersioning provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) GetBucketVersioning(ctx context.Context, params *services3.GetBucketVersioningInput, optFns ...func(*services3.Options)) (*services3.GetBucketVersioningOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetBucketVersioning")
}
var r0 *services3.GetBucketVersioningOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketVersioningInput, ...func(*services3.Options)) (*services3.GetBucketVersioningOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetBucketVersioningInput, ...func(*services3.Options)) *services3.GetBucketVersioningOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.GetBucketVersioningOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.GetBucketVersioningInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetBucketVersioning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBucketVersioning'
type MockClient_GetBucketVersioning_Call struct {
*mock.Call
}
// GetBucketVersioning is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.GetBucketVersioningInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) GetBucketVersioning(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetBucketVersioning_Call {
return &MockClient_GetBucketVersioning_Call{Call: _e.mock.On("GetBucketVersioning",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_GetBucketVersioning_Call) Run(run func(ctx context.Context, params *services3.GetBucketVersioningInput, optFns ...func(*services3.Options))) *MockClient_GetBucketVersioning_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.GetBucketVersioningInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_GetBucketVersioning_Call) Return(_a0 *services3.GetBucketVersioningOutput, _a1 error) *MockClient_GetBucketVersioning_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetBucketVersioning_Call) RunAndReturn(run func(context.Context, *services3.GetBucketVersioningInput, ...func(*services3.Options)) (*services3.GetBucketVersioningOutput, error)) *MockClient_GetBucketVersioning_Call {
_c.Call.Return(run)
return _c
}
// GetPublicAccessBlock provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) GetPublicAccessBlock(ctx context.Context, params *services3.GetPublicAccessBlockInput, optFns ...func(*services3.Options)) (*services3.GetPublicAccessBlockOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for GetPublicAccessBlock")
}
var r0 *services3.GetPublicAccessBlockOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetPublicAccessBlockInput, ...func(*services3.Options)) (*services3.GetPublicAccessBlockOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.GetPublicAccessBlockInput, ...func(*services3.Options)) *services3.GetPublicAccessBlockOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.GetPublicAccessBlockOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.GetPublicAccessBlockInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetPublicAccessBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPublicAccessBlock'
type MockClient_GetPublicAccessBlock_Call struct {
*mock.Call
}
// GetPublicAccessBlock is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.GetPublicAccessBlockInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) GetPublicAccessBlock(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_GetPublicAccessBlock_Call {
return &MockClient_GetPublicAccessBlock_Call{Call: _e.mock.On("GetPublicAccessBlock",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_GetPublicAccessBlock_Call) Run(run func(ctx context.Context, params *services3.GetPublicAccessBlockInput, optFns ...func(*services3.Options))) *MockClient_GetPublicAccessBlock_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.GetPublicAccessBlockInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_GetPublicAccessBlock_Call) Return(_a0 *services3.GetPublicAccessBlockOutput, _a1 error) *MockClient_GetPublicAccessBlock_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetPublicAccessBlock_Call) RunAndReturn(run func(context.Context, *services3.GetPublicAccessBlockInput, ...func(*services3.Options)) (*services3.GetPublicAccessBlockOutput, error)) *MockClient_GetPublicAccessBlock_Call {
_c.Call.Return(run)
return _c
}
// ListBuckets provides a mock function with given fields: ctx, params, optFns
func (_m *MockClient) ListBuckets(ctx context.Context, params *services3.ListBucketsInput, optFns ...func(*services3.Options)) (*services3.ListBucketsOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for ListBuckets")
}
var r0 *services3.ListBucketsOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *services3.ListBucketsInput, ...func(*services3.Options)) (*services3.ListBucketsOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *services3.ListBucketsInput, ...func(*services3.Options)) *services3.ListBucketsOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*services3.ListBucketsOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *services3.ListBucketsInput, ...func(*services3.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_ListBuckets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBuckets'
type MockClient_ListBuckets_Call struct {
*mock.Call
}
// ListBuckets is a helper method to define mock.On call
// - ctx context.Context
// - params *services3.ListBucketsInput
// - optFns ...func(*services3.Options)
func (_e *MockClient_Expecter) ListBuckets(ctx interface{}, params interface{}, optFns ...interface{}) *MockClient_ListBuckets_Call {
return &MockClient_ListBuckets_Call{Call: _e.mock.On("ListBuckets",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *MockClient_ListBuckets_Call) Run(run func(ctx context.Context, params *services3.ListBucketsInput, optFns ...func(*services3.Options))) *MockClient_ListBuckets_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*services3.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*services3.Options))
}
}
run(args[0].(context.Context), args[1].(*services3.ListBucketsInput), variadicArgs...)
})
return _c
}
func (_c *MockClient_ListBuckets_Call) Return(_a0 *services3.ListBucketsOutput, _a1 error) *MockClient_ListBuckets_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_ListBuckets_Call) RunAndReturn(run func(context.Context, *services3.ListBucketsInput, ...func(*services3.Options)) (*services3.ListBucketsOutput, error)) *MockClient_ListBuckets_Call {
_c.Call.Return(run)
return _c
}
// NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockClient {
mock := &MockClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}