From 93514df6fbfdcd89eee6b809613afc337a8a636e Mon Sep 17 00:00:00 2001 From: David Szabo Date: Tue, 31 Oct 2023 18:14:46 +0100 Subject: [PATCH] CDPCP-9629 ID Broker resource shoudl detect if the environment is deleted --- .gitignore | 1 + .mockery.yaml | 23 + README.md | 20 + go.mod | 3 + go.sum | 1 + .../MockEnvironmentClientService.go | 5037 +++++++++++++++++ .../resource_id_broker_mappings.go | 149 +- .../resource_id_broker_mappings_test.go | 610 ++ 8 files changed, 5788 insertions(+), 56 deletions(-) create mode 100644 .mockery.yaml create mode 100644 mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go create mode 100644 resources/environments/resource_id_broker_mappings_test.go diff --git a/.gitignore b/.gitignore index d8d976d4..493ff6a3 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ coverage.* # Ignore the binary terraform-provider-cdp +!terraform-provider-cdp/ # Ignore the dist directory dist/ diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 00000000..11d3b296 --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,23 @@ +## Copyright 2023 Cloudera. All Rights Reserved. +# +# This file is licensed 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. +# +# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +# OF ANY KIND, either express or implied. Refer to the License for the specific +# permissions and limitations governing your use of the file. + +quiet: False +keeptree: True +disable-version-string: True +with-expecter: True +mockname: "{{.InterfaceName}}" +filename: "{{.MockName}}.go" +outpkg: mocks +packages: + github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations: + interfaces: + ClientService: + config: + mockname: "MockEnvironment{{.InterfaceName}}" \ No newline at end of file diff --git a/README.md b/README.md index 8708fcce..4d1b7312 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,26 @@ Pull requests are expected to include appropriate updates to the [change log](./ make ``` +### Unit testing + +We are using github.com/vektra/mockery to generate mock interfaces for unit tests. To generate a new mock interface: +1. Install the mockery cli tool: +``` +brew install mockery +``` +2. Add the package/interface to the mockery.yaml configuration file: +``` +github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations: + interfaces: + ClientService: + config: + mockname: "MockEnvironment{{.InterfaceName}}" +``` +3. Issue the mockery command in the repository to generate the mock interfaces: +``` +$ mockery +``` + ### Execute example terraform ``` diff --git a/go.mod b/go.mod index 95cf519c..1f91c577 100644 --- a/go.mod +++ b/go.mod @@ -28,6 +28,7 @@ require ( github.com/armon/go-radix v1.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -84,6 +85,7 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/posener/complete v1.2.3 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/russross/blackfriday v1.6.0 // indirect @@ -93,6 +95,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.16.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/stretchr/testify v1.8.4 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/toqueteos/webbrowser v1.2.0 // indirect diff --git a/go.sum b/go.sum index c548137f..bd55f081 100644 --- a/go.sum +++ b/go.sum @@ -442,6 +442,7 @@ github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1Fof github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go new file mode 100644 index 00000000..f9efb82a --- /dev/null +++ b/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations/MockEnvironmentClientService.go @@ -0,0 +1,5037 @@ +// Code generated by mockery. DO NOT EDIT. + +package mocks + +import ( + operations "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations" + runtime "github.com/go-openapi/runtime" + mock "github.com/stretchr/testify/mock" +) + +// MockEnvironmentClientService is an autogenerated mock type for the ClientService type +type MockEnvironmentClientService struct { + mock.Mock +} + +type MockEnvironmentClientService_Expecter struct { + mock *mock.Mock +} + +func (_m *MockEnvironmentClientService) EXPECT() *MockEnvironmentClientService_Expecter { + return &MockEnvironmentClientService_Expecter{mock: &_m.Mock} +} + +// AttachFreeIpaRecipes provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) AttachFreeIpaRecipes(params *operations.AttachFreeIpaRecipesParams, opts ...operations.ClientOption) (*operations.AttachFreeIpaRecipesOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.AttachFreeIpaRecipesOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.AttachFreeIpaRecipesParams, ...operations.ClientOption) (*operations.AttachFreeIpaRecipesOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.AttachFreeIpaRecipesParams, ...operations.ClientOption) *operations.AttachFreeIpaRecipesOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.AttachFreeIpaRecipesOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.AttachFreeIpaRecipesParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_AttachFreeIpaRecipes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AttachFreeIpaRecipes' +type MockEnvironmentClientService_AttachFreeIpaRecipes_Call struct { + *mock.Call +} + +// AttachFreeIpaRecipes is a helper method to define mock.On call +// - params *operations.AttachFreeIpaRecipesParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) AttachFreeIpaRecipes(params interface{}, opts ...interface{}) *MockEnvironmentClientService_AttachFreeIpaRecipes_Call { + return &MockEnvironmentClientService_AttachFreeIpaRecipes_Call{Call: _e.mock.On("AttachFreeIpaRecipes", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_AttachFreeIpaRecipes_Call) Run(run func(params *operations.AttachFreeIpaRecipesParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_AttachFreeIpaRecipes_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.AttachFreeIpaRecipesParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_AttachFreeIpaRecipes_Call) Return(_a0 *operations.AttachFreeIpaRecipesOK, _a1 error) *MockEnvironmentClientService_AttachFreeIpaRecipes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_AttachFreeIpaRecipes_Call) RunAndReturn(run func(*operations.AttachFreeIpaRecipesParams, ...operations.ClientOption) (*operations.AttachFreeIpaRecipesOK, error)) *MockEnvironmentClientService_AttachFreeIpaRecipes_Call { + _c.Call.Return(run) + return _c +} + +// CancelFreeipaDiagnostics provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CancelFreeipaDiagnostics(params *operations.CancelFreeipaDiagnosticsParams, opts ...operations.ClientOption) (*operations.CancelFreeipaDiagnosticsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CancelFreeipaDiagnosticsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CancelFreeipaDiagnosticsParams, ...operations.ClientOption) (*operations.CancelFreeipaDiagnosticsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CancelFreeipaDiagnosticsParams, ...operations.ClientOption) *operations.CancelFreeipaDiagnosticsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CancelFreeipaDiagnosticsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CancelFreeipaDiagnosticsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CancelFreeipaDiagnostics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelFreeipaDiagnostics' +type MockEnvironmentClientService_CancelFreeipaDiagnostics_Call struct { + *mock.Call +} + +// CancelFreeipaDiagnostics is a helper method to define mock.On call +// - params *operations.CancelFreeipaDiagnosticsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CancelFreeipaDiagnostics(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CancelFreeipaDiagnostics_Call { + return &MockEnvironmentClientService_CancelFreeipaDiagnostics_Call{Call: _e.mock.On("CancelFreeipaDiagnostics", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CancelFreeipaDiagnostics_Call) Run(run func(params *operations.CancelFreeipaDiagnosticsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CancelFreeipaDiagnostics_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CancelFreeipaDiagnosticsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CancelFreeipaDiagnostics_Call) Return(_a0 *operations.CancelFreeipaDiagnosticsOK, _a1 error) *MockEnvironmentClientService_CancelFreeipaDiagnostics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CancelFreeipaDiagnostics_Call) RunAndReturn(run func(*operations.CancelFreeipaDiagnosticsParams, ...operations.ClientOption) (*operations.CancelFreeipaDiagnosticsOK, error)) *MockEnvironmentClientService_CancelFreeipaDiagnostics_Call { + _c.Call.Return(run) + return _c +} + +// ChangeEnvironmentCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) ChangeEnvironmentCredential(params *operations.ChangeEnvironmentCredentialParams, opts ...operations.ClientOption) (*operations.ChangeEnvironmentCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.ChangeEnvironmentCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.ChangeEnvironmentCredentialParams, ...operations.ClientOption) (*operations.ChangeEnvironmentCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.ChangeEnvironmentCredentialParams, ...operations.ClientOption) *operations.ChangeEnvironmentCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.ChangeEnvironmentCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.ChangeEnvironmentCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_ChangeEnvironmentCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeEnvironmentCredential' +type MockEnvironmentClientService_ChangeEnvironmentCredential_Call struct { + *mock.Call +} + +// ChangeEnvironmentCredential is a helper method to define mock.On call +// - params *operations.ChangeEnvironmentCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) ChangeEnvironmentCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_ChangeEnvironmentCredential_Call { + return &MockEnvironmentClientService_ChangeEnvironmentCredential_Call{Call: _e.mock.On("ChangeEnvironmentCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_ChangeEnvironmentCredential_Call) Run(run func(params *operations.ChangeEnvironmentCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_ChangeEnvironmentCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.ChangeEnvironmentCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_ChangeEnvironmentCredential_Call) Return(_a0 *operations.ChangeEnvironmentCredentialOK, _a1 error) *MockEnvironmentClientService_ChangeEnvironmentCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_ChangeEnvironmentCredential_Call) RunAndReturn(run func(*operations.ChangeEnvironmentCredentialParams, ...operations.ClientOption) (*operations.ChangeEnvironmentCredentialOK, error)) *MockEnvironmentClientService_ChangeEnvironmentCredential_Call { + _c.Call.Return(run) + return _c +} + +// CheckDatabaseConnectivity provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CheckDatabaseConnectivity(params *operations.CheckDatabaseConnectivityParams, opts ...operations.ClientOption) (*operations.CheckDatabaseConnectivityOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CheckDatabaseConnectivityOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CheckDatabaseConnectivityParams, ...operations.ClientOption) (*operations.CheckDatabaseConnectivityOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CheckDatabaseConnectivityParams, ...operations.ClientOption) *operations.CheckDatabaseConnectivityOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CheckDatabaseConnectivityOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CheckDatabaseConnectivityParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CheckDatabaseConnectivity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckDatabaseConnectivity' +type MockEnvironmentClientService_CheckDatabaseConnectivity_Call struct { + *mock.Call +} + +// CheckDatabaseConnectivity is a helper method to define mock.On call +// - params *operations.CheckDatabaseConnectivityParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CheckDatabaseConnectivity(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CheckDatabaseConnectivity_Call { + return &MockEnvironmentClientService_CheckDatabaseConnectivity_Call{Call: _e.mock.On("CheckDatabaseConnectivity", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CheckDatabaseConnectivity_Call) Run(run func(params *operations.CheckDatabaseConnectivityParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CheckDatabaseConnectivity_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CheckDatabaseConnectivityParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CheckDatabaseConnectivity_Call) Return(_a0 *operations.CheckDatabaseConnectivityOK, _a1 error) *MockEnvironmentClientService_CheckDatabaseConnectivity_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CheckDatabaseConnectivity_Call) RunAndReturn(run func(*operations.CheckDatabaseConnectivityParams, ...operations.ClientOption) (*operations.CheckDatabaseConnectivityOK, error)) *MockEnvironmentClientService_CheckDatabaseConnectivity_Call { + _c.Call.Return(run) + return _c +} + +// CheckEnvironmentConnectivity provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CheckEnvironmentConnectivity(params *operations.CheckEnvironmentConnectivityParams, opts ...operations.ClientOption) (*operations.CheckEnvironmentConnectivityOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CheckEnvironmentConnectivityOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CheckEnvironmentConnectivityParams, ...operations.ClientOption) (*operations.CheckEnvironmentConnectivityOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CheckEnvironmentConnectivityParams, ...operations.ClientOption) *operations.CheckEnvironmentConnectivityOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CheckEnvironmentConnectivityOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CheckEnvironmentConnectivityParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CheckEnvironmentConnectivity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEnvironmentConnectivity' +type MockEnvironmentClientService_CheckEnvironmentConnectivity_Call struct { + *mock.Call +} + +// CheckEnvironmentConnectivity is a helper method to define mock.On call +// - params *operations.CheckEnvironmentConnectivityParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CheckEnvironmentConnectivity(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CheckEnvironmentConnectivity_Call { + return &MockEnvironmentClientService_CheckEnvironmentConnectivity_Call{Call: _e.mock.On("CheckEnvironmentConnectivity", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CheckEnvironmentConnectivity_Call) Run(run func(params *operations.CheckEnvironmentConnectivityParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CheckEnvironmentConnectivity_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CheckEnvironmentConnectivityParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CheckEnvironmentConnectivity_Call) Return(_a0 *operations.CheckEnvironmentConnectivityOK, _a1 error) *MockEnvironmentClientService_CheckEnvironmentConnectivity_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CheckEnvironmentConnectivity_Call) RunAndReturn(run func(*operations.CheckEnvironmentConnectivityParams, ...operations.ClientOption) (*operations.CheckEnvironmentConnectivityOK, error)) *MockEnvironmentClientService_CheckEnvironmentConnectivity_Call { + _c.Call.Return(run) + return _c +} + +// CheckKubernetesConnectivity provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CheckKubernetesConnectivity(params *operations.CheckKubernetesConnectivityParams, opts ...operations.ClientOption) (*operations.CheckKubernetesConnectivityOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CheckKubernetesConnectivityOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CheckKubernetesConnectivityParams, ...operations.ClientOption) (*operations.CheckKubernetesConnectivityOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CheckKubernetesConnectivityParams, ...operations.ClientOption) *operations.CheckKubernetesConnectivityOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CheckKubernetesConnectivityOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CheckKubernetesConnectivityParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CheckKubernetesConnectivity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckKubernetesConnectivity' +type MockEnvironmentClientService_CheckKubernetesConnectivity_Call struct { + *mock.Call +} + +// CheckKubernetesConnectivity is a helper method to define mock.On call +// - params *operations.CheckKubernetesConnectivityParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CheckKubernetesConnectivity(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CheckKubernetesConnectivity_Call { + return &MockEnvironmentClientService_CheckKubernetesConnectivity_Call{Call: _e.mock.On("CheckKubernetesConnectivity", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CheckKubernetesConnectivity_Call) Run(run func(params *operations.CheckKubernetesConnectivityParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CheckKubernetesConnectivity_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CheckKubernetesConnectivityParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CheckKubernetesConnectivity_Call) Return(_a0 *operations.CheckKubernetesConnectivityOK, _a1 error) *MockEnvironmentClientService_CheckKubernetesConnectivity_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CheckKubernetesConnectivity_Call) RunAndReturn(run func(*operations.CheckKubernetesConnectivityParams, ...operations.ClientOption) (*operations.CheckKubernetesConnectivityOK, error)) *MockEnvironmentClientService_CheckKubernetesConnectivity_Call { + _c.Call.Return(run) + return _c +} + +// CollectFreeipaDiagnostics provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CollectFreeipaDiagnostics(params *operations.CollectFreeipaDiagnosticsParams, opts ...operations.ClientOption) (*operations.CollectFreeipaDiagnosticsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CollectFreeipaDiagnosticsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CollectFreeipaDiagnosticsParams, ...operations.ClientOption) (*operations.CollectFreeipaDiagnosticsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CollectFreeipaDiagnosticsParams, ...operations.ClientOption) *operations.CollectFreeipaDiagnosticsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CollectFreeipaDiagnosticsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CollectFreeipaDiagnosticsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CollectFreeipaDiagnostics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CollectFreeipaDiagnostics' +type MockEnvironmentClientService_CollectFreeipaDiagnostics_Call struct { + *mock.Call +} + +// CollectFreeipaDiagnostics is a helper method to define mock.On call +// - params *operations.CollectFreeipaDiagnosticsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CollectFreeipaDiagnostics(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CollectFreeipaDiagnostics_Call { + return &MockEnvironmentClientService_CollectFreeipaDiagnostics_Call{Call: _e.mock.On("CollectFreeipaDiagnostics", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CollectFreeipaDiagnostics_Call) Run(run func(params *operations.CollectFreeipaDiagnosticsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CollectFreeipaDiagnostics_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CollectFreeipaDiagnosticsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CollectFreeipaDiagnostics_Call) Return(_a0 *operations.CollectFreeipaDiagnosticsOK, _a1 error) *MockEnvironmentClientService_CollectFreeipaDiagnostics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CollectFreeipaDiagnostics_Call) RunAndReturn(run func(*operations.CollectFreeipaDiagnosticsParams, ...operations.ClientOption) (*operations.CollectFreeipaDiagnosticsOK, error)) *MockEnvironmentClientService_CollectFreeipaDiagnostics_Call { + _c.Call.Return(run) + return _c +} + +// CreateAWSCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreateAWSCredential(params *operations.CreateAWSCredentialParams, opts ...operations.ClientOption) (*operations.CreateAWSCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreateAWSCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreateAWSCredentialParams, ...operations.ClientOption) (*operations.CreateAWSCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreateAWSCredentialParams, ...operations.ClientOption) *operations.CreateAWSCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreateAWSCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreateAWSCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreateAWSCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAWSCredential' +type MockEnvironmentClientService_CreateAWSCredential_Call struct { + *mock.Call +} + +// CreateAWSCredential is a helper method to define mock.On call +// - params *operations.CreateAWSCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreateAWSCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreateAWSCredential_Call { + return &MockEnvironmentClientService_CreateAWSCredential_Call{Call: _e.mock.On("CreateAWSCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreateAWSCredential_Call) Run(run func(params *operations.CreateAWSCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreateAWSCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreateAWSCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAWSCredential_Call) Return(_a0 *operations.CreateAWSCredentialOK, _a1 error) *MockEnvironmentClientService_CreateAWSCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAWSCredential_Call) RunAndReturn(run func(*operations.CreateAWSCredentialParams, ...operations.ClientOption) (*operations.CreateAWSCredentialOK, error)) *MockEnvironmentClientService_CreateAWSCredential_Call { + _c.Call.Return(run) + return _c +} + +// CreateAWSEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreateAWSEnvironment(params *operations.CreateAWSEnvironmentParams, opts ...operations.ClientOption) (*operations.CreateAWSEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreateAWSEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreateAWSEnvironmentParams, ...operations.ClientOption) (*operations.CreateAWSEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreateAWSEnvironmentParams, ...operations.ClientOption) *operations.CreateAWSEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreateAWSEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreateAWSEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreateAWSEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAWSEnvironment' +type MockEnvironmentClientService_CreateAWSEnvironment_Call struct { + *mock.Call +} + +// CreateAWSEnvironment is a helper method to define mock.On call +// - params *operations.CreateAWSEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreateAWSEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreateAWSEnvironment_Call { + return &MockEnvironmentClientService_CreateAWSEnvironment_Call{Call: _e.mock.On("CreateAWSEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreateAWSEnvironment_Call) Run(run func(params *operations.CreateAWSEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreateAWSEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreateAWSEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAWSEnvironment_Call) Return(_a0 *operations.CreateAWSEnvironmentOK, _a1 error) *MockEnvironmentClientService_CreateAWSEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAWSEnvironment_Call) RunAndReturn(run func(*operations.CreateAWSEnvironmentParams, ...operations.ClientOption) (*operations.CreateAWSEnvironmentOK, error)) *MockEnvironmentClientService_CreateAWSEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// CreateAzureCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreateAzureCredential(params *operations.CreateAzureCredentialParams, opts ...operations.ClientOption) (*operations.CreateAzureCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreateAzureCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreateAzureCredentialParams, ...operations.ClientOption) (*operations.CreateAzureCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreateAzureCredentialParams, ...operations.ClientOption) *operations.CreateAzureCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreateAzureCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreateAzureCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreateAzureCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAzureCredential' +type MockEnvironmentClientService_CreateAzureCredential_Call struct { + *mock.Call +} + +// CreateAzureCredential is a helper method to define mock.On call +// - params *operations.CreateAzureCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreateAzureCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreateAzureCredential_Call { + return &MockEnvironmentClientService_CreateAzureCredential_Call{Call: _e.mock.On("CreateAzureCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreateAzureCredential_Call) Run(run func(params *operations.CreateAzureCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreateAzureCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreateAzureCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAzureCredential_Call) Return(_a0 *operations.CreateAzureCredentialOK, _a1 error) *MockEnvironmentClientService_CreateAzureCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAzureCredential_Call) RunAndReturn(run func(*operations.CreateAzureCredentialParams, ...operations.ClientOption) (*operations.CreateAzureCredentialOK, error)) *MockEnvironmentClientService_CreateAzureCredential_Call { + _c.Call.Return(run) + return _c +} + +// CreateAzureEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreateAzureEnvironment(params *operations.CreateAzureEnvironmentParams, opts ...operations.ClientOption) (*operations.CreateAzureEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreateAzureEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreateAzureEnvironmentParams, ...operations.ClientOption) (*operations.CreateAzureEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreateAzureEnvironmentParams, ...operations.ClientOption) *operations.CreateAzureEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreateAzureEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreateAzureEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreateAzureEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAzureEnvironment' +type MockEnvironmentClientService_CreateAzureEnvironment_Call struct { + *mock.Call +} + +// CreateAzureEnvironment is a helper method to define mock.On call +// - params *operations.CreateAzureEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreateAzureEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreateAzureEnvironment_Call { + return &MockEnvironmentClientService_CreateAzureEnvironment_Call{Call: _e.mock.On("CreateAzureEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreateAzureEnvironment_Call) Run(run func(params *operations.CreateAzureEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreateAzureEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreateAzureEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAzureEnvironment_Call) Return(_a0 *operations.CreateAzureEnvironmentOK, _a1 error) *MockEnvironmentClientService_CreateAzureEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreateAzureEnvironment_Call) RunAndReturn(run func(*operations.CreateAzureEnvironmentParams, ...operations.ClientOption) (*operations.CreateAzureEnvironmentOK, error)) *MockEnvironmentClientService_CreateAzureEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// CreateGCPCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreateGCPCredential(params *operations.CreateGCPCredentialParams, opts ...operations.ClientOption) (*operations.CreateGCPCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreateGCPCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreateGCPCredentialParams, ...operations.ClientOption) (*operations.CreateGCPCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreateGCPCredentialParams, ...operations.ClientOption) *operations.CreateGCPCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreateGCPCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreateGCPCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreateGCPCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGCPCredential' +type MockEnvironmentClientService_CreateGCPCredential_Call struct { + *mock.Call +} + +// CreateGCPCredential is a helper method to define mock.On call +// - params *operations.CreateGCPCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreateGCPCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreateGCPCredential_Call { + return &MockEnvironmentClientService_CreateGCPCredential_Call{Call: _e.mock.On("CreateGCPCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreateGCPCredential_Call) Run(run func(params *operations.CreateGCPCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreateGCPCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreateGCPCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreateGCPCredential_Call) Return(_a0 *operations.CreateGCPCredentialOK, _a1 error) *MockEnvironmentClientService_CreateGCPCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreateGCPCredential_Call) RunAndReturn(run func(*operations.CreateGCPCredentialParams, ...operations.ClientOption) (*operations.CreateGCPCredentialOK, error)) *MockEnvironmentClientService_CreateGCPCredential_Call { + _c.Call.Return(run) + return _c +} + +// CreateGCPEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreateGCPEnvironment(params *operations.CreateGCPEnvironmentParams, opts ...operations.ClientOption) (*operations.CreateGCPEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreateGCPEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreateGCPEnvironmentParams, ...operations.ClientOption) (*operations.CreateGCPEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreateGCPEnvironmentParams, ...operations.ClientOption) *operations.CreateGCPEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreateGCPEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreateGCPEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreateGCPEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGCPEnvironment' +type MockEnvironmentClientService_CreateGCPEnvironment_Call struct { + *mock.Call +} + +// CreateGCPEnvironment is a helper method to define mock.On call +// - params *operations.CreateGCPEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreateGCPEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreateGCPEnvironment_Call { + return &MockEnvironmentClientService_CreateGCPEnvironment_Call{Call: _e.mock.On("CreateGCPEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreateGCPEnvironment_Call) Run(run func(params *operations.CreateGCPEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreateGCPEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreateGCPEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreateGCPEnvironment_Call) Return(_a0 *operations.CreateGCPEnvironmentOK, _a1 error) *MockEnvironmentClientService_CreateGCPEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreateGCPEnvironment_Call) RunAndReturn(run func(*operations.CreateGCPEnvironmentParams, ...operations.ClientOption) (*operations.CreateGCPEnvironmentOK, error)) *MockEnvironmentClientService_CreateGCPEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// CreatePrivateEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreatePrivateEnvironment(params *operations.CreatePrivateEnvironmentParams, opts ...operations.ClientOption) (*operations.CreatePrivateEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreatePrivateEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreatePrivateEnvironmentParams, ...operations.ClientOption) (*operations.CreatePrivateEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreatePrivateEnvironmentParams, ...operations.ClientOption) *operations.CreatePrivateEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreatePrivateEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreatePrivateEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreatePrivateEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePrivateEnvironment' +type MockEnvironmentClientService_CreatePrivateEnvironment_Call struct { + *mock.Call +} + +// CreatePrivateEnvironment is a helper method to define mock.On call +// - params *operations.CreatePrivateEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreatePrivateEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreatePrivateEnvironment_Call { + return &MockEnvironmentClientService_CreatePrivateEnvironment_Call{Call: _e.mock.On("CreatePrivateEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreatePrivateEnvironment_Call) Run(run func(params *operations.CreatePrivateEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreatePrivateEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreatePrivateEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreatePrivateEnvironment_Call) Return(_a0 *operations.CreatePrivateEnvironmentOK, _a1 error) *MockEnvironmentClientService_CreatePrivateEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreatePrivateEnvironment_Call) RunAndReturn(run func(*operations.CreatePrivateEnvironmentParams, ...operations.ClientOption) (*operations.CreatePrivateEnvironmentOK, error)) *MockEnvironmentClientService_CreatePrivateEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// CreateProxyConfig provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) CreateProxyConfig(params *operations.CreateProxyConfigParams, opts ...operations.ClientOption) (*operations.CreateProxyConfigOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.CreateProxyConfigOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.CreateProxyConfigParams, ...operations.ClientOption) (*operations.CreateProxyConfigOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.CreateProxyConfigParams, ...operations.ClientOption) *operations.CreateProxyConfigOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.CreateProxyConfigOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.CreateProxyConfigParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_CreateProxyConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateProxyConfig' +type MockEnvironmentClientService_CreateProxyConfig_Call struct { + *mock.Call +} + +// CreateProxyConfig is a helper method to define mock.On call +// - params *operations.CreateProxyConfigParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) CreateProxyConfig(params interface{}, opts ...interface{}) *MockEnvironmentClientService_CreateProxyConfig_Call { + return &MockEnvironmentClientService_CreateProxyConfig_Call{Call: _e.mock.On("CreateProxyConfig", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_CreateProxyConfig_Call) Run(run func(params *operations.CreateProxyConfigParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_CreateProxyConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.CreateProxyConfigParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_CreateProxyConfig_Call) Return(_a0 *operations.CreateProxyConfigOK, _a1 error) *MockEnvironmentClientService_CreateProxyConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_CreateProxyConfig_Call) RunAndReturn(run func(*operations.CreateProxyConfigParams, ...operations.ClientOption) (*operations.CreateProxyConfigOK, error)) *MockEnvironmentClientService_CreateProxyConfig_Call { + _c.Call.Return(run) + return _c +} + +// DeleteAuditCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DeleteAuditCredential(params *operations.DeleteAuditCredentialParams, opts ...operations.ClientOption) (*operations.DeleteAuditCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DeleteAuditCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DeleteAuditCredentialParams, ...operations.ClientOption) (*operations.DeleteAuditCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DeleteAuditCredentialParams, ...operations.ClientOption) *operations.DeleteAuditCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DeleteAuditCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DeleteAuditCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DeleteAuditCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAuditCredential' +type MockEnvironmentClientService_DeleteAuditCredential_Call struct { + *mock.Call +} + +// DeleteAuditCredential is a helper method to define mock.On call +// - params *operations.DeleteAuditCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DeleteAuditCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DeleteAuditCredential_Call { + return &MockEnvironmentClientService_DeleteAuditCredential_Call{Call: _e.mock.On("DeleteAuditCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DeleteAuditCredential_Call) Run(run func(params *operations.DeleteAuditCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DeleteAuditCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DeleteAuditCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteAuditCredential_Call) Return(_a0 *operations.DeleteAuditCredentialOK, _a1 error) *MockEnvironmentClientService_DeleteAuditCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteAuditCredential_Call) RunAndReturn(run func(*operations.DeleteAuditCredentialParams, ...operations.ClientOption) (*operations.DeleteAuditCredentialOK, error)) *MockEnvironmentClientService_DeleteAuditCredential_Call { + _c.Call.Return(run) + return _c +} + +// DeleteCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DeleteCredential(params *operations.DeleteCredentialParams, opts ...operations.ClientOption) (*operations.DeleteCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DeleteCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DeleteCredentialParams, ...operations.ClientOption) (*operations.DeleteCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DeleteCredentialParams, ...operations.ClientOption) *operations.DeleteCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DeleteCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DeleteCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DeleteCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredential' +type MockEnvironmentClientService_DeleteCredential_Call struct { + *mock.Call +} + +// DeleteCredential is a helper method to define mock.On call +// - params *operations.DeleteCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DeleteCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DeleteCredential_Call { + return &MockEnvironmentClientService_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DeleteCredential_Call) Run(run func(params *operations.DeleteCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DeleteCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DeleteCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteCredential_Call) Return(_a0 *operations.DeleteCredentialOK, _a1 error) *MockEnvironmentClientService_DeleteCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteCredential_Call) RunAndReturn(run func(*operations.DeleteCredentialParams, ...operations.ClientOption) (*operations.DeleteCredentialOK, error)) *MockEnvironmentClientService_DeleteCredential_Call { + _c.Call.Return(run) + return _c +} + +// DeleteEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DeleteEnvironment(params *operations.DeleteEnvironmentParams, opts ...operations.ClientOption) (*operations.DeleteEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DeleteEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DeleteEnvironmentParams, ...operations.ClientOption) (*operations.DeleteEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DeleteEnvironmentParams, ...operations.ClientOption) *operations.DeleteEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DeleteEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DeleteEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DeleteEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteEnvironment' +type MockEnvironmentClientService_DeleteEnvironment_Call struct { + *mock.Call +} + +// DeleteEnvironment is a helper method to define mock.On call +// - params *operations.DeleteEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DeleteEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DeleteEnvironment_Call { + return &MockEnvironmentClientService_DeleteEnvironment_Call{Call: _e.mock.On("DeleteEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DeleteEnvironment_Call) Run(run func(params *operations.DeleteEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DeleteEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DeleteEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteEnvironment_Call) Return(_a0 *operations.DeleteEnvironmentOK, _a1 error) *MockEnvironmentClientService_DeleteEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteEnvironment_Call) RunAndReturn(run func(*operations.DeleteEnvironmentParams, ...operations.ClientOption) (*operations.DeleteEnvironmentOK, error)) *MockEnvironmentClientService_DeleteEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// DeleteProxyConfig provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DeleteProxyConfig(params *operations.DeleteProxyConfigParams, opts ...operations.ClientOption) (*operations.DeleteProxyConfigOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DeleteProxyConfigOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DeleteProxyConfigParams, ...operations.ClientOption) (*operations.DeleteProxyConfigOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DeleteProxyConfigParams, ...operations.ClientOption) *operations.DeleteProxyConfigOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DeleteProxyConfigOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DeleteProxyConfigParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DeleteProxyConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteProxyConfig' +type MockEnvironmentClientService_DeleteProxyConfig_Call struct { + *mock.Call +} + +// DeleteProxyConfig is a helper method to define mock.On call +// - params *operations.DeleteProxyConfigParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DeleteProxyConfig(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DeleteProxyConfig_Call { + return &MockEnvironmentClientService_DeleteProxyConfig_Call{Call: _e.mock.On("DeleteProxyConfig", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DeleteProxyConfig_Call) Run(run func(params *operations.DeleteProxyConfigParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DeleteProxyConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DeleteProxyConfigParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteProxyConfig_Call) Return(_a0 *operations.DeleteProxyConfigOK, _a1 error) *MockEnvironmentClientService_DeleteProxyConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DeleteProxyConfig_Call) RunAndReturn(run func(*operations.DeleteProxyConfigParams, ...operations.ClientOption) (*operations.DeleteProxyConfigOK, error)) *MockEnvironmentClientService_DeleteProxyConfig_Call { + _c.Call.Return(run) + return _c +} + +// DescribeEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DescribeEnvironment(params *operations.DescribeEnvironmentParams, opts ...operations.ClientOption) (*operations.DescribeEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DescribeEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DescribeEnvironmentParams, ...operations.ClientOption) (*operations.DescribeEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DescribeEnvironmentParams, ...operations.ClientOption) *operations.DescribeEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DescribeEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DescribeEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DescribeEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DescribeEnvironment' +type MockEnvironmentClientService_DescribeEnvironment_Call struct { + *mock.Call +} + +// DescribeEnvironment is a helper method to define mock.On call +// - params *operations.DescribeEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DescribeEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DescribeEnvironment_Call { + return &MockEnvironmentClientService_DescribeEnvironment_Call{Call: _e.mock.On("DescribeEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DescribeEnvironment_Call) Run(run func(params *operations.DescribeEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DescribeEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DescribeEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DescribeEnvironment_Call) Return(_a0 *operations.DescribeEnvironmentOK, _a1 error) *MockEnvironmentClientService_DescribeEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DescribeEnvironment_Call) RunAndReturn(run func(*operations.DescribeEnvironmentParams, ...operations.ClientOption) (*operations.DescribeEnvironmentOK, error)) *MockEnvironmentClientService_DescribeEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// DetachFreeIpaRecipes provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DetachFreeIpaRecipes(params *operations.DetachFreeIpaRecipesParams, opts ...operations.ClientOption) (*operations.DetachFreeIpaRecipesOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DetachFreeIpaRecipesOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DetachFreeIpaRecipesParams, ...operations.ClientOption) (*operations.DetachFreeIpaRecipesOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DetachFreeIpaRecipesParams, ...operations.ClientOption) *operations.DetachFreeIpaRecipesOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DetachFreeIpaRecipesOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DetachFreeIpaRecipesParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DetachFreeIpaRecipes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DetachFreeIpaRecipes' +type MockEnvironmentClientService_DetachFreeIpaRecipes_Call struct { + *mock.Call +} + +// DetachFreeIpaRecipes is a helper method to define mock.On call +// - params *operations.DetachFreeIpaRecipesParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DetachFreeIpaRecipes(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DetachFreeIpaRecipes_Call { + return &MockEnvironmentClientService_DetachFreeIpaRecipes_Call{Call: _e.mock.On("DetachFreeIpaRecipes", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DetachFreeIpaRecipes_Call) Run(run func(params *operations.DetachFreeIpaRecipesParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DetachFreeIpaRecipes_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DetachFreeIpaRecipesParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DetachFreeIpaRecipes_Call) Return(_a0 *operations.DetachFreeIpaRecipesOK, _a1 error) *MockEnvironmentClientService_DetachFreeIpaRecipes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DetachFreeIpaRecipes_Call) RunAndReturn(run func(*operations.DetachFreeIpaRecipesParams, ...operations.ClientOption) (*operations.DetachFreeIpaRecipesOK, error)) *MockEnvironmentClientService_DetachFreeIpaRecipes_Call { + _c.Call.Return(run) + return _c +} + +// DisableS3Guard provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DisableS3Guard(params *operations.DisableS3GuardParams, opts ...operations.ClientOption) (*operations.DisableS3GuardOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DisableS3GuardOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DisableS3GuardParams, ...operations.ClientOption) (*operations.DisableS3GuardOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DisableS3GuardParams, ...operations.ClientOption) *operations.DisableS3GuardOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DisableS3GuardOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DisableS3GuardParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DisableS3Guard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableS3Guard' +type MockEnvironmentClientService_DisableS3Guard_Call struct { + *mock.Call +} + +// DisableS3Guard is a helper method to define mock.On call +// - params *operations.DisableS3GuardParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DisableS3Guard(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DisableS3Guard_Call { + return &MockEnvironmentClientService_DisableS3Guard_Call{Call: _e.mock.On("DisableS3Guard", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DisableS3Guard_Call) Run(run func(params *operations.DisableS3GuardParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DisableS3Guard_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DisableS3GuardParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DisableS3Guard_Call) Return(_a0 *operations.DisableS3GuardOK, _a1 error) *MockEnvironmentClientService_DisableS3Guard_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DisableS3Guard_Call) RunAndReturn(run func(*operations.DisableS3GuardParams, ...operations.ClientOption) (*operations.DisableS3GuardOK, error)) *MockEnvironmentClientService_DisableS3Guard_Call { + _c.Call.Return(run) + return _c +} + +// DownscaleFreeipa provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) DownscaleFreeipa(params *operations.DownscaleFreeipaParams, opts ...operations.ClientOption) (*operations.DownscaleFreeipaOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.DownscaleFreeipaOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.DownscaleFreeipaParams, ...operations.ClientOption) (*operations.DownscaleFreeipaOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.DownscaleFreeipaParams, ...operations.ClientOption) *operations.DownscaleFreeipaOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.DownscaleFreeipaOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.DownscaleFreeipaParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_DownscaleFreeipa_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DownscaleFreeipa' +type MockEnvironmentClientService_DownscaleFreeipa_Call struct { + *mock.Call +} + +// DownscaleFreeipa is a helper method to define mock.On call +// - params *operations.DownscaleFreeipaParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) DownscaleFreeipa(params interface{}, opts ...interface{}) *MockEnvironmentClientService_DownscaleFreeipa_Call { + return &MockEnvironmentClientService_DownscaleFreeipa_Call{Call: _e.mock.On("DownscaleFreeipa", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_DownscaleFreeipa_Call) Run(run func(params *operations.DownscaleFreeipaParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_DownscaleFreeipa_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.DownscaleFreeipaParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_DownscaleFreeipa_Call) Return(_a0 *operations.DownscaleFreeipaOK, _a1 error) *MockEnvironmentClientService_DownscaleFreeipa_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_DownscaleFreeipa_Call) RunAndReturn(run func(*operations.DownscaleFreeipaParams, ...operations.ClientOption) (*operations.DownscaleFreeipaOK, error)) *MockEnvironmentClientService_DownscaleFreeipa_Call { + _c.Call.Return(run) + return _c +} + +// GetAccountTelemetry provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetAccountTelemetry(params *operations.GetAccountTelemetryParams, opts ...operations.ClientOption) (*operations.GetAccountTelemetryOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetAccountTelemetryOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetAccountTelemetryParams, ...operations.ClientOption) (*operations.GetAccountTelemetryOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetAccountTelemetryParams, ...operations.ClientOption) *operations.GetAccountTelemetryOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetAccountTelemetryOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetAccountTelemetryParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetAccountTelemetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAccountTelemetry' +type MockEnvironmentClientService_GetAccountTelemetry_Call struct { + *mock.Call +} + +// GetAccountTelemetry is a helper method to define mock.On call +// - params *operations.GetAccountTelemetryParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetAccountTelemetry(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetAccountTelemetry_Call { + return &MockEnvironmentClientService_GetAccountTelemetry_Call{Call: _e.mock.On("GetAccountTelemetry", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetAccountTelemetry_Call) Run(run func(params *operations.GetAccountTelemetryParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetAccountTelemetry_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetAccountTelemetryParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetAccountTelemetry_Call) Return(_a0 *operations.GetAccountTelemetryOK, _a1 error) *MockEnvironmentClientService_GetAccountTelemetry_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetAccountTelemetry_Call) RunAndReturn(run func(*operations.GetAccountTelemetryParams, ...operations.ClientOption) (*operations.GetAccountTelemetryOK, error)) *MockEnvironmentClientService_GetAccountTelemetry_Call { + _c.Call.Return(run) + return _c +} + +// GetAccountTelemetryDefault provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetAccountTelemetryDefault(params *operations.GetAccountTelemetryDefaultParams, opts ...operations.ClientOption) (*operations.GetAccountTelemetryDefaultOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetAccountTelemetryDefaultOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetAccountTelemetryDefaultParams, ...operations.ClientOption) (*operations.GetAccountTelemetryDefaultOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetAccountTelemetryDefaultParams, ...operations.ClientOption) *operations.GetAccountTelemetryDefaultOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetAccountTelemetryDefaultOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetAccountTelemetryDefaultParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetAccountTelemetryDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAccountTelemetryDefault' +type MockEnvironmentClientService_GetAccountTelemetryDefault_Call struct { + *mock.Call +} + +// GetAccountTelemetryDefault is a helper method to define mock.On call +// - params *operations.GetAccountTelemetryDefaultParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetAccountTelemetryDefault(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetAccountTelemetryDefault_Call { + return &MockEnvironmentClientService_GetAccountTelemetryDefault_Call{Call: _e.mock.On("GetAccountTelemetryDefault", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetAccountTelemetryDefault_Call) Run(run func(params *operations.GetAccountTelemetryDefaultParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetAccountTelemetryDefault_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetAccountTelemetryDefaultParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetAccountTelemetryDefault_Call) Return(_a0 *operations.GetAccountTelemetryDefaultOK, _a1 error) *MockEnvironmentClientService_GetAccountTelemetryDefault_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetAccountTelemetryDefault_Call) RunAndReturn(run func(*operations.GetAccountTelemetryDefaultParams, ...operations.ClientOption) (*operations.GetAccountTelemetryDefaultOK, error)) *MockEnvironmentClientService_GetAccountTelemetryDefault_Call { + _c.Call.Return(run) + return _c +} + +// GetAuditCredentialPrerequisites provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetAuditCredentialPrerequisites(params *operations.GetAuditCredentialPrerequisitesParams, opts ...operations.ClientOption) (*operations.GetAuditCredentialPrerequisitesOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetAuditCredentialPrerequisitesOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetAuditCredentialPrerequisitesParams, ...operations.ClientOption) (*operations.GetAuditCredentialPrerequisitesOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetAuditCredentialPrerequisitesParams, ...operations.ClientOption) *operations.GetAuditCredentialPrerequisitesOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetAuditCredentialPrerequisitesOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetAuditCredentialPrerequisitesParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAuditCredentialPrerequisites' +type MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call struct { + *mock.Call +} + +// GetAuditCredentialPrerequisites is a helper method to define mock.On call +// - params *operations.GetAuditCredentialPrerequisitesParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetAuditCredentialPrerequisites(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call { + return &MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call{Call: _e.mock.On("GetAuditCredentialPrerequisites", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call) Run(run func(params *operations.GetAuditCredentialPrerequisitesParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetAuditCredentialPrerequisitesParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call) Return(_a0 *operations.GetAuditCredentialPrerequisitesOK, _a1 error) *MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call) RunAndReturn(run func(*operations.GetAuditCredentialPrerequisitesParams, ...operations.ClientOption) (*operations.GetAuditCredentialPrerequisitesOK, error)) *MockEnvironmentClientService_GetAuditCredentialPrerequisites_Call { + _c.Call.Return(run) + return _c +} + +// GetAutomatedSyncEnvironmentStatus provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetAutomatedSyncEnvironmentStatus(params *operations.GetAutomatedSyncEnvironmentStatusParams, opts ...operations.ClientOption) (*operations.GetAutomatedSyncEnvironmentStatusOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetAutomatedSyncEnvironmentStatusOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetAutomatedSyncEnvironmentStatusParams, ...operations.ClientOption) (*operations.GetAutomatedSyncEnvironmentStatusOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetAutomatedSyncEnvironmentStatusParams, ...operations.ClientOption) *operations.GetAutomatedSyncEnvironmentStatusOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetAutomatedSyncEnvironmentStatusOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetAutomatedSyncEnvironmentStatusParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAutomatedSyncEnvironmentStatus' +type MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call struct { + *mock.Call +} + +// GetAutomatedSyncEnvironmentStatus is a helper method to define mock.On call +// - params *operations.GetAutomatedSyncEnvironmentStatusParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetAutomatedSyncEnvironmentStatus(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call { + return &MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call{Call: _e.mock.On("GetAutomatedSyncEnvironmentStatus", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call) Run(run func(params *operations.GetAutomatedSyncEnvironmentStatusParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetAutomatedSyncEnvironmentStatusParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call) Return(_a0 *operations.GetAutomatedSyncEnvironmentStatusOK, _a1 error) *MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call) RunAndReturn(run func(*operations.GetAutomatedSyncEnvironmentStatusParams, ...operations.ClientOption) (*operations.GetAutomatedSyncEnvironmentStatusOK, error)) *MockEnvironmentClientService_GetAutomatedSyncEnvironmentStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetCredentialPrerequisites provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetCredentialPrerequisites(params *operations.GetCredentialPrerequisitesParams, opts ...operations.ClientOption) (*operations.GetCredentialPrerequisitesOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetCredentialPrerequisitesOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetCredentialPrerequisitesParams, ...operations.ClientOption) (*operations.GetCredentialPrerequisitesOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetCredentialPrerequisitesParams, ...operations.ClientOption) *operations.GetCredentialPrerequisitesOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetCredentialPrerequisitesOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetCredentialPrerequisitesParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetCredentialPrerequisites_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredentialPrerequisites' +type MockEnvironmentClientService_GetCredentialPrerequisites_Call struct { + *mock.Call +} + +// GetCredentialPrerequisites is a helper method to define mock.On call +// - params *operations.GetCredentialPrerequisitesParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetCredentialPrerequisites(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetCredentialPrerequisites_Call { + return &MockEnvironmentClientService_GetCredentialPrerequisites_Call{Call: _e.mock.On("GetCredentialPrerequisites", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetCredentialPrerequisites_Call) Run(run func(params *operations.GetCredentialPrerequisitesParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetCredentialPrerequisites_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetCredentialPrerequisitesParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetCredentialPrerequisites_Call) Return(_a0 *operations.GetCredentialPrerequisitesOK, _a1 error) *MockEnvironmentClientService_GetCredentialPrerequisites_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetCredentialPrerequisites_Call) RunAndReturn(run func(*operations.GetCredentialPrerequisitesParams, ...operations.ClientOption) (*operations.GetCredentialPrerequisitesOK, error)) *MockEnvironmentClientService_GetCredentialPrerequisites_Call { + _c.Call.Return(run) + return _c +} + +// GetEnvironmentSetting provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetEnvironmentSetting(params *operations.GetEnvironmentSettingParams, opts ...operations.ClientOption) (*operations.GetEnvironmentSettingOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetEnvironmentSettingOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetEnvironmentSettingParams, ...operations.ClientOption) (*operations.GetEnvironmentSettingOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetEnvironmentSettingParams, ...operations.ClientOption) *operations.GetEnvironmentSettingOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetEnvironmentSettingOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetEnvironmentSettingParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetEnvironmentSetting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnvironmentSetting' +type MockEnvironmentClientService_GetEnvironmentSetting_Call struct { + *mock.Call +} + +// GetEnvironmentSetting is a helper method to define mock.On call +// - params *operations.GetEnvironmentSettingParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetEnvironmentSetting(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetEnvironmentSetting_Call { + return &MockEnvironmentClientService_GetEnvironmentSetting_Call{Call: _e.mock.On("GetEnvironmentSetting", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetEnvironmentSetting_Call) Run(run func(params *operations.GetEnvironmentSettingParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetEnvironmentSetting_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetEnvironmentSettingParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetEnvironmentSetting_Call) Return(_a0 *operations.GetEnvironmentSettingOK, _a1 error) *MockEnvironmentClientService_GetEnvironmentSetting_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetEnvironmentSetting_Call) RunAndReturn(run func(*operations.GetEnvironmentSettingParams, ...operations.ClientOption) (*operations.GetEnvironmentSettingOK, error)) *MockEnvironmentClientService_GetEnvironmentSetting_Call { + _c.Call.Return(run) + return _c +} + +// GetEnvironmentUserSyncState provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetEnvironmentUserSyncState(params *operations.GetEnvironmentUserSyncStateParams, opts ...operations.ClientOption) (*operations.GetEnvironmentUserSyncStateOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetEnvironmentUserSyncStateOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetEnvironmentUserSyncStateParams, ...operations.ClientOption) (*operations.GetEnvironmentUserSyncStateOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetEnvironmentUserSyncStateParams, ...operations.ClientOption) *operations.GetEnvironmentUserSyncStateOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetEnvironmentUserSyncStateOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetEnvironmentUserSyncStateParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetEnvironmentUserSyncState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEnvironmentUserSyncState' +type MockEnvironmentClientService_GetEnvironmentUserSyncState_Call struct { + *mock.Call +} + +// GetEnvironmentUserSyncState is a helper method to define mock.On call +// - params *operations.GetEnvironmentUserSyncStateParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetEnvironmentUserSyncState(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetEnvironmentUserSyncState_Call { + return &MockEnvironmentClientService_GetEnvironmentUserSyncState_Call{Call: _e.mock.On("GetEnvironmentUserSyncState", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetEnvironmentUserSyncState_Call) Run(run func(params *operations.GetEnvironmentUserSyncStateParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetEnvironmentUserSyncState_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetEnvironmentUserSyncStateParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetEnvironmentUserSyncState_Call) Return(_a0 *operations.GetEnvironmentUserSyncStateOK, _a1 error) *MockEnvironmentClientService_GetEnvironmentUserSyncState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetEnvironmentUserSyncState_Call) RunAndReturn(run func(*operations.GetEnvironmentUserSyncStateParams, ...operations.ClientOption) (*operations.GetEnvironmentUserSyncStateOK, error)) *MockEnvironmentClientService_GetEnvironmentUserSyncState_Call { + _c.Call.Return(run) + return _c +} + +// GetFreeipaLogDescriptors provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetFreeipaLogDescriptors(params *operations.GetFreeipaLogDescriptorsParams, opts ...operations.ClientOption) (*operations.GetFreeipaLogDescriptorsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetFreeipaLogDescriptorsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetFreeipaLogDescriptorsParams, ...operations.ClientOption) (*operations.GetFreeipaLogDescriptorsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetFreeipaLogDescriptorsParams, ...operations.ClientOption) *operations.GetFreeipaLogDescriptorsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetFreeipaLogDescriptorsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetFreeipaLogDescriptorsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetFreeipaLogDescriptors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFreeipaLogDescriptors' +type MockEnvironmentClientService_GetFreeipaLogDescriptors_Call struct { + *mock.Call +} + +// GetFreeipaLogDescriptors is a helper method to define mock.On call +// - params *operations.GetFreeipaLogDescriptorsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetFreeipaLogDescriptors(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetFreeipaLogDescriptors_Call { + return &MockEnvironmentClientService_GetFreeipaLogDescriptors_Call{Call: _e.mock.On("GetFreeipaLogDescriptors", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetFreeipaLogDescriptors_Call) Run(run func(params *operations.GetFreeipaLogDescriptorsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetFreeipaLogDescriptors_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetFreeipaLogDescriptorsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetFreeipaLogDescriptors_Call) Return(_a0 *operations.GetFreeipaLogDescriptorsOK, _a1 error) *MockEnvironmentClientService_GetFreeipaLogDescriptors_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetFreeipaLogDescriptors_Call) RunAndReturn(run func(*operations.GetFreeipaLogDescriptorsParams, ...operations.ClientOption) (*operations.GetFreeipaLogDescriptorsOK, error)) *MockEnvironmentClientService_GetFreeipaLogDescriptors_Call { + _c.Call.Return(run) + return _c +} + +// GetFreeipaStatus provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetFreeipaStatus(params *operations.GetFreeipaStatusParams, opts ...operations.ClientOption) (*operations.GetFreeipaStatusOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetFreeipaStatusOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetFreeipaStatusParams, ...operations.ClientOption) (*operations.GetFreeipaStatusOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetFreeipaStatusParams, ...operations.ClientOption) *operations.GetFreeipaStatusOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetFreeipaStatusOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetFreeipaStatusParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetFreeipaStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFreeipaStatus' +type MockEnvironmentClientService_GetFreeipaStatus_Call struct { + *mock.Call +} + +// GetFreeipaStatus is a helper method to define mock.On call +// - params *operations.GetFreeipaStatusParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetFreeipaStatus(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetFreeipaStatus_Call { + return &MockEnvironmentClientService_GetFreeipaStatus_Call{Call: _e.mock.On("GetFreeipaStatus", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetFreeipaStatus_Call) Run(run func(params *operations.GetFreeipaStatusParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetFreeipaStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetFreeipaStatusParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetFreeipaStatus_Call) Return(_a0 *operations.GetFreeipaStatusOK, _a1 error) *MockEnvironmentClientService_GetFreeipaStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetFreeipaStatus_Call) RunAndReturn(run func(*operations.GetFreeipaStatusParams, ...operations.ClientOption) (*operations.GetFreeipaStatusOK, error)) *MockEnvironmentClientService_GetFreeipaStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetIDBrokerMappings provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetIDBrokerMappings(params *operations.GetIDBrokerMappingsParams, opts ...operations.ClientOption) (*operations.GetIDBrokerMappingsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetIDBrokerMappingsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetIDBrokerMappingsParams, ...operations.ClientOption) (*operations.GetIDBrokerMappingsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetIDBrokerMappingsParams, ...operations.ClientOption) *operations.GetIDBrokerMappingsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetIDBrokerMappingsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetIDBrokerMappingsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetIDBrokerMappings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIDBrokerMappings' +type MockEnvironmentClientService_GetIDBrokerMappings_Call struct { + *mock.Call +} + +// GetIDBrokerMappings is a helper method to define mock.On call +// - params *operations.GetIDBrokerMappingsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetIDBrokerMappings(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetIDBrokerMappings_Call { + return &MockEnvironmentClientService_GetIDBrokerMappings_Call{Call: _e.mock.On("GetIDBrokerMappings", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetIDBrokerMappings_Call) Run(run func(params *operations.GetIDBrokerMappingsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetIDBrokerMappings_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetIDBrokerMappingsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetIDBrokerMappings_Call) Return(_a0 *operations.GetIDBrokerMappingsOK, _a1 error) *MockEnvironmentClientService_GetIDBrokerMappings_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetIDBrokerMappings_Call) RunAndReturn(run func(*operations.GetIDBrokerMappingsParams, ...operations.ClientOption) (*operations.GetIDBrokerMappingsOK, error)) *MockEnvironmentClientService_GetIDBrokerMappings_Call { + _c.Call.Return(run) + return _c +} + +// GetIDBrokerMappingsSyncStatus provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetIDBrokerMappingsSyncStatus(params *operations.GetIDBrokerMappingsSyncStatusParams, opts ...operations.ClientOption) (*operations.GetIDBrokerMappingsSyncStatusOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetIDBrokerMappingsSyncStatusOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetIDBrokerMappingsSyncStatusParams, ...operations.ClientOption) (*operations.GetIDBrokerMappingsSyncStatusOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetIDBrokerMappingsSyncStatusParams, ...operations.ClientOption) *operations.GetIDBrokerMappingsSyncStatusOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetIDBrokerMappingsSyncStatusOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetIDBrokerMappingsSyncStatusParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIDBrokerMappingsSyncStatus' +type MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call struct { + *mock.Call +} + +// GetIDBrokerMappingsSyncStatus is a helper method to define mock.On call +// - params *operations.GetIDBrokerMappingsSyncStatusParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetIDBrokerMappingsSyncStatus(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call { + return &MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call{Call: _e.mock.On("GetIDBrokerMappingsSyncStatus", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call) Run(run func(params *operations.GetIDBrokerMappingsSyncStatusParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetIDBrokerMappingsSyncStatusParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call) Return(_a0 *operations.GetIDBrokerMappingsSyncStatusOK, _a1 error) *MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call) RunAndReturn(run func(*operations.GetIDBrokerMappingsSyncStatusParams, ...operations.ClientOption) (*operations.GetIDBrokerMappingsSyncStatusOK, error)) *MockEnvironmentClientService_GetIDBrokerMappingsSyncStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetKeytab provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetKeytab(params *operations.GetKeytabParams, opts ...operations.ClientOption) (*operations.GetKeytabOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetKeytabOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetKeytabParams, ...operations.ClientOption) (*operations.GetKeytabOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetKeytabParams, ...operations.ClientOption) *operations.GetKeytabOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetKeytabOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetKeytabParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetKeytab_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeytab' +type MockEnvironmentClientService_GetKeytab_Call struct { + *mock.Call +} + +// GetKeytab is a helper method to define mock.On call +// - params *operations.GetKeytabParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetKeytab(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetKeytab_Call { + return &MockEnvironmentClientService_GetKeytab_Call{Call: _e.mock.On("GetKeytab", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetKeytab_Call) Run(run func(params *operations.GetKeytabParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetKeytab_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetKeytabParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetKeytab_Call) Return(_a0 *operations.GetKeytabOK, _a1 error) *MockEnvironmentClientService_GetKeytab_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetKeytab_Call) RunAndReturn(run func(*operations.GetKeytabParams, ...operations.ClientOption) (*operations.GetKeytabOK, error)) *MockEnvironmentClientService_GetKeytab_Call { + _c.Call.Return(run) + return _c +} + +// GetRepairFreeipaStatus provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetRepairFreeipaStatus(params *operations.GetRepairFreeipaStatusParams, opts ...operations.ClientOption) (*operations.GetRepairFreeipaStatusOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetRepairFreeipaStatusOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetRepairFreeipaStatusParams, ...operations.ClientOption) (*operations.GetRepairFreeipaStatusOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetRepairFreeipaStatusParams, ...operations.ClientOption) *operations.GetRepairFreeipaStatusOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetRepairFreeipaStatusOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetRepairFreeipaStatusParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetRepairFreeipaStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRepairFreeipaStatus' +type MockEnvironmentClientService_GetRepairFreeipaStatus_Call struct { + *mock.Call +} + +// GetRepairFreeipaStatus is a helper method to define mock.On call +// - params *operations.GetRepairFreeipaStatusParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetRepairFreeipaStatus(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetRepairFreeipaStatus_Call { + return &MockEnvironmentClientService_GetRepairFreeipaStatus_Call{Call: _e.mock.On("GetRepairFreeipaStatus", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetRepairFreeipaStatus_Call) Run(run func(params *operations.GetRepairFreeipaStatusParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetRepairFreeipaStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetRepairFreeipaStatusParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetRepairFreeipaStatus_Call) Return(_a0 *operations.GetRepairFreeipaStatusOK, _a1 error) *MockEnvironmentClientService_GetRepairFreeipaStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetRepairFreeipaStatus_Call) RunAndReturn(run func(*operations.GetRepairFreeipaStatusParams, ...operations.ClientOption) (*operations.GetRepairFreeipaStatusOK, error)) *MockEnvironmentClientService_GetRepairFreeipaStatus_Call { + _c.Call.Return(run) + return _c +} + +// GetRootCertificate provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) GetRootCertificate(params *operations.GetRootCertificateParams, opts ...operations.ClientOption) (*operations.GetRootCertificateOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.GetRootCertificateOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.GetRootCertificateParams, ...operations.ClientOption) (*operations.GetRootCertificateOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.GetRootCertificateParams, ...operations.ClientOption) *operations.GetRootCertificateOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.GetRootCertificateOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.GetRootCertificateParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_GetRootCertificate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRootCertificate' +type MockEnvironmentClientService_GetRootCertificate_Call struct { + *mock.Call +} + +// GetRootCertificate is a helper method to define mock.On call +// - params *operations.GetRootCertificateParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) GetRootCertificate(params interface{}, opts ...interface{}) *MockEnvironmentClientService_GetRootCertificate_Call { + return &MockEnvironmentClientService_GetRootCertificate_Call{Call: _e.mock.On("GetRootCertificate", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_GetRootCertificate_Call) Run(run func(params *operations.GetRootCertificateParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_GetRootCertificate_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.GetRootCertificateParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_GetRootCertificate_Call) Return(_a0 *operations.GetRootCertificateOK, _a1 error) *MockEnvironmentClientService_GetRootCertificate_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_GetRootCertificate_Call) RunAndReturn(run func(*operations.GetRootCertificateParams, ...operations.ClientOption) (*operations.GetRootCertificateOK, error)) *MockEnvironmentClientService_GetRootCertificate_Call { + _c.Call.Return(run) + return _c +} + +// ListAuditCredentials provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) ListAuditCredentials(params *operations.ListAuditCredentialsParams, opts ...operations.ClientOption) (*operations.ListAuditCredentialsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.ListAuditCredentialsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.ListAuditCredentialsParams, ...operations.ClientOption) (*operations.ListAuditCredentialsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.ListAuditCredentialsParams, ...operations.ClientOption) *operations.ListAuditCredentialsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.ListAuditCredentialsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.ListAuditCredentialsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_ListAuditCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAuditCredentials' +type MockEnvironmentClientService_ListAuditCredentials_Call struct { + *mock.Call +} + +// ListAuditCredentials is a helper method to define mock.On call +// - params *operations.ListAuditCredentialsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) ListAuditCredentials(params interface{}, opts ...interface{}) *MockEnvironmentClientService_ListAuditCredentials_Call { + return &MockEnvironmentClientService_ListAuditCredentials_Call{Call: _e.mock.On("ListAuditCredentials", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_ListAuditCredentials_Call) Run(run func(params *operations.ListAuditCredentialsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_ListAuditCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.ListAuditCredentialsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_ListAuditCredentials_Call) Return(_a0 *operations.ListAuditCredentialsOK, _a1 error) *MockEnvironmentClientService_ListAuditCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_ListAuditCredentials_Call) RunAndReturn(run func(*operations.ListAuditCredentialsParams, ...operations.ClientOption) (*operations.ListAuditCredentialsOK, error)) *MockEnvironmentClientService_ListAuditCredentials_Call { + _c.Call.Return(run) + return _c +} + +// ListCredentials provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) ListCredentials(params *operations.ListCredentialsParams, opts ...operations.ClientOption) (*operations.ListCredentialsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.ListCredentialsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.ListCredentialsParams, ...operations.ClientOption) (*operations.ListCredentialsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.ListCredentialsParams, ...operations.ClientOption) *operations.ListCredentialsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.ListCredentialsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.ListCredentialsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_ListCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredentials' +type MockEnvironmentClientService_ListCredentials_Call struct { + *mock.Call +} + +// ListCredentials is a helper method to define mock.On call +// - params *operations.ListCredentialsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) ListCredentials(params interface{}, opts ...interface{}) *MockEnvironmentClientService_ListCredentials_Call { + return &MockEnvironmentClientService_ListCredentials_Call{Call: _e.mock.On("ListCredentials", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_ListCredentials_Call) Run(run func(params *operations.ListCredentialsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_ListCredentials_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.ListCredentialsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_ListCredentials_Call) Return(_a0 *operations.ListCredentialsOK, _a1 error) *MockEnvironmentClientService_ListCredentials_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_ListCredentials_Call) RunAndReturn(run func(*operations.ListCredentialsParams, ...operations.ClientOption) (*operations.ListCredentialsOK, error)) *MockEnvironmentClientService_ListCredentials_Call { + _c.Call.Return(run) + return _c +} + +// ListEnvironments provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) ListEnvironments(params *operations.ListEnvironmentsParams, opts ...operations.ClientOption) (*operations.ListEnvironmentsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.ListEnvironmentsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.ListEnvironmentsParams, ...operations.ClientOption) (*operations.ListEnvironmentsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.ListEnvironmentsParams, ...operations.ClientOption) *operations.ListEnvironmentsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.ListEnvironmentsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.ListEnvironmentsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_ListEnvironments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEnvironments' +type MockEnvironmentClientService_ListEnvironments_Call struct { + *mock.Call +} + +// ListEnvironments is a helper method to define mock.On call +// - params *operations.ListEnvironmentsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) ListEnvironments(params interface{}, opts ...interface{}) *MockEnvironmentClientService_ListEnvironments_Call { + return &MockEnvironmentClientService_ListEnvironments_Call{Call: _e.mock.On("ListEnvironments", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_ListEnvironments_Call) Run(run func(params *operations.ListEnvironmentsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_ListEnvironments_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.ListEnvironmentsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_ListEnvironments_Call) Return(_a0 *operations.ListEnvironmentsOK, _a1 error) *MockEnvironmentClientService_ListEnvironments_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_ListEnvironments_Call) RunAndReturn(run func(*operations.ListEnvironmentsParams, ...operations.ClientOption) (*operations.ListEnvironmentsOK, error)) *MockEnvironmentClientService_ListEnvironments_Call { + _c.Call.Return(run) + return _c +} + +// ListFreeipaDiagnostics provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) ListFreeipaDiagnostics(params *operations.ListFreeipaDiagnosticsParams, opts ...operations.ClientOption) (*operations.ListFreeipaDiagnosticsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.ListFreeipaDiagnosticsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.ListFreeipaDiagnosticsParams, ...operations.ClientOption) (*operations.ListFreeipaDiagnosticsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.ListFreeipaDiagnosticsParams, ...operations.ClientOption) *operations.ListFreeipaDiagnosticsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.ListFreeipaDiagnosticsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.ListFreeipaDiagnosticsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_ListFreeipaDiagnostics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListFreeipaDiagnostics' +type MockEnvironmentClientService_ListFreeipaDiagnostics_Call struct { + *mock.Call +} + +// ListFreeipaDiagnostics is a helper method to define mock.On call +// - params *operations.ListFreeipaDiagnosticsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) ListFreeipaDiagnostics(params interface{}, opts ...interface{}) *MockEnvironmentClientService_ListFreeipaDiagnostics_Call { + return &MockEnvironmentClientService_ListFreeipaDiagnostics_Call{Call: _e.mock.On("ListFreeipaDiagnostics", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_ListFreeipaDiagnostics_Call) Run(run func(params *operations.ListFreeipaDiagnosticsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_ListFreeipaDiagnostics_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.ListFreeipaDiagnosticsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_ListFreeipaDiagnostics_Call) Return(_a0 *operations.ListFreeipaDiagnosticsOK, _a1 error) *MockEnvironmentClientService_ListFreeipaDiagnostics_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_ListFreeipaDiagnostics_Call) RunAndReturn(run func(*operations.ListFreeipaDiagnosticsParams, ...operations.ClientOption) (*operations.ListFreeipaDiagnosticsOK, error)) *MockEnvironmentClientService_ListFreeipaDiagnostics_Call { + _c.Call.Return(run) + return _c +} + +// ListProxyConfigs provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) ListProxyConfigs(params *operations.ListProxyConfigsParams, opts ...operations.ClientOption) (*operations.ListProxyConfigsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.ListProxyConfigsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.ListProxyConfigsParams, ...operations.ClientOption) (*operations.ListProxyConfigsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.ListProxyConfigsParams, ...operations.ClientOption) *operations.ListProxyConfigsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.ListProxyConfigsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.ListProxyConfigsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_ListProxyConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListProxyConfigs' +type MockEnvironmentClientService_ListProxyConfigs_Call struct { + *mock.Call +} + +// ListProxyConfigs is a helper method to define mock.On call +// - params *operations.ListProxyConfigsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) ListProxyConfigs(params interface{}, opts ...interface{}) *MockEnvironmentClientService_ListProxyConfigs_Call { + return &MockEnvironmentClientService_ListProxyConfigs_Call{Call: _e.mock.On("ListProxyConfigs", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_ListProxyConfigs_Call) Run(run func(params *operations.ListProxyConfigsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_ListProxyConfigs_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.ListProxyConfigsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_ListProxyConfigs_Call) Return(_a0 *operations.ListProxyConfigsOK, _a1 error) *MockEnvironmentClientService_ListProxyConfigs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_ListProxyConfigs_Call) RunAndReturn(run func(*operations.ListProxyConfigsParams, ...operations.ClientOption) (*operations.ListProxyConfigsOK, error)) *MockEnvironmentClientService_ListProxyConfigs_Call { + _c.Call.Return(run) + return _c +} + +// RepairFreeipa provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) RepairFreeipa(params *operations.RepairFreeipaParams, opts ...operations.ClientOption) (*operations.RepairFreeipaOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.RepairFreeipaOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.RepairFreeipaParams, ...operations.ClientOption) (*operations.RepairFreeipaOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.RepairFreeipaParams, ...operations.ClientOption) *operations.RepairFreeipaOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.RepairFreeipaOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.RepairFreeipaParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_RepairFreeipa_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepairFreeipa' +type MockEnvironmentClientService_RepairFreeipa_Call struct { + *mock.Call +} + +// RepairFreeipa is a helper method to define mock.On call +// - params *operations.RepairFreeipaParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) RepairFreeipa(params interface{}, opts ...interface{}) *MockEnvironmentClientService_RepairFreeipa_Call { + return &MockEnvironmentClientService_RepairFreeipa_Call{Call: _e.mock.On("RepairFreeipa", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_RepairFreeipa_Call) Run(run func(params *operations.RepairFreeipaParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_RepairFreeipa_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.RepairFreeipaParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_RepairFreeipa_Call) Return(_a0 *operations.RepairFreeipaOK, _a1 error) *MockEnvironmentClientService_RepairFreeipa_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_RepairFreeipa_Call) RunAndReturn(run func(*operations.RepairFreeipaParams, ...operations.ClientOption) (*operations.RepairFreeipaOK, error)) *MockEnvironmentClientService_RepairFreeipa_Call { + _c.Call.Return(run) + return _c +} + +// RetryFreeipa provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) RetryFreeipa(params *operations.RetryFreeipaParams, opts ...operations.ClientOption) (*operations.RetryFreeipaOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.RetryFreeipaOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.RetryFreeipaParams, ...operations.ClientOption) (*operations.RetryFreeipaOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.RetryFreeipaParams, ...operations.ClientOption) *operations.RetryFreeipaOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.RetryFreeipaOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.RetryFreeipaParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_RetryFreeipa_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetryFreeipa' +type MockEnvironmentClientService_RetryFreeipa_Call struct { + *mock.Call +} + +// RetryFreeipa is a helper method to define mock.On call +// - params *operations.RetryFreeipaParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) RetryFreeipa(params interface{}, opts ...interface{}) *MockEnvironmentClientService_RetryFreeipa_Call { + return &MockEnvironmentClientService_RetryFreeipa_Call{Call: _e.mock.On("RetryFreeipa", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_RetryFreeipa_Call) Run(run func(params *operations.RetryFreeipaParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_RetryFreeipa_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.RetryFreeipaParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_RetryFreeipa_Call) Return(_a0 *operations.RetryFreeipaOK, _a1 error) *MockEnvironmentClientService_RetryFreeipa_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_RetryFreeipa_Call) RunAndReturn(run func(*operations.RetryFreeipaParams, ...operations.ClientOption) (*operations.RetryFreeipaOK, error)) *MockEnvironmentClientService_RetryFreeipa_Call { + _c.Call.Return(run) + return _c +} + +// RotateSaltPassword provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) RotateSaltPassword(params *operations.RotateSaltPasswordParams, opts ...operations.ClientOption) (*operations.RotateSaltPasswordOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.RotateSaltPasswordOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.RotateSaltPasswordParams, ...operations.ClientOption) (*operations.RotateSaltPasswordOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.RotateSaltPasswordParams, ...operations.ClientOption) *operations.RotateSaltPasswordOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.RotateSaltPasswordOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.RotateSaltPasswordParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_RotateSaltPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RotateSaltPassword' +type MockEnvironmentClientService_RotateSaltPassword_Call struct { + *mock.Call +} + +// RotateSaltPassword is a helper method to define mock.On call +// - params *operations.RotateSaltPasswordParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) RotateSaltPassword(params interface{}, opts ...interface{}) *MockEnvironmentClientService_RotateSaltPassword_Call { + return &MockEnvironmentClientService_RotateSaltPassword_Call{Call: _e.mock.On("RotateSaltPassword", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_RotateSaltPassword_Call) Run(run func(params *operations.RotateSaltPasswordParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_RotateSaltPassword_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.RotateSaltPasswordParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_RotateSaltPassword_Call) Return(_a0 *operations.RotateSaltPasswordOK, _a1 error) *MockEnvironmentClientService_RotateSaltPassword_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_RotateSaltPassword_Call) RunAndReturn(run func(*operations.RotateSaltPasswordParams, ...operations.ClientOption) (*operations.RotateSaltPasswordOK, error)) *MockEnvironmentClientService_RotateSaltPassword_Call { + _c.Call.Return(run) + return _c +} + +// SetAWSAuditCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetAWSAuditCredential(params *operations.SetAWSAuditCredentialParams, opts ...operations.ClientOption) (*operations.SetAWSAuditCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetAWSAuditCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetAWSAuditCredentialParams, ...operations.ClientOption) (*operations.SetAWSAuditCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetAWSAuditCredentialParams, ...operations.ClientOption) *operations.SetAWSAuditCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetAWSAuditCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetAWSAuditCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetAWSAuditCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAWSAuditCredential' +type MockEnvironmentClientService_SetAWSAuditCredential_Call struct { + *mock.Call +} + +// SetAWSAuditCredential is a helper method to define mock.On call +// - params *operations.SetAWSAuditCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetAWSAuditCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetAWSAuditCredential_Call { + return &MockEnvironmentClientService_SetAWSAuditCredential_Call{Call: _e.mock.On("SetAWSAuditCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetAWSAuditCredential_Call) Run(run func(params *operations.SetAWSAuditCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetAWSAuditCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetAWSAuditCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetAWSAuditCredential_Call) Return(_a0 *operations.SetAWSAuditCredentialOK, _a1 error) *MockEnvironmentClientService_SetAWSAuditCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetAWSAuditCredential_Call) RunAndReturn(run func(*operations.SetAWSAuditCredentialParams, ...operations.ClientOption) (*operations.SetAWSAuditCredentialOK, error)) *MockEnvironmentClientService_SetAWSAuditCredential_Call { + _c.Call.Return(run) + return _c +} + +// SetAccountTelemetry provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetAccountTelemetry(params *operations.SetAccountTelemetryParams, opts ...operations.ClientOption) (*operations.SetAccountTelemetryOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetAccountTelemetryOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetAccountTelemetryParams, ...operations.ClientOption) (*operations.SetAccountTelemetryOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetAccountTelemetryParams, ...operations.ClientOption) *operations.SetAccountTelemetryOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetAccountTelemetryOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetAccountTelemetryParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetAccountTelemetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAccountTelemetry' +type MockEnvironmentClientService_SetAccountTelemetry_Call struct { + *mock.Call +} + +// SetAccountTelemetry is a helper method to define mock.On call +// - params *operations.SetAccountTelemetryParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetAccountTelemetry(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetAccountTelemetry_Call { + return &MockEnvironmentClientService_SetAccountTelemetry_Call{Call: _e.mock.On("SetAccountTelemetry", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetAccountTelemetry_Call) Run(run func(params *operations.SetAccountTelemetryParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetAccountTelemetry_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetAccountTelemetryParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetAccountTelemetry_Call) Return(_a0 *operations.SetAccountTelemetryOK, _a1 error) *MockEnvironmentClientService_SetAccountTelemetry_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetAccountTelemetry_Call) RunAndReturn(run func(*operations.SetAccountTelemetryParams, ...operations.ClientOption) (*operations.SetAccountTelemetryOK, error)) *MockEnvironmentClientService_SetAccountTelemetry_Call { + _c.Call.Return(run) + return _c +} + +// SetAzureAuditCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetAzureAuditCredential(params *operations.SetAzureAuditCredentialParams, opts ...operations.ClientOption) (*operations.SetAzureAuditCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetAzureAuditCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetAzureAuditCredentialParams, ...operations.ClientOption) (*operations.SetAzureAuditCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetAzureAuditCredentialParams, ...operations.ClientOption) *operations.SetAzureAuditCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetAzureAuditCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetAzureAuditCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetAzureAuditCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAzureAuditCredential' +type MockEnvironmentClientService_SetAzureAuditCredential_Call struct { + *mock.Call +} + +// SetAzureAuditCredential is a helper method to define mock.On call +// - params *operations.SetAzureAuditCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetAzureAuditCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetAzureAuditCredential_Call { + return &MockEnvironmentClientService_SetAzureAuditCredential_Call{Call: _e.mock.On("SetAzureAuditCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetAzureAuditCredential_Call) Run(run func(params *operations.SetAzureAuditCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetAzureAuditCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetAzureAuditCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetAzureAuditCredential_Call) Return(_a0 *operations.SetAzureAuditCredentialOK, _a1 error) *MockEnvironmentClientService_SetAzureAuditCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetAzureAuditCredential_Call) RunAndReturn(run func(*operations.SetAzureAuditCredentialParams, ...operations.ClientOption) (*operations.SetAzureAuditCredentialOK, error)) *MockEnvironmentClientService_SetAzureAuditCredential_Call { + _c.Call.Return(run) + return _c +} + +// SetCatalog provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetCatalog(params *operations.SetCatalogParams, opts ...operations.ClientOption) (*operations.SetCatalogOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetCatalogOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetCatalogParams, ...operations.ClientOption) (*operations.SetCatalogOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetCatalogParams, ...operations.ClientOption) *operations.SetCatalogOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetCatalogOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetCatalogParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetCatalog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCatalog' +type MockEnvironmentClientService_SetCatalog_Call struct { + *mock.Call +} + +// SetCatalog is a helper method to define mock.On call +// - params *operations.SetCatalogParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetCatalog(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetCatalog_Call { + return &MockEnvironmentClientService_SetCatalog_Call{Call: _e.mock.On("SetCatalog", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetCatalog_Call) Run(run func(params *operations.SetCatalogParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetCatalog_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetCatalogParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetCatalog_Call) Return(_a0 *operations.SetCatalogOK, _a1 error) *MockEnvironmentClientService_SetCatalog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetCatalog_Call) RunAndReturn(run func(*operations.SetCatalogParams, ...operations.ClientOption) (*operations.SetCatalogOK, error)) *MockEnvironmentClientService_SetCatalog_Call { + _c.Call.Return(run) + return _c +} + +// SetEndpointAccessGateway provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetEndpointAccessGateway(params *operations.SetEndpointAccessGatewayParams, opts ...operations.ClientOption) (*operations.SetEndpointAccessGatewayOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetEndpointAccessGatewayOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetEndpointAccessGatewayParams, ...operations.ClientOption) (*operations.SetEndpointAccessGatewayOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetEndpointAccessGatewayParams, ...operations.ClientOption) *operations.SetEndpointAccessGatewayOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetEndpointAccessGatewayOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetEndpointAccessGatewayParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetEndpointAccessGateway_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEndpointAccessGateway' +type MockEnvironmentClientService_SetEndpointAccessGateway_Call struct { + *mock.Call +} + +// SetEndpointAccessGateway is a helper method to define mock.On call +// - params *operations.SetEndpointAccessGatewayParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetEndpointAccessGateway(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetEndpointAccessGateway_Call { + return &MockEnvironmentClientService_SetEndpointAccessGateway_Call{Call: _e.mock.On("SetEndpointAccessGateway", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetEndpointAccessGateway_Call) Run(run func(params *operations.SetEndpointAccessGatewayParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetEndpointAccessGateway_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetEndpointAccessGatewayParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetEndpointAccessGateway_Call) Return(_a0 *operations.SetEndpointAccessGatewayOK, _a1 error) *MockEnvironmentClientService_SetEndpointAccessGateway_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetEndpointAccessGateway_Call) RunAndReturn(run func(*operations.SetEndpointAccessGatewayParams, ...operations.ClientOption) (*operations.SetEndpointAccessGatewayOK, error)) *MockEnvironmentClientService_SetEndpointAccessGateway_Call { + _c.Call.Return(run) + return _c +} + +// SetEnvironmentSetting provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetEnvironmentSetting(params *operations.SetEnvironmentSettingParams, opts ...operations.ClientOption) (*operations.SetEnvironmentSettingOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetEnvironmentSettingOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetEnvironmentSettingParams, ...operations.ClientOption) (*operations.SetEnvironmentSettingOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetEnvironmentSettingParams, ...operations.ClientOption) *operations.SetEnvironmentSettingOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetEnvironmentSettingOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetEnvironmentSettingParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetEnvironmentSetting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetEnvironmentSetting' +type MockEnvironmentClientService_SetEnvironmentSetting_Call struct { + *mock.Call +} + +// SetEnvironmentSetting is a helper method to define mock.On call +// - params *operations.SetEnvironmentSettingParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetEnvironmentSetting(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetEnvironmentSetting_Call { + return &MockEnvironmentClientService_SetEnvironmentSetting_Call{Call: _e.mock.On("SetEnvironmentSetting", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetEnvironmentSetting_Call) Run(run func(params *operations.SetEnvironmentSettingParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetEnvironmentSetting_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetEnvironmentSettingParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetEnvironmentSetting_Call) Return(_a0 *operations.SetEnvironmentSettingOK, _a1 error) *MockEnvironmentClientService_SetEnvironmentSetting_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetEnvironmentSetting_Call) RunAndReturn(run func(*operations.SetEnvironmentSettingParams, ...operations.ClientOption) (*operations.SetEnvironmentSettingOK, error)) *MockEnvironmentClientService_SetEnvironmentSetting_Call { + _c.Call.Return(run) + return _c +} + +// SetIDBrokerMappings provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetIDBrokerMappings(params *operations.SetIDBrokerMappingsParams, opts ...operations.ClientOption) (*operations.SetIDBrokerMappingsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetIDBrokerMappingsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetIDBrokerMappingsParams, ...operations.ClientOption) (*operations.SetIDBrokerMappingsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetIDBrokerMappingsParams, ...operations.ClientOption) *operations.SetIDBrokerMappingsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetIDBrokerMappingsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetIDBrokerMappingsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetIDBrokerMappings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetIDBrokerMappings' +type MockEnvironmentClientService_SetIDBrokerMappings_Call struct { + *mock.Call +} + +// SetIDBrokerMappings is a helper method to define mock.On call +// - params *operations.SetIDBrokerMappingsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetIDBrokerMappings(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetIDBrokerMappings_Call { + return &MockEnvironmentClientService_SetIDBrokerMappings_Call{Call: _e.mock.On("SetIDBrokerMappings", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetIDBrokerMappings_Call) Run(run func(params *operations.SetIDBrokerMappingsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetIDBrokerMappings_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetIDBrokerMappingsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetIDBrokerMappings_Call) Return(_a0 *operations.SetIDBrokerMappingsOK, _a1 error) *MockEnvironmentClientService_SetIDBrokerMappings_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetIDBrokerMappings_Call) RunAndReturn(run func(*operations.SetIDBrokerMappingsParams, ...operations.ClientOption) (*operations.SetIDBrokerMappingsOK, error)) *MockEnvironmentClientService_SetIDBrokerMappings_Call { + _c.Call.Return(run) + return _c +} + +// SetPassword provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetPassword(params *operations.SetPasswordParams, opts ...operations.ClientOption) (*operations.SetPasswordOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetPasswordOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetPasswordParams, ...operations.ClientOption) (*operations.SetPasswordOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetPasswordParams, ...operations.ClientOption) *operations.SetPasswordOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetPasswordOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetPasswordParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPassword' +type MockEnvironmentClientService_SetPassword_Call struct { + *mock.Call +} + +// SetPassword is a helper method to define mock.On call +// - params *operations.SetPasswordParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetPassword(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetPassword_Call { + return &MockEnvironmentClientService_SetPassword_Call{Call: _e.mock.On("SetPassword", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetPassword_Call) Run(run func(params *operations.SetPasswordParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetPassword_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetPasswordParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetPassword_Call) Return(_a0 *operations.SetPasswordOK, _a1 error) *MockEnvironmentClientService_SetPassword_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetPassword_Call) RunAndReturn(run func(*operations.SetPasswordParams, ...operations.ClientOption) (*operations.SetPasswordOK, error)) *MockEnvironmentClientService_SetPassword_Call { + _c.Call.Return(run) + return _c +} + +// SetTelemetryFeatures provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SetTelemetryFeatures(params *operations.SetTelemetryFeaturesParams, opts ...operations.ClientOption) (*operations.SetTelemetryFeaturesOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SetTelemetryFeaturesOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SetTelemetryFeaturesParams, ...operations.ClientOption) (*operations.SetTelemetryFeaturesOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SetTelemetryFeaturesParams, ...operations.ClientOption) *operations.SetTelemetryFeaturesOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SetTelemetryFeaturesOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SetTelemetryFeaturesParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SetTelemetryFeatures_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTelemetryFeatures' +type MockEnvironmentClientService_SetTelemetryFeatures_Call struct { + *mock.Call +} + +// SetTelemetryFeatures is a helper method to define mock.On call +// - params *operations.SetTelemetryFeaturesParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SetTelemetryFeatures(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SetTelemetryFeatures_Call { + return &MockEnvironmentClientService_SetTelemetryFeatures_Call{Call: _e.mock.On("SetTelemetryFeatures", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SetTelemetryFeatures_Call) Run(run func(params *operations.SetTelemetryFeaturesParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SetTelemetryFeatures_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SetTelemetryFeaturesParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetTelemetryFeatures_Call) Return(_a0 *operations.SetTelemetryFeaturesOK, _a1 error) *MockEnvironmentClientService_SetTelemetryFeatures_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SetTelemetryFeatures_Call) RunAndReturn(run func(*operations.SetTelemetryFeaturesParams, ...operations.ClientOption) (*operations.SetTelemetryFeaturesOK, error)) *MockEnvironmentClientService_SetTelemetryFeatures_Call { + _c.Call.Return(run) + return _c +} + +// SetTransport provides a mock function with given fields: transport +func (_m *MockEnvironmentClientService) SetTransport(transport runtime.ClientTransport) { + _m.Called(transport) +} + +// MockEnvironmentClientService_SetTransport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTransport' +type MockEnvironmentClientService_SetTransport_Call struct { + *mock.Call +} + +// SetTransport is a helper method to define mock.On call +// - transport runtime.ClientTransport +func (_e *MockEnvironmentClientService_Expecter) SetTransport(transport interface{}) *MockEnvironmentClientService_SetTransport_Call { + return &MockEnvironmentClientService_SetTransport_Call{Call: _e.mock.On("SetTransport", transport)} +} + +func (_c *MockEnvironmentClientService_SetTransport_Call) Run(run func(transport runtime.ClientTransport)) *MockEnvironmentClientService_SetTransport_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(runtime.ClientTransport)) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SetTransport_Call) Return() *MockEnvironmentClientService_SetTransport_Call { + _c.Call.Return() + return _c +} + +func (_c *MockEnvironmentClientService_SetTransport_Call) RunAndReturn(run func(runtime.ClientTransport)) *MockEnvironmentClientService_SetTransport_Call { + _c.Call.Return(run) + return _c +} + +// StartEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) StartEnvironment(params *operations.StartEnvironmentParams, opts ...operations.ClientOption) (*operations.StartEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.StartEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.StartEnvironmentParams, ...operations.ClientOption) (*operations.StartEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.StartEnvironmentParams, ...operations.ClientOption) *operations.StartEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.StartEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.StartEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_StartEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartEnvironment' +type MockEnvironmentClientService_StartEnvironment_Call struct { + *mock.Call +} + +// StartEnvironment is a helper method to define mock.On call +// - params *operations.StartEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) StartEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_StartEnvironment_Call { + return &MockEnvironmentClientService_StartEnvironment_Call{Call: _e.mock.On("StartEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_StartEnvironment_Call) Run(run func(params *operations.StartEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_StartEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.StartEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_StartEnvironment_Call) Return(_a0 *operations.StartEnvironmentOK, _a1 error) *MockEnvironmentClientService_StartEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_StartEnvironment_Call) RunAndReturn(run func(*operations.StartEnvironmentParams, ...operations.ClientOption) (*operations.StartEnvironmentOK, error)) *MockEnvironmentClientService_StartEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// StartFreeIpaVerticalScaling provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) StartFreeIpaVerticalScaling(params *operations.StartFreeIpaVerticalScalingParams, opts ...operations.ClientOption) (*operations.StartFreeIpaVerticalScalingOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.StartFreeIpaVerticalScalingOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.StartFreeIpaVerticalScalingParams, ...operations.ClientOption) (*operations.StartFreeIpaVerticalScalingOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.StartFreeIpaVerticalScalingParams, ...operations.ClientOption) *operations.StartFreeIpaVerticalScalingOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.StartFreeIpaVerticalScalingOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.StartFreeIpaVerticalScalingParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartFreeIpaVerticalScaling' +type MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call struct { + *mock.Call +} + +// StartFreeIpaVerticalScaling is a helper method to define mock.On call +// - params *operations.StartFreeIpaVerticalScalingParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) StartFreeIpaVerticalScaling(params interface{}, opts ...interface{}) *MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call { + return &MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call{Call: _e.mock.On("StartFreeIpaVerticalScaling", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call) Run(run func(params *operations.StartFreeIpaVerticalScalingParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.StartFreeIpaVerticalScalingParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call) Return(_a0 *operations.StartFreeIpaVerticalScalingOK, _a1 error) *MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call) RunAndReturn(run func(*operations.StartFreeIpaVerticalScalingParams, ...operations.ClientOption) (*operations.StartFreeIpaVerticalScalingOK, error)) *MockEnvironmentClientService_StartFreeIpaVerticalScaling_Call { + _c.Call.Return(run) + return _c +} + +// StopEnvironment provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) StopEnvironment(params *operations.StopEnvironmentParams, opts ...operations.ClientOption) (*operations.StopEnvironmentOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.StopEnvironmentOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.StopEnvironmentParams, ...operations.ClientOption) (*operations.StopEnvironmentOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.StopEnvironmentParams, ...operations.ClientOption) *operations.StopEnvironmentOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.StopEnvironmentOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.StopEnvironmentParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_StopEnvironment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopEnvironment' +type MockEnvironmentClientService_StopEnvironment_Call struct { + *mock.Call +} + +// StopEnvironment is a helper method to define mock.On call +// - params *operations.StopEnvironmentParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) StopEnvironment(params interface{}, opts ...interface{}) *MockEnvironmentClientService_StopEnvironment_Call { + return &MockEnvironmentClientService_StopEnvironment_Call{Call: _e.mock.On("StopEnvironment", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_StopEnvironment_Call) Run(run func(params *operations.StopEnvironmentParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_StopEnvironment_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.StopEnvironmentParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_StopEnvironment_Call) Return(_a0 *operations.StopEnvironmentOK, _a1 error) *MockEnvironmentClientService_StopEnvironment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_StopEnvironment_Call) RunAndReturn(run func(*operations.StopEnvironmentParams, ...operations.ClientOption) (*operations.StopEnvironmentOK, error)) *MockEnvironmentClientService_StopEnvironment_Call { + _c.Call.Return(run) + return _c +} + +// SyncAllUsers provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SyncAllUsers(params *operations.SyncAllUsersParams, opts ...operations.ClientOption) (*operations.SyncAllUsersOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SyncAllUsersOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SyncAllUsersParams, ...operations.ClientOption) (*operations.SyncAllUsersOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SyncAllUsersParams, ...operations.ClientOption) *operations.SyncAllUsersOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SyncAllUsersOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SyncAllUsersParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SyncAllUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncAllUsers' +type MockEnvironmentClientService_SyncAllUsers_Call struct { + *mock.Call +} + +// SyncAllUsers is a helper method to define mock.On call +// - params *operations.SyncAllUsersParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SyncAllUsers(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SyncAllUsers_Call { + return &MockEnvironmentClientService_SyncAllUsers_Call{Call: _e.mock.On("SyncAllUsers", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SyncAllUsers_Call) Run(run func(params *operations.SyncAllUsersParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SyncAllUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SyncAllUsersParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SyncAllUsers_Call) Return(_a0 *operations.SyncAllUsersOK, _a1 error) *MockEnvironmentClientService_SyncAllUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SyncAllUsers_Call) RunAndReturn(run func(*operations.SyncAllUsersParams, ...operations.ClientOption) (*operations.SyncAllUsersOK, error)) *MockEnvironmentClientService_SyncAllUsers_Call { + _c.Call.Return(run) + return _c +} + +// SyncIDBrokerMappings provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SyncIDBrokerMappings(params *operations.SyncIDBrokerMappingsParams, opts ...operations.ClientOption) (*operations.SyncIDBrokerMappingsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SyncIDBrokerMappingsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SyncIDBrokerMappingsParams, ...operations.ClientOption) (*operations.SyncIDBrokerMappingsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SyncIDBrokerMappingsParams, ...operations.ClientOption) *operations.SyncIDBrokerMappingsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SyncIDBrokerMappingsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SyncIDBrokerMappingsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SyncIDBrokerMappings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncIDBrokerMappings' +type MockEnvironmentClientService_SyncIDBrokerMappings_Call struct { + *mock.Call +} + +// SyncIDBrokerMappings is a helper method to define mock.On call +// - params *operations.SyncIDBrokerMappingsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SyncIDBrokerMappings(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SyncIDBrokerMappings_Call { + return &MockEnvironmentClientService_SyncIDBrokerMappings_Call{Call: _e.mock.On("SyncIDBrokerMappings", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SyncIDBrokerMappings_Call) Run(run func(params *operations.SyncIDBrokerMappingsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SyncIDBrokerMappings_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SyncIDBrokerMappingsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SyncIDBrokerMappings_Call) Return(_a0 *operations.SyncIDBrokerMappingsOK, _a1 error) *MockEnvironmentClientService_SyncIDBrokerMappings_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SyncIDBrokerMappings_Call) RunAndReturn(run func(*operations.SyncIDBrokerMappingsParams, ...operations.ClientOption) (*operations.SyncIDBrokerMappingsOK, error)) *MockEnvironmentClientService_SyncIDBrokerMappings_Call { + _c.Call.Return(run) + return _c +} + +// SyncStatus provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SyncStatus(params *operations.SyncStatusParams, opts ...operations.ClientOption) (*operations.SyncStatusOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SyncStatusOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SyncStatusParams, ...operations.ClientOption) (*operations.SyncStatusOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SyncStatusParams, ...operations.ClientOption) *operations.SyncStatusOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SyncStatusOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SyncStatusParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SyncStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncStatus' +type MockEnvironmentClientService_SyncStatus_Call struct { + *mock.Call +} + +// SyncStatus is a helper method to define mock.On call +// - params *operations.SyncStatusParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SyncStatus(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SyncStatus_Call { + return &MockEnvironmentClientService_SyncStatus_Call{Call: _e.mock.On("SyncStatus", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SyncStatus_Call) Run(run func(params *operations.SyncStatusParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SyncStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SyncStatusParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SyncStatus_Call) Return(_a0 *operations.SyncStatusOK, _a1 error) *MockEnvironmentClientService_SyncStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SyncStatus_Call) RunAndReturn(run func(*operations.SyncStatusParams, ...operations.ClientOption) (*operations.SyncStatusOK, error)) *MockEnvironmentClientService_SyncStatus_Call { + _c.Call.Return(run) + return _c +} + +// SyncUser provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SyncUser(params *operations.SyncUserParams, opts ...operations.ClientOption) (*operations.SyncUserOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SyncUserOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SyncUserParams, ...operations.ClientOption) (*operations.SyncUserOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SyncUserParams, ...operations.ClientOption) *operations.SyncUserOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SyncUserOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SyncUserParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SyncUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncUser' +type MockEnvironmentClientService_SyncUser_Call struct { + *mock.Call +} + +// SyncUser is a helper method to define mock.On call +// - params *operations.SyncUserParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SyncUser(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SyncUser_Call { + return &MockEnvironmentClientService_SyncUser_Call{Call: _e.mock.On("SyncUser", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SyncUser_Call) Run(run func(params *operations.SyncUserParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SyncUser_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SyncUserParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SyncUser_Call) Return(_a0 *operations.SyncUserOK, _a1 error) *MockEnvironmentClientService_SyncUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SyncUser_Call) RunAndReturn(run func(*operations.SyncUserParams, ...operations.ClientOption) (*operations.SyncUserOK, error)) *MockEnvironmentClientService_SyncUser_Call { + _c.Call.Return(run) + return _c +} + +// SynchronizeAllEnvironments provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) SynchronizeAllEnvironments(params *operations.SynchronizeAllEnvironmentsParams, opts ...operations.ClientOption) (*operations.SynchronizeAllEnvironmentsOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.SynchronizeAllEnvironmentsOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.SynchronizeAllEnvironmentsParams, ...operations.ClientOption) (*operations.SynchronizeAllEnvironmentsOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.SynchronizeAllEnvironmentsParams, ...operations.ClientOption) *operations.SynchronizeAllEnvironmentsOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.SynchronizeAllEnvironmentsOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.SynchronizeAllEnvironmentsParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_SynchronizeAllEnvironments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SynchronizeAllEnvironments' +type MockEnvironmentClientService_SynchronizeAllEnvironments_Call struct { + *mock.Call +} + +// SynchronizeAllEnvironments is a helper method to define mock.On call +// - params *operations.SynchronizeAllEnvironmentsParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) SynchronizeAllEnvironments(params interface{}, opts ...interface{}) *MockEnvironmentClientService_SynchronizeAllEnvironments_Call { + return &MockEnvironmentClientService_SynchronizeAllEnvironments_Call{Call: _e.mock.On("SynchronizeAllEnvironments", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_SynchronizeAllEnvironments_Call) Run(run func(params *operations.SynchronizeAllEnvironmentsParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_SynchronizeAllEnvironments_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.SynchronizeAllEnvironmentsParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_SynchronizeAllEnvironments_Call) Return(_a0 *operations.SynchronizeAllEnvironmentsOK, _a1 error) *MockEnvironmentClientService_SynchronizeAllEnvironments_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_SynchronizeAllEnvironments_Call) RunAndReturn(run func(*operations.SynchronizeAllEnvironmentsParams, ...operations.ClientOption) (*operations.SynchronizeAllEnvironmentsOK, error)) *MockEnvironmentClientService_SynchronizeAllEnvironments_Call { + _c.Call.Return(run) + return _c +} + +// TestAccountTelemetryRules provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) TestAccountTelemetryRules(params *operations.TestAccountTelemetryRulesParams, opts ...operations.ClientOption) (*operations.TestAccountTelemetryRulesOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.TestAccountTelemetryRulesOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.TestAccountTelemetryRulesParams, ...operations.ClientOption) (*operations.TestAccountTelemetryRulesOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.TestAccountTelemetryRulesParams, ...operations.ClientOption) *operations.TestAccountTelemetryRulesOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.TestAccountTelemetryRulesOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.TestAccountTelemetryRulesParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_TestAccountTelemetryRules_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestAccountTelemetryRules' +type MockEnvironmentClientService_TestAccountTelemetryRules_Call struct { + *mock.Call +} + +// TestAccountTelemetryRules is a helper method to define mock.On call +// - params *operations.TestAccountTelemetryRulesParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) TestAccountTelemetryRules(params interface{}, opts ...interface{}) *MockEnvironmentClientService_TestAccountTelemetryRules_Call { + return &MockEnvironmentClientService_TestAccountTelemetryRules_Call{Call: _e.mock.On("TestAccountTelemetryRules", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_TestAccountTelemetryRules_Call) Run(run func(params *operations.TestAccountTelemetryRulesParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_TestAccountTelemetryRules_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.TestAccountTelemetryRulesParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_TestAccountTelemetryRules_Call) Return(_a0 *operations.TestAccountTelemetryRulesOK, _a1 error) *MockEnvironmentClientService_TestAccountTelemetryRules_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_TestAccountTelemetryRules_Call) RunAndReturn(run func(*operations.TestAccountTelemetryRulesParams, ...operations.ClientOption) (*operations.TestAccountTelemetryRulesOK, error)) *MockEnvironmentClientService_TestAccountTelemetryRules_Call { + _c.Call.Return(run) + return _c +} + +// UpdateAwsDiskEncryptionParameters provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpdateAwsDiskEncryptionParameters(params *operations.UpdateAwsDiskEncryptionParametersParams, opts ...operations.ClientOption) (*operations.UpdateAwsDiskEncryptionParametersOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpdateAwsDiskEncryptionParametersOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpdateAwsDiskEncryptionParametersParams, ...operations.ClientOption) (*operations.UpdateAwsDiskEncryptionParametersOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpdateAwsDiskEncryptionParametersParams, ...operations.ClientOption) *operations.UpdateAwsDiskEncryptionParametersOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpdateAwsDiskEncryptionParametersOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpdateAwsDiskEncryptionParametersParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAwsDiskEncryptionParameters' +type MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call struct { + *mock.Call +} + +// UpdateAwsDiskEncryptionParameters is a helper method to define mock.On call +// - params *operations.UpdateAwsDiskEncryptionParametersParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpdateAwsDiskEncryptionParameters(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call { + return &MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call{Call: _e.mock.On("UpdateAwsDiskEncryptionParameters", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call) Run(run func(params *operations.UpdateAwsDiskEncryptionParametersParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpdateAwsDiskEncryptionParametersParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call) Return(_a0 *operations.UpdateAwsDiskEncryptionParametersOK, _a1 error) *MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call) RunAndReturn(run func(*operations.UpdateAwsDiskEncryptionParametersParams, ...operations.ClientOption) (*operations.UpdateAwsDiskEncryptionParametersOK, error)) *MockEnvironmentClientService_UpdateAwsDiskEncryptionParameters_Call { + _c.Call.Return(run) + return _c +} + +// UpdateAzureCredential provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpdateAzureCredential(params *operations.UpdateAzureCredentialParams, opts ...operations.ClientOption) (*operations.UpdateAzureCredentialOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpdateAzureCredentialOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpdateAzureCredentialParams, ...operations.ClientOption) (*operations.UpdateAzureCredentialOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpdateAzureCredentialParams, ...operations.ClientOption) *operations.UpdateAzureCredentialOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpdateAzureCredentialOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpdateAzureCredentialParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpdateAzureCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAzureCredential' +type MockEnvironmentClientService_UpdateAzureCredential_Call struct { + *mock.Call +} + +// UpdateAzureCredential is a helper method to define mock.On call +// - params *operations.UpdateAzureCredentialParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpdateAzureCredential(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpdateAzureCredential_Call { + return &MockEnvironmentClientService_UpdateAzureCredential_Call{Call: _e.mock.On("UpdateAzureCredential", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpdateAzureCredential_Call) Run(run func(params *operations.UpdateAzureCredentialParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpdateAzureCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpdateAzureCredentialParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateAzureCredential_Call) Return(_a0 *operations.UpdateAzureCredentialOK, _a1 error) *MockEnvironmentClientService_UpdateAzureCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateAzureCredential_Call) RunAndReturn(run func(*operations.UpdateAzureCredentialParams, ...operations.ClientOption) (*operations.UpdateAzureCredentialOK, error)) *MockEnvironmentClientService_UpdateAzureCredential_Call { + _c.Call.Return(run) + return _c +} + +// UpdateAzureEncryptionResources provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpdateAzureEncryptionResources(params *operations.UpdateAzureEncryptionResourcesParams, opts ...operations.ClientOption) (*operations.UpdateAzureEncryptionResourcesOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpdateAzureEncryptionResourcesOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpdateAzureEncryptionResourcesParams, ...operations.ClientOption) (*operations.UpdateAzureEncryptionResourcesOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpdateAzureEncryptionResourcesParams, ...operations.ClientOption) *operations.UpdateAzureEncryptionResourcesOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpdateAzureEncryptionResourcesOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpdateAzureEncryptionResourcesParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpdateAzureEncryptionResources_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAzureEncryptionResources' +type MockEnvironmentClientService_UpdateAzureEncryptionResources_Call struct { + *mock.Call +} + +// UpdateAzureEncryptionResources is a helper method to define mock.On call +// - params *operations.UpdateAzureEncryptionResourcesParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpdateAzureEncryptionResources(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpdateAzureEncryptionResources_Call { + return &MockEnvironmentClientService_UpdateAzureEncryptionResources_Call{Call: _e.mock.On("UpdateAzureEncryptionResources", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpdateAzureEncryptionResources_Call) Run(run func(params *operations.UpdateAzureEncryptionResourcesParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpdateAzureEncryptionResources_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpdateAzureEncryptionResourcesParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateAzureEncryptionResources_Call) Return(_a0 *operations.UpdateAzureEncryptionResourcesOK, _a1 error) *MockEnvironmentClientService_UpdateAzureEncryptionResources_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateAzureEncryptionResources_Call) RunAndReturn(run func(*operations.UpdateAzureEncryptionResourcesParams, ...operations.ClientOption) (*operations.UpdateAzureEncryptionResourcesOK, error)) *MockEnvironmentClientService_UpdateAzureEncryptionResources_Call { + _c.Call.Return(run) + return _c +} + +// UpdateOrchestratorState provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpdateOrchestratorState(params *operations.UpdateOrchestratorStateParams, opts ...operations.ClientOption) (*operations.UpdateOrchestratorStateOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpdateOrchestratorStateOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpdateOrchestratorStateParams, ...operations.ClientOption) (*operations.UpdateOrchestratorStateOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpdateOrchestratorStateParams, ...operations.ClientOption) *operations.UpdateOrchestratorStateOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpdateOrchestratorStateOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpdateOrchestratorStateParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpdateOrchestratorState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateOrchestratorState' +type MockEnvironmentClientService_UpdateOrchestratorState_Call struct { + *mock.Call +} + +// UpdateOrchestratorState is a helper method to define mock.On call +// - params *operations.UpdateOrchestratorStateParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpdateOrchestratorState(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpdateOrchestratorState_Call { + return &MockEnvironmentClientService_UpdateOrchestratorState_Call{Call: _e.mock.On("UpdateOrchestratorState", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpdateOrchestratorState_Call) Run(run func(params *operations.UpdateOrchestratorStateParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpdateOrchestratorState_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpdateOrchestratorStateParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateOrchestratorState_Call) Return(_a0 *operations.UpdateOrchestratorStateOK, _a1 error) *MockEnvironmentClientService_UpdateOrchestratorState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateOrchestratorState_Call) RunAndReturn(run func(*operations.UpdateOrchestratorStateParams, ...operations.ClientOption) (*operations.UpdateOrchestratorStateOK, error)) *MockEnvironmentClientService_UpdateOrchestratorState_Call { + _c.Call.Return(run) + return _c +} + +// UpdateProxyConfig provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpdateProxyConfig(params *operations.UpdateProxyConfigParams, opts ...operations.ClientOption) (*operations.UpdateProxyConfigOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpdateProxyConfigOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpdateProxyConfigParams, ...operations.ClientOption) (*operations.UpdateProxyConfigOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpdateProxyConfigParams, ...operations.ClientOption) *operations.UpdateProxyConfigOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpdateProxyConfigOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpdateProxyConfigParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpdateProxyConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateProxyConfig' +type MockEnvironmentClientService_UpdateProxyConfig_Call struct { + *mock.Call +} + +// UpdateProxyConfig is a helper method to define mock.On call +// - params *operations.UpdateProxyConfigParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpdateProxyConfig(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpdateProxyConfig_Call { + return &MockEnvironmentClientService_UpdateProxyConfig_Call{Call: _e.mock.On("UpdateProxyConfig", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpdateProxyConfig_Call) Run(run func(params *operations.UpdateProxyConfigParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpdateProxyConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpdateProxyConfigParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateProxyConfig_Call) Return(_a0 *operations.UpdateProxyConfigOK, _a1 error) *MockEnvironmentClientService_UpdateProxyConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateProxyConfig_Call) RunAndReturn(run func(*operations.UpdateProxyConfigParams, ...operations.ClientOption) (*operations.UpdateProxyConfigOK, error)) *MockEnvironmentClientService_UpdateProxyConfig_Call { + _c.Call.Return(run) + return _c +} + +// UpdateSubnet provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpdateSubnet(params *operations.UpdateSubnetParams, opts ...operations.ClientOption) (*operations.UpdateSubnetOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpdateSubnetOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpdateSubnetParams, ...operations.ClientOption) (*operations.UpdateSubnetOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpdateSubnetParams, ...operations.ClientOption) *operations.UpdateSubnetOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpdateSubnetOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpdateSubnetParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpdateSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSubnet' +type MockEnvironmentClientService_UpdateSubnet_Call struct { + *mock.Call +} + +// UpdateSubnet is a helper method to define mock.On call +// - params *operations.UpdateSubnetParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpdateSubnet(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpdateSubnet_Call { + return &MockEnvironmentClientService_UpdateSubnet_Call{Call: _e.mock.On("UpdateSubnet", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpdateSubnet_Call) Run(run func(params *operations.UpdateSubnetParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpdateSubnet_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpdateSubnetParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateSubnet_Call) Return(_a0 *operations.UpdateSubnetOK, _a1 error) *MockEnvironmentClientService_UpdateSubnet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpdateSubnet_Call) RunAndReturn(run func(*operations.UpdateSubnetParams, ...operations.ClientOption) (*operations.UpdateSubnetOK, error)) *MockEnvironmentClientService_UpdateSubnet_Call { + _c.Call.Return(run) + return _c +} + +// UpgradeCcm provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpgradeCcm(params *operations.UpgradeCcmParams, opts ...operations.ClientOption) (*operations.UpgradeCcmOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpgradeCcmOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpgradeCcmParams, ...operations.ClientOption) (*operations.UpgradeCcmOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpgradeCcmParams, ...operations.ClientOption) *operations.UpgradeCcmOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpgradeCcmOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpgradeCcmParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpgradeCcm_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpgradeCcm' +type MockEnvironmentClientService_UpgradeCcm_Call struct { + *mock.Call +} + +// UpgradeCcm is a helper method to define mock.On call +// - params *operations.UpgradeCcmParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpgradeCcm(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpgradeCcm_Call { + return &MockEnvironmentClientService_UpgradeCcm_Call{Call: _e.mock.On("UpgradeCcm", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpgradeCcm_Call) Run(run func(params *operations.UpgradeCcmParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpgradeCcm_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpgradeCcmParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpgradeCcm_Call) Return(_a0 *operations.UpgradeCcmOK, _a1 error) *MockEnvironmentClientService_UpgradeCcm_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpgradeCcm_Call) RunAndReturn(run func(*operations.UpgradeCcmParams, ...operations.ClientOption) (*operations.UpgradeCcmOK, error)) *MockEnvironmentClientService_UpgradeCcm_Call { + _c.Call.Return(run) + return _c +} + +// UpgradeFreeipa provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpgradeFreeipa(params *operations.UpgradeFreeipaParams, opts ...operations.ClientOption) (*operations.UpgradeFreeipaOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpgradeFreeipaOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpgradeFreeipaParams, ...operations.ClientOption) (*operations.UpgradeFreeipaOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpgradeFreeipaParams, ...operations.ClientOption) *operations.UpgradeFreeipaOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpgradeFreeipaOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpgradeFreeipaParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpgradeFreeipa_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpgradeFreeipa' +type MockEnvironmentClientService_UpgradeFreeipa_Call struct { + *mock.Call +} + +// UpgradeFreeipa is a helper method to define mock.On call +// - params *operations.UpgradeFreeipaParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpgradeFreeipa(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpgradeFreeipa_Call { + return &MockEnvironmentClientService_UpgradeFreeipa_Call{Call: _e.mock.On("UpgradeFreeipa", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpgradeFreeipa_Call) Run(run func(params *operations.UpgradeFreeipaParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpgradeFreeipa_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpgradeFreeipaParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpgradeFreeipa_Call) Return(_a0 *operations.UpgradeFreeipaOK, _a1 error) *MockEnvironmentClientService_UpgradeFreeipa_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpgradeFreeipa_Call) RunAndReturn(run func(*operations.UpgradeFreeipaParams, ...operations.ClientOption) (*operations.UpgradeFreeipaOK, error)) *MockEnvironmentClientService_UpgradeFreeipa_Call { + _c.Call.Return(run) + return _c +} + +// UpscaleFreeipa provides a mock function with given fields: params, opts +func (_m *MockEnvironmentClientService) UpscaleFreeipa(params *operations.UpscaleFreeipaParams, opts ...operations.ClientOption) (*operations.UpscaleFreeipaOK, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, params) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *operations.UpscaleFreeipaOK + var r1 error + if rf, ok := ret.Get(0).(func(*operations.UpscaleFreeipaParams, ...operations.ClientOption) (*operations.UpscaleFreeipaOK, error)); ok { + return rf(params, opts...) + } + if rf, ok := ret.Get(0).(func(*operations.UpscaleFreeipaParams, ...operations.ClientOption) *operations.UpscaleFreeipaOK); ok { + r0 = rf(params, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*operations.UpscaleFreeipaOK) + } + } + + if rf, ok := ret.Get(1).(func(*operations.UpscaleFreeipaParams, ...operations.ClientOption) error); ok { + r1 = rf(params, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockEnvironmentClientService_UpscaleFreeipa_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpscaleFreeipa' +type MockEnvironmentClientService_UpscaleFreeipa_Call struct { + *mock.Call +} + +// UpscaleFreeipa is a helper method to define mock.On call +// - params *operations.UpscaleFreeipaParams +// - opts ...operations.ClientOption +func (_e *MockEnvironmentClientService_Expecter) UpscaleFreeipa(params interface{}, opts ...interface{}) *MockEnvironmentClientService_UpscaleFreeipa_Call { + return &MockEnvironmentClientService_UpscaleFreeipa_Call{Call: _e.mock.On("UpscaleFreeipa", + append([]interface{}{params}, opts...)...)} +} + +func (_c *MockEnvironmentClientService_UpscaleFreeipa_Call) Run(run func(params *operations.UpscaleFreeipaParams, opts ...operations.ClientOption)) *MockEnvironmentClientService_UpscaleFreeipa_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]operations.ClientOption, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(operations.ClientOption) + } + } + run(args[0].(*operations.UpscaleFreeipaParams), variadicArgs...) + }) + return _c +} + +func (_c *MockEnvironmentClientService_UpscaleFreeipa_Call) Return(_a0 *operations.UpscaleFreeipaOK, _a1 error) *MockEnvironmentClientService_UpscaleFreeipa_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockEnvironmentClientService_UpscaleFreeipa_Call) RunAndReturn(run func(*operations.UpscaleFreeipaParams, ...operations.ClientOption) (*operations.UpscaleFreeipaOK, error)) *MockEnvironmentClientService_UpscaleFreeipa_Call { + _c.Call.Return(run) + return _c +} + +// NewMockEnvironmentClientService creates a new instance of MockEnvironmentClientService. 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 NewMockEnvironmentClientService(t interface { + mock.TestingT + Cleanup(func()) +}) *MockEnvironmentClientService { + mock := &MockEnvironmentClientService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/resources/environments/resource_id_broker_mappings.go b/resources/environments/resource_id_broker_mappings.go index 3ae903dc..04075d49 100644 --- a/resources/environments/resource_id_broker_mappings.go +++ b/resources/environments/resource_id_broker_mappings.go @@ -14,6 +14,7 @@ import ( "context" "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/cdp" + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client" "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations" environmentsmodels "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/models" "github.com/cloudera/terraform-provider-cdp/utils" @@ -24,6 +25,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-log/tflog" ) @@ -33,6 +35,63 @@ var ( emptyMappings = true ) +var IDBrokerMappingSchema = schema.Schema{ + MarkdownDescription: "To enable your CDP user to utilize the central authentication features CDP provides and to exchange credentials for AWS or Azure access tokens, you have to map this CDP user to the correct IAM role or Azure Managed Service Identity (MSI).", + Attributes: map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "data_access_role": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "environment_name": schema.StringAttribute{ + Required: true, + }, + "environment_crn": schema.StringAttribute{ + Required: true, + }, + "mappings": schema.SetNestedAttribute{ + Optional: true, + NestedObject: schema.NestedAttributeObject{ + Attributes: map[string]schema.Attribute{ + "accessor_crn": schema.StringAttribute{ + Required: true, + }, + "role": schema.StringAttribute{ + Required: true, + }, + }, + }, + }, + "ranger_audit_role": schema.StringAttribute{ + Required: true, + }, + "ranger_cloud_access_authorizer_role": schema.StringAttribute{ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + }, + "set_empty_mappings": schema.BoolAttribute{ + Optional: true, + }, + "mappings_version": schema.Int64Attribute{ + Computed: true, + PlanModifiers: []planmodifier.Int64{ + int64planmodifier.UseStateForUnknown(), + }, + }, + }, +} + type idBrokerMappingsResource struct { client *cdp.Client } @@ -91,62 +150,7 @@ func toSetIDBrokerMappingsRequest(ctx context.Context, model *idBrokerMappingsRe } func (r *idBrokerMappingsResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) { - resp.Schema = schema.Schema{ - MarkdownDescription: "To enable your CDP user to utilize the central authentication features CDP provides and to exchange credentials for AWS or Azure access tokens, you have to map this CDP user to the correct IAM role or Azure Managed Service Identity (MSI).", - Attributes: map[string]schema.Attribute{ - "id": schema.StringAttribute{ - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, - }, - "data_access_role": schema.StringAttribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, - }, - "environment_name": schema.StringAttribute{ - Required: true, - }, - "environment_crn": schema.StringAttribute{ - Required: true, - }, - "mappings": schema.SetNestedAttribute{ - Optional: true, - NestedObject: schema.NestedAttributeObject{ - Attributes: map[string]schema.Attribute{ - "accessor_crn": schema.StringAttribute{ - Required: true, - }, - "role": schema.StringAttribute{ - Required: true, - }, - }, - }, - }, - "ranger_audit_role": schema.StringAttribute{ - Required: true, - }, - "ranger_cloud_access_authorizer_role": schema.StringAttribute{ - Optional: true, - Computed: true, - PlanModifiers: []planmodifier.String{ - stringplanmodifier.UseStateForUnknown(), - }, - }, - "set_empty_mappings": schema.BoolAttribute{ - Optional: true, - }, - "mappings_version": schema.Int64Attribute{ - Computed: true, - PlanModifiers: []planmodifier.Int64{ - int64planmodifier.UseStateForUnknown(), - }, - }, - }, - } + resp.Schema = IDBrokerMappingSchema } func (r *idBrokerMappingsResource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) { @@ -200,6 +204,15 @@ func isSetIDBEnvNotFoundError(err error) bool { return false } +func queryEnvironment(ctx context.Context, client *client.Environments, envName string, state *idBrokerMappingsResourceModel) error { + envParams := operations.NewDescribeEnvironmentParamsWithContext(ctx) + envParams.WithInput(&environmentsmodels.DescribeEnvironmentRequest{ + EnvironmentName: &envName, + }) + _, err := client.Operations.DescribeEnvironment(envParams) + return err +} + func (r *idBrokerMappingsResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) { var state idBrokerMappingsResourceModel diags := req.State.Get(ctx, &state) @@ -209,6 +222,12 @@ func (r *idBrokerMappingsResource) Read(ctx context.Context, req resource.ReadRe } client := r.client.Environments + + if err := queryEnvironment(ctx, client, state.EnvironmentName.ValueString(), &state); isEnvNotFoundError(err) { + removeResourceFromState(ctx, &resp.Diagnostics, &resp.State, state) + return + } + params := operations.NewGetIDBrokerMappingsParamsWithContext(ctx) params.WithInput(&environmentsmodels.GetIDBrokerMappingsRequest{ EnvironmentName: state.EnvironmentName.ValueStringPointer(), @@ -239,6 +258,14 @@ func (r *idBrokerMappingsResource) Read(ctx context.Context, req resource.ReadRe } } +func removeResourceFromState(ctx context.Context, diag *diag.Diagnostics, state *tfsdk.State, model idBrokerMappingsResourceModel) { + diag.AddWarning("Resource not found on provider", "Environment not found, removing ID Broker mapping from state.") + tflog.Warn(ctx, "Environment not found, removing ID Broker mapping from state", map[string]interface{}{ + "id": model.ID.ValueString(), + }) + state.RemoveResource(ctx) +} + func toIdBrokerMappingsResourceModel(ctx context.Context, mapping *environmentsmodels.GetIDBrokerMappingsResponse, out *idBrokerMappingsResourceModel, diags *diag.Diagnostics) { out.DataAccessRole = types.StringPointerValue(mapping.DataAccessRole) out.MappingsVersion = types.Int64PointerValue(mapping.MappingsVersion) @@ -281,6 +308,11 @@ func (r *idBrokerMappingsResource) Update(ctx context.Context, req resource.Upda client := r.client.Environments + if err := queryEnvironment(ctx, client, state.EnvironmentName.ValueString(), &state); isEnvNotFoundError(err) { + removeResourceFromState(ctx, &resp.Diagnostics, &resp.State, state) + return + } + params := operations.NewSetIDBrokerMappingsParamsWithContext(ctx) params.WithInput(toSetIDBrokerMappingsRequest(ctx, &state, &resp.Diagnostics)) responseOk, err := client.Operations.SetIDBrokerMappings(params) @@ -319,6 +351,11 @@ func (r *idBrokerMappingsResource) Delete(ctx context.Context, req resource.Dele client := r.client.Environments + if err := queryEnvironment(ctx, client, state.EnvironmentName.ValueString(), &state); isEnvNotFoundError(err) { + removeResourceFromState(ctx, &resp.Diagnostics, &resp.State, state) + return + } + params := operations.NewSetIDBrokerMappingsParamsWithContext(ctx) input := &environmentsmodels.SetIDBrokerMappingsRequest{} input.EnvironmentName = state.EnvironmentName.ValueStringPointer() diff --git a/resources/environments/resource_id_broker_mappings_test.go b/resources/environments/resource_id_broker_mappings_test.go new file mode 100644 index 00000000..7897e028 --- /dev/null +++ b/resources/environments/resource_id_broker_mappings_test.go @@ -0,0 +1,610 @@ +// Copyright 2023 Cloudera. All Rights Reserved. +// +// This file is licensed 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. +// +// This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS +// OF ANY KIND, either express or implied. Refer to the License for the specific +// permissions and limitations governing your use of the file. + +package environments + +import ( + "context" + "errors" + "testing" + + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/cdp" + environmentsclient "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client" + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations" + "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/models" + mocks "github.com/cloudera/terraform-provider-cdp/mocks/github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/client/operations" + "github.com/go-openapi/runtime" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/tfsdk" + "github.com/hashicorp/terraform-plugin-go/tftypes" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" +) + +type MockOperations struct { + operations.ClientService +} + +func (m *MockOperations) SetTransport(transport runtime.ClientTransport) { +} + +type MockTransport struct { + runtime.ClientTransport +} + +func NewMockEnvironments(mockClient *mocks.MockEnvironmentClientService) *environmentsclient.Environments { + return &environmentsclient.Environments{ + Operations: mockClient, + Transport: &MockTransport{}, + } +} + +func createRawResource(resourceID string, rcaaRole string) tftypes.Value { + return tftypes.NewValue( + tftypes.Object{ + AttributeTypes: map[string]tftypes.Type{ + "id": tftypes.String, + "data_access_role": tftypes.String, + "environment_name": tftypes.String, + "environment_crn": tftypes.String, + "mappings": tftypes.Set{ + ElementType: tftypes.Object{ + AttributeTypes: map[string]tftypes.Type{ + "accessor_crn": tftypes.String, + "role": tftypes.String, + }, + }, + }, + "ranger_audit_role": tftypes.String, + "ranger_cloud_access_authorizer_role": tftypes.String, + "set_empty_mappings": tftypes.Bool, + "mappings_version": tftypes.Number, + }, + }, + map[string]tftypes.Value{ + "id": tftypes.NewValue(tftypes.String, resourceID), + "data_access_role": tftypes.NewValue(tftypes.String, "test-da-role"), + "environment_name": tftypes.NewValue(tftypes.String, "test-env-name"), + "environment_crn": tftypes.NewValue(tftypes.String, "test-env-crn"), + "mappings": tftypes.NewValue(tftypes.Set{ + ElementType: tftypes.Object{ + AttributeTypes: map[string]tftypes.Type{ + "accessor_crn": tftypes.String, + "role": tftypes.String, + }, + }, + }, []tftypes.Value{tftypes.NewValue(tftypes.Object{ + AttributeTypes: map[string]tftypes.Type{ + "accessor_crn": tftypes.String, + "role": tftypes.String, + }, + }, map[string]tftypes.Value{ + "accessor_crn": tftypes.NewValue(tftypes.String, "test-acrn"), + "role": tftypes.NewValue(tftypes.String, "test-role"), + })}), + "ranger_audit_role": tftypes.NewValue(tftypes.String, "test-ra-role"), + "ranger_cloud_access_authorizer_role": tftypes.NewValue(tftypes.String, rcaaRole), + "set_empty_mappings": tftypes.NewValue(tftypes.Bool, false), + "mappings_version": tftypes.NewValue(tftypes.Number, 0), + }, + ) +} + +func TestCreate(t *testing.T) { + testCases := map[string]struct { + expectedResponse interface{} + expectedErrorResponse interface{} + expectedError bool + expectedSummary string + expectedDetail string + expectedID string + expectedRangerCloudAccessAuthorizerRole string + expectedMappingVersion int64 + }{ + "OK": { + expectedResponse: &operations.SetIDBrokerMappingsOK{ + Payload: &models.SetIDBrokerMappingsResponse{ + RangerCloudAccessAuthorizerRole: "test-rcaa-role", + MappingsVersion: func(i int64) *int64 { return &i }(1), + }, + }, + expectedErrorResponse: nil, + expectedError: false, + expectedSummary: "", + expectedDetail: "", + expectedID: "test-env-crn", + expectedRangerCloudAccessAuthorizerRole: "test-rcaa-role", + expectedMappingVersion: 1, + }, + "EnvironmentNotFound": { + expectedResponse: nil, + expectedErrorResponse: &operations.SetIDBrokerMappingsDefault{ + Payload: &models.Error{ + Code: "NOT_FOUND", + Message: "", + }, + }, + expectedError: true, + expectedSummary: "Error applying ID Broker mappings", + expectedDetail: "Environment not found: test-env-crn", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + "TransportError": { + expectedResponse: nil, + expectedErrorResponse: errors.New("request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"), + expectedError: true, + expectedSummary: "Create Id Broker Mapping", + expectedDetail: "Failed to create ID Broker mapping, unexpected error: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + } + for name, testCase := range testCases { + t.Run(name, func(t *testing.T) { + ctx := context.TODO() + + mockClient := new(mocks.MockEnvironmentClientService) + + createMatcher := func(params *operations.SetIDBrokerMappingsParams) bool { + match := *params.Input.DataAccessRole == "test-da-role" + match = match && *params.Input.EnvironmentName == "test-env-name" + match = match && *params.Input.EnvironmentName == "test-env-name" + match = match && params.Input.RangerAuditRole == "test-ra-role" + match = match && params.Input.RangerCloudAccessAuthorizerRole == "" + match = match && !*params.Input.SetEmptyMappings + match = match && len(params.Input.Mappings) == 1 && *params.Input.Mappings[0].AccessorCrn == "test-acrn" && *params.Input.Mappings[0].Role == "test-role" + return match + } + mockClient.On("SetIDBrokerMappings", mock.MatchedBy(createMatcher)).Return(testCase.expectedResponse, testCase.expectedErrorResponse) + + idmResource := &idBrokerMappingsResource{ + client: &cdp.Client{Environments: NewMockEnvironments(mockClient)}, + } + + req := resource.CreateRequest{ + Plan: tfsdk.Plan{ + Raw: createRawResource("", ""), + Schema: IDBrokerMappingSchema, + }, + } + + resp := &resource.CreateResponse{ + State: tfsdk.State{ + Schema: IDBrokerMappingSchema, + }, + } + + idmResource.Create(ctx, req, resp) + + assert.Equal(t, testCase.expectedError, resp.Diagnostics.HasError()) + if testCase.expectedError { + assert.Equal(t, testCase.expectedSummary, resp.Diagnostics.Errors()[0].Summary()) + assert.Equal(t, testCase.expectedDetail, resp.Diagnostics.Errors()[0].Detail()) + } + + var state idBrokerMappingsResourceModel + resp.State.Get(ctx, &state) + + assert.Equal(t, testCase.expectedID, state.ID.ValueString()) + assert.Equal(t, testCase.expectedRangerCloudAccessAuthorizerRole, state.RangerCloudAccessAuthorizerRole.ValueString()) + assert.Equal(t, testCase.expectedMappingVersion, state.MappingsVersion.ValueInt64()) + + mockClient.AssertExpectations(t) + }) + } +} + +func TestRead(t *testing.T) { + testCases := map[string]struct { + expectedEnvironmentResponse interface{} + expectedEnvironmentErrorResponse interface{} + expectedResponse interface{} + expectedErrorResponse interface{} + expectedError bool + expectedWarning bool + expectedSummary string + expectedDetail string + expectedID string + expectedRangerCloudAccessAuthorizerRole string + expectedMappingVersion int64 + }{ + "OK": { + expectedEnvironmentResponse: &operations.DescribeEnvironmentOK{ + Payload: &models.DescribeEnvironmentResponse{ + Environment: &models.Environment{ + Crn: func(s string) *string { return &s }("test-env-crn"), + }, + }, + }, + expectedResponse: &operations.GetIDBrokerMappingsOK{ + Payload: &models.GetIDBrokerMappingsResponse{ + RangerCloudAccessAuthorizerRole: "test-rcaa-role", + MappingsVersion: func(i int64) *int64 { return &i }(1), + }, + }, + expectedErrorResponse: nil, + expectedError: false, + expectedSummary: "", + expectedDetail: "", + expectedID: "test-env-crn", + expectedRangerCloudAccessAuthorizerRole: "test-rcaa-role", + expectedMappingVersion: 1, + }, + "EnvironmentNotFound": { + expectedEnvironmentResponse: nil, + expectedEnvironmentErrorResponse: &operations.DescribeEnvironmentDefault{ + Payload: &models.Error{ + Code: "NOT_FOUND", + Message: "", + }, + }, + expectedResponse: nil, + expectedErrorResponse: &operations.GetIDBrokerMappingsDefault{ + Payload: &models.Error{ + Code: "NOT_FOUND", + Message: "", + }, + }, + expectedError: false, + expectedWarning: true, + expectedSummary: "Resource not found on provider", + expectedDetail: "Environment not found, removing ID Broker mapping from state.", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + "TransportError": { + expectedResponse: nil, + expectedErrorResponse: errors.New("request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"), + expectedError: true, + expectedSummary: "Read Id Broker Mapping", + expectedDetail: "Failed to read ID Broker mapping, unexpected error: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + } + for name, testCase := range testCases { + t.Run(name, func(t *testing.T) { + ctx := context.TODO() + + mockClient := new(mocks.MockEnvironmentClientService) + mockClient.On("DescribeEnvironment", mock.MatchedBy(func(params *operations.DescribeEnvironmentParams) bool { + return *params.Input.EnvironmentName == "test-env-name" + })).Return(testCase.expectedEnvironmentResponse, testCase.expectedEnvironmentErrorResponse) + + if testCase.expectedEnvironmentErrorResponse == nil { + var readMatcher = func(params *operations.GetIDBrokerMappingsParams) bool { + return *params.Input.EnvironmentName == "test-env-name" + } + mockClient.On("GetIDBrokerMappings", mock.MatchedBy(readMatcher)).Return(testCase.expectedResponse, testCase.expectedErrorResponse) + } + + idmResource := &idBrokerMappingsResource{ + client: &cdp.Client{Environments: NewMockEnvironments(mockClient)}, + } + + req := resource.ReadRequest{ + State: tfsdk.State{ + Raw: createRawResource("test-env-crn", ""), + Schema: IDBrokerMappingSchema, + }, + } + + resp := &resource.ReadResponse{ + State: tfsdk.State{ + Schema: IDBrokerMappingSchema, + }, + } + + idmResource.Read(ctx, req, resp) + + assert.Equal(t, testCase.expectedError, resp.Diagnostics.HasError()) + if testCase.expectedError { + assert.Equal(t, testCase.expectedSummary, resp.Diagnostics.Errors()[0].Summary()) + assert.Equal(t, testCase.expectedDetail, resp.Diagnostics.Errors()[0].Detail()) + } + + if testCase.expectedWarning { + assert.Equal(t, 1, resp.Diagnostics.WarningsCount()) + assert.Equal(t, testCase.expectedSummary, resp.Diagnostics.Warnings()[0].Summary()) + assert.Equal(t, testCase.expectedDetail, resp.Diagnostics.Warnings()[0].Detail()) + assert.True(t, resp.State.Raw.IsNull()) + } + + var state idBrokerMappingsResourceModel + resp.State.Get(ctx, &state) + + assert.Equal(t, testCase.expectedID, state.ID.ValueString()) + assert.Equal(t, testCase.expectedRangerCloudAccessAuthorizerRole, state.RangerCloudAccessAuthorizerRole.ValueString()) + assert.Equal(t, testCase.expectedMappingVersion, state.MappingsVersion.ValueInt64()) + + mockClient.AssertExpectations(t) + }) + } +} + +func TestUpdate(t *testing.T) { + testCases := map[string]struct { + expectedEnvironmentResponse interface{} + expectedEnvironmentErrorResponse interface{} + expectedResponse interface{} + expectedErrorResponse interface{} + expectedError bool + expectedWarning bool + expectedSummary string + expectedDetail string + expectedID string + expectedRangerCloudAccessAuthorizerRole string + expectedMappingVersion int64 + }{ + "OK": { + expectedEnvironmentResponse: &operations.DescribeEnvironmentOK{ + Payload: &models.DescribeEnvironmentResponse{ + Environment: &models.Environment{ + Crn: func(s string) *string { return &s }("test-env-crn"), + }, + }, + }, + expectedResponse: &operations.SetIDBrokerMappingsOK{ + Payload: &models.SetIDBrokerMappingsResponse{ + RangerCloudAccessAuthorizerRole: "test-rcaa-role", + MappingsVersion: func(i int64) *int64 { return &i }(1), + }, + }, + expectedErrorResponse: nil, + expectedError: false, + expectedSummary: "", + expectedDetail: "", + expectedID: "test-env-crn", + expectedRangerCloudAccessAuthorizerRole: "test-rcaa-role", + expectedMappingVersion: 1, + }, + "EnvironmentNotFound": { + expectedEnvironmentResponse: nil, + expectedEnvironmentErrorResponse: &operations.DescribeEnvironmentDefault{ + Payload: &models.Error{ + Code: "NOT_FOUND", + Message: "", + }, + }, + expectedResponse: nil, + expectedErrorResponse: &operations.GetIDBrokerMappingsDefault{ + Payload: &models.Error{ + Code: "NOT_FOUND", + Message: "", + }, + }, + expectedError: false, + expectedWarning: true, + expectedSummary: "Resource not found on provider", + expectedDetail: "Environment not found, removing ID Broker mapping from state.", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + "TransportError": { + expectedResponse: nil, + expectedErrorResponse: errors.New("request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"), + expectedError: true, + expectedSummary: "Error setting ID Broker mappings", + expectedDetail: "Got the following error setting ID Broker mappings: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)", + expectedID: "test-env-crn", + expectedRangerCloudAccessAuthorizerRole: "test-old-rcaa-role", + expectedMappingVersion: 0, + }, + } + for name, testCase := range testCases { + t.Run(name, func(t *testing.T) { + ctx := context.TODO() + + mockClient := new(mocks.MockEnvironmentClientService) + mockClient.On("DescribeEnvironment", mock.MatchedBy(func(params *operations.DescribeEnvironmentParams) bool { + return *params.Input.EnvironmentName == "test-env-name" + })).Return(testCase.expectedEnvironmentResponse, testCase.expectedEnvironmentErrorResponse) + + if testCase.expectedEnvironmentErrorResponse == nil { + updateMatcher := func(params *operations.SetIDBrokerMappingsParams) bool { + match := *params.Input.DataAccessRole == "test-da-role" + match = match && *params.Input.EnvironmentName == "test-env-name" + match = match && *params.Input.EnvironmentName == "test-env-name" + match = match && params.Input.RangerAuditRole == "test-ra-role" + match = match && params.Input.RangerCloudAccessAuthorizerRole == "test-rcaa-role" + match = match && !*params.Input.SetEmptyMappings + match = match && len(params.Input.Mappings) == 1 && *params.Input.Mappings[0].AccessorCrn == "test-acrn" && *params.Input.Mappings[0].Role == "test-role" + return match + } + mockClient.On("SetIDBrokerMappings", mock.MatchedBy(updateMatcher)).Return(testCase.expectedResponse, testCase.expectedErrorResponse) + } + + idmResource := &idBrokerMappingsResource{ + client: &cdp.Client{Environments: NewMockEnvironments(mockClient)}, + } + + req := resource.UpdateRequest{ + Plan: tfsdk.Plan{ + Raw: createRawResource("test-env-crn", "test-rcaa-role"), + Schema: IDBrokerMappingSchema, + }, + } + + resp := &resource.UpdateResponse{ + State: tfsdk.State{ + Raw: createRawResource("test-env-crn", "test-old-rcaa-role"), + Schema: IDBrokerMappingSchema, + }, + } + + idmResource.Update(ctx, req, resp) + + assert.Equal(t, testCase.expectedError, resp.Diagnostics.HasError()) + if testCase.expectedError { + assert.Equal(t, testCase.expectedSummary, resp.Diagnostics.Errors()[0].Summary()) + assert.Equal(t, testCase.expectedDetail, resp.Diagnostics.Errors()[0].Detail()) + } + + if testCase.expectedWarning { + assert.Equal(t, 1, resp.Diagnostics.WarningsCount()) + assert.Equal(t, testCase.expectedSummary, resp.Diagnostics.Warnings()[0].Summary()) + assert.Equal(t, testCase.expectedDetail, resp.Diagnostics.Warnings()[0].Detail()) + assert.True(t, resp.State.Raw.IsNull()) + } + + var state idBrokerMappingsResourceModel + resp.State.Get(ctx, &state) + + assert.Equal(t, testCase.expectedID, state.ID.ValueString()) + assert.Equal(t, testCase.expectedRangerCloudAccessAuthorizerRole, state.RangerCloudAccessAuthorizerRole.ValueString()) + assert.Equal(t, testCase.expectedMappingVersion, state.MappingsVersion.ValueInt64()) + + mockClient.AssertExpectations(t) + }) + } +} + +func TestDelete(t *testing.T) { + testCases := map[string]struct { + expectedEnvironmentResponse interface{} + expectedEnvironmentErrorResponse interface{} + expectedResponse interface{} + expectedErrorResponse interface{} + expectedError bool + expectedWarning bool + expectedSummary string + expectedDetail string + expectedID string + expectedRangerCloudAccessAuthorizerRole string + expectedMappingVersion int64 + }{ + "OK": { + expectedEnvironmentResponse: &operations.DescribeEnvironmentOK{ + Payload: &models.DescribeEnvironmentResponse{ + Environment: &models.Environment{ + Crn: func(s string) *string { return &s }("test-env-crn"), + }, + }, + }, + expectedResponse: &operations.SetIDBrokerMappingsOK{ + Payload: &models.SetIDBrokerMappingsResponse{ + RangerCloudAccessAuthorizerRole: "test-rcaa-role", + MappingsVersion: func(i int64) *int64 { return &i }(1), + }, + }, + expectedErrorResponse: nil, + expectedError: false, + expectedSummary: "", + expectedDetail: "", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + "EnvironmentNotFound": { + expectedEnvironmentResponse: nil, + expectedEnvironmentErrorResponse: &operations.DescribeEnvironmentDefault{ + Payload: &models.Error{ + Code: "NOT_FOUND", + Message: "", + }, + }, + expectedResponse: nil, + expectedErrorResponse: &operations.GetIDBrokerMappingsDefault{ + Payload: &models.Error{ + Code: "NOT_FOUND", + Message: "", + }, + }, + expectedError: false, + expectedWarning: true, + expectedSummary: "Resource not found on provider", + expectedDetail: "Environment not found, removing ID Broker mapping from state.", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + "TransportError": { + expectedResponse: nil, + expectedErrorResponse: errors.New("request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"), + expectedError: true, + expectedSummary: "Delete Id Broker Mapping", + expectedDetail: "Failed to delete ID Broker mapping, unexpected error: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)", + expectedID: "", + expectedRangerCloudAccessAuthorizerRole: "", + expectedMappingVersion: 0, + }, + } + for name, testCase := range testCases { + t.Run(name, func(t *testing.T) { + ctx := context.TODO() + + mockClient := new(mocks.MockEnvironmentClientService) + mockClient.On("DescribeEnvironment", mock.MatchedBy(func(params *operations.DescribeEnvironmentParams) bool { + return *params.Input.EnvironmentName == "test-env-name" + })).Return(testCase.expectedEnvironmentResponse, testCase.expectedEnvironmentErrorResponse) + + if testCase.expectedEnvironmentErrorResponse == nil { + updateMatcher := func(params *operations.SetIDBrokerMappingsParams) bool { + match := *params.Input.DataAccessRole == "test-da-role" + match = match && *params.Input.EnvironmentName == "test-env-name" + match = match && *params.Input.EnvironmentName == "test-env-name" + match = match && params.Input.RangerAuditRole == "test-ra-role" + match = match && params.Input.RangerCloudAccessAuthorizerRole == "" + match = match && *params.Input.SetEmptyMappings + match = match && len(params.Input.Mappings) == 0 + return match + } + mockClient.On("SetIDBrokerMappings", mock.MatchedBy(updateMatcher)).Return(testCase.expectedResponse, testCase.expectedErrorResponse) + } + + idmResource := &idBrokerMappingsResource{ + client: &cdp.Client{Environments: NewMockEnvironments(mockClient)}, + } + + req := resource.DeleteRequest{ + State: tfsdk.State{ + Raw: createRawResource("test-env-crn", ""), + Schema: IDBrokerMappingSchema, + }, + } + + resp := &resource.DeleteResponse{ + State: tfsdk.State{ + Schema: IDBrokerMappingSchema, + }, + } + + idmResource.Delete(ctx, req, resp) + + assert.Equal(t, testCase.expectedError, resp.Diagnostics.HasError()) + if testCase.expectedError { + assert.Equal(t, testCase.expectedSummary, resp.Diagnostics.Errors()[0].Summary()) + assert.Equal(t, testCase.expectedDetail, resp.Diagnostics.Errors()[0].Detail()) + } + + if testCase.expectedWarning { + assert.Equal(t, 1, resp.Diagnostics.WarningsCount()) + assert.Equal(t, testCase.expectedSummary, resp.Diagnostics.Warnings()[0].Summary()) + assert.Equal(t, testCase.expectedDetail, resp.Diagnostics.Warnings()[0].Detail()) + } + + var state idBrokerMappingsResourceModel + resp.State.Get(ctx, &state) + + assert.Equal(t, testCase.expectedID, state.ID.ValueString()) + assert.Equal(t, testCase.expectedRangerCloudAccessAuthorizerRole, state.RangerCloudAccessAuthorizerRole.ValueString()) + assert.Equal(t, testCase.expectedMappingVersion, state.MappingsVersion.ValueInt64()) + assert.True(t, resp.State.Raw.IsNull()) + + mockClient.AssertExpectations(t) + }) + } +}