From 0163c9c5810c2d96a41bbc3d3872d730b58e9d02 Mon Sep 17 00:00:00 2001 From: Mark Wolfe Date: Thu, 28 Sep 2017 08:27:04 +1000 Subject: [PATCH] feat(Bless) It works! :tada: --- .gitignore | 2 + .goreleaser.yml | 11 + LICENSE | 22 + Makefile | 44 + README.md | 27 + bless.go | 113 ++ bless_test.go | 78 ++ cmd/versent-bless/main.go | 88 ++ mocks/LambdaAPI.go | 2267 +++++++++++++++++++++++++++++++++++++ 9 files changed, 2652 insertions(+) create mode 100644 .gitignore create mode 100644 .goreleaser.yml create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md create mode 100644 bless.go create mode 100644 bless_test.go create mode 100644 cmd/versent-bless/main.go create mode 100644 mocks/LambdaAPI.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6fad1a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +coverage.txt +dist diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..af6c0b3 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,11 @@ + +build: + main: cmd/versent-bless/main.go + binary: versent-bless + goos: + - darwin + - linux + - windows + goarch: + - amd64 + - 386 \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fa20bf7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2017 Versent Pty. Ltd. + +Please consider promoting this project if you find it useful. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT +OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..728c4d3 --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +SOURCE_FILES?=$$(go list ./... | grep -v /vendor/) +TEST_PATTERN?=. +TEST_OPTIONS?= + +GO ?= go + +# Install all the build and lint dependencies +setup: + go get -u github.com/alecthomas/gometalinter + go get -u github.com/golang/dep/cmd/dep + go get -u github.com/pierrre/gotestcover + go get -u golang.org/x/tools/cmd/cover + go get github.com/vektra/mockery/... + gometalinter --install +.PHONY: setup + +# Install from source. +install: + @echo "==> Installing up ${GOPATH}/bin/versent-bless" + @$(GO) install ./... +.PHONY: install + +# Run all the tests +test: + @gotestcover $(TEST_OPTIONS) -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=2m +.PHONY: test + +# Run all the tests and opens the coverage report +cover: test + @$(GO) tool cover -html=coverage.txt +.PHONY: cover + +# Release binaries to GitHub. +release: + @echo "==> Releasing" + @goreleaser -p 1 --rm-dist -config .goreleaser.yml + @echo "==> Complete" +.PHONY: release + +generate-mocks: + mockery -dir ../../aws/aws-sdk-go/service/lambda/lambdaiface --all +.PHONY: generate-mocks + +.PHONY: setup test cover generate-mocks \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb5d960 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# versent bless client + +This project is a port of the [netflix/bless/bless_client](https://github.com/Netflix/bless/tree/master/bless_client). + +# usage + +``` +usage: versent-bless [] [ ...] + +A command line client for netflix bless. + +Flags: + --help Show context-sensitive help (also try --help-long and --help-man). + --debug Enable debug mode. + +Commands: + help [...] + Show help. + + login [] + Login and retrieve a key. + +``` + +# license + +This code is released under MIT License. diff --git a/bless.go b/bless.go new file mode 100644 index 0000000..ea7d515 --- /dev/null +++ b/bless.go @@ -0,0 +1,113 @@ +package bless + +import ( + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "os" + + "github.com/aws/aws-sdk-go/service/lambda/lambdaiface" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/lambda" + "github.com/pkg/errors" +) + +var ( + lambdaSvc lambdaiface.LambdaAPI = lambda.New(session.New()) + + debug = false +) + +// Payload used to encode request payload for bless lambda +type Payload struct { + BastionUser string `json:"bastion_user"` + BastionUserIP string `json:"bastion_user_ip"` + RemoteUsernames string `json:"remote_usernames"` + BastionIps string `json:"bastion_ips"` + BastionCommand string `json:"command"` + PublicKeyToSign string `json:"public_key_to_sign"` + KmsAuthToken string `json:"kms_auth_token,omitempty"` +} + +// Result used to decode response from bless lambda +type Result struct { + Certificate string `json:"certificate,omitempty"` +} + +// ConfigureAws enable override of the default aws sdk configuration +func ConfigureAws(config *aws.Config) { + lambdaSvc = lambda.New(session.New(config)) +} + +// SetDebug enable or disable debugging +func SetDebug(enable bool) { + debug = enable +} + +// LoadPublicKey load the public key from the supplied path +func LoadPublicKey(publicKey string) ([]byte, error) { + data, err := ioutil.ReadFile(publicKey) + if err != nil { + return nil, errors.Wrap(err, "Failed to load public key") + } + + return data, nil +} + +// ValidatePublicKey validate the public key +func ValidatePublicKey(publicKeyData []byte) (string, error) { + if len(publicKeyData) == 0 { + return "", errors.New("Empty public key supplied") + } + + return string(publicKeyData), nil +} + +// InvokeBlessLambda invoke the bless lambda function +func InvokeBlessLambda(region, lambdaFunctionName *string, payloadJSON []byte) (*Result, error) { + + input := &lambda.InvokeInput{ + FunctionName: lambdaFunctionName, + InvocationType: aws.String("RequestResponse"), + LogType: aws.String("None"), + Payload: payloadJSON, + } + + res, err := lambdaSvc.Invoke(input) + if err != nil { + return nil, errors.Wrap(err, "Lambda invoke failed") + } + + if aws.Int64Value(res.StatusCode) != 200 { + return nil, errors.Wrapf(err, "Lambda Invoke failed: %v", res) + } + + resultPayload := &Result{} + + err = json.Unmarshal(res.Payload, resultPayload) + if err != nil { + return nil, errors.Wrap(err, "Failed to deserialise JSON result") + } + + return resultPayload, nil +} + +// WriteCertificate write the generated certificate out to a file +func WriteCertificate(certificateFilename string, certificateContent string) error { + err := ioutil.WriteFile(certificateFilename, bytes.NewBufferString(certificateContent).Bytes(), 0600) + if err != nil { + return errors.Wrap(err, "Failed to write certificate file") + } + + return nil +} + +// Debug write debug messages if it is enabled +func Debug(message string, args ...interface{}) { + if debug { + fmt.Fprintf(os.Stderr, message, args...) + } +} diff --git a/bless_test.go b/bless_test.go new file mode 100644 index 0000000..a4181c4 --- /dev/null +++ b/bless_test.go @@ -0,0 +1,78 @@ +package bless + +import ( + "fmt" + "io/ioutil" + "os" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/lambda" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "github.com/versent/bless/mocks" +) + +func TestLoadPublicKey(t *testing.T) { + + tfile := mustWriteTempfile("data") + + data, err := LoadPublicKey(tfile.Name()) + require.Nil(t, err) + + require.Len(t, data, 4) + + _, err = LoadPublicKey("badfile") + require.Error(t, err) + +} + +func TestValidatePublicKey(t *testing.T) { + data, err := ValidatePublicKey([]byte{0xa, 0xb, 0xc, 0xd}) + require.Nil(t, err) + require.Len(t, data, 4) + + _, err = ValidatePublicKey([]byte{}) + require.Error(t, err) +} + +func TestWriteCertificate(t *testing.T) { + err := WriteCertificate(fmt.Sprintf("%s/%s-%d", os.TempDir(), "abc", time.Now().Unix()), "data") + require.Nil(t, err) + err = WriteCertificate(fmt.Sprintf("nothere/%s-%d", "abc", time.Now().Unix()), "data") + require.Error(t, err) +} + +func TestInvokeBlessLambda(t *testing.T) { + + lambdaMock := &mocks.LambdaAPI{} + + lambdaSvc = lambdaMock + + result := &lambda.InvokeOutput{ + StatusCode: aws.Int64(200), + Payload: []byte(`{"certificate":"data"}`), + } + + lambdaMock.On("Invoke", mock.AnythingOfType("*lambda.InvokeInput")).Return(result, nil) + + res, err := InvokeBlessLambda(aws.String("us-west-2"), aws.String("whatever"), []byte("whatever")) + require.Nil(t, err) + require.Len(t, res.Certificate, 4) +} + +func mustWriteTempfile(data string) *os.File { + tfile, err := ioutil.TempFile(os.TempDir(), "test") + if err != nil { + panic(err) + } + + _, err = tfile.WriteString("data") + if err != nil { + panic(err) + } + + return tfile +} diff --git a/cmd/versent-bless/main.go b/cmd/versent-bless/main.go new file mode 100644 index 0000000..552aaf6 --- /dev/null +++ b/cmd/versent-bless/main.go @@ -0,0 +1,88 @@ +package main + +import ( + "encoding/json" + "log" + "os" + + "github.com/alecthomas/kingpin" + "github.com/aws/aws-sdk-go/aws" + "github.com/versent/bless" +) + +var ( + app = kingpin.New("versent-bless", "A command line client for netflix bless.") + debug = app.Flag("debug", "Enable debug mode.").Bool() + login = app.Command("login", "Login and retrieve a key.") + + region = login.Arg("region", "AWS Region.").Required().String() + lambdaFunctionName = login.Arg("lambda_function_name", "Lambda function name.").Required().String() + bastionUser = login.Arg("bastion_user", "Bastion user.").Required().String() + bastionUserIP = login.Arg("bastion_user_ip", "Bastion user IP.").Required().String() + remoteUsernames = login.Arg("remote_usernames", "Remote user names.").Required().String() + bastionIps = login.Arg("bastion_ips", "Bastion IPs.").Required().String() + bastionCommand = login.Arg("bastion_command", "Bastion command.").Required().String() + publicKeyToSign = login.Arg("public_key_to_sign", "Public key to sign.").Required().String() + certificateFilename = login.Arg("certificate_filename", "Certificate filename.").Required().String() + kmsAuthToken = login.Arg("kmsauth_token", "KMS Auth Token.").String() +) + +func main() { + + switch kingpin.MustParse(app.Parse(os.Args[1:])) { + case login.FullCommand(): + + bless.ConfigureAws(&aws.Config{Region: region}) + + bless.SetDebug(*debug) + + publicKeyData, err := bless.LoadPublicKey(*publicKeyToSign) + if err != nil { + log.Fatalf("%+v\n", err) + } + + bless.Debug("publicKeyData: %s", string(publicKeyData)) + + publicKey, err := bless.ValidatePublicKey(publicKeyData) + if err != nil { + log.Fatalf("%+v\n", err) + } + + payload := &bless.Payload{ + BastionUser: *bastionUser, + BastionUserIP: *bastionUserIP, + RemoteUsernames: *remoteUsernames, + BastionIps: *bastionIps, + BastionCommand: *bastionCommand, + PublicKeyToSign: publicKey, + } + + if kmsAuthToken != nil { + payload.KmsAuthToken = *kmsAuthToken + } + + bless.Debug("payload: %v", payload) + + payloadJSON, err := json.Marshal(payload) + if err != nil { + log.Fatalf("%+v\n", err) + } + + log.Printf("payload_json is: %s", string(payloadJSON)) + + resultPayload, err := bless.InvokeBlessLambda(region, lambdaFunctionName, payloadJSON) + if err != nil { + log.Fatalf("%+v\n", err) + } + + bless.Debug("resultPayload: %v", resultPayload) + + err = bless.WriteCertificate(*certificateFilename, resultPayload.Certificate) + if err != nil { + log.Fatalf("%+v\n", err) + } + + log.Printf("Wrote Certificate to: %s", *certificateFilename) + + } +} diff --git a/mocks/LambdaAPI.go b/mocks/LambdaAPI.go new file mode 100644 index 0000000..bb5fc29 --- /dev/null +++ b/mocks/LambdaAPI.go @@ -0,0 +1,2267 @@ +// Code generated by mockery v1.0.0 +package mocks + +import aws "github.com/aws/aws-sdk-go/aws" +import lambda "github.com/aws/aws-sdk-go/service/lambda" + +import mock "github.com/stretchr/testify/mock" +import request "github.com/aws/aws-sdk-go/aws/request" + +// LambdaAPI is an autogenerated mock type for the LambdaAPI type +type LambdaAPI struct { + mock.Mock +} + +// AddPermission provides a mock function with given fields: _a0 +func (_m *LambdaAPI) AddPermission(_a0 *lambda.AddPermissionInput) (*lambda.AddPermissionOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.AddPermissionOutput + if rf, ok := ret.Get(0).(func(*lambda.AddPermissionInput) *lambda.AddPermissionOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AddPermissionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.AddPermissionInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// AddPermissionRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) AddPermissionRequest(_a0 *lambda.AddPermissionInput) (*request.Request, *lambda.AddPermissionOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.AddPermissionInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.AddPermissionOutput + if rf, ok := ret.Get(1).(func(*lambda.AddPermissionInput) *lambda.AddPermissionOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.AddPermissionOutput) + } + } + + return r0, r1 +} + +// AddPermissionWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) AddPermissionWithContext(_a0 aws.Context, _a1 *lambda.AddPermissionInput, _a2 ...request.Option) (*lambda.AddPermissionOutput, 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 *lambda.AddPermissionOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.AddPermissionInput, ...request.Option) *lambda.AddPermissionOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AddPermissionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.AddPermissionInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateAlias provides a mock function with given fields: _a0 +func (_m *LambdaAPI) CreateAlias(_a0 *lambda.CreateAliasInput) (*lambda.AliasConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.AliasConfiguration + if rf, ok := ret.Get(0).(func(*lambda.CreateAliasInput) *lambda.AliasConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AliasConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.CreateAliasInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateAliasRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) CreateAliasRequest(_a0 *lambda.CreateAliasInput) (*request.Request, *lambda.AliasConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.CreateAliasInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.AliasConfiguration + if rf, ok := ret.Get(1).(func(*lambda.CreateAliasInput) *lambda.AliasConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.AliasConfiguration) + } + } + + return r0, r1 +} + +// CreateAliasWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) CreateAliasWithContext(_a0 aws.Context, _a1 *lambda.CreateAliasInput, _a2 ...request.Option) (*lambda.AliasConfiguration, 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 *lambda.AliasConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.CreateAliasInput, ...request.Option) *lambda.AliasConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AliasConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.CreateAliasInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateEventSourceMapping provides a mock function with given fields: _a0 +func (_m *LambdaAPI) CreateEventSourceMapping(_a0 *lambda.CreateEventSourceMappingInput) (*lambda.EventSourceMappingConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(*lambda.CreateEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.CreateEventSourceMappingInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateEventSourceMappingRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) CreateEventSourceMappingRequest(_a0 *lambda.CreateEventSourceMappingInput) (*request.Request, *lambda.EventSourceMappingConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.CreateEventSourceMappingInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(1).(func(*lambda.CreateEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.EventSourceMappingConfiguration) + } + } + + return r0, r1 +} + +// CreateEventSourceMappingWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) CreateEventSourceMappingWithContext(_a0 aws.Context, _a1 *lambda.CreateEventSourceMappingInput, _a2 ...request.Option) (*lambda.EventSourceMappingConfiguration, 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 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.CreateEventSourceMappingInput, ...request.Option) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.CreateEventSourceMappingInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateFunction provides a mock function with given fields: _a0 +func (_m *LambdaAPI) CreateFunction(_a0 *lambda.CreateFunctionInput) (*lambda.FunctionConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(*lambda.CreateFunctionInput) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.CreateFunctionInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateFunctionRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) CreateFunctionRequest(_a0 *lambda.CreateFunctionInput) (*request.Request, *lambda.FunctionConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.CreateFunctionInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.FunctionConfiguration + if rf, ok := ret.Get(1).(func(*lambda.CreateFunctionInput) *lambda.FunctionConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.FunctionConfiguration) + } + } + + return r0, r1 +} + +// CreateFunctionWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) CreateFunctionWithContext(_a0 aws.Context, _a1 *lambda.CreateFunctionInput, _a2 ...request.Option) (*lambda.FunctionConfiguration, 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 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.CreateFunctionInput, ...request.Option) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.CreateFunctionInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteAlias provides a mock function with given fields: _a0 +func (_m *LambdaAPI) DeleteAlias(_a0 *lambda.DeleteAliasInput) (*lambda.DeleteAliasOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.DeleteAliasOutput + if rf, ok := ret.Get(0).(func(*lambda.DeleteAliasInput) *lambda.DeleteAliasOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.DeleteAliasOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.DeleteAliasInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteAliasRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) DeleteAliasRequest(_a0 *lambda.DeleteAliasInput) (*request.Request, *lambda.DeleteAliasOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.DeleteAliasInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.DeleteAliasOutput + if rf, ok := ret.Get(1).(func(*lambda.DeleteAliasInput) *lambda.DeleteAliasOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.DeleteAliasOutput) + } + } + + return r0, r1 +} + +// DeleteAliasWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) DeleteAliasWithContext(_a0 aws.Context, _a1 *lambda.DeleteAliasInput, _a2 ...request.Option) (*lambda.DeleteAliasOutput, 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 *lambda.DeleteAliasOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.DeleteAliasInput, ...request.Option) *lambda.DeleteAliasOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.DeleteAliasOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.DeleteAliasInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteEventSourceMapping provides a mock function with given fields: _a0 +func (_m *LambdaAPI) DeleteEventSourceMapping(_a0 *lambda.DeleteEventSourceMappingInput) (*lambda.EventSourceMappingConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(*lambda.DeleteEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.DeleteEventSourceMappingInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteEventSourceMappingRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) DeleteEventSourceMappingRequest(_a0 *lambda.DeleteEventSourceMappingInput) (*request.Request, *lambda.EventSourceMappingConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.DeleteEventSourceMappingInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(1).(func(*lambda.DeleteEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.EventSourceMappingConfiguration) + } + } + + return r0, r1 +} + +// DeleteEventSourceMappingWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) DeleteEventSourceMappingWithContext(_a0 aws.Context, _a1 *lambda.DeleteEventSourceMappingInput, _a2 ...request.Option) (*lambda.EventSourceMappingConfiguration, 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 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.DeleteEventSourceMappingInput, ...request.Option) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.DeleteEventSourceMappingInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteFunction provides a mock function with given fields: _a0 +func (_m *LambdaAPI) DeleteFunction(_a0 *lambda.DeleteFunctionInput) (*lambda.DeleteFunctionOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.DeleteFunctionOutput + if rf, ok := ret.Get(0).(func(*lambda.DeleteFunctionInput) *lambda.DeleteFunctionOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.DeleteFunctionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.DeleteFunctionInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// DeleteFunctionRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) DeleteFunctionRequest(_a0 *lambda.DeleteFunctionInput) (*request.Request, *lambda.DeleteFunctionOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.DeleteFunctionInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.DeleteFunctionOutput + if rf, ok := ret.Get(1).(func(*lambda.DeleteFunctionInput) *lambda.DeleteFunctionOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.DeleteFunctionOutput) + } + } + + return r0, r1 +} + +// DeleteFunctionWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) DeleteFunctionWithContext(_a0 aws.Context, _a1 *lambda.DeleteFunctionInput, _a2 ...request.Option) (*lambda.DeleteFunctionOutput, 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 *lambda.DeleteFunctionOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.DeleteFunctionInput, ...request.Option) *lambda.DeleteFunctionOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.DeleteFunctionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.DeleteFunctionInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetAccountSettings provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetAccountSettings(_a0 *lambda.GetAccountSettingsInput) (*lambda.GetAccountSettingsOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.GetAccountSettingsOutput + if rf, ok := ret.Get(0).(func(*lambda.GetAccountSettingsInput) *lambda.GetAccountSettingsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.GetAccountSettingsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.GetAccountSettingsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetAccountSettingsRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetAccountSettingsRequest(_a0 *lambda.GetAccountSettingsInput) (*request.Request, *lambda.GetAccountSettingsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.GetAccountSettingsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.GetAccountSettingsOutput + if rf, ok := ret.Get(1).(func(*lambda.GetAccountSettingsInput) *lambda.GetAccountSettingsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.GetAccountSettingsOutput) + } + } + + return r0, r1 +} + +// GetAccountSettingsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) GetAccountSettingsWithContext(_a0 aws.Context, _a1 *lambda.GetAccountSettingsInput, _a2 ...request.Option) (*lambda.GetAccountSettingsOutput, 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 *lambda.GetAccountSettingsOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.GetAccountSettingsInput, ...request.Option) *lambda.GetAccountSettingsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.GetAccountSettingsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.GetAccountSettingsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetAlias provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetAlias(_a0 *lambda.GetAliasInput) (*lambda.AliasConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.AliasConfiguration + if rf, ok := ret.Get(0).(func(*lambda.GetAliasInput) *lambda.AliasConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AliasConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.GetAliasInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetAliasRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetAliasRequest(_a0 *lambda.GetAliasInput) (*request.Request, *lambda.AliasConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.GetAliasInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.AliasConfiguration + if rf, ok := ret.Get(1).(func(*lambda.GetAliasInput) *lambda.AliasConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.AliasConfiguration) + } + } + + return r0, r1 +} + +// GetAliasWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) GetAliasWithContext(_a0 aws.Context, _a1 *lambda.GetAliasInput, _a2 ...request.Option) (*lambda.AliasConfiguration, 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 *lambda.AliasConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.GetAliasInput, ...request.Option) *lambda.AliasConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AliasConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.GetAliasInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetEventSourceMapping provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetEventSourceMapping(_a0 *lambda.GetEventSourceMappingInput) (*lambda.EventSourceMappingConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(*lambda.GetEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.GetEventSourceMappingInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetEventSourceMappingRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetEventSourceMappingRequest(_a0 *lambda.GetEventSourceMappingInput) (*request.Request, *lambda.EventSourceMappingConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.GetEventSourceMappingInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(1).(func(*lambda.GetEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.EventSourceMappingConfiguration) + } + } + + return r0, r1 +} + +// GetEventSourceMappingWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) GetEventSourceMappingWithContext(_a0 aws.Context, _a1 *lambda.GetEventSourceMappingInput, _a2 ...request.Option) (*lambda.EventSourceMappingConfiguration, 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 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.GetEventSourceMappingInput, ...request.Option) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.GetEventSourceMappingInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetFunction provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetFunction(_a0 *lambda.GetFunctionInput) (*lambda.GetFunctionOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.GetFunctionOutput + if rf, ok := ret.Get(0).(func(*lambda.GetFunctionInput) *lambda.GetFunctionOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.GetFunctionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.GetFunctionInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetFunctionConfiguration provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetFunctionConfiguration(_a0 *lambda.GetFunctionConfigurationInput) (*lambda.FunctionConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(*lambda.GetFunctionConfigurationInput) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.GetFunctionConfigurationInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetFunctionConfigurationRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetFunctionConfigurationRequest(_a0 *lambda.GetFunctionConfigurationInput) (*request.Request, *lambda.FunctionConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.GetFunctionConfigurationInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.FunctionConfiguration + if rf, ok := ret.Get(1).(func(*lambda.GetFunctionConfigurationInput) *lambda.FunctionConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.FunctionConfiguration) + } + } + + return r0, r1 +} + +// GetFunctionConfigurationWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) GetFunctionConfigurationWithContext(_a0 aws.Context, _a1 *lambda.GetFunctionConfigurationInput, _a2 ...request.Option) (*lambda.FunctionConfiguration, 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 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.GetFunctionConfigurationInput, ...request.Option) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.GetFunctionConfigurationInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetFunctionRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetFunctionRequest(_a0 *lambda.GetFunctionInput) (*request.Request, *lambda.GetFunctionOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.GetFunctionInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.GetFunctionOutput + if rf, ok := ret.Get(1).(func(*lambda.GetFunctionInput) *lambda.GetFunctionOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.GetFunctionOutput) + } + } + + return r0, r1 +} + +// GetFunctionWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) GetFunctionWithContext(_a0 aws.Context, _a1 *lambda.GetFunctionInput, _a2 ...request.Option) (*lambda.GetFunctionOutput, 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 *lambda.GetFunctionOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.GetFunctionInput, ...request.Option) *lambda.GetFunctionOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.GetFunctionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.GetFunctionInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetPolicy provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetPolicy(_a0 *lambda.GetPolicyInput) (*lambda.GetPolicyOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.GetPolicyOutput + if rf, ok := ret.Get(0).(func(*lambda.GetPolicyInput) *lambda.GetPolicyOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.GetPolicyOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.GetPolicyInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetPolicyRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) GetPolicyRequest(_a0 *lambda.GetPolicyInput) (*request.Request, *lambda.GetPolicyOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.GetPolicyInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.GetPolicyOutput + if rf, ok := ret.Get(1).(func(*lambda.GetPolicyInput) *lambda.GetPolicyOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.GetPolicyOutput) + } + } + + return r0, r1 +} + +// GetPolicyWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) GetPolicyWithContext(_a0 aws.Context, _a1 *lambda.GetPolicyInput, _a2 ...request.Option) (*lambda.GetPolicyOutput, 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 *lambda.GetPolicyOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.GetPolicyInput, ...request.Option) *lambda.GetPolicyOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.GetPolicyOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.GetPolicyInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Invoke provides a mock function with given fields: _a0 +func (_m *LambdaAPI) Invoke(_a0 *lambda.InvokeInput) (*lambda.InvokeOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.InvokeOutput + if rf, ok := ret.Get(0).(func(*lambda.InvokeInput) *lambda.InvokeOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.InvokeOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.InvokeInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// InvokeAsync provides a mock function with given fields: _a0 +func (_m *LambdaAPI) InvokeAsync(_a0 *lambda.InvokeAsyncInput) (*lambda.InvokeAsyncOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.InvokeAsyncOutput + if rf, ok := ret.Get(0).(func(*lambda.InvokeAsyncInput) *lambda.InvokeAsyncOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.InvokeAsyncOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.InvokeAsyncInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// InvokeAsyncRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) InvokeAsyncRequest(_a0 *lambda.InvokeAsyncInput) (*request.Request, *lambda.InvokeAsyncOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.InvokeAsyncInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.InvokeAsyncOutput + if rf, ok := ret.Get(1).(func(*lambda.InvokeAsyncInput) *lambda.InvokeAsyncOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.InvokeAsyncOutput) + } + } + + return r0, r1 +} + +// InvokeAsyncWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) InvokeAsyncWithContext(_a0 aws.Context, _a1 *lambda.InvokeAsyncInput, _a2 ...request.Option) (*lambda.InvokeAsyncOutput, 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 *lambda.InvokeAsyncOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.InvokeAsyncInput, ...request.Option) *lambda.InvokeAsyncOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.InvokeAsyncOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.InvokeAsyncInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// InvokeRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) InvokeRequest(_a0 *lambda.InvokeInput) (*request.Request, *lambda.InvokeOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.InvokeInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.InvokeOutput + if rf, ok := ret.Get(1).(func(*lambda.InvokeInput) *lambda.InvokeOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.InvokeOutput) + } + } + + return r0, r1 +} + +// InvokeWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) InvokeWithContext(_a0 aws.Context, _a1 *lambda.InvokeInput, _a2 ...request.Option) (*lambda.InvokeOutput, 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 *lambda.InvokeOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.InvokeInput, ...request.Option) *lambda.InvokeOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.InvokeOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.InvokeInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListAliases provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListAliases(_a0 *lambda.ListAliasesInput) (*lambda.ListAliasesOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.ListAliasesOutput + if rf, ok := ret.Get(0).(func(*lambda.ListAliasesInput) *lambda.ListAliasesOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListAliasesOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.ListAliasesInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListAliasesRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListAliasesRequest(_a0 *lambda.ListAliasesInput) (*request.Request, *lambda.ListAliasesOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.ListAliasesInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.ListAliasesOutput + if rf, ok := ret.Get(1).(func(*lambda.ListAliasesInput) *lambda.ListAliasesOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.ListAliasesOutput) + } + } + + return r0, r1 +} + +// ListAliasesWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) ListAliasesWithContext(_a0 aws.Context, _a1 *lambda.ListAliasesInput, _a2 ...request.Option) (*lambda.ListAliasesOutput, 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 *lambda.ListAliasesOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.ListAliasesInput, ...request.Option) *lambda.ListAliasesOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListAliasesOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.ListAliasesInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListEventSourceMappings provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListEventSourceMappings(_a0 *lambda.ListEventSourceMappingsInput) (*lambda.ListEventSourceMappingsOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.ListEventSourceMappingsOutput + if rf, ok := ret.Get(0).(func(*lambda.ListEventSourceMappingsInput) *lambda.ListEventSourceMappingsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListEventSourceMappingsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.ListEventSourceMappingsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListEventSourceMappingsPages provides a mock function with given fields: _a0, _a1 +func (_m *LambdaAPI) ListEventSourceMappingsPages(_a0 *lambda.ListEventSourceMappingsInput, _a1 func(*lambda.ListEventSourceMappingsOutput, bool) bool) error { + ret := _m.Called(_a0, _a1) + + var r0 error + if rf, ok := ret.Get(0).(func(*lambda.ListEventSourceMappingsInput, func(*lambda.ListEventSourceMappingsOutput, bool) bool) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListEventSourceMappingsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3 +func (_m *LambdaAPI) ListEventSourceMappingsPagesWithContext(_a0 aws.Context, _a1 *lambda.ListEventSourceMappingsInput, _a2 func(*lambda.ListEventSourceMappingsOutput, 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(aws.Context, *lambda.ListEventSourceMappingsInput, func(*lambda.ListEventSourceMappingsOutput, bool) bool, ...request.Option) error); ok { + r0 = rf(_a0, _a1, _a2, _a3...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListEventSourceMappingsRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListEventSourceMappingsRequest(_a0 *lambda.ListEventSourceMappingsInput) (*request.Request, *lambda.ListEventSourceMappingsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.ListEventSourceMappingsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.ListEventSourceMappingsOutput + if rf, ok := ret.Get(1).(func(*lambda.ListEventSourceMappingsInput) *lambda.ListEventSourceMappingsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.ListEventSourceMappingsOutput) + } + } + + return r0, r1 +} + +// ListEventSourceMappingsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) ListEventSourceMappingsWithContext(_a0 aws.Context, _a1 *lambda.ListEventSourceMappingsInput, _a2 ...request.Option) (*lambda.ListEventSourceMappingsOutput, 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 *lambda.ListEventSourceMappingsOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.ListEventSourceMappingsInput, ...request.Option) *lambda.ListEventSourceMappingsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListEventSourceMappingsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.ListEventSourceMappingsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListFunctions provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListFunctions(_a0 *lambda.ListFunctionsInput) (*lambda.ListFunctionsOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.ListFunctionsOutput + if rf, ok := ret.Get(0).(func(*lambda.ListFunctionsInput) *lambda.ListFunctionsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListFunctionsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.ListFunctionsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListFunctionsPages provides a mock function with given fields: _a0, _a1 +func (_m *LambdaAPI) ListFunctionsPages(_a0 *lambda.ListFunctionsInput, _a1 func(*lambda.ListFunctionsOutput, bool) bool) error { + ret := _m.Called(_a0, _a1) + + var r0 error + if rf, ok := ret.Get(0).(func(*lambda.ListFunctionsInput, func(*lambda.ListFunctionsOutput, bool) bool) error); ok { + r0 = rf(_a0, _a1) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListFunctionsPagesWithContext provides a mock function with given fields: _a0, _a1, _a2, _a3 +func (_m *LambdaAPI) ListFunctionsPagesWithContext(_a0 aws.Context, _a1 *lambda.ListFunctionsInput, _a2 func(*lambda.ListFunctionsOutput, 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(aws.Context, *lambda.ListFunctionsInput, func(*lambda.ListFunctionsOutput, bool) bool, ...request.Option) error); ok { + r0 = rf(_a0, _a1, _a2, _a3...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ListFunctionsRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListFunctionsRequest(_a0 *lambda.ListFunctionsInput) (*request.Request, *lambda.ListFunctionsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.ListFunctionsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.ListFunctionsOutput + if rf, ok := ret.Get(1).(func(*lambda.ListFunctionsInput) *lambda.ListFunctionsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.ListFunctionsOutput) + } + } + + return r0, r1 +} + +// ListFunctionsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) ListFunctionsWithContext(_a0 aws.Context, _a1 *lambda.ListFunctionsInput, _a2 ...request.Option) (*lambda.ListFunctionsOutput, 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 *lambda.ListFunctionsOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.ListFunctionsInput, ...request.Option) *lambda.ListFunctionsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListFunctionsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.ListFunctionsInput, ...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 *LambdaAPI) ListTags(_a0 *lambda.ListTagsInput) (*lambda.ListTagsOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.ListTagsOutput + if rf, ok := ret.Get(0).(func(*lambda.ListTagsInput) *lambda.ListTagsOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.ListTagsInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListTagsRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListTagsRequest(_a0 *lambda.ListTagsInput) (*request.Request, *lambda.ListTagsOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.ListTagsInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.ListTagsOutput + if rf, ok := ret.Get(1).(func(*lambda.ListTagsInput) *lambda.ListTagsOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.ListTagsOutput) + } + } + + return r0, r1 +} + +// ListTagsWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) ListTagsWithContext(_a0 aws.Context, _a1 *lambda.ListTagsInput, _a2 ...request.Option) (*lambda.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 *lambda.ListTagsOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.ListTagsInput, ...request.Option) *lambda.ListTagsOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListTagsOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.ListTagsInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListVersionsByFunction provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListVersionsByFunction(_a0 *lambda.ListVersionsByFunctionInput) (*lambda.ListVersionsByFunctionOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.ListVersionsByFunctionOutput + if rf, ok := ret.Get(0).(func(*lambda.ListVersionsByFunctionInput) *lambda.ListVersionsByFunctionOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListVersionsByFunctionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.ListVersionsByFunctionInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListVersionsByFunctionRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) ListVersionsByFunctionRequest(_a0 *lambda.ListVersionsByFunctionInput) (*request.Request, *lambda.ListVersionsByFunctionOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.ListVersionsByFunctionInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.ListVersionsByFunctionOutput + if rf, ok := ret.Get(1).(func(*lambda.ListVersionsByFunctionInput) *lambda.ListVersionsByFunctionOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.ListVersionsByFunctionOutput) + } + } + + return r0, r1 +} + +// ListVersionsByFunctionWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) ListVersionsByFunctionWithContext(_a0 aws.Context, _a1 *lambda.ListVersionsByFunctionInput, _a2 ...request.Option) (*lambda.ListVersionsByFunctionOutput, 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 *lambda.ListVersionsByFunctionOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.ListVersionsByFunctionInput, ...request.Option) *lambda.ListVersionsByFunctionOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.ListVersionsByFunctionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.ListVersionsByFunctionInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PublishVersion provides a mock function with given fields: _a0 +func (_m *LambdaAPI) PublishVersion(_a0 *lambda.PublishVersionInput) (*lambda.FunctionConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(*lambda.PublishVersionInput) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.PublishVersionInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// PublishVersionRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) PublishVersionRequest(_a0 *lambda.PublishVersionInput) (*request.Request, *lambda.FunctionConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.PublishVersionInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.FunctionConfiguration + if rf, ok := ret.Get(1).(func(*lambda.PublishVersionInput) *lambda.FunctionConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.FunctionConfiguration) + } + } + + return r0, r1 +} + +// PublishVersionWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) PublishVersionWithContext(_a0 aws.Context, _a1 *lambda.PublishVersionInput, _a2 ...request.Option) (*lambda.FunctionConfiguration, 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 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.PublishVersionInput, ...request.Option) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.PublishVersionInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemovePermission provides a mock function with given fields: _a0 +func (_m *LambdaAPI) RemovePermission(_a0 *lambda.RemovePermissionInput) (*lambda.RemovePermissionOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.RemovePermissionOutput + if rf, ok := ret.Get(0).(func(*lambda.RemovePermissionInput) *lambda.RemovePermissionOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.RemovePermissionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.RemovePermissionInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemovePermissionRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) RemovePermissionRequest(_a0 *lambda.RemovePermissionInput) (*request.Request, *lambda.RemovePermissionOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.RemovePermissionInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.RemovePermissionOutput + if rf, ok := ret.Get(1).(func(*lambda.RemovePermissionInput) *lambda.RemovePermissionOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.RemovePermissionOutput) + } + } + + return r0, r1 +} + +// RemovePermissionWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) RemovePermissionWithContext(_a0 aws.Context, _a1 *lambda.RemovePermissionInput, _a2 ...request.Option) (*lambda.RemovePermissionOutput, 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 *lambda.RemovePermissionOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.RemovePermissionInput, ...request.Option) *lambda.RemovePermissionOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.RemovePermissionOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.RemovePermissionInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// TagResource provides a mock function with given fields: _a0 +func (_m *LambdaAPI) TagResource(_a0 *lambda.TagResourceInput) (*lambda.TagResourceOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.TagResourceOutput + if rf, ok := ret.Get(0).(func(*lambda.TagResourceInput) *lambda.TagResourceOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.TagResourceOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.TagResourceInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// TagResourceRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) TagResourceRequest(_a0 *lambda.TagResourceInput) (*request.Request, *lambda.TagResourceOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.TagResourceInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.TagResourceOutput + if rf, ok := ret.Get(1).(func(*lambda.TagResourceInput) *lambda.TagResourceOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.TagResourceOutput) + } + } + + return r0, r1 +} + +// TagResourceWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) TagResourceWithContext(_a0 aws.Context, _a1 *lambda.TagResourceInput, _a2 ...request.Option) (*lambda.TagResourceOutput, 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 *lambda.TagResourceOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.TagResourceInput, ...request.Option) *lambda.TagResourceOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.TagResourceOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.TagResourceInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UntagResource provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UntagResource(_a0 *lambda.UntagResourceInput) (*lambda.UntagResourceOutput, error) { + ret := _m.Called(_a0) + + var r0 *lambda.UntagResourceOutput + if rf, ok := ret.Get(0).(func(*lambda.UntagResourceInput) *lambda.UntagResourceOutput); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.UntagResourceOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.UntagResourceInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UntagResourceRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UntagResourceRequest(_a0 *lambda.UntagResourceInput) (*request.Request, *lambda.UntagResourceOutput) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.UntagResourceInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.UntagResourceOutput + if rf, ok := ret.Get(1).(func(*lambda.UntagResourceInput) *lambda.UntagResourceOutput); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.UntagResourceOutput) + } + } + + return r0, r1 +} + +// UntagResourceWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) UntagResourceWithContext(_a0 aws.Context, _a1 *lambda.UntagResourceInput, _a2 ...request.Option) (*lambda.UntagResourceOutput, 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 *lambda.UntagResourceOutput + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.UntagResourceInput, ...request.Option) *lambda.UntagResourceOutput); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.UntagResourceOutput) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.UntagResourceInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateAlias provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateAlias(_a0 *lambda.UpdateAliasInput) (*lambda.AliasConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.AliasConfiguration + if rf, ok := ret.Get(0).(func(*lambda.UpdateAliasInput) *lambda.AliasConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AliasConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.UpdateAliasInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateAliasRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateAliasRequest(_a0 *lambda.UpdateAliasInput) (*request.Request, *lambda.AliasConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.UpdateAliasInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.AliasConfiguration + if rf, ok := ret.Get(1).(func(*lambda.UpdateAliasInput) *lambda.AliasConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.AliasConfiguration) + } + } + + return r0, r1 +} + +// UpdateAliasWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) UpdateAliasWithContext(_a0 aws.Context, _a1 *lambda.UpdateAliasInput, _a2 ...request.Option) (*lambda.AliasConfiguration, 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 *lambda.AliasConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.UpdateAliasInput, ...request.Option) *lambda.AliasConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.AliasConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.UpdateAliasInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateEventSourceMapping provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateEventSourceMapping(_a0 *lambda.UpdateEventSourceMappingInput) (*lambda.EventSourceMappingConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(*lambda.UpdateEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.UpdateEventSourceMappingInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateEventSourceMappingRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateEventSourceMappingRequest(_a0 *lambda.UpdateEventSourceMappingInput) (*request.Request, *lambda.EventSourceMappingConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.UpdateEventSourceMappingInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(1).(func(*lambda.UpdateEventSourceMappingInput) *lambda.EventSourceMappingConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.EventSourceMappingConfiguration) + } + } + + return r0, r1 +} + +// UpdateEventSourceMappingWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) UpdateEventSourceMappingWithContext(_a0 aws.Context, _a1 *lambda.UpdateEventSourceMappingInput, _a2 ...request.Option) (*lambda.EventSourceMappingConfiguration, 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 *lambda.EventSourceMappingConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.UpdateEventSourceMappingInput, ...request.Option) *lambda.EventSourceMappingConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.EventSourceMappingConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.UpdateEventSourceMappingInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateFunctionCode provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateFunctionCode(_a0 *lambda.UpdateFunctionCodeInput) (*lambda.FunctionConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(*lambda.UpdateFunctionCodeInput) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.UpdateFunctionCodeInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateFunctionCodeRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateFunctionCodeRequest(_a0 *lambda.UpdateFunctionCodeInput) (*request.Request, *lambda.FunctionConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.UpdateFunctionCodeInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.FunctionConfiguration + if rf, ok := ret.Get(1).(func(*lambda.UpdateFunctionCodeInput) *lambda.FunctionConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.FunctionConfiguration) + } + } + + return r0, r1 +} + +// UpdateFunctionCodeWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) UpdateFunctionCodeWithContext(_a0 aws.Context, _a1 *lambda.UpdateFunctionCodeInput, _a2 ...request.Option) (*lambda.FunctionConfiguration, 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 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.UpdateFunctionCodeInput, ...request.Option) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.UpdateFunctionCodeInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateFunctionConfiguration provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateFunctionConfiguration(_a0 *lambda.UpdateFunctionConfigurationInput) (*lambda.FunctionConfiguration, error) { + ret := _m.Called(_a0) + + var r0 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(*lambda.UpdateFunctionConfigurationInput) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(*lambda.UpdateFunctionConfigurationInput) error); ok { + r1 = rf(_a0) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// UpdateFunctionConfigurationRequest provides a mock function with given fields: _a0 +func (_m *LambdaAPI) UpdateFunctionConfigurationRequest(_a0 *lambda.UpdateFunctionConfigurationInput) (*request.Request, *lambda.FunctionConfiguration) { + ret := _m.Called(_a0) + + var r0 *request.Request + if rf, ok := ret.Get(0).(func(*lambda.UpdateFunctionConfigurationInput) *request.Request); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*request.Request) + } + } + + var r1 *lambda.FunctionConfiguration + if rf, ok := ret.Get(1).(func(*lambda.UpdateFunctionConfigurationInput) *lambda.FunctionConfiguration); ok { + r1 = rf(_a0) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(*lambda.FunctionConfiguration) + } + } + + return r0, r1 +} + +// UpdateFunctionConfigurationWithContext provides a mock function with given fields: _a0, _a1, _a2 +func (_m *LambdaAPI) UpdateFunctionConfigurationWithContext(_a0 aws.Context, _a1 *lambda.UpdateFunctionConfigurationInput, _a2 ...request.Option) (*lambda.FunctionConfiguration, 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 *lambda.FunctionConfiguration + if rf, ok := ret.Get(0).(func(aws.Context, *lambda.UpdateFunctionConfigurationInput, ...request.Option) *lambda.FunctionConfiguration); ok { + r0 = rf(_a0, _a1, _a2...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*lambda.FunctionConfiguration) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(aws.Context, *lambda.UpdateFunctionConfigurationInput, ...request.Option) error); ok { + r1 = rf(_a0, _a1, _a2...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +}