diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index e43e9607f..dfe78790a 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -1668b0db17e23605f8c9d29fb3b674c01590732d \ No newline at end of file +779817ed8d63031f5ea761fbd25ee84f38feec0d \ No newline at end of file diff --git a/.mockery.yaml b/.mockery.yaml deleted file mode 100644 index 4b8c6f057..000000000 --- a/.mockery.yaml +++ /dev/null @@ -1,10 +0,0 @@ -with-expecter: true -filename: "mock_{{.InterfaceName | snakecase}}.go" -dir: "experimental/mocks/service/{{.PackageName | snakecase}}" -mockname: "Mock{{.InterfaceName}}" -outpkg: "{{.PackageName}}" -packages: - github.com/databricks/databricks-sdk-go/service: - config: - recursive: true - include-regex: ".*Interface" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ca019db9a..a9036ffa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Version changelog +## [Release] Release v0.55.0 + +### Internal Changes + + * Bump staticcheck to 0.5.1 and add go 1.23 test coverage ([#1106](https://github.com/databricks/databricks-sdk-go/pull/1106)). + * Bump x/net, x/crypto dependencies ([#1107](https://github.com/databricks/databricks-sdk-go/pull/1107)). + * Create custom codeql.yml ([#1114](https://github.com/databricks/databricks-sdk-go/pull/1114)). + * Decouple serving and oauth2 package ([#1110](https://github.com/databricks/databricks-sdk-go/pull/1110)). + * Migrate workflows that need write access to use hosted runners ([#1112](https://github.com/databricks/databricks-sdk-go/pull/1112)). + * Move package credentials in config ([#1115](https://github.com/databricks/databricks-sdk-go/pull/1115)). + * Update Queries test ([#1104](https://github.com/databricks/databricks-sdk-go/pull/1104)). + + +### API Changes: + + * Added `NoCompute` field for [apps.CreateAppRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#CreateAppRequest). + * Added `HasMore` field for [jobs.BaseJob](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#BaseJob). + * Added `HasMore` field for [jobs.BaseRun](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#BaseRun). + * Added `PageToken` field for [jobs.GetJobRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#GetJobRequest). + * Added `HasMore` and `NextPageToken` fields for [jobs.Job](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Job). + * Added `HasMore` field for [jobs.Run](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Run). + * Added `RunAs` field for [pipelines.CreatePipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#CreatePipeline). + * Added `RunAs` field for [pipelines.EditPipeline](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#EditPipeline). + * Added `AuthorizationDetails` and `EndpointUrl` fields for [serving.DataPlaneInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/serving#DataPlaneInfo). + * [Breaking] Changed `Update` method for [a.AccountFederationPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#AccountFederationPolicyAPI) account-level service with new required argument order. + * [Breaking] Changed `Update` method for [a.ServicePrincipalFederationPolicy](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#ServicePrincipalFederationPolicyAPI) account-level service with new required argument order. + * Changed `UpdateMask` field for [oauth2.UpdateAccountFederationPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#UpdateAccountFederationPolicyRequest) to no longer be required. + * Changed `UpdateMask` field for [oauth2.UpdateServicePrincipalFederationPolicyRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/oauth2#UpdateServicePrincipalFederationPolicyRequest) to no longer be required. + * [Breaking] Changed `DaysOfWeek` field for [pipelines.RestartWindow](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#RestartWindow) to type [pipelines.DayOfWeekList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#DayOfWeekList). + +OpenAPI SHA: 779817ed8d63031f5ea761fbd25ee84f38feec0d, Date: 2025-01-08 + ## [Release] Release v0.54.0 ### API Changes: diff --git a/account_client.go b/databricks/account_client.go similarity index 99% rename from account_client.go rename to databricks/account_client.go index 50632e4f8..05e1d25e0 100755 --- a/account_client.go +++ b/databricks/account_client.go @@ -5,8 +5,8 @@ package databricks import ( "errors" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/config" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/config" "github.com/databricks/databricks-sdk-go/service/billing" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/account_functions.go b/databricks/account_functions.go similarity index 100% rename from account_functions.go rename to databricks/account_functions.go diff --git a/databricks/apierr/errors.go b/databricks/apierr/errors.go index dfbc19ad9..29ec85a6a 100644 --- a/databricks/apierr/errors.go +++ b/databricks/apierr/errors.go @@ -11,7 +11,7 @@ import ( "regexp" "strings" - "github.com/databricks/databricks-sdk-go/common" + "github.com/databricks/databricks-sdk-go/databricks/common" "github.com/databricks/databricks-sdk-go/databricks/httplog" "github.com/databricks/databricks-sdk-go/databricks/log" ) diff --git a/databricks/apierr/errors_test.go b/databricks/apierr/errors_test.go index f850bdde6..43c56a5ea 100644 --- a/databricks/apierr/errors_test.go +++ b/databricks/apierr/errors_test.go @@ -9,7 +9,7 @@ import ( "net/url" "testing" - "github.com/databricks/databricks-sdk-go/common" + "github.com/databricks/databricks-sdk-go/databricks/common" "github.com/stretchr/testify/assert" ) diff --git a/databricks/apierr/private_link.go b/databricks/apierr/private_link.go index 16ce19ebc..0638807ec 100644 --- a/databricks/apierr/private_link.go +++ b/databricks/apierr/private_link.go @@ -5,7 +5,7 @@ import ( "net/url" "strings" - "github.com/databricks/databricks-sdk-go/common/environment" + "github.com/databricks/databricks-sdk-go/databricks/common/environment" ) // Metadata about the private link product. Private link redirects users to the diff --git a/client/client.go b/databricks/client/client.go similarity index 94% rename from client/client.go rename to databricks/client/client.go index 175a57351..b9f22bba1 100644 --- a/client/client.go +++ b/databricks/client/client.go @@ -5,8 +5,8 @@ import ( "net/http" "strings" - "github.com/databricks/databricks-sdk-go/config" - "github.com/databricks/databricks-sdk-go/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/config" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "golang.org/x/oauth2" ) diff --git a/client/client_test.go b/databricks/client/client_test.go similarity index 98% rename from client/client_test.go rename to databricks/client/client_test.go index ace563829..8fee02bfd 100644 --- a/client/client_test.go +++ b/databricks/client/client_test.go @@ -11,10 +11,10 @@ import ( "strings" "testing" - "github.com/databricks/databricks-sdk-go/config" "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/internal/env" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/config" + "github.com/databricks/databricks-sdk-go/databricks/env" + "github.com/databricks/databricks-sdk-go/databricks/useragent" "github.com/databricks/databricks-sdk-go/version" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/common/environment/azure.go b/databricks/common/environment/azure.go similarity index 100% rename from common/environment/azure.go rename to databricks/common/environment/azure.go diff --git a/common/environment/environments.go b/databricks/common/environment/environments.go similarity index 100% rename from common/environment/environments.go rename to databricks/common/environment/environments.go diff --git a/common/environment/environments_test.go b/databricks/common/environment/environments_test.go similarity index 100% rename from common/environment/environments_test.go rename to databricks/common/environment/environments_test.go diff --git a/common/request.go b/databricks/common/request.go similarity index 100% rename from common/request.go rename to databricks/common/request.go diff --git a/common/response.go b/databricks/common/response.go similarity index 100% rename from common/response.go rename to databricks/common/response.go diff --git a/common/response_test.go b/databricks/common/response_test.go similarity index 100% rename from common/response_test.go rename to databricks/common/response_test.go diff --git a/config/README.md b/databricks/config/README.md similarity index 100% rename from config/README.md rename to databricks/config/README.md diff --git a/config/api_client.go b/databricks/config/api_client.go similarity index 93% rename from config/api_client.go rename to databricks/config/api_client.go index 5c2d772ab..a89a1dd83 100644 --- a/config/api_client.go +++ b/databricks/config/api_client.go @@ -8,10 +8,10 @@ import ( "net/url" "time" - "github.com/databricks/databricks-sdk-go/config/credentials" "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/httpclient" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) func (c *Config) NewApiClient() (*httpclient.ApiClient, error) { diff --git a/config/auth_azure_cli.go b/databricks/config/auth_azure_cli.go similarity index 99% rename from config/auth_azure_cli.go rename to databricks/config/auth_azure_cli.go index ba4f71869..8d450be77 100644 --- a/config/auth_azure_cli.go +++ b/databricks/config/auth_azure_cli.go @@ -11,7 +11,7 @@ import ( "golang.org/x/oauth2" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "github.com/databricks/databricks-sdk-go/databricks/log" ) diff --git a/config/auth_azure_cli_test.go b/databricks/config/auth_azure_cli_test.go similarity index 99% rename from config/auth_azure_cli_test.go rename to databricks/config/auth_azure_cli_test.go index c2c8f7422..86ec0332c 100644 --- a/config/auth_azure_cli_test.go +++ b/databricks/config/auth_azure_cli_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - "github.com/databricks/databricks-sdk-go/internal/env" + "github.com/databricks/databricks-sdk-go/databricks/env" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/config/auth_azure_client_secret.go b/databricks/config/auth_azure_client_secret.go similarity index 96% rename from config/auth_azure_client_secret.go rename to databricks/config/auth_azure_client_secret.go index 262eb5585..19a8e9695 100644 --- a/config/auth_azure_client_secret.go +++ b/databricks/config/auth_azure_client_secret.go @@ -8,7 +8,7 @@ import ( "golang.org/x/oauth2" "golang.org/x/oauth2/clientcredentials" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "github.com/databricks/databricks-sdk-go/databricks/log" ) diff --git a/config/auth_azure_github_oidc.go b/databricks/config/auth_azure_github_oidc.go similarity index 96% rename from config/auth_azure_github_oidc.go rename to databricks/config/auth_azure_github_oidc.go index 0aab4cd83..9f2d53ee1 100644 --- a/config/auth_azure_github_oidc.go +++ b/databricks/config/auth_azure_github_oidc.go @@ -6,9 +6,9 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient" "golang.org/x/oauth2" ) diff --git a/config/auth_azure_github_oidc_test.go b/databricks/config/auth_azure_github_oidc_test.go similarity index 98% rename from config/auth_azure_github_oidc_test.go rename to databricks/config/auth_azure_github_oidc_test.go index 7f53e401d..dcd4f4ed8 100644 --- a/config/auth_azure_github_oidc_test.go +++ b/databricks/config/auth_azure_github_oidc_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "github.com/databricks/databricks-sdk-go/common/environment" - "github.com/databricks/databricks-sdk-go/httpclient/fixtures" + "github.com/databricks/databricks-sdk-go/databricks/common/environment" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/fixtures" "github.com/google/go-cmp/cmp" ) diff --git a/config/auth_azure_msi.go b/databricks/config/auth_azure_msi.go similarity index 96% rename from config/auth_azure_msi.go rename to databricks/config/auth_azure_msi.go index 79bb4ff53..111a8841f 100644 --- a/config/auth_azure_msi.go +++ b/databricks/config/auth_azure_msi.go @@ -8,9 +8,9 @@ import ( "net/http" "time" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient" "golang.org/x/oauth2" ) diff --git a/config/auth_azure_msi_test.go b/databricks/config/auth_azure_msi_test.go similarity index 98% rename from config/auth_azure_msi_test.go rename to databricks/config/auth_azure_msi_test.go index d83914a15..e811ba212 100644 --- a/config/auth_azure_msi_test.go +++ b/databricks/config/auth_azure_msi_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/databricks/databricks-sdk-go/databricks/apierr" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/fixtures" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient/fixtures" "github.com/stretchr/testify/require" ) diff --git a/config/auth_basic.go b/databricks/config/auth_basic.go similarity index 90% rename from config/auth_basic.go rename to databricks/config/auth_basic.go index 8b25fa456..d1deb3e01 100644 --- a/config/auth_basic.go +++ b/databricks/config/auth_basic.go @@ -6,7 +6,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" ) type BasicCredentials struct { diff --git a/config/auth_databricks_cli.go b/databricks/config/auth_databricks_cli.go similarity index 97% rename from config/auth_databricks_cli.go rename to databricks/config/auth_databricks_cli.go index 139b4b97f..3bead8841 100644 --- a/config/auth_databricks_cli.go +++ b/databricks/config/auth_databricks_cli.go @@ -10,7 +10,7 @@ import ( "path/filepath" "strings" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "github.com/databricks/databricks-sdk-go/databricks/log" "golang.org/x/oauth2" ) diff --git a/config/auth_databricks_cli_test.go b/databricks/config/auth_databricks_cli_test.go similarity index 98% rename from config/auth_databricks_cli_test.go rename to databricks/config/auth_databricks_cli_test.go index 5566d93c0..75df2fc3e 100644 --- a/config/auth_databricks_cli_test.go +++ b/databricks/config/auth_databricks_cli_test.go @@ -6,7 +6,7 @@ import ( "path/filepath" "testing" - "github.com/databricks/databricks-sdk-go/internal/env" + "github.com/databricks/databricks-sdk-go/databricks/env" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/config/auth_default.go b/databricks/config/auth_default.go similarity index 96% rename from config/auth_default.go rename to databricks/config/auth_default.go index 54f197505..15b17f179 100644 --- a/config/auth_default.go +++ b/databricks/config/auth_default.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "github.com/databricks/databricks-sdk-go/databricks/log" ) diff --git a/config/auth_default_test.go b/databricks/config/auth_default_test.go similarity index 66% rename from config/auth_default_test.go rename to databricks/config/auth_default_test.go index 78642c200..91586605c 100644 --- a/config/auth_default_test.go +++ b/databricks/config/auth_default_test.go @@ -5,9 +5,9 @@ import ( "errors" "testing" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/config" - "github.com/databricks/databricks-sdk-go/internal/env" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/config" + "github.com/databricks/databricks-sdk-go/databricks/env" "github.com/stretchr/testify/assert" ) diff --git a/config/auth_gcp_google_credentials.go b/databricks/config/auth_gcp_google_credentials.go similarity index 96% rename from config/auth_gcp_google_credentials.go rename to databricks/config/auth_gcp_google_credentials.go index 2c58a81c8..4d81e9b09 100644 --- a/config/auth_gcp_google_credentials.go +++ b/databricks/config/auth_gcp_google_credentials.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "os" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "github.com/databricks/databricks-sdk-go/databricks/log" "golang.org/x/oauth2/google" "google.golang.org/api/idtoken" diff --git a/config/auth_gcp_google_id.go b/databricks/config/auth_gcp_google_id.go similarity index 96% rename from config/auth_gcp_google_id.go rename to databricks/config/auth_gcp_google_id.go index 8a4b0a89d..f60bd2d6d 100644 --- a/config/auth_gcp_google_id.go +++ b/databricks/config/auth_gcp_google_id.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "github.com/databricks/databricks-sdk-go/databricks/log" "golang.org/x/oauth2" "google.golang.org/api/impersonate" diff --git a/config/auth_m2m.go b/databricks/config/auth_m2m.go similarity index 94% rename from config/auth_m2m.go rename to databricks/config/auth_m2m.go index fdd007d8e..bb8c307f6 100644 --- a/config/auth_m2m.go +++ b/databricks/config/auth_m2m.go @@ -8,9 +8,9 @@ import ( "golang.org/x/oauth2" "golang.org/x/oauth2/clientcredentials" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient" ) var errOAuthNotSupported = errors.New("databricks OAuth is not supported for this host") diff --git a/config/auth_m2m_test.go b/databricks/config/auth_m2m_test.go similarity index 96% rename from config/auth_m2m_test.go rename to databricks/config/auth_m2m_test.go index 518ec126a..d2ce3bd63 100644 --- a/config/auth_m2m_test.go +++ b/databricks/config/auth_m2m_test.go @@ -4,7 +4,7 @@ import ( "net/url" "testing" - "github.com/databricks/databricks-sdk-go/httpclient/fixtures" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/fixtures" "github.com/stretchr/testify/require" "golang.org/x/oauth2" ) diff --git a/config/auth_metadata_service.go b/databricks/config/auth_metadata_service.go similarity index 96% rename from config/auth_metadata_service.go rename to databricks/config/auth_metadata_service.go index a8d2916cf..749d58ca3 100644 --- a/config/auth_metadata_service.go +++ b/databricks/config/auth_metadata_service.go @@ -8,9 +8,9 @@ import ( "net/url" "time" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient" "golang.org/x/oauth2" ) diff --git a/config/auth_metadata_service_test.go b/databricks/config/auth_metadata_service_test.go similarity index 94% rename from config/auth_metadata_service_test.go rename to databricks/config/auth_metadata_service_test.go index 0e0c70844..3d0009332 100644 --- a/config/auth_metadata_service_test.go +++ b/databricks/config/auth_metadata_service_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go/httpclient" - "github.com/databricks/databricks-sdk-go/httpclient/fixtures" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/fixtures" "github.com/stretchr/testify/require" ) diff --git a/config/auth_pat.go b/databricks/config/auth_pat.go similarity index 87% rename from config/auth_pat.go rename to databricks/config/auth_pat.go index dc51256c8..7fd4305f9 100644 --- a/config/auth_pat.go +++ b/databricks/config/auth_pat.go @@ -5,7 +5,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" ) type PatCredentials struct { diff --git a/config/auth_permutations_test.go b/databricks/config/auth_permutations_test.go similarity index 99% rename from config/auth_permutations_test.go rename to databricks/config/auth_permutations_test.go index 1f0c4ed02..d9839a911 100644 --- a/config/auth_permutations_test.go +++ b/databricks/config/auth_permutations_test.go @@ -8,7 +8,7 @@ import ( "sync" "testing" - "github.com/databricks/databricks-sdk-go/internal/env" + "github.com/databricks/databricks-sdk-go/databricks/env" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/config/azure.go b/databricks/config/azure.go similarity index 98% rename from config/azure.go rename to databricks/config/azure.go index 7b4822d85..ca99abc43 100644 --- a/config/azure.go +++ b/databricks/config/azure.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/databricks/databricks-sdk-go/databricks/apierr" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient" "golang.org/x/oauth2" ) diff --git a/config/azure_test.go b/databricks/config/azure_test.go similarity index 100% rename from config/azure_test.go rename to databricks/config/azure_test.go diff --git a/config/command.go b/databricks/config/command.go similarity index 100% rename from config/command.go rename to databricks/config/command.go diff --git a/config/config.go b/databricks/config/config.go similarity index 98% rename from config/config.go rename to databricks/config/config.go index ebb464c6f..a3b7719c6 100644 --- a/config/config.go +++ b/databricks/config/config.go @@ -11,11 +11,11 @@ import ( "sync" "time" - "github.com/databricks/databricks-sdk-go/common" - "github.com/databricks/databricks-sdk-go/common/environment" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/common" + "github.com/databricks/databricks-sdk-go/databricks/common/environment" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient" "golang.org/x/oauth2" ) diff --git a/config/config_attribute.go b/databricks/config/config_attribute.go similarity index 100% rename from config/config_attribute.go rename to databricks/config/config_attribute.go diff --git a/config/config_attributes.go b/databricks/config/config_attributes.go similarity index 100% rename from config/config_attributes.go rename to databricks/config/config_attributes.go diff --git a/config/config_auth_details.go b/databricks/config/config_auth_details.go similarity index 100% rename from config/config_auth_details.go rename to databricks/config/config_auth_details.go diff --git a/config/config_auth_details_test.go b/databricks/config/config_auth_details_test.go similarity index 97% rename from config/config_auth_details_test.go rename to databricks/config/config_auth_details_test.go index 7393cb63c..2431d5712 100644 --- a/config/config_auth_details_test.go +++ b/databricks/config/config_auth_details_test.go @@ -3,7 +3,7 @@ package config import ( "testing" - "github.com/databricks/databricks-sdk-go/internal/env" + "github.com/databricks/databricks-sdk-go/databricks/env" "github.com/stretchr/testify/assert" ) diff --git a/config/config_file.go b/databricks/config/config_file.go similarity index 100% rename from config/config_file.go rename to databricks/config/config_file.go diff --git a/config/config_file_test.go b/databricks/config/config_file_test.go similarity index 100% rename from config/config_file_test.go rename to databricks/config/config_file_test.go diff --git a/config/config_test.go b/databricks/config/config_test.go similarity index 100% rename from config/config_test.go rename to databricks/config/config_test.go diff --git a/config/credentials/credentials.go b/databricks/config/credentials/credentials.go similarity index 100% rename from config/credentials/credentials.go rename to databricks/config/credentials/credentials.go diff --git a/config/environments.go b/databricks/config/environments.go similarity index 94% rename from config/environments.go rename to databricks/config/environments.go index 597fdf7b6..6f94a3f27 100644 --- a/config/environments.go +++ b/databricks/config/environments.go @@ -3,7 +3,7 @@ package config import ( "strings" - "github.com/databricks/databricks-sdk-go/common/environment" + "github.com/databricks/databricks-sdk-go/databricks/common/environment" ) func (c *Config) Environment() environment.DatabricksEnvironment { diff --git a/config/environments_test.go b/databricks/config/environments_test.go similarity index 87% rename from config/environments_test.go rename to databricks/config/environments_test.go index 901b882b7..e3fe96988 100644 --- a/config/environments_test.go +++ b/databricks/config/environments_test.go @@ -3,7 +3,7 @@ package config import ( "testing" - "github.com/databricks/databricks-sdk-go/common/environment" + "github.com/databricks/databricks-sdk-go/databricks/common/environment" "github.com/stretchr/testify/assert" ) diff --git a/config/example_test.go b/databricks/config/example_test.go similarity index 96% rename from config/example_test.go rename to databricks/config/example_test.go index a0a54b845..fa7215020 100644 --- a/config/example_test.go +++ b/databricks/config/example_test.go @@ -1,8 +1,8 @@ package config_test import ( - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/config" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/config" ) func ExampleConfig_pat() { diff --git a/config/oauth_visitors.go b/databricks/config/oauth_visitors.go similarity index 100% rename from config/oauth_visitors.go rename to databricks/config/oauth_visitors.go diff --git a/config/oauth_visitors_test.go b/databricks/config/oauth_visitors_test.go similarity index 100% rename from config/oauth_visitors_test.go rename to databricks/config/oauth_visitors_test.go diff --git a/config/reflect.go b/databricks/config/reflect.go similarity index 100% rename from config/reflect.go rename to databricks/config/reflect.go diff --git a/config/testdata/.databrickscfg b/databricks/config/testdata/.databrickscfg similarity index 100% rename from config/testdata/.databrickscfg rename to databricks/config/testdata/.databrickscfg diff --git a/config/testdata/az b/databricks/config/testdata/az similarity index 100% rename from config/testdata/az rename to databricks/config/testdata/az diff --git a/config/testdata/azure/.databrickscfg b/databricks/config/testdata/azure/.databrickscfg similarity index 100% rename from config/testdata/azure/.databrickscfg rename to databricks/config/testdata/azure/.databrickscfg diff --git a/config/testdata/corrupt/.databrickscfg b/databricks/config/testdata/corrupt/.databrickscfg similarity index 100% rename from config/testdata/corrupt/.databrickscfg rename to databricks/config/testdata/corrupt/.databrickscfg diff --git a/config/testdata/empty_default/.databrickscfg b/databricks/config/testdata/empty_default/.databrickscfg similarity index 100% rename from config/testdata/empty_default/.databrickscfg rename to databricks/config/testdata/empty_default/.databrickscfg diff --git a/config/visitors.go b/databricks/config/visitors.go similarity index 86% rename from config/visitors.go rename to databricks/config/visitors.go index c3ef78ad5..63a111f37 100644 --- a/config/visitors.go +++ b/databricks/config/visitors.go @@ -3,7 +3,7 @@ package config import ( "net/http" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type AuthType struct{} diff --git a/config/visitors_test.go b/databricks/config/visitors_test.go similarity index 94% rename from config/visitors_test.go rename to databricks/config/visitors_test.go index 511be3e1e..ddb650d03 100644 --- a/config/visitors_test.go +++ b/databricks/config/visitors_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/useragent" "github.com/stretchr/testify/assert" ) diff --git a/databricks/creds/creds.go b/databricks/creds/creds.go new file mode 100644 index 000000000..d49b0d771 --- /dev/null +++ b/databricks/creds/creds.go @@ -0,0 +1,13 @@ +package creds + +import "net/http" + +type Provider interface { + Refresh() error + Credentials() Credentials +} + +type Credentials interface { + Apply(r *http.Request) error + IsExpired() bool +} diff --git a/alias.go b/databricks/databricks.go similarity index 84% rename from alias.go rename to databricks/databricks.go index 8e84ff766..d8bc52a01 100644 --- a/alias.go +++ b/databricks/databricks.go @@ -1,8 +1,8 @@ package databricks import ( - "github.com/databricks/databricks-sdk-go/config" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/config" + "github.com/databricks/databricks-sdk-go/databricks/useragent" "github.com/databricks/databricks-sdk-go/version" ) diff --git a/internal/env/env.go b/databricks/env/env.go similarity index 100% rename from internal/env/env.go rename to databricks/env/env.go diff --git a/error_alias.go b/databricks/error_alias.go similarity index 100% rename from error_alias.go rename to databricks/error_alias.go diff --git a/httpclient/api_client.go b/databricks/httpclient/api_client.go similarity index 97% rename from httpclient/api_client.go rename to databricks/httpclient/api_client.go index dfa389ef4..a607b102f 100644 --- a/httpclient/api_client.go +++ b/databricks/httpclient/api_client.go @@ -12,12 +12,12 @@ import ( "strings" "time" - "github.com/databricks/databricks-sdk-go/common" + "github.com/databricks/databricks-sdk-go/databricks/common" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/traceparent" "github.com/databricks/databricks-sdk-go/databricks/httplog" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient/traceparent" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" "golang.org/x/oauth2" "golang.org/x/time/rate" ) diff --git a/httpclient/api_client_test.go b/databricks/httpclient/api_client_test.go similarity index 99% rename from httpclient/api_client_test.go rename to databricks/httpclient/api_client_test.go index 1c14d0df0..85ffc02df 100644 --- a/httpclient/api_client_test.go +++ b/databricks/httpclient/api_client_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go/common" + "github.com/databricks/databricks-sdk-go/databricks/common" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/httpclient/errors.go b/databricks/httpclient/errors.go similarity index 96% rename from httpclient/errors.go rename to databricks/httpclient/errors.go index 540c6b885..3d1295232 100644 --- a/httpclient/errors.go +++ b/databricks/httpclient/errors.go @@ -9,7 +9,7 @@ import ( "net/url" "strings" - "github.com/databricks/databricks-sdk-go/common" + "github.com/databricks/databricks-sdk-go/databricks/common" ) type HttpError struct { diff --git a/httpclient/errors_test.go b/databricks/httpclient/errors_test.go similarity index 100% rename from httpclient/errors_test.go rename to databricks/httpclient/errors_test.go diff --git a/httpclient/fixtures/fixture.go b/databricks/httpclient/fixtures/fixture.go similarity index 97% rename from httpclient/fixtures/fixture.go rename to databricks/httpclient/fixtures/fixture.go index 32b00fcbd..206ae0f1a 100644 --- a/httpclient/fixtures/fixture.go +++ b/databricks/httpclient/fixtures/fixture.go @@ -12,7 +12,7 @@ import ( "reflect" "strings" - "github.com/databricks/databricks-sdk-go/httpclient/traceparent" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/traceparent" ) // HTTPFixture defines request structure for test diff --git a/httpclient/fixtures/map_transport.go b/databricks/httpclient/fixtures/map_transport.go similarity index 100% rename from httpclient/fixtures/map_transport.go rename to databricks/httpclient/fixtures/map_transport.go diff --git a/httpclient/fixtures/map_transport_test.go b/databricks/httpclient/fixtures/map_transport_test.go similarity index 92% rename from httpclient/fixtures/map_transport_test.go rename to databricks/httpclient/fixtures/map_transport_test.go index 720397219..7bac8de7c 100644 --- a/httpclient/fixtures/map_transport_test.go +++ b/databricks/httpclient/fixtures/map_transport_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/fixtures" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/httpclient" - "github.com/databricks/databricks-sdk-go/httpclient/fixtures" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/httpclient/fixtures/named.go b/databricks/httpclient/fixtures/named.go similarity index 100% rename from httpclient/fixtures/named.go rename to databricks/httpclient/fixtures/named.go diff --git a/httpclient/fixtures/slice_transport.go b/databricks/httpclient/fixtures/slice_transport.go similarity index 100% rename from httpclient/fixtures/slice_transport.go rename to databricks/httpclient/fixtures/slice_transport.go diff --git a/httpclient/fixtures/slice_transport_test.go b/databricks/httpclient/fixtures/slice_transport_test.go similarity index 96% rename from httpclient/fixtures/slice_transport_test.go rename to databricks/httpclient/fixtures/slice_transport_test.go index 8e0cda287..85c2f9b4a 100644 --- a/httpclient/fixtures/slice_transport_test.go +++ b/databricks/httpclient/fixtures/slice_transport_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/databricks/databricks-sdk-go/httpclient" - "github.com/databricks/databricks-sdk-go/httpclient/fixtures" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/httpclient/fixtures" "github.com/stretchr/testify/assert" ) diff --git a/httpclient/fixtures/stub.go b/databricks/httpclient/fixtures/stub.go similarity index 100% rename from httpclient/fixtures/stub.go rename to databricks/httpclient/fixtures/stub.go diff --git a/httpclient/fixtures/testdata/some.json b/databricks/httpclient/fixtures/testdata/some.json similarity index 100% rename from httpclient/fixtures/testdata/some.json rename to databricks/httpclient/fixtures/testdata/some.json diff --git a/httpclient/oauth_token.go b/databricks/httpclient/oauth_token.go similarity index 95% rename from httpclient/oauth_token.go rename to databricks/httpclient/oauth_token.go index cb6ad5cc9..5f609286e 100644 --- a/httpclient/oauth_token.go +++ b/databricks/httpclient/oauth_token.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "golang.org/x/oauth2" ) diff --git a/httpclient/request.go b/databricks/httpclient/request.go similarity index 98% rename from httpclient/request.go rename to databricks/httpclient/request.go index b8401fe19..a67686fac 100644 --- a/httpclient/request.go +++ b/databricks/httpclient/request.go @@ -8,7 +8,7 @@ import ( "sort" "strings" - "github.com/databricks/databricks-sdk-go/common" + "github.com/databricks/databricks-sdk-go/databricks/common" "github.com/google/go-querystring/query" "golang.org/x/oauth2" ) diff --git a/httpclient/request_test.go b/databricks/httpclient/request_test.go similarity index 100% rename from httpclient/request_test.go rename to databricks/httpclient/request_test.go diff --git a/httpclient/response.go b/databricks/httpclient/response.go similarity index 98% rename from httpclient/response.go rename to databricks/httpclient/response.go index 339aee05b..33c15c098 100644 --- a/httpclient/response.go +++ b/databricks/httpclient/response.go @@ -10,8 +10,8 @@ import ( "strconv" "strings" - "github.com/databricks/databricks-sdk-go/common" "github.com/databricks/databricks-sdk-go/databricks/apierr" + "github.com/databricks/databricks-sdk-go/databricks/common" "github.com/databricks/databricks-sdk-go/databricks/log" ) diff --git a/httpclient/response_test.go b/databricks/httpclient/response_test.go similarity index 100% rename from httpclient/response_test.go rename to databricks/httpclient/response_test.go diff --git a/httpclient/timeout_context.go b/databricks/httpclient/timeout_context.go similarity index 100% rename from httpclient/timeout_context.go rename to databricks/httpclient/timeout_context.go diff --git a/httpclient/timeout_context_test.go b/databricks/httpclient/timeout_context_test.go similarity index 100% rename from httpclient/timeout_context_test.go rename to databricks/httpclient/timeout_context_test.go diff --git a/httpclient/traceparent/traceparent.go b/databricks/httpclient/traceparent/traceparent.go similarity index 100% rename from httpclient/traceparent/traceparent.go rename to databricks/httpclient/traceparent/traceparent.go diff --git a/httpclient/traceparent/traceparent_test.go b/databricks/httpclient/traceparent/traceparent_test.go similarity index 100% rename from httpclient/traceparent/traceparent_test.go rename to databricks/httpclient/traceparent/traceparent_test.go diff --git a/internal/acceptance_test.go b/databricks/internal/acceptance_test.go similarity index 96% rename from internal/acceptance_test.go rename to databricks/internal/acceptance_test.go index 470371838..bed503025 100644 --- a/internal/acceptance_test.go +++ b/databricks/internal/acceptance_test.go @@ -5,11 +5,11 @@ import ( "os/exec" "testing" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/config" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/apierr" + "github.com/databricks/databricks-sdk-go/databricks/config" + "github.com/databricks/databricks-sdk-go/databricks/env" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/internal/env" "github.com/databricks/databricks-sdk-go/service/compute" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/account_client_test.go b/databricks/internal/account_client_test.go similarity index 100% rename from internal/account_client_test.go rename to databricks/internal/account_client_test.go diff --git a/internal/account_test.go b/databricks/internal/account_test.go similarity index 100% rename from internal/account_test.go rename to databricks/internal/account_test.go diff --git a/internal/billing_test.go b/databricks/internal/billing_test.go similarity index 100% rename from internal/billing_test.go rename to databricks/internal/billing_test.go diff --git a/internal/catalog_test.go b/databricks/internal/catalog_test.go similarity index 99% rename from internal/catalog_test.go rename to databricks/internal/catalog_test.go index e15a3f6c0..ae12aa5ef 100644 --- a/internal/catalog_test.go +++ b/databricks/internal/catalog_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/retries" + "github.com/databricks/databricks-sdk-go/databricks/retries" "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/databricks/databricks-sdk-go/service/sql" "github.com/stretchr/testify/assert" diff --git a/internal/clusterpolicies_test.go b/databricks/internal/clusterpolicies_test.go similarity index 100% rename from internal/clusterpolicies_test.go rename to databricks/internal/clusterpolicies_test.go diff --git a/internal/clusters_test.go b/databricks/internal/clusters_test.go similarity index 95% rename from internal/clusters_test.go rename to databricks/internal/clusters_test.go index 7d2bd4bb6..c96a27bb5 100644 --- a/internal/clusters_test.go +++ b/databricks/internal/clusters_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/retries" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/retries" "github.com/databricks/databricks-sdk-go/service/compute" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/commands_test.go b/databricks/internal/commands_test.go similarity index 100% rename from internal/commands_test.go rename to databricks/internal/commands_test.go diff --git a/internal/connections_test.go b/databricks/internal/connections_test.go similarity index 100% rename from internal/connections_test.go rename to databricks/internal/connections_test.go diff --git a/internal/dbsql_test.go b/databricks/internal/dbsql_test.go similarity index 100% rename from internal/dbsql_test.go rename to databricks/internal/dbsql_test.go diff --git a/internal/deployment_test.go b/databricks/internal/deployment_test.go similarity index 99% rename from internal/deployment_test.go rename to databricks/internal/deployment_test.go index 814a5b052..fe26f43a5 100644 --- a/internal/deployment_test.go +++ b/databricks/internal/deployment_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/retries" + "github.com/databricks/databricks-sdk-go/databricks/retries" "github.com/databricks/databricks-sdk-go/service/provisioning" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/files_test.go b/databricks/internal/files_test.go similarity index 99% rename from internal/files_test.go rename to databricks/internal/files_test.go index b42bc69a5..656b57ab7 100644 --- a/internal/files_test.go +++ b/databricks/internal/files_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/databricks/databricks-sdk-go/service/files" diff --git a/internal/git_credentials_test.go b/databricks/internal/git_credentials_test.go similarity index 94% rename from internal/git_credentials_test.go rename to databricks/internal/git_credentials_test.go index a44e5eb6e..1060fba8b 100644 --- a/internal/git_credentials_test.go +++ b/databricks/internal/git_credentials_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/qa/lock" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/qa/lock" "github.com/databricks/databricks-sdk-go/service/workspace" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/globalinitscripts_test.go b/databricks/internal/globalinitscripts_test.go similarity index 100% rename from internal/globalinitscripts_test.go rename to databricks/internal/globalinitscripts_test.go diff --git a/internal/init_test.go b/databricks/internal/init_test.go similarity index 96% rename from internal/init_test.go rename to databricks/internal/init_test.go index 41ea2caad..26552aec3 100644 --- a/internal/init_test.go +++ b/databricks/internal/init_test.go @@ -12,10 +12,10 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/config" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/config" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/qa" + "github.com/databricks/databricks-sdk-go/databricks/qa" ) const fullCharset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" diff --git a/internal/instancepools_test.go b/databricks/internal/instancepools_test.go similarity index 100% rename from internal/instancepools_test.go rename to databricks/internal/instancepools_test.go diff --git a/internal/ipaccesslists_test.go b/databricks/internal/ipaccesslists_test.go similarity index 100% rename from internal/ipaccesslists_test.go rename to databricks/internal/ipaccesslists_test.go diff --git a/internal/jobs_test.go b/databricks/internal/jobs_test.go similarity index 100% rename from internal/jobs_test.go rename to databricks/internal/jobs_test.go diff --git a/internal/libraries_test.go b/databricks/internal/libraries_test.go similarity index 100% rename from internal/libraries_test.go rename to databricks/internal/libraries_test.go diff --git a/internal/metastore_test.go b/databricks/internal/metastore_test.go similarity index 100% rename from internal/metastore_test.go rename to databricks/internal/metastore_test.go diff --git a/internal/mlflow_test.go b/databricks/internal/mlflow_test.go similarity index 99% rename from internal/mlflow_test.go rename to databricks/internal/mlflow_test.go index e76813689..24df05419 100644 --- a/internal/mlflow_test.go +++ b/databricks/internal/mlflow_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/ml" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/permissions_test.go b/databricks/internal/permissions_test.go similarity index 100% rename from internal/permissions_test.go rename to databricks/internal/permissions_test.go diff --git a/internal/pipelines_test.go b/databricks/internal/pipelines_test.go similarity index 100% rename from internal/pipelines_test.go rename to databricks/internal/pipelines_test.go diff --git a/internal/repos_test.go b/databricks/internal/repos_test.go similarity index 100% rename from internal/repos_test.go rename to databricks/internal/repos_test.go diff --git a/internal/scim_test.go b/databricks/internal/scim_test.go similarity index 99% rename from internal/scim_test.go rename to databricks/internal/scim_test.go index 87eb3b9d8..7c3169c62 100644 --- a/internal/scim_test.go +++ b/databricks/internal/scim_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/apierr" "github.com/databricks/databricks-sdk-go/service/iam" "github.com/stretchr/testify/assert" diff --git a/internal/secrets_test.go b/databricks/internal/secrets_test.go similarity index 100% rename from internal/secrets_test.go rename to databricks/internal/secrets_test.go diff --git a/internal/sharing_test.go b/databricks/internal/sharing_test.go similarity index 100% rename from internal/sharing_test.go rename to databricks/internal/sharing_test.go diff --git a/internal/sql_test.go b/databricks/internal/sql_test.go similarity index 100% rename from internal/sql_test.go rename to databricks/internal/sql_test.go diff --git a/internal/tokenmanagement_test.go b/databricks/internal/tokenmanagement_test.go similarity index 100% rename from internal/tokenmanagement_test.go rename to databricks/internal/tokenmanagement_test.go diff --git a/internal/tokens_test.go b/databricks/internal/tokens_test.go similarity index 95% rename from internal/tokens_test.go rename to databricks/internal/tokens_test.go index a371b6528..3026e520f 100644 --- a/internal/tokens_test.go +++ b/databricks/internal/tokens_test.go @@ -3,7 +3,7 @@ package internal import ( "testing" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/settings" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/warehouses_test.go b/databricks/internal/warehouses_test.go similarity index 100% rename from internal/warehouses_test.go rename to databricks/internal/warehouses_test.go diff --git a/internal/workspace_client_test.go b/databricks/internal/workspace_client_test.go similarity index 100% rename from internal/workspace_client_test.go rename to databricks/internal/workspace_client_test.go diff --git a/internal/workspace_test.go b/databricks/internal/workspace_test.go similarity index 97% rename from internal/workspace_test.go rename to databricks/internal/workspace_test.go index 8ef97f14a..5d1ca8857 100644 --- a/internal/workspace_test.go +++ b/databricks/internal/workspace_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/ml" "github.com/databricks/databricks-sdk-go/service/workspace" "github.com/stretchr/testify/assert" @@ -16,7 +16,7 @@ import ( func myNotebookPath(t *testing.T, w *databricks.WorkspaceClient) string { ctx := context.Background() - testDir := filepath.Join("/Users", me(t, w).UserName, ".sdk", RandomName("t-")) + testDir := filepath.Join("/Users", me(t, w).UserName, ".sdk", "notebooks", RandomName("t-")) notebook := filepath.Join(testDir, RandomName("n-")) err := w.Workspace.MkdirsByPath(ctx, testDir) @@ -224,7 +224,7 @@ func TestAccWorkspaceRecursiveListNoTranspile(t *testing.T) { workspace.UploadOverwrite()) require.NoError(t, err) - allMyNotebooks, err := w.Workspace.RecursiveList(ctx, filepath.Join("/Users", me(t, w).UserName)) + allMyNotebooks, err := w.Workspace.RecursiveList(ctx, filepath.Join("/Users", me(t, w).UserName, ".sdk")) require.NoError(t, err) assert.True(t, len(allMyNotebooks) >= 1) } diff --git a/internal/workspaceconf_test.go b/databricks/internal/workspaceconf_test.go similarity index 100% rename from internal/workspaceconf_test.go rename to databricks/internal/workspaceconf_test.go diff --git a/listing/listing.go b/databricks/listing/listing.go similarity index 100% rename from listing/listing.go rename to databricks/listing/listing.go diff --git a/listing/listing_test.go b/databricks/listing/listing_test.go similarity index 99% rename from listing/listing_test.go rename to databricks/listing/listing_test.go index cc925b6cb..f7a6cb750 100644 --- a/listing/listing_test.go +++ b/databricks/listing/listing_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "github.com/databricks/databricks-sdk-go/listing" + "github.com/databricks/databricks-sdk-go/databricks/listing" "github.com/stretchr/testify/assert" ) diff --git a/marshal/composite_test.go b/databricks/marshal/composite_test.go similarity index 100% rename from marshal/composite_test.go rename to databricks/marshal/composite_test.go diff --git a/marshal/marshal.go b/databricks/marshal/marshal.go similarity index 100% rename from marshal/marshal.go rename to databricks/marshal/marshal.go diff --git a/marshal/mixed_test.go b/databricks/marshal/mixed_test.go similarity index 100% rename from marshal/mixed_test.go rename to databricks/marshal/mixed_test.go diff --git a/marshal/reflect_cache.go b/databricks/marshal/reflect_cache.go similarity index 100% rename from marshal/reflect_cache.go rename to databricks/marshal/reflect_cache.go diff --git a/marshal/types.go b/databricks/marshal/types.go similarity index 100% rename from marshal/types.go rename to databricks/marshal/types.go diff --git a/marshal/types_basemap_test.go b/databricks/marshal/types_basemap_test.go similarity index 100% rename from marshal/types_basemap_test.go rename to databricks/marshal/types_basemap_test.go diff --git a/marshal/types_bool_test.go b/databricks/marshal/types_bool_test.go similarity index 100% rename from marshal/types_bool_test.go rename to databricks/marshal/types_bool_test.go diff --git a/marshal/types_childfs_test.go b/databricks/marshal/types_childfs_test.go similarity index 100% rename from marshal/types_childfs_test.go rename to databricks/marshal/types_childfs_test.go diff --git a/marshal/types_childnofs_test.go b/databricks/marshal/types_childnofs_test.go similarity index 100% rename from marshal/types_childnofs_test.go rename to databricks/marshal/types_childnofs_test.go diff --git a/marshal/types_float_test.go b/databricks/marshal/types_float_test.go similarity index 100% rename from marshal/types_float_test.go rename to databricks/marshal/types_float_test.go diff --git a/marshal/types_int_test.go b/databricks/marshal/types_int_test.go similarity index 100% rename from marshal/types_int_test.go rename to databricks/marshal/types_int_test.go diff --git a/marshal/types_interface_test.go b/databricks/marshal/types_interface_test.go similarity index 100% rename from marshal/types_interface_test.go rename to databricks/marshal/types_interface_test.go diff --git a/marshal/types_maptoarray_test.go b/databricks/marshal/types_maptoarray_test.go similarity index 100% rename from marshal/types_maptoarray_test.go rename to databricks/marshal/types_maptoarray_test.go diff --git a/marshal/types_maptocustom_test.go b/databricks/marshal/types_maptocustom_test.go similarity index 100% rename from marshal/types_maptocustom_test.go rename to databricks/marshal/types_maptocustom_test.go diff --git a/marshal/types_maptointerface_test.go b/databricks/marshal/types_maptointerface_test.go similarity index 100% rename from marshal/types_maptointerface_test.go rename to databricks/marshal/types_maptointerface_test.go diff --git a/marshal/types_pbool_test.go b/databricks/marshal/types_pbool_test.go similarity index 100% rename from marshal/types_pbool_test.go rename to databricks/marshal/types_pbool_test.go diff --git a/marshal/types_pchildfs_test.go b/databricks/marshal/types_pchildfs_test.go similarity index 100% rename from marshal/types_pchildfs_test.go rename to databricks/marshal/types_pchildfs_test.go diff --git a/marshal/types_pchildnofs_test.go b/databricks/marshal/types_pchildnofs_test.go similarity index 100% rename from marshal/types_pchildnofs_test.go rename to databricks/marshal/types_pchildnofs_test.go diff --git a/marshal/types_pfloat_test.go b/databricks/marshal/types_pfloat_test.go similarity index 100% rename from marshal/types_pfloat_test.go rename to databricks/marshal/types_pfloat_test.go diff --git a/marshal/types_pint_test.go b/databricks/marshal/types_pint_test.go similarity index 100% rename from marshal/types_pint_test.go rename to databricks/marshal/types_pint_test.go diff --git a/marshal/types_pstring_test.go b/databricks/marshal/types_pstring_test.go similarity index 100% rename from marshal/types_pstring_test.go rename to databricks/marshal/types_pstring_test.go diff --git a/marshal/types_slice_test.go b/databricks/marshal/types_slice_test.go similarity index 100% rename from marshal/types_slice_test.go rename to databricks/marshal/types_slice_test.go diff --git a/marshal/types_string_test.go b/databricks/marshal/types_string_test.go similarity index 100% rename from marshal/types_string_test.go rename to databricks/marshal/types_string_test.go diff --git a/marshal/types_test.go b/databricks/marshal/types_test.go similarity index 100% rename from marshal/types_test.go rename to databricks/marshal/types_test.go diff --git a/marshal/unmarshal.go b/databricks/marshal/unmarshal.go similarity index 100% rename from marshal/unmarshal.go rename to databricks/marshal/unmarshal.go diff --git a/qa/debug.go b/databricks/qa/debug.go similarity index 100% rename from qa/debug.go rename to databricks/qa/debug.go diff --git a/qa/http_fixture.go b/databricks/qa/http_fixture.go similarity index 97% rename from qa/http_fixture.go rename to databricks/qa/http_fixture.go index 03dbb5302..8dc37df1e 100644 --- a/qa/http_fixture.go +++ b/databricks/qa/http_fixture.go @@ -10,9 +10,9 @@ import ( "strings" "testing" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/config" "github.com/databricks/databricks-sdk-go/databricks/apierr" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/config" "github.com/stretchr/testify/assert" ) diff --git a/qa/lock/core/backend.go b/databricks/qa/lock/core/backend.go similarity index 100% rename from qa/lock/core/backend.go rename to databricks/qa/lock/core/backend.go diff --git a/qa/lock/core/lockable.go b/databricks/qa/lock/core/lockable.go similarity index 100% rename from qa/lock/core/lockable.go rename to databricks/qa/lock/core/lockable.go diff --git a/qa/lock/core/state.go b/databricks/qa/lock/core/state.go similarity index 97% rename from qa/lock/core/state.go rename to databricks/qa/lock/core/state.go index ddb6c403c..b86715f88 100644 --- a/qa/lock/core/state.go +++ b/databricks/qa/lock/core/state.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go/qa" + "github.com/databricks/databricks-sdk-go/databricks/qa" ) // LockState represents the state of a lock. diff --git a/qa/lock/databricks/databricks_backend.go b/databricks/qa/lock/databricks/databricks_backend.go similarity index 97% rename from qa/lock/databricks/databricks_backend.go rename to databricks/qa/lock/databricks/databricks_backend.go index 1a4f9ba5c..6e02f9568 100644 --- a/qa/lock/databricks/databricks_backend.go +++ b/databricks/qa/lock/databricks/databricks_backend.go @@ -10,9 +10,9 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/qa/lock/core" + "github.com/databricks/databricks-sdk-go/databricks/qa/lock/core" "github.com/databricks/databricks-sdk-go/service/workspace" ) diff --git a/qa/lock/internal/lockable.go b/databricks/qa/lock/internal/lockable.go similarity index 100% rename from qa/lock/internal/lockable.go rename to databricks/qa/lock/internal/lockable.go diff --git a/qa/lock/internal/lockable_test.go b/databricks/qa/lock/internal/lockable_test.go similarity index 100% rename from qa/lock/internal/lockable_test.go rename to databricks/qa/lock/internal/lockable_test.go diff --git a/qa/lock/lock.go b/databricks/qa/lock/lock.go similarity index 96% rename from qa/lock/lock.go rename to databricks/qa/lock/lock.go index 5921f752b..482c0fc2f 100644 --- a/qa/lock/lock.go +++ b/databricks/qa/lock/lock.go @@ -6,8 +6,8 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/qa/lock/core" - "github.com/databricks/databricks-sdk-go/qa/lock/databricks" + "github.com/databricks/databricks-sdk-go/databricks/qa/lock/core" + "github.com/databricks/databricks-sdk-go/databricks/qa/lock/databricks" "github.com/google/uuid" ) diff --git a/qa/lock/lock_options.go b/databricks/qa/lock/lock_options.go similarity index 88% rename from qa/lock/lock_options.go rename to databricks/qa/lock/lock_options.go index 46139a07d..1d5cda0fe 100644 --- a/qa/lock/lock_options.go +++ b/databricks/qa/lock/lock_options.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go/qa/lock/core" + "github.com/databricks/databricks-sdk-go/databricks/qa/lock/core" ) type LockOption func(*LockOptions) diff --git a/qa/lock/lock_test.go b/databricks/qa/lock/lock_test.go similarity index 97% rename from qa/lock/lock_test.go rename to databricks/qa/lock/lock_test.go index f067a65c2..1851a98be 100644 --- a/qa/lock/lock_test.go +++ b/databricks/qa/lock/lock_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/databricks/databricks-sdk-go/qa/lock/core" + "github.com/databricks/databricks-sdk-go/databricks/qa/lock/core" "github.com/stretchr/testify/assert" ) diff --git a/qa/lock/lockables.go b/databricks/qa/lock/lockables.go similarity index 91% rename from qa/lock/lockables.go rename to databricks/qa/lock/lockables.go index 013dc0f6a..2fa66bbfc 100644 --- a/qa/lock/lockables.go +++ b/databricks/qa/lock/lockables.go @@ -1,6 +1,6 @@ package lock -import "github.com/databricks/databricks-sdk-go/qa/lock/internal" +import "github.com/databricks/databricks-sdk-go/databricks/qa/lock/internal" // GitCredentials are unique to the user and workspace. type GitCredentials struct { diff --git a/qa/poll/poll.go b/databricks/qa/poll/poll.go similarity index 100% rename from qa/poll/poll.go rename to databricks/qa/poll/poll.go diff --git a/qa/poll/poll_test.go b/databricks/qa/poll/poll_test.go similarity index 85% rename from qa/poll/poll_test.go rename to databricks/qa/poll/poll_test.go index 2fc9e82cd..05597c40a 100644 --- a/qa/poll/poll_test.go +++ b/databricks/qa/poll/poll_test.go @@ -3,7 +3,7 @@ package poll_test import ( "testing" - "github.com/databricks/databricks-sdk-go/qa/poll" + "github.com/databricks/databricks-sdk-go/databricks/qa/poll" "github.com/databricks/databricks-sdk-go/service/sql" "github.com/stretchr/testify/assert" ) diff --git a/retries/retries.go b/databricks/retries/retries.go similarity index 100% rename from retries/retries.go rename to databricks/retries/retries.go diff --git a/retries/retries_test.go b/databricks/retries/retries_test.go similarity index 100% rename from retries/retries_test.go rename to databricks/retries/retries_test.go diff --git a/useragent/cicd.go b/databricks/useragent/cicd.go similarity index 100% rename from useragent/cicd.go rename to databricks/useragent/cicd.go diff --git a/useragent/cicd_test.go b/databricks/useragent/cicd_test.go similarity index 98% rename from useragent/cicd_test.go rename to databricks/useragent/cicd_test.go index 6c4898641..dced21c19 100644 --- a/useragent/cicd_test.go +++ b/databricks/useragent/cicd_test.go @@ -3,7 +3,7 @@ package useragent import ( "testing" - "github.com/databricks/databricks-sdk-go/internal/env" + "github.com/databricks/databricks-sdk-go/databricks/env" "github.com/stretchr/testify/assert" ) diff --git a/useragent/patterns.go b/databricks/useragent/patterns.go similarity index 100% rename from useragent/patterns.go rename to databricks/useragent/patterns.go diff --git a/useragent/patterns_test.go b/databricks/useragent/patterns_test.go similarity index 100% rename from useragent/patterns_test.go rename to databricks/useragent/patterns_test.go diff --git a/useragent/runtime.go b/databricks/useragent/runtime.go similarity index 100% rename from useragent/runtime.go rename to databricks/useragent/runtime.go diff --git a/useragent/runtime_test.go b/databricks/useragent/runtime_test.go similarity index 100% rename from useragent/runtime_test.go rename to databricks/useragent/runtime_test.go diff --git a/useragent/user_agent.go b/databricks/useragent/user_agent.go similarity index 100% rename from useragent/user_agent.go rename to databricks/useragent/user_agent.go diff --git a/useragent/user_agent_test.go b/databricks/useragent/user_agent_test.go similarity index 100% rename from useragent/user_agent_test.go rename to databricks/useragent/user_agent_test.go diff --git a/workspace_client.go b/databricks/workspace_client.go similarity index 99% rename from workspace_client.go rename to databricks/workspace_client.go index f0bc03167..f3eadb8cb 100755 --- a/workspace_client.go +++ b/databricks/workspace_client.go @@ -5,9 +5,9 @@ package databricks import ( "errors" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/config" - "github.com/databricks/databricks-sdk-go/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/config" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" "github.com/databricks/databricks-sdk-go/service/apps" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/workspace_functions.go b/databricks/workspace_functions.go similarity index 89% rename from workspace_functions.go rename to databricks/workspace_functions.go index 9a7e52a2e..bfba36589 100644 --- a/workspace_functions.go +++ b/databricks/workspace_functions.go @@ -4,7 +4,7 @@ import ( "context" "strconv" - "github.com/databricks/databricks-sdk-go/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" ) // CurrentWorkspaceID returns the workspace ID of the workspace that this client is diff --git a/examples/aad-explicit-spn/main.go b/examples/aad-explicit-spn/main.go index 078f3d380..ebbb1ad8f 100644 --- a/examples/aad-explicit-spn/main.go +++ b/examples/aad-explicit-spn/main.go @@ -7,8 +7,8 @@ import ( "os" "strings" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/config" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/config" "github.com/databricks/databricks-sdk-go/service/compute" ) diff --git a/examples/custom-auth/main.go b/examples/custom-auth/main.go index 76b48cab9..a750c2018 100644 --- a/examples/custom-auth/main.go +++ b/examples/custom-auth/main.go @@ -8,9 +8,9 @@ import ( "os" "strings" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/config" - "github.com/databricks/databricks-sdk-go/config/credentials" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/config" + "github.com/databricks/databricks-sdk-go/databricks/config/credentials" "github.com/databricks/databricks-sdk-go/service/compute" ) diff --git a/examples/default-auth/main.go b/examples/default-auth/main.go index 3141d05ea..dd1f4f304 100644 --- a/examples/default-auth/main.go +++ b/examples/default-auth/main.go @@ -3,7 +3,7 @@ package main import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/compute" ) diff --git a/examples/http-proxy/client/main.go b/examples/http-proxy/client/main.go index a007733f1..11aa4852a 100644 --- a/examples/http-proxy/client/main.go +++ b/examples/http-proxy/client/main.go @@ -7,7 +7,7 @@ import ( "net/http" "os" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" ) diff --git a/examples/long-running/main.go b/examples/long-running/main.go index 64b98b161..e125314cd 100644 --- a/examples/long-running/main.go +++ b/examples/long-running/main.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/compute" "github.com/databricks/databricks-sdk-go/service/jobs" ) diff --git a/examples/mocking/dbfs_test.go b/examples/mocking/dbfs_test.go index 34898c0fb..c865d8276 100644 --- a/examples/mocking/dbfs_test.go +++ b/examples/mocking/dbfs_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/dbfs" ) diff --git a/examples/slog/main.go b/examples/slog/main.go index 0a8f71128..aec776f1b 100644 --- a/examples/slog/main.go +++ b/examples/slog/main.go @@ -4,7 +4,7 @@ import ( "context" "flag" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "golang.org/x/exp/slog" ) diff --git a/examples/useragent/main.go b/examples/useragent/main.go index 7d54d577e..d69f4b263 100644 --- a/examples/useragent/main.go +++ b/examples/useragent/main.go @@ -3,8 +3,8 @@ package main import ( "context" - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) // Run this example by running `go run ./examples/useragent` from the root of this repository. diff --git a/examples/zerolog/main.go b/examples/zerolog/main.go index b4f6ae049..f3f20d43e 100644 --- a/examples/zerolog/main.go +++ b/examples/zerolog/main.go @@ -5,7 +5,7 @@ import ( "flag" "os" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/rs/zerolog" zlog "github.com/rs/zerolog/log" diff --git a/experimental/mocks/mock_account_client.go b/experimental/mocks/mock_account_client.go deleted file mode 100755 index af59c5a2e..000000000 --- a/experimental/mocks/mock_account_client.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package mocks - -import ( - "fmt" - - "github.com/databricks/databricks-sdk-go" - "github.com/stretchr/testify/mock" - - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/billing" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/catalog" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/iam" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/oauth2" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/provisioning" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/settings" -) - -type MockAccountClient struct { - AccountClient *databricks.AccountClient -} - -// NewMockAccountClient creates new mocked version of Databricks SDK client for Accounts -// which can be used for testing. -func NewMockAccountClient(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountClient { - cli := &MockAccountClient{ - AccountClient: &databricks.AccountClient{ - Config: nil, - - AccessControl: iam.NewMockAccountAccessControlInterface(t), - BillableUsage: billing.NewMockBillableUsageInterface(t), - Credentials: provisioning.NewMockCredentialsInterface(t), - CustomAppIntegration: oauth2.NewMockCustomAppIntegrationInterface(t), - EncryptionKeys: provisioning.NewMockEncryptionKeysInterface(t), - FederationPolicy: oauth2.NewMockAccountFederationPolicyInterface(t), - Groups: iam.NewMockAccountGroupsInterface(t), - IpAccessLists: settings.NewMockAccountIpAccessListsInterface(t), - LogDelivery: billing.NewMockLogDeliveryInterface(t), - MetastoreAssignments: catalog.NewMockAccountMetastoreAssignmentsInterface(t), - Metastores: catalog.NewMockAccountMetastoresInterface(t), - NetworkConnectivity: settings.NewMockNetworkConnectivityInterface(t), - Networks: provisioning.NewMockNetworksInterface(t), - OAuthPublishedApps: oauth2.NewMockOAuthPublishedAppsInterface(t), - PrivateAccess: provisioning.NewMockPrivateAccessInterface(t), - PublishedAppIntegration: oauth2.NewMockPublishedAppIntegrationInterface(t), - ServicePrincipalFederationPolicy: oauth2.NewMockServicePrincipalFederationPolicyInterface(t), - ServicePrincipalSecrets: oauth2.NewMockServicePrincipalSecretsInterface(t), - ServicePrincipals: iam.NewMockAccountServicePrincipalsInterface(t), - Settings: settings.NewMockAccountSettingsInterface(t), - Storage: provisioning.NewMockStorageInterface(t), - StorageCredentials: catalog.NewMockAccountStorageCredentialsInterface(t), - UsageDashboards: billing.NewMockUsageDashboardsInterface(t), - Users: iam.NewMockAccountUsersInterface(t), - VpcEndpoints: provisioning.NewMockVpcEndpointsInterface(t), - WorkspaceAssignment: iam.NewMockWorkspaceAssignmentInterface(t), - Workspaces: provisioning.NewMockWorkspacesInterface(t), - Budgets: billing.NewMockBudgetsInterface(t), - }, - } - - mockAccountSettingsAPI := cli.GetMockAccountSettingsAPI() - - mockCspEnablementAccount := settings.NewMockCspEnablementAccountInterface(t) - mockAccountSettingsAPI.On("CspEnablementAccount").Return(mockCspEnablementAccount).Maybe() - - mockDisableLegacyFeatures := settings.NewMockDisableLegacyFeaturesInterface(t) - mockAccountSettingsAPI.On("DisableLegacyFeatures").Return(mockDisableLegacyFeatures).Maybe() - - mockEsmEnablementAccount := settings.NewMockEsmEnablementAccountInterface(t) - mockAccountSettingsAPI.On("EsmEnablementAccount").Return(mockEsmEnablementAccount).Maybe() - - mockPersonalCompute := settings.NewMockPersonalComputeInterface(t) - mockAccountSettingsAPI.On("PersonalCompute").Return(mockPersonalCompute).Maybe() - - return cli -} - -func (m *MockAccountClient) GetMockCspEnablementAccountAPI() *settings.MockCspEnablementAccountInterface { - api, ok := m.GetMockAccountSettingsAPI().CspEnablementAccount().(*settings.MockCspEnablementAccountInterface) - if !ok { - panic(fmt.Sprintf("expected CspEnablementAccount to be *settings.MockCspEnablementAccountInterface, actual was %T", m.GetMockAccountSettingsAPI().CspEnablementAccount())) - } - return api -} - -func (m *MockAccountClient) GetMockDisableLegacyFeaturesAPI() *settings.MockDisableLegacyFeaturesInterface { - api, ok := m.GetMockAccountSettingsAPI().DisableLegacyFeatures().(*settings.MockDisableLegacyFeaturesInterface) - if !ok { - panic(fmt.Sprintf("expected DisableLegacyFeatures to be *settings.MockDisableLegacyFeaturesInterface, actual was %T", m.GetMockAccountSettingsAPI().DisableLegacyFeatures())) - } - return api -} - -func (m *MockAccountClient) GetMockEsmEnablementAccountAPI() *settings.MockEsmEnablementAccountInterface { - api, ok := m.GetMockAccountSettingsAPI().EsmEnablementAccount().(*settings.MockEsmEnablementAccountInterface) - if !ok { - panic(fmt.Sprintf("expected EsmEnablementAccount to be *settings.MockEsmEnablementAccountInterface, actual was %T", m.GetMockAccountSettingsAPI().EsmEnablementAccount())) - } - return api -} - -func (m *MockAccountClient) GetMockPersonalComputeAPI() *settings.MockPersonalComputeInterface { - api, ok := m.GetMockAccountSettingsAPI().PersonalCompute().(*settings.MockPersonalComputeInterface) - if !ok { - panic(fmt.Sprintf("expected PersonalCompute to be *settings.MockPersonalComputeInterface, actual was %T", m.GetMockAccountSettingsAPI().PersonalCompute())) - } - return api -} - -func (m *MockAccountClient) GetMockAccountAccessControlAPI() *iam.MockAccountAccessControlInterface { - api, ok := m.AccountClient.AccessControl.(*iam.MockAccountAccessControlInterface) - if !ok { - panic(fmt.Sprintf("expected AccessControl to be *iam.MockAccountAccessControlInterface, actual was %T", m.AccountClient.AccessControl)) - } - return api -} - -func (m *MockAccountClient) GetMockBillableUsageAPI() *billing.MockBillableUsageInterface { - api, ok := m.AccountClient.BillableUsage.(*billing.MockBillableUsageInterface) - if !ok { - panic(fmt.Sprintf("expected BillableUsage to be *billing.MockBillableUsageInterface, actual was %T", m.AccountClient.BillableUsage)) - } - return api -} - -func (m *MockAccountClient) GetMockCredentialsAPI() *provisioning.MockCredentialsInterface { - api, ok := m.AccountClient.Credentials.(*provisioning.MockCredentialsInterface) - if !ok { - panic(fmt.Sprintf("expected Credentials to be *provisioning.MockCredentialsInterface, actual was %T", m.AccountClient.Credentials)) - } - return api -} - -func (m *MockAccountClient) GetMockCustomAppIntegrationAPI() *oauth2.MockCustomAppIntegrationInterface { - api, ok := m.AccountClient.CustomAppIntegration.(*oauth2.MockCustomAppIntegrationInterface) - if !ok { - panic(fmt.Sprintf("expected CustomAppIntegration to be *oauth2.MockCustomAppIntegrationInterface, actual was %T", m.AccountClient.CustomAppIntegration)) - } - return api -} - -func (m *MockAccountClient) GetMockEncryptionKeysAPI() *provisioning.MockEncryptionKeysInterface { - api, ok := m.AccountClient.EncryptionKeys.(*provisioning.MockEncryptionKeysInterface) - if !ok { - panic(fmt.Sprintf("expected EncryptionKeys to be *provisioning.MockEncryptionKeysInterface, actual was %T", m.AccountClient.EncryptionKeys)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountFederationPolicyAPI() *oauth2.MockAccountFederationPolicyInterface { - api, ok := m.AccountClient.FederationPolicy.(*oauth2.MockAccountFederationPolicyInterface) - if !ok { - panic(fmt.Sprintf("expected FederationPolicy to be *oauth2.MockAccountFederationPolicyInterface, actual was %T", m.AccountClient.FederationPolicy)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountGroupsAPI() *iam.MockAccountGroupsInterface { - api, ok := m.AccountClient.Groups.(*iam.MockAccountGroupsInterface) - if !ok { - panic(fmt.Sprintf("expected Groups to be *iam.MockAccountGroupsInterface, actual was %T", m.AccountClient.Groups)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountIpAccessListsAPI() *settings.MockAccountIpAccessListsInterface { - api, ok := m.AccountClient.IpAccessLists.(*settings.MockAccountIpAccessListsInterface) - if !ok { - panic(fmt.Sprintf("expected IpAccessLists to be *settings.MockAccountIpAccessListsInterface, actual was %T", m.AccountClient.IpAccessLists)) - } - return api -} - -func (m *MockAccountClient) GetMockLogDeliveryAPI() *billing.MockLogDeliveryInterface { - api, ok := m.AccountClient.LogDelivery.(*billing.MockLogDeliveryInterface) - if !ok { - panic(fmt.Sprintf("expected LogDelivery to be *billing.MockLogDeliveryInterface, actual was %T", m.AccountClient.LogDelivery)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountMetastoreAssignmentsAPI() *catalog.MockAccountMetastoreAssignmentsInterface { - api, ok := m.AccountClient.MetastoreAssignments.(*catalog.MockAccountMetastoreAssignmentsInterface) - if !ok { - panic(fmt.Sprintf("expected MetastoreAssignments to be *catalog.MockAccountMetastoreAssignmentsInterface, actual was %T", m.AccountClient.MetastoreAssignments)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountMetastoresAPI() *catalog.MockAccountMetastoresInterface { - api, ok := m.AccountClient.Metastores.(*catalog.MockAccountMetastoresInterface) - if !ok { - panic(fmt.Sprintf("expected Metastores to be *catalog.MockAccountMetastoresInterface, actual was %T", m.AccountClient.Metastores)) - } - return api -} - -func (m *MockAccountClient) GetMockNetworkConnectivityAPI() *settings.MockNetworkConnectivityInterface { - api, ok := m.AccountClient.NetworkConnectivity.(*settings.MockNetworkConnectivityInterface) - if !ok { - panic(fmt.Sprintf("expected NetworkConnectivity to be *settings.MockNetworkConnectivityInterface, actual was %T", m.AccountClient.NetworkConnectivity)) - } - return api -} - -func (m *MockAccountClient) GetMockNetworksAPI() *provisioning.MockNetworksInterface { - api, ok := m.AccountClient.Networks.(*provisioning.MockNetworksInterface) - if !ok { - panic(fmt.Sprintf("expected Networks to be *provisioning.MockNetworksInterface, actual was %T", m.AccountClient.Networks)) - } - return api -} - -func (m *MockAccountClient) GetMockOAuthPublishedAppsAPI() *oauth2.MockOAuthPublishedAppsInterface { - api, ok := m.AccountClient.OAuthPublishedApps.(*oauth2.MockOAuthPublishedAppsInterface) - if !ok { - panic(fmt.Sprintf("expected OAuthPublishedApps to be *oauth2.MockOAuthPublishedAppsInterface, actual was %T", m.AccountClient.OAuthPublishedApps)) - } - return api -} - -func (m *MockAccountClient) GetMockPrivateAccessAPI() *provisioning.MockPrivateAccessInterface { - api, ok := m.AccountClient.PrivateAccess.(*provisioning.MockPrivateAccessInterface) - if !ok { - panic(fmt.Sprintf("expected PrivateAccess to be *provisioning.MockPrivateAccessInterface, actual was %T", m.AccountClient.PrivateAccess)) - } - return api -} - -func (m *MockAccountClient) GetMockPublishedAppIntegrationAPI() *oauth2.MockPublishedAppIntegrationInterface { - api, ok := m.AccountClient.PublishedAppIntegration.(*oauth2.MockPublishedAppIntegrationInterface) - if !ok { - panic(fmt.Sprintf("expected PublishedAppIntegration to be *oauth2.MockPublishedAppIntegrationInterface, actual was %T", m.AccountClient.PublishedAppIntegration)) - } - return api -} - -func (m *MockAccountClient) GetMockServicePrincipalFederationPolicyAPI() *oauth2.MockServicePrincipalFederationPolicyInterface { - api, ok := m.AccountClient.ServicePrincipalFederationPolicy.(*oauth2.MockServicePrincipalFederationPolicyInterface) - if !ok { - panic(fmt.Sprintf("expected ServicePrincipalFederationPolicy to be *oauth2.MockServicePrincipalFederationPolicyInterface, actual was %T", m.AccountClient.ServicePrincipalFederationPolicy)) - } - return api -} - -func (m *MockAccountClient) GetMockServicePrincipalSecretsAPI() *oauth2.MockServicePrincipalSecretsInterface { - api, ok := m.AccountClient.ServicePrincipalSecrets.(*oauth2.MockServicePrincipalSecretsInterface) - if !ok { - panic(fmt.Sprintf("expected ServicePrincipalSecrets to be *oauth2.MockServicePrincipalSecretsInterface, actual was %T", m.AccountClient.ServicePrincipalSecrets)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountServicePrincipalsAPI() *iam.MockAccountServicePrincipalsInterface { - api, ok := m.AccountClient.ServicePrincipals.(*iam.MockAccountServicePrincipalsInterface) - if !ok { - panic(fmt.Sprintf("expected ServicePrincipals to be *iam.MockAccountServicePrincipalsInterface, actual was %T", m.AccountClient.ServicePrincipals)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountSettingsAPI() *settings.MockAccountSettingsInterface { - api, ok := m.AccountClient.Settings.(*settings.MockAccountSettingsInterface) - if !ok { - panic(fmt.Sprintf("expected Settings to be *settings.MockAccountSettingsInterface, actual was %T", m.AccountClient.Settings)) - } - return api -} - -func (m *MockAccountClient) GetMockStorageAPI() *provisioning.MockStorageInterface { - api, ok := m.AccountClient.Storage.(*provisioning.MockStorageInterface) - if !ok { - panic(fmt.Sprintf("expected Storage to be *provisioning.MockStorageInterface, actual was %T", m.AccountClient.Storage)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountStorageCredentialsAPI() *catalog.MockAccountStorageCredentialsInterface { - api, ok := m.AccountClient.StorageCredentials.(*catalog.MockAccountStorageCredentialsInterface) - if !ok { - panic(fmt.Sprintf("expected StorageCredentials to be *catalog.MockAccountStorageCredentialsInterface, actual was %T", m.AccountClient.StorageCredentials)) - } - return api -} - -func (m *MockAccountClient) GetMockUsageDashboardsAPI() *billing.MockUsageDashboardsInterface { - api, ok := m.AccountClient.UsageDashboards.(*billing.MockUsageDashboardsInterface) - if !ok { - panic(fmt.Sprintf("expected UsageDashboards to be *billing.MockUsageDashboardsInterface, actual was %T", m.AccountClient.UsageDashboards)) - } - return api -} - -func (m *MockAccountClient) GetMockAccountUsersAPI() *iam.MockAccountUsersInterface { - api, ok := m.AccountClient.Users.(*iam.MockAccountUsersInterface) - if !ok { - panic(fmt.Sprintf("expected Users to be *iam.MockAccountUsersInterface, actual was %T", m.AccountClient.Users)) - } - return api -} - -func (m *MockAccountClient) GetMockVpcEndpointsAPI() *provisioning.MockVpcEndpointsInterface { - api, ok := m.AccountClient.VpcEndpoints.(*provisioning.MockVpcEndpointsInterface) - if !ok { - panic(fmt.Sprintf("expected VpcEndpoints to be *provisioning.MockVpcEndpointsInterface, actual was %T", m.AccountClient.VpcEndpoints)) - } - return api -} - -func (m *MockAccountClient) GetMockWorkspaceAssignmentAPI() *iam.MockWorkspaceAssignmentInterface { - api, ok := m.AccountClient.WorkspaceAssignment.(*iam.MockWorkspaceAssignmentInterface) - if !ok { - panic(fmt.Sprintf("expected WorkspaceAssignment to be *iam.MockWorkspaceAssignmentInterface, actual was %T", m.AccountClient.WorkspaceAssignment)) - } - return api -} - -func (m *MockAccountClient) GetMockWorkspacesAPI() *provisioning.MockWorkspacesInterface { - api, ok := m.AccountClient.Workspaces.(*provisioning.MockWorkspacesInterface) - if !ok { - panic(fmt.Sprintf("expected Workspaces to be *provisioning.MockWorkspacesInterface, actual was %T", m.AccountClient.Workspaces)) - } - return api -} - -func (m *MockAccountClient) GetMockbudgetsAPI() *billing.MockBudgetsInterface { - api, ok := m.AccountClient.Budgets.(*billing.MockBudgetsInterface) - if !ok { - panic(fmt.Sprintf("expected Budgets to be *billing.MockBudgetsInterface, actual was %T", m.AccountClient.Budgets)) - } - return api -} diff --git a/experimental/mocks/mock_workspace_client.go b/experimental/mocks/mock_workspace_client.go deleted file mode 100755 index 20f8533c9..000000000 --- a/experimental/mocks/mock_workspace_client.go +++ /dev/null @@ -1,995 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package mocks - -import ( - "fmt" - - "github.com/databricks/databricks-sdk-go" - "github.com/stretchr/testify/mock" - - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/apps" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/catalog" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/cleanrooms" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/compute" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/dashboards" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/files" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/iam" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/jobs" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/marketplace" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/ml" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/pipelines" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/serving" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/settings" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/sharing" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/sql" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/vectorsearch" - "github.com/databricks/databricks-sdk-go/experimental/mocks/service/workspace" -) - -type MockWorkspaceClient struct { - WorkspaceClient *databricks.WorkspaceClient -} - -// NewMockWorkspaceClient creates new mocked version of Databricks SDK client for Workspaces -// which can be used for testing. -func NewMockWorkspaceClient(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWorkspaceClient { - cli := &MockWorkspaceClient{ - WorkspaceClient: &databricks.WorkspaceClient{ - Config: nil, - - AccountAccessControlProxy: iam.NewMockAccountAccessControlProxyInterface(t), - Alerts: sql.NewMockAlertsInterface(t), - AlertsLegacy: sql.NewMockAlertsLegacyInterface(t), - Apps: apps.NewMockAppsInterface(t), - ArtifactAllowlists: catalog.NewMockArtifactAllowlistsInterface(t), - Catalogs: catalog.NewMockCatalogsInterface(t), - CleanRoomAssets: cleanrooms.NewMockCleanRoomAssetsInterface(t), - CleanRoomTaskRuns: cleanrooms.NewMockCleanRoomTaskRunsInterface(t), - CleanRooms: cleanrooms.NewMockCleanRoomsInterface(t), - ClusterPolicies: compute.NewMockClusterPoliciesInterface(t), - Clusters: compute.NewMockClustersInterface(t), - CommandExecution: compute.NewMockCommandExecutionInterface(t), - Connections: catalog.NewMockConnectionsInterface(t), - ConsumerFulfillments: marketplace.NewMockConsumerFulfillmentsInterface(t), - ConsumerInstallations: marketplace.NewMockConsumerInstallationsInterface(t), - ConsumerListings: marketplace.NewMockConsumerListingsInterface(t), - ConsumerPersonalizationRequests: marketplace.NewMockConsumerPersonalizationRequestsInterface(t), - ConsumerProviders: marketplace.NewMockConsumerProvidersInterface(t), - Credentials: catalog.NewMockCredentialsInterface(t), - CredentialsManager: settings.NewMockCredentialsManagerInterface(t), - CurrentUser: iam.NewMockCurrentUserInterface(t), - DashboardWidgets: sql.NewMockDashboardWidgetsInterface(t), - Dashboards: sql.NewMockDashboardsInterface(t), - DataSources: sql.NewMockDataSourcesInterface(t), - Dbfs: files.NewMockDbfsInterface(t), - DbsqlPermissions: sql.NewMockDbsqlPermissionsInterface(t), - Experiments: ml.NewMockExperimentsInterface(t), - ExternalLocations: catalog.NewMockExternalLocationsInterface(t), - Files: files.NewMockFilesInterface(t), - Functions: catalog.NewMockFunctionsInterface(t), - Genie: dashboards.NewMockGenieInterface(t), - GitCredentials: workspace.NewMockGitCredentialsInterface(t), - GlobalInitScripts: compute.NewMockGlobalInitScriptsInterface(t), - Grants: catalog.NewMockGrantsInterface(t), - Groups: iam.NewMockGroupsInterface(t), - InstancePools: compute.NewMockInstancePoolsInterface(t), - InstanceProfiles: compute.NewMockInstanceProfilesInterface(t), - IpAccessLists: settings.NewMockIpAccessListsInterface(t), - Jobs: jobs.NewMockJobsInterface(t), - Lakeview: dashboards.NewMockLakeviewInterface(t), - Libraries: compute.NewMockLibrariesInterface(t), - Metastores: catalog.NewMockMetastoresInterface(t), - ModelRegistry: ml.NewMockModelRegistryInterface(t), - ModelVersions: catalog.NewMockModelVersionsInterface(t), - NotificationDestinations: settings.NewMockNotificationDestinationsInterface(t), - OnlineTables: catalog.NewMockOnlineTablesInterface(t), - PermissionMigration: iam.NewMockPermissionMigrationInterface(t), - Permissions: iam.NewMockPermissionsInterface(t), - Pipelines: pipelines.NewMockPipelinesInterface(t), - PolicyComplianceForClusters: compute.NewMockPolicyComplianceForClustersInterface(t), - PolicyComplianceForJobs: jobs.NewMockPolicyComplianceForJobsInterface(t), - PolicyFamilies: compute.NewMockPolicyFamiliesInterface(t), - ProviderExchangeFilters: marketplace.NewMockProviderExchangeFiltersInterface(t), - ProviderExchanges: marketplace.NewMockProviderExchangesInterface(t), - ProviderFiles: marketplace.NewMockProviderFilesInterface(t), - ProviderListings: marketplace.NewMockProviderListingsInterface(t), - ProviderPersonalizationRequests: marketplace.NewMockProviderPersonalizationRequestsInterface(t), - ProviderProviderAnalyticsDashboards: marketplace.NewMockProviderProviderAnalyticsDashboardsInterface(t), - ProviderProviders: marketplace.NewMockProviderProvidersInterface(t), - Providers: sharing.NewMockProvidersInterface(t), - QualityMonitors: catalog.NewMockQualityMonitorsInterface(t), - Queries: sql.NewMockQueriesInterface(t), - QueriesLegacy: sql.NewMockQueriesLegacyInterface(t), - QueryHistory: sql.NewMockQueryHistoryInterface(t), - QueryVisualizations: sql.NewMockQueryVisualizationsInterface(t), - QueryVisualizationsLegacy: sql.NewMockQueryVisualizationsLegacyInterface(t), - RecipientActivation: sharing.NewMockRecipientActivationInterface(t), - Recipients: sharing.NewMockRecipientsInterface(t), - RegisteredModels: catalog.NewMockRegisteredModelsInterface(t), - Repos: workspace.NewMockReposInterface(t), - ResourceQuotas: catalog.NewMockResourceQuotasInterface(t), - Schemas: catalog.NewMockSchemasInterface(t), - Secrets: workspace.NewMockSecretsInterface(t), - ServicePrincipals: iam.NewMockServicePrincipalsInterface(t), - ServingEndpoints: serving.NewMockServingEndpointsInterface(t), - ServingEndpointsDataPlane: serving.NewMockServingEndpointsDataPlaneInterface(t), - Settings: settings.NewMockSettingsInterface(t), - Shares: sharing.NewMockSharesInterface(t), - StatementExecution: sql.NewMockStatementExecutionInterface(t), - StorageCredentials: catalog.NewMockStorageCredentialsInterface(t), - SystemSchemas: catalog.NewMockSystemSchemasInterface(t), - TableConstraints: catalog.NewMockTableConstraintsInterface(t), - Tables: catalog.NewMockTablesInterface(t), - TemporaryTableCredentials: catalog.NewMockTemporaryTableCredentialsInterface(t), - TokenManagement: settings.NewMockTokenManagementInterface(t), - Tokens: settings.NewMockTokensInterface(t), - Users: iam.NewMockUsersInterface(t), - VectorSearchEndpoints: vectorsearch.NewMockVectorSearchEndpointsInterface(t), - VectorSearchIndexes: vectorsearch.NewMockVectorSearchIndexesInterface(t), - Volumes: catalog.NewMockVolumesInterface(t), - Warehouses: sql.NewMockWarehousesInterface(t), - Workspace: workspace.NewMockWorkspaceInterface(t), - WorkspaceBindings: catalog.NewMockWorkspaceBindingsInterface(t), - WorkspaceConf: settings.NewMockWorkspaceConfInterface(t), - }, - } - - mocksettingsAPI := cli.GetMockSettingsAPI() - - mockaibiDashboardEmbeddingAccessPolicy := settings.NewMockAibiDashboardEmbeddingAccessPolicyInterface(t) - mocksettingsAPI.On("AibiDashboardEmbeddingAccessPolicy").Return(mockaibiDashboardEmbeddingAccessPolicy).Maybe() - - mockaibiDashboardEmbeddingApprovedDomains := settings.NewMockAibiDashboardEmbeddingApprovedDomainsInterface(t) - mocksettingsAPI.On("AibiDashboardEmbeddingApprovedDomains").Return(mockaibiDashboardEmbeddingApprovedDomains).Maybe() - - mockautomaticClusterUpdate := settings.NewMockAutomaticClusterUpdateInterface(t) - mocksettingsAPI.On("AutomaticClusterUpdate").Return(mockautomaticClusterUpdate).Maybe() - - mockcomplianceSecurityProfile := settings.NewMockComplianceSecurityProfileInterface(t) - mocksettingsAPI.On("ComplianceSecurityProfile").Return(mockcomplianceSecurityProfile).Maybe() - - mockdefaultNamespace := settings.NewMockDefaultNamespaceInterface(t) - mocksettingsAPI.On("DefaultNamespace").Return(mockdefaultNamespace).Maybe() - - mockdisableLegacyAccess := settings.NewMockDisableLegacyAccessInterface(t) - mocksettingsAPI.On("DisableLegacyAccess").Return(mockdisableLegacyAccess).Maybe() - - mockdisableLegacyDbfs := settings.NewMockDisableLegacyDbfsInterface(t) - mocksettingsAPI.On("DisableLegacyDbfs").Return(mockdisableLegacyDbfs).Maybe() - - mockenhancedSecurityMonitoring := settings.NewMockEnhancedSecurityMonitoringInterface(t) - mocksettingsAPI.On("EnhancedSecurityMonitoring").Return(mockenhancedSecurityMonitoring).Maybe() - - mockrestrictWorkspaceAdmins := settings.NewMockRestrictWorkspaceAdminsInterface(t) - mocksettingsAPI.On("RestrictWorkspaceAdmins").Return(mockrestrictWorkspaceAdmins).Maybe() - - return cli -} - -func (m *MockWorkspaceClient) GetMockAibiDashboardEmbeddingAccessPolicyAPI() *settings.MockAibiDashboardEmbeddingAccessPolicyInterface { - api, ok := m.GetMockSettingsAPI().AibiDashboardEmbeddingAccessPolicy().(*settings.MockAibiDashboardEmbeddingAccessPolicyInterface) - if !ok { - panic(fmt.Sprintf("expected AibiDashboardEmbeddingAccessPolicy to be *settings.MockAibiDashboardEmbeddingAccessPolicyInterface, actual was %T", m.GetMockSettingsAPI().AibiDashboardEmbeddingAccessPolicy())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockAibiDashboardEmbeddingApprovedDomainsAPI() *settings.MockAibiDashboardEmbeddingApprovedDomainsInterface { - api, ok := m.GetMockSettingsAPI().AibiDashboardEmbeddingApprovedDomains().(*settings.MockAibiDashboardEmbeddingApprovedDomainsInterface) - if !ok { - panic(fmt.Sprintf("expected AibiDashboardEmbeddingApprovedDomains to be *settings.MockAibiDashboardEmbeddingApprovedDomainsInterface, actual was %T", m.GetMockSettingsAPI().AibiDashboardEmbeddingApprovedDomains())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockAutomaticClusterUpdateAPI() *settings.MockAutomaticClusterUpdateInterface { - api, ok := m.GetMockSettingsAPI().AutomaticClusterUpdate().(*settings.MockAutomaticClusterUpdateInterface) - if !ok { - panic(fmt.Sprintf("expected AutomaticClusterUpdate to be *settings.MockAutomaticClusterUpdateInterface, actual was %T", m.GetMockSettingsAPI().AutomaticClusterUpdate())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockComplianceSecurityProfileAPI() *settings.MockComplianceSecurityProfileInterface { - api, ok := m.GetMockSettingsAPI().ComplianceSecurityProfile().(*settings.MockComplianceSecurityProfileInterface) - if !ok { - panic(fmt.Sprintf("expected ComplianceSecurityProfile to be *settings.MockComplianceSecurityProfileInterface, actual was %T", m.GetMockSettingsAPI().ComplianceSecurityProfile())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDefaultNamespaceAPI() *settings.MockDefaultNamespaceInterface { - api, ok := m.GetMockSettingsAPI().DefaultNamespace().(*settings.MockDefaultNamespaceInterface) - if !ok { - panic(fmt.Sprintf("expected DefaultNamespace to be *settings.MockDefaultNamespaceInterface, actual was %T", m.GetMockSettingsAPI().DefaultNamespace())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDisableLegacyAccessAPI() *settings.MockDisableLegacyAccessInterface { - api, ok := m.GetMockSettingsAPI().DisableLegacyAccess().(*settings.MockDisableLegacyAccessInterface) - if !ok { - panic(fmt.Sprintf("expected DisableLegacyAccess to be *settings.MockDisableLegacyAccessInterface, actual was %T", m.GetMockSettingsAPI().DisableLegacyAccess())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDisableLegacyDbfsAPI() *settings.MockDisableLegacyDbfsInterface { - api, ok := m.GetMockSettingsAPI().DisableLegacyDbfs().(*settings.MockDisableLegacyDbfsInterface) - if !ok { - panic(fmt.Sprintf("expected DisableLegacyDbfs to be *settings.MockDisableLegacyDbfsInterface, actual was %T", m.GetMockSettingsAPI().DisableLegacyDbfs())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockEnhancedSecurityMonitoringAPI() *settings.MockEnhancedSecurityMonitoringInterface { - api, ok := m.GetMockSettingsAPI().EnhancedSecurityMonitoring().(*settings.MockEnhancedSecurityMonitoringInterface) - if !ok { - panic(fmt.Sprintf("expected EnhancedSecurityMonitoring to be *settings.MockEnhancedSecurityMonitoringInterface, actual was %T", m.GetMockSettingsAPI().EnhancedSecurityMonitoring())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockRestrictWorkspaceAdminsAPI() *settings.MockRestrictWorkspaceAdminsInterface { - api, ok := m.GetMockSettingsAPI().RestrictWorkspaceAdmins().(*settings.MockRestrictWorkspaceAdminsInterface) - if !ok { - panic(fmt.Sprintf("expected RestrictWorkspaceAdmins to be *settings.MockRestrictWorkspaceAdminsInterface, actual was %T", m.GetMockSettingsAPI().RestrictWorkspaceAdmins())) - } - return api -} - -func (m *MockWorkspaceClient) GetMockAccountAccessControlProxyAPI() *iam.MockAccountAccessControlProxyInterface { - api, ok := m.WorkspaceClient.AccountAccessControlProxy.(*iam.MockAccountAccessControlProxyInterface) - if !ok { - panic(fmt.Sprintf("expected AccountAccessControlProxy to be *iam.MockAccountAccessControlProxyInterface, actual was %T", m.WorkspaceClient.AccountAccessControlProxy)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockAlertsAPI() *sql.MockAlertsInterface { - api, ok := m.WorkspaceClient.Alerts.(*sql.MockAlertsInterface) - if !ok { - panic(fmt.Sprintf("expected Alerts to be *sql.MockAlertsInterface, actual was %T", m.WorkspaceClient.Alerts)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockAlertsLegacyAPI() *sql.MockAlertsLegacyInterface { - api, ok := m.WorkspaceClient.AlertsLegacy.(*sql.MockAlertsLegacyInterface) - if !ok { - panic(fmt.Sprintf("expected AlertsLegacy to be *sql.MockAlertsLegacyInterface, actual was %T", m.WorkspaceClient.AlertsLegacy)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockAppsAPI() *apps.MockAppsInterface { - api, ok := m.WorkspaceClient.Apps.(*apps.MockAppsInterface) - if !ok { - panic(fmt.Sprintf("expected Apps to be *apps.MockAppsInterface, actual was %T", m.WorkspaceClient.Apps)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockArtifactAllowlistsAPI() *catalog.MockArtifactAllowlistsInterface { - api, ok := m.WorkspaceClient.ArtifactAllowlists.(*catalog.MockArtifactAllowlistsInterface) - if !ok { - panic(fmt.Sprintf("expected ArtifactAllowlists to be *catalog.MockArtifactAllowlistsInterface, actual was %T", m.WorkspaceClient.ArtifactAllowlists)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCatalogsAPI() *catalog.MockCatalogsInterface { - api, ok := m.WorkspaceClient.Catalogs.(*catalog.MockCatalogsInterface) - if !ok { - panic(fmt.Sprintf("expected Catalogs to be *catalog.MockCatalogsInterface, actual was %T", m.WorkspaceClient.Catalogs)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCleanRoomAssetsAPI() *cleanrooms.MockCleanRoomAssetsInterface { - api, ok := m.WorkspaceClient.CleanRoomAssets.(*cleanrooms.MockCleanRoomAssetsInterface) - if !ok { - panic(fmt.Sprintf("expected CleanRoomAssets to be *cleanrooms.MockCleanRoomAssetsInterface, actual was %T", m.WorkspaceClient.CleanRoomAssets)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCleanRoomTaskRunsAPI() *cleanrooms.MockCleanRoomTaskRunsInterface { - api, ok := m.WorkspaceClient.CleanRoomTaskRuns.(*cleanrooms.MockCleanRoomTaskRunsInterface) - if !ok { - panic(fmt.Sprintf("expected CleanRoomTaskRuns to be *cleanrooms.MockCleanRoomTaskRunsInterface, actual was %T", m.WorkspaceClient.CleanRoomTaskRuns)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCleanRoomsAPI() *cleanrooms.MockCleanRoomsInterface { - api, ok := m.WorkspaceClient.CleanRooms.(*cleanrooms.MockCleanRoomsInterface) - if !ok { - panic(fmt.Sprintf("expected CleanRooms to be *cleanrooms.MockCleanRoomsInterface, actual was %T", m.WorkspaceClient.CleanRooms)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockClusterPoliciesAPI() *compute.MockClusterPoliciesInterface { - api, ok := m.WorkspaceClient.ClusterPolicies.(*compute.MockClusterPoliciesInterface) - if !ok { - panic(fmt.Sprintf("expected ClusterPolicies to be *compute.MockClusterPoliciesInterface, actual was %T", m.WorkspaceClient.ClusterPolicies)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockClustersAPI() *compute.MockClustersInterface { - api, ok := m.WorkspaceClient.Clusters.(*compute.MockClustersInterface) - if !ok { - panic(fmt.Sprintf("expected Clusters to be *compute.MockClustersInterface, actual was %T", m.WorkspaceClient.Clusters)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCommandExecutionAPI() *compute.MockCommandExecutionInterface { - api, ok := m.WorkspaceClient.CommandExecution.(*compute.MockCommandExecutionInterface) - if !ok { - panic(fmt.Sprintf("expected CommandExecution to be *compute.MockCommandExecutionInterface, actual was %T", m.WorkspaceClient.CommandExecution)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockConnectionsAPI() *catalog.MockConnectionsInterface { - api, ok := m.WorkspaceClient.Connections.(*catalog.MockConnectionsInterface) - if !ok { - panic(fmt.Sprintf("expected Connections to be *catalog.MockConnectionsInterface, actual was %T", m.WorkspaceClient.Connections)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockConsumerFulfillmentsAPI() *marketplace.MockConsumerFulfillmentsInterface { - api, ok := m.WorkspaceClient.ConsumerFulfillments.(*marketplace.MockConsumerFulfillmentsInterface) - if !ok { - panic(fmt.Sprintf("expected ConsumerFulfillments to be *marketplace.MockConsumerFulfillmentsInterface, actual was %T", m.WorkspaceClient.ConsumerFulfillments)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockConsumerInstallationsAPI() *marketplace.MockConsumerInstallationsInterface { - api, ok := m.WorkspaceClient.ConsumerInstallations.(*marketplace.MockConsumerInstallationsInterface) - if !ok { - panic(fmt.Sprintf("expected ConsumerInstallations to be *marketplace.MockConsumerInstallationsInterface, actual was %T", m.WorkspaceClient.ConsumerInstallations)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockConsumerListingsAPI() *marketplace.MockConsumerListingsInterface { - api, ok := m.WorkspaceClient.ConsumerListings.(*marketplace.MockConsumerListingsInterface) - if !ok { - panic(fmt.Sprintf("expected ConsumerListings to be *marketplace.MockConsumerListingsInterface, actual was %T", m.WorkspaceClient.ConsumerListings)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockConsumerPersonalizationRequestsAPI() *marketplace.MockConsumerPersonalizationRequestsInterface { - api, ok := m.WorkspaceClient.ConsumerPersonalizationRequests.(*marketplace.MockConsumerPersonalizationRequestsInterface) - if !ok { - panic(fmt.Sprintf("expected ConsumerPersonalizationRequests to be *marketplace.MockConsumerPersonalizationRequestsInterface, actual was %T", m.WorkspaceClient.ConsumerPersonalizationRequests)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockConsumerProvidersAPI() *marketplace.MockConsumerProvidersInterface { - api, ok := m.WorkspaceClient.ConsumerProviders.(*marketplace.MockConsumerProvidersInterface) - if !ok { - panic(fmt.Sprintf("expected ConsumerProviders to be *marketplace.MockConsumerProvidersInterface, actual was %T", m.WorkspaceClient.ConsumerProviders)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCredentialsAPI() *catalog.MockCredentialsInterface { - api, ok := m.WorkspaceClient.Credentials.(*catalog.MockCredentialsInterface) - if !ok { - panic(fmt.Sprintf("expected Credentials to be *catalog.MockCredentialsInterface, actual was %T", m.WorkspaceClient.Credentials)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCredentialsManagerAPI() *settings.MockCredentialsManagerInterface { - api, ok := m.WorkspaceClient.CredentialsManager.(*settings.MockCredentialsManagerInterface) - if !ok { - panic(fmt.Sprintf("expected CredentialsManager to be *settings.MockCredentialsManagerInterface, actual was %T", m.WorkspaceClient.CredentialsManager)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockCurrentUserAPI() *iam.MockCurrentUserInterface { - api, ok := m.WorkspaceClient.CurrentUser.(*iam.MockCurrentUserInterface) - if !ok { - panic(fmt.Sprintf("expected CurrentUser to be *iam.MockCurrentUserInterface, actual was %T", m.WorkspaceClient.CurrentUser)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDashboardWidgetsAPI() *sql.MockDashboardWidgetsInterface { - api, ok := m.WorkspaceClient.DashboardWidgets.(*sql.MockDashboardWidgetsInterface) - if !ok { - panic(fmt.Sprintf("expected DashboardWidgets to be *sql.MockDashboardWidgetsInterface, actual was %T", m.WorkspaceClient.DashboardWidgets)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDashboardsAPI() *sql.MockDashboardsInterface { - api, ok := m.WorkspaceClient.Dashboards.(*sql.MockDashboardsInterface) - if !ok { - panic(fmt.Sprintf("expected Dashboards to be *sql.MockDashboardsInterface, actual was %T", m.WorkspaceClient.Dashboards)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDataSourcesAPI() *sql.MockDataSourcesInterface { - api, ok := m.WorkspaceClient.DataSources.(*sql.MockDataSourcesInterface) - if !ok { - panic(fmt.Sprintf("expected DataSources to be *sql.MockDataSourcesInterface, actual was %T", m.WorkspaceClient.DataSources)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDbfsAPI() *files.MockDbfsInterface { - api, ok := m.WorkspaceClient.Dbfs.(*files.MockDbfsInterface) - if !ok { - panic(fmt.Sprintf("expected Dbfs to be *files.MockDbfsInterface, actual was %T", m.WorkspaceClient.Dbfs)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockDbsqlPermissionsAPI() *sql.MockDbsqlPermissionsInterface { - api, ok := m.WorkspaceClient.DbsqlPermissions.(*sql.MockDbsqlPermissionsInterface) - if !ok { - panic(fmt.Sprintf("expected DbsqlPermissions to be *sql.MockDbsqlPermissionsInterface, actual was %T", m.WorkspaceClient.DbsqlPermissions)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockExperimentsAPI() *ml.MockExperimentsInterface { - api, ok := m.WorkspaceClient.Experiments.(*ml.MockExperimentsInterface) - if !ok { - panic(fmt.Sprintf("expected Experiments to be *ml.MockExperimentsInterface, actual was %T", m.WorkspaceClient.Experiments)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockExternalLocationsAPI() *catalog.MockExternalLocationsInterface { - api, ok := m.WorkspaceClient.ExternalLocations.(*catalog.MockExternalLocationsInterface) - if !ok { - panic(fmt.Sprintf("expected ExternalLocations to be *catalog.MockExternalLocationsInterface, actual was %T", m.WorkspaceClient.ExternalLocations)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockFilesAPI() *files.MockFilesInterface { - api, ok := m.WorkspaceClient.Files.(*files.MockFilesInterface) - if !ok { - panic(fmt.Sprintf("expected Files to be *files.MockFilesInterface, actual was %T", m.WorkspaceClient.Files)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockFunctionsAPI() *catalog.MockFunctionsInterface { - api, ok := m.WorkspaceClient.Functions.(*catalog.MockFunctionsInterface) - if !ok { - panic(fmt.Sprintf("expected Functions to be *catalog.MockFunctionsInterface, actual was %T", m.WorkspaceClient.Functions)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockGenieAPI() *dashboards.MockGenieInterface { - api, ok := m.WorkspaceClient.Genie.(*dashboards.MockGenieInterface) - if !ok { - panic(fmt.Sprintf("expected Genie to be *dashboards.MockGenieInterface, actual was %T", m.WorkspaceClient.Genie)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockGitCredentialsAPI() *workspace.MockGitCredentialsInterface { - api, ok := m.WorkspaceClient.GitCredentials.(*workspace.MockGitCredentialsInterface) - if !ok { - panic(fmt.Sprintf("expected GitCredentials to be *workspace.MockGitCredentialsInterface, actual was %T", m.WorkspaceClient.GitCredentials)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockGlobalInitScriptsAPI() *compute.MockGlobalInitScriptsInterface { - api, ok := m.WorkspaceClient.GlobalInitScripts.(*compute.MockGlobalInitScriptsInterface) - if !ok { - panic(fmt.Sprintf("expected GlobalInitScripts to be *compute.MockGlobalInitScriptsInterface, actual was %T", m.WorkspaceClient.GlobalInitScripts)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockGrantsAPI() *catalog.MockGrantsInterface { - api, ok := m.WorkspaceClient.Grants.(*catalog.MockGrantsInterface) - if !ok { - panic(fmt.Sprintf("expected Grants to be *catalog.MockGrantsInterface, actual was %T", m.WorkspaceClient.Grants)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockGroupsAPI() *iam.MockGroupsInterface { - api, ok := m.WorkspaceClient.Groups.(*iam.MockGroupsInterface) - if !ok { - panic(fmt.Sprintf("expected Groups to be *iam.MockGroupsInterface, actual was %T", m.WorkspaceClient.Groups)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockInstancePoolsAPI() *compute.MockInstancePoolsInterface { - api, ok := m.WorkspaceClient.InstancePools.(*compute.MockInstancePoolsInterface) - if !ok { - panic(fmt.Sprintf("expected InstancePools to be *compute.MockInstancePoolsInterface, actual was %T", m.WorkspaceClient.InstancePools)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockInstanceProfilesAPI() *compute.MockInstanceProfilesInterface { - api, ok := m.WorkspaceClient.InstanceProfiles.(*compute.MockInstanceProfilesInterface) - if !ok { - panic(fmt.Sprintf("expected InstanceProfiles to be *compute.MockInstanceProfilesInterface, actual was %T", m.WorkspaceClient.InstanceProfiles)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockIpAccessListsAPI() *settings.MockIpAccessListsInterface { - api, ok := m.WorkspaceClient.IpAccessLists.(*settings.MockIpAccessListsInterface) - if !ok { - panic(fmt.Sprintf("expected IpAccessLists to be *settings.MockIpAccessListsInterface, actual was %T", m.WorkspaceClient.IpAccessLists)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockJobsAPI() *jobs.MockJobsInterface { - api, ok := m.WorkspaceClient.Jobs.(*jobs.MockJobsInterface) - if !ok { - panic(fmt.Sprintf("expected Jobs to be *jobs.MockJobsInterface, actual was %T", m.WorkspaceClient.Jobs)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockLakeviewAPI() *dashboards.MockLakeviewInterface { - api, ok := m.WorkspaceClient.Lakeview.(*dashboards.MockLakeviewInterface) - if !ok { - panic(fmt.Sprintf("expected Lakeview to be *dashboards.MockLakeviewInterface, actual was %T", m.WorkspaceClient.Lakeview)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockLibrariesAPI() *compute.MockLibrariesInterface { - api, ok := m.WorkspaceClient.Libraries.(*compute.MockLibrariesInterface) - if !ok { - panic(fmt.Sprintf("expected Libraries to be *compute.MockLibrariesInterface, actual was %T", m.WorkspaceClient.Libraries)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockMetastoresAPI() *catalog.MockMetastoresInterface { - api, ok := m.WorkspaceClient.Metastores.(*catalog.MockMetastoresInterface) - if !ok { - panic(fmt.Sprintf("expected Metastores to be *catalog.MockMetastoresInterface, actual was %T", m.WorkspaceClient.Metastores)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockModelRegistryAPI() *ml.MockModelRegistryInterface { - api, ok := m.WorkspaceClient.ModelRegistry.(*ml.MockModelRegistryInterface) - if !ok { - panic(fmt.Sprintf("expected ModelRegistry to be *ml.MockModelRegistryInterface, actual was %T", m.WorkspaceClient.ModelRegistry)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockModelVersionsAPI() *catalog.MockModelVersionsInterface { - api, ok := m.WorkspaceClient.ModelVersions.(*catalog.MockModelVersionsInterface) - if !ok { - panic(fmt.Sprintf("expected ModelVersions to be *catalog.MockModelVersionsInterface, actual was %T", m.WorkspaceClient.ModelVersions)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockNotificationDestinationsAPI() *settings.MockNotificationDestinationsInterface { - api, ok := m.WorkspaceClient.NotificationDestinations.(*settings.MockNotificationDestinationsInterface) - if !ok { - panic(fmt.Sprintf("expected NotificationDestinations to be *settings.MockNotificationDestinationsInterface, actual was %T", m.WorkspaceClient.NotificationDestinations)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockOnlineTablesAPI() *catalog.MockOnlineTablesInterface { - api, ok := m.WorkspaceClient.OnlineTables.(*catalog.MockOnlineTablesInterface) - if !ok { - panic(fmt.Sprintf("expected OnlineTables to be *catalog.MockOnlineTablesInterface, actual was %T", m.WorkspaceClient.OnlineTables)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockPermissionMigrationAPI() *iam.MockPermissionMigrationInterface { - api, ok := m.WorkspaceClient.PermissionMigration.(*iam.MockPermissionMigrationInterface) - if !ok { - panic(fmt.Sprintf("expected PermissionMigration to be *iam.MockPermissionMigrationInterface, actual was %T", m.WorkspaceClient.PermissionMigration)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockPermissionsAPI() *iam.MockPermissionsInterface { - api, ok := m.WorkspaceClient.Permissions.(*iam.MockPermissionsInterface) - if !ok { - panic(fmt.Sprintf("expected Permissions to be *iam.MockPermissionsInterface, actual was %T", m.WorkspaceClient.Permissions)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockPipelinesAPI() *pipelines.MockPipelinesInterface { - api, ok := m.WorkspaceClient.Pipelines.(*pipelines.MockPipelinesInterface) - if !ok { - panic(fmt.Sprintf("expected Pipelines to be *pipelines.MockPipelinesInterface, actual was %T", m.WorkspaceClient.Pipelines)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockPolicyComplianceForClustersAPI() *compute.MockPolicyComplianceForClustersInterface { - api, ok := m.WorkspaceClient.PolicyComplianceForClusters.(*compute.MockPolicyComplianceForClustersInterface) - if !ok { - panic(fmt.Sprintf("expected PolicyComplianceForClusters to be *compute.MockPolicyComplianceForClustersInterface, actual was %T", m.WorkspaceClient.PolicyComplianceForClusters)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockPolicyComplianceForJobsAPI() *jobs.MockPolicyComplianceForJobsInterface { - api, ok := m.WorkspaceClient.PolicyComplianceForJobs.(*jobs.MockPolicyComplianceForJobsInterface) - if !ok { - panic(fmt.Sprintf("expected PolicyComplianceForJobs to be *jobs.MockPolicyComplianceForJobsInterface, actual was %T", m.WorkspaceClient.PolicyComplianceForJobs)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockPolicyFamiliesAPI() *compute.MockPolicyFamiliesInterface { - api, ok := m.WorkspaceClient.PolicyFamilies.(*compute.MockPolicyFamiliesInterface) - if !ok { - panic(fmt.Sprintf("expected PolicyFamilies to be *compute.MockPolicyFamiliesInterface, actual was %T", m.WorkspaceClient.PolicyFamilies)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProviderExchangeFiltersAPI() *marketplace.MockProviderExchangeFiltersInterface { - api, ok := m.WorkspaceClient.ProviderExchangeFilters.(*marketplace.MockProviderExchangeFiltersInterface) - if !ok { - panic(fmt.Sprintf("expected ProviderExchangeFilters to be *marketplace.MockProviderExchangeFiltersInterface, actual was %T", m.WorkspaceClient.ProviderExchangeFilters)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProviderExchangesAPI() *marketplace.MockProviderExchangesInterface { - api, ok := m.WorkspaceClient.ProviderExchanges.(*marketplace.MockProviderExchangesInterface) - if !ok { - panic(fmt.Sprintf("expected ProviderExchanges to be *marketplace.MockProviderExchangesInterface, actual was %T", m.WorkspaceClient.ProviderExchanges)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProviderFilesAPI() *marketplace.MockProviderFilesInterface { - api, ok := m.WorkspaceClient.ProviderFiles.(*marketplace.MockProviderFilesInterface) - if !ok { - panic(fmt.Sprintf("expected ProviderFiles to be *marketplace.MockProviderFilesInterface, actual was %T", m.WorkspaceClient.ProviderFiles)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProviderListingsAPI() *marketplace.MockProviderListingsInterface { - api, ok := m.WorkspaceClient.ProviderListings.(*marketplace.MockProviderListingsInterface) - if !ok { - panic(fmt.Sprintf("expected ProviderListings to be *marketplace.MockProviderListingsInterface, actual was %T", m.WorkspaceClient.ProviderListings)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProviderPersonalizationRequestsAPI() *marketplace.MockProviderPersonalizationRequestsInterface { - api, ok := m.WorkspaceClient.ProviderPersonalizationRequests.(*marketplace.MockProviderPersonalizationRequestsInterface) - if !ok { - panic(fmt.Sprintf("expected ProviderPersonalizationRequests to be *marketplace.MockProviderPersonalizationRequestsInterface, actual was %T", m.WorkspaceClient.ProviderPersonalizationRequests)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProviderProviderAnalyticsDashboardsAPI() *marketplace.MockProviderProviderAnalyticsDashboardsInterface { - api, ok := m.WorkspaceClient.ProviderProviderAnalyticsDashboards.(*marketplace.MockProviderProviderAnalyticsDashboardsInterface) - if !ok { - panic(fmt.Sprintf("expected ProviderProviderAnalyticsDashboards to be *marketplace.MockProviderProviderAnalyticsDashboardsInterface, actual was %T", m.WorkspaceClient.ProviderProviderAnalyticsDashboards)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProviderProvidersAPI() *marketplace.MockProviderProvidersInterface { - api, ok := m.WorkspaceClient.ProviderProviders.(*marketplace.MockProviderProvidersInterface) - if !ok { - panic(fmt.Sprintf("expected ProviderProviders to be *marketplace.MockProviderProvidersInterface, actual was %T", m.WorkspaceClient.ProviderProviders)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockProvidersAPI() *sharing.MockProvidersInterface { - api, ok := m.WorkspaceClient.Providers.(*sharing.MockProvidersInterface) - if !ok { - panic(fmt.Sprintf("expected Providers to be *sharing.MockProvidersInterface, actual was %T", m.WorkspaceClient.Providers)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockQualityMonitorsAPI() *catalog.MockQualityMonitorsInterface { - api, ok := m.WorkspaceClient.QualityMonitors.(*catalog.MockQualityMonitorsInterface) - if !ok { - panic(fmt.Sprintf("expected QualityMonitors to be *catalog.MockQualityMonitorsInterface, actual was %T", m.WorkspaceClient.QualityMonitors)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockQueriesAPI() *sql.MockQueriesInterface { - api, ok := m.WorkspaceClient.Queries.(*sql.MockQueriesInterface) - if !ok { - panic(fmt.Sprintf("expected Queries to be *sql.MockQueriesInterface, actual was %T", m.WorkspaceClient.Queries)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockQueriesLegacyAPI() *sql.MockQueriesLegacyInterface { - api, ok := m.WorkspaceClient.QueriesLegacy.(*sql.MockQueriesLegacyInterface) - if !ok { - panic(fmt.Sprintf("expected QueriesLegacy to be *sql.MockQueriesLegacyInterface, actual was %T", m.WorkspaceClient.QueriesLegacy)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockQueryHistoryAPI() *sql.MockQueryHistoryInterface { - api, ok := m.WorkspaceClient.QueryHistory.(*sql.MockQueryHistoryInterface) - if !ok { - panic(fmt.Sprintf("expected QueryHistory to be *sql.MockQueryHistoryInterface, actual was %T", m.WorkspaceClient.QueryHistory)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockQueryVisualizationsAPI() *sql.MockQueryVisualizationsInterface { - api, ok := m.WorkspaceClient.QueryVisualizations.(*sql.MockQueryVisualizationsInterface) - if !ok { - panic(fmt.Sprintf("expected QueryVisualizations to be *sql.MockQueryVisualizationsInterface, actual was %T", m.WorkspaceClient.QueryVisualizations)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockQueryVisualizationsLegacyAPI() *sql.MockQueryVisualizationsLegacyInterface { - api, ok := m.WorkspaceClient.QueryVisualizationsLegacy.(*sql.MockQueryVisualizationsLegacyInterface) - if !ok { - panic(fmt.Sprintf("expected QueryVisualizationsLegacy to be *sql.MockQueryVisualizationsLegacyInterface, actual was %T", m.WorkspaceClient.QueryVisualizationsLegacy)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockRecipientActivationAPI() *sharing.MockRecipientActivationInterface { - api, ok := m.WorkspaceClient.RecipientActivation.(*sharing.MockRecipientActivationInterface) - if !ok { - panic(fmt.Sprintf("expected RecipientActivation to be *sharing.MockRecipientActivationInterface, actual was %T", m.WorkspaceClient.RecipientActivation)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockRecipientsAPI() *sharing.MockRecipientsInterface { - api, ok := m.WorkspaceClient.Recipients.(*sharing.MockRecipientsInterface) - if !ok { - panic(fmt.Sprintf("expected Recipients to be *sharing.MockRecipientsInterface, actual was %T", m.WorkspaceClient.Recipients)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockRegisteredModelsAPI() *catalog.MockRegisteredModelsInterface { - api, ok := m.WorkspaceClient.RegisteredModels.(*catalog.MockRegisteredModelsInterface) - if !ok { - panic(fmt.Sprintf("expected RegisteredModels to be *catalog.MockRegisteredModelsInterface, actual was %T", m.WorkspaceClient.RegisteredModels)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockReposAPI() *workspace.MockReposInterface { - api, ok := m.WorkspaceClient.Repos.(*workspace.MockReposInterface) - if !ok { - panic(fmt.Sprintf("expected Repos to be *workspace.MockReposInterface, actual was %T", m.WorkspaceClient.Repos)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockResourceQuotasAPI() *catalog.MockResourceQuotasInterface { - api, ok := m.WorkspaceClient.ResourceQuotas.(*catalog.MockResourceQuotasInterface) - if !ok { - panic(fmt.Sprintf("expected ResourceQuotas to be *catalog.MockResourceQuotasInterface, actual was %T", m.WorkspaceClient.ResourceQuotas)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockSchemasAPI() *catalog.MockSchemasInterface { - api, ok := m.WorkspaceClient.Schemas.(*catalog.MockSchemasInterface) - if !ok { - panic(fmt.Sprintf("expected Schemas to be *catalog.MockSchemasInterface, actual was %T", m.WorkspaceClient.Schemas)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockSecretsAPI() *workspace.MockSecretsInterface { - api, ok := m.WorkspaceClient.Secrets.(*workspace.MockSecretsInterface) - if !ok { - panic(fmt.Sprintf("expected Secrets to be *workspace.MockSecretsInterface, actual was %T", m.WorkspaceClient.Secrets)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockServicePrincipalsAPI() *iam.MockServicePrincipalsInterface { - api, ok := m.WorkspaceClient.ServicePrincipals.(*iam.MockServicePrincipalsInterface) - if !ok { - panic(fmt.Sprintf("expected ServicePrincipals to be *iam.MockServicePrincipalsInterface, actual was %T", m.WorkspaceClient.ServicePrincipals)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockServingEndpointsAPI() *serving.MockServingEndpointsInterface { - api, ok := m.WorkspaceClient.ServingEndpoints.(*serving.MockServingEndpointsInterface) - if !ok { - panic(fmt.Sprintf("expected ServingEndpoints to be *serving.MockServingEndpointsInterface, actual was %T", m.WorkspaceClient.ServingEndpoints)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockServingEndpointsDataPlaneAPI() *serving.MockServingEndpointsDataPlaneInterface { - api, ok := m.WorkspaceClient.ServingEndpointsDataPlane.(*serving.MockServingEndpointsDataPlaneInterface) - if !ok { - panic(fmt.Sprintf("expected ServingEndpointsDataPlane to be *serving.MockServingEndpointsDataPlaneInterface, actual was %T", m.WorkspaceClient.ServingEndpointsDataPlane)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockSettingsAPI() *settings.MockSettingsInterface { - api, ok := m.WorkspaceClient.Settings.(*settings.MockSettingsInterface) - if !ok { - panic(fmt.Sprintf("expected Settings to be *settings.MockSettingsInterface, actual was %T", m.WorkspaceClient.Settings)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockSharesAPI() *sharing.MockSharesInterface { - api, ok := m.WorkspaceClient.Shares.(*sharing.MockSharesInterface) - if !ok { - panic(fmt.Sprintf("expected Shares to be *sharing.MockSharesInterface, actual was %T", m.WorkspaceClient.Shares)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockStatementExecutionAPI() *sql.MockStatementExecutionInterface { - api, ok := m.WorkspaceClient.StatementExecution.(*sql.MockStatementExecutionInterface) - if !ok { - panic(fmt.Sprintf("expected StatementExecution to be *sql.MockStatementExecutionInterface, actual was %T", m.WorkspaceClient.StatementExecution)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockStorageCredentialsAPI() *catalog.MockStorageCredentialsInterface { - api, ok := m.WorkspaceClient.StorageCredentials.(*catalog.MockStorageCredentialsInterface) - if !ok { - panic(fmt.Sprintf("expected StorageCredentials to be *catalog.MockStorageCredentialsInterface, actual was %T", m.WorkspaceClient.StorageCredentials)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockSystemSchemasAPI() *catalog.MockSystemSchemasInterface { - api, ok := m.WorkspaceClient.SystemSchemas.(*catalog.MockSystemSchemasInterface) - if !ok { - panic(fmt.Sprintf("expected SystemSchemas to be *catalog.MockSystemSchemasInterface, actual was %T", m.WorkspaceClient.SystemSchemas)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockTableConstraintsAPI() *catalog.MockTableConstraintsInterface { - api, ok := m.WorkspaceClient.TableConstraints.(*catalog.MockTableConstraintsInterface) - if !ok { - panic(fmt.Sprintf("expected TableConstraints to be *catalog.MockTableConstraintsInterface, actual was %T", m.WorkspaceClient.TableConstraints)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockTablesAPI() *catalog.MockTablesInterface { - api, ok := m.WorkspaceClient.Tables.(*catalog.MockTablesInterface) - if !ok { - panic(fmt.Sprintf("expected Tables to be *catalog.MockTablesInterface, actual was %T", m.WorkspaceClient.Tables)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockTemporaryTableCredentialsAPI() *catalog.MockTemporaryTableCredentialsInterface { - api, ok := m.WorkspaceClient.TemporaryTableCredentials.(*catalog.MockTemporaryTableCredentialsInterface) - if !ok { - panic(fmt.Sprintf("expected TemporaryTableCredentials to be *catalog.MockTemporaryTableCredentialsInterface, actual was %T", m.WorkspaceClient.TemporaryTableCredentials)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockTokenManagementAPI() *settings.MockTokenManagementInterface { - api, ok := m.WorkspaceClient.TokenManagement.(*settings.MockTokenManagementInterface) - if !ok { - panic(fmt.Sprintf("expected TokenManagement to be *settings.MockTokenManagementInterface, actual was %T", m.WorkspaceClient.TokenManagement)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockTokensAPI() *settings.MockTokensInterface { - api, ok := m.WorkspaceClient.Tokens.(*settings.MockTokensInterface) - if !ok { - panic(fmt.Sprintf("expected Tokens to be *settings.MockTokensInterface, actual was %T", m.WorkspaceClient.Tokens)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockUsersAPI() *iam.MockUsersInterface { - api, ok := m.WorkspaceClient.Users.(*iam.MockUsersInterface) - if !ok { - panic(fmt.Sprintf("expected Users to be *iam.MockUsersInterface, actual was %T", m.WorkspaceClient.Users)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockVectorSearchEndpointsAPI() *vectorsearch.MockVectorSearchEndpointsInterface { - api, ok := m.WorkspaceClient.VectorSearchEndpoints.(*vectorsearch.MockVectorSearchEndpointsInterface) - if !ok { - panic(fmt.Sprintf("expected VectorSearchEndpoints to be *vectorsearch.MockVectorSearchEndpointsInterface, actual was %T", m.WorkspaceClient.VectorSearchEndpoints)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockVectorSearchIndexesAPI() *vectorsearch.MockVectorSearchIndexesInterface { - api, ok := m.WorkspaceClient.VectorSearchIndexes.(*vectorsearch.MockVectorSearchIndexesInterface) - if !ok { - panic(fmt.Sprintf("expected VectorSearchIndexes to be *vectorsearch.MockVectorSearchIndexesInterface, actual was %T", m.WorkspaceClient.VectorSearchIndexes)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockVolumesAPI() *catalog.MockVolumesInterface { - api, ok := m.WorkspaceClient.Volumes.(*catalog.MockVolumesInterface) - if !ok { - panic(fmt.Sprintf("expected Volumes to be *catalog.MockVolumesInterface, actual was %T", m.WorkspaceClient.Volumes)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockWarehousesAPI() *sql.MockWarehousesInterface { - api, ok := m.WorkspaceClient.Warehouses.(*sql.MockWarehousesInterface) - if !ok { - panic(fmt.Sprintf("expected Warehouses to be *sql.MockWarehousesInterface, actual was %T", m.WorkspaceClient.Warehouses)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockWorkspaceAPI() *workspace.MockWorkspaceInterface { - api, ok := m.WorkspaceClient.Workspace.(*workspace.MockWorkspaceInterface) - if !ok { - panic(fmt.Sprintf("expected Workspace to be *workspace.MockWorkspaceInterface, actual was %T", m.WorkspaceClient.Workspace)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockWorkspaceBindingsAPI() *catalog.MockWorkspaceBindingsInterface { - api, ok := m.WorkspaceClient.WorkspaceBindings.(*catalog.MockWorkspaceBindingsInterface) - if !ok { - panic(fmt.Sprintf("expected WorkspaceBindings to be *catalog.MockWorkspaceBindingsInterface, actual was %T", m.WorkspaceClient.WorkspaceBindings)) - } - return api -} - -func (m *MockWorkspaceClient) GetMockWorkspaceConfAPI() *settings.MockWorkspaceConfInterface { - api, ok := m.WorkspaceClient.WorkspaceConf.(*settings.MockWorkspaceConfInterface) - if !ok { - panic(fmt.Sprintf("expected WorkspaceConf to be *settings.MockWorkspaceConfInterface, actual was %T", m.WorkspaceClient.WorkspaceConf)) - } - return api -} diff --git a/experimental/mocks/mocks_test.go b/experimental/mocks/mocks_test.go deleted file mode 100644 index 538e73f41..000000000 --- a/experimental/mocks/mocks_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package mocks - -import ( - "context" - "testing" - - "github.com/databricks/databricks-sdk-go" - "github.com/databricks/databricks-sdk-go/service/compute" - "github.com/databricks/databricks-sdk-go/service/iam" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" -) - -func TestMockWorkspaceClient(t *testing.T) { - ctx := context.Background() - w := NewMockWorkspaceClient(t) - mockClusters := w.GetMockClustersAPI() - mockClusters.EXPECT().ListAll( - ctx, - mock.AnythingOfType("compute.ListClustersRequest"), - ).Return( - []compute.ClusterDetails{ - {ClusterName: "test-cluster-1"}, - {ClusterName: "test-cluster-2"}, - }, nil) - - clusters, err := listClusters(ctx, w.WorkspaceClient) - - assert.NoError(t, err) - assert.NotEmpty(t, clusters) - assert.Equal(t, clusters[0].ClusterName, "test-cluster-1") - assert.Equal(t, clusters[1].ClusterName, "test-cluster-2") -} - -func TestAccountWorkspaceClient(t *testing.T) { - ctx := context.Background() - w := NewMockAccountClient(t) - mockUsers := w.GetMockAccountUsersAPI() - mockUsers.EXPECT().ListAll( - ctx, - mock.AnythingOfType("iam.ListAccountUsersRequest"), - ).Return( - []iam.User{ - {DisplayName: "test-user-1"}, - {DisplayName: "test-user-2"}, - }, nil) - - users, err := listAccountUsers(ctx, w.AccountClient) - - assert.NoError(t, err) - assert.NotEmpty(t, users) - assert.Equal(t, users[0].DisplayName, "test-user-1") - assert.Equal(t, users[1].DisplayName, "test-user-2") -} - -func listClusters(ctx context.Context, w *databricks.WorkspaceClient) ([]compute.ClusterDetails, error) { - return w.Clusters.ListAll(ctx, compute.ListClustersRequest{}) -} - -func listAccountUsers(ctx context.Context, a *databricks.AccountClient) ([]iam.User, error) { - return a.Users.ListAll(ctx, iam.ListAccountUsersRequest{}) -} diff --git a/experimental/mocks/service/apps/mock_apps_interface.go b/experimental/mocks/service/apps/mock_apps_interface.go deleted file mode 100644 index 2b91a11b2..000000000 --- a/experimental/mocks/service/apps/mock_apps_interface.go +++ /dev/null @@ -1,1803 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package apps - -import ( - context "context" - - apps "github.com/databricks/databricks-sdk-go/service/apps" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockAppsInterface is an autogenerated mock type for the AppsInterface type -type MockAppsInterface struct { - mock.Mock -} - -type MockAppsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAppsInterface) EXPECT() *MockAppsInterface_Expecter { - return &MockAppsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, createAppRequest -func (_m *MockAppsInterface) Create(ctx context.Context, createAppRequest apps.CreateAppRequest) (*apps.WaitGetAppActive[apps.App], error) { - ret := _m.Called(ctx, createAppRequest) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *apps.WaitGetAppActive[apps.App] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppRequest) (*apps.WaitGetAppActive[apps.App], error)); ok { - return rf(ctx, createAppRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppRequest) *apps.WaitGetAppActive[apps.App]); ok { - r0 = rf(ctx, createAppRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.WaitGetAppActive[apps.App]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.CreateAppRequest) error); ok { - r1 = rf(ctx, createAppRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAppsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - createAppRequest apps.CreateAppRequest -func (_e *MockAppsInterface_Expecter) Create(ctx interface{}, createAppRequest interface{}) *MockAppsInterface_Create_Call { - return &MockAppsInterface_Create_Call{Call: _e.mock.On("Create", ctx, createAppRequest)} -} - -func (_c *MockAppsInterface_Create_Call) Run(run func(ctx context.Context, createAppRequest apps.CreateAppRequest)) *MockAppsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.CreateAppRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_Create_Call) Return(_a0 *apps.WaitGetAppActive[apps.App], _a1 error) *MockAppsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_Create_Call) RunAndReturn(run func(context.Context, apps.CreateAppRequest) (*apps.WaitGetAppActive[apps.App], error)) *MockAppsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateAndWait provides a mock function with given fields: ctx, createAppRequest, options -func (_m *MockAppsInterface) CreateAndWait(ctx context.Context, createAppRequest apps.CreateAppRequest, options ...retries.Option[apps.App]) (*apps.App, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createAppRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateAndWait") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppRequest, ...retries.Option[apps.App]) (*apps.App, error)); ok { - return rf(ctx, createAppRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppRequest, ...retries.Option[apps.App]) *apps.App); ok { - r0 = rf(ctx, createAppRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.CreateAppRequest, ...retries.Option[apps.App]) error); ok { - r1 = rf(ctx, createAppRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait' -type MockAppsInterface_CreateAndWait_Call struct { - *mock.Call -} - -// CreateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createAppRequest apps.CreateAppRequest -// - options ...retries.Option[apps.App] -func (_e *MockAppsInterface_Expecter) CreateAndWait(ctx interface{}, createAppRequest interface{}, options ...interface{}) *MockAppsInterface_CreateAndWait_Call { - return &MockAppsInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait", - append([]interface{}{ctx, createAppRequest}, options...)...)} -} - -func (_c *MockAppsInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createAppRequest apps.CreateAppRequest, options ...retries.Option[apps.App])) *MockAppsInterface_CreateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[apps.App], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[apps.App]) - } - } - run(args[0].(context.Context), args[1].(apps.CreateAppRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockAppsInterface_CreateAndWait_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_CreateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, apps.CreateAppRequest, ...retries.Option[apps.App]) (*apps.App, error)) *MockAppsInterface_CreateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) Delete(ctx context.Context, request apps.DeleteAppRequest) (*apps.App, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.DeleteAppRequest) (*apps.App, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.DeleteAppRequest) *apps.App); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.DeleteAppRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAppsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request apps.DeleteAppRequest -func (_e *MockAppsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAppsInterface_Delete_Call { - return &MockAppsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAppsInterface_Delete_Call) Run(run func(ctx context.Context, request apps.DeleteAppRequest)) *MockAppsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.DeleteAppRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_Delete_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_Delete_Call) RunAndReturn(run func(context.Context, apps.DeleteAppRequest) (*apps.App, error)) *MockAppsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockAppsInterface) DeleteByName(ctx context.Context, name string) (*apps.App, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*apps.App, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *apps.App); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockAppsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAppsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockAppsInterface_DeleteByName_Call { - return &MockAppsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockAppsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockAppsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAppsInterface_DeleteByName_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_DeleteByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) (*apps.App, error)) *MockAppsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Deploy provides a mock function with given fields: ctx, createAppDeploymentRequest -func (_m *MockAppsInterface) Deploy(ctx context.Context, createAppDeploymentRequest apps.CreateAppDeploymentRequest) (*apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment], error) { - ret := _m.Called(ctx, createAppDeploymentRequest) - - if len(ret) == 0 { - panic("no return value specified for Deploy") - } - - var r0 *apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppDeploymentRequest) (*apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment], error)); ok { - return rf(ctx, createAppDeploymentRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppDeploymentRequest) *apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment]); ok { - r0 = rf(ctx, createAppDeploymentRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.CreateAppDeploymentRequest) error); ok { - r1 = rf(ctx, createAppDeploymentRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_Deploy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deploy' -type MockAppsInterface_Deploy_Call struct { - *mock.Call -} - -// Deploy is a helper method to define mock.On call -// - ctx context.Context -// - createAppDeploymentRequest apps.CreateAppDeploymentRequest -func (_e *MockAppsInterface_Expecter) Deploy(ctx interface{}, createAppDeploymentRequest interface{}) *MockAppsInterface_Deploy_Call { - return &MockAppsInterface_Deploy_Call{Call: _e.mock.On("Deploy", ctx, createAppDeploymentRequest)} -} - -func (_c *MockAppsInterface_Deploy_Call) Run(run func(ctx context.Context, createAppDeploymentRequest apps.CreateAppDeploymentRequest)) *MockAppsInterface_Deploy_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.CreateAppDeploymentRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_Deploy_Call) Return(_a0 *apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment], _a1 error) *MockAppsInterface_Deploy_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_Deploy_Call) RunAndReturn(run func(context.Context, apps.CreateAppDeploymentRequest) (*apps.WaitGetDeploymentAppSucceeded[apps.AppDeployment], error)) *MockAppsInterface_Deploy_Call { - _c.Call.Return(run) - return _c -} - -// DeployAndWait provides a mock function with given fields: ctx, createAppDeploymentRequest, options -func (_m *MockAppsInterface) DeployAndWait(ctx context.Context, createAppDeploymentRequest apps.CreateAppDeploymentRequest, options ...retries.Option[apps.AppDeployment]) (*apps.AppDeployment, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createAppDeploymentRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for DeployAndWait") - } - - var r0 *apps.AppDeployment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppDeploymentRequest, ...retries.Option[apps.AppDeployment]) (*apps.AppDeployment, error)); ok { - return rf(ctx, createAppDeploymentRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.CreateAppDeploymentRequest, ...retries.Option[apps.AppDeployment]) *apps.AppDeployment); ok { - r0 = rf(ctx, createAppDeploymentRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppDeployment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.CreateAppDeploymentRequest, ...retries.Option[apps.AppDeployment]) error); ok { - r1 = rf(ctx, createAppDeploymentRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_DeployAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeployAndWait' -type MockAppsInterface_DeployAndWait_Call struct { - *mock.Call -} - -// DeployAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createAppDeploymentRequest apps.CreateAppDeploymentRequest -// - options ...retries.Option[apps.AppDeployment] -func (_e *MockAppsInterface_Expecter) DeployAndWait(ctx interface{}, createAppDeploymentRequest interface{}, options ...interface{}) *MockAppsInterface_DeployAndWait_Call { - return &MockAppsInterface_DeployAndWait_Call{Call: _e.mock.On("DeployAndWait", - append([]interface{}{ctx, createAppDeploymentRequest}, options...)...)} -} - -func (_c *MockAppsInterface_DeployAndWait_Call) Run(run func(ctx context.Context, createAppDeploymentRequest apps.CreateAppDeploymentRequest, options ...retries.Option[apps.AppDeployment])) *MockAppsInterface_DeployAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[apps.AppDeployment], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[apps.AppDeployment]) - } - } - run(args[0].(context.Context), args[1].(apps.CreateAppDeploymentRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockAppsInterface_DeployAndWait_Call) Return(_a0 *apps.AppDeployment, _a1 error) *MockAppsInterface_DeployAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_DeployAndWait_Call) RunAndReturn(run func(context.Context, apps.CreateAppDeploymentRequest, ...retries.Option[apps.AppDeployment]) (*apps.AppDeployment, error)) *MockAppsInterface_DeployAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) Get(ctx context.Context, request apps.GetAppRequest) (*apps.App, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppRequest) (*apps.App, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppRequest) *apps.App); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.GetAppRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAppsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request apps.GetAppRequest -func (_e *MockAppsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAppsInterface_Get_Call { - return &MockAppsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAppsInterface_Get_Call) Run(run func(ctx context.Context, request apps.GetAppRequest)) *MockAppsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.GetAppRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_Get_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_Get_Call) RunAndReturn(run func(context.Context, apps.GetAppRequest) (*apps.App, error)) *MockAppsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockAppsInterface) GetByName(ctx context.Context, name string) (*apps.App, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*apps.App, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *apps.App); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockAppsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAppsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockAppsInterface_GetByName_Call { - return &MockAppsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockAppsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockAppsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAppsInterface_GetByName_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*apps.App, error)) *MockAppsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetDeployment provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) GetDeployment(ctx context.Context, request apps.GetAppDeploymentRequest) (*apps.AppDeployment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetDeployment") - } - - var r0 *apps.AppDeployment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppDeploymentRequest) (*apps.AppDeployment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppDeploymentRequest) *apps.AppDeployment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppDeployment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.GetAppDeploymentRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_GetDeployment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeployment' -type MockAppsInterface_GetDeployment_Call struct { - *mock.Call -} - -// GetDeployment is a helper method to define mock.On call -// - ctx context.Context -// - request apps.GetAppDeploymentRequest -func (_e *MockAppsInterface_Expecter) GetDeployment(ctx interface{}, request interface{}) *MockAppsInterface_GetDeployment_Call { - return &MockAppsInterface_GetDeployment_Call{Call: _e.mock.On("GetDeployment", ctx, request)} -} - -func (_c *MockAppsInterface_GetDeployment_Call) Run(run func(ctx context.Context, request apps.GetAppDeploymentRequest)) *MockAppsInterface_GetDeployment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.GetAppDeploymentRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_GetDeployment_Call) Return(_a0 *apps.AppDeployment, _a1 error) *MockAppsInterface_GetDeployment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_GetDeployment_Call) RunAndReturn(run func(context.Context, apps.GetAppDeploymentRequest) (*apps.AppDeployment, error)) *MockAppsInterface_GetDeployment_Call { - _c.Call.Return(run) - return _c -} - -// GetDeploymentByAppNameAndDeploymentId provides a mock function with given fields: ctx, appName, deploymentId -func (_m *MockAppsInterface) GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*apps.AppDeployment, error) { - ret := _m.Called(ctx, appName, deploymentId) - - if len(ret) == 0 { - panic("no return value specified for GetDeploymentByAppNameAndDeploymentId") - } - - var r0 *apps.AppDeployment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*apps.AppDeployment, error)); ok { - return rf(ctx, appName, deploymentId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *apps.AppDeployment); ok { - r0 = rf(ctx, appName, deploymentId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppDeployment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, appName, deploymentId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDeploymentByAppNameAndDeploymentId' -type MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call struct { - *mock.Call -} - -// GetDeploymentByAppNameAndDeploymentId is a helper method to define mock.On call -// - ctx context.Context -// - appName string -// - deploymentId string -func (_e *MockAppsInterface_Expecter) GetDeploymentByAppNameAndDeploymentId(ctx interface{}, appName interface{}, deploymentId interface{}) *MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call { - return &MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call{Call: _e.mock.On("GetDeploymentByAppNameAndDeploymentId", ctx, appName, deploymentId)} -} - -func (_c *MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call) Run(run func(ctx context.Context, appName string, deploymentId string)) *MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call) Return(_a0 *apps.AppDeployment, _a1 error) *MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call) RunAndReturn(run func(context.Context, string, string) (*apps.AppDeployment, error)) *MockAppsInterface_GetDeploymentByAppNameAndDeploymentId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) GetPermissionLevels(ctx context.Context, request apps.GetAppPermissionLevelsRequest) (*apps.GetAppPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *apps.GetAppPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppPermissionLevelsRequest) (*apps.GetAppPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppPermissionLevelsRequest) *apps.GetAppPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.GetAppPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.GetAppPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockAppsInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request apps.GetAppPermissionLevelsRequest -func (_e *MockAppsInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockAppsInterface_GetPermissionLevels_Call { - return &MockAppsInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockAppsInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request apps.GetAppPermissionLevelsRequest)) *MockAppsInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.GetAppPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_GetPermissionLevels_Call) Return(_a0 *apps.GetAppPermissionLevelsResponse, _a1 error) *MockAppsInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, apps.GetAppPermissionLevelsRequest) (*apps.GetAppPermissionLevelsResponse, error)) *MockAppsInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByAppName provides a mock function with given fields: ctx, appName -func (_m *MockAppsInterface) GetPermissionLevelsByAppName(ctx context.Context, appName string) (*apps.GetAppPermissionLevelsResponse, error) { - ret := _m.Called(ctx, appName) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByAppName") - } - - var r0 *apps.GetAppPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*apps.GetAppPermissionLevelsResponse, error)); ok { - return rf(ctx, appName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *apps.GetAppPermissionLevelsResponse); ok { - r0 = rf(ctx, appName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.GetAppPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, appName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_GetPermissionLevelsByAppName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByAppName' -type MockAppsInterface_GetPermissionLevelsByAppName_Call struct { - *mock.Call -} - -// GetPermissionLevelsByAppName is a helper method to define mock.On call -// - ctx context.Context -// - appName string -func (_e *MockAppsInterface_Expecter) GetPermissionLevelsByAppName(ctx interface{}, appName interface{}) *MockAppsInterface_GetPermissionLevelsByAppName_Call { - return &MockAppsInterface_GetPermissionLevelsByAppName_Call{Call: _e.mock.On("GetPermissionLevelsByAppName", ctx, appName)} -} - -func (_c *MockAppsInterface_GetPermissionLevelsByAppName_Call) Run(run func(ctx context.Context, appName string)) *MockAppsInterface_GetPermissionLevelsByAppName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAppsInterface_GetPermissionLevelsByAppName_Call) Return(_a0 *apps.GetAppPermissionLevelsResponse, _a1 error) *MockAppsInterface_GetPermissionLevelsByAppName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_GetPermissionLevelsByAppName_Call) RunAndReturn(run func(context.Context, string) (*apps.GetAppPermissionLevelsResponse, error)) *MockAppsInterface_GetPermissionLevelsByAppName_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) GetPermissions(ctx context.Context, request apps.GetAppPermissionsRequest) (*apps.AppPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *apps.AppPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppPermissionsRequest) (*apps.AppPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.GetAppPermissionsRequest) *apps.AppPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.GetAppPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockAppsInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request apps.GetAppPermissionsRequest -func (_e *MockAppsInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockAppsInterface_GetPermissions_Call { - return &MockAppsInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockAppsInterface_GetPermissions_Call) Run(run func(ctx context.Context, request apps.GetAppPermissionsRequest)) *MockAppsInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.GetAppPermissionsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_GetPermissions_Call) Return(_a0 *apps.AppPermissions, _a1 error) *MockAppsInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, apps.GetAppPermissionsRequest) (*apps.AppPermissions, error)) *MockAppsInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByAppName provides a mock function with given fields: ctx, appName -func (_m *MockAppsInterface) GetPermissionsByAppName(ctx context.Context, appName string) (*apps.AppPermissions, error) { - ret := _m.Called(ctx, appName) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByAppName") - } - - var r0 *apps.AppPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*apps.AppPermissions, error)); ok { - return rf(ctx, appName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *apps.AppPermissions); ok { - r0 = rf(ctx, appName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, appName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_GetPermissionsByAppName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByAppName' -type MockAppsInterface_GetPermissionsByAppName_Call struct { - *mock.Call -} - -// GetPermissionsByAppName is a helper method to define mock.On call -// - ctx context.Context -// - appName string -func (_e *MockAppsInterface_Expecter) GetPermissionsByAppName(ctx interface{}, appName interface{}) *MockAppsInterface_GetPermissionsByAppName_Call { - return &MockAppsInterface_GetPermissionsByAppName_Call{Call: _e.mock.On("GetPermissionsByAppName", ctx, appName)} -} - -func (_c *MockAppsInterface_GetPermissionsByAppName_Call) Run(run func(ctx context.Context, appName string)) *MockAppsInterface_GetPermissionsByAppName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAppsInterface_GetPermissionsByAppName_Call) Return(_a0 *apps.AppPermissions, _a1 error) *MockAppsInterface_GetPermissionsByAppName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_GetPermissionsByAppName_Call) RunAndReturn(run func(context.Context, string) (*apps.AppPermissions, error)) *MockAppsInterface_GetPermissionsByAppName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) List(ctx context.Context, request apps.ListAppsRequest) listing.Iterator[apps.App] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[apps.App] - if rf, ok := ret.Get(0).(func(context.Context, apps.ListAppsRequest) listing.Iterator[apps.App]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[apps.App]) - } - } - - return r0 -} - -// MockAppsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAppsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request apps.ListAppsRequest -func (_e *MockAppsInterface_Expecter) List(ctx interface{}, request interface{}) *MockAppsInterface_List_Call { - return &MockAppsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAppsInterface_List_Call) Run(run func(ctx context.Context, request apps.ListAppsRequest)) *MockAppsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.ListAppsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_List_Call) Return(_a0 listing.Iterator[apps.App]) *MockAppsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAppsInterface_List_Call) RunAndReturn(run func(context.Context, apps.ListAppsRequest) listing.Iterator[apps.App]) *MockAppsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) ListAll(ctx context.Context, request apps.ListAppsRequest) ([]apps.App, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.ListAppsRequest) ([]apps.App, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.ListAppsRequest) []apps.App); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.ListAppsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAppsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request apps.ListAppsRequest -func (_e *MockAppsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAppsInterface_ListAll_Call { - return &MockAppsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAppsInterface_ListAll_Call) Run(run func(ctx context.Context, request apps.ListAppsRequest)) *MockAppsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.ListAppsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_ListAll_Call) Return(_a0 []apps.App, _a1 error) *MockAppsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_ListAll_Call) RunAndReturn(run func(context.Context, apps.ListAppsRequest) ([]apps.App, error)) *MockAppsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListDeployments provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) ListDeployments(ctx context.Context, request apps.ListAppDeploymentsRequest) listing.Iterator[apps.AppDeployment] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListDeployments") - } - - var r0 listing.Iterator[apps.AppDeployment] - if rf, ok := ret.Get(0).(func(context.Context, apps.ListAppDeploymentsRequest) listing.Iterator[apps.AppDeployment]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[apps.AppDeployment]) - } - } - - return r0 -} - -// MockAppsInterface_ListDeployments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDeployments' -type MockAppsInterface_ListDeployments_Call struct { - *mock.Call -} - -// ListDeployments is a helper method to define mock.On call -// - ctx context.Context -// - request apps.ListAppDeploymentsRequest -func (_e *MockAppsInterface_Expecter) ListDeployments(ctx interface{}, request interface{}) *MockAppsInterface_ListDeployments_Call { - return &MockAppsInterface_ListDeployments_Call{Call: _e.mock.On("ListDeployments", ctx, request)} -} - -func (_c *MockAppsInterface_ListDeployments_Call) Run(run func(ctx context.Context, request apps.ListAppDeploymentsRequest)) *MockAppsInterface_ListDeployments_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.ListAppDeploymentsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_ListDeployments_Call) Return(_a0 listing.Iterator[apps.AppDeployment]) *MockAppsInterface_ListDeployments_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAppsInterface_ListDeployments_Call) RunAndReturn(run func(context.Context, apps.ListAppDeploymentsRequest) listing.Iterator[apps.AppDeployment]) *MockAppsInterface_ListDeployments_Call { - _c.Call.Return(run) - return _c -} - -// ListDeploymentsAll provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) ListDeploymentsAll(ctx context.Context, request apps.ListAppDeploymentsRequest) ([]apps.AppDeployment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListDeploymentsAll") - } - - var r0 []apps.AppDeployment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.ListAppDeploymentsRequest) ([]apps.AppDeployment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.ListAppDeploymentsRequest) []apps.AppDeployment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]apps.AppDeployment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.ListAppDeploymentsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_ListDeploymentsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDeploymentsAll' -type MockAppsInterface_ListDeploymentsAll_Call struct { - *mock.Call -} - -// ListDeploymentsAll is a helper method to define mock.On call -// - ctx context.Context -// - request apps.ListAppDeploymentsRequest -func (_e *MockAppsInterface_Expecter) ListDeploymentsAll(ctx interface{}, request interface{}) *MockAppsInterface_ListDeploymentsAll_Call { - return &MockAppsInterface_ListDeploymentsAll_Call{Call: _e.mock.On("ListDeploymentsAll", ctx, request)} -} - -func (_c *MockAppsInterface_ListDeploymentsAll_Call) Run(run func(ctx context.Context, request apps.ListAppDeploymentsRequest)) *MockAppsInterface_ListDeploymentsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.ListAppDeploymentsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_ListDeploymentsAll_Call) Return(_a0 []apps.AppDeployment, _a1 error) *MockAppsInterface_ListDeploymentsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_ListDeploymentsAll_Call) RunAndReturn(run func(context.Context, apps.ListAppDeploymentsRequest) ([]apps.AppDeployment, error)) *MockAppsInterface_ListDeploymentsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListDeploymentsByAppName provides a mock function with given fields: ctx, appName -func (_m *MockAppsInterface) ListDeploymentsByAppName(ctx context.Context, appName string) (*apps.ListAppDeploymentsResponse, error) { - ret := _m.Called(ctx, appName) - - if len(ret) == 0 { - panic("no return value specified for ListDeploymentsByAppName") - } - - var r0 *apps.ListAppDeploymentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*apps.ListAppDeploymentsResponse, error)); ok { - return rf(ctx, appName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *apps.ListAppDeploymentsResponse); ok { - r0 = rf(ctx, appName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.ListAppDeploymentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, appName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_ListDeploymentsByAppName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDeploymentsByAppName' -type MockAppsInterface_ListDeploymentsByAppName_Call struct { - *mock.Call -} - -// ListDeploymentsByAppName is a helper method to define mock.On call -// - ctx context.Context -// - appName string -func (_e *MockAppsInterface_Expecter) ListDeploymentsByAppName(ctx interface{}, appName interface{}) *MockAppsInterface_ListDeploymentsByAppName_Call { - return &MockAppsInterface_ListDeploymentsByAppName_Call{Call: _e.mock.On("ListDeploymentsByAppName", ctx, appName)} -} - -func (_c *MockAppsInterface_ListDeploymentsByAppName_Call) Run(run func(ctx context.Context, appName string)) *MockAppsInterface_ListDeploymentsByAppName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAppsInterface_ListDeploymentsByAppName_Call) Return(_a0 *apps.ListAppDeploymentsResponse, _a1 error) *MockAppsInterface_ListDeploymentsByAppName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_ListDeploymentsByAppName_Call) RunAndReturn(run func(context.Context, string) (*apps.ListAppDeploymentsResponse, error)) *MockAppsInterface_ListDeploymentsByAppName_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) SetPermissions(ctx context.Context, request apps.AppPermissionsRequest) (*apps.AppPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *apps.AppPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.AppPermissionsRequest) (*apps.AppPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.AppPermissionsRequest) *apps.AppPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.AppPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockAppsInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request apps.AppPermissionsRequest -func (_e *MockAppsInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockAppsInterface_SetPermissions_Call { - return &MockAppsInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockAppsInterface_SetPermissions_Call) Run(run func(ctx context.Context, request apps.AppPermissionsRequest)) *MockAppsInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.AppPermissionsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_SetPermissions_Call) Return(_a0 *apps.AppPermissions, _a1 error) *MockAppsInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, apps.AppPermissionsRequest) (*apps.AppPermissions, error)) *MockAppsInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: ctx, startAppRequest -func (_m *MockAppsInterface) Start(ctx context.Context, startAppRequest apps.StartAppRequest) (*apps.WaitGetAppActive[apps.App], error) { - ret := _m.Called(ctx, startAppRequest) - - if len(ret) == 0 { - panic("no return value specified for Start") - } - - var r0 *apps.WaitGetAppActive[apps.App] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest) (*apps.WaitGetAppActive[apps.App], error)); ok { - return rf(ctx, startAppRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest) *apps.WaitGetAppActive[apps.App]); ok { - r0 = rf(ctx, startAppRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.WaitGetAppActive[apps.App]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.StartAppRequest) error); ok { - r1 = rf(ctx, startAppRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type MockAppsInterface_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - ctx context.Context -// - startAppRequest apps.StartAppRequest -func (_e *MockAppsInterface_Expecter) Start(ctx interface{}, startAppRequest interface{}) *MockAppsInterface_Start_Call { - return &MockAppsInterface_Start_Call{Call: _e.mock.On("Start", ctx, startAppRequest)} -} - -func (_c *MockAppsInterface_Start_Call) Run(run func(ctx context.Context, startAppRequest apps.StartAppRequest)) *MockAppsInterface_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.StartAppRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_Start_Call) Return(_a0 *apps.WaitGetAppActive[apps.App], _a1 error) *MockAppsInterface_Start_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_Start_Call) RunAndReturn(run func(context.Context, apps.StartAppRequest) (*apps.WaitGetAppActive[apps.App], error)) *MockAppsInterface_Start_Call { - _c.Call.Return(run) - return _c -} - -// StartAndWait provides a mock function with given fields: ctx, startAppRequest, options -func (_m *MockAppsInterface) StartAndWait(ctx context.Context, startAppRequest apps.StartAppRequest, options ...retries.Option[apps.App]) (*apps.App, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, startAppRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StartAndWait") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest, ...retries.Option[apps.App]) (*apps.App, error)); ok { - return rf(ctx, startAppRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.StartAppRequest, ...retries.Option[apps.App]) *apps.App); ok { - r0 = rf(ctx, startAppRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.StartAppRequest, ...retries.Option[apps.App]) error); ok { - r1 = rf(ctx, startAppRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_StartAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartAndWait' -type MockAppsInterface_StartAndWait_Call struct { - *mock.Call -} - -// StartAndWait is a helper method to define mock.On call -// - ctx context.Context -// - startAppRequest apps.StartAppRequest -// - options ...retries.Option[apps.App] -func (_e *MockAppsInterface_Expecter) StartAndWait(ctx interface{}, startAppRequest interface{}, options ...interface{}) *MockAppsInterface_StartAndWait_Call { - return &MockAppsInterface_StartAndWait_Call{Call: _e.mock.On("StartAndWait", - append([]interface{}{ctx, startAppRequest}, options...)...)} -} - -func (_c *MockAppsInterface_StartAndWait_Call) Run(run func(ctx context.Context, startAppRequest apps.StartAppRequest, options ...retries.Option[apps.App])) *MockAppsInterface_StartAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[apps.App], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[apps.App]) - } - } - run(args[0].(context.Context), args[1].(apps.StartAppRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockAppsInterface_StartAndWait_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_StartAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_StartAndWait_Call) RunAndReturn(run func(context.Context, apps.StartAppRequest, ...retries.Option[apps.App]) (*apps.App, error)) *MockAppsInterface_StartAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Stop provides a mock function with given fields: ctx, stopAppRequest -func (_m *MockAppsInterface) Stop(ctx context.Context, stopAppRequest apps.StopAppRequest) (*apps.WaitGetAppStopped[apps.App], error) { - ret := _m.Called(ctx, stopAppRequest) - - if len(ret) == 0 { - panic("no return value specified for Stop") - } - - var r0 *apps.WaitGetAppStopped[apps.App] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.StopAppRequest) (*apps.WaitGetAppStopped[apps.App], error)); ok { - return rf(ctx, stopAppRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.StopAppRequest) *apps.WaitGetAppStopped[apps.App]); ok { - r0 = rf(ctx, stopAppRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.WaitGetAppStopped[apps.App]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.StopAppRequest) error); ok { - r1 = rf(ctx, stopAppRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' -type MockAppsInterface_Stop_Call struct { - *mock.Call -} - -// Stop is a helper method to define mock.On call -// - ctx context.Context -// - stopAppRequest apps.StopAppRequest -func (_e *MockAppsInterface_Expecter) Stop(ctx interface{}, stopAppRequest interface{}) *MockAppsInterface_Stop_Call { - return &MockAppsInterface_Stop_Call{Call: _e.mock.On("Stop", ctx, stopAppRequest)} -} - -func (_c *MockAppsInterface_Stop_Call) Run(run func(ctx context.Context, stopAppRequest apps.StopAppRequest)) *MockAppsInterface_Stop_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.StopAppRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_Stop_Call) Return(_a0 *apps.WaitGetAppStopped[apps.App], _a1 error) *MockAppsInterface_Stop_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_Stop_Call) RunAndReturn(run func(context.Context, apps.StopAppRequest) (*apps.WaitGetAppStopped[apps.App], error)) *MockAppsInterface_Stop_Call { - _c.Call.Return(run) - return _c -} - -// StopAndWait provides a mock function with given fields: ctx, stopAppRequest, options -func (_m *MockAppsInterface) StopAndWait(ctx context.Context, stopAppRequest apps.StopAppRequest, options ...retries.Option[apps.App]) (*apps.App, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, stopAppRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StopAndWait") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.StopAppRequest, ...retries.Option[apps.App]) (*apps.App, error)); ok { - return rf(ctx, stopAppRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.StopAppRequest, ...retries.Option[apps.App]) *apps.App); ok { - r0 = rf(ctx, stopAppRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.StopAppRequest, ...retries.Option[apps.App]) error); ok { - r1 = rf(ctx, stopAppRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_StopAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopAndWait' -type MockAppsInterface_StopAndWait_Call struct { - *mock.Call -} - -// StopAndWait is a helper method to define mock.On call -// - ctx context.Context -// - stopAppRequest apps.StopAppRequest -// - options ...retries.Option[apps.App] -func (_e *MockAppsInterface_Expecter) StopAndWait(ctx interface{}, stopAppRequest interface{}, options ...interface{}) *MockAppsInterface_StopAndWait_Call { - return &MockAppsInterface_StopAndWait_Call{Call: _e.mock.On("StopAndWait", - append([]interface{}{ctx, stopAppRequest}, options...)...)} -} - -func (_c *MockAppsInterface_StopAndWait_Call) Run(run func(ctx context.Context, stopAppRequest apps.StopAppRequest, options ...retries.Option[apps.App])) *MockAppsInterface_StopAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[apps.App], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[apps.App]) - } - } - run(args[0].(context.Context), args[1].(apps.StopAppRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockAppsInterface_StopAndWait_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_StopAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_StopAndWait_Call) RunAndReturn(run func(context.Context, apps.StopAppRequest, ...retries.Option[apps.App]) (*apps.App, error)) *MockAppsInterface_StopAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) Update(ctx context.Context, request apps.UpdateAppRequest) (*apps.App, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.UpdateAppRequest) (*apps.App, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.UpdateAppRequest) *apps.App); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.UpdateAppRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAppsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request apps.UpdateAppRequest -func (_e *MockAppsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAppsInterface_Update_Call { - return &MockAppsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAppsInterface_Update_Call) Run(run func(ctx context.Context, request apps.UpdateAppRequest)) *MockAppsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.UpdateAppRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_Update_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_Update_Call) RunAndReturn(run func(context.Context, apps.UpdateAppRequest) (*apps.App, error)) *MockAppsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockAppsInterface) UpdatePermissions(ctx context.Context, request apps.AppPermissionsRequest) (*apps.AppPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *apps.AppPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, apps.AppPermissionsRequest) (*apps.AppPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, apps.AppPermissionsRequest) *apps.AppPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, apps.AppPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockAppsInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request apps.AppPermissionsRequest -func (_e *MockAppsInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockAppsInterface_UpdatePermissions_Call { - return &MockAppsInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockAppsInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request apps.AppPermissionsRequest)) *MockAppsInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(apps.AppPermissionsRequest)) - }) - return _c -} - -func (_c *MockAppsInterface_UpdatePermissions_Call) Return(_a0 *apps.AppPermissions, _a1 error) *MockAppsInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, apps.AppPermissionsRequest) (*apps.AppPermissions, error)) *MockAppsInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetAppActive provides a mock function with given fields: ctx, name, timeout, callback -func (_m *MockAppsInterface) WaitGetAppActive(ctx context.Context, name string, timeout time.Duration, callback func(*apps.App)) (*apps.App, error) { - ret := _m.Called(ctx, name, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetAppActive") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*apps.App)) (*apps.App, error)); ok { - return rf(ctx, name, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*apps.App)) *apps.App); ok { - r0 = rf(ctx, name, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*apps.App)) error); ok { - r1 = rf(ctx, name, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_WaitGetAppActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetAppActive' -type MockAppsInterface_WaitGetAppActive_Call struct { - *mock.Call -} - -// WaitGetAppActive is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - timeout time.Duration -// - callback func(*apps.App) -func (_e *MockAppsInterface_Expecter) WaitGetAppActive(ctx interface{}, name interface{}, timeout interface{}, callback interface{}) *MockAppsInterface_WaitGetAppActive_Call { - return &MockAppsInterface_WaitGetAppActive_Call{Call: _e.mock.On("WaitGetAppActive", ctx, name, timeout, callback)} -} - -func (_c *MockAppsInterface_WaitGetAppActive_Call) Run(run func(ctx context.Context, name string, timeout time.Duration, callback func(*apps.App))) *MockAppsInterface_WaitGetAppActive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*apps.App))) - }) - return _c -} - -func (_c *MockAppsInterface_WaitGetAppActive_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_WaitGetAppActive_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_WaitGetAppActive_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*apps.App)) (*apps.App, error)) *MockAppsInterface_WaitGetAppActive_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetAppStopped provides a mock function with given fields: ctx, name, timeout, callback -func (_m *MockAppsInterface) WaitGetAppStopped(ctx context.Context, name string, timeout time.Duration, callback func(*apps.App)) (*apps.App, error) { - ret := _m.Called(ctx, name, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetAppStopped") - } - - var r0 *apps.App - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*apps.App)) (*apps.App, error)); ok { - return rf(ctx, name, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*apps.App)) *apps.App); ok { - r0 = rf(ctx, name, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.App) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*apps.App)) error); ok { - r1 = rf(ctx, name, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_WaitGetAppStopped_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetAppStopped' -type MockAppsInterface_WaitGetAppStopped_Call struct { - *mock.Call -} - -// WaitGetAppStopped is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - timeout time.Duration -// - callback func(*apps.App) -func (_e *MockAppsInterface_Expecter) WaitGetAppStopped(ctx interface{}, name interface{}, timeout interface{}, callback interface{}) *MockAppsInterface_WaitGetAppStopped_Call { - return &MockAppsInterface_WaitGetAppStopped_Call{Call: _e.mock.On("WaitGetAppStopped", ctx, name, timeout, callback)} -} - -func (_c *MockAppsInterface_WaitGetAppStopped_Call) Run(run func(ctx context.Context, name string, timeout time.Duration, callback func(*apps.App))) *MockAppsInterface_WaitGetAppStopped_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*apps.App))) - }) - return _c -} - -func (_c *MockAppsInterface_WaitGetAppStopped_Call) Return(_a0 *apps.App, _a1 error) *MockAppsInterface_WaitGetAppStopped_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_WaitGetAppStopped_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*apps.App)) (*apps.App, error)) *MockAppsInterface_WaitGetAppStopped_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetDeploymentAppSucceeded provides a mock function with given fields: ctx, appName, deploymentId, timeout, callback -func (_m *MockAppsInterface) WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, timeout time.Duration, callback func(*apps.AppDeployment)) (*apps.AppDeployment, error) { - ret := _m.Called(ctx, appName, deploymentId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetDeploymentAppSucceeded") - } - - var r0 *apps.AppDeployment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Duration, func(*apps.AppDeployment)) (*apps.AppDeployment, error)); ok { - return rf(ctx, appName, deploymentId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Duration, func(*apps.AppDeployment)) *apps.AppDeployment); ok { - r0 = rf(ctx, appName, deploymentId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*apps.AppDeployment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, time.Duration, func(*apps.AppDeployment)) error); ok { - r1 = rf(ctx, appName, deploymentId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAppsInterface_WaitGetDeploymentAppSucceeded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetDeploymentAppSucceeded' -type MockAppsInterface_WaitGetDeploymentAppSucceeded_Call struct { - *mock.Call -} - -// WaitGetDeploymentAppSucceeded is a helper method to define mock.On call -// - ctx context.Context -// - appName string -// - deploymentId string -// - timeout time.Duration -// - callback func(*apps.AppDeployment) -func (_e *MockAppsInterface_Expecter) WaitGetDeploymentAppSucceeded(ctx interface{}, appName interface{}, deploymentId interface{}, timeout interface{}, callback interface{}) *MockAppsInterface_WaitGetDeploymentAppSucceeded_Call { - return &MockAppsInterface_WaitGetDeploymentAppSucceeded_Call{Call: _e.mock.On("WaitGetDeploymentAppSucceeded", ctx, appName, deploymentId, timeout, callback)} -} - -func (_c *MockAppsInterface_WaitGetDeploymentAppSucceeded_Call) Run(run func(ctx context.Context, appName string, deploymentId string, timeout time.Duration, callback func(*apps.AppDeployment))) *MockAppsInterface_WaitGetDeploymentAppSucceeded_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(time.Duration), args[4].(func(*apps.AppDeployment))) - }) - return _c -} - -func (_c *MockAppsInterface_WaitGetDeploymentAppSucceeded_Call) Return(_a0 *apps.AppDeployment, _a1 error) *MockAppsInterface_WaitGetDeploymentAppSucceeded_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAppsInterface_WaitGetDeploymentAppSucceeded_Call) RunAndReturn(run func(context.Context, string, string, time.Duration, func(*apps.AppDeployment)) (*apps.AppDeployment, error)) *MockAppsInterface_WaitGetDeploymentAppSucceeded_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAppsInterface creates a new instance of MockAppsInterface. 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 NewMockAppsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAppsInterface { - mock := &MockAppsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/billing/mock_billable_usage_interface.go b/experimental/mocks/service/billing/mock_billable_usage_interface.go deleted file mode 100644 index 90c5b2d79..000000000 --- a/experimental/mocks/service/billing/mock_billable_usage_interface.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package billing - -import ( - context "context" - - billing "github.com/databricks/databricks-sdk-go/service/billing" - - mock "github.com/stretchr/testify/mock" -) - -// MockBillableUsageInterface is an autogenerated mock type for the BillableUsageInterface type -type MockBillableUsageInterface struct { - mock.Mock -} - -type MockBillableUsageInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockBillableUsageInterface) EXPECT() *MockBillableUsageInterface_Expecter { - return &MockBillableUsageInterface_Expecter{mock: &_m.Mock} -} - -// Download provides a mock function with given fields: ctx, request -func (_m *MockBillableUsageInterface) Download(ctx context.Context, request billing.DownloadRequest) (*billing.DownloadResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Download") - } - - var r0 *billing.DownloadResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.DownloadRequest) (*billing.DownloadResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.DownloadRequest) *billing.DownloadResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.DownloadResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.DownloadRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBillableUsageInterface_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' -type MockBillableUsageInterface_Download_Call struct { - *mock.Call -} - -// Download is a helper method to define mock.On call -// - ctx context.Context -// - request billing.DownloadRequest -func (_e *MockBillableUsageInterface_Expecter) Download(ctx interface{}, request interface{}) *MockBillableUsageInterface_Download_Call { - return &MockBillableUsageInterface_Download_Call{Call: _e.mock.On("Download", ctx, request)} -} - -func (_c *MockBillableUsageInterface_Download_Call) Run(run func(ctx context.Context, request billing.DownloadRequest)) *MockBillableUsageInterface_Download_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.DownloadRequest)) - }) - return _c -} - -func (_c *MockBillableUsageInterface_Download_Call) Return(_a0 *billing.DownloadResponse, _a1 error) *MockBillableUsageInterface_Download_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBillableUsageInterface_Download_Call) RunAndReturn(run func(context.Context, billing.DownloadRequest) (*billing.DownloadResponse, error)) *MockBillableUsageInterface_Download_Call { - _c.Call.Return(run) - return _c -} - -// NewMockBillableUsageInterface creates a new instance of MockBillableUsageInterface. 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 NewMockBillableUsageInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBillableUsageInterface { - mock := &MockBillableUsageInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/billing/mock_budgets_interface.go b/experimental/mocks/service/billing/mock_budgets_interface.go deleted file mode 100644 index 59256ce10..000000000 --- a/experimental/mocks/service/billing/mock_budgets_interface.go +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package billing - -import ( - context "context" - - billing "github.com/databricks/databricks-sdk-go/service/billing" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockBudgetsInterface is an autogenerated mock type for the BudgetsInterface type -type MockBudgetsInterface struct { - mock.Mock -} - -type MockBudgetsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockBudgetsInterface) EXPECT() *MockBudgetsInterface_Expecter { - return &MockBudgetsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockBudgetsInterface) Create(ctx context.Context, request billing.CreateBudgetConfigurationRequest) (*billing.CreateBudgetConfigurationResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *billing.CreateBudgetConfigurationResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.CreateBudgetConfigurationRequest) (*billing.CreateBudgetConfigurationResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.CreateBudgetConfigurationRequest) *billing.CreateBudgetConfigurationResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.CreateBudgetConfigurationResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.CreateBudgetConfigurationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBudgetsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockBudgetsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request billing.CreateBudgetConfigurationRequest -func (_e *MockBudgetsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockBudgetsInterface_Create_Call { - return &MockBudgetsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockBudgetsInterface_Create_Call) Run(run func(ctx context.Context, request billing.CreateBudgetConfigurationRequest)) *MockBudgetsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.CreateBudgetConfigurationRequest)) - }) - return _c -} - -func (_c *MockBudgetsInterface_Create_Call) Return(_a0 *billing.CreateBudgetConfigurationResponse, _a1 error) *MockBudgetsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBudgetsInterface_Create_Call) RunAndReturn(run func(context.Context, billing.CreateBudgetConfigurationRequest) (*billing.CreateBudgetConfigurationResponse, error)) *MockBudgetsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockBudgetsInterface) Delete(ctx context.Context, request billing.DeleteBudgetConfigurationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, billing.DeleteBudgetConfigurationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBudgetsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockBudgetsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request billing.DeleteBudgetConfigurationRequest -func (_e *MockBudgetsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockBudgetsInterface_Delete_Call { - return &MockBudgetsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockBudgetsInterface_Delete_Call) Run(run func(ctx context.Context, request billing.DeleteBudgetConfigurationRequest)) *MockBudgetsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.DeleteBudgetConfigurationRequest)) - }) - return _c -} - -func (_c *MockBudgetsInterface_Delete_Call) Return(_a0 error) *MockBudgetsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBudgetsInterface_Delete_Call) RunAndReturn(run func(context.Context, billing.DeleteBudgetConfigurationRequest) error) *MockBudgetsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByBudgetId provides a mock function with given fields: ctx, budgetId -func (_m *MockBudgetsInterface) DeleteByBudgetId(ctx context.Context, budgetId string) error { - ret := _m.Called(ctx, budgetId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByBudgetId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, budgetId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockBudgetsInterface_DeleteByBudgetId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByBudgetId' -type MockBudgetsInterface_DeleteByBudgetId_Call struct { - *mock.Call -} - -// DeleteByBudgetId is a helper method to define mock.On call -// - ctx context.Context -// - budgetId string -func (_e *MockBudgetsInterface_Expecter) DeleteByBudgetId(ctx interface{}, budgetId interface{}) *MockBudgetsInterface_DeleteByBudgetId_Call { - return &MockBudgetsInterface_DeleteByBudgetId_Call{Call: _e.mock.On("DeleteByBudgetId", ctx, budgetId)} -} - -func (_c *MockBudgetsInterface_DeleteByBudgetId_Call) Run(run func(ctx context.Context, budgetId string)) *MockBudgetsInterface_DeleteByBudgetId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockBudgetsInterface_DeleteByBudgetId_Call) Return(_a0 error) *MockBudgetsInterface_DeleteByBudgetId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBudgetsInterface_DeleteByBudgetId_Call) RunAndReturn(run func(context.Context, string) error) *MockBudgetsInterface_DeleteByBudgetId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockBudgetsInterface) Get(ctx context.Context, request billing.GetBudgetConfigurationRequest) (*billing.GetBudgetConfigurationResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *billing.GetBudgetConfigurationResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.GetBudgetConfigurationRequest) (*billing.GetBudgetConfigurationResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.GetBudgetConfigurationRequest) *billing.GetBudgetConfigurationResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.GetBudgetConfigurationResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.GetBudgetConfigurationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBudgetsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockBudgetsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request billing.GetBudgetConfigurationRequest -func (_e *MockBudgetsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockBudgetsInterface_Get_Call { - return &MockBudgetsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockBudgetsInterface_Get_Call) Run(run func(ctx context.Context, request billing.GetBudgetConfigurationRequest)) *MockBudgetsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.GetBudgetConfigurationRequest)) - }) - return _c -} - -func (_c *MockBudgetsInterface_Get_Call) Return(_a0 *billing.GetBudgetConfigurationResponse, _a1 error) *MockBudgetsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBudgetsInterface_Get_Call) RunAndReturn(run func(context.Context, billing.GetBudgetConfigurationRequest) (*billing.GetBudgetConfigurationResponse, error)) *MockBudgetsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByBudgetId provides a mock function with given fields: ctx, budgetId -func (_m *MockBudgetsInterface) GetByBudgetId(ctx context.Context, budgetId string) (*billing.GetBudgetConfigurationResponse, error) { - ret := _m.Called(ctx, budgetId) - - if len(ret) == 0 { - panic("no return value specified for GetByBudgetId") - } - - var r0 *billing.GetBudgetConfigurationResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*billing.GetBudgetConfigurationResponse, error)); ok { - return rf(ctx, budgetId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *billing.GetBudgetConfigurationResponse); ok { - r0 = rf(ctx, budgetId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.GetBudgetConfigurationResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, budgetId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBudgetsInterface_GetByBudgetId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByBudgetId' -type MockBudgetsInterface_GetByBudgetId_Call struct { - *mock.Call -} - -// GetByBudgetId is a helper method to define mock.On call -// - ctx context.Context -// - budgetId string -func (_e *MockBudgetsInterface_Expecter) GetByBudgetId(ctx interface{}, budgetId interface{}) *MockBudgetsInterface_GetByBudgetId_Call { - return &MockBudgetsInterface_GetByBudgetId_Call{Call: _e.mock.On("GetByBudgetId", ctx, budgetId)} -} - -func (_c *MockBudgetsInterface_GetByBudgetId_Call) Run(run func(ctx context.Context, budgetId string)) *MockBudgetsInterface_GetByBudgetId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockBudgetsInterface_GetByBudgetId_Call) Return(_a0 *billing.GetBudgetConfigurationResponse, _a1 error) *MockBudgetsInterface_GetByBudgetId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBudgetsInterface_GetByBudgetId_Call) RunAndReturn(run func(context.Context, string) (*billing.GetBudgetConfigurationResponse, error)) *MockBudgetsInterface_GetByBudgetId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockBudgetsInterface) List(ctx context.Context, request billing.ListBudgetConfigurationsRequest) listing.Iterator[billing.BudgetConfiguration] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[billing.BudgetConfiguration] - if rf, ok := ret.Get(0).(func(context.Context, billing.ListBudgetConfigurationsRequest) listing.Iterator[billing.BudgetConfiguration]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[billing.BudgetConfiguration]) - } - } - - return r0 -} - -// MockBudgetsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockBudgetsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request billing.ListBudgetConfigurationsRequest -func (_e *MockBudgetsInterface_Expecter) List(ctx interface{}, request interface{}) *MockBudgetsInterface_List_Call { - return &MockBudgetsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockBudgetsInterface_List_Call) Run(run func(ctx context.Context, request billing.ListBudgetConfigurationsRequest)) *MockBudgetsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.ListBudgetConfigurationsRequest)) - }) - return _c -} - -func (_c *MockBudgetsInterface_List_Call) Return(_a0 listing.Iterator[billing.BudgetConfiguration]) *MockBudgetsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockBudgetsInterface_List_Call) RunAndReturn(run func(context.Context, billing.ListBudgetConfigurationsRequest) listing.Iterator[billing.BudgetConfiguration]) *MockBudgetsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockBudgetsInterface) ListAll(ctx context.Context, request billing.ListBudgetConfigurationsRequest) ([]billing.BudgetConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []billing.BudgetConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.ListBudgetConfigurationsRequest) ([]billing.BudgetConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.ListBudgetConfigurationsRequest) []billing.BudgetConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]billing.BudgetConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.ListBudgetConfigurationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBudgetsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockBudgetsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request billing.ListBudgetConfigurationsRequest -func (_e *MockBudgetsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockBudgetsInterface_ListAll_Call { - return &MockBudgetsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockBudgetsInterface_ListAll_Call) Run(run func(ctx context.Context, request billing.ListBudgetConfigurationsRequest)) *MockBudgetsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.ListBudgetConfigurationsRequest)) - }) - return _c -} - -func (_c *MockBudgetsInterface_ListAll_Call) Return(_a0 []billing.BudgetConfiguration, _a1 error) *MockBudgetsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBudgetsInterface_ListAll_Call) RunAndReturn(run func(context.Context, billing.ListBudgetConfigurationsRequest) ([]billing.BudgetConfiguration, error)) *MockBudgetsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockBudgetsInterface) Update(ctx context.Context, request billing.UpdateBudgetConfigurationRequest) (*billing.UpdateBudgetConfigurationResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *billing.UpdateBudgetConfigurationResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.UpdateBudgetConfigurationRequest) (*billing.UpdateBudgetConfigurationResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.UpdateBudgetConfigurationRequest) *billing.UpdateBudgetConfigurationResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.UpdateBudgetConfigurationResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.UpdateBudgetConfigurationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockBudgetsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockBudgetsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request billing.UpdateBudgetConfigurationRequest -func (_e *MockBudgetsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockBudgetsInterface_Update_Call { - return &MockBudgetsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockBudgetsInterface_Update_Call) Run(run func(ctx context.Context, request billing.UpdateBudgetConfigurationRequest)) *MockBudgetsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.UpdateBudgetConfigurationRequest)) - }) - return _c -} - -func (_c *MockBudgetsInterface_Update_Call) Return(_a0 *billing.UpdateBudgetConfigurationResponse, _a1 error) *MockBudgetsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockBudgetsInterface_Update_Call) RunAndReturn(run func(context.Context, billing.UpdateBudgetConfigurationRequest) (*billing.UpdateBudgetConfigurationResponse, error)) *MockBudgetsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockBudgetsInterface creates a new instance of MockBudgetsInterface. 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 NewMockBudgetsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockBudgetsInterface { - mock := &MockBudgetsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/billing/mock_log_delivery_interface.go b/experimental/mocks/service/billing/mock_log_delivery_interface.go deleted file mode 100644 index c163a9c26..000000000 --- a/experimental/mocks/service/billing/mock_log_delivery_interface.go +++ /dev/null @@ -1,490 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package billing - -import ( - context "context" - - billing "github.com/databricks/databricks-sdk-go/service/billing" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockLogDeliveryInterface is an autogenerated mock type for the LogDeliveryInterface type -type MockLogDeliveryInterface struct { - mock.Mock -} - -type MockLogDeliveryInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockLogDeliveryInterface) EXPECT() *MockLogDeliveryInterface_Expecter { - return &MockLogDeliveryInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockLogDeliveryInterface) Create(ctx context.Context, request billing.WrappedCreateLogDeliveryConfiguration) (*billing.WrappedLogDeliveryConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *billing.WrappedLogDeliveryConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.WrappedCreateLogDeliveryConfiguration) (*billing.WrappedLogDeliveryConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.WrappedCreateLogDeliveryConfiguration) *billing.WrappedLogDeliveryConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.WrappedLogDeliveryConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.WrappedCreateLogDeliveryConfiguration) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLogDeliveryInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockLogDeliveryInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request billing.WrappedCreateLogDeliveryConfiguration -func (_e *MockLogDeliveryInterface_Expecter) Create(ctx interface{}, request interface{}) *MockLogDeliveryInterface_Create_Call { - return &MockLogDeliveryInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockLogDeliveryInterface_Create_Call) Run(run func(ctx context.Context, request billing.WrappedCreateLogDeliveryConfiguration)) *MockLogDeliveryInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.WrappedCreateLogDeliveryConfiguration)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_Create_Call) Return(_a0 *billing.WrappedLogDeliveryConfiguration, _a1 error) *MockLogDeliveryInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLogDeliveryInterface_Create_Call) RunAndReturn(run func(context.Context, billing.WrappedCreateLogDeliveryConfiguration) (*billing.WrappedLogDeliveryConfiguration, error)) *MockLogDeliveryInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockLogDeliveryInterface) Get(ctx context.Context, request billing.GetLogDeliveryRequest) (*billing.WrappedLogDeliveryConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *billing.WrappedLogDeliveryConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.GetLogDeliveryRequest) (*billing.WrappedLogDeliveryConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.GetLogDeliveryRequest) *billing.WrappedLogDeliveryConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.WrappedLogDeliveryConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.GetLogDeliveryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLogDeliveryInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockLogDeliveryInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request billing.GetLogDeliveryRequest -func (_e *MockLogDeliveryInterface_Expecter) Get(ctx interface{}, request interface{}) *MockLogDeliveryInterface_Get_Call { - return &MockLogDeliveryInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockLogDeliveryInterface_Get_Call) Run(run func(ctx context.Context, request billing.GetLogDeliveryRequest)) *MockLogDeliveryInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.GetLogDeliveryRequest)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_Get_Call) Return(_a0 *billing.WrappedLogDeliveryConfiguration, _a1 error) *MockLogDeliveryInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLogDeliveryInterface_Get_Call) RunAndReturn(run func(context.Context, billing.GetLogDeliveryRequest) (*billing.WrappedLogDeliveryConfiguration, error)) *MockLogDeliveryInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByConfigName provides a mock function with given fields: ctx, name -func (_m *MockLogDeliveryInterface) GetByConfigName(ctx context.Context, name string) (*billing.LogDeliveryConfiguration, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByConfigName") - } - - var r0 *billing.LogDeliveryConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*billing.LogDeliveryConfiguration, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *billing.LogDeliveryConfiguration); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.LogDeliveryConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLogDeliveryInterface_GetByConfigName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByConfigName' -type MockLogDeliveryInterface_GetByConfigName_Call struct { - *mock.Call -} - -// GetByConfigName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockLogDeliveryInterface_Expecter) GetByConfigName(ctx interface{}, name interface{}) *MockLogDeliveryInterface_GetByConfigName_Call { - return &MockLogDeliveryInterface_GetByConfigName_Call{Call: _e.mock.On("GetByConfigName", ctx, name)} -} - -func (_c *MockLogDeliveryInterface_GetByConfigName_Call) Run(run func(ctx context.Context, name string)) *MockLogDeliveryInterface_GetByConfigName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_GetByConfigName_Call) Return(_a0 *billing.LogDeliveryConfiguration, _a1 error) *MockLogDeliveryInterface_GetByConfigName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLogDeliveryInterface_GetByConfigName_Call) RunAndReturn(run func(context.Context, string) (*billing.LogDeliveryConfiguration, error)) *MockLogDeliveryInterface_GetByConfigName_Call { - _c.Call.Return(run) - return _c -} - -// GetByLogDeliveryConfigurationId provides a mock function with given fields: ctx, logDeliveryConfigurationId -func (_m *MockLogDeliveryInterface) GetByLogDeliveryConfigurationId(ctx context.Context, logDeliveryConfigurationId string) (*billing.WrappedLogDeliveryConfiguration, error) { - ret := _m.Called(ctx, logDeliveryConfigurationId) - - if len(ret) == 0 { - panic("no return value specified for GetByLogDeliveryConfigurationId") - } - - var r0 *billing.WrappedLogDeliveryConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*billing.WrappedLogDeliveryConfiguration, error)); ok { - return rf(ctx, logDeliveryConfigurationId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *billing.WrappedLogDeliveryConfiguration); ok { - r0 = rf(ctx, logDeliveryConfigurationId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.WrappedLogDeliveryConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, logDeliveryConfigurationId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByLogDeliveryConfigurationId' -type MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call struct { - *mock.Call -} - -// GetByLogDeliveryConfigurationId is a helper method to define mock.On call -// - ctx context.Context -// - logDeliveryConfigurationId string -func (_e *MockLogDeliveryInterface_Expecter) GetByLogDeliveryConfigurationId(ctx interface{}, logDeliveryConfigurationId interface{}) *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call { - return &MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call{Call: _e.mock.On("GetByLogDeliveryConfigurationId", ctx, logDeliveryConfigurationId)} -} - -func (_c *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call) Run(run func(ctx context.Context, logDeliveryConfigurationId string)) *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call) Return(_a0 *billing.WrappedLogDeliveryConfiguration, _a1 error) *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call) RunAndReturn(run func(context.Context, string) (*billing.WrappedLogDeliveryConfiguration, error)) *MockLogDeliveryInterface_GetByLogDeliveryConfigurationId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockLogDeliveryInterface) List(ctx context.Context, request billing.ListLogDeliveryRequest) listing.Iterator[billing.LogDeliveryConfiguration] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[billing.LogDeliveryConfiguration] - if rf, ok := ret.Get(0).(func(context.Context, billing.ListLogDeliveryRequest) listing.Iterator[billing.LogDeliveryConfiguration]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[billing.LogDeliveryConfiguration]) - } - } - - return r0 -} - -// MockLogDeliveryInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockLogDeliveryInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request billing.ListLogDeliveryRequest -func (_e *MockLogDeliveryInterface_Expecter) List(ctx interface{}, request interface{}) *MockLogDeliveryInterface_List_Call { - return &MockLogDeliveryInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockLogDeliveryInterface_List_Call) Run(run func(ctx context.Context, request billing.ListLogDeliveryRequest)) *MockLogDeliveryInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.ListLogDeliveryRequest)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_List_Call) Return(_a0 listing.Iterator[billing.LogDeliveryConfiguration]) *MockLogDeliveryInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLogDeliveryInterface_List_Call) RunAndReturn(run func(context.Context, billing.ListLogDeliveryRequest) listing.Iterator[billing.LogDeliveryConfiguration]) *MockLogDeliveryInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockLogDeliveryInterface) ListAll(ctx context.Context, request billing.ListLogDeliveryRequest) ([]billing.LogDeliveryConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []billing.LogDeliveryConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.ListLogDeliveryRequest) ([]billing.LogDeliveryConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.ListLogDeliveryRequest) []billing.LogDeliveryConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]billing.LogDeliveryConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.ListLogDeliveryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLogDeliveryInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockLogDeliveryInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request billing.ListLogDeliveryRequest -func (_e *MockLogDeliveryInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockLogDeliveryInterface_ListAll_Call { - return &MockLogDeliveryInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockLogDeliveryInterface_ListAll_Call) Run(run func(ctx context.Context, request billing.ListLogDeliveryRequest)) *MockLogDeliveryInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.ListLogDeliveryRequest)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_ListAll_Call) Return(_a0 []billing.LogDeliveryConfiguration, _a1 error) *MockLogDeliveryInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLogDeliveryInterface_ListAll_Call) RunAndReturn(run func(context.Context, billing.ListLogDeliveryRequest) ([]billing.LogDeliveryConfiguration, error)) *MockLogDeliveryInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// LogDeliveryConfigurationConfigNameToConfigIdMap provides a mock function with given fields: ctx, request -func (_m *MockLogDeliveryInterface) LogDeliveryConfigurationConfigNameToConfigIdMap(ctx context.Context, request billing.ListLogDeliveryRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for LogDeliveryConfigurationConfigNameToConfigIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.ListLogDeliveryRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.ListLogDeliveryRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.ListLogDeliveryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogDeliveryConfigurationConfigNameToConfigIdMap' -type MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call struct { - *mock.Call -} - -// LogDeliveryConfigurationConfigNameToConfigIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request billing.ListLogDeliveryRequest -func (_e *MockLogDeliveryInterface_Expecter) LogDeliveryConfigurationConfigNameToConfigIdMap(ctx interface{}, request interface{}) *MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call { - return &MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call{Call: _e.mock.On("LogDeliveryConfigurationConfigNameToConfigIdMap", ctx, request)} -} - -func (_c *MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call) Run(run func(ctx context.Context, request billing.ListLogDeliveryRequest)) *MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.ListLogDeliveryRequest)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call) RunAndReturn(run func(context.Context, billing.ListLogDeliveryRequest) (map[string]string, error)) *MockLogDeliveryInterface_LogDeliveryConfigurationConfigNameToConfigIdMap_Call { - _c.Call.Return(run) - return _c -} - -// PatchStatus provides a mock function with given fields: ctx, request -func (_m *MockLogDeliveryInterface) PatchStatus(ctx context.Context, request billing.UpdateLogDeliveryConfigurationStatusRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for PatchStatus") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, billing.UpdateLogDeliveryConfigurationStatusRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLogDeliveryInterface_PatchStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PatchStatus' -type MockLogDeliveryInterface_PatchStatus_Call struct { - *mock.Call -} - -// PatchStatus is a helper method to define mock.On call -// - ctx context.Context -// - request billing.UpdateLogDeliveryConfigurationStatusRequest -func (_e *MockLogDeliveryInterface_Expecter) PatchStatus(ctx interface{}, request interface{}) *MockLogDeliveryInterface_PatchStatus_Call { - return &MockLogDeliveryInterface_PatchStatus_Call{Call: _e.mock.On("PatchStatus", ctx, request)} -} - -func (_c *MockLogDeliveryInterface_PatchStatus_Call) Run(run func(ctx context.Context, request billing.UpdateLogDeliveryConfigurationStatusRequest)) *MockLogDeliveryInterface_PatchStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.UpdateLogDeliveryConfigurationStatusRequest)) - }) - return _c -} - -func (_c *MockLogDeliveryInterface_PatchStatus_Call) Return(_a0 error) *MockLogDeliveryInterface_PatchStatus_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLogDeliveryInterface_PatchStatus_Call) RunAndReturn(run func(context.Context, billing.UpdateLogDeliveryConfigurationStatusRequest) error) *MockLogDeliveryInterface_PatchStatus_Call { - _c.Call.Return(run) - return _c -} - -// NewMockLogDeliveryInterface creates a new instance of MockLogDeliveryInterface. 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 NewMockLogDeliveryInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockLogDeliveryInterface { - mock := &MockLogDeliveryInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/billing/mock_usage_dashboards_interface.go b/experimental/mocks/service/billing/mock_usage_dashboards_interface.go deleted file mode 100644 index ee0e87850..000000000 --- a/experimental/mocks/service/billing/mock_usage_dashboards_interface.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package billing - -import ( - context "context" - - billing "github.com/databricks/databricks-sdk-go/service/billing" - - mock "github.com/stretchr/testify/mock" -) - -// MockUsageDashboardsInterface is an autogenerated mock type for the UsageDashboardsInterface type -type MockUsageDashboardsInterface struct { - mock.Mock -} - -type MockUsageDashboardsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockUsageDashboardsInterface) EXPECT() *MockUsageDashboardsInterface_Expecter { - return &MockUsageDashboardsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockUsageDashboardsInterface) Create(ctx context.Context, request billing.CreateBillingUsageDashboardRequest) (*billing.CreateBillingUsageDashboardResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *billing.CreateBillingUsageDashboardResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.CreateBillingUsageDashboardRequest) (*billing.CreateBillingUsageDashboardResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.CreateBillingUsageDashboardRequest) *billing.CreateBillingUsageDashboardResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.CreateBillingUsageDashboardResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.CreateBillingUsageDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsageDashboardsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockUsageDashboardsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request billing.CreateBillingUsageDashboardRequest -func (_e *MockUsageDashboardsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockUsageDashboardsInterface_Create_Call { - return &MockUsageDashboardsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockUsageDashboardsInterface_Create_Call) Run(run func(ctx context.Context, request billing.CreateBillingUsageDashboardRequest)) *MockUsageDashboardsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.CreateBillingUsageDashboardRequest)) - }) - return _c -} - -func (_c *MockUsageDashboardsInterface_Create_Call) Return(_a0 *billing.CreateBillingUsageDashboardResponse, _a1 error) *MockUsageDashboardsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsageDashboardsInterface_Create_Call) RunAndReturn(run func(context.Context, billing.CreateBillingUsageDashboardRequest) (*billing.CreateBillingUsageDashboardResponse, error)) *MockUsageDashboardsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockUsageDashboardsInterface) Get(ctx context.Context, request billing.GetBillingUsageDashboardRequest) (*billing.GetBillingUsageDashboardResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *billing.GetBillingUsageDashboardResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, billing.GetBillingUsageDashboardRequest) (*billing.GetBillingUsageDashboardResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, billing.GetBillingUsageDashboardRequest) *billing.GetBillingUsageDashboardResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*billing.GetBillingUsageDashboardResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, billing.GetBillingUsageDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsageDashboardsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockUsageDashboardsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request billing.GetBillingUsageDashboardRequest -func (_e *MockUsageDashboardsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockUsageDashboardsInterface_Get_Call { - return &MockUsageDashboardsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockUsageDashboardsInterface_Get_Call) Run(run func(ctx context.Context, request billing.GetBillingUsageDashboardRequest)) *MockUsageDashboardsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(billing.GetBillingUsageDashboardRequest)) - }) - return _c -} - -func (_c *MockUsageDashboardsInterface_Get_Call) Return(_a0 *billing.GetBillingUsageDashboardResponse, _a1 error) *MockUsageDashboardsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsageDashboardsInterface_Get_Call) RunAndReturn(run func(context.Context, billing.GetBillingUsageDashboardRequest) (*billing.GetBillingUsageDashboardResponse, error)) *MockUsageDashboardsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// NewMockUsageDashboardsInterface creates a new instance of MockUsageDashboardsInterface. 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 NewMockUsageDashboardsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockUsageDashboardsInterface { - mock := &MockUsageDashboardsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_account_metastore_assignments_interface.go b/experimental/mocks/service/catalog/mock_account_metastore_assignments_interface.go deleted file mode 100644 index 968ac6044..000000000 --- a/experimental/mocks/service/catalog/mock_account_metastore_assignments_interface.go +++ /dev/null @@ -1,514 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockAccountMetastoreAssignmentsInterface is an autogenerated mock type for the AccountMetastoreAssignmentsInterface type -type MockAccountMetastoreAssignmentsInterface struct { - mock.Mock -} - -type MockAccountMetastoreAssignmentsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountMetastoreAssignmentsInterface) EXPECT() *MockAccountMetastoreAssignmentsInterface_Expecter { - return &MockAccountMetastoreAssignmentsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoreAssignmentsInterface) Create(ctx context.Context, request catalog.AccountsCreateMetastoreAssignment) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsCreateMetastoreAssignment) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountMetastoreAssignmentsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountMetastoreAssignmentsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.AccountsCreateMetastoreAssignment -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountMetastoreAssignmentsInterface_Create_Call { - return &MockAccountMetastoreAssignmentsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.AccountsCreateMetastoreAssignment)) *MockAccountMetastoreAssignmentsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.AccountsCreateMetastoreAssignment)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Create_Call) Return(_a0 error) *MockAccountMetastoreAssignmentsInterface_Create_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.AccountsCreateMetastoreAssignment) error) *MockAccountMetastoreAssignmentsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoreAssignmentsInterface) Delete(ctx context.Context, request catalog.DeleteAccountMetastoreAssignmentRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteAccountMetastoreAssignmentRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountMetastoreAssignmentsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountMetastoreAssignmentsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteAccountMetastoreAssignmentRequest -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountMetastoreAssignmentsInterface_Delete_Call { - return &MockAccountMetastoreAssignmentsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteAccountMetastoreAssignmentRequest)) *MockAccountMetastoreAssignmentsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteAccountMetastoreAssignmentRequest)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Delete_Call) Return(_a0 error) *MockAccountMetastoreAssignmentsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteAccountMetastoreAssignmentRequest) error) *MockAccountMetastoreAssignmentsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByWorkspaceIdAndMetastoreId provides a mock function with given fields: ctx, workspaceId, metastoreId -func (_m *MockAccountMetastoreAssignmentsInterface) DeleteByWorkspaceIdAndMetastoreId(ctx context.Context, workspaceId int64, metastoreId string) error { - ret := _m.Called(ctx, workspaceId, metastoreId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByWorkspaceIdAndMetastoreId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok { - r0 = rf(ctx, workspaceId, metastoreId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByWorkspaceIdAndMetastoreId' -type MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call struct { - *mock.Call -} - -// DeleteByWorkspaceIdAndMetastoreId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -// - metastoreId string -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) DeleteByWorkspaceIdAndMetastoreId(ctx interface{}, workspaceId interface{}, metastoreId interface{}) *MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call { - return &MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call{Call: _e.mock.On("DeleteByWorkspaceIdAndMetastoreId", ctx, workspaceId, metastoreId)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call) Run(run func(ctx context.Context, workspaceId int64, metastoreId string)) *MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(string)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call) Return(_a0 error) *MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call) RunAndReturn(run func(context.Context, int64, string) error) *MockAccountMetastoreAssignmentsInterface_DeleteByWorkspaceIdAndMetastoreId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoreAssignmentsInterface) Get(ctx context.Context, request catalog.GetAccountMetastoreAssignmentRequest) (*catalog.AccountsMetastoreAssignment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.AccountsMetastoreAssignment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetAccountMetastoreAssignmentRequest) (*catalog.AccountsMetastoreAssignment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetAccountMetastoreAssignmentRequest) *catalog.AccountsMetastoreAssignment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsMetastoreAssignment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetAccountMetastoreAssignmentRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoreAssignmentsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountMetastoreAssignmentsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetAccountMetastoreAssignmentRequest -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountMetastoreAssignmentsInterface_Get_Call { - return &MockAccountMetastoreAssignmentsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetAccountMetastoreAssignmentRequest)) *MockAccountMetastoreAssignmentsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetAccountMetastoreAssignmentRequest)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Get_Call) Return(_a0 *catalog.AccountsMetastoreAssignment, _a1 error) *MockAccountMetastoreAssignmentsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetAccountMetastoreAssignmentRequest) (*catalog.AccountsMetastoreAssignment, error)) *MockAccountMetastoreAssignmentsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByWorkspaceId provides a mock function with given fields: ctx, workspaceId -func (_m *MockAccountMetastoreAssignmentsInterface) GetByWorkspaceId(ctx context.Context, workspaceId int64) (*catalog.AccountsMetastoreAssignment, error) { - ret := _m.Called(ctx, workspaceId) - - if len(ret) == 0 { - panic("no return value specified for GetByWorkspaceId") - } - - var r0 *catalog.AccountsMetastoreAssignment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*catalog.AccountsMetastoreAssignment, error)); ok { - return rf(ctx, workspaceId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *catalog.AccountsMetastoreAssignment); ok { - r0 = rf(ctx, workspaceId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsMetastoreAssignment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, workspaceId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByWorkspaceId' -type MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call struct { - *mock.Call -} - -// GetByWorkspaceId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) GetByWorkspaceId(ctx interface{}, workspaceId interface{}) *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call { - return &MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call{Call: _e.mock.On("GetByWorkspaceId", ctx, workspaceId)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call) Run(run func(ctx context.Context, workspaceId int64)) *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call) Return(_a0 *catalog.AccountsMetastoreAssignment, _a1 error) *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call) RunAndReturn(run func(context.Context, int64) (*catalog.AccountsMetastoreAssignment, error)) *MockAccountMetastoreAssignmentsInterface_GetByWorkspaceId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoreAssignmentsInterface) List(ctx context.Context, request catalog.ListAccountMetastoreAssignmentsRequest) listing.Iterator[int64] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[int64] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListAccountMetastoreAssignmentsRequest) listing.Iterator[int64]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[int64]) - } - } - - return r0 -} - -// MockAccountMetastoreAssignmentsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountMetastoreAssignmentsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListAccountMetastoreAssignmentsRequest -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) List(ctx interface{}, request interface{}) *MockAccountMetastoreAssignmentsInterface_List_Call { - return &MockAccountMetastoreAssignmentsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListAccountMetastoreAssignmentsRequest)) *MockAccountMetastoreAssignmentsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListAccountMetastoreAssignmentsRequest)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_List_Call) Return(_a0 listing.Iterator[int64]) *MockAccountMetastoreAssignmentsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListAccountMetastoreAssignmentsRequest) listing.Iterator[int64]) *MockAccountMetastoreAssignmentsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoreAssignmentsInterface) ListAll(ctx context.Context, request catalog.ListAccountMetastoreAssignmentsRequest) ([]int64, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListAccountMetastoreAssignmentsRequest) ([]int64, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListAccountMetastoreAssignmentsRequest) []int64); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]int64) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListAccountMetastoreAssignmentsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoreAssignmentsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountMetastoreAssignmentsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListAccountMetastoreAssignmentsRequest -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAccountMetastoreAssignmentsInterface_ListAll_Call { - return &MockAccountMetastoreAssignmentsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListAccountMetastoreAssignmentsRequest)) *MockAccountMetastoreAssignmentsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListAccountMetastoreAssignmentsRequest)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_ListAll_Call) Return(_a0 []int64, _a1 error) *MockAccountMetastoreAssignmentsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListAccountMetastoreAssignmentsRequest) ([]int64, error)) *MockAccountMetastoreAssignmentsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByMetastoreId provides a mock function with given fields: ctx, metastoreId -func (_m *MockAccountMetastoreAssignmentsInterface) ListByMetastoreId(ctx context.Context, metastoreId string) (*catalog.ListAccountMetastoreAssignmentsResponse, error) { - ret := _m.Called(ctx, metastoreId) - - if len(ret) == 0 { - panic("no return value specified for ListByMetastoreId") - } - - var r0 *catalog.ListAccountMetastoreAssignmentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.ListAccountMetastoreAssignmentsResponse, error)); ok { - return rf(ctx, metastoreId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.ListAccountMetastoreAssignmentsResponse); ok { - r0 = rf(ctx, metastoreId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ListAccountMetastoreAssignmentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, metastoreId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByMetastoreId' -type MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call struct { - *mock.Call -} - -// ListByMetastoreId is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) ListByMetastoreId(ctx interface{}, metastoreId interface{}) *MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call { - return &MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call{Call: _e.mock.On("ListByMetastoreId", ctx, metastoreId)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call) Run(run func(ctx context.Context, metastoreId string)) *MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call) Return(_a0 *catalog.ListAccountMetastoreAssignmentsResponse, _a1 error) *MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call) RunAndReturn(run func(context.Context, string) (*catalog.ListAccountMetastoreAssignmentsResponse, error)) *MockAccountMetastoreAssignmentsInterface_ListByMetastoreId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoreAssignmentsInterface) Update(ctx context.Context, request catalog.AccountsUpdateMetastoreAssignment) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsUpdateMetastoreAssignment) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountMetastoreAssignmentsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountMetastoreAssignmentsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.AccountsUpdateMetastoreAssignment -func (_e *MockAccountMetastoreAssignmentsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountMetastoreAssignmentsInterface_Update_Call { - return &MockAccountMetastoreAssignmentsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.AccountsUpdateMetastoreAssignment)) *MockAccountMetastoreAssignmentsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.AccountsUpdateMetastoreAssignment)) - }) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Update_Call) Return(_a0 error) *MockAccountMetastoreAssignmentsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoreAssignmentsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.AccountsUpdateMetastoreAssignment) error) *MockAccountMetastoreAssignmentsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountMetastoreAssignmentsInterface creates a new instance of MockAccountMetastoreAssignmentsInterface. 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 NewMockAccountMetastoreAssignmentsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountMetastoreAssignmentsInterface { - mock := &MockAccountMetastoreAssignmentsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_account_metastores_interface.go b/experimental/mocks/service/catalog/mock_account_metastores_interface.go deleted file mode 100644 index dd4105954..000000000 --- a/experimental/mocks/service/catalog/mock_account_metastores_interface.go +++ /dev/null @@ -1,476 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockAccountMetastoresInterface is an autogenerated mock type for the AccountMetastoresInterface type -type MockAccountMetastoresInterface struct { - mock.Mock -} - -type MockAccountMetastoresInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountMetastoresInterface) EXPECT() *MockAccountMetastoresInterface_Expecter { - return &MockAccountMetastoresInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoresInterface) Create(ctx context.Context, request catalog.AccountsCreateMetastore) (*catalog.AccountsMetastoreInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.AccountsMetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsCreateMetastore) (*catalog.AccountsMetastoreInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsCreateMetastore) *catalog.AccountsMetastoreInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsMetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.AccountsCreateMetastore) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoresInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountMetastoresInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.AccountsCreateMetastore -func (_e *MockAccountMetastoresInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountMetastoresInterface_Create_Call { - return &MockAccountMetastoresInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountMetastoresInterface_Create_Call) Run(run func(ctx context.Context, request catalog.AccountsCreateMetastore)) *MockAccountMetastoresInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.AccountsCreateMetastore)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_Create_Call) Return(_a0 *catalog.AccountsMetastoreInfo, _a1 error) *MockAccountMetastoresInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoresInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.AccountsCreateMetastore) (*catalog.AccountsMetastoreInfo, error)) *MockAccountMetastoresInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoresInterface) Delete(ctx context.Context, request catalog.DeleteAccountMetastoreRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteAccountMetastoreRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountMetastoresInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountMetastoresInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteAccountMetastoreRequest -func (_e *MockAccountMetastoresInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountMetastoresInterface_Delete_Call { - return &MockAccountMetastoresInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountMetastoresInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteAccountMetastoreRequest)) *MockAccountMetastoresInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteAccountMetastoreRequest)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_Delete_Call) Return(_a0 error) *MockAccountMetastoresInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoresInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteAccountMetastoreRequest) error) *MockAccountMetastoresInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByMetastoreId provides a mock function with given fields: ctx, metastoreId -func (_m *MockAccountMetastoresInterface) DeleteByMetastoreId(ctx context.Context, metastoreId string) error { - ret := _m.Called(ctx, metastoreId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByMetastoreId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, metastoreId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountMetastoresInterface_DeleteByMetastoreId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByMetastoreId' -type MockAccountMetastoresInterface_DeleteByMetastoreId_Call struct { - *mock.Call -} - -// DeleteByMetastoreId is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -func (_e *MockAccountMetastoresInterface_Expecter) DeleteByMetastoreId(ctx interface{}, metastoreId interface{}) *MockAccountMetastoresInterface_DeleteByMetastoreId_Call { - return &MockAccountMetastoresInterface_DeleteByMetastoreId_Call{Call: _e.mock.On("DeleteByMetastoreId", ctx, metastoreId)} -} - -func (_c *MockAccountMetastoresInterface_DeleteByMetastoreId_Call) Run(run func(ctx context.Context, metastoreId string)) *MockAccountMetastoresInterface_DeleteByMetastoreId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_DeleteByMetastoreId_Call) Return(_a0 error) *MockAccountMetastoresInterface_DeleteByMetastoreId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoresInterface_DeleteByMetastoreId_Call) RunAndReturn(run func(context.Context, string) error) *MockAccountMetastoresInterface_DeleteByMetastoreId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoresInterface) Get(ctx context.Context, request catalog.GetAccountMetastoreRequest) (*catalog.AccountsMetastoreInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.AccountsMetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetAccountMetastoreRequest) (*catalog.AccountsMetastoreInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetAccountMetastoreRequest) *catalog.AccountsMetastoreInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsMetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetAccountMetastoreRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoresInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountMetastoresInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetAccountMetastoreRequest -func (_e *MockAccountMetastoresInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountMetastoresInterface_Get_Call { - return &MockAccountMetastoresInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountMetastoresInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetAccountMetastoreRequest)) *MockAccountMetastoresInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetAccountMetastoreRequest)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_Get_Call) Return(_a0 *catalog.AccountsMetastoreInfo, _a1 error) *MockAccountMetastoresInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoresInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetAccountMetastoreRequest) (*catalog.AccountsMetastoreInfo, error)) *MockAccountMetastoresInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByMetastoreId provides a mock function with given fields: ctx, metastoreId -func (_m *MockAccountMetastoresInterface) GetByMetastoreId(ctx context.Context, metastoreId string) (*catalog.AccountsMetastoreInfo, error) { - ret := _m.Called(ctx, metastoreId) - - if len(ret) == 0 { - panic("no return value specified for GetByMetastoreId") - } - - var r0 *catalog.AccountsMetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.AccountsMetastoreInfo, error)); ok { - return rf(ctx, metastoreId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.AccountsMetastoreInfo); ok { - r0 = rf(ctx, metastoreId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsMetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, metastoreId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoresInterface_GetByMetastoreId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByMetastoreId' -type MockAccountMetastoresInterface_GetByMetastoreId_Call struct { - *mock.Call -} - -// GetByMetastoreId is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -func (_e *MockAccountMetastoresInterface_Expecter) GetByMetastoreId(ctx interface{}, metastoreId interface{}) *MockAccountMetastoresInterface_GetByMetastoreId_Call { - return &MockAccountMetastoresInterface_GetByMetastoreId_Call{Call: _e.mock.On("GetByMetastoreId", ctx, metastoreId)} -} - -func (_c *MockAccountMetastoresInterface_GetByMetastoreId_Call) Run(run func(ctx context.Context, metastoreId string)) *MockAccountMetastoresInterface_GetByMetastoreId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_GetByMetastoreId_Call) Return(_a0 *catalog.AccountsMetastoreInfo, _a1 error) *MockAccountMetastoresInterface_GetByMetastoreId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoresInterface_GetByMetastoreId_Call) RunAndReturn(run func(context.Context, string) (*catalog.AccountsMetastoreInfo, error)) *MockAccountMetastoresInterface_GetByMetastoreId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockAccountMetastoresInterface) List(ctx context.Context) listing.Iterator[catalog.MetastoreInfo] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.MetastoreInfo] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[catalog.MetastoreInfo]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.MetastoreInfo]) - } - } - - return r0 -} - -// MockAccountMetastoresInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountMetastoresInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAccountMetastoresInterface_Expecter) List(ctx interface{}) *MockAccountMetastoresInterface_List_Call { - return &MockAccountMetastoresInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockAccountMetastoresInterface_List_Call) Run(run func(ctx context.Context)) *MockAccountMetastoresInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_List_Call) Return(_a0 listing.Iterator[catalog.MetastoreInfo]) *MockAccountMetastoresInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountMetastoresInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[catalog.MetastoreInfo]) *MockAccountMetastoresInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockAccountMetastoresInterface) ListAll(ctx context.Context) ([]catalog.MetastoreInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.MetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]catalog.MetastoreInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []catalog.MetastoreInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.MetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoresInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountMetastoresInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAccountMetastoresInterface_Expecter) ListAll(ctx interface{}) *MockAccountMetastoresInterface_ListAll_Call { - return &MockAccountMetastoresInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockAccountMetastoresInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockAccountMetastoresInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_ListAll_Call) Return(_a0 []catalog.MetastoreInfo, _a1 error) *MockAccountMetastoresInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoresInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]catalog.MetastoreInfo, error)) *MockAccountMetastoresInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountMetastoresInterface) Update(ctx context.Context, request catalog.AccountsUpdateMetastore) (*catalog.AccountsMetastoreInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.AccountsMetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsUpdateMetastore) (*catalog.AccountsMetastoreInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsUpdateMetastore) *catalog.AccountsMetastoreInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsMetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.AccountsUpdateMetastore) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountMetastoresInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountMetastoresInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.AccountsUpdateMetastore -func (_e *MockAccountMetastoresInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountMetastoresInterface_Update_Call { - return &MockAccountMetastoresInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountMetastoresInterface_Update_Call) Run(run func(ctx context.Context, request catalog.AccountsUpdateMetastore)) *MockAccountMetastoresInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.AccountsUpdateMetastore)) - }) - return _c -} - -func (_c *MockAccountMetastoresInterface_Update_Call) Return(_a0 *catalog.AccountsMetastoreInfo, _a1 error) *MockAccountMetastoresInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountMetastoresInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.AccountsUpdateMetastore) (*catalog.AccountsMetastoreInfo, error)) *MockAccountMetastoresInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountMetastoresInterface creates a new instance of MockAccountMetastoresInterface. 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 NewMockAccountMetastoresInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountMetastoresInterface { - mock := &MockAccountMetastoresInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_account_storage_credentials_interface.go b/experimental/mocks/service/catalog/mock_account_storage_credentials_interface.go deleted file mode 100644 index 2646d9cc2..000000000 --- a/experimental/mocks/service/catalog/mock_account_storage_credentials_interface.go +++ /dev/null @@ -1,539 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockAccountStorageCredentialsInterface is an autogenerated mock type for the AccountStorageCredentialsInterface type -type MockAccountStorageCredentialsInterface struct { - mock.Mock -} - -type MockAccountStorageCredentialsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountStorageCredentialsInterface) EXPECT() *MockAccountStorageCredentialsInterface_Expecter { - return &MockAccountStorageCredentialsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountStorageCredentialsInterface) Create(ctx context.Context, request catalog.AccountsCreateStorageCredential) (*catalog.AccountsStorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.AccountsStorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsCreateStorageCredential) (*catalog.AccountsStorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsCreateStorageCredential) *catalog.AccountsStorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsStorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.AccountsCreateStorageCredential) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountStorageCredentialsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountStorageCredentialsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.AccountsCreateStorageCredential -func (_e *MockAccountStorageCredentialsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountStorageCredentialsInterface_Create_Call { - return &MockAccountStorageCredentialsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountStorageCredentialsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.AccountsCreateStorageCredential)) *MockAccountStorageCredentialsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.AccountsCreateStorageCredential)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Create_Call) Return(_a0 *catalog.AccountsStorageCredentialInfo, _a1 error) *MockAccountStorageCredentialsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.AccountsCreateStorageCredential) (*catalog.AccountsStorageCredentialInfo, error)) *MockAccountStorageCredentialsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountStorageCredentialsInterface) Delete(ctx context.Context, request catalog.DeleteAccountStorageCredentialRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteAccountStorageCredentialRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountStorageCredentialsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountStorageCredentialsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteAccountStorageCredentialRequest -func (_e *MockAccountStorageCredentialsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountStorageCredentialsInterface_Delete_Call { - return &MockAccountStorageCredentialsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountStorageCredentialsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteAccountStorageCredentialRequest)) *MockAccountStorageCredentialsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteAccountStorageCredentialRequest)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Delete_Call) Return(_a0 error) *MockAccountStorageCredentialsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteAccountStorageCredentialRequest) error) *MockAccountStorageCredentialsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByMetastoreIdAndStorageCredentialName provides a mock function with given fields: ctx, metastoreId, storageCredentialName -func (_m *MockAccountStorageCredentialsInterface) DeleteByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) error { - ret := _m.Called(ctx, metastoreId, storageCredentialName) - - if len(ret) == 0 { - panic("no return value specified for DeleteByMetastoreIdAndStorageCredentialName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, metastoreId, storageCredentialName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByMetastoreIdAndStorageCredentialName' -type MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call struct { - *mock.Call -} - -// DeleteByMetastoreIdAndStorageCredentialName is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -// - storageCredentialName string -func (_e *MockAccountStorageCredentialsInterface_Expecter) DeleteByMetastoreIdAndStorageCredentialName(ctx interface{}, metastoreId interface{}, storageCredentialName interface{}) *MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call { - return &MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call{Call: _e.mock.On("DeleteByMetastoreIdAndStorageCredentialName", ctx, metastoreId, storageCredentialName)} -} - -func (_c *MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call) Run(run func(ctx context.Context, metastoreId string, storageCredentialName string)) *MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call) Return(_a0 error) *MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call) RunAndReturn(run func(context.Context, string, string) error) *MockAccountStorageCredentialsInterface_DeleteByMetastoreIdAndStorageCredentialName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountStorageCredentialsInterface) Get(ctx context.Context, request catalog.GetAccountStorageCredentialRequest) (*catalog.AccountsStorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.AccountsStorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetAccountStorageCredentialRequest) (*catalog.AccountsStorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetAccountStorageCredentialRequest) *catalog.AccountsStorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsStorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetAccountStorageCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountStorageCredentialsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountStorageCredentialsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetAccountStorageCredentialRequest -func (_e *MockAccountStorageCredentialsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountStorageCredentialsInterface_Get_Call { - return &MockAccountStorageCredentialsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountStorageCredentialsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetAccountStorageCredentialRequest)) *MockAccountStorageCredentialsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetAccountStorageCredentialRequest)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Get_Call) Return(_a0 *catalog.AccountsStorageCredentialInfo, _a1 error) *MockAccountStorageCredentialsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetAccountStorageCredentialRequest) (*catalog.AccountsStorageCredentialInfo, error)) *MockAccountStorageCredentialsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByMetastoreIdAndStorageCredentialName provides a mock function with given fields: ctx, metastoreId, storageCredentialName -func (_m *MockAccountStorageCredentialsInterface) GetByMetastoreIdAndStorageCredentialName(ctx context.Context, metastoreId string, storageCredentialName string) (*catalog.AccountsStorageCredentialInfo, error) { - ret := _m.Called(ctx, metastoreId, storageCredentialName) - - if len(ret) == 0 { - panic("no return value specified for GetByMetastoreIdAndStorageCredentialName") - } - - var r0 *catalog.AccountsStorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*catalog.AccountsStorageCredentialInfo, error)); ok { - return rf(ctx, metastoreId, storageCredentialName) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *catalog.AccountsStorageCredentialInfo); ok { - r0 = rf(ctx, metastoreId, storageCredentialName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsStorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, metastoreId, storageCredentialName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByMetastoreIdAndStorageCredentialName' -type MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call struct { - *mock.Call -} - -// GetByMetastoreIdAndStorageCredentialName is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -// - storageCredentialName string -func (_e *MockAccountStorageCredentialsInterface_Expecter) GetByMetastoreIdAndStorageCredentialName(ctx interface{}, metastoreId interface{}, storageCredentialName interface{}) *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call { - return &MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call{Call: _e.mock.On("GetByMetastoreIdAndStorageCredentialName", ctx, metastoreId, storageCredentialName)} -} - -func (_c *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call) Run(run func(ctx context.Context, metastoreId string, storageCredentialName string)) *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call) Return(_a0 *catalog.AccountsStorageCredentialInfo, _a1 error) *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call) RunAndReturn(run func(context.Context, string, string) (*catalog.AccountsStorageCredentialInfo, error)) *MockAccountStorageCredentialsInterface_GetByMetastoreIdAndStorageCredentialName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAccountStorageCredentialsInterface) List(ctx context.Context, request catalog.ListAccountStorageCredentialsRequest) listing.Iterator[catalog.StorageCredentialInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.StorageCredentialInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListAccountStorageCredentialsRequest) listing.Iterator[catalog.StorageCredentialInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.StorageCredentialInfo]) - } - } - - return r0 -} - -// MockAccountStorageCredentialsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountStorageCredentialsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListAccountStorageCredentialsRequest -func (_e *MockAccountStorageCredentialsInterface_Expecter) List(ctx interface{}, request interface{}) *MockAccountStorageCredentialsInterface_List_Call { - return &MockAccountStorageCredentialsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAccountStorageCredentialsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListAccountStorageCredentialsRequest)) *MockAccountStorageCredentialsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListAccountStorageCredentialsRequest)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_List_Call) Return(_a0 listing.Iterator[catalog.StorageCredentialInfo]) *MockAccountStorageCredentialsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListAccountStorageCredentialsRequest) listing.Iterator[catalog.StorageCredentialInfo]) *MockAccountStorageCredentialsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAccountStorageCredentialsInterface) ListAll(ctx context.Context, request catalog.ListAccountStorageCredentialsRequest) ([]catalog.StorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.StorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListAccountStorageCredentialsRequest) ([]catalog.StorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListAccountStorageCredentialsRequest) []catalog.StorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.StorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListAccountStorageCredentialsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountStorageCredentialsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountStorageCredentialsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListAccountStorageCredentialsRequest -func (_e *MockAccountStorageCredentialsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAccountStorageCredentialsInterface_ListAll_Call { - return &MockAccountStorageCredentialsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAccountStorageCredentialsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListAccountStorageCredentialsRequest)) *MockAccountStorageCredentialsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListAccountStorageCredentialsRequest)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_ListAll_Call) Return(_a0 []catalog.StorageCredentialInfo, _a1 error) *MockAccountStorageCredentialsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListAccountStorageCredentialsRequest) ([]catalog.StorageCredentialInfo, error)) *MockAccountStorageCredentialsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByMetastoreId provides a mock function with given fields: ctx, metastoreId -func (_m *MockAccountStorageCredentialsInterface) ListByMetastoreId(ctx context.Context, metastoreId string) (*catalog.ListAccountStorageCredentialsResponse, error) { - ret := _m.Called(ctx, metastoreId) - - if len(ret) == 0 { - panic("no return value specified for ListByMetastoreId") - } - - var r0 *catalog.ListAccountStorageCredentialsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.ListAccountStorageCredentialsResponse, error)); ok { - return rf(ctx, metastoreId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.ListAccountStorageCredentialsResponse); ok { - r0 = rf(ctx, metastoreId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ListAccountStorageCredentialsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, metastoreId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountStorageCredentialsInterface_ListByMetastoreId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByMetastoreId' -type MockAccountStorageCredentialsInterface_ListByMetastoreId_Call struct { - *mock.Call -} - -// ListByMetastoreId is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -func (_e *MockAccountStorageCredentialsInterface_Expecter) ListByMetastoreId(ctx interface{}, metastoreId interface{}) *MockAccountStorageCredentialsInterface_ListByMetastoreId_Call { - return &MockAccountStorageCredentialsInterface_ListByMetastoreId_Call{Call: _e.mock.On("ListByMetastoreId", ctx, metastoreId)} -} - -func (_c *MockAccountStorageCredentialsInterface_ListByMetastoreId_Call) Run(run func(ctx context.Context, metastoreId string)) *MockAccountStorageCredentialsInterface_ListByMetastoreId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_ListByMetastoreId_Call) Return(_a0 *catalog.ListAccountStorageCredentialsResponse, _a1 error) *MockAccountStorageCredentialsInterface_ListByMetastoreId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_ListByMetastoreId_Call) RunAndReturn(run func(context.Context, string) (*catalog.ListAccountStorageCredentialsResponse, error)) *MockAccountStorageCredentialsInterface_ListByMetastoreId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountStorageCredentialsInterface) Update(ctx context.Context, request catalog.AccountsUpdateStorageCredential) (*catalog.AccountsStorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.AccountsStorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsUpdateStorageCredential) (*catalog.AccountsStorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.AccountsUpdateStorageCredential) *catalog.AccountsStorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.AccountsStorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.AccountsUpdateStorageCredential) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountStorageCredentialsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountStorageCredentialsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.AccountsUpdateStorageCredential -func (_e *MockAccountStorageCredentialsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountStorageCredentialsInterface_Update_Call { - return &MockAccountStorageCredentialsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountStorageCredentialsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.AccountsUpdateStorageCredential)) *MockAccountStorageCredentialsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.AccountsUpdateStorageCredential)) - }) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Update_Call) Return(_a0 *catalog.AccountsStorageCredentialInfo, _a1 error) *MockAccountStorageCredentialsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountStorageCredentialsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.AccountsUpdateStorageCredential) (*catalog.AccountsStorageCredentialInfo, error)) *MockAccountStorageCredentialsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountStorageCredentialsInterface creates a new instance of MockAccountStorageCredentialsInterface. 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 NewMockAccountStorageCredentialsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountStorageCredentialsInterface { - mock := &MockAccountStorageCredentialsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go b/experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go deleted file mode 100644 index 72308e190..000000000 --- a/experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - mock "github.com/stretchr/testify/mock" -) - -// MockArtifactAllowlistsInterface is an autogenerated mock type for the ArtifactAllowlistsInterface type -type MockArtifactAllowlistsInterface struct { - mock.Mock -} - -type MockArtifactAllowlistsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockArtifactAllowlistsInterface) EXPECT() *MockArtifactAllowlistsInterface_Expecter { - return &MockArtifactAllowlistsInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockArtifactAllowlistsInterface) Get(ctx context.Context, request catalog.GetArtifactAllowlistRequest) (*catalog.ArtifactAllowlistInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.ArtifactAllowlistInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetArtifactAllowlistRequest) (*catalog.ArtifactAllowlistInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetArtifactAllowlistRequest) *catalog.ArtifactAllowlistInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ArtifactAllowlistInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetArtifactAllowlistRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockArtifactAllowlistsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockArtifactAllowlistsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetArtifactAllowlistRequest -func (_e *MockArtifactAllowlistsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockArtifactAllowlistsInterface_Get_Call { - return &MockArtifactAllowlistsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockArtifactAllowlistsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetArtifactAllowlistRequest)) *MockArtifactAllowlistsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetArtifactAllowlistRequest)) - }) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_Get_Call) Return(_a0 *catalog.ArtifactAllowlistInfo, _a1 error) *MockArtifactAllowlistsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetArtifactAllowlistRequest) (*catalog.ArtifactAllowlistInfo, error)) *MockArtifactAllowlistsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByArtifactType provides a mock function with given fields: ctx, artifactType -func (_m *MockArtifactAllowlistsInterface) GetByArtifactType(ctx context.Context, artifactType catalog.ArtifactType) (*catalog.ArtifactAllowlistInfo, error) { - ret := _m.Called(ctx, artifactType) - - if len(ret) == 0 { - panic("no return value specified for GetByArtifactType") - } - - var r0 *catalog.ArtifactAllowlistInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ArtifactType) (*catalog.ArtifactAllowlistInfo, error)); ok { - return rf(ctx, artifactType) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ArtifactType) *catalog.ArtifactAllowlistInfo); ok { - r0 = rf(ctx, artifactType) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ArtifactAllowlistInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ArtifactType) error); ok { - r1 = rf(ctx, artifactType) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockArtifactAllowlistsInterface_GetByArtifactType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByArtifactType' -type MockArtifactAllowlistsInterface_GetByArtifactType_Call struct { - *mock.Call -} - -// GetByArtifactType is a helper method to define mock.On call -// - ctx context.Context -// - artifactType catalog.ArtifactType -func (_e *MockArtifactAllowlistsInterface_Expecter) GetByArtifactType(ctx interface{}, artifactType interface{}) *MockArtifactAllowlistsInterface_GetByArtifactType_Call { - return &MockArtifactAllowlistsInterface_GetByArtifactType_Call{Call: _e.mock.On("GetByArtifactType", ctx, artifactType)} -} - -func (_c *MockArtifactAllowlistsInterface_GetByArtifactType_Call) Run(run func(ctx context.Context, artifactType catalog.ArtifactType)) *MockArtifactAllowlistsInterface_GetByArtifactType_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ArtifactType)) - }) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_GetByArtifactType_Call) Return(_a0 *catalog.ArtifactAllowlistInfo, _a1 error) *MockArtifactAllowlistsInterface_GetByArtifactType_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_GetByArtifactType_Call) RunAndReturn(run func(context.Context, catalog.ArtifactType) (*catalog.ArtifactAllowlistInfo, error)) *MockArtifactAllowlistsInterface_GetByArtifactType_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockArtifactAllowlistsInterface) Update(ctx context.Context, request catalog.SetArtifactAllowlist) (*catalog.ArtifactAllowlistInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.ArtifactAllowlistInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.SetArtifactAllowlist) (*catalog.ArtifactAllowlistInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.SetArtifactAllowlist) *catalog.ArtifactAllowlistInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ArtifactAllowlistInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.SetArtifactAllowlist) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockArtifactAllowlistsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockArtifactAllowlistsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.SetArtifactAllowlist -func (_e *MockArtifactAllowlistsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockArtifactAllowlistsInterface_Update_Call { - return &MockArtifactAllowlistsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockArtifactAllowlistsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.SetArtifactAllowlist)) *MockArtifactAllowlistsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.SetArtifactAllowlist)) - }) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_Update_Call) Return(_a0 *catalog.ArtifactAllowlistInfo, _a1 error) *MockArtifactAllowlistsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockArtifactAllowlistsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.SetArtifactAllowlist) (*catalog.ArtifactAllowlistInfo, error)) *MockArtifactAllowlistsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockArtifactAllowlistsInterface creates a new instance of MockArtifactAllowlistsInterface. 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 NewMockArtifactAllowlistsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockArtifactAllowlistsInterface { - mock := &MockArtifactAllowlistsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_catalogs_interface.go b/experimental/mocks/service/catalog/mock_catalogs_interface.go deleted file mode 100644 index 1d5a4665e..000000000 --- a/experimental/mocks/service/catalog/mock_catalogs_interface.go +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockCatalogsInterface is an autogenerated mock type for the CatalogsInterface type -type MockCatalogsInterface struct { - mock.Mock -} - -type MockCatalogsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCatalogsInterface) EXPECT() *MockCatalogsInterface_Expecter { - return &MockCatalogsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockCatalogsInterface) Create(ctx context.Context, request catalog.CreateCatalog) (*catalog.CatalogInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.CatalogInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateCatalog) (*catalog.CatalogInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateCatalog) *catalog.CatalogInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CatalogInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateCatalog) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCatalogsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockCatalogsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateCatalog -func (_e *MockCatalogsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockCatalogsInterface_Create_Call { - return &MockCatalogsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockCatalogsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateCatalog)) *MockCatalogsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateCatalog)) - }) - return _c -} - -func (_c *MockCatalogsInterface_Create_Call) Return(_a0 *catalog.CatalogInfo, _a1 error) *MockCatalogsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCatalogsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateCatalog) (*catalog.CatalogInfo, error)) *MockCatalogsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockCatalogsInterface) Delete(ctx context.Context, request catalog.DeleteCatalogRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteCatalogRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCatalogsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockCatalogsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteCatalogRequest -func (_e *MockCatalogsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockCatalogsInterface_Delete_Call { - return &MockCatalogsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockCatalogsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteCatalogRequest)) *MockCatalogsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteCatalogRequest)) - }) - return _c -} - -func (_c *MockCatalogsInterface_Delete_Call) Return(_a0 error) *MockCatalogsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCatalogsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteCatalogRequest) error) *MockCatalogsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockCatalogsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCatalogsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockCatalogsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockCatalogsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockCatalogsInterface_DeleteByName_Call { - return &MockCatalogsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockCatalogsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockCatalogsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCatalogsInterface_DeleteByName_Call) Return(_a0 error) *MockCatalogsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCatalogsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockCatalogsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockCatalogsInterface) Get(ctx context.Context, request catalog.GetCatalogRequest) (*catalog.CatalogInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.CatalogInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetCatalogRequest) (*catalog.CatalogInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetCatalogRequest) *catalog.CatalogInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CatalogInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetCatalogRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCatalogsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockCatalogsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetCatalogRequest -func (_e *MockCatalogsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockCatalogsInterface_Get_Call { - return &MockCatalogsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockCatalogsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetCatalogRequest)) *MockCatalogsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetCatalogRequest)) - }) - return _c -} - -func (_c *MockCatalogsInterface_Get_Call) Return(_a0 *catalog.CatalogInfo, _a1 error) *MockCatalogsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCatalogsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetCatalogRequest) (*catalog.CatalogInfo, error)) *MockCatalogsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockCatalogsInterface) GetByName(ctx context.Context, name string) (*catalog.CatalogInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.CatalogInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.CatalogInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.CatalogInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CatalogInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCatalogsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockCatalogsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockCatalogsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockCatalogsInterface_GetByName_Call { - return &MockCatalogsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockCatalogsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockCatalogsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCatalogsInterface_GetByName_Call) Return(_a0 *catalog.CatalogInfo, _a1 error) *MockCatalogsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCatalogsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.CatalogInfo, error)) *MockCatalogsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockCatalogsInterface) List(ctx context.Context, request catalog.ListCatalogsRequest) listing.Iterator[catalog.CatalogInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.CatalogInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListCatalogsRequest) listing.Iterator[catalog.CatalogInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.CatalogInfo]) - } - } - - return r0 -} - -// MockCatalogsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockCatalogsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListCatalogsRequest -func (_e *MockCatalogsInterface_Expecter) List(ctx interface{}, request interface{}) *MockCatalogsInterface_List_Call { - return &MockCatalogsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockCatalogsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListCatalogsRequest)) *MockCatalogsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListCatalogsRequest)) - }) - return _c -} - -func (_c *MockCatalogsInterface_List_Call) Return(_a0 listing.Iterator[catalog.CatalogInfo]) *MockCatalogsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCatalogsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListCatalogsRequest) listing.Iterator[catalog.CatalogInfo]) *MockCatalogsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockCatalogsInterface) ListAll(ctx context.Context, request catalog.ListCatalogsRequest) ([]catalog.CatalogInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.CatalogInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListCatalogsRequest) ([]catalog.CatalogInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListCatalogsRequest) []catalog.CatalogInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.CatalogInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListCatalogsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCatalogsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockCatalogsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListCatalogsRequest -func (_e *MockCatalogsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockCatalogsInterface_ListAll_Call { - return &MockCatalogsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockCatalogsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListCatalogsRequest)) *MockCatalogsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListCatalogsRequest)) - }) - return _c -} - -func (_c *MockCatalogsInterface_ListAll_Call) Return(_a0 []catalog.CatalogInfo, _a1 error) *MockCatalogsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCatalogsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListCatalogsRequest) ([]catalog.CatalogInfo, error)) *MockCatalogsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockCatalogsInterface) Update(ctx context.Context, request catalog.UpdateCatalog) (*catalog.CatalogInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.CatalogInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateCatalog) (*catalog.CatalogInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateCatalog) *catalog.CatalogInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CatalogInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateCatalog) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCatalogsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockCatalogsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateCatalog -func (_e *MockCatalogsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockCatalogsInterface_Update_Call { - return &MockCatalogsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockCatalogsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateCatalog)) *MockCatalogsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateCatalog)) - }) - return _c -} - -func (_c *MockCatalogsInterface_Update_Call) Return(_a0 *catalog.CatalogInfo, _a1 error) *MockCatalogsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCatalogsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateCatalog) (*catalog.CatalogInfo, error)) *MockCatalogsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCatalogsInterface creates a new instance of MockCatalogsInterface. 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 NewMockCatalogsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCatalogsInterface { - mock := &MockCatalogsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_connections_interface.go b/experimental/mocks/service/catalog/mock_connections_interface.go deleted file mode 100644 index a9558ae5e..000000000 --- a/experimental/mocks/service/catalog/mock_connections_interface.go +++ /dev/null @@ -1,537 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockConnectionsInterface is an autogenerated mock type for the ConnectionsInterface type -type MockConnectionsInterface struct { - mock.Mock -} - -type MockConnectionsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockConnectionsInterface) EXPECT() *MockConnectionsInterface_Expecter { - return &MockConnectionsInterface_Expecter{mock: &_m.Mock} -} - -// ConnectionInfoNameToFullNameMap provides a mock function with given fields: ctx, request -func (_m *MockConnectionsInterface) ConnectionInfoNameToFullNameMap(ctx context.Context, request catalog.ListConnectionsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ConnectionInfoNameToFullNameMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListConnectionsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListConnectionsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListConnectionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConnectionInfoNameToFullNameMap' -type MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call struct { - *mock.Call -} - -// ConnectionInfoNameToFullNameMap is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListConnectionsRequest -func (_e *MockConnectionsInterface_Expecter) ConnectionInfoNameToFullNameMap(ctx interface{}, request interface{}) *MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call { - return &MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call{Call: _e.mock.On("ConnectionInfoNameToFullNameMap", ctx, request)} -} - -func (_c *MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call) Run(run func(ctx context.Context, request catalog.ListConnectionsRequest)) *MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListConnectionsRequest)) - }) - return _c -} - -func (_c *MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call) Return(_a0 map[string]string, _a1 error) *MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call) RunAndReturn(run func(context.Context, catalog.ListConnectionsRequest) (map[string]string, error)) *MockConnectionsInterface_ConnectionInfoNameToFullNameMap_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockConnectionsInterface) Create(ctx context.Context, request catalog.CreateConnection) (*catalog.ConnectionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.ConnectionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateConnection) (*catalog.ConnectionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateConnection) *catalog.ConnectionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ConnectionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateConnection) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockConnectionsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateConnection -func (_e *MockConnectionsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockConnectionsInterface_Create_Call { - return &MockConnectionsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockConnectionsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateConnection)) *MockConnectionsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateConnection)) - }) - return _c -} - -func (_c *MockConnectionsInterface_Create_Call) Return(_a0 *catalog.ConnectionInfo, _a1 error) *MockConnectionsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateConnection) (*catalog.ConnectionInfo, error)) *MockConnectionsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockConnectionsInterface) Delete(ctx context.Context, request catalog.DeleteConnectionRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteConnectionRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockConnectionsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockConnectionsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteConnectionRequest -func (_e *MockConnectionsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockConnectionsInterface_Delete_Call { - return &MockConnectionsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockConnectionsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteConnectionRequest)) *MockConnectionsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteConnectionRequest)) - }) - return _c -} - -func (_c *MockConnectionsInterface_Delete_Call) Return(_a0 error) *MockConnectionsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConnectionsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteConnectionRequest) error) *MockConnectionsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockConnectionsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockConnectionsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockConnectionsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockConnectionsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockConnectionsInterface_DeleteByName_Call { - return &MockConnectionsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockConnectionsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockConnectionsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConnectionsInterface_DeleteByName_Call) Return(_a0 error) *MockConnectionsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConnectionsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockConnectionsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockConnectionsInterface) Get(ctx context.Context, request catalog.GetConnectionRequest) (*catalog.ConnectionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.ConnectionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetConnectionRequest) (*catalog.ConnectionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetConnectionRequest) *catalog.ConnectionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ConnectionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetConnectionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockConnectionsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetConnectionRequest -func (_e *MockConnectionsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockConnectionsInterface_Get_Call { - return &MockConnectionsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockConnectionsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetConnectionRequest)) *MockConnectionsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetConnectionRequest)) - }) - return _c -} - -func (_c *MockConnectionsInterface_Get_Call) Return(_a0 *catalog.ConnectionInfo, _a1 error) *MockConnectionsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetConnectionRequest) (*catalog.ConnectionInfo, error)) *MockConnectionsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockConnectionsInterface) GetByName(ctx context.Context, name string) (*catalog.ConnectionInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.ConnectionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.ConnectionInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.ConnectionInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ConnectionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockConnectionsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockConnectionsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockConnectionsInterface_GetByName_Call { - return &MockConnectionsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockConnectionsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockConnectionsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConnectionsInterface_GetByName_Call) Return(_a0 *catalog.ConnectionInfo, _a1 error) *MockConnectionsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.ConnectionInfo, error)) *MockConnectionsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockConnectionsInterface) List(ctx context.Context, request catalog.ListConnectionsRequest) listing.Iterator[catalog.ConnectionInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.ConnectionInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListConnectionsRequest) listing.Iterator[catalog.ConnectionInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.ConnectionInfo]) - } - } - - return r0 -} - -// MockConnectionsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockConnectionsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListConnectionsRequest -func (_e *MockConnectionsInterface_Expecter) List(ctx interface{}, request interface{}) *MockConnectionsInterface_List_Call { - return &MockConnectionsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockConnectionsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListConnectionsRequest)) *MockConnectionsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListConnectionsRequest)) - }) - return _c -} - -func (_c *MockConnectionsInterface_List_Call) Return(_a0 listing.Iterator[catalog.ConnectionInfo]) *MockConnectionsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConnectionsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListConnectionsRequest) listing.Iterator[catalog.ConnectionInfo]) *MockConnectionsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockConnectionsInterface) ListAll(ctx context.Context, request catalog.ListConnectionsRequest) ([]catalog.ConnectionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.ConnectionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListConnectionsRequest) ([]catalog.ConnectionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListConnectionsRequest) []catalog.ConnectionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.ConnectionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListConnectionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockConnectionsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListConnectionsRequest -func (_e *MockConnectionsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockConnectionsInterface_ListAll_Call { - return &MockConnectionsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockConnectionsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListConnectionsRequest)) *MockConnectionsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListConnectionsRequest)) - }) - return _c -} - -func (_c *MockConnectionsInterface_ListAll_Call) Return(_a0 []catalog.ConnectionInfo, _a1 error) *MockConnectionsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListConnectionsRequest) ([]catalog.ConnectionInfo, error)) *MockConnectionsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockConnectionsInterface) Update(ctx context.Context, request catalog.UpdateConnection) (*catalog.ConnectionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.ConnectionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateConnection) (*catalog.ConnectionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateConnection) *catalog.ConnectionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ConnectionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateConnection) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConnectionsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockConnectionsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateConnection -func (_e *MockConnectionsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockConnectionsInterface_Update_Call { - return &MockConnectionsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockConnectionsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateConnection)) *MockConnectionsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateConnection)) - }) - return _c -} - -func (_c *MockConnectionsInterface_Update_Call) Return(_a0 *catalog.ConnectionInfo, _a1 error) *MockConnectionsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConnectionsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateConnection) (*catalog.ConnectionInfo, error)) *MockConnectionsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockConnectionsInterface creates a new instance of MockConnectionsInterface. 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 NewMockConnectionsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConnectionsInterface { - mock := &MockConnectionsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_credentials_interface.go b/experimental/mocks/service/catalog/mock_credentials_interface.go deleted file mode 100644 index 3fea48ac7..000000000 --- a/experimental/mocks/service/catalog/mock_credentials_interface.go +++ /dev/null @@ -1,596 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockCredentialsInterface is an autogenerated mock type for the CredentialsInterface type -type MockCredentialsInterface struct { - mock.Mock -} - -type MockCredentialsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCredentialsInterface) EXPECT() *MockCredentialsInterface_Expecter { - return &MockCredentialsInterface_Expecter{mock: &_m.Mock} -} - -// CreateCredential provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) CreateCredential(ctx context.Context, request catalog.CreateCredentialRequest) (*catalog.CredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateCredential") - } - - var r0 *catalog.CredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateCredentialRequest) (*catalog.CredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateCredentialRequest) *catalog.CredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_CreateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCredential' -type MockCredentialsInterface_CreateCredential_Call struct { - *mock.Call -} - -// CreateCredential is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateCredentialRequest -func (_e *MockCredentialsInterface_Expecter) CreateCredential(ctx interface{}, request interface{}) *MockCredentialsInterface_CreateCredential_Call { - return &MockCredentialsInterface_CreateCredential_Call{Call: _e.mock.On("CreateCredential", ctx, request)} -} - -func (_c *MockCredentialsInterface_CreateCredential_Call) Run(run func(ctx context.Context, request catalog.CreateCredentialRequest)) *MockCredentialsInterface_CreateCredential_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_CreateCredential_Call) Return(_a0 *catalog.CredentialInfo, _a1 error) *MockCredentialsInterface_CreateCredential_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_CreateCredential_Call) RunAndReturn(run func(context.Context, catalog.CreateCredentialRequest) (*catalog.CredentialInfo, error)) *MockCredentialsInterface_CreateCredential_Call { - _c.Call.Return(run) - return _c -} - -// DeleteCredential provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) DeleteCredential(ctx context.Context, request catalog.DeleteCredentialRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteCredential") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteCredentialRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCredentialsInterface_DeleteCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredential' -type MockCredentialsInterface_DeleteCredential_Call struct { - *mock.Call -} - -// DeleteCredential is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteCredentialRequest -func (_e *MockCredentialsInterface_Expecter) DeleteCredential(ctx interface{}, request interface{}) *MockCredentialsInterface_DeleteCredential_Call { - return &MockCredentialsInterface_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", ctx, request)} -} - -func (_c *MockCredentialsInterface_DeleteCredential_Call) Run(run func(ctx context.Context, request catalog.DeleteCredentialRequest)) *MockCredentialsInterface_DeleteCredential_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_DeleteCredential_Call) Return(_a0 error) *MockCredentialsInterface_DeleteCredential_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsInterface_DeleteCredential_Call) RunAndReturn(run func(context.Context, catalog.DeleteCredentialRequest) error) *MockCredentialsInterface_DeleteCredential_Call { - _c.Call.Return(run) - return _c -} - -// DeleteCredentialByNameArg provides a mock function with given fields: ctx, nameArg -func (_m *MockCredentialsInterface) DeleteCredentialByNameArg(ctx context.Context, nameArg string) error { - ret := _m.Called(ctx, nameArg) - - if len(ret) == 0 { - panic("no return value specified for DeleteCredentialByNameArg") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, nameArg) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCredentialsInterface_DeleteCredentialByNameArg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCredentialByNameArg' -type MockCredentialsInterface_DeleteCredentialByNameArg_Call struct { - *mock.Call -} - -// DeleteCredentialByNameArg is a helper method to define mock.On call -// - ctx context.Context -// - nameArg string -func (_e *MockCredentialsInterface_Expecter) DeleteCredentialByNameArg(ctx interface{}, nameArg interface{}) *MockCredentialsInterface_DeleteCredentialByNameArg_Call { - return &MockCredentialsInterface_DeleteCredentialByNameArg_Call{Call: _e.mock.On("DeleteCredentialByNameArg", ctx, nameArg)} -} - -func (_c *MockCredentialsInterface_DeleteCredentialByNameArg_Call) Run(run func(ctx context.Context, nameArg string)) *MockCredentialsInterface_DeleteCredentialByNameArg_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCredentialsInterface_DeleteCredentialByNameArg_Call) Return(_a0 error) *MockCredentialsInterface_DeleteCredentialByNameArg_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsInterface_DeleteCredentialByNameArg_Call) RunAndReturn(run func(context.Context, string) error) *MockCredentialsInterface_DeleteCredentialByNameArg_Call { - _c.Call.Return(run) - return _c -} - -// GenerateTemporaryServiceCredential provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) GenerateTemporaryServiceCredential(ctx context.Context, request catalog.GenerateTemporaryServiceCredentialRequest) (*catalog.TemporaryCredentials, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GenerateTemporaryServiceCredential") - } - - var r0 *catalog.TemporaryCredentials - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GenerateTemporaryServiceCredentialRequest) (*catalog.TemporaryCredentials, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GenerateTemporaryServiceCredentialRequest) *catalog.TemporaryCredentials); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.TemporaryCredentials) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GenerateTemporaryServiceCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_GenerateTemporaryServiceCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateTemporaryServiceCredential' -type MockCredentialsInterface_GenerateTemporaryServiceCredential_Call struct { - *mock.Call -} - -// GenerateTemporaryServiceCredential is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GenerateTemporaryServiceCredentialRequest -func (_e *MockCredentialsInterface_Expecter) GenerateTemporaryServiceCredential(ctx interface{}, request interface{}) *MockCredentialsInterface_GenerateTemporaryServiceCredential_Call { - return &MockCredentialsInterface_GenerateTemporaryServiceCredential_Call{Call: _e.mock.On("GenerateTemporaryServiceCredential", ctx, request)} -} - -func (_c *MockCredentialsInterface_GenerateTemporaryServiceCredential_Call) Run(run func(ctx context.Context, request catalog.GenerateTemporaryServiceCredentialRequest)) *MockCredentialsInterface_GenerateTemporaryServiceCredential_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GenerateTemporaryServiceCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_GenerateTemporaryServiceCredential_Call) Return(_a0 *catalog.TemporaryCredentials, _a1 error) *MockCredentialsInterface_GenerateTemporaryServiceCredential_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_GenerateTemporaryServiceCredential_Call) RunAndReturn(run func(context.Context, catalog.GenerateTemporaryServiceCredentialRequest) (*catalog.TemporaryCredentials, error)) *MockCredentialsInterface_GenerateTemporaryServiceCredential_Call { - _c.Call.Return(run) - return _c -} - -// GetCredential provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) GetCredential(ctx context.Context, request catalog.GetCredentialRequest) (*catalog.CredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetCredential") - } - - var r0 *catalog.CredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetCredentialRequest) (*catalog.CredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetCredentialRequest) *catalog.CredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_GetCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredential' -type MockCredentialsInterface_GetCredential_Call struct { - *mock.Call -} - -// GetCredential is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetCredentialRequest -func (_e *MockCredentialsInterface_Expecter) GetCredential(ctx interface{}, request interface{}) *MockCredentialsInterface_GetCredential_Call { - return &MockCredentialsInterface_GetCredential_Call{Call: _e.mock.On("GetCredential", ctx, request)} -} - -func (_c *MockCredentialsInterface_GetCredential_Call) Run(run func(ctx context.Context, request catalog.GetCredentialRequest)) *MockCredentialsInterface_GetCredential_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_GetCredential_Call) Return(_a0 *catalog.CredentialInfo, _a1 error) *MockCredentialsInterface_GetCredential_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_GetCredential_Call) RunAndReturn(run func(context.Context, catalog.GetCredentialRequest) (*catalog.CredentialInfo, error)) *MockCredentialsInterface_GetCredential_Call { - _c.Call.Return(run) - return _c -} - -// GetCredentialByNameArg provides a mock function with given fields: ctx, nameArg -func (_m *MockCredentialsInterface) GetCredentialByNameArg(ctx context.Context, nameArg string) (*catalog.CredentialInfo, error) { - ret := _m.Called(ctx, nameArg) - - if len(ret) == 0 { - panic("no return value specified for GetCredentialByNameArg") - } - - var r0 *catalog.CredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.CredentialInfo, error)); ok { - return rf(ctx, nameArg) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.CredentialInfo); ok { - r0 = rf(ctx, nameArg) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, nameArg) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_GetCredentialByNameArg_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCredentialByNameArg' -type MockCredentialsInterface_GetCredentialByNameArg_Call struct { - *mock.Call -} - -// GetCredentialByNameArg is a helper method to define mock.On call -// - ctx context.Context -// - nameArg string -func (_e *MockCredentialsInterface_Expecter) GetCredentialByNameArg(ctx interface{}, nameArg interface{}) *MockCredentialsInterface_GetCredentialByNameArg_Call { - return &MockCredentialsInterface_GetCredentialByNameArg_Call{Call: _e.mock.On("GetCredentialByNameArg", ctx, nameArg)} -} - -func (_c *MockCredentialsInterface_GetCredentialByNameArg_Call) Run(run func(ctx context.Context, nameArg string)) *MockCredentialsInterface_GetCredentialByNameArg_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCredentialsInterface_GetCredentialByNameArg_Call) Return(_a0 *catalog.CredentialInfo, _a1 error) *MockCredentialsInterface_GetCredentialByNameArg_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_GetCredentialByNameArg_Call) RunAndReturn(run func(context.Context, string) (*catalog.CredentialInfo, error)) *MockCredentialsInterface_GetCredentialByNameArg_Call { - _c.Call.Return(run) - return _c -} - -// ListCredentials provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) ListCredentials(ctx context.Context, request catalog.ListCredentialsRequest) listing.Iterator[catalog.CredentialInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListCredentials") - } - - var r0 listing.Iterator[catalog.CredentialInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListCredentialsRequest) listing.Iterator[catalog.CredentialInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.CredentialInfo]) - } - } - - return r0 -} - -// MockCredentialsInterface_ListCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredentials' -type MockCredentialsInterface_ListCredentials_Call struct { - *mock.Call -} - -// ListCredentials is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListCredentialsRequest -func (_e *MockCredentialsInterface_Expecter) ListCredentials(ctx interface{}, request interface{}) *MockCredentialsInterface_ListCredentials_Call { - return &MockCredentialsInterface_ListCredentials_Call{Call: _e.mock.On("ListCredentials", ctx, request)} -} - -func (_c *MockCredentialsInterface_ListCredentials_Call) Run(run func(ctx context.Context, request catalog.ListCredentialsRequest)) *MockCredentialsInterface_ListCredentials_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListCredentialsRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_ListCredentials_Call) Return(_a0 listing.Iterator[catalog.CredentialInfo]) *MockCredentialsInterface_ListCredentials_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsInterface_ListCredentials_Call) RunAndReturn(run func(context.Context, catalog.ListCredentialsRequest) listing.Iterator[catalog.CredentialInfo]) *MockCredentialsInterface_ListCredentials_Call { - _c.Call.Return(run) - return _c -} - -// ListCredentialsAll provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) ListCredentialsAll(ctx context.Context, request catalog.ListCredentialsRequest) ([]catalog.CredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListCredentialsAll") - } - - var r0 []catalog.CredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListCredentialsRequest) ([]catalog.CredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListCredentialsRequest) []catalog.CredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.CredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListCredentialsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_ListCredentialsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCredentialsAll' -type MockCredentialsInterface_ListCredentialsAll_Call struct { - *mock.Call -} - -// ListCredentialsAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListCredentialsRequest -func (_e *MockCredentialsInterface_Expecter) ListCredentialsAll(ctx interface{}, request interface{}) *MockCredentialsInterface_ListCredentialsAll_Call { - return &MockCredentialsInterface_ListCredentialsAll_Call{Call: _e.mock.On("ListCredentialsAll", ctx, request)} -} - -func (_c *MockCredentialsInterface_ListCredentialsAll_Call) Run(run func(ctx context.Context, request catalog.ListCredentialsRequest)) *MockCredentialsInterface_ListCredentialsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListCredentialsRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_ListCredentialsAll_Call) Return(_a0 []catalog.CredentialInfo, _a1 error) *MockCredentialsInterface_ListCredentialsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_ListCredentialsAll_Call) RunAndReturn(run func(context.Context, catalog.ListCredentialsRequest) ([]catalog.CredentialInfo, error)) *MockCredentialsInterface_ListCredentialsAll_Call { - _c.Call.Return(run) - return _c -} - -// UpdateCredential provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) UpdateCredential(ctx context.Context, request catalog.UpdateCredentialRequest) (*catalog.CredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateCredential") - } - - var r0 *catalog.CredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateCredentialRequest) (*catalog.CredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateCredentialRequest) *catalog.CredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_UpdateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCredential' -type MockCredentialsInterface_UpdateCredential_Call struct { - *mock.Call -} - -// UpdateCredential is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateCredentialRequest -func (_e *MockCredentialsInterface_Expecter) UpdateCredential(ctx interface{}, request interface{}) *MockCredentialsInterface_UpdateCredential_Call { - return &MockCredentialsInterface_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", ctx, request)} -} - -func (_c *MockCredentialsInterface_UpdateCredential_Call) Run(run func(ctx context.Context, request catalog.UpdateCredentialRequest)) *MockCredentialsInterface_UpdateCredential_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_UpdateCredential_Call) Return(_a0 *catalog.CredentialInfo, _a1 error) *MockCredentialsInterface_UpdateCredential_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_UpdateCredential_Call) RunAndReturn(run func(context.Context, catalog.UpdateCredentialRequest) (*catalog.CredentialInfo, error)) *MockCredentialsInterface_UpdateCredential_Call { - _c.Call.Return(run) - return _c -} - -// ValidateCredential provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) ValidateCredential(ctx context.Context, request catalog.ValidateCredentialRequest) (*catalog.ValidateCredentialResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ValidateCredential") - } - - var r0 *catalog.ValidateCredentialResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ValidateCredentialRequest) (*catalog.ValidateCredentialResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ValidateCredentialRequest) *catalog.ValidateCredentialResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ValidateCredentialResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ValidateCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_ValidateCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateCredential' -type MockCredentialsInterface_ValidateCredential_Call struct { - *mock.Call -} - -// ValidateCredential is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ValidateCredentialRequest -func (_e *MockCredentialsInterface_Expecter) ValidateCredential(ctx interface{}, request interface{}) *MockCredentialsInterface_ValidateCredential_Call { - return &MockCredentialsInterface_ValidateCredential_Call{Call: _e.mock.On("ValidateCredential", ctx, request)} -} - -func (_c *MockCredentialsInterface_ValidateCredential_Call) Run(run func(ctx context.Context, request catalog.ValidateCredentialRequest)) *MockCredentialsInterface_ValidateCredential_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ValidateCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_ValidateCredential_Call) Return(_a0 *catalog.ValidateCredentialResponse, _a1 error) *MockCredentialsInterface_ValidateCredential_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_ValidateCredential_Call) RunAndReturn(run func(context.Context, catalog.ValidateCredentialRequest) (*catalog.ValidateCredentialResponse, error)) *MockCredentialsInterface_ValidateCredential_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCredentialsInterface creates a new instance of MockCredentialsInterface. 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 NewMockCredentialsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCredentialsInterface { - mock := &MockCredentialsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_external_locations_interface.go b/experimental/mocks/service/catalog/mock_external_locations_interface.go deleted file mode 100644 index cc4d423c4..000000000 --- a/experimental/mocks/service/catalog/mock_external_locations_interface.go +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockExternalLocationsInterface is an autogenerated mock type for the ExternalLocationsInterface type -type MockExternalLocationsInterface struct { - mock.Mock -} - -type MockExternalLocationsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockExternalLocationsInterface) EXPECT() *MockExternalLocationsInterface_Expecter { - return &MockExternalLocationsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockExternalLocationsInterface) Create(ctx context.Context, request catalog.CreateExternalLocation) (*catalog.ExternalLocationInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.ExternalLocationInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateExternalLocation) (*catalog.ExternalLocationInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateExternalLocation) *catalog.ExternalLocationInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ExternalLocationInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateExternalLocation) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExternalLocationsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockExternalLocationsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateExternalLocation -func (_e *MockExternalLocationsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockExternalLocationsInterface_Create_Call { - return &MockExternalLocationsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockExternalLocationsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateExternalLocation)) *MockExternalLocationsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateExternalLocation)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_Create_Call) Return(_a0 *catalog.ExternalLocationInfo, _a1 error) *MockExternalLocationsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExternalLocationsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateExternalLocation) (*catalog.ExternalLocationInfo, error)) *MockExternalLocationsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockExternalLocationsInterface) Delete(ctx context.Context, request catalog.DeleteExternalLocationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteExternalLocationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExternalLocationsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockExternalLocationsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteExternalLocationRequest -func (_e *MockExternalLocationsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockExternalLocationsInterface_Delete_Call { - return &MockExternalLocationsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockExternalLocationsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteExternalLocationRequest)) *MockExternalLocationsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteExternalLocationRequest)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_Delete_Call) Return(_a0 error) *MockExternalLocationsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExternalLocationsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteExternalLocationRequest) error) *MockExternalLocationsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockExternalLocationsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExternalLocationsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockExternalLocationsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockExternalLocationsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockExternalLocationsInterface_DeleteByName_Call { - return &MockExternalLocationsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockExternalLocationsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockExternalLocationsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_DeleteByName_Call) Return(_a0 error) *MockExternalLocationsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExternalLocationsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockExternalLocationsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockExternalLocationsInterface) Get(ctx context.Context, request catalog.GetExternalLocationRequest) (*catalog.ExternalLocationInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.ExternalLocationInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetExternalLocationRequest) (*catalog.ExternalLocationInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetExternalLocationRequest) *catalog.ExternalLocationInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ExternalLocationInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetExternalLocationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExternalLocationsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockExternalLocationsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetExternalLocationRequest -func (_e *MockExternalLocationsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockExternalLocationsInterface_Get_Call { - return &MockExternalLocationsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockExternalLocationsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetExternalLocationRequest)) *MockExternalLocationsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetExternalLocationRequest)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_Get_Call) Return(_a0 *catalog.ExternalLocationInfo, _a1 error) *MockExternalLocationsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExternalLocationsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetExternalLocationRequest) (*catalog.ExternalLocationInfo, error)) *MockExternalLocationsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockExternalLocationsInterface) GetByName(ctx context.Context, name string) (*catalog.ExternalLocationInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.ExternalLocationInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.ExternalLocationInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.ExternalLocationInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ExternalLocationInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExternalLocationsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockExternalLocationsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockExternalLocationsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockExternalLocationsInterface_GetByName_Call { - return &MockExternalLocationsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockExternalLocationsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockExternalLocationsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_GetByName_Call) Return(_a0 *catalog.ExternalLocationInfo, _a1 error) *MockExternalLocationsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExternalLocationsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.ExternalLocationInfo, error)) *MockExternalLocationsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockExternalLocationsInterface) List(ctx context.Context, request catalog.ListExternalLocationsRequest) listing.Iterator[catalog.ExternalLocationInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.ExternalLocationInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListExternalLocationsRequest) listing.Iterator[catalog.ExternalLocationInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.ExternalLocationInfo]) - } - } - - return r0 -} - -// MockExternalLocationsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockExternalLocationsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListExternalLocationsRequest -func (_e *MockExternalLocationsInterface_Expecter) List(ctx interface{}, request interface{}) *MockExternalLocationsInterface_List_Call { - return &MockExternalLocationsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockExternalLocationsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListExternalLocationsRequest)) *MockExternalLocationsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListExternalLocationsRequest)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_List_Call) Return(_a0 listing.Iterator[catalog.ExternalLocationInfo]) *MockExternalLocationsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExternalLocationsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListExternalLocationsRequest) listing.Iterator[catalog.ExternalLocationInfo]) *MockExternalLocationsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockExternalLocationsInterface) ListAll(ctx context.Context, request catalog.ListExternalLocationsRequest) ([]catalog.ExternalLocationInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.ExternalLocationInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListExternalLocationsRequest) ([]catalog.ExternalLocationInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListExternalLocationsRequest) []catalog.ExternalLocationInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.ExternalLocationInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListExternalLocationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExternalLocationsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockExternalLocationsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListExternalLocationsRequest -func (_e *MockExternalLocationsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockExternalLocationsInterface_ListAll_Call { - return &MockExternalLocationsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockExternalLocationsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListExternalLocationsRequest)) *MockExternalLocationsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListExternalLocationsRequest)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_ListAll_Call) Return(_a0 []catalog.ExternalLocationInfo, _a1 error) *MockExternalLocationsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExternalLocationsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListExternalLocationsRequest) ([]catalog.ExternalLocationInfo, error)) *MockExternalLocationsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockExternalLocationsInterface) Update(ctx context.Context, request catalog.UpdateExternalLocation) (*catalog.ExternalLocationInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.ExternalLocationInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateExternalLocation) (*catalog.ExternalLocationInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateExternalLocation) *catalog.ExternalLocationInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ExternalLocationInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateExternalLocation) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExternalLocationsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockExternalLocationsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateExternalLocation -func (_e *MockExternalLocationsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockExternalLocationsInterface_Update_Call { - return &MockExternalLocationsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockExternalLocationsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateExternalLocation)) *MockExternalLocationsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateExternalLocation)) - }) - return _c -} - -func (_c *MockExternalLocationsInterface_Update_Call) Return(_a0 *catalog.ExternalLocationInfo, _a1 error) *MockExternalLocationsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExternalLocationsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateExternalLocation) (*catalog.ExternalLocationInfo, error)) *MockExternalLocationsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockExternalLocationsInterface creates a new instance of MockExternalLocationsInterface. 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 NewMockExternalLocationsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockExternalLocationsInterface { - mock := &MockExternalLocationsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_functions_interface.go b/experimental/mocks/service/catalog/mock_functions_interface.go deleted file mode 100644 index 1fdd8664b..000000000 --- a/experimental/mocks/service/catalog/mock_functions_interface.go +++ /dev/null @@ -1,537 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockFunctionsInterface is an autogenerated mock type for the FunctionsInterface type -type MockFunctionsInterface struct { - mock.Mock -} - -type MockFunctionsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockFunctionsInterface) EXPECT() *MockFunctionsInterface_Expecter { - return &MockFunctionsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockFunctionsInterface) Create(ctx context.Context, request catalog.CreateFunctionRequest) (*catalog.FunctionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.FunctionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateFunctionRequest) (*catalog.FunctionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateFunctionRequest) *catalog.FunctionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.FunctionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateFunctionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFunctionsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockFunctionsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateFunctionRequest -func (_e *MockFunctionsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockFunctionsInterface_Create_Call { - return &MockFunctionsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockFunctionsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateFunctionRequest)) *MockFunctionsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateFunctionRequest)) - }) - return _c -} - -func (_c *MockFunctionsInterface_Create_Call) Return(_a0 *catalog.FunctionInfo, _a1 error) *MockFunctionsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFunctionsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateFunctionRequest) (*catalog.FunctionInfo, error)) *MockFunctionsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockFunctionsInterface) Delete(ctx context.Context, request catalog.DeleteFunctionRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteFunctionRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFunctionsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockFunctionsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteFunctionRequest -func (_e *MockFunctionsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockFunctionsInterface_Delete_Call { - return &MockFunctionsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockFunctionsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteFunctionRequest)) *MockFunctionsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteFunctionRequest)) - }) - return _c -} - -func (_c *MockFunctionsInterface_Delete_Call) Return(_a0 error) *MockFunctionsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFunctionsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteFunctionRequest) error) *MockFunctionsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockFunctionsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFunctionsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockFunctionsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockFunctionsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockFunctionsInterface_DeleteByName_Call { - return &MockFunctionsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockFunctionsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockFunctionsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFunctionsInterface_DeleteByName_Call) Return(_a0 error) *MockFunctionsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFunctionsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockFunctionsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// FunctionInfoNameToFullNameMap provides a mock function with given fields: ctx, request -func (_m *MockFunctionsInterface) FunctionInfoNameToFullNameMap(ctx context.Context, request catalog.ListFunctionsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for FunctionInfoNameToFullNameMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListFunctionsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListFunctionsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListFunctionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FunctionInfoNameToFullNameMap' -type MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call struct { - *mock.Call -} - -// FunctionInfoNameToFullNameMap is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListFunctionsRequest -func (_e *MockFunctionsInterface_Expecter) FunctionInfoNameToFullNameMap(ctx interface{}, request interface{}) *MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call { - return &MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call{Call: _e.mock.On("FunctionInfoNameToFullNameMap", ctx, request)} -} - -func (_c *MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call) Run(run func(ctx context.Context, request catalog.ListFunctionsRequest)) *MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListFunctionsRequest)) - }) - return _c -} - -func (_c *MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call) Return(_a0 map[string]string, _a1 error) *MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call) RunAndReturn(run func(context.Context, catalog.ListFunctionsRequest) (map[string]string, error)) *MockFunctionsInterface_FunctionInfoNameToFullNameMap_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockFunctionsInterface) Get(ctx context.Context, request catalog.GetFunctionRequest) (*catalog.FunctionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.FunctionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetFunctionRequest) (*catalog.FunctionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetFunctionRequest) *catalog.FunctionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.FunctionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetFunctionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFunctionsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockFunctionsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetFunctionRequest -func (_e *MockFunctionsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockFunctionsInterface_Get_Call { - return &MockFunctionsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockFunctionsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetFunctionRequest)) *MockFunctionsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetFunctionRequest)) - }) - return _c -} - -func (_c *MockFunctionsInterface_Get_Call) Return(_a0 *catalog.FunctionInfo, _a1 error) *MockFunctionsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFunctionsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetFunctionRequest) (*catalog.FunctionInfo, error)) *MockFunctionsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockFunctionsInterface) GetByName(ctx context.Context, name string) (*catalog.FunctionInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.FunctionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.FunctionInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.FunctionInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.FunctionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFunctionsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockFunctionsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockFunctionsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockFunctionsInterface_GetByName_Call { - return &MockFunctionsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockFunctionsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockFunctionsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFunctionsInterface_GetByName_Call) Return(_a0 *catalog.FunctionInfo, _a1 error) *MockFunctionsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFunctionsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.FunctionInfo, error)) *MockFunctionsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockFunctionsInterface) List(ctx context.Context, request catalog.ListFunctionsRequest) listing.Iterator[catalog.FunctionInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.FunctionInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListFunctionsRequest) listing.Iterator[catalog.FunctionInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.FunctionInfo]) - } - } - - return r0 -} - -// MockFunctionsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockFunctionsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListFunctionsRequest -func (_e *MockFunctionsInterface_Expecter) List(ctx interface{}, request interface{}) *MockFunctionsInterface_List_Call { - return &MockFunctionsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockFunctionsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListFunctionsRequest)) *MockFunctionsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListFunctionsRequest)) - }) - return _c -} - -func (_c *MockFunctionsInterface_List_Call) Return(_a0 listing.Iterator[catalog.FunctionInfo]) *MockFunctionsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFunctionsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListFunctionsRequest) listing.Iterator[catalog.FunctionInfo]) *MockFunctionsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockFunctionsInterface) ListAll(ctx context.Context, request catalog.ListFunctionsRequest) ([]catalog.FunctionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.FunctionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListFunctionsRequest) ([]catalog.FunctionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListFunctionsRequest) []catalog.FunctionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.FunctionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListFunctionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFunctionsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockFunctionsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListFunctionsRequest -func (_e *MockFunctionsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockFunctionsInterface_ListAll_Call { - return &MockFunctionsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockFunctionsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListFunctionsRequest)) *MockFunctionsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListFunctionsRequest)) - }) - return _c -} - -func (_c *MockFunctionsInterface_ListAll_Call) Return(_a0 []catalog.FunctionInfo, _a1 error) *MockFunctionsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFunctionsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListFunctionsRequest) ([]catalog.FunctionInfo, error)) *MockFunctionsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockFunctionsInterface) Update(ctx context.Context, request catalog.UpdateFunction) (*catalog.FunctionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.FunctionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateFunction) (*catalog.FunctionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateFunction) *catalog.FunctionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.FunctionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateFunction) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFunctionsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockFunctionsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateFunction -func (_e *MockFunctionsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockFunctionsInterface_Update_Call { - return &MockFunctionsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockFunctionsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateFunction)) *MockFunctionsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateFunction)) - }) - return _c -} - -func (_c *MockFunctionsInterface_Update_Call) Return(_a0 *catalog.FunctionInfo, _a1 error) *MockFunctionsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFunctionsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateFunction) (*catalog.FunctionInfo, error)) *MockFunctionsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockFunctionsInterface creates a new instance of MockFunctionsInterface. 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 NewMockFunctionsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockFunctionsInterface { - mock := &MockFunctionsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_grants_interface.go b/experimental/mocks/service/catalog/mock_grants_interface.go deleted file mode 100644 index f234ab21c..000000000 --- a/experimental/mocks/service/catalog/mock_grants_interface.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - mock "github.com/stretchr/testify/mock" -) - -// MockGrantsInterface is an autogenerated mock type for the GrantsInterface type -type MockGrantsInterface struct { - mock.Mock -} - -type MockGrantsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockGrantsInterface) EXPECT() *MockGrantsInterface_Expecter { - return &MockGrantsInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockGrantsInterface) Get(ctx context.Context, request catalog.GetGrantRequest) (*catalog.PermissionsList, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.PermissionsList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetGrantRequest) (*catalog.PermissionsList, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetGrantRequest) *catalog.PermissionsList); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.PermissionsList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetGrantRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGrantsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockGrantsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetGrantRequest -func (_e *MockGrantsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockGrantsInterface_Get_Call { - return &MockGrantsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockGrantsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetGrantRequest)) *MockGrantsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetGrantRequest)) - }) - return _c -} - -func (_c *MockGrantsInterface_Get_Call) Return(_a0 *catalog.PermissionsList, _a1 error) *MockGrantsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGrantsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetGrantRequest) (*catalog.PermissionsList, error)) *MockGrantsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetBySecurableTypeAndFullName provides a mock function with given fields: ctx, securableType, fullName -func (_m *MockGrantsInterface) GetBySecurableTypeAndFullName(ctx context.Context, securableType catalog.SecurableType, fullName string) (*catalog.PermissionsList, error) { - ret := _m.Called(ctx, securableType, fullName) - - if len(ret) == 0 { - panic("no return value specified for GetBySecurableTypeAndFullName") - } - - var r0 *catalog.PermissionsList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.SecurableType, string) (*catalog.PermissionsList, error)); ok { - return rf(ctx, securableType, fullName) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.SecurableType, string) *catalog.PermissionsList); ok { - r0 = rf(ctx, securableType, fullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.PermissionsList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.SecurableType, string) error); ok { - r1 = rf(ctx, securableType, fullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGrantsInterface_GetBySecurableTypeAndFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBySecurableTypeAndFullName' -type MockGrantsInterface_GetBySecurableTypeAndFullName_Call struct { - *mock.Call -} - -// GetBySecurableTypeAndFullName is a helper method to define mock.On call -// - ctx context.Context -// - securableType catalog.SecurableType -// - fullName string -func (_e *MockGrantsInterface_Expecter) GetBySecurableTypeAndFullName(ctx interface{}, securableType interface{}, fullName interface{}) *MockGrantsInterface_GetBySecurableTypeAndFullName_Call { - return &MockGrantsInterface_GetBySecurableTypeAndFullName_Call{Call: _e.mock.On("GetBySecurableTypeAndFullName", ctx, securableType, fullName)} -} - -func (_c *MockGrantsInterface_GetBySecurableTypeAndFullName_Call) Run(run func(ctx context.Context, securableType catalog.SecurableType, fullName string)) *MockGrantsInterface_GetBySecurableTypeAndFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.SecurableType), args[2].(string)) - }) - return _c -} - -func (_c *MockGrantsInterface_GetBySecurableTypeAndFullName_Call) Return(_a0 *catalog.PermissionsList, _a1 error) *MockGrantsInterface_GetBySecurableTypeAndFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGrantsInterface_GetBySecurableTypeAndFullName_Call) RunAndReturn(run func(context.Context, catalog.SecurableType, string) (*catalog.PermissionsList, error)) *MockGrantsInterface_GetBySecurableTypeAndFullName_Call { - _c.Call.Return(run) - return _c -} - -// GetEffective provides a mock function with given fields: ctx, request -func (_m *MockGrantsInterface) GetEffective(ctx context.Context, request catalog.GetEffectiveRequest) (*catalog.EffectivePermissionsList, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetEffective") - } - - var r0 *catalog.EffectivePermissionsList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetEffectiveRequest) (*catalog.EffectivePermissionsList, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetEffectiveRequest) *catalog.EffectivePermissionsList); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.EffectivePermissionsList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetEffectiveRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGrantsInterface_GetEffective_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEffective' -type MockGrantsInterface_GetEffective_Call struct { - *mock.Call -} - -// GetEffective is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetEffectiveRequest -func (_e *MockGrantsInterface_Expecter) GetEffective(ctx interface{}, request interface{}) *MockGrantsInterface_GetEffective_Call { - return &MockGrantsInterface_GetEffective_Call{Call: _e.mock.On("GetEffective", ctx, request)} -} - -func (_c *MockGrantsInterface_GetEffective_Call) Run(run func(ctx context.Context, request catalog.GetEffectiveRequest)) *MockGrantsInterface_GetEffective_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetEffectiveRequest)) - }) - return _c -} - -func (_c *MockGrantsInterface_GetEffective_Call) Return(_a0 *catalog.EffectivePermissionsList, _a1 error) *MockGrantsInterface_GetEffective_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGrantsInterface_GetEffective_Call) RunAndReturn(run func(context.Context, catalog.GetEffectiveRequest) (*catalog.EffectivePermissionsList, error)) *MockGrantsInterface_GetEffective_Call { - _c.Call.Return(run) - return _c -} - -// GetEffectiveBySecurableTypeAndFullName provides a mock function with given fields: ctx, securableType, fullName -func (_m *MockGrantsInterface) GetEffectiveBySecurableTypeAndFullName(ctx context.Context, securableType catalog.SecurableType, fullName string) (*catalog.EffectivePermissionsList, error) { - ret := _m.Called(ctx, securableType, fullName) - - if len(ret) == 0 { - panic("no return value specified for GetEffectiveBySecurableTypeAndFullName") - } - - var r0 *catalog.EffectivePermissionsList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.SecurableType, string) (*catalog.EffectivePermissionsList, error)); ok { - return rf(ctx, securableType, fullName) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.SecurableType, string) *catalog.EffectivePermissionsList); ok { - r0 = rf(ctx, securableType, fullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.EffectivePermissionsList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.SecurableType, string) error); ok { - r1 = rf(ctx, securableType, fullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEffectiveBySecurableTypeAndFullName' -type MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call struct { - *mock.Call -} - -// GetEffectiveBySecurableTypeAndFullName is a helper method to define mock.On call -// - ctx context.Context -// - securableType catalog.SecurableType -// - fullName string -func (_e *MockGrantsInterface_Expecter) GetEffectiveBySecurableTypeAndFullName(ctx interface{}, securableType interface{}, fullName interface{}) *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call { - return &MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call{Call: _e.mock.On("GetEffectiveBySecurableTypeAndFullName", ctx, securableType, fullName)} -} - -func (_c *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call) Run(run func(ctx context.Context, securableType catalog.SecurableType, fullName string)) *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.SecurableType), args[2].(string)) - }) - return _c -} - -func (_c *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call) Return(_a0 *catalog.EffectivePermissionsList, _a1 error) *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call) RunAndReturn(run func(context.Context, catalog.SecurableType, string) (*catalog.EffectivePermissionsList, error)) *MockGrantsInterface_GetEffectiveBySecurableTypeAndFullName_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockGrantsInterface) Update(ctx context.Context, request catalog.UpdatePermissions) (*catalog.PermissionsList, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.PermissionsList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdatePermissions) (*catalog.PermissionsList, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdatePermissions) *catalog.PermissionsList); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.PermissionsList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdatePermissions) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGrantsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockGrantsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdatePermissions -func (_e *MockGrantsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockGrantsInterface_Update_Call { - return &MockGrantsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockGrantsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdatePermissions)) *MockGrantsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdatePermissions)) - }) - return _c -} - -func (_c *MockGrantsInterface_Update_Call) Return(_a0 *catalog.PermissionsList, _a1 error) *MockGrantsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGrantsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdatePermissions) (*catalog.PermissionsList, error)) *MockGrantsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockGrantsInterface creates a new instance of MockGrantsInterface. 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 NewMockGrantsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockGrantsInterface { - mock := &MockGrantsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_metastores_interface.go b/experimental/mocks/service/catalog/mock_metastores_interface.go deleted file mode 100644 index 2a347cecc..000000000 --- a/experimental/mocks/service/catalog/mock_metastores_interface.go +++ /dev/null @@ -1,897 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockMetastoresInterface is an autogenerated mock type for the MetastoresInterface type -type MockMetastoresInterface struct { - mock.Mock -} - -type MockMetastoresInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockMetastoresInterface) EXPECT() *MockMetastoresInterface_Expecter { - return &MockMetastoresInterface_Expecter{mock: &_m.Mock} -} - -// Assign provides a mock function with given fields: ctx, request -func (_m *MockMetastoresInterface) Assign(ctx context.Context, request catalog.CreateMetastoreAssignment) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Assign") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateMetastoreAssignment) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockMetastoresInterface_Assign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Assign' -type MockMetastoresInterface_Assign_Call struct { - *mock.Call -} - -// Assign is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateMetastoreAssignment -func (_e *MockMetastoresInterface_Expecter) Assign(ctx interface{}, request interface{}) *MockMetastoresInterface_Assign_Call { - return &MockMetastoresInterface_Assign_Call{Call: _e.mock.On("Assign", ctx, request)} -} - -func (_c *MockMetastoresInterface_Assign_Call) Run(run func(ctx context.Context, request catalog.CreateMetastoreAssignment)) *MockMetastoresInterface_Assign_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateMetastoreAssignment)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Assign_Call) Return(_a0 error) *MockMetastoresInterface_Assign_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_Assign_Call) RunAndReturn(run func(context.Context, catalog.CreateMetastoreAssignment) error) *MockMetastoresInterface_Assign_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockMetastoresInterface) Create(ctx context.Context, request catalog.CreateMetastore) (*catalog.MetastoreInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.MetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateMetastore) (*catalog.MetastoreInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateMetastore) *catalog.MetastoreInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateMetastore) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockMetastoresInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateMetastore -func (_e *MockMetastoresInterface_Expecter) Create(ctx interface{}, request interface{}) *MockMetastoresInterface_Create_Call { - return &MockMetastoresInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockMetastoresInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateMetastore)) *MockMetastoresInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateMetastore)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Create_Call) Return(_a0 *catalog.MetastoreInfo, _a1 error) *MockMetastoresInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateMetastore) (*catalog.MetastoreInfo, error)) *MockMetastoresInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Current provides a mock function with given fields: ctx -func (_m *MockMetastoresInterface) Current(ctx context.Context) (*catalog.MetastoreAssignment, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Current") - } - - var r0 *catalog.MetastoreAssignment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*catalog.MetastoreAssignment, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *catalog.MetastoreAssignment); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MetastoreAssignment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_Current_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Current' -type MockMetastoresInterface_Current_Call struct { - *mock.Call -} - -// Current is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockMetastoresInterface_Expecter) Current(ctx interface{}) *MockMetastoresInterface_Current_Call { - return &MockMetastoresInterface_Current_Call{Call: _e.mock.On("Current", ctx)} -} - -func (_c *MockMetastoresInterface_Current_Call) Run(run func(ctx context.Context)) *MockMetastoresInterface_Current_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Current_Call) Return(_a0 *catalog.MetastoreAssignment, _a1 error) *MockMetastoresInterface_Current_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_Current_Call) RunAndReturn(run func(context.Context) (*catalog.MetastoreAssignment, error)) *MockMetastoresInterface_Current_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockMetastoresInterface) Delete(ctx context.Context, request catalog.DeleteMetastoreRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteMetastoreRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockMetastoresInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockMetastoresInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteMetastoreRequest -func (_e *MockMetastoresInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockMetastoresInterface_Delete_Call { - return &MockMetastoresInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockMetastoresInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteMetastoreRequest)) *MockMetastoresInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteMetastoreRequest)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Delete_Call) Return(_a0 error) *MockMetastoresInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteMetastoreRequest) error) *MockMetastoresInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockMetastoresInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockMetastoresInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockMetastoresInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockMetastoresInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockMetastoresInterface_DeleteById_Call { - return &MockMetastoresInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockMetastoresInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockMetastoresInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockMetastoresInterface_DeleteById_Call) Return(_a0 error) *MockMetastoresInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockMetastoresInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockMetastoresInterface) Get(ctx context.Context, request catalog.GetMetastoreRequest) (*catalog.MetastoreInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.MetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetMetastoreRequest) (*catalog.MetastoreInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetMetastoreRequest) *catalog.MetastoreInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetMetastoreRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockMetastoresInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetMetastoreRequest -func (_e *MockMetastoresInterface_Expecter) Get(ctx interface{}, request interface{}) *MockMetastoresInterface_Get_Call { - return &MockMetastoresInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockMetastoresInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetMetastoreRequest)) *MockMetastoresInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetMetastoreRequest)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Get_Call) Return(_a0 *catalog.MetastoreInfo, _a1 error) *MockMetastoresInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetMetastoreRequest) (*catalog.MetastoreInfo, error)) *MockMetastoresInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockMetastoresInterface) GetById(ctx context.Context, id string) (*catalog.MetastoreInfo, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *catalog.MetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.MetastoreInfo, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.MetastoreInfo); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockMetastoresInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockMetastoresInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockMetastoresInterface_GetById_Call { - return &MockMetastoresInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockMetastoresInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockMetastoresInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockMetastoresInterface_GetById_Call) Return(_a0 *catalog.MetastoreInfo, _a1 error) *MockMetastoresInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*catalog.MetastoreInfo, error)) *MockMetastoresInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockMetastoresInterface) GetByName(ctx context.Context, name string) (*catalog.MetastoreInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.MetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.MetastoreInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.MetastoreInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockMetastoresInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockMetastoresInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockMetastoresInterface_GetByName_Call { - return &MockMetastoresInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockMetastoresInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockMetastoresInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockMetastoresInterface_GetByName_Call) Return(_a0 *catalog.MetastoreInfo, _a1 error) *MockMetastoresInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.MetastoreInfo, error)) *MockMetastoresInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockMetastoresInterface) List(ctx context.Context) listing.Iterator[catalog.MetastoreInfo] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.MetastoreInfo] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[catalog.MetastoreInfo]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.MetastoreInfo]) - } - } - - return r0 -} - -// MockMetastoresInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockMetastoresInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockMetastoresInterface_Expecter) List(ctx interface{}) *MockMetastoresInterface_List_Call { - return &MockMetastoresInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockMetastoresInterface_List_Call) Run(run func(ctx context.Context)) *MockMetastoresInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockMetastoresInterface_List_Call) Return(_a0 listing.Iterator[catalog.MetastoreInfo]) *MockMetastoresInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[catalog.MetastoreInfo]) *MockMetastoresInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockMetastoresInterface) ListAll(ctx context.Context) ([]catalog.MetastoreInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.MetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]catalog.MetastoreInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []catalog.MetastoreInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.MetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockMetastoresInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockMetastoresInterface_Expecter) ListAll(ctx interface{}) *MockMetastoresInterface_ListAll_Call { - return &MockMetastoresInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockMetastoresInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockMetastoresInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockMetastoresInterface_ListAll_Call) Return(_a0 []catalog.MetastoreInfo, _a1 error) *MockMetastoresInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]catalog.MetastoreInfo, error)) *MockMetastoresInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// MetastoreInfoNameToMetastoreIdMap provides a mock function with given fields: ctx -func (_m *MockMetastoresInterface) MetastoreInfoNameToMetastoreIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for MetastoreInfoNameToMetastoreIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MetastoreInfoNameToMetastoreIdMap' -type MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call struct { - *mock.Call -} - -// MetastoreInfoNameToMetastoreIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockMetastoresInterface_Expecter) MetastoreInfoNameToMetastoreIdMap(ctx interface{}) *MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call { - return &MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call{Call: _e.mock.On("MetastoreInfoNameToMetastoreIdMap", ctx)} -} - -func (_c *MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call) Run(run func(ctx context.Context)) *MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockMetastoresInterface_MetastoreInfoNameToMetastoreIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Summary provides a mock function with given fields: ctx -func (_m *MockMetastoresInterface) Summary(ctx context.Context) (*catalog.GetMetastoreSummaryResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Summary") - } - - var r0 *catalog.GetMetastoreSummaryResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*catalog.GetMetastoreSummaryResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *catalog.GetMetastoreSummaryResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.GetMetastoreSummaryResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_Summary_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Summary' -type MockMetastoresInterface_Summary_Call struct { - *mock.Call -} - -// Summary is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockMetastoresInterface_Expecter) Summary(ctx interface{}) *MockMetastoresInterface_Summary_Call { - return &MockMetastoresInterface_Summary_Call{Call: _e.mock.On("Summary", ctx)} -} - -func (_c *MockMetastoresInterface_Summary_Call) Run(run func(ctx context.Context)) *MockMetastoresInterface_Summary_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Summary_Call) Return(_a0 *catalog.GetMetastoreSummaryResponse, _a1 error) *MockMetastoresInterface_Summary_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_Summary_Call) RunAndReturn(run func(context.Context) (*catalog.GetMetastoreSummaryResponse, error)) *MockMetastoresInterface_Summary_Call { - _c.Call.Return(run) - return _c -} - -// Unassign provides a mock function with given fields: ctx, request -func (_m *MockMetastoresInterface) Unassign(ctx context.Context, request catalog.UnassignRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Unassign") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UnassignRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockMetastoresInterface_Unassign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unassign' -type MockMetastoresInterface_Unassign_Call struct { - *mock.Call -} - -// Unassign is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UnassignRequest -func (_e *MockMetastoresInterface_Expecter) Unassign(ctx interface{}, request interface{}) *MockMetastoresInterface_Unassign_Call { - return &MockMetastoresInterface_Unassign_Call{Call: _e.mock.On("Unassign", ctx, request)} -} - -func (_c *MockMetastoresInterface_Unassign_Call) Run(run func(ctx context.Context, request catalog.UnassignRequest)) *MockMetastoresInterface_Unassign_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UnassignRequest)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Unassign_Call) Return(_a0 error) *MockMetastoresInterface_Unassign_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_Unassign_Call) RunAndReturn(run func(context.Context, catalog.UnassignRequest) error) *MockMetastoresInterface_Unassign_Call { - _c.Call.Return(run) - return _c -} - -// UnassignByWorkspaceId provides a mock function with given fields: ctx, workspaceId -func (_m *MockMetastoresInterface) UnassignByWorkspaceId(ctx context.Context, workspaceId int64) error { - ret := _m.Called(ctx, workspaceId) - - if len(ret) == 0 { - panic("no return value specified for UnassignByWorkspaceId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, workspaceId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockMetastoresInterface_UnassignByWorkspaceId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnassignByWorkspaceId' -type MockMetastoresInterface_UnassignByWorkspaceId_Call struct { - *mock.Call -} - -// UnassignByWorkspaceId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -func (_e *MockMetastoresInterface_Expecter) UnassignByWorkspaceId(ctx interface{}, workspaceId interface{}) *MockMetastoresInterface_UnassignByWorkspaceId_Call { - return &MockMetastoresInterface_UnassignByWorkspaceId_Call{Call: _e.mock.On("UnassignByWorkspaceId", ctx, workspaceId)} -} - -func (_c *MockMetastoresInterface_UnassignByWorkspaceId_Call) Run(run func(ctx context.Context, workspaceId int64)) *MockMetastoresInterface_UnassignByWorkspaceId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockMetastoresInterface_UnassignByWorkspaceId_Call) Return(_a0 error) *MockMetastoresInterface_UnassignByWorkspaceId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_UnassignByWorkspaceId_Call) RunAndReturn(run func(context.Context, int64) error) *MockMetastoresInterface_UnassignByWorkspaceId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockMetastoresInterface) Update(ctx context.Context, request catalog.UpdateMetastore) (*catalog.MetastoreInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.MetastoreInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateMetastore) (*catalog.MetastoreInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateMetastore) *catalog.MetastoreInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MetastoreInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateMetastore) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockMetastoresInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockMetastoresInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateMetastore -func (_e *MockMetastoresInterface_Expecter) Update(ctx interface{}, request interface{}) *MockMetastoresInterface_Update_Call { - return &MockMetastoresInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockMetastoresInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateMetastore)) *MockMetastoresInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateMetastore)) - }) - return _c -} - -func (_c *MockMetastoresInterface_Update_Call) Return(_a0 *catalog.MetastoreInfo, _a1 error) *MockMetastoresInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockMetastoresInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateMetastore) (*catalog.MetastoreInfo, error)) *MockMetastoresInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdateAssignment provides a mock function with given fields: ctx, request -func (_m *MockMetastoresInterface) UpdateAssignment(ctx context.Context, request catalog.UpdateMetastoreAssignment) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateAssignment") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateMetastoreAssignment) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockMetastoresInterface_UpdateAssignment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAssignment' -type MockMetastoresInterface_UpdateAssignment_Call struct { - *mock.Call -} - -// UpdateAssignment is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateMetastoreAssignment -func (_e *MockMetastoresInterface_Expecter) UpdateAssignment(ctx interface{}, request interface{}) *MockMetastoresInterface_UpdateAssignment_Call { - return &MockMetastoresInterface_UpdateAssignment_Call{Call: _e.mock.On("UpdateAssignment", ctx, request)} -} - -func (_c *MockMetastoresInterface_UpdateAssignment_Call) Run(run func(ctx context.Context, request catalog.UpdateMetastoreAssignment)) *MockMetastoresInterface_UpdateAssignment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateMetastoreAssignment)) - }) - return _c -} - -func (_c *MockMetastoresInterface_UpdateAssignment_Call) Return(_a0 error) *MockMetastoresInterface_UpdateAssignment_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockMetastoresInterface_UpdateAssignment_Call) RunAndReturn(run func(context.Context, catalog.UpdateMetastoreAssignment) error) *MockMetastoresInterface_UpdateAssignment_Call { - _c.Call.Return(run) - return _c -} - -// NewMockMetastoresInterface creates a new instance of MockMetastoresInterface. 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 NewMockMetastoresInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockMetastoresInterface { - mock := &MockMetastoresInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_model_versions_interface.go b/experimental/mocks/service/catalog/mock_model_versions_interface.go deleted file mode 100644 index 99e498e21..000000000 --- a/experimental/mocks/service/catalog/mock_model_versions_interface.go +++ /dev/null @@ -1,599 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockModelVersionsInterface is an autogenerated mock type for the ModelVersionsInterface type -type MockModelVersionsInterface struct { - mock.Mock -} - -type MockModelVersionsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockModelVersionsInterface) EXPECT() *MockModelVersionsInterface_Expecter { - return &MockModelVersionsInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockModelVersionsInterface) Delete(ctx context.Context, request catalog.DeleteModelVersionRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteModelVersionRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelVersionsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockModelVersionsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteModelVersionRequest -func (_e *MockModelVersionsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockModelVersionsInterface_Delete_Call { - return &MockModelVersionsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockModelVersionsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteModelVersionRequest)) *MockModelVersionsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteModelVersionRequest)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_Delete_Call) Return(_a0 error) *MockModelVersionsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelVersionsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteModelVersionRequest) error) *MockModelVersionsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByFullNameAndVersion provides a mock function with given fields: ctx, fullName, version -func (_m *MockModelVersionsInterface) DeleteByFullNameAndVersion(ctx context.Context, fullName string, version int) error { - ret := _m.Called(ctx, fullName, version) - - if len(ret) == 0 { - panic("no return value specified for DeleteByFullNameAndVersion") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, int) error); ok { - r0 = rf(ctx, fullName, version) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelVersionsInterface_DeleteByFullNameAndVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByFullNameAndVersion' -type MockModelVersionsInterface_DeleteByFullNameAndVersion_Call struct { - *mock.Call -} - -// DeleteByFullNameAndVersion is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -// - version int -func (_e *MockModelVersionsInterface_Expecter) DeleteByFullNameAndVersion(ctx interface{}, fullName interface{}, version interface{}) *MockModelVersionsInterface_DeleteByFullNameAndVersion_Call { - return &MockModelVersionsInterface_DeleteByFullNameAndVersion_Call{Call: _e.mock.On("DeleteByFullNameAndVersion", ctx, fullName, version)} -} - -func (_c *MockModelVersionsInterface_DeleteByFullNameAndVersion_Call) Run(run func(ctx context.Context, fullName string, version int)) *MockModelVersionsInterface_DeleteByFullNameAndVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(int)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_DeleteByFullNameAndVersion_Call) Return(_a0 error) *MockModelVersionsInterface_DeleteByFullNameAndVersion_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelVersionsInterface_DeleteByFullNameAndVersion_Call) RunAndReturn(run func(context.Context, string, int) error) *MockModelVersionsInterface_DeleteByFullNameAndVersion_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockModelVersionsInterface) Get(ctx context.Context, request catalog.GetModelVersionRequest) (*catalog.ModelVersionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.ModelVersionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetModelVersionRequest) (*catalog.ModelVersionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetModelVersionRequest) *catalog.ModelVersionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ModelVersionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetModelVersionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelVersionsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockModelVersionsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetModelVersionRequest -func (_e *MockModelVersionsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockModelVersionsInterface_Get_Call { - return &MockModelVersionsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockModelVersionsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetModelVersionRequest)) *MockModelVersionsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetModelVersionRequest)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_Get_Call) Return(_a0 *catalog.ModelVersionInfo, _a1 error) *MockModelVersionsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelVersionsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetModelVersionRequest) (*catalog.ModelVersionInfo, error)) *MockModelVersionsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByAlias provides a mock function with given fields: ctx, request -func (_m *MockModelVersionsInterface) GetByAlias(ctx context.Context, request catalog.GetByAliasRequest) (*catalog.ModelVersionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetByAlias") - } - - var r0 *catalog.ModelVersionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetByAliasRequest) (*catalog.ModelVersionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetByAliasRequest) *catalog.ModelVersionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ModelVersionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetByAliasRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelVersionsInterface_GetByAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByAlias' -type MockModelVersionsInterface_GetByAlias_Call struct { - *mock.Call -} - -// GetByAlias is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetByAliasRequest -func (_e *MockModelVersionsInterface_Expecter) GetByAlias(ctx interface{}, request interface{}) *MockModelVersionsInterface_GetByAlias_Call { - return &MockModelVersionsInterface_GetByAlias_Call{Call: _e.mock.On("GetByAlias", ctx, request)} -} - -func (_c *MockModelVersionsInterface_GetByAlias_Call) Run(run func(ctx context.Context, request catalog.GetByAliasRequest)) *MockModelVersionsInterface_GetByAlias_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetByAliasRequest)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_GetByAlias_Call) Return(_a0 *catalog.ModelVersionInfo, _a1 error) *MockModelVersionsInterface_GetByAlias_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelVersionsInterface_GetByAlias_Call) RunAndReturn(run func(context.Context, catalog.GetByAliasRequest) (*catalog.ModelVersionInfo, error)) *MockModelVersionsInterface_GetByAlias_Call { - _c.Call.Return(run) - return _c -} - -// GetByAliasByFullNameAndAlias provides a mock function with given fields: ctx, fullName, alias -func (_m *MockModelVersionsInterface) GetByAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) (*catalog.ModelVersionInfo, error) { - ret := _m.Called(ctx, fullName, alias) - - if len(ret) == 0 { - panic("no return value specified for GetByAliasByFullNameAndAlias") - } - - var r0 *catalog.ModelVersionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*catalog.ModelVersionInfo, error)); ok { - return rf(ctx, fullName, alias) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *catalog.ModelVersionInfo); ok { - r0 = rf(ctx, fullName, alias) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ModelVersionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, fullName, alias) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByAliasByFullNameAndAlias' -type MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call struct { - *mock.Call -} - -// GetByAliasByFullNameAndAlias is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -// - alias string -func (_e *MockModelVersionsInterface_Expecter) GetByAliasByFullNameAndAlias(ctx interface{}, fullName interface{}, alias interface{}) *MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call { - return &MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call{Call: _e.mock.On("GetByAliasByFullNameAndAlias", ctx, fullName, alias)} -} - -func (_c *MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call) Run(run func(ctx context.Context, fullName string, alias string)) *MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call) Return(_a0 *catalog.ModelVersionInfo, _a1 error) *MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call) RunAndReturn(run func(context.Context, string, string) (*catalog.ModelVersionInfo, error)) *MockModelVersionsInterface_GetByAliasByFullNameAndAlias_Call { - _c.Call.Return(run) - return _c -} - -// GetByFullNameAndVersion provides a mock function with given fields: ctx, fullName, version -func (_m *MockModelVersionsInterface) GetByFullNameAndVersion(ctx context.Context, fullName string, version int) (*catalog.ModelVersionInfo, error) { - ret := _m.Called(ctx, fullName, version) - - if len(ret) == 0 { - panic("no return value specified for GetByFullNameAndVersion") - } - - var r0 *catalog.ModelVersionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, int) (*catalog.ModelVersionInfo, error)); ok { - return rf(ctx, fullName, version) - } - if rf, ok := ret.Get(0).(func(context.Context, string, int) *catalog.ModelVersionInfo); ok { - r0 = rf(ctx, fullName, version) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ModelVersionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, int) error); ok { - r1 = rf(ctx, fullName, version) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelVersionsInterface_GetByFullNameAndVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFullNameAndVersion' -type MockModelVersionsInterface_GetByFullNameAndVersion_Call struct { - *mock.Call -} - -// GetByFullNameAndVersion is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -// - version int -func (_e *MockModelVersionsInterface_Expecter) GetByFullNameAndVersion(ctx interface{}, fullName interface{}, version interface{}) *MockModelVersionsInterface_GetByFullNameAndVersion_Call { - return &MockModelVersionsInterface_GetByFullNameAndVersion_Call{Call: _e.mock.On("GetByFullNameAndVersion", ctx, fullName, version)} -} - -func (_c *MockModelVersionsInterface_GetByFullNameAndVersion_Call) Run(run func(ctx context.Context, fullName string, version int)) *MockModelVersionsInterface_GetByFullNameAndVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(int)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_GetByFullNameAndVersion_Call) Return(_a0 *catalog.ModelVersionInfo, _a1 error) *MockModelVersionsInterface_GetByFullNameAndVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelVersionsInterface_GetByFullNameAndVersion_Call) RunAndReturn(run func(context.Context, string, int) (*catalog.ModelVersionInfo, error)) *MockModelVersionsInterface_GetByFullNameAndVersion_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockModelVersionsInterface) List(ctx context.Context, request catalog.ListModelVersionsRequest) listing.Iterator[catalog.ModelVersionInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.ModelVersionInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListModelVersionsRequest) listing.Iterator[catalog.ModelVersionInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.ModelVersionInfo]) - } - } - - return r0 -} - -// MockModelVersionsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockModelVersionsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListModelVersionsRequest -func (_e *MockModelVersionsInterface_Expecter) List(ctx interface{}, request interface{}) *MockModelVersionsInterface_List_Call { - return &MockModelVersionsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockModelVersionsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListModelVersionsRequest)) *MockModelVersionsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListModelVersionsRequest)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_List_Call) Return(_a0 listing.Iterator[catalog.ModelVersionInfo]) *MockModelVersionsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelVersionsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListModelVersionsRequest) listing.Iterator[catalog.ModelVersionInfo]) *MockModelVersionsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockModelVersionsInterface) ListAll(ctx context.Context, request catalog.ListModelVersionsRequest) ([]catalog.ModelVersionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.ModelVersionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListModelVersionsRequest) ([]catalog.ModelVersionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListModelVersionsRequest) []catalog.ModelVersionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.ModelVersionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListModelVersionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelVersionsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockModelVersionsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListModelVersionsRequest -func (_e *MockModelVersionsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockModelVersionsInterface_ListAll_Call { - return &MockModelVersionsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockModelVersionsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListModelVersionsRequest)) *MockModelVersionsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListModelVersionsRequest)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_ListAll_Call) Return(_a0 []catalog.ModelVersionInfo, _a1 error) *MockModelVersionsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelVersionsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListModelVersionsRequest) ([]catalog.ModelVersionInfo, error)) *MockModelVersionsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockModelVersionsInterface) ListByFullName(ctx context.Context, fullName string) (*catalog.ListModelVersionsResponse, error) { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for ListByFullName") - } - - var r0 *catalog.ListModelVersionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.ListModelVersionsResponse, error)); ok { - return rf(ctx, fullName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.ListModelVersionsResponse); ok { - r0 = rf(ctx, fullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ListModelVersionsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, fullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelVersionsInterface_ListByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByFullName' -type MockModelVersionsInterface_ListByFullName_Call struct { - *mock.Call -} - -// ListByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockModelVersionsInterface_Expecter) ListByFullName(ctx interface{}, fullName interface{}) *MockModelVersionsInterface_ListByFullName_Call { - return &MockModelVersionsInterface_ListByFullName_Call{Call: _e.mock.On("ListByFullName", ctx, fullName)} -} - -func (_c *MockModelVersionsInterface_ListByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockModelVersionsInterface_ListByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_ListByFullName_Call) Return(_a0 *catalog.ListModelVersionsResponse, _a1 error) *MockModelVersionsInterface_ListByFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelVersionsInterface_ListByFullName_Call) RunAndReturn(run func(context.Context, string) (*catalog.ListModelVersionsResponse, error)) *MockModelVersionsInterface_ListByFullName_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockModelVersionsInterface) Update(ctx context.Context, request catalog.UpdateModelVersionRequest) (*catalog.ModelVersionInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.ModelVersionInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateModelVersionRequest) (*catalog.ModelVersionInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateModelVersionRequest) *catalog.ModelVersionInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ModelVersionInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateModelVersionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelVersionsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockModelVersionsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateModelVersionRequest -func (_e *MockModelVersionsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockModelVersionsInterface_Update_Call { - return &MockModelVersionsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockModelVersionsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateModelVersionRequest)) *MockModelVersionsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateModelVersionRequest)) - }) - return _c -} - -func (_c *MockModelVersionsInterface_Update_Call) Return(_a0 *catalog.ModelVersionInfo, _a1 error) *MockModelVersionsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelVersionsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateModelVersionRequest) (*catalog.ModelVersionInfo, error)) *MockModelVersionsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockModelVersionsInterface creates a new instance of MockModelVersionsInterface. 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 NewMockModelVersionsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockModelVersionsInterface { - mock := &MockModelVersionsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_online_tables_interface.go b/experimental/mocks/service/catalog/mock_online_tables_interface.go deleted file mode 100644 index d49243937..000000000 --- a/experimental/mocks/service/catalog/mock_online_tables_interface.go +++ /dev/null @@ -1,448 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockOnlineTablesInterface is an autogenerated mock type for the OnlineTablesInterface type -type MockOnlineTablesInterface struct { - mock.Mock -} - -type MockOnlineTablesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockOnlineTablesInterface) EXPECT() *MockOnlineTablesInterface_Expecter { - return &MockOnlineTablesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, createOnlineTableRequest -func (_m *MockOnlineTablesInterface) Create(ctx context.Context, createOnlineTableRequest catalog.CreateOnlineTableRequest) (*catalog.WaitGetOnlineTableActive[catalog.OnlineTable], error) { - ret := _m.Called(ctx, createOnlineTableRequest) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.WaitGetOnlineTableActive[catalog.OnlineTable] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateOnlineTableRequest) (*catalog.WaitGetOnlineTableActive[catalog.OnlineTable], error)); ok { - return rf(ctx, createOnlineTableRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateOnlineTableRequest) *catalog.WaitGetOnlineTableActive[catalog.OnlineTable]); ok { - r0 = rf(ctx, createOnlineTableRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.WaitGetOnlineTableActive[catalog.OnlineTable]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateOnlineTableRequest) error); ok { - r1 = rf(ctx, createOnlineTableRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockOnlineTablesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockOnlineTablesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - createOnlineTableRequest catalog.CreateOnlineTableRequest -func (_e *MockOnlineTablesInterface_Expecter) Create(ctx interface{}, createOnlineTableRequest interface{}) *MockOnlineTablesInterface_Create_Call { - return &MockOnlineTablesInterface_Create_Call{Call: _e.mock.On("Create", ctx, createOnlineTableRequest)} -} - -func (_c *MockOnlineTablesInterface_Create_Call) Run(run func(ctx context.Context, createOnlineTableRequest catalog.CreateOnlineTableRequest)) *MockOnlineTablesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateOnlineTableRequest)) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_Create_Call) Return(_a0 *catalog.WaitGetOnlineTableActive[catalog.OnlineTable], _a1 error) *MockOnlineTablesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockOnlineTablesInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateOnlineTableRequest) (*catalog.WaitGetOnlineTableActive[catalog.OnlineTable], error)) *MockOnlineTablesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateAndWait provides a mock function with given fields: ctx, createOnlineTableRequest, options -func (_m *MockOnlineTablesInterface) CreateAndWait(ctx context.Context, createOnlineTableRequest catalog.CreateOnlineTableRequest, options ...retries.Option[catalog.OnlineTable]) (*catalog.OnlineTable, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createOnlineTableRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateAndWait") - } - - var r0 *catalog.OnlineTable - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateOnlineTableRequest, ...retries.Option[catalog.OnlineTable]) (*catalog.OnlineTable, error)); ok { - return rf(ctx, createOnlineTableRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateOnlineTableRequest, ...retries.Option[catalog.OnlineTable]) *catalog.OnlineTable); ok { - r0 = rf(ctx, createOnlineTableRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.OnlineTable) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateOnlineTableRequest, ...retries.Option[catalog.OnlineTable]) error); ok { - r1 = rf(ctx, createOnlineTableRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockOnlineTablesInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait' -type MockOnlineTablesInterface_CreateAndWait_Call struct { - *mock.Call -} - -// CreateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createOnlineTableRequest catalog.CreateOnlineTableRequest -// - options ...retries.Option[catalog.OnlineTable] -func (_e *MockOnlineTablesInterface_Expecter) CreateAndWait(ctx interface{}, createOnlineTableRequest interface{}, options ...interface{}) *MockOnlineTablesInterface_CreateAndWait_Call { - return &MockOnlineTablesInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait", - append([]interface{}{ctx, createOnlineTableRequest}, options...)...)} -} - -func (_c *MockOnlineTablesInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createOnlineTableRequest catalog.CreateOnlineTableRequest, options ...retries.Option[catalog.OnlineTable])) *MockOnlineTablesInterface_CreateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[catalog.OnlineTable], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[catalog.OnlineTable]) - } - } - run(args[0].(context.Context), args[1].(catalog.CreateOnlineTableRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_CreateAndWait_Call) Return(_a0 *catalog.OnlineTable, _a1 error) *MockOnlineTablesInterface_CreateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockOnlineTablesInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, catalog.CreateOnlineTableRequest, ...retries.Option[catalog.OnlineTable]) (*catalog.OnlineTable, error)) *MockOnlineTablesInterface_CreateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockOnlineTablesInterface) Delete(ctx context.Context, request catalog.DeleteOnlineTableRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteOnlineTableRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockOnlineTablesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockOnlineTablesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteOnlineTableRequest -func (_e *MockOnlineTablesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockOnlineTablesInterface_Delete_Call { - return &MockOnlineTablesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockOnlineTablesInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteOnlineTableRequest)) *MockOnlineTablesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteOnlineTableRequest)) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_Delete_Call) Return(_a0 error) *MockOnlineTablesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOnlineTablesInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteOnlineTableRequest) error) *MockOnlineTablesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockOnlineTablesInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockOnlineTablesInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockOnlineTablesInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockOnlineTablesInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockOnlineTablesInterface_DeleteByName_Call { - return &MockOnlineTablesInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockOnlineTablesInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockOnlineTablesInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_DeleteByName_Call) Return(_a0 error) *MockOnlineTablesInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOnlineTablesInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockOnlineTablesInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockOnlineTablesInterface) Get(ctx context.Context, request catalog.GetOnlineTableRequest) (*catalog.OnlineTable, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.OnlineTable - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetOnlineTableRequest) (*catalog.OnlineTable, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetOnlineTableRequest) *catalog.OnlineTable); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.OnlineTable) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetOnlineTableRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockOnlineTablesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockOnlineTablesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetOnlineTableRequest -func (_e *MockOnlineTablesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockOnlineTablesInterface_Get_Call { - return &MockOnlineTablesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockOnlineTablesInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetOnlineTableRequest)) *MockOnlineTablesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetOnlineTableRequest)) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_Get_Call) Return(_a0 *catalog.OnlineTable, _a1 error) *MockOnlineTablesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockOnlineTablesInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetOnlineTableRequest) (*catalog.OnlineTable, error)) *MockOnlineTablesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockOnlineTablesInterface) GetByName(ctx context.Context, name string) (*catalog.OnlineTable, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.OnlineTable - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.OnlineTable, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.OnlineTable); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.OnlineTable) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockOnlineTablesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockOnlineTablesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockOnlineTablesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockOnlineTablesInterface_GetByName_Call { - return &MockOnlineTablesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockOnlineTablesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockOnlineTablesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_GetByName_Call) Return(_a0 *catalog.OnlineTable, _a1 error) *MockOnlineTablesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockOnlineTablesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.OnlineTable, error)) *MockOnlineTablesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetOnlineTableActive provides a mock function with given fields: ctx, name, timeout, callback -func (_m *MockOnlineTablesInterface) WaitGetOnlineTableActive(ctx context.Context, name string, timeout time.Duration, callback func(*catalog.OnlineTable)) (*catalog.OnlineTable, error) { - ret := _m.Called(ctx, name, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetOnlineTableActive") - } - - var r0 *catalog.OnlineTable - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*catalog.OnlineTable)) (*catalog.OnlineTable, error)); ok { - return rf(ctx, name, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*catalog.OnlineTable)) *catalog.OnlineTable); ok { - r0 = rf(ctx, name, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.OnlineTable) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*catalog.OnlineTable)) error); ok { - r1 = rf(ctx, name, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockOnlineTablesInterface_WaitGetOnlineTableActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetOnlineTableActive' -type MockOnlineTablesInterface_WaitGetOnlineTableActive_Call struct { - *mock.Call -} - -// WaitGetOnlineTableActive is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - timeout time.Duration -// - callback func(*catalog.OnlineTable) -func (_e *MockOnlineTablesInterface_Expecter) WaitGetOnlineTableActive(ctx interface{}, name interface{}, timeout interface{}, callback interface{}) *MockOnlineTablesInterface_WaitGetOnlineTableActive_Call { - return &MockOnlineTablesInterface_WaitGetOnlineTableActive_Call{Call: _e.mock.On("WaitGetOnlineTableActive", ctx, name, timeout, callback)} -} - -func (_c *MockOnlineTablesInterface_WaitGetOnlineTableActive_Call) Run(run func(ctx context.Context, name string, timeout time.Duration, callback func(*catalog.OnlineTable))) *MockOnlineTablesInterface_WaitGetOnlineTableActive_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*catalog.OnlineTable))) - }) - return _c -} - -func (_c *MockOnlineTablesInterface_WaitGetOnlineTableActive_Call) Return(_a0 *catalog.OnlineTable, _a1 error) *MockOnlineTablesInterface_WaitGetOnlineTableActive_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockOnlineTablesInterface_WaitGetOnlineTableActive_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*catalog.OnlineTable)) (*catalog.OnlineTable, error)) *MockOnlineTablesInterface_WaitGetOnlineTableActive_Call { - _c.Call.Return(run) - return _c -} - -// NewMockOnlineTablesInterface creates a new instance of MockOnlineTablesInterface. 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 NewMockOnlineTablesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockOnlineTablesInterface { - mock := &MockOnlineTablesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_quality_monitors_interface.go b/experimental/mocks/service/catalog/mock_quality_monitors_interface.go deleted file mode 100644 index bd884c703..000000000 --- a/experimental/mocks/service/catalog/mock_quality_monitors_interface.go +++ /dev/null @@ -1,770 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - mock "github.com/stretchr/testify/mock" -) - -// MockQualityMonitorsInterface is an autogenerated mock type for the QualityMonitorsInterface type -type MockQualityMonitorsInterface struct { - mock.Mock -} - -type MockQualityMonitorsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockQualityMonitorsInterface) EXPECT() *MockQualityMonitorsInterface_Expecter { - return &MockQualityMonitorsInterface_Expecter{mock: &_m.Mock} -} - -// CancelRefresh provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) CancelRefresh(ctx context.Context, request catalog.CancelRefreshRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CancelRefresh") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CancelRefreshRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQualityMonitorsInterface_CancelRefresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRefresh' -type MockQualityMonitorsInterface_CancelRefresh_Call struct { - *mock.Call -} - -// CancelRefresh is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CancelRefreshRequest -func (_e *MockQualityMonitorsInterface_Expecter) CancelRefresh(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_CancelRefresh_Call { - return &MockQualityMonitorsInterface_CancelRefresh_Call{Call: _e.mock.On("CancelRefresh", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_CancelRefresh_Call) Run(run func(ctx context.Context, request catalog.CancelRefreshRequest)) *MockQualityMonitorsInterface_CancelRefresh_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CancelRefreshRequest)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_CancelRefresh_Call) Return(_a0 error) *MockQualityMonitorsInterface_CancelRefresh_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQualityMonitorsInterface_CancelRefresh_Call) RunAndReturn(run func(context.Context, catalog.CancelRefreshRequest) error) *MockQualityMonitorsInterface_CancelRefresh_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) Create(ctx context.Context, request catalog.CreateMonitor) (*catalog.MonitorInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.MonitorInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateMonitor) (*catalog.MonitorInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateMonitor) *catalog.MonitorInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateMonitor) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockQualityMonitorsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateMonitor -func (_e *MockQualityMonitorsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_Create_Call { - return &MockQualityMonitorsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateMonitor)) *MockQualityMonitorsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateMonitor)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_Create_Call) Return(_a0 *catalog.MonitorInfo, _a1 error) *MockQualityMonitorsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateMonitor) (*catalog.MonitorInfo, error)) *MockQualityMonitorsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) Delete(ctx context.Context, request catalog.DeleteQualityMonitorRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteQualityMonitorRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQualityMonitorsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockQualityMonitorsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteQualityMonitorRequest -func (_e *MockQualityMonitorsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_Delete_Call { - return &MockQualityMonitorsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteQualityMonitorRequest)) *MockQualityMonitorsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteQualityMonitorRequest)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_Delete_Call) Return(_a0 error) *MockQualityMonitorsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQualityMonitorsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteQualityMonitorRequest) error) *MockQualityMonitorsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByTableName provides a mock function with given fields: ctx, tableName -func (_m *MockQualityMonitorsInterface) DeleteByTableName(ctx context.Context, tableName string) error { - ret := _m.Called(ctx, tableName) - - if len(ret) == 0 { - panic("no return value specified for DeleteByTableName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, tableName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQualityMonitorsInterface_DeleteByTableName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByTableName' -type MockQualityMonitorsInterface_DeleteByTableName_Call struct { - *mock.Call -} - -// DeleteByTableName is a helper method to define mock.On call -// - ctx context.Context -// - tableName string -func (_e *MockQualityMonitorsInterface_Expecter) DeleteByTableName(ctx interface{}, tableName interface{}) *MockQualityMonitorsInterface_DeleteByTableName_Call { - return &MockQualityMonitorsInterface_DeleteByTableName_Call{Call: _e.mock.On("DeleteByTableName", ctx, tableName)} -} - -func (_c *MockQualityMonitorsInterface_DeleteByTableName_Call) Run(run func(ctx context.Context, tableName string)) *MockQualityMonitorsInterface_DeleteByTableName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_DeleteByTableName_Call) Return(_a0 error) *MockQualityMonitorsInterface_DeleteByTableName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQualityMonitorsInterface_DeleteByTableName_Call) RunAndReturn(run func(context.Context, string) error) *MockQualityMonitorsInterface_DeleteByTableName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) Get(ctx context.Context, request catalog.GetQualityMonitorRequest) (*catalog.MonitorInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.MonitorInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetQualityMonitorRequest) (*catalog.MonitorInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetQualityMonitorRequest) *catalog.MonitorInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetQualityMonitorRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockQualityMonitorsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetQualityMonitorRequest -func (_e *MockQualityMonitorsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_Get_Call { - return &MockQualityMonitorsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetQualityMonitorRequest)) *MockQualityMonitorsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetQualityMonitorRequest)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_Get_Call) Return(_a0 *catalog.MonitorInfo, _a1 error) *MockQualityMonitorsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetQualityMonitorRequest) (*catalog.MonitorInfo, error)) *MockQualityMonitorsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByTableName provides a mock function with given fields: ctx, tableName -func (_m *MockQualityMonitorsInterface) GetByTableName(ctx context.Context, tableName string) (*catalog.MonitorInfo, error) { - ret := _m.Called(ctx, tableName) - - if len(ret) == 0 { - panic("no return value specified for GetByTableName") - } - - var r0 *catalog.MonitorInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.MonitorInfo, error)); ok { - return rf(ctx, tableName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.MonitorInfo); ok { - r0 = rf(ctx, tableName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, tableName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_GetByTableName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByTableName' -type MockQualityMonitorsInterface_GetByTableName_Call struct { - *mock.Call -} - -// GetByTableName is a helper method to define mock.On call -// - ctx context.Context -// - tableName string -func (_e *MockQualityMonitorsInterface_Expecter) GetByTableName(ctx interface{}, tableName interface{}) *MockQualityMonitorsInterface_GetByTableName_Call { - return &MockQualityMonitorsInterface_GetByTableName_Call{Call: _e.mock.On("GetByTableName", ctx, tableName)} -} - -func (_c *MockQualityMonitorsInterface_GetByTableName_Call) Run(run func(ctx context.Context, tableName string)) *MockQualityMonitorsInterface_GetByTableName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_GetByTableName_Call) Return(_a0 *catalog.MonitorInfo, _a1 error) *MockQualityMonitorsInterface_GetByTableName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_GetByTableName_Call) RunAndReturn(run func(context.Context, string) (*catalog.MonitorInfo, error)) *MockQualityMonitorsInterface_GetByTableName_Call { - _c.Call.Return(run) - return _c -} - -// GetRefresh provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) GetRefresh(ctx context.Context, request catalog.GetRefreshRequest) (*catalog.MonitorRefreshInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetRefresh") - } - - var r0 *catalog.MonitorRefreshInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetRefreshRequest) (*catalog.MonitorRefreshInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetRefreshRequest) *catalog.MonitorRefreshInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorRefreshInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetRefreshRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_GetRefresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRefresh' -type MockQualityMonitorsInterface_GetRefresh_Call struct { - *mock.Call -} - -// GetRefresh is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetRefreshRequest -func (_e *MockQualityMonitorsInterface_Expecter) GetRefresh(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_GetRefresh_Call { - return &MockQualityMonitorsInterface_GetRefresh_Call{Call: _e.mock.On("GetRefresh", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_GetRefresh_Call) Run(run func(ctx context.Context, request catalog.GetRefreshRequest)) *MockQualityMonitorsInterface_GetRefresh_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetRefreshRequest)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_GetRefresh_Call) Return(_a0 *catalog.MonitorRefreshInfo, _a1 error) *MockQualityMonitorsInterface_GetRefresh_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_GetRefresh_Call) RunAndReturn(run func(context.Context, catalog.GetRefreshRequest) (*catalog.MonitorRefreshInfo, error)) *MockQualityMonitorsInterface_GetRefresh_Call { - _c.Call.Return(run) - return _c -} - -// GetRefreshByTableNameAndRefreshId provides a mock function with given fields: ctx, tableName, refreshId -func (_m *MockQualityMonitorsInterface) GetRefreshByTableNameAndRefreshId(ctx context.Context, tableName string, refreshId string) (*catalog.MonitorRefreshInfo, error) { - ret := _m.Called(ctx, tableName, refreshId) - - if len(ret) == 0 { - panic("no return value specified for GetRefreshByTableNameAndRefreshId") - } - - var r0 *catalog.MonitorRefreshInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*catalog.MonitorRefreshInfo, error)); ok { - return rf(ctx, tableName, refreshId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *catalog.MonitorRefreshInfo); ok { - r0 = rf(ctx, tableName, refreshId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorRefreshInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, tableName, refreshId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRefreshByTableNameAndRefreshId' -type MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call struct { - *mock.Call -} - -// GetRefreshByTableNameAndRefreshId is a helper method to define mock.On call -// - ctx context.Context -// - tableName string -// - refreshId string -func (_e *MockQualityMonitorsInterface_Expecter) GetRefreshByTableNameAndRefreshId(ctx interface{}, tableName interface{}, refreshId interface{}) *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call { - return &MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call{Call: _e.mock.On("GetRefreshByTableNameAndRefreshId", ctx, tableName, refreshId)} -} - -func (_c *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call) Run(run func(ctx context.Context, tableName string, refreshId string)) *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call) Return(_a0 *catalog.MonitorRefreshInfo, _a1 error) *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call) RunAndReturn(run func(context.Context, string, string) (*catalog.MonitorRefreshInfo, error)) *MockQualityMonitorsInterface_GetRefreshByTableNameAndRefreshId_Call { - _c.Call.Return(run) - return _c -} - -// ListRefreshes provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) ListRefreshes(ctx context.Context, request catalog.ListRefreshesRequest) (*catalog.MonitorRefreshListResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListRefreshes") - } - - var r0 *catalog.MonitorRefreshListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListRefreshesRequest) (*catalog.MonitorRefreshListResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListRefreshesRequest) *catalog.MonitorRefreshListResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorRefreshListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListRefreshesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_ListRefreshes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRefreshes' -type MockQualityMonitorsInterface_ListRefreshes_Call struct { - *mock.Call -} - -// ListRefreshes is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListRefreshesRequest -func (_e *MockQualityMonitorsInterface_Expecter) ListRefreshes(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_ListRefreshes_Call { - return &MockQualityMonitorsInterface_ListRefreshes_Call{Call: _e.mock.On("ListRefreshes", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_ListRefreshes_Call) Run(run func(ctx context.Context, request catalog.ListRefreshesRequest)) *MockQualityMonitorsInterface_ListRefreshes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListRefreshesRequest)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_ListRefreshes_Call) Return(_a0 *catalog.MonitorRefreshListResponse, _a1 error) *MockQualityMonitorsInterface_ListRefreshes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_ListRefreshes_Call) RunAndReturn(run func(context.Context, catalog.ListRefreshesRequest) (*catalog.MonitorRefreshListResponse, error)) *MockQualityMonitorsInterface_ListRefreshes_Call { - _c.Call.Return(run) - return _c -} - -// ListRefreshesByTableName provides a mock function with given fields: ctx, tableName -func (_m *MockQualityMonitorsInterface) ListRefreshesByTableName(ctx context.Context, tableName string) (*catalog.MonitorRefreshListResponse, error) { - ret := _m.Called(ctx, tableName) - - if len(ret) == 0 { - panic("no return value specified for ListRefreshesByTableName") - } - - var r0 *catalog.MonitorRefreshListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.MonitorRefreshListResponse, error)); ok { - return rf(ctx, tableName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.MonitorRefreshListResponse); ok { - r0 = rf(ctx, tableName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorRefreshListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, tableName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_ListRefreshesByTableName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRefreshesByTableName' -type MockQualityMonitorsInterface_ListRefreshesByTableName_Call struct { - *mock.Call -} - -// ListRefreshesByTableName is a helper method to define mock.On call -// - ctx context.Context -// - tableName string -func (_e *MockQualityMonitorsInterface_Expecter) ListRefreshesByTableName(ctx interface{}, tableName interface{}) *MockQualityMonitorsInterface_ListRefreshesByTableName_Call { - return &MockQualityMonitorsInterface_ListRefreshesByTableName_Call{Call: _e.mock.On("ListRefreshesByTableName", ctx, tableName)} -} - -func (_c *MockQualityMonitorsInterface_ListRefreshesByTableName_Call) Run(run func(ctx context.Context, tableName string)) *MockQualityMonitorsInterface_ListRefreshesByTableName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_ListRefreshesByTableName_Call) Return(_a0 *catalog.MonitorRefreshListResponse, _a1 error) *MockQualityMonitorsInterface_ListRefreshesByTableName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_ListRefreshesByTableName_Call) RunAndReturn(run func(context.Context, string) (*catalog.MonitorRefreshListResponse, error)) *MockQualityMonitorsInterface_ListRefreshesByTableName_Call { - _c.Call.Return(run) - return _c -} - -// RegenerateDashboard provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) RegenerateDashboard(ctx context.Context, request catalog.RegenerateDashboardRequest) (*catalog.RegenerateDashboardResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RegenerateDashboard") - } - - var r0 *catalog.RegenerateDashboardResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.RegenerateDashboardRequest) (*catalog.RegenerateDashboardResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.RegenerateDashboardRequest) *catalog.RegenerateDashboardResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.RegenerateDashboardResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.RegenerateDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_RegenerateDashboard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegenerateDashboard' -type MockQualityMonitorsInterface_RegenerateDashboard_Call struct { - *mock.Call -} - -// RegenerateDashboard is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.RegenerateDashboardRequest -func (_e *MockQualityMonitorsInterface_Expecter) RegenerateDashboard(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_RegenerateDashboard_Call { - return &MockQualityMonitorsInterface_RegenerateDashboard_Call{Call: _e.mock.On("RegenerateDashboard", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_RegenerateDashboard_Call) Run(run func(ctx context.Context, request catalog.RegenerateDashboardRequest)) *MockQualityMonitorsInterface_RegenerateDashboard_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.RegenerateDashboardRequest)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_RegenerateDashboard_Call) Return(_a0 *catalog.RegenerateDashboardResponse, _a1 error) *MockQualityMonitorsInterface_RegenerateDashboard_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_RegenerateDashboard_Call) RunAndReturn(run func(context.Context, catalog.RegenerateDashboardRequest) (*catalog.RegenerateDashboardResponse, error)) *MockQualityMonitorsInterface_RegenerateDashboard_Call { - _c.Call.Return(run) - return _c -} - -// RunRefresh provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) RunRefresh(ctx context.Context, request catalog.RunRefreshRequest) (*catalog.MonitorRefreshInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RunRefresh") - } - - var r0 *catalog.MonitorRefreshInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.RunRefreshRequest) (*catalog.MonitorRefreshInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.RunRefreshRequest) *catalog.MonitorRefreshInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorRefreshInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.RunRefreshRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_RunRefresh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunRefresh' -type MockQualityMonitorsInterface_RunRefresh_Call struct { - *mock.Call -} - -// RunRefresh is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.RunRefreshRequest -func (_e *MockQualityMonitorsInterface_Expecter) RunRefresh(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_RunRefresh_Call { - return &MockQualityMonitorsInterface_RunRefresh_Call{Call: _e.mock.On("RunRefresh", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_RunRefresh_Call) Run(run func(ctx context.Context, request catalog.RunRefreshRequest)) *MockQualityMonitorsInterface_RunRefresh_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.RunRefreshRequest)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_RunRefresh_Call) Return(_a0 *catalog.MonitorRefreshInfo, _a1 error) *MockQualityMonitorsInterface_RunRefresh_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_RunRefresh_Call) RunAndReturn(run func(context.Context, catalog.RunRefreshRequest) (*catalog.MonitorRefreshInfo, error)) *MockQualityMonitorsInterface_RunRefresh_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockQualityMonitorsInterface) Update(ctx context.Context, request catalog.UpdateMonitor) (*catalog.MonitorInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.MonitorInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateMonitor) (*catalog.MonitorInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateMonitor) *catalog.MonitorInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.MonitorInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateMonitor) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQualityMonitorsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockQualityMonitorsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateMonitor -func (_e *MockQualityMonitorsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockQualityMonitorsInterface_Update_Call { - return &MockQualityMonitorsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockQualityMonitorsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateMonitor)) *MockQualityMonitorsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateMonitor)) - }) - return _c -} - -func (_c *MockQualityMonitorsInterface_Update_Call) Return(_a0 *catalog.MonitorInfo, _a1 error) *MockQualityMonitorsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQualityMonitorsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateMonitor) (*catalog.MonitorInfo, error)) *MockQualityMonitorsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockQualityMonitorsInterface creates a new instance of MockQualityMonitorsInterface. 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 NewMockQualityMonitorsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockQualityMonitorsInterface { - mock := &MockQualityMonitorsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_registered_models_interface.go b/experimental/mocks/service/catalog/mock_registered_models_interface.go deleted file mode 100644 index 025d71d85..000000000 --- a/experimental/mocks/service/catalog/mock_registered_models_interface.go +++ /dev/null @@ -1,750 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockRegisteredModelsInterface is an autogenerated mock type for the RegisteredModelsInterface type -type MockRegisteredModelsInterface struct { - mock.Mock -} - -type MockRegisteredModelsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockRegisteredModelsInterface) EXPECT() *MockRegisteredModelsInterface_Expecter { - return &MockRegisteredModelsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) Create(ctx context.Context, request catalog.CreateRegisteredModelRequest) (*catalog.RegisteredModelInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.RegisteredModelInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateRegisteredModelRequest) (*catalog.RegisteredModelInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateRegisteredModelRequest) *catalog.RegisteredModelInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.RegisteredModelInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateRegisteredModelRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockRegisteredModelsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateRegisteredModelRequest -func (_e *MockRegisteredModelsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_Create_Call { - return &MockRegisteredModelsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateRegisteredModelRequest)) *MockRegisteredModelsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateRegisteredModelRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_Create_Call) Return(_a0 *catalog.RegisteredModelInfo, _a1 error) *MockRegisteredModelsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateRegisteredModelRequest) (*catalog.RegisteredModelInfo, error)) *MockRegisteredModelsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) Delete(ctx context.Context, request catalog.DeleteRegisteredModelRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteRegisteredModelRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRegisteredModelsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockRegisteredModelsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteRegisteredModelRequest -func (_e *MockRegisteredModelsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_Delete_Call { - return &MockRegisteredModelsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteRegisteredModelRequest)) *MockRegisteredModelsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteRegisteredModelRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_Delete_Call) Return(_a0 error) *MockRegisteredModelsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRegisteredModelsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteRegisteredModelRequest) error) *MockRegisteredModelsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteAlias provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) DeleteAlias(ctx context.Context, request catalog.DeleteAliasRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteAlias") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteAliasRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRegisteredModelsInterface_DeleteAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAlias' -type MockRegisteredModelsInterface_DeleteAlias_Call struct { - *mock.Call -} - -// DeleteAlias is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteAliasRequest -func (_e *MockRegisteredModelsInterface_Expecter) DeleteAlias(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_DeleteAlias_Call { - return &MockRegisteredModelsInterface_DeleteAlias_Call{Call: _e.mock.On("DeleteAlias", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_DeleteAlias_Call) Run(run func(ctx context.Context, request catalog.DeleteAliasRequest)) *MockRegisteredModelsInterface_DeleteAlias_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteAliasRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_DeleteAlias_Call) Return(_a0 error) *MockRegisteredModelsInterface_DeleteAlias_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRegisteredModelsInterface_DeleteAlias_Call) RunAndReturn(run func(context.Context, catalog.DeleteAliasRequest) error) *MockRegisteredModelsInterface_DeleteAlias_Call { - _c.Call.Return(run) - return _c -} - -// DeleteAliasByFullNameAndAlias provides a mock function with given fields: ctx, fullName, alias -func (_m *MockRegisteredModelsInterface) DeleteAliasByFullNameAndAlias(ctx context.Context, fullName string, alias string) error { - ret := _m.Called(ctx, fullName, alias) - - if len(ret) == 0 { - panic("no return value specified for DeleteAliasByFullNameAndAlias") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, fullName, alias) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAliasByFullNameAndAlias' -type MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call struct { - *mock.Call -} - -// DeleteAliasByFullNameAndAlias is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -// - alias string -func (_e *MockRegisteredModelsInterface_Expecter) DeleteAliasByFullNameAndAlias(ctx interface{}, fullName interface{}, alias interface{}) *MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call { - return &MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call{Call: _e.mock.On("DeleteAliasByFullNameAndAlias", ctx, fullName, alias)} -} - -func (_c *MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call) Run(run func(ctx context.Context, fullName string, alias string)) *MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call) Return(_a0 error) *MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call) RunAndReturn(run func(context.Context, string, string) error) *MockRegisteredModelsInterface_DeleteAliasByFullNameAndAlias_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockRegisteredModelsInterface) DeleteByFullName(ctx context.Context, fullName string) error { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for DeleteByFullName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, fullName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRegisteredModelsInterface_DeleteByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByFullName' -type MockRegisteredModelsInterface_DeleteByFullName_Call struct { - *mock.Call -} - -// DeleteByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockRegisteredModelsInterface_Expecter) DeleteByFullName(ctx interface{}, fullName interface{}) *MockRegisteredModelsInterface_DeleteByFullName_Call { - return &MockRegisteredModelsInterface_DeleteByFullName_Call{Call: _e.mock.On("DeleteByFullName", ctx, fullName)} -} - -func (_c *MockRegisteredModelsInterface_DeleteByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockRegisteredModelsInterface_DeleteByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_DeleteByFullName_Call) Return(_a0 error) *MockRegisteredModelsInterface_DeleteByFullName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRegisteredModelsInterface_DeleteByFullName_Call) RunAndReturn(run func(context.Context, string) error) *MockRegisteredModelsInterface_DeleteByFullName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) Get(ctx context.Context, request catalog.GetRegisteredModelRequest) (*catalog.RegisteredModelInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.RegisteredModelInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetRegisteredModelRequest) (*catalog.RegisteredModelInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetRegisteredModelRequest) *catalog.RegisteredModelInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.RegisteredModelInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetRegisteredModelRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockRegisteredModelsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetRegisteredModelRequest -func (_e *MockRegisteredModelsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_Get_Call { - return &MockRegisteredModelsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetRegisteredModelRequest)) *MockRegisteredModelsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetRegisteredModelRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_Get_Call) Return(_a0 *catalog.RegisteredModelInfo, _a1 error) *MockRegisteredModelsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetRegisteredModelRequest) (*catalog.RegisteredModelInfo, error)) *MockRegisteredModelsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockRegisteredModelsInterface) GetByFullName(ctx context.Context, fullName string) (*catalog.RegisteredModelInfo, error) { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for GetByFullName") - } - - var r0 *catalog.RegisteredModelInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.RegisteredModelInfo, error)); ok { - return rf(ctx, fullName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.RegisteredModelInfo); ok { - r0 = rf(ctx, fullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.RegisteredModelInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, fullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_GetByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFullName' -type MockRegisteredModelsInterface_GetByFullName_Call struct { - *mock.Call -} - -// GetByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockRegisteredModelsInterface_Expecter) GetByFullName(ctx interface{}, fullName interface{}) *MockRegisteredModelsInterface_GetByFullName_Call { - return &MockRegisteredModelsInterface_GetByFullName_Call{Call: _e.mock.On("GetByFullName", ctx, fullName)} -} - -func (_c *MockRegisteredModelsInterface_GetByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockRegisteredModelsInterface_GetByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_GetByFullName_Call) Return(_a0 *catalog.RegisteredModelInfo, _a1 error) *MockRegisteredModelsInterface_GetByFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_GetByFullName_Call) RunAndReturn(run func(context.Context, string) (*catalog.RegisteredModelInfo, error)) *MockRegisteredModelsInterface_GetByFullName_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockRegisteredModelsInterface) GetByName(ctx context.Context, name string) (*catalog.RegisteredModelInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.RegisteredModelInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.RegisteredModelInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.RegisteredModelInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.RegisteredModelInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockRegisteredModelsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockRegisteredModelsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockRegisteredModelsInterface_GetByName_Call { - return &MockRegisteredModelsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockRegisteredModelsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockRegisteredModelsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_GetByName_Call) Return(_a0 *catalog.RegisteredModelInfo, _a1 error) *MockRegisteredModelsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.RegisteredModelInfo, error)) *MockRegisteredModelsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) List(ctx context.Context, request catalog.ListRegisteredModelsRequest) listing.Iterator[catalog.RegisteredModelInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.RegisteredModelInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListRegisteredModelsRequest) listing.Iterator[catalog.RegisteredModelInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.RegisteredModelInfo]) - } - } - - return r0 -} - -// MockRegisteredModelsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockRegisteredModelsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListRegisteredModelsRequest -func (_e *MockRegisteredModelsInterface_Expecter) List(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_List_Call { - return &MockRegisteredModelsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListRegisteredModelsRequest)) *MockRegisteredModelsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListRegisteredModelsRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_List_Call) Return(_a0 listing.Iterator[catalog.RegisteredModelInfo]) *MockRegisteredModelsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRegisteredModelsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListRegisteredModelsRequest) listing.Iterator[catalog.RegisteredModelInfo]) *MockRegisteredModelsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) ListAll(ctx context.Context, request catalog.ListRegisteredModelsRequest) ([]catalog.RegisteredModelInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.RegisteredModelInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListRegisteredModelsRequest) ([]catalog.RegisteredModelInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListRegisteredModelsRequest) []catalog.RegisteredModelInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.RegisteredModelInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListRegisteredModelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockRegisteredModelsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListRegisteredModelsRequest -func (_e *MockRegisteredModelsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_ListAll_Call { - return &MockRegisteredModelsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListRegisteredModelsRequest)) *MockRegisteredModelsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListRegisteredModelsRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_ListAll_Call) Return(_a0 []catalog.RegisteredModelInfo, _a1 error) *MockRegisteredModelsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListRegisteredModelsRequest) ([]catalog.RegisteredModelInfo, error)) *MockRegisteredModelsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// RegisteredModelInfoNameToFullNameMap provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) RegisteredModelInfoNameToFullNameMap(ctx context.Context, request catalog.ListRegisteredModelsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RegisteredModelInfoNameToFullNameMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListRegisteredModelsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListRegisteredModelsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListRegisteredModelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisteredModelInfoNameToFullNameMap' -type MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call struct { - *mock.Call -} - -// RegisteredModelInfoNameToFullNameMap is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListRegisteredModelsRequest -func (_e *MockRegisteredModelsInterface_Expecter) RegisteredModelInfoNameToFullNameMap(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call { - return &MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call{Call: _e.mock.On("RegisteredModelInfoNameToFullNameMap", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call) Run(run func(ctx context.Context, request catalog.ListRegisteredModelsRequest)) *MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListRegisteredModelsRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call) Return(_a0 map[string]string, _a1 error) *MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call) RunAndReturn(run func(context.Context, catalog.ListRegisteredModelsRequest) (map[string]string, error)) *MockRegisteredModelsInterface_RegisteredModelInfoNameToFullNameMap_Call { - _c.Call.Return(run) - return _c -} - -// SetAlias provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) SetAlias(ctx context.Context, request catalog.SetRegisteredModelAliasRequest) (*catalog.RegisteredModelAlias, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetAlias") - } - - var r0 *catalog.RegisteredModelAlias - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.SetRegisteredModelAliasRequest) (*catalog.RegisteredModelAlias, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.SetRegisteredModelAliasRequest) *catalog.RegisteredModelAlias); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.RegisteredModelAlias) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.SetRegisteredModelAliasRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_SetAlias_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAlias' -type MockRegisteredModelsInterface_SetAlias_Call struct { - *mock.Call -} - -// SetAlias is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.SetRegisteredModelAliasRequest -func (_e *MockRegisteredModelsInterface_Expecter) SetAlias(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_SetAlias_Call { - return &MockRegisteredModelsInterface_SetAlias_Call{Call: _e.mock.On("SetAlias", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_SetAlias_Call) Run(run func(ctx context.Context, request catalog.SetRegisteredModelAliasRequest)) *MockRegisteredModelsInterface_SetAlias_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.SetRegisteredModelAliasRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_SetAlias_Call) Return(_a0 *catalog.RegisteredModelAlias, _a1 error) *MockRegisteredModelsInterface_SetAlias_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_SetAlias_Call) RunAndReturn(run func(context.Context, catalog.SetRegisteredModelAliasRequest) (*catalog.RegisteredModelAlias, error)) *MockRegisteredModelsInterface_SetAlias_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockRegisteredModelsInterface) Update(ctx context.Context, request catalog.UpdateRegisteredModelRequest) (*catalog.RegisteredModelInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.RegisteredModelInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateRegisteredModelRequest) (*catalog.RegisteredModelInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateRegisteredModelRequest) *catalog.RegisteredModelInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.RegisteredModelInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateRegisteredModelRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRegisteredModelsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockRegisteredModelsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateRegisteredModelRequest -func (_e *MockRegisteredModelsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockRegisteredModelsInterface_Update_Call { - return &MockRegisteredModelsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockRegisteredModelsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateRegisteredModelRequest)) *MockRegisteredModelsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateRegisteredModelRequest)) - }) - return _c -} - -func (_c *MockRegisteredModelsInterface_Update_Call) Return(_a0 *catalog.RegisteredModelInfo, _a1 error) *MockRegisteredModelsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRegisteredModelsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateRegisteredModelRequest) (*catalog.RegisteredModelInfo, error)) *MockRegisteredModelsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockRegisteredModelsInterface creates a new instance of MockRegisteredModelsInterface. 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 NewMockRegisteredModelsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockRegisteredModelsInterface { - mock := &MockRegisteredModelsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_resource_quotas_interface.go b/experimental/mocks/service/catalog/mock_resource_quotas_interface.go deleted file mode 100644 index b25aab962..000000000 --- a/experimental/mocks/service/catalog/mock_resource_quotas_interface.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockResourceQuotasInterface is an autogenerated mock type for the ResourceQuotasInterface type -type MockResourceQuotasInterface struct { - mock.Mock -} - -type MockResourceQuotasInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockResourceQuotasInterface) EXPECT() *MockResourceQuotasInterface_Expecter { - return &MockResourceQuotasInterface_Expecter{mock: &_m.Mock} -} - -// GetQuota provides a mock function with given fields: ctx, request -func (_m *MockResourceQuotasInterface) GetQuota(ctx context.Context, request catalog.GetQuotaRequest) (*catalog.GetQuotaResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetQuota") - } - - var r0 *catalog.GetQuotaResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetQuotaRequest) (*catalog.GetQuotaResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetQuotaRequest) *catalog.GetQuotaResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.GetQuotaResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetQuotaRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockResourceQuotasInterface_GetQuota_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuota' -type MockResourceQuotasInterface_GetQuota_Call struct { - *mock.Call -} - -// GetQuota is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetQuotaRequest -func (_e *MockResourceQuotasInterface_Expecter) GetQuota(ctx interface{}, request interface{}) *MockResourceQuotasInterface_GetQuota_Call { - return &MockResourceQuotasInterface_GetQuota_Call{Call: _e.mock.On("GetQuota", ctx, request)} -} - -func (_c *MockResourceQuotasInterface_GetQuota_Call) Run(run func(ctx context.Context, request catalog.GetQuotaRequest)) *MockResourceQuotasInterface_GetQuota_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetQuotaRequest)) - }) - return _c -} - -func (_c *MockResourceQuotasInterface_GetQuota_Call) Return(_a0 *catalog.GetQuotaResponse, _a1 error) *MockResourceQuotasInterface_GetQuota_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockResourceQuotasInterface_GetQuota_Call) RunAndReturn(run func(context.Context, catalog.GetQuotaRequest) (*catalog.GetQuotaResponse, error)) *MockResourceQuotasInterface_GetQuota_Call { - _c.Call.Return(run) - return _c -} - -// GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName provides a mock function with given fields: ctx, parentSecurableType, parentFullName, quotaName -func (_m *MockResourceQuotasInterface) GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName(ctx context.Context, parentSecurableType string, parentFullName string, quotaName string) (*catalog.GetQuotaResponse, error) { - ret := _m.Called(ctx, parentSecurableType, parentFullName, quotaName) - - if len(ret) == 0 { - panic("no return value specified for GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName") - } - - var r0 *catalog.GetQuotaResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*catalog.GetQuotaResponse, error)); ok { - return rf(ctx, parentSecurableType, parentFullName, quotaName) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *catalog.GetQuotaResponse); ok { - r0 = rf(ctx, parentSecurableType, parentFullName, quotaName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.GetQuotaResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, parentSecurableType, parentFullName, quotaName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName' -type MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call struct { - *mock.Call -} - -// GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName is a helper method to define mock.On call -// - ctx context.Context -// - parentSecurableType string -// - parentFullName string -// - quotaName string -func (_e *MockResourceQuotasInterface_Expecter) GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName(ctx interface{}, parentSecurableType interface{}, parentFullName interface{}, quotaName interface{}) *MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call { - return &MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call{Call: _e.mock.On("GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName", ctx, parentSecurableType, parentFullName, quotaName)} -} - -func (_c *MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call) Run(run func(ctx context.Context, parentSecurableType string, parentFullName string, quotaName string)) *MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) - }) - return _c -} - -func (_c *MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call) Return(_a0 *catalog.GetQuotaResponse, _a1 error) *MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call) RunAndReturn(run func(context.Context, string, string, string) (*catalog.GetQuotaResponse, error)) *MockResourceQuotasInterface_GetQuotaByParentSecurableTypeAndParentFullNameAndQuotaName_Call { - _c.Call.Return(run) - return _c -} - -// ListQuotas provides a mock function with given fields: ctx, request -func (_m *MockResourceQuotasInterface) ListQuotas(ctx context.Context, request catalog.ListQuotasRequest) listing.Iterator[catalog.QuotaInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListQuotas") - } - - var r0 listing.Iterator[catalog.QuotaInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListQuotasRequest) listing.Iterator[catalog.QuotaInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.QuotaInfo]) - } - } - - return r0 -} - -// MockResourceQuotasInterface_ListQuotas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListQuotas' -type MockResourceQuotasInterface_ListQuotas_Call struct { - *mock.Call -} - -// ListQuotas is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListQuotasRequest -func (_e *MockResourceQuotasInterface_Expecter) ListQuotas(ctx interface{}, request interface{}) *MockResourceQuotasInterface_ListQuotas_Call { - return &MockResourceQuotasInterface_ListQuotas_Call{Call: _e.mock.On("ListQuotas", ctx, request)} -} - -func (_c *MockResourceQuotasInterface_ListQuotas_Call) Run(run func(ctx context.Context, request catalog.ListQuotasRequest)) *MockResourceQuotasInterface_ListQuotas_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListQuotasRequest)) - }) - return _c -} - -func (_c *MockResourceQuotasInterface_ListQuotas_Call) Return(_a0 listing.Iterator[catalog.QuotaInfo]) *MockResourceQuotasInterface_ListQuotas_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockResourceQuotasInterface_ListQuotas_Call) RunAndReturn(run func(context.Context, catalog.ListQuotasRequest) listing.Iterator[catalog.QuotaInfo]) *MockResourceQuotasInterface_ListQuotas_Call { - _c.Call.Return(run) - return _c -} - -// ListQuotasAll provides a mock function with given fields: ctx, request -func (_m *MockResourceQuotasInterface) ListQuotasAll(ctx context.Context, request catalog.ListQuotasRequest) ([]catalog.QuotaInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListQuotasAll") - } - - var r0 []catalog.QuotaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListQuotasRequest) ([]catalog.QuotaInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListQuotasRequest) []catalog.QuotaInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.QuotaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListQuotasRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockResourceQuotasInterface_ListQuotasAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListQuotasAll' -type MockResourceQuotasInterface_ListQuotasAll_Call struct { - *mock.Call -} - -// ListQuotasAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListQuotasRequest -func (_e *MockResourceQuotasInterface_Expecter) ListQuotasAll(ctx interface{}, request interface{}) *MockResourceQuotasInterface_ListQuotasAll_Call { - return &MockResourceQuotasInterface_ListQuotasAll_Call{Call: _e.mock.On("ListQuotasAll", ctx, request)} -} - -func (_c *MockResourceQuotasInterface_ListQuotasAll_Call) Run(run func(ctx context.Context, request catalog.ListQuotasRequest)) *MockResourceQuotasInterface_ListQuotasAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListQuotasRequest)) - }) - return _c -} - -func (_c *MockResourceQuotasInterface_ListQuotasAll_Call) Return(_a0 []catalog.QuotaInfo, _a1 error) *MockResourceQuotasInterface_ListQuotasAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockResourceQuotasInterface_ListQuotasAll_Call) RunAndReturn(run func(context.Context, catalog.ListQuotasRequest) ([]catalog.QuotaInfo, error)) *MockResourceQuotasInterface_ListQuotasAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockResourceQuotasInterface creates a new instance of MockResourceQuotasInterface. 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 NewMockResourceQuotasInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockResourceQuotasInterface { - mock := &MockResourceQuotasInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_schemas_interface.go b/experimental/mocks/service/catalog/mock_schemas_interface.go deleted file mode 100644 index 4bad64dbd..000000000 --- a/experimental/mocks/service/catalog/mock_schemas_interface.go +++ /dev/null @@ -1,596 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockSchemasInterface is an autogenerated mock type for the SchemasInterface type -type MockSchemasInterface struct { - mock.Mock -} - -type MockSchemasInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSchemasInterface) EXPECT() *MockSchemasInterface_Expecter { - return &MockSchemasInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockSchemasInterface) Create(ctx context.Context, request catalog.CreateSchema) (*catalog.SchemaInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.SchemaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateSchema) (*catalog.SchemaInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateSchema) *catalog.SchemaInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.SchemaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateSchema) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSchemasInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockSchemasInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateSchema -func (_e *MockSchemasInterface_Expecter) Create(ctx interface{}, request interface{}) *MockSchemasInterface_Create_Call { - return &MockSchemasInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockSchemasInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateSchema)) *MockSchemasInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateSchema)) - }) - return _c -} - -func (_c *MockSchemasInterface_Create_Call) Return(_a0 *catalog.SchemaInfo, _a1 error) *MockSchemasInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSchemasInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateSchema) (*catalog.SchemaInfo, error)) *MockSchemasInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockSchemasInterface) Delete(ctx context.Context, request catalog.DeleteSchemaRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteSchemaRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSchemasInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockSchemasInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteSchemaRequest -func (_e *MockSchemasInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockSchemasInterface_Delete_Call { - return &MockSchemasInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockSchemasInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteSchemaRequest)) *MockSchemasInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteSchemaRequest)) - }) - return _c -} - -func (_c *MockSchemasInterface_Delete_Call) Return(_a0 error) *MockSchemasInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSchemasInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteSchemaRequest) error) *MockSchemasInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockSchemasInterface) DeleteByFullName(ctx context.Context, fullName string) error { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for DeleteByFullName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, fullName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSchemasInterface_DeleteByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByFullName' -type MockSchemasInterface_DeleteByFullName_Call struct { - *mock.Call -} - -// DeleteByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockSchemasInterface_Expecter) DeleteByFullName(ctx interface{}, fullName interface{}) *MockSchemasInterface_DeleteByFullName_Call { - return &MockSchemasInterface_DeleteByFullName_Call{Call: _e.mock.On("DeleteByFullName", ctx, fullName)} -} - -func (_c *MockSchemasInterface_DeleteByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockSchemasInterface_DeleteByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSchemasInterface_DeleteByFullName_Call) Return(_a0 error) *MockSchemasInterface_DeleteByFullName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSchemasInterface_DeleteByFullName_Call) RunAndReturn(run func(context.Context, string) error) *MockSchemasInterface_DeleteByFullName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockSchemasInterface) Get(ctx context.Context, request catalog.GetSchemaRequest) (*catalog.SchemaInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.SchemaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetSchemaRequest) (*catalog.SchemaInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetSchemaRequest) *catalog.SchemaInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.SchemaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetSchemaRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSchemasInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockSchemasInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetSchemaRequest -func (_e *MockSchemasInterface_Expecter) Get(ctx interface{}, request interface{}) *MockSchemasInterface_Get_Call { - return &MockSchemasInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockSchemasInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetSchemaRequest)) *MockSchemasInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetSchemaRequest)) - }) - return _c -} - -func (_c *MockSchemasInterface_Get_Call) Return(_a0 *catalog.SchemaInfo, _a1 error) *MockSchemasInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSchemasInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetSchemaRequest) (*catalog.SchemaInfo, error)) *MockSchemasInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockSchemasInterface) GetByFullName(ctx context.Context, fullName string) (*catalog.SchemaInfo, error) { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for GetByFullName") - } - - var r0 *catalog.SchemaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.SchemaInfo, error)); ok { - return rf(ctx, fullName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.SchemaInfo); ok { - r0 = rf(ctx, fullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.SchemaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, fullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSchemasInterface_GetByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFullName' -type MockSchemasInterface_GetByFullName_Call struct { - *mock.Call -} - -// GetByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockSchemasInterface_Expecter) GetByFullName(ctx interface{}, fullName interface{}) *MockSchemasInterface_GetByFullName_Call { - return &MockSchemasInterface_GetByFullName_Call{Call: _e.mock.On("GetByFullName", ctx, fullName)} -} - -func (_c *MockSchemasInterface_GetByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockSchemasInterface_GetByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSchemasInterface_GetByFullName_Call) Return(_a0 *catalog.SchemaInfo, _a1 error) *MockSchemasInterface_GetByFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSchemasInterface_GetByFullName_Call) RunAndReturn(run func(context.Context, string) (*catalog.SchemaInfo, error)) *MockSchemasInterface_GetByFullName_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockSchemasInterface) GetByName(ctx context.Context, name string) (*catalog.SchemaInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.SchemaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.SchemaInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.SchemaInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.SchemaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSchemasInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockSchemasInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockSchemasInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockSchemasInterface_GetByName_Call { - return &MockSchemasInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockSchemasInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockSchemasInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSchemasInterface_GetByName_Call) Return(_a0 *catalog.SchemaInfo, _a1 error) *MockSchemasInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSchemasInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.SchemaInfo, error)) *MockSchemasInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockSchemasInterface) List(ctx context.Context, request catalog.ListSchemasRequest) listing.Iterator[catalog.SchemaInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.SchemaInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSchemasRequest) listing.Iterator[catalog.SchemaInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.SchemaInfo]) - } - } - - return r0 -} - -// MockSchemasInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockSchemasInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListSchemasRequest -func (_e *MockSchemasInterface_Expecter) List(ctx interface{}, request interface{}) *MockSchemasInterface_List_Call { - return &MockSchemasInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockSchemasInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListSchemasRequest)) *MockSchemasInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListSchemasRequest)) - }) - return _c -} - -func (_c *MockSchemasInterface_List_Call) Return(_a0 listing.Iterator[catalog.SchemaInfo]) *MockSchemasInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSchemasInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListSchemasRequest) listing.Iterator[catalog.SchemaInfo]) *MockSchemasInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockSchemasInterface) ListAll(ctx context.Context, request catalog.ListSchemasRequest) ([]catalog.SchemaInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.SchemaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSchemasRequest) ([]catalog.SchemaInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSchemasRequest) []catalog.SchemaInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.SchemaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListSchemasRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSchemasInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockSchemasInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListSchemasRequest -func (_e *MockSchemasInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockSchemasInterface_ListAll_Call { - return &MockSchemasInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockSchemasInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListSchemasRequest)) *MockSchemasInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListSchemasRequest)) - }) - return _c -} - -func (_c *MockSchemasInterface_ListAll_Call) Return(_a0 []catalog.SchemaInfo, _a1 error) *MockSchemasInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSchemasInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListSchemasRequest) ([]catalog.SchemaInfo, error)) *MockSchemasInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// SchemaInfoNameToFullNameMap provides a mock function with given fields: ctx, request -func (_m *MockSchemasInterface) SchemaInfoNameToFullNameMap(ctx context.Context, request catalog.ListSchemasRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SchemaInfoNameToFullNameMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSchemasRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSchemasRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListSchemasRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSchemasInterface_SchemaInfoNameToFullNameMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SchemaInfoNameToFullNameMap' -type MockSchemasInterface_SchemaInfoNameToFullNameMap_Call struct { - *mock.Call -} - -// SchemaInfoNameToFullNameMap is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListSchemasRequest -func (_e *MockSchemasInterface_Expecter) SchemaInfoNameToFullNameMap(ctx interface{}, request interface{}) *MockSchemasInterface_SchemaInfoNameToFullNameMap_Call { - return &MockSchemasInterface_SchemaInfoNameToFullNameMap_Call{Call: _e.mock.On("SchemaInfoNameToFullNameMap", ctx, request)} -} - -func (_c *MockSchemasInterface_SchemaInfoNameToFullNameMap_Call) Run(run func(ctx context.Context, request catalog.ListSchemasRequest)) *MockSchemasInterface_SchemaInfoNameToFullNameMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListSchemasRequest)) - }) - return _c -} - -func (_c *MockSchemasInterface_SchemaInfoNameToFullNameMap_Call) Return(_a0 map[string]string, _a1 error) *MockSchemasInterface_SchemaInfoNameToFullNameMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSchemasInterface_SchemaInfoNameToFullNameMap_Call) RunAndReturn(run func(context.Context, catalog.ListSchemasRequest) (map[string]string, error)) *MockSchemasInterface_SchemaInfoNameToFullNameMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockSchemasInterface) Update(ctx context.Context, request catalog.UpdateSchema) (*catalog.SchemaInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.SchemaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateSchema) (*catalog.SchemaInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateSchema) *catalog.SchemaInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.SchemaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateSchema) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSchemasInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockSchemasInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateSchema -func (_e *MockSchemasInterface_Expecter) Update(ctx interface{}, request interface{}) *MockSchemasInterface_Update_Call { - return &MockSchemasInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockSchemasInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateSchema)) *MockSchemasInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateSchema)) - }) - return _c -} - -func (_c *MockSchemasInterface_Update_Call) Return(_a0 *catalog.SchemaInfo, _a1 error) *MockSchemasInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSchemasInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateSchema) (*catalog.SchemaInfo, error)) *MockSchemasInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSchemasInterface creates a new instance of MockSchemasInterface. 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 NewMockSchemasInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSchemasInterface { - mock := &MockSchemasInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_storage_credentials_interface.go b/experimental/mocks/service/catalog/mock_storage_credentials_interface.go deleted file mode 100644 index ee4fafbc4..000000000 --- a/experimental/mocks/service/catalog/mock_storage_credentials_interface.go +++ /dev/null @@ -1,596 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockStorageCredentialsInterface is an autogenerated mock type for the StorageCredentialsInterface type -type MockStorageCredentialsInterface struct { - mock.Mock -} - -type MockStorageCredentialsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockStorageCredentialsInterface) EXPECT() *MockStorageCredentialsInterface_Expecter { - return &MockStorageCredentialsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) Create(ctx context.Context, request catalog.CreateStorageCredential) (*catalog.StorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.StorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateStorageCredential) (*catalog.StorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateStorageCredential) *catalog.StorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.StorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateStorageCredential) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageCredentialsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockStorageCredentialsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateStorageCredential -func (_e *MockStorageCredentialsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_Create_Call { - return &MockStorageCredentialsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateStorageCredential)) *MockStorageCredentialsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateStorageCredential)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_Create_Call) Return(_a0 *catalog.StorageCredentialInfo, _a1 error) *MockStorageCredentialsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageCredentialsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateStorageCredential) (*catalog.StorageCredentialInfo, error)) *MockStorageCredentialsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) Delete(ctx context.Context, request catalog.DeleteStorageCredentialRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteStorageCredentialRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStorageCredentialsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockStorageCredentialsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteStorageCredentialRequest -func (_e *MockStorageCredentialsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_Delete_Call { - return &MockStorageCredentialsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteStorageCredentialRequest)) *MockStorageCredentialsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteStorageCredentialRequest)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_Delete_Call) Return(_a0 error) *MockStorageCredentialsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageCredentialsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteStorageCredentialRequest) error) *MockStorageCredentialsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockStorageCredentialsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStorageCredentialsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockStorageCredentialsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockStorageCredentialsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockStorageCredentialsInterface_DeleteByName_Call { - return &MockStorageCredentialsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockStorageCredentialsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockStorageCredentialsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_DeleteByName_Call) Return(_a0 error) *MockStorageCredentialsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageCredentialsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockStorageCredentialsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) Get(ctx context.Context, request catalog.GetStorageCredentialRequest) (*catalog.StorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.StorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetStorageCredentialRequest) (*catalog.StorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetStorageCredentialRequest) *catalog.StorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.StorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetStorageCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageCredentialsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockStorageCredentialsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetStorageCredentialRequest -func (_e *MockStorageCredentialsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_Get_Call { - return &MockStorageCredentialsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetStorageCredentialRequest)) *MockStorageCredentialsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetStorageCredentialRequest)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_Get_Call) Return(_a0 *catalog.StorageCredentialInfo, _a1 error) *MockStorageCredentialsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageCredentialsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetStorageCredentialRequest) (*catalog.StorageCredentialInfo, error)) *MockStorageCredentialsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockStorageCredentialsInterface) GetByName(ctx context.Context, name string) (*catalog.StorageCredentialInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.StorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.StorageCredentialInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.StorageCredentialInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.StorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageCredentialsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockStorageCredentialsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockStorageCredentialsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockStorageCredentialsInterface_GetByName_Call { - return &MockStorageCredentialsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockStorageCredentialsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockStorageCredentialsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_GetByName_Call) Return(_a0 *catalog.StorageCredentialInfo, _a1 error) *MockStorageCredentialsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageCredentialsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.StorageCredentialInfo, error)) *MockStorageCredentialsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) List(ctx context.Context, request catalog.ListStorageCredentialsRequest) listing.Iterator[catalog.StorageCredentialInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.StorageCredentialInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListStorageCredentialsRequest) listing.Iterator[catalog.StorageCredentialInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.StorageCredentialInfo]) - } - } - - return r0 -} - -// MockStorageCredentialsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockStorageCredentialsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListStorageCredentialsRequest -func (_e *MockStorageCredentialsInterface_Expecter) List(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_List_Call { - return &MockStorageCredentialsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListStorageCredentialsRequest)) *MockStorageCredentialsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListStorageCredentialsRequest)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_List_Call) Return(_a0 listing.Iterator[catalog.StorageCredentialInfo]) *MockStorageCredentialsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageCredentialsInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListStorageCredentialsRequest) listing.Iterator[catalog.StorageCredentialInfo]) *MockStorageCredentialsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) ListAll(ctx context.Context, request catalog.ListStorageCredentialsRequest) ([]catalog.StorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.StorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListStorageCredentialsRequest) ([]catalog.StorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListStorageCredentialsRequest) []catalog.StorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.StorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListStorageCredentialsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageCredentialsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockStorageCredentialsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListStorageCredentialsRequest -func (_e *MockStorageCredentialsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_ListAll_Call { - return &MockStorageCredentialsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListStorageCredentialsRequest)) *MockStorageCredentialsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListStorageCredentialsRequest)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_ListAll_Call) Return(_a0 []catalog.StorageCredentialInfo, _a1 error) *MockStorageCredentialsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageCredentialsInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListStorageCredentialsRequest) ([]catalog.StorageCredentialInfo, error)) *MockStorageCredentialsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// StorageCredentialInfoNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) StorageCredentialInfoNameToIdMap(ctx context.Context, request catalog.ListStorageCredentialsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for StorageCredentialInfoNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListStorageCredentialsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListStorageCredentialsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListStorageCredentialsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StorageCredentialInfoNameToIdMap' -type MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call struct { - *mock.Call -} - -// StorageCredentialInfoNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListStorageCredentialsRequest -func (_e *MockStorageCredentialsInterface_Expecter) StorageCredentialInfoNameToIdMap(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call { - return &MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call{Call: _e.mock.On("StorageCredentialInfoNameToIdMap", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call) Run(run func(ctx context.Context, request catalog.ListStorageCredentialsRequest)) *MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListStorageCredentialsRequest)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call) RunAndReturn(run func(context.Context, catalog.ListStorageCredentialsRequest) (map[string]string, error)) *MockStorageCredentialsInterface_StorageCredentialInfoNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) Update(ctx context.Context, request catalog.UpdateStorageCredential) (*catalog.StorageCredentialInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.StorageCredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateStorageCredential) (*catalog.StorageCredentialInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateStorageCredential) *catalog.StorageCredentialInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.StorageCredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateStorageCredential) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageCredentialsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockStorageCredentialsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateStorageCredential -func (_e *MockStorageCredentialsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_Update_Call { - return &MockStorageCredentialsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateStorageCredential)) *MockStorageCredentialsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateStorageCredential)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_Update_Call) Return(_a0 *catalog.StorageCredentialInfo, _a1 error) *MockStorageCredentialsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageCredentialsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateStorageCredential) (*catalog.StorageCredentialInfo, error)) *MockStorageCredentialsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// Validate provides a mock function with given fields: ctx, request -func (_m *MockStorageCredentialsInterface) Validate(ctx context.Context, request catalog.ValidateStorageCredential) (*catalog.ValidateStorageCredentialResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Validate") - } - - var r0 *catalog.ValidateStorageCredentialResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ValidateStorageCredential) (*catalog.ValidateStorageCredentialResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ValidateStorageCredential) *catalog.ValidateStorageCredentialResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ValidateStorageCredentialResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ValidateStorageCredential) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageCredentialsInterface_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate' -type MockStorageCredentialsInterface_Validate_Call struct { - *mock.Call -} - -// Validate is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ValidateStorageCredential -func (_e *MockStorageCredentialsInterface_Expecter) Validate(ctx interface{}, request interface{}) *MockStorageCredentialsInterface_Validate_Call { - return &MockStorageCredentialsInterface_Validate_Call{Call: _e.mock.On("Validate", ctx, request)} -} - -func (_c *MockStorageCredentialsInterface_Validate_Call) Run(run func(ctx context.Context, request catalog.ValidateStorageCredential)) *MockStorageCredentialsInterface_Validate_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ValidateStorageCredential)) - }) - return _c -} - -func (_c *MockStorageCredentialsInterface_Validate_Call) Return(_a0 *catalog.ValidateStorageCredentialResponse, _a1 error) *MockStorageCredentialsInterface_Validate_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageCredentialsInterface_Validate_Call) RunAndReturn(run func(context.Context, catalog.ValidateStorageCredential) (*catalog.ValidateStorageCredentialResponse, error)) *MockStorageCredentialsInterface_Validate_Call { - _c.Call.Return(run) - return _c -} - -// NewMockStorageCredentialsInterface creates a new instance of MockStorageCredentialsInterface. 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 NewMockStorageCredentialsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockStorageCredentialsInterface { - mock := &MockStorageCredentialsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_system_schemas_interface.go b/experimental/mocks/service/catalog/mock_system_schemas_interface.go deleted file mode 100644 index be608eebc..000000000 --- a/experimental/mocks/service/catalog/mock_system_schemas_interface.go +++ /dev/null @@ -1,349 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockSystemSchemasInterface is an autogenerated mock type for the SystemSchemasInterface type -type MockSystemSchemasInterface struct { - mock.Mock -} - -type MockSystemSchemasInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSystemSchemasInterface) EXPECT() *MockSystemSchemasInterface_Expecter { - return &MockSystemSchemasInterface_Expecter{mock: &_m.Mock} -} - -// Disable provides a mock function with given fields: ctx, request -func (_m *MockSystemSchemasInterface) Disable(ctx context.Context, request catalog.DisableRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Disable") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DisableRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSystemSchemasInterface_Disable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disable' -type MockSystemSchemasInterface_Disable_Call struct { - *mock.Call -} - -// Disable is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DisableRequest -func (_e *MockSystemSchemasInterface_Expecter) Disable(ctx interface{}, request interface{}) *MockSystemSchemasInterface_Disable_Call { - return &MockSystemSchemasInterface_Disable_Call{Call: _e.mock.On("Disable", ctx, request)} -} - -func (_c *MockSystemSchemasInterface_Disable_Call) Run(run func(ctx context.Context, request catalog.DisableRequest)) *MockSystemSchemasInterface_Disable_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DisableRequest)) - }) - return _c -} - -func (_c *MockSystemSchemasInterface_Disable_Call) Return(_a0 error) *MockSystemSchemasInterface_Disable_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSystemSchemasInterface_Disable_Call) RunAndReturn(run func(context.Context, catalog.DisableRequest) error) *MockSystemSchemasInterface_Disable_Call { - _c.Call.Return(run) - return _c -} - -// DisableByMetastoreIdAndSchemaName provides a mock function with given fields: ctx, metastoreId, schemaName -func (_m *MockSystemSchemasInterface) DisableByMetastoreIdAndSchemaName(ctx context.Context, metastoreId string, schemaName string) error { - ret := _m.Called(ctx, metastoreId, schemaName) - - if len(ret) == 0 { - panic("no return value specified for DisableByMetastoreIdAndSchemaName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, metastoreId, schemaName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableByMetastoreIdAndSchemaName' -type MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call struct { - *mock.Call -} - -// DisableByMetastoreIdAndSchemaName is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -// - schemaName string -func (_e *MockSystemSchemasInterface_Expecter) DisableByMetastoreIdAndSchemaName(ctx interface{}, metastoreId interface{}, schemaName interface{}) *MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call { - return &MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call{Call: _e.mock.On("DisableByMetastoreIdAndSchemaName", ctx, metastoreId, schemaName)} -} - -func (_c *MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call) Run(run func(ctx context.Context, metastoreId string, schemaName string)) *MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call) Return(_a0 error) *MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call) RunAndReturn(run func(context.Context, string, string) error) *MockSystemSchemasInterface_DisableByMetastoreIdAndSchemaName_Call { - _c.Call.Return(run) - return _c -} - -// Enable provides a mock function with given fields: ctx, request -func (_m *MockSystemSchemasInterface) Enable(ctx context.Context, request catalog.EnableRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Enable") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.EnableRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSystemSchemasInterface_Enable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enable' -type MockSystemSchemasInterface_Enable_Call struct { - *mock.Call -} - -// Enable is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.EnableRequest -func (_e *MockSystemSchemasInterface_Expecter) Enable(ctx interface{}, request interface{}) *MockSystemSchemasInterface_Enable_Call { - return &MockSystemSchemasInterface_Enable_Call{Call: _e.mock.On("Enable", ctx, request)} -} - -func (_c *MockSystemSchemasInterface_Enable_Call) Run(run func(ctx context.Context, request catalog.EnableRequest)) *MockSystemSchemasInterface_Enable_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.EnableRequest)) - }) - return _c -} - -func (_c *MockSystemSchemasInterface_Enable_Call) Return(_a0 error) *MockSystemSchemasInterface_Enable_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSystemSchemasInterface_Enable_Call) RunAndReturn(run func(context.Context, catalog.EnableRequest) error) *MockSystemSchemasInterface_Enable_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockSystemSchemasInterface) List(ctx context.Context, request catalog.ListSystemSchemasRequest) listing.Iterator[catalog.SystemSchemaInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.SystemSchemaInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSystemSchemasRequest) listing.Iterator[catalog.SystemSchemaInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.SystemSchemaInfo]) - } - } - - return r0 -} - -// MockSystemSchemasInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockSystemSchemasInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListSystemSchemasRequest -func (_e *MockSystemSchemasInterface_Expecter) List(ctx interface{}, request interface{}) *MockSystemSchemasInterface_List_Call { - return &MockSystemSchemasInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockSystemSchemasInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListSystemSchemasRequest)) *MockSystemSchemasInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListSystemSchemasRequest)) - }) - return _c -} - -func (_c *MockSystemSchemasInterface_List_Call) Return(_a0 listing.Iterator[catalog.SystemSchemaInfo]) *MockSystemSchemasInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSystemSchemasInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListSystemSchemasRequest) listing.Iterator[catalog.SystemSchemaInfo]) *MockSystemSchemasInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockSystemSchemasInterface) ListAll(ctx context.Context, request catalog.ListSystemSchemasRequest) ([]catalog.SystemSchemaInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.SystemSchemaInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSystemSchemasRequest) ([]catalog.SystemSchemaInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSystemSchemasRequest) []catalog.SystemSchemaInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.SystemSchemaInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListSystemSchemasRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSystemSchemasInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockSystemSchemasInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListSystemSchemasRequest -func (_e *MockSystemSchemasInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockSystemSchemasInterface_ListAll_Call { - return &MockSystemSchemasInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockSystemSchemasInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListSystemSchemasRequest)) *MockSystemSchemasInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListSystemSchemasRequest)) - }) - return _c -} - -func (_c *MockSystemSchemasInterface_ListAll_Call) Return(_a0 []catalog.SystemSchemaInfo, _a1 error) *MockSystemSchemasInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSystemSchemasInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListSystemSchemasRequest) ([]catalog.SystemSchemaInfo, error)) *MockSystemSchemasInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByMetastoreId provides a mock function with given fields: ctx, metastoreId -func (_m *MockSystemSchemasInterface) ListByMetastoreId(ctx context.Context, metastoreId string) (*catalog.ListSystemSchemasResponse, error) { - ret := _m.Called(ctx, metastoreId) - - if len(ret) == 0 { - panic("no return value specified for ListByMetastoreId") - } - - var r0 *catalog.ListSystemSchemasResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.ListSystemSchemasResponse, error)); ok { - return rf(ctx, metastoreId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.ListSystemSchemasResponse); ok { - r0 = rf(ctx, metastoreId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.ListSystemSchemasResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, metastoreId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSystemSchemasInterface_ListByMetastoreId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByMetastoreId' -type MockSystemSchemasInterface_ListByMetastoreId_Call struct { - *mock.Call -} - -// ListByMetastoreId is a helper method to define mock.On call -// - ctx context.Context -// - metastoreId string -func (_e *MockSystemSchemasInterface_Expecter) ListByMetastoreId(ctx interface{}, metastoreId interface{}) *MockSystemSchemasInterface_ListByMetastoreId_Call { - return &MockSystemSchemasInterface_ListByMetastoreId_Call{Call: _e.mock.On("ListByMetastoreId", ctx, metastoreId)} -} - -func (_c *MockSystemSchemasInterface_ListByMetastoreId_Call) Run(run func(ctx context.Context, metastoreId string)) *MockSystemSchemasInterface_ListByMetastoreId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSystemSchemasInterface_ListByMetastoreId_Call) Return(_a0 *catalog.ListSystemSchemasResponse, _a1 error) *MockSystemSchemasInterface_ListByMetastoreId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSystemSchemasInterface_ListByMetastoreId_Call) RunAndReturn(run func(context.Context, string) (*catalog.ListSystemSchemasResponse, error)) *MockSystemSchemasInterface_ListByMetastoreId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSystemSchemasInterface creates a new instance of MockSystemSchemasInterface. 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 NewMockSystemSchemasInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSystemSchemasInterface { - mock := &MockSystemSchemasInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_table_constraints_interface.go b/experimental/mocks/service/catalog/mock_table_constraints_interface.go deleted file mode 100644 index 73dfb0d2c..000000000 --- a/experimental/mocks/service/catalog/mock_table_constraints_interface.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - mock "github.com/stretchr/testify/mock" -) - -// MockTableConstraintsInterface is an autogenerated mock type for the TableConstraintsInterface type -type MockTableConstraintsInterface struct { - mock.Mock -} - -type MockTableConstraintsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTableConstraintsInterface) EXPECT() *MockTableConstraintsInterface_Expecter { - return &MockTableConstraintsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockTableConstraintsInterface) Create(ctx context.Context, request catalog.CreateTableConstraint) (*catalog.TableConstraint, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.TableConstraint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateTableConstraint) (*catalog.TableConstraint, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateTableConstraint) *catalog.TableConstraint); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.TableConstraint) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateTableConstraint) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTableConstraintsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockTableConstraintsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateTableConstraint -func (_e *MockTableConstraintsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockTableConstraintsInterface_Create_Call { - return &MockTableConstraintsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockTableConstraintsInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateTableConstraint)) *MockTableConstraintsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateTableConstraint)) - }) - return _c -} - -func (_c *MockTableConstraintsInterface_Create_Call) Return(_a0 *catalog.TableConstraint, _a1 error) *MockTableConstraintsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTableConstraintsInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateTableConstraint) (*catalog.TableConstraint, error)) *MockTableConstraintsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockTableConstraintsInterface) Delete(ctx context.Context, request catalog.DeleteTableConstraintRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteTableConstraintRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTableConstraintsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockTableConstraintsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteTableConstraintRequest -func (_e *MockTableConstraintsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockTableConstraintsInterface_Delete_Call { - return &MockTableConstraintsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockTableConstraintsInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteTableConstraintRequest)) *MockTableConstraintsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteTableConstraintRequest)) - }) - return _c -} - -func (_c *MockTableConstraintsInterface_Delete_Call) Return(_a0 error) *MockTableConstraintsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTableConstraintsInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteTableConstraintRequest) error) *MockTableConstraintsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockTableConstraintsInterface) DeleteByFullName(ctx context.Context, fullName string) error { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for DeleteByFullName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, fullName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTableConstraintsInterface_DeleteByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByFullName' -type MockTableConstraintsInterface_DeleteByFullName_Call struct { - *mock.Call -} - -// DeleteByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockTableConstraintsInterface_Expecter) DeleteByFullName(ctx interface{}, fullName interface{}) *MockTableConstraintsInterface_DeleteByFullName_Call { - return &MockTableConstraintsInterface_DeleteByFullName_Call{Call: _e.mock.On("DeleteByFullName", ctx, fullName)} -} - -func (_c *MockTableConstraintsInterface_DeleteByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockTableConstraintsInterface_DeleteByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTableConstraintsInterface_DeleteByFullName_Call) Return(_a0 error) *MockTableConstraintsInterface_DeleteByFullName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTableConstraintsInterface_DeleteByFullName_Call) RunAndReturn(run func(context.Context, string) error) *MockTableConstraintsInterface_DeleteByFullName_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTableConstraintsInterface creates a new instance of MockTableConstraintsInterface. 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 NewMockTableConstraintsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTableConstraintsInterface { - mock := &MockTableConstraintsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_tables_interface.go b/experimental/mocks/service/catalog/mock_tables_interface.go deleted file mode 100644 index d0da4a5c9..000000000 --- a/experimental/mocks/service/catalog/mock_tables_interface.go +++ /dev/null @@ -1,751 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockTablesInterface is an autogenerated mock type for the TablesInterface type -type MockTablesInterface struct { - mock.Mock -} - -type MockTablesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTablesInterface) EXPECT() *MockTablesInterface_Expecter { - return &MockTablesInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) Delete(ctx context.Context, request catalog.DeleteTableRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteTableRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTablesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockTablesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteTableRequest -func (_e *MockTablesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockTablesInterface_Delete_Call { - return &MockTablesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockTablesInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteTableRequest)) *MockTablesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteTableRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_Delete_Call) Return(_a0 error) *MockTablesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTablesInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteTableRequest) error) *MockTablesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockTablesInterface) DeleteByFullName(ctx context.Context, fullName string) error { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for DeleteByFullName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, fullName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTablesInterface_DeleteByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByFullName' -type MockTablesInterface_DeleteByFullName_Call struct { - *mock.Call -} - -// DeleteByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockTablesInterface_Expecter) DeleteByFullName(ctx interface{}, fullName interface{}) *MockTablesInterface_DeleteByFullName_Call { - return &MockTablesInterface_DeleteByFullName_Call{Call: _e.mock.On("DeleteByFullName", ctx, fullName)} -} - -func (_c *MockTablesInterface_DeleteByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockTablesInterface_DeleteByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTablesInterface_DeleteByFullName_Call) Return(_a0 error) *MockTablesInterface_DeleteByFullName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTablesInterface_DeleteByFullName_Call) RunAndReturn(run func(context.Context, string) error) *MockTablesInterface_DeleteByFullName_Call { - _c.Call.Return(run) - return _c -} - -// Exists provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) Exists(ctx context.Context, request catalog.ExistsRequest) (*catalog.TableExistsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Exists") - } - - var r0 *catalog.TableExistsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ExistsRequest) (*catalog.TableExistsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ExistsRequest) *catalog.TableExistsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.TableExistsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ExistsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_Exists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exists' -type MockTablesInterface_Exists_Call struct { - *mock.Call -} - -// Exists is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ExistsRequest -func (_e *MockTablesInterface_Expecter) Exists(ctx interface{}, request interface{}) *MockTablesInterface_Exists_Call { - return &MockTablesInterface_Exists_Call{Call: _e.mock.On("Exists", ctx, request)} -} - -func (_c *MockTablesInterface_Exists_Call) Run(run func(ctx context.Context, request catalog.ExistsRequest)) *MockTablesInterface_Exists_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ExistsRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_Exists_Call) Return(_a0 *catalog.TableExistsResponse, _a1 error) *MockTablesInterface_Exists_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_Exists_Call) RunAndReturn(run func(context.Context, catalog.ExistsRequest) (*catalog.TableExistsResponse, error)) *MockTablesInterface_Exists_Call { - _c.Call.Return(run) - return _c -} - -// ExistsByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockTablesInterface) ExistsByFullName(ctx context.Context, fullName string) (*catalog.TableExistsResponse, error) { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for ExistsByFullName") - } - - var r0 *catalog.TableExistsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.TableExistsResponse, error)); ok { - return rf(ctx, fullName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.TableExistsResponse); ok { - r0 = rf(ctx, fullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.TableExistsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, fullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_ExistsByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExistsByFullName' -type MockTablesInterface_ExistsByFullName_Call struct { - *mock.Call -} - -// ExistsByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockTablesInterface_Expecter) ExistsByFullName(ctx interface{}, fullName interface{}) *MockTablesInterface_ExistsByFullName_Call { - return &MockTablesInterface_ExistsByFullName_Call{Call: _e.mock.On("ExistsByFullName", ctx, fullName)} -} - -func (_c *MockTablesInterface_ExistsByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockTablesInterface_ExistsByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTablesInterface_ExistsByFullName_Call) Return(_a0 *catalog.TableExistsResponse, _a1 error) *MockTablesInterface_ExistsByFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_ExistsByFullName_Call) RunAndReturn(run func(context.Context, string) (*catalog.TableExistsResponse, error)) *MockTablesInterface_ExistsByFullName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) Get(ctx context.Context, request catalog.GetTableRequest) (*catalog.TableInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.TableInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetTableRequest) (*catalog.TableInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetTableRequest) *catalog.TableInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.TableInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetTableRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockTablesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetTableRequest -func (_e *MockTablesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockTablesInterface_Get_Call { - return &MockTablesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockTablesInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetTableRequest)) *MockTablesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetTableRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_Get_Call) Return(_a0 *catalog.TableInfo, _a1 error) *MockTablesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetTableRequest) (*catalog.TableInfo, error)) *MockTablesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByFullName provides a mock function with given fields: ctx, fullName -func (_m *MockTablesInterface) GetByFullName(ctx context.Context, fullName string) (*catalog.TableInfo, error) { - ret := _m.Called(ctx, fullName) - - if len(ret) == 0 { - panic("no return value specified for GetByFullName") - } - - var r0 *catalog.TableInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.TableInfo, error)); ok { - return rf(ctx, fullName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.TableInfo); ok { - r0 = rf(ctx, fullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.TableInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, fullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_GetByFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFullName' -type MockTablesInterface_GetByFullName_Call struct { - *mock.Call -} - -// GetByFullName is a helper method to define mock.On call -// - ctx context.Context -// - fullName string -func (_e *MockTablesInterface_Expecter) GetByFullName(ctx interface{}, fullName interface{}) *MockTablesInterface_GetByFullName_Call { - return &MockTablesInterface_GetByFullName_Call{Call: _e.mock.On("GetByFullName", ctx, fullName)} -} - -func (_c *MockTablesInterface_GetByFullName_Call) Run(run func(ctx context.Context, fullName string)) *MockTablesInterface_GetByFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTablesInterface_GetByFullName_Call) Return(_a0 *catalog.TableInfo, _a1 error) *MockTablesInterface_GetByFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_GetByFullName_Call) RunAndReturn(run func(context.Context, string) (*catalog.TableInfo, error)) *MockTablesInterface_GetByFullName_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockTablesInterface) GetByName(ctx context.Context, name string) (*catalog.TableInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.TableInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.TableInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.TableInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.TableInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockTablesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockTablesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockTablesInterface_GetByName_Call { - return &MockTablesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockTablesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockTablesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTablesInterface_GetByName_Call) Return(_a0 *catalog.TableInfo, _a1 error) *MockTablesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.TableInfo, error)) *MockTablesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) List(ctx context.Context, request catalog.ListTablesRequest) listing.Iterator[catalog.TableInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.TableInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListTablesRequest) listing.Iterator[catalog.TableInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.TableInfo]) - } - } - - return r0 -} - -// MockTablesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockTablesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListTablesRequest -func (_e *MockTablesInterface_Expecter) List(ctx interface{}, request interface{}) *MockTablesInterface_List_Call { - return &MockTablesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockTablesInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListTablesRequest)) *MockTablesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListTablesRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_List_Call) Return(_a0 listing.Iterator[catalog.TableInfo]) *MockTablesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTablesInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListTablesRequest) listing.Iterator[catalog.TableInfo]) *MockTablesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) ListAll(ctx context.Context, request catalog.ListTablesRequest) ([]catalog.TableInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.TableInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListTablesRequest) ([]catalog.TableInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListTablesRequest) []catalog.TableInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.TableInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListTablesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockTablesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListTablesRequest -func (_e *MockTablesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockTablesInterface_ListAll_Call { - return &MockTablesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockTablesInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListTablesRequest)) *MockTablesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListTablesRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_ListAll_Call) Return(_a0 []catalog.TableInfo, _a1 error) *MockTablesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListTablesRequest) ([]catalog.TableInfo, error)) *MockTablesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListSummaries provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) ListSummaries(ctx context.Context, request catalog.ListSummariesRequest) listing.Iterator[catalog.TableSummary] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSummaries") - } - - var r0 listing.Iterator[catalog.TableSummary] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSummariesRequest) listing.Iterator[catalog.TableSummary]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.TableSummary]) - } - } - - return r0 -} - -// MockTablesInterface_ListSummaries_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSummaries' -type MockTablesInterface_ListSummaries_Call struct { - *mock.Call -} - -// ListSummaries is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListSummariesRequest -func (_e *MockTablesInterface_Expecter) ListSummaries(ctx interface{}, request interface{}) *MockTablesInterface_ListSummaries_Call { - return &MockTablesInterface_ListSummaries_Call{Call: _e.mock.On("ListSummaries", ctx, request)} -} - -func (_c *MockTablesInterface_ListSummaries_Call) Run(run func(ctx context.Context, request catalog.ListSummariesRequest)) *MockTablesInterface_ListSummaries_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListSummariesRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_ListSummaries_Call) Return(_a0 listing.Iterator[catalog.TableSummary]) *MockTablesInterface_ListSummaries_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTablesInterface_ListSummaries_Call) RunAndReturn(run func(context.Context, catalog.ListSummariesRequest) listing.Iterator[catalog.TableSummary]) *MockTablesInterface_ListSummaries_Call { - _c.Call.Return(run) - return _c -} - -// ListSummariesAll provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) ListSummariesAll(ctx context.Context, request catalog.ListSummariesRequest) ([]catalog.TableSummary, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSummariesAll") - } - - var r0 []catalog.TableSummary - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSummariesRequest) ([]catalog.TableSummary, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListSummariesRequest) []catalog.TableSummary); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.TableSummary) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListSummariesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_ListSummariesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSummariesAll' -type MockTablesInterface_ListSummariesAll_Call struct { - *mock.Call -} - -// ListSummariesAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListSummariesRequest -func (_e *MockTablesInterface_Expecter) ListSummariesAll(ctx interface{}, request interface{}) *MockTablesInterface_ListSummariesAll_Call { - return &MockTablesInterface_ListSummariesAll_Call{Call: _e.mock.On("ListSummariesAll", ctx, request)} -} - -func (_c *MockTablesInterface_ListSummariesAll_Call) Run(run func(ctx context.Context, request catalog.ListSummariesRequest)) *MockTablesInterface_ListSummariesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListSummariesRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_ListSummariesAll_Call) Return(_a0 []catalog.TableSummary, _a1 error) *MockTablesInterface_ListSummariesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_ListSummariesAll_Call) RunAndReturn(run func(context.Context, catalog.ListSummariesRequest) ([]catalog.TableSummary, error)) *MockTablesInterface_ListSummariesAll_Call { - _c.Call.Return(run) - return _c -} - -// TableInfoNameToTableIdMap provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) TableInfoNameToTableIdMap(ctx context.Context, request catalog.ListTablesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for TableInfoNameToTableIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListTablesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListTablesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListTablesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTablesInterface_TableInfoNameToTableIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TableInfoNameToTableIdMap' -type MockTablesInterface_TableInfoNameToTableIdMap_Call struct { - *mock.Call -} - -// TableInfoNameToTableIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListTablesRequest -func (_e *MockTablesInterface_Expecter) TableInfoNameToTableIdMap(ctx interface{}, request interface{}) *MockTablesInterface_TableInfoNameToTableIdMap_Call { - return &MockTablesInterface_TableInfoNameToTableIdMap_Call{Call: _e.mock.On("TableInfoNameToTableIdMap", ctx, request)} -} - -func (_c *MockTablesInterface_TableInfoNameToTableIdMap_Call) Run(run func(ctx context.Context, request catalog.ListTablesRequest)) *MockTablesInterface_TableInfoNameToTableIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListTablesRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_TableInfoNameToTableIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockTablesInterface_TableInfoNameToTableIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTablesInterface_TableInfoNameToTableIdMap_Call) RunAndReturn(run func(context.Context, catalog.ListTablesRequest) (map[string]string, error)) *MockTablesInterface_TableInfoNameToTableIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockTablesInterface) Update(ctx context.Context, request catalog.UpdateTableRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateTableRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTablesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockTablesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateTableRequest -func (_e *MockTablesInterface_Expecter) Update(ctx interface{}, request interface{}) *MockTablesInterface_Update_Call { - return &MockTablesInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockTablesInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateTableRequest)) *MockTablesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateTableRequest)) - }) - return _c -} - -func (_c *MockTablesInterface_Update_Call) Return(_a0 error) *MockTablesInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTablesInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateTableRequest) error) *MockTablesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTablesInterface creates a new instance of MockTablesInterface. 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 NewMockTablesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTablesInterface { - mock := &MockTablesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_temporary_table_credentials_interface.go b/experimental/mocks/service/catalog/mock_temporary_table_credentials_interface.go deleted file mode 100644 index 2948fe612..000000000 --- a/experimental/mocks/service/catalog/mock_temporary_table_credentials_interface.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - mock "github.com/stretchr/testify/mock" -) - -// MockTemporaryTableCredentialsInterface is an autogenerated mock type for the TemporaryTableCredentialsInterface type -type MockTemporaryTableCredentialsInterface struct { - mock.Mock -} - -type MockTemporaryTableCredentialsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTemporaryTableCredentialsInterface) EXPECT() *MockTemporaryTableCredentialsInterface_Expecter { - return &MockTemporaryTableCredentialsInterface_Expecter{mock: &_m.Mock} -} - -// GenerateTemporaryTableCredentials provides a mock function with given fields: ctx, request -func (_m *MockTemporaryTableCredentialsInterface) GenerateTemporaryTableCredentials(ctx context.Context, request catalog.GenerateTemporaryTableCredentialRequest) (*catalog.GenerateTemporaryTableCredentialResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GenerateTemporaryTableCredentials") - } - - var r0 *catalog.GenerateTemporaryTableCredentialResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GenerateTemporaryTableCredentialRequest) (*catalog.GenerateTemporaryTableCredentialResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GenerateTemporaryTableCredentialRequest) *catalog.GenerateTemporaryTableCredentialResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.GenerateTemporaryTableCredentialResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GenerateTemporaryTableCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateTemporaryTableCredentials' -type MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call struct { - *mock.Call -} - -// GenerateTemporaryTableCredentials is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GenerateTemporaryTableCredentialRequest -func (_e *MockTemporaryTableCredentialsInterface_Expecter) GenerateTemporaryTableCredentials(ctx interface{}, request interface{}) *MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call { - return &MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call{Call: _e.mock.On("GenerateTemporaryTableCredentials", ctx, request)} -} - -func (_c *MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call) Run(run func(ctx context.Context, request catalog.GenerateTemporaryTableCredentialRequest)) *MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GenerateTemporaryTableCredentialRequest)) - }) - return _c -} - -func (_c *MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call) Return(_a0 *catalog.GenerateTemporaryTableCredentialResponse, _a1 error) *MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call) RunAndReturn(run func(context.Context, catalog.GenerateTemporaryTableCredentialRequest) (*catalog.GenerateTemporaryTableCredentialResponse, error)) *MockTemporaryTableCredentialsInterface_GenerateTemporaryTableCredentials_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTemporaryTableCredentialsInterface creates a new instance of MockTemporaryTableCredentialsInterface. 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 NewMockTemporaryTableCredentialsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTemporaryTableCredentialsInterface { - mock := &MockTemporaryTableCredentialsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_volumes_interface.go b/experimental/mocks/service/catalog/mock_volumes_interface.go deleted file mode 100644 index b4a6bdd0c..000000000 --- a/experimental/mocks/service/catalog/mock_volumes_interface.go +++ /dev/null @@ -1,596 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockVolumesInterface is an autogenerated mock type for the VolumesInterface type -type MockVolumesInterface struct { - mock.Mock -} - -type MockVolumesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockVolumesInterface) EXPECT() *MockVolumesInterface_Expecter { - return &MockVolumesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockVolumesInterface) Create(ctx context.Context, request catalog.CreateVolumeRequestContent) (*catalog.VolumeInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *catalog.VolumeInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateVolumeRequestContent) (*catalog.VolumeInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateVolumeRequestContent) *catalog.VolumeInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.VolumeInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateVolumeRequestContent) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVolumesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockVolumesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.CreateVolumeRequestContent -func (_e *MockVolumesInterface_Expecter) Create(ctx interface{}, request interface{}) *MockVolumesInterface_Create_Call { - return &MockVolumesInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockVolumesInterface_Create_Call) Run(run func(ctx context.Context, request catalog.CreateVolumeRequestContent)) *MockVolumesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.CreateVolumeRequestContent)) - }) - return _c -} - -func (_c *MockVolumesInterface_Create_Call) Return(_a0 *catalog.VolumeInfo, _a1 error) *MockVolumesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVolumesInterface_Create_Call) RunAndReturn(run func(context.Context, catalog.CreateVolumeRequestContent) (*catalog.VolumeInfo, error)) *MockVolumesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockVolumesInterface) Delete(ctx context.Context, request catalog.DeleteVolumeRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteVolumeRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVolumesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockVolumesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.DeleteVolumeRequest -func (_e *MockVolumesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockVolumesInterface_Delete_Call { - return &MockVolumesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockVolumesInterface_Delete_Call) Run(run func(ctx context.Context, request catalog.DeleteVolumeRequest)) *MockVolumesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.DeleteVolumeRequest)) - }) - return _c -} - -func (_c *MockVolumesInterface_Delete_Call) Return(_a0 error) *MockVolumesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVolumesInterface_Delete_Call) RunAndReturn(run func(context.Context, catalog.DeleteVolumeRequest) error) *MockVolumesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockVolumesInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVolumesInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockVolumesInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockVolumesInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockVolumesInterface_DeleteByName_Call { - return &MockVolumesInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockVolumesInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockVolumesInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVolumesInterface_DeleteByName_Call) Return(_a0 error) *MockVolumesInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVolumesInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockVolumesInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockVolumesInterface) GetByName(ctx context.Context, name string) (*catalog.VolumeInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.VolumeInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.VolumeInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.VolumeInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.VolumeInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVolumesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockVolumesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockVolumesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockVolumesInterface_GetByName_Call { - return &MockVolumesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockVolumesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockVolumesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVolumesInterface_GetByName_Call) Return(_a0 *catalog.VolumeInfo, _a1 error) *MockVolumesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVolumesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.VolumeInfo, error)) *MockVolumesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockVolumesInterface) List(ctx context.Context, request catalog.ListVolumesRequest) listing.Iterator[catalog.VolumeInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[catalog.VolumeInfo] - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListVolumesRequest) listing.Iterator[catalog.VolumeInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.VolumeInfo]) - } - } - - return r0 -} - -// MockVolumesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockVolumesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListVolumesRequest -func (_e *MockVolumesInterface_Expecter) List(ctx interface{}, request interface{}) *MockVolumesInterface_List_Call { - return &MockVolumesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockVolumesInterface_List_Call) Run(run func(ctx context.Context, request catalog.ListVolumesRequest)) *MockVolumesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListVolumesRequest)) - }) - return _c -} - -func (_c *MockVolumesInterface_List_Call) Return(_a0 listing.Iterator[catalog.VolumeInfo]) *MockVolumesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVolumesInterface_List_Call) RunAndReturn(run func(context.Context, catalog.ListVolumesRequest) listing.Iterator[catalog.VolumeInfo]) *MockVolumesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockVolumesInterface) ListAll(ctx context.Context, request catalog.ListVolumesRequest) ([]catalog.VolumeInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []catalog.VolumeInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListVolumesRequest) ([]catalog.VolumeInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListVolumesRequest) []catalog.VolumeInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.VolumeInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListVolumesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVolumesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockVolumesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListVolumesRequest -func (_e *MockVolumesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockVolumesInterface_ListAll_Call { - return &MockVolumesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockVolumesInterface_ListAll_Call) Run(run func(ctx context.Context, request catalog.ListVolumesRequest)) *MockVolumesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListVolumesRequest)) - }) - return _c -} - -func (_c *MockVolumesInterface_ListAll_Call) Return(_a0 []catalog.VolumeInfo, _a1 error) *MockVolumesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVolumesInterface_ListAll_Call) RunAndReturn(run func(context.Context, catalog.ListVolumesRequest) ([]catalog.VolumeInfo, error)) *MockVolumesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Read provides a mock function with given fields: ctx, request -func (_m *MockVolumesInterface) Read(ctx context.Context, request catalog.ReadVolumeRequest) (*catalog.VolumeInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Read") - } - - var r0 *catalog.VolumeInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ReadVolumeRequest) (*catalog.VolumeInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ReadVolumeRequest) *catalog.VolumeInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.VolumeInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ReadVolumeRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVolumesInterface_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read' -type MockVolumesInterface_Read_Call struct { - *mock.Call -} - -// Read is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ReadVolumeRequest -func (_e *MockVolumesInterface_Expecter) Read(ctx interface{}, request interface{}) *MockVolumesInterface_Read_Call { - return &MockVolumesInterface_Read_Call{Call: _e.mock.On("Read", ctx, request)} -} - -func (_c *MockVolumesInterface_Read_Call) Run(run func(ctx context.Context, request catalog.ReadVolumeRequest)) *MockVolumesInterface_Read_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ReadVolumeRequest)) - }) - return _c -} - -func (_c *MockVolumesInterface_Read_Call) Return(_a0 *catalog.VolumeInfo, _a1 error) *MockVolumesInterface_Read_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVolumesInterface_Read_Call) RunAndReturn(run func(context.Context, catalog.ReadVolumeRequest) (*catalog.VolumeInfo, error)) *MockVolumesInterface_Read_Call { - _c.Call.Return(run) - return _c -} - -// ReadByName provides a mock function with given fields: ctx, name -func (_m *MockVolumesInterface) ReadByName(ctx context.Context, name string) (*catalog.VolumeInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for ReadByName") - } - - var r0 *catalog.VolumeInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.VolumeInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.VolumeInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.VolumeInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVolumesInterface_ReadByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadByName' -type MockVolumesInterface_ReadByName_Call struct { - *mock.Call -} - -// ReadByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockVolumesInterface_Expecter) ReadByName(ctx interface{}, name interface{}) *MockVolumesInterface_ReadByName_Call { - return &MockVolumesInterface_ReadByName_Call{Call: _e.mock.On("ReadByName", ctx, name)} -} - -func (_c *MockVolumesInterface_ReadByName_Call) Run(run func(ctx context.Context, name string)) *MockVolumesInterface_ReadByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVolumesInterface_ReadByName_Call) Return(_a0 *catalog.VolumeInfo, _a1 error) *MockVolumesInterface_ReadByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVolumesInterface_ReadByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.VolumeInfo, error)) *MockVolumesInterface_ReadByName_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockVolumesInterface) Update(ctx context.Context, request catalog.UpdateVolumeRequestContent) (*catalog.VolumeInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.VolumeInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateVolumeRequestContent) (*catalog.VolumeInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateVolumeRequestContent) *catalog.VolumeInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.VolumeInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateVolumeRequestContent) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVolumesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockVolumesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateVolumeRequestContent -func (_e *MockVolumesInterface_Expecter) Update(ctx interface{}, request interface{}) *MockVolumesInterface_Update_Call { - return &MockVolumesInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockVolumesInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateVolumeRequestContent)) *MockVolumesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateVolumeRequestContent)) - }) - return _c -} - -func (_c *MockVolumesInterface_Update_Call) Return(_a0 *catalog.VolumeInfo, _a1 error) *MockVolumesInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVolumesInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateVolumeRequestContent) (*catalog.VolumeInfo, error)) *MockVolumesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// VolumeInfoNameToVolumeIdMap provides a mock function with given fields: ctx, request -func (_m *MockVolumesInterface) VolumeInfoNameToVolumeIdMap(ctx context.Context, request catalog.ListVolumesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for VolumeInfoNameToVolumeIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListVolumesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.ListVolumesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.ListVolumesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VolumeInfoNameToVolumeIdMap' -type MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call struct { - *mock.Call -} - -// VolumeInfoNameToVolumeIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.ListVolumesRequest -func (_e *MockVolumesInterface_Expecter) VolumeInfoNameToVolumeIdMap(ctx interface{}, request interface{}) *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call { - return &MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call{Call: _e.mock.On("VolumeInfoNameToVolumeIdMap", ctx, request)} -} - -func (_c *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call) Run(run func(ctx context.Context, request catalog.ListVolumesRequest)) *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.ListVolumesRequest)) - }) - return _c -} - -func (_c *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call) RunAndReturn(run func(context.Context, catalog.ListVolumesRequest) (map[string]string, error)) *MockVolumesInterface_VolumeInfoNameToVolumeIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockVolumesInterface creates a new instance of MockVolumesInterface. 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 NewMockVolumesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockVolumesInterface { - mock := &MockVolumesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/catalog/mock_workspace_bindings_interface.go b/experimental/mocks/service/catalog/mock_workspace_bindings_interface.go deleted file mode 100644 index 1bce0578f..000000000 --- a/experimental/mocks/service/catalog/mock_workspace_bindings_interface.go +++ /dev/null @@ -1,444 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package catalog - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockWorkspaceBindingsInterface is an autogenerated mock type for the WorkspaceBindingsInterface type -type MockWorkspaceBindingsInterface struct { - mock.Mock -} - -type MockWorkspaceBindingsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockWorkspaceBindingsInterface) EXPECT() *MockWorkspaceBindingsInterface_Expecter { - return &MockWorkspaceBindingsInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceBindingsInterface) Get(ctx context.Context, request catalog.GetWorkspaceBindingRequest) (*catalog.CurrentWorkspaceBindings, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *catalog.CurrentWorkspaceBindings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetWorkspaceBindingRequest) (*catalog.CurrentWorkspaceBindings, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetWorkspaceBindingRequest) *catalog.CurrentWorkspaceBindings); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CurrentWorkspaceBindings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetWorkspaceBindingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceBindingsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockWorkspaceBindingsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetWorkspaceBindingRequest -func (_e *MockWorkspaceBindingsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockWorkspaceBindingsInterface_Get_Call { - return &MockWorkspaceBindingsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockWorkspaceBindingsInterface_Get_Call) Run(run func(ctx context.Context, request catalog.GetWorkspaceBindingRequest)) *MockWorkspaceBindingsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetWorkspaceBindingRequest)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_Get_Call) Return(_a0 *catalog.CurrentWorkspaceBindings, _a1 error) *MockWorkspaceBindingsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_Get_Call) RunAndReturn(run func(context.Context, catalog.GetWorkspaceBindingRequest) (*catalog.CurrentWorkspaceBindings, error)) *MockWorkspaceBindingsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetBindings provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceBindingsInterface) GetBindings(ctx context.Context, request catalog.GetBindingsRequest) listing.Iterator[catalog.WorkspaceBinding] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetBindings") - } - - var r0 listing.Iterator[catalog.WorkspaceBinding] - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetBindingsRequest) listing.Iterator[catalog.WorkspaceBinding]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[catalog.WorkspaceBinding]) - } - } - - return r0 -} - -// MockWorkspaceBindingsInterface_GetBindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBindings' -type MockWorkspaceBindingsInterface_GetBindings_Call struct { - *mock.Call -} - -// GetBindings is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetBindingsRequest -func (_e *MockWorkspaceBindingsInterface_Expecter) GetBindings(ctx interface{}, request interface{}) *MockWorkspaceBindingsInterface_GetBindings_Call { - return &MockWorkspaceBindingsInterface_GetBindings_Call{Call: _e.mock.On("GetBindings", ctx, request)} -} - -func (_c *MockWorkspaceBindingsInterface_GetBindings_Call) Run(run func(ctx context.Context, request catalog.GetBindingsRequest)) *MockWorkspaceBindingsInterface_GetBindings_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetBindingsRequest)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetBindings_Call) Return(_a0 listing.Iterator[catalog.WorkspaceBinding]) *MockWorkspaceBindingsInterface_GetBindings_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetBindings_Call) RunAndReturn(run func(context.Context, catalog.GetBindingsRequest) listing.Iterator[catalog.WorkspaceBinding]) *MockWorkspaceBindingsInterface_GetBindings_Call { - _c.Call.Return(run) - return _c -} - -// GetBindingsAll provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceBindingsInterface) GetBindingsAll(ctx context.Context, request catalog.GetBindingsRequest) ([]catalog.WorkspaceBinding, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetBindingsAll") - } - - var r0 []catalog.WorkspaceBinding - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetBindingsRequest) ([]catalog.WorkspaceBinding, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetBindingsRequest) []catalog.WorkspaceBinding); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]catalog.WorkspaceBinding) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetBindingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceBindingsInterface_GetBindingsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBindingsAll' -type MockWorkspaceBindingsInterface_GetBindingsAll_Call struct { - *mock.Call -} - -// GetBindingsAll is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.GetBindingsRequest -func (_e *MockWorkspaceBindingsInterface_Expecter) GetBindingsAll(ctx interface{}, request interface{}) *MockWorkspaceBindingsInterface_GetBindingsAll_Call { - return &MockWorkspaceBindingsInterface_GetBindingsAll_Call{Call: _e.mock.On("GetBindingsAll", ctx, request)} -} - -func (_c *MockWorkspaceBindingsInterface_GetBindingsAll_Call) Run(run func(ctx context.Context, request catalog.GetBindingsRequest)) *MockWorkspaceBindingsInterface_GetBindingsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetBindingsRequest)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetBindingsAll_Call) Return(_a0 []catalog.WorkspaceBinding, _a1 error) *MockWorkspaceBindingsInterface_GetBindingsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetBindingsAll_Call) RunAndReturn(run func(context.Context, catalog.GetBindingsRequest) ([]catalog.WorkspaceBinding, error)) *MockWorkspaceBindingsInterface_GetBindingsAll_Call { - _c.Call.Return(run) - return _c -} - -// GetBindingsBySecurableTypeAndSecurableName provides a mock function with given fields: ctx, securableType, securableName -func (_m *MockWorkspaceBindingsInterface) GetBindingsBySecurableTypeAndSecurableName(ctx context.Context, securableType catalog.GetBindingsSecurableType, securableName string) (*catalog.WorkspaceBindingsResponse, error) { - ret := _m.Called(ctx, securableType, securableName) - - if len(ret) == 0 { - panic("no return value specified for GetBindingsBySecurableTypeAndSecurableName") - } - - var r0 *catalog.WorkspaceBindingsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetBindingsSecurableType, string) (*catalog.WorkspaceBindingsResponse, error)); ok { - return rf(ctx, securableType, securableName) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.GetBindingsSecurableType, string) *catalog.WorkspaceBindingsResponse); ok { - r0 = rf(ctx, securableType, securableName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.WorkspaceBindingsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.GetBindingsSecurableType, string) error); ok { - r1 = rf(ctx, securableType, securableName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBindingsBySecurableTypeAndSecurableName' -type MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call struct { - *mock.Call -} - -// GetBindingsBySecurableTypeAndSecurableName is a helper method to define mock.On call -// - ctx context.Context -// - securableType catalog.GetBindingsSecurableType -// - securableName string -func (_e *MockWorkspaceBindingsInterface_Expecter) GetBindingsBySecurableTypeAndSecurableName(ctx interface{}, securableType interface{}, securableName interface{}) *MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call { - return &MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call{Call: _e.mock.On("GetBindingsBySecurableTypeAndSecurableName", ctx, securableType, securableName)} -} - -func (_c *MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call) Run(run func(ctx context.Context, securableType catalog.GetBindingsSecurableType, securableName string)) *MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.GetBindingsSecurableType), args[2].(string)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call) Return(_a0 *catalog.WorkspaceBindingsResponse, _a1 error) *MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call) RunAndReturn(run func(context.Context, catalog.GetBindingsSecurableType, string) (*catalog.WorkspaceBindingsResponse, error)) *MockWorkspaceBindingsInterface_GetBindingsBySecurableTypeAndSecurableName_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockWorkspaceBindingsInterface) GetByName(ctx context.Context, name string) (*catalog.CurrentWorkspaceBindings, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *catalog.CurrentWorkspaceBindings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.CurrentWorkspaceBindings, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.CurrentWorkspaceBindings); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CurrentWorkspaceBindings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceBindingsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockWorkspaceBindingsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockWorkspaceBindingsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockWorkspaceBindingsInterface_GetByName_Call { - return &MockWorkspaceBindingsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockWorkspaceBindingsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockWorkspaceBindingsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetByName_Call) Return(_a0 *catalog.CurrentWorkspaceBindings, _a1 error) *MockWorkspaceBindingsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.CurrentWorkspaceBindings, error)) *MockWorkspaceBindingsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceBindingsInterface) Update(ctx context.Context, request catalog.UpdateWorkspaceBindings) (*catalog.CurrentWorkspaceBindings, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *catalog.CurrentWorkspaceBindings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateWorkspaceBindings) (*catalog.CurrentWorkspaceBindings, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateWorkspaceBindings) *catalog.CurrentWorkspaceBindings); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.CurrentWorkspaceBindings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateWorkspaceBindings) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceBindingsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockWorkspaceBindingsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateWorkspaceBindings -func (_e *MockWorkspaceBindingsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockWorkspaceBindingsInterface_Update_Call { - return &MockWorkspaceBindingsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockWorkspaceBindingsInterface_Update_Call) Run(run func(ctx context.Context, request catalog.UpdateWorkspaceBindings)) *MockWorkspaceBindingsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateWorkspaceBindings)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_Update_Call) Return(_a0 *catalog.CurrentWorkspaceBindings, _a1 error) *MockWorkspaceBindingsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_Update_Call) RunAndReturn(run func(context.Context, catalog.UpdateWorkspaceBindings) (*catalog.CurrentWorkspaceBindings, error)) *MockWorkspaceBindingsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdateBindings provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceBindingsInterface) UpdateBindings(ctx context.Context, request catalog.UpdateWorkspaceBindingsParameters) (*catalog.WorkspaceBindingsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateBindings") - } - - var r0 *catalog.WorkspaceBindingsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateWorkspaceBindingsParameters) (*catalog.WorkspaceBindingsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, catalog.UpdateWorkspaceBindingsParameters) *catalog.WorkspaceBindingsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.WorkspaceBindingsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, catalog.UpdateWorkspaceBindingsParameters) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceBindingsInterface_UpdateBindings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBindings' -type MockWorkspaceBindingsInterface_UpdateBindings_Call struct { - *mock.Call -} - -// UpdateBindings is a helper method to define mock.On call -// - ctx context.Context -// - request catalog.UpdateWorkspaceBindingsParameters -func (_e *MockWorkspaceBindingsInterface_Expecter) UpdateBindings(ctx interface{}, request interface{}) *MockWorkspaceBindingsInterface_UpdateBindings_Call { - return &MockWorkspaceBindingsInterface_UpdateBindings_Call{Call: _e.mock.On("UpdateBindings", ctx, request)} -} - -func (_c *MockWorkspaceBindingsInterface_UpdateBindings_Call) Run(run func(ctx context.Context, request catalog.UpdateWorkspaceBindingsParameters)) *MockWorkspaceBindingsInterface_UpdateBindings_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(catalog.UpdateWorkspaceBindingsParameters)) - }) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_UpdateBindings_Call) Return(_a0 *catalog.WorkspaceBindingsResponse, _a1 error) *MockWorkspaceBindingsInterface_UpdateBindings_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceBindingsInterface_UpdateBindings_Call) RunAndReturn(run func(context.Context, catalog.UpdateWorkspaceBindingsParameters) (*catalog.WorkspaceBindingsResponse, error)) *MockWorkspaceBindingsInterface_UpdateBindings_Call { - _c.Call.Return(run) - return _c -} - -// NewMockWorkspaceBindingsInterface creates a new instance of MockWorkspaceBindingsInterface. 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 NewMockWorkspaceBindingsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWorkspaceBindingsInterface { - mock := &MockWorkspaceBindingsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/cleanrooms/mock_clean_room_assets_interface.go b/experimental/mocks/service/cleanrooms/mock_clean_room_assets_interface.go deleted file mode 100644 index 05bbc25a7..000000000 --- a/experimental/mocks/service/cleanrooms/mock_clean_room_assets_interface.go +++ /dev/null @@ -1,541 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package cleanrooms - -import ( - context "context" - - cleanrooms "github.com/databricks/databricks-sdk-go/service/cleanrooms" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockCleanRoomAssetsInterface is an autogenerated mock type for the CleanRoomAssetsInterface type -type MockCleanRoomAssetsInterface struct { - mock.Mock -} - -type MockCleanRoomAssetsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCleanRoomAssetsInterface) EXPECT() *MockCleanRoomAssetsInterface_Expecter { - return &MockCleanRoomAssetsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomAssetsInterface) Create(ctx context.Context, request cleanrooms.CreateCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *cleanrooms.CleanRoomAsset - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.CreateCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.CreateCleanRoomAssetRequest) *cleanrooms.CleanRoomAsset); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoomAsset) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.CreateCleanRoomAssetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomAssetsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockCleanRoomAssetsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.CreateCleanRoomAssetRequest -func (_e *MockCleanRoomAssetsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockCleanRoomAssetsInterface_Create_Call { - return &MockCleanRoomAssetsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockCleanRoomAssetsInterface_Create_Call) Run(run func(ctx context.Context, request cleanrooms.CreateCleanRoomAssetRequest)) *MockCleanRoomAssetsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.CreateCleanRoomAssetRequest)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Create_Call) Return(_a0 *cleanrooms.CleanRoomAsset, _a1 error) *MockCleanRoomAssetsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Create_Call) RunAndReturn(run func(context.Context, cleanrooms.CreateCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error)) *MockCleanRoomAssetsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomAssetsInterface) Delete(ctx context.Context, request cleanrooms.DeleteCleanRoomAssetRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.DeleteCleanRoomAssetRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCleanRoomAssetsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockCleanRoomAssetsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.DeleteCleanRoomAssetRequest -func (_e *MockCleanRoomAssetsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockCleanRoomAssetsInterface_Delete_Call { - return &MockCleanRoomAssetsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockCleanRoomAssetsInterface_Delete_Call) Run(run func(ctx context.Context, request cleanrooms.DeleteCleanRoomAssetRequest)) *MockCleanRoomAssetsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.DeleteCleanRoomAssetRequest)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Delete_Call) Return(_a0 error) *MockCleanRoomAssetsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Delete_Call) RunAndReturn(run func(context.Context, cleanrooms.DeleteCleanRoomAssetRequest) error) *MockCleanRoomAssetsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByCleanRoomNameAndAssetTypeAndAssetFullName provides a mock function with given fields: ctx, cleanRoomName, assetType, assetFullName -func (_m *MockCleanRoomAssetsInterface) DeleteByCleanRoomNameAndAssetTypeAndAssetFullName(ctx context.Context, cleanRoomName string, assetType cleanrooms.CleanRoomAssetAssetType, assetFullName string) error { - ret := _m.Called(ctx, cleanRoomName, assetType, assetFullName) - - if len(ret) == 0 { - panic("no return value specified for DeleteByCleanRoomNameAndAssetTypeAndAssetFullName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, cleanrooms.CleanRoomAssetAssetType, string) error); ok { - r0 = rf(ctx, cleanRoomName, assetType, assetFullName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByCleanRoomNameAndAssetTypeAndAssetFullName' -type MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call struct { - *mock.Call -} - -// DeleteByCleanRoomNameAndAssetTypeAndAssetFullName is a helper method to define mock.On call -// - ctx context.Context -// - cleanRoomName string -// - assetType cleanrooms.CleanRoomAssetAssetType -// - assetFullName string -func (_e *MockCleanRoomAssetsInterface_Expecter) DeleteByCleanRoomNameAndAssetTypeAndAssetFullName(ctx interface{}, cleanRoomName interface{}, assetType interface{}, assetFullName interface{}) *MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - return &MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call{Call: _e.mock.On("DeleteByCleanRoomNameAndAssetTypeAndAssetFullName", ctx, cleanRoomName, assetType, assetFullName)} -} - -func (_c *MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call) Run(run func(ctx context.Context, cleanRoomName string, assetType cleanrooms.CleanRoomAssetAssetType, assetFullName string)) *MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(cleanrooms.CleanRoomAssetAssetType), args[3].(string)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call) Return(_a0 error) *MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call) RunAndReturn(run func(context.Context, string, cleanrooms.CleanRoomAssetAssetType, string) error) *MockCleanRoomAssetsInterface_DeleteByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomAssetsInterface) Get(ctx context.Context, request cleanrooms.GetCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *cleanrooms.CleanRoomAsset - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.GetCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.GetCleanRoomAssetRequest) *cleanrooms.CleanRoomAsset); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoomAsset) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.GetCleanRoomAssetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomAssetsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockCleanRoomAssetsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.GetCleanRoomAssetRequest -func (_e *MockCleanRoomAssetsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockCleanRoomAssetsInterface_Get_Call { - return &MockCleanRoomAssetsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockCleanRoomAssetsInterface_Get_Call) Run(run func(ctx context.Context, request cleanrooms.GetCleanRoomAssetRequest)) *MockCleanRoomAssetsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.GetCleanRoomAssetRequest)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Get_Call) Return(_a0 *cleanrooms.CleanRoomAsset, _a1 error) *MockCleanRoomAssetsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Get_Call) RunAndReturn(run func(context.Context, cleanrooms.GetCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error)) *MockCleanRoomAssetsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByCleanRoomNameAndAssetTypeAndAssetFullName provides a mock function with given fields: ctx, cleanRoomName, assetType, assetFullName -func (_m *MockCleanRoomAssetsInterface) GetByCleanRoomNameAndAssetTypeAndAssetFullName(ctx context.Context, cleanRoomName string, assetType cleanrooms.CleanRoomAssetAssetType, assetFullName string) (*cleanrooms.CleanRoomAsset, error) { - ret := _m.Called(ctx, cleanRoomName, assetType, assetFullName) - - if len(ret) == 0 { - panic("no return value specified for GetByCleanRoomNameAndAssetTypeAndAssetFullName") - } - - var r0 *cleanrooms.CleanRoomAsset - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, cleanrooms.CleanRoomAssetAssetType, string) (*cleanrooms.CleanRoomAsset, error)); ok { - return rf(ctx, cleanRoomName, assetType, assetFullName) - } - if rf, ok := ret.Get(0).(func(context.Context, string, cleanrooms.CleanRoomAssetAssetType, string) *cleanrooms.CleanRoomAsset); ok { - r0 = rf(ctx, cleanRoomName, assetType, assetFullName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoomAsset) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, cleanrooms.CleanRoomAssetAssetType, string) error); ok { - r1 = rf(ctx, cleanRoomName, assetType, assetFullName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByCleanRoomNameAndAssetTypeAndAssetFullName' -type MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call struct { - *mock.Call -} - -// GetByCleanRoomNameAndAssetTypeAndAssetFullName is a helper method to define mock.On call -// - ctx context.Context -// - cleanRoomName string -// - assetType cleanrooms.CleanRoomAssetAssetType -// - assetFullName string -func (_e *MockCleanRoomAssetsInterface_Expecter) GetByCleanRoomNameAndAssetTypeAndAssetFullName(ctx interface{}, cleanRoomName interface{}, assetType interface{}, assetFullName interface{}) *MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - return &MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call{Call: _e.mock.On("GetByCleanRoomNameAndAssetTypeAndAssetFullName", ctx, cleanRoomName, assetType, assetFullName)} -} - -func (_c *MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call) Run(run func(ctx context.Context, cleanRoomName string, assetType cleanrooms.CleanRoomAssetAssetType, assetFullName string)) *MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(cleanrooms.CleanRoomAssetAssetType), args[3].(string)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call) Return(_a0 *cleanrooms.CleanRoomAsset, _a1 error) *MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call) RunAndReturn(run func(context.Context, string, cleanrooms.CleanRoomAssetAssetType, string) (*cleanrooms.CleanRoomAsset, error)) *MockCleanRoomAssetsInterface_GetByCleanRoomNameAndAssetTypeAndAssetFullName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomAssetsInterface) List(ctx context.Context, request cleanrooms.ListCleanRoomAssetsRequest) listing.Iterator[cleanrooms.CleanRoomAsset] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[cleanrooms.CleanRoomAsset] - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomAssetsRequest) listing.Iterator[cleanrooms.CleanRoomAsset]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[cleanrooms.CleanRoomAsset]) - } - } - - return r0 -} - -// MockCleanRoomAssetsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockCleanRoomAssetsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.ListCleanRoomAssetsRequest -func (_e *MockCleanRoomAssetsInterface_Expecter) List(ctx interface{}, request interface{}) *MockCleanRoomAssetsInterface_List_Call { - return &MockCleanRoomAssetsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockCleanRoomAssetsInterface_List_Call) Run(run func(ctx context.Context, request cleanrooms.ListCleanRoomAssetsRequest)) *MockCleanRoomAssetsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.ListCleanRoomAssetsRequest)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_List_Call) Return(_a0 listing.Iterator[cleanrooms.CleanRoomAsset]) *MockCleanRoomAssetsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_List_Call) RunAndReturn(run func(context.Context, cleanrooms.ListCleanRoomAssetsRequest) listing.Iterator[cleanrooms.CleanRoomAsset]) *MockCleanRoomAssetsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomAssetsInterface) ListAll(ctx context.Context, request cleanrooms.ListCleanRoomAssetsRequest) ([]cleanrooms.CleanRoomAsset, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []cleanrooms.CleanRoomAsset - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomAssetsRequest) ([]cleanrooms.CleanRoomAsset, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomAssetsRequest) []cleanrooms.CleanRoomAsset); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]cleanrooms.CleanRoomAsset) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.ListCleanRoomAssetsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomAssetsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockCleanRoomAssetsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.ListCleanRoomAssetsRequest -func (_e *MockCleanRoomAssetsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockCleanRoomAssetsInterface_ListAll_Call { - return &MockCleanRoomAssetsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockCleanRoomAssetsInterface_ListAll_Call) Run(run func(ctx context.Context, request cleanrooms.ListCleanRoomAssetsRequest)) *MockCleanRoomAssetsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.ListCleanRoomAssetsRequest)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_ListAll_Call) Return(_a0 []cleanrooms.CleanRoomAsset, _a1 error) *MockCleanRoomAssetsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_ListAll_Call) RunAndReturn(run func(context.Context, cleanrooms.ListCleanRoomAssetsRequest) ([]cleanrooms.CleanRoomAsset, error)) *MockCleanRoomAssetsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByCleanRoomName provides a mock function with given fields: ctx, cleanRoomName -func (_m *MockCleanRoomAssetsInterface) ListByCleanRoomName(ctx context.Context, cleanRoomName string) (*cleanrooms.ListCleanRoomAssetsResponse, error) { - ret := _m.Called(ctx, cleanRoomName) - - if len(ret) == 0 { - panic("no return value specified for ListByCleanRoomName") - } - - var r0 *cleanrooms.ListCleanRoomAssetsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*cleanrooms.ListCleanRoomAssetsResponse, error)); ok { - return rf(ctx, cleanRoomName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *cleanrooms.ListCleanRoomAssetsResponse); ok { - r0 = rf(ctx, cleanRoomName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.ListCleanRoomAssetsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, cleanRoomName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomAssetsInterface_ListByCleanRoomName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByCleanRoomName' -type MockCleanRoomAssetsInterface_ListByCleanRoomName_Call struct { - *mock.Call -} - -// ListByCleanRoomName is a helper method to define mock.On call -// - ctx context.Context -// - cleanRoomName string -func (_e *MockCleanRoomAssetsInterface_Expecter) ListByCleanRoomName(ctx interface{}, cleanRoomName interface{}) *MockCleanRoomAssetsInterface_ListByCleanRoomName_Call { - return &MockCleanRoomAssetsInterface_ListByCleanRoomName_Call{Call: _e.mock.On("ListByCleanRoomName", ctx, cleanRoomName)} -} - -func (_c *MockCleanRoomAssetsInterface_ListByCleanRoomName_Call) Run(run func(ctx context.Context, cleanRoomName string)) *MockCleanRoomAssetsInterface_ListByCleanRoomName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_ListByCleanRoomName_Call) Return(_a0 *cleanrooms.ListCleanRoomAssetsResponse, _a1 error) *MockCleanRoomAssetsInterface_ListByCleanRoomName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_ListByCleanRoomName_Call) RunAndReturn(run func(context.Context, string) (*cleanrooms.ListCleanRoomAssetsResponse, error)) *MockCleanRoomAssetsInterface_ListByCleanRoomName_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomAssetsInterface) Update(ctx context.Context, request cleanrooms.UpdateCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *cleanrooms.CleanRoomAsset - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.UpdateCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.UpdateCleanRoomAssetRequest) *cleanrooms.CleanRoomAsset); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoomAsset) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.UpdateCleanRoomAssetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomAssetsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockCleanRoomAssetsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.UpdateCleanRoomAssetRequest -func (_e *MockCleanRoomAssetsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockCleanRoomAssetsInterface_Update_Call { - return &MockCleanRoomAssetsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockCleanRoomAssetsInterface_Update_Call) Run(run func(ctx context.Context, request cleanrooms.UpdateCleanRoomAssetRequest)) *MockCleanRoomAssetsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.UpdateCleanRoomAssetRequest)) - }) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Update_Call) Return(_a0 *cleanrooms.CleanRoomAsset, _a1 error) *MockCleanRoomAssetsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomAssetsInterface_Update_Call) RunAndReturn(run func(context.Context, cleanrooms.UpdateCleanRoomAssetRequest) (*cleanrooms.CleanRoomAsset, error)) *MockCleanRoomAssetsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCleanRoomAssetsInterface creates a new instance of MockCleanRoomAssetsInterface. 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 NewMockCleanRoomAssetsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCleanRoomAssetsInterface { - mock := &MockCleanRoomAssetsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/cleanrooms/mock_clean_room_task_runs_interface.go b/experimental/mocks/service/cleanrooms/mock_clean_room_task_runs_interface.go deleted file mode 100644 index 1e052c3cd..000000000 --- a/experimental/mocks/service/cleanrooms/mock_clean_room_task_runs_interface.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package cleanrooms - -import ( - context "context" - - cleanrooms "github.com/databricks/databricks-sdk-go/service/cleanrooms" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockCleanRoomTaskRunsInterface is an autogenerated mock type for the CleanRoomTaskRunsInterface type -type MockCleanRoomTaskRunsInterface struct { - mock.Mock -} - -type MockCleanRoomTaskRunsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCleanRoomTaskRunsInterface) EXPECT() *MockCleanRoomTaskRunsInterface_Expecter { - return &MockCleanRoomTaskRunsInterface_Expecter{mock: &_m.Mock} -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomTaskRunsInterface) List(ctx context.Context, request cleanrooms.ListCleanRoomNotebookTaskRunsRequest) listing.Iterator[cleanrooms.CleanRoomNotebookTaskRun] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[cleanrooms.CleanRoomNotebookTaskRun] - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomNotebookTaskRunsRequest) listing.Iterator[cleanrooms.CleanRoomNotebookTaskRun]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[cleanrooms.CleanRoomNotebookTaskRun]) - } - } - - return r0 -} - -// MockCleanRoomTaskRunsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockCleanRoomTaskRunsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.ListCleanRoomNotebookTaskRunsRequest -func (_e *MockCleanRoomTaskRunsInterface_Expecter) List(ctx interface{}, request interface{}) *MockCleanRoomTaskRunsInterface_List_Call { - return &MockCleanRoomTaskRunsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockCleanRoomTaskRunsInterface_List_Call) Run(run func(ctx context.Context, request cleanrooms.ListCleanRoomNotebookTaskRunsRequest)) *MockCleanRoomTaskRunsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.ListCleanRoomNotebookTaskRunsRequest)) - }) - return _c -} - -func (_c *MockCleanRoomTaskRunsInterface_List_Call) Return(_a0 listing.Iterator[cleanrooms.CleanRoomNotebookTaskRun]) *MockCleanRoomTaskRunsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomTaskRunsInterface_List_Call) RunAndReturn(run func(context.Context, cleanrooms.ListCleanRoomNotebookTaskRunsRequest) listing.Iterator[cleanrooms.CleanRoomNotebookTaskRun]) *MockCleanRoomTaskRunsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomTaskRunsInterface) ListAll(ctx context.Context, request cleanrooms.ListCleanRoomNotebookTaskRunsRequest) ([]cleanrooms.CleanRoomNotebookTaskRun, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []cleanrooms.CleanRoomNotebookTaskRun - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomNotebookTaskRunsRequest) ([]cleanrooms.CleanRoomNotebookTaskRun, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomNotebookTaskRunsRequest) []cleanrooms.CleanRoomNotebookTaskRun); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]cleanrooms.CleanRoomNotebookTaskRun) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.ListCleanRoomNotebookTaskRunsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomTaskRunsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockCleanRoomTaskRunsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.ListCleanRoomNotebookTaskRunsRequest -func (_e *MockCleanRoomTaskRunsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockCleanRoomTaskRunsInterface_ListAll_Call { - return &MockCleanRoomTaskRunsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockCleanRoomTaskRunsInterface_ListAll_Call) Run(run func(ctx context.Context, request cleanrooms.ListCleanRoomNotebookTaskRunsRequest)) *MockCleanRoomTaskRunsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.ListCleanRoomNotebookTaskRunsRequest)) - }) - return _c -} - -func (_c *MockCleanRoomTaskRunsInterface_ListAll_Call) Return(_a0 []cleanrooms.CleanRoomNotebookTaskRun, _a1 error) *MockCleanRoomTaskRunsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomTaskRunsInterface_ListAll_Call) RunAndReturn(run func(context.Context, cleanrooms.ListCleanRoomNotebookTaskRunsRequest) ([]cleanrooms.CleanRoomNotebookTaskRun, error)) *MockCleanRoomTaskRunsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByCleanRoomName provides a mock function with given fields: ctx, cleanRoomName -func (_m *MockCleanRoomTaskRunsInterface) ListByCleanRoomName(ctx context.Context, cleanRoomName string) (*cleanrooms.ListCleanRoomNotebookTaskRunsResponse, error) { - ret := _m.Called(ctx, cleanRoomName) - - if len(ret) == 0 { - panic("no return value specified for ListByCleanRoomName") - } - - var r0 *cleanrooms.ListCleanRoomNotebookTaskRunsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*cleanrooms.ListCleanRoomNotebookTaskRunsResponse, error)); ok { - return rf(ctx, cleanRoomName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *cleanrooms.ListCleanRoomNotebookTaskRunsResponse); ok { - r0 = rf(ctx, cleanRoomName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.ListCleanRoomNotebookTaskRunsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, cleanRoomName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByCleanRoomName' -type MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call struct { - *mock.Call -} - -// ListByCleanRoomName is a helper method to define mock.On call -// - ctx context.Context -// - cleanRoomName string -func (_e *MockCleanRoomTaskRunsInterface_Expecter) ListByCleanRoomName(ctx interface{}, cleanRoomName interface{}) *MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call { - return &MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call{Call: _e.mock.On("ListByCleanRoomName", ctx, cleanRoomName)} -} - -func (_c *MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call) Run(run func(ctx context.Context, cleanRoomName string)) *MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call) Return(_a0 *cleanrooms.ListCleanRoomNotebookTaskRunsResponse, _a1 error) *MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call) RunAndReturn(run func(context.Context, string) (*cleanrooms.ListCleanRoomNotebookTaskRunsResponse, error)) *MockCleanRoomTaskRunsInterface_ListByCleanRoomName_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCleanRoomTaskRunsInterface creates a new instance of MockCleanRoomTaskRunsInterface. 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 NewMockCleanRoomTaskRunsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCleanRoomTaskRunsInterface { - mock := &MockCleanRoomTaskRunsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/cleanrooms/mock_clean_rooms_interface.go b/experimental/mocks/service/cleanrooms/mock_clean_rooms_interface.go deleted file mode 100644 index 0a7271e1b..000000000 --- a/experimental/mocks/service/cleanrooms/mock_clean_rooms_interface.go +++ /dev/null @@ -1,537 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package cleanrooms - -import ( - context "context" - - cleanrooms "github.com/databricks/databricks-sdk-go/service/cleanrooms" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockCleanRoomsInterface is an autogenerated mock type for the CleanRoomsInterface type -type MockCleanRoomsInterface struct { - mock.Mock -} - -type MockCleanRoomsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCleanRoomsInterface) EXPECT() *MockCleanRoomsInterface_Expecter { - return &MockCleanRoomsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomsInterface) Create(ctx context.Context, request cleanrooms.CreateCleanRoomRequest) (*cleanrooms.CleanRoom, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *cleanrooms.CleanRoom - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.CreateCleanRoomRequest) (*cleanrooms.CleanRoom, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.CreateCleanRoomRequest) *cleanrooms.CleanRoom); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoom) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.CreateCleanRoomRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockCleanRoomsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.CreateCleanRoomRequest -func (_e *MockCleanRoomsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockCleanRoomsInterface_Create_Call { - return &MockCleanRoomsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockCleanRoomsInterface_Create_Call) Run(run func(ctx context.Context, request cleanrooms.CreateCleanRoomRequest)) *MockCleanRoomsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.CreateCleanRoomRequest)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_Create_Call) Return(_a0 *cleanrooms.CleanRoom, _a1 error) *MockCleanRoomsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomsInterface_Create_Call) RunAndReturn(run func(context.Context, cleanrooms.CreateCleanRoomRequest) (*cleanrooms.CleanRoom, error)) *MockCleanRoomsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateOutputCatalog provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomsInterface) CreateOutputCatalog(ctx context.Context, request cleanrooms.CreateCleanRoomOutputCatalogRequest) (*cleanrooms.CreateCleanRoomOutputCatalogResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateOutputCatalog") - } - - var r0 *cleanrooms.CreateCleanRoomOutputCatalogResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.CreateCleanRoomOutputCatalogRequest) (*cleanrooms.CreateCleanRoomOutputCatalogResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.CreateCleanRoomOutputCatalogRequest) *cleanrooms.CreateCleanRoomOutputCatalogResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CreateCleanRoomOutputCatalogResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.CreateCleanRoomOutputCatalogRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomsInterface_CreateOutputCatalog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOutputCatalog' -type MockCleanRoomsInterface_CreateOutputCatalog_Call struct { - *mock.Call -} - -// CreateOutputCatalog is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.CreateCleanRoomOutputCatalogRequest -func (_e *MockCleanRoomsInterface_Expecter) CreateOutputCatalog(ctx interface{}, request interface{}) *MockCleanRoomsInterface_CreateOutputCatalog_Call { - return &MockCleanRoomsInterface_CreateOutputCatalog_Call{Call: _e.mock.On("CreateOutputCatalog", ctx, request)} -} - -func (_c *MockCleanRoomsInterface_CreateOutputCatalog_Call) Run(run func(ctx context.Context, request cleanrooms.CreateCleanRoomOutputCatalogRequest)) *MockCleanRoomsInterface_CreateOutputCatalog_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.CreateCleanRoomOutputCatalogRequest)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_CreateOutputCatalog_Call) Return(_a0 *cleanrooms.CreateCleanRoomOutputCatalogResponse, _a1 error) *MockCleanRoomsInterface_CreateOutputCatalog_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomsInterface_CreateOutputCatalog_Call) RunAndReturn(run func(context.Context, cleanrooms.CreateCleanRoomOutputCatalogRequest) (*cleanrooms.CreateCleanRoomOutputCatalogResponse, error)) *MockCleanRoomsInterface_CreateOutputCatalog_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomsInterface) Delete(ctx context.Context, request cleanrooms.DeleteCleanRoomRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.DeleteCleanRoomRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCleanRoomsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockCleanRoomsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.DeleteCleanRoomRequest -func (_e *MockCleanRoomsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockCleanRoomsInterface_Delete_Call { - return &MockCleanRoomsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockCleanRoomsInterface_Delete_Call) Run(run func(ctx context.Context, request cleanrooms.DeleteCleanRoomRequest)) *MockCleanRoomsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.DeleteCleanRoomRequest)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_Delete_Call) Return(_a0 error) *MockCleanRoomsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomsInterface_Delete_Call) RunAndReturn(run func(context.Context, cleanrooms.DeleteCleanRoomRequest) error) *MockCleanRoomsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockCleanRoomsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCleanRoomsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockCleanRoomsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockCleanRoomsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockCleanRoomsInterface_DeleteByName_Call { - return &MockCleanRoomsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockCleanRoomsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockCleanRoomsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_DeleteByName_Call) Return(_a0 error) *MockCleanRoomsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockCleanRoomsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomsInterface) Get(ctx context.Context, request cleanrooms.GetCleanRoomRequest) (*cleanrooms.CleanRoom, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *cleanrooms.CleanRoom - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.GetCleanRoomRequest) (*cleanrooms.CleanRoom, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.GetCleanRoomRequest) *cleanrooms.CleanRoom); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoom) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.GetCleanRoomRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockCleanRoomsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.GetCleanRoomRequest -func (_e *MockCleanRoomsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockCleanRoomsInterface_Get_Call { - return &MockCleanRoomsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockCleanRoomsInterface_Get_Call) Run(run func(ctx context.Context, request cleanrooms.GetCleanRoomRequest)) *MockCleanRoomsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.GetCleanRoomRequest)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_Get_Call) Return(_a0 *cleanrooms.CleanRoom, _a1 error) *MockCleanRoomsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomsInterface_Get_Call) RunAndReturn(run func(context.Context, cleanrooms.GetCleanRoomRequest) (*cleanrooms.CleanRoom, error)) *MockCleanRoomsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockCleanRoomsInterface) GetByName(ctx context.Context, name string) (*cleanrooms.CleanRoom, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *cleanrooms.CleanRoom - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*cleanrooms.CleanRoom, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *cleanrooms.CleanRoom); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoom) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockCleanRoomsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockCleanRoomsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockCleanRoomsInterface_GetByName_Call { - return &MockCleanRoomsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockCleanRoomsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockCleanRoomsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_GetByName_Call) Return(_a0 *cleanrooms.CleanRoom, _a1 error) *MockCleanRoomsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*cleanrooms.CleanRoom, error)) *MockCleanRoomsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomsInterface) List(ctx context.Context, request cleanrooms.ListCleanRoomsRequest) listing.Iterator[cleanrooms.CleanRoom] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[cleanrooms.CleanRoom] - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomsRequest) listing.Iterator[cleanrooms.CleanRoom]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[cleanrooms.CleanRoom]) - } - } - - return r0 -} - -// MockCleanRoomsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockCleanRoomsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.ListCleanRoomsRequest -func (_e *MockCleanRoomsInterface_Expecter) List(ctx interface{}, request interface{}) *MockCleanRoomsInterface_List_Call { - return &MockCleanRoomsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockCleanRoomsInterface_List_Call) Run(run func(ctx context.Context, request cleanrooms.ListCleanRoomsRequest)) *MockCleanRoomsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.ListCleanRoomsRequest)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_List_Call) Return(_a0 listing.Iterator[cleanrooms.CleanRoom]) *MockCleanRoomsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCleanRoomsInterface_List_Call) RunAndReturn(run func(context.Context, cleanrooms.ListCleanRoomsRequest) listing.Iterator[cleanrooms.CleanRoom]) *MockCleanRoomsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomsInterface) ListAll(ctx context.Context, request cleanrooms.ListCleanRoomsRequest) ([]cleanrooms.CleanRoom, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []cleanrooms.CleanRoom - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomsRequest) ([]cleanrooms.CleanRoom, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.ListCleanRoomsRequest) []cleanrooms.CleanRoom); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]cleanrooms.CleanRoom) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.ListCleanRoomsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockCleanRoomsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.ListCleanRoomsRequest -func (_e *MockCleanRoomsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockCleanRoomsInterface_ListAll_Call { - return &MockCleanRoomsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockCleanRoomsInterface_ListAll_Call) Run(run func(ctx context.Context, request cleanrooms.ListCleanRoomsRequest)) *MockCleanRoomsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.ListCleanRoomsRequest)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_ListAll_Call) Return(_a0 []cleanrooms.CleanRoom, _a1 error) *MockCleanRoomsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomsInterface_ListAll_Call) RunAndReturn(run func(context.Context, cleanrooms.ListCleanRoomsRequest) ([]cleanrooms.CleanRoom, error)) *MockCleanRoomsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockCleanRoomsInterface) Update(ctx context.Context, request cleanrooms.UpdateCleanRoomRequest) (*cleanrooms.CleanRoom, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *cleanrooms.CleanRoom - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.UpdateCleanRoomRequest) (*cleanrooms.CleanRoom, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, cleanrooms.UpdateCleanRoomRequest) *cleanrooms.CleanRoom); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*cleanrooms.CleanRoom) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, cleanrooms.UpdateCleanRoomRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCleanRoomsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockCleanRoomsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request cleanrooms.UpdateCleanRoomRequest -func (_e *MockCleanRoomsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockCleanRoomsInterface_Update_Call { - return &MockCleanRoomsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockCleanRoomsInterface_Update_Call) Run(run func(ctx context.Context, request cleanrooms.UpdateCleanRoomRequest)) *MockCleanRoomsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cleanrooms.UpdateCleanRoomRequest)) - }) - return _c -} - -func (_c *MockCleanRoomsInterface_Update_Call) Return(_a0 *cleanrooms.CleanRoom, _a1 error) *MockCleanRoomsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCleanRoomsInterface_Update_Call) RunAndReturn(run func(context.Context, cleanrooms.UpdateCleanRoomRequest) (*cleanrooms.CleanRoom, error)) *MockCleanRoomsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCleanRoomsInterface creates a new instance of MockCleanRoomsInterface. 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 NewMockCleanRoomsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCleanRoomsInterface { - mock := &MockCleanRoomsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_cluster_policies_interface.go b/experimental/mocks/service/compute/mock_cluster_policies_interface.go deleted file mode 100644 index 869afe49e..000000000 --- a/experimental/mocks/service/compute/mock_cluster_policies_interface.go +++ /dev/null @@ -1,938 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockClusterPoliciesInterface is an autogenerated mock type for the ClusterPoliciesInterface type -type MockClusterPoliciesInterface struct { - mock.Mock -} - -type MockClusterPoliciesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockClusterPoliciesInterface) EXPECT() *MockClusterPoliciesInterface_Expecter { - return &MockClusterPoliciesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) Create(ctx context.Context, request compute.CreatePolicy) (*compute.CreatePolicyResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *compute.CreatePolicyResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CreatePolicy) (*compute.CreatePolicyResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CreatePolicy) *compute.CreatePolicyResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CreatePolicyResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CreatePolicy) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockClusterPoliciesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request compute.CreatePolicy -func (_e *MockClusterPoliciesInterface_Expecter) Create(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_Create_Call { - return &MockClusterPoliciesInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_Create_Call) Run(run func(ctx context.Context, request compute.CreatePolicy)) *MockClusterPoliciesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.CreatePolicy)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_Create_Call) Return(_a0 *compute.CreatePolicyResponse, _a1 error) *MockClusterPoliciesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_Create_Call) RunAndReturn(run func(context.Context, compute.CreatePolicy) (*compute.CreatePolicyResponse, error)) *MockClusterPoliciesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) Delete(ctx context.Context, request compute.DeletePolicy) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.DeletePolicy) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClusterPoliciesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockClusterPoliciesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request compute.DeletePolicy -func (_e *MockClusterPoliciesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_Delete_Call { - return &MockClusterPoliciesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_Delete_Call) Run(run func(ctx context.Context, request compute.DeletePolicy)) *MockClusterPoliciesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.DeletePolicy)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_Delete_Call) Return(_a0 error) *MockClusterPoliciesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClusterPoliciesInterface_Delete_Call) RunAndReturn(run func(context.Context, compute.DeletePolicy) error) *MockClusterPoliciesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByPolicyId provides a mock function with given fields: ctx, policyId -func (_m *MockClusterPoliciesInterface) DeleteByPolicyId(ctx context.Context, policyId string) error { - ret := _m.Called(ctx, policyId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByPolicyId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, policyId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClusterPoliciesInterface_DeleteByPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByPolicyId' -type MockClusterPoliciesInterface_DeleteByPolicyId_Call struct { - *mock.Call -} - -// DeleteByPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - policyId string -func (_e *MockClusterPoliciesInterface_Expecter) DeleteByPolicyId(ctx interface{}, policyId interface{}) *MockClusterPoliciesInterface_DeleteByPolicyId_Call { - return &MockClusterPoliciesInterface_DeleteByPolicyId_Call{Call: _e.mock.On("DeleteByPolicyId", ctx, policyId)} -} - -func (_c *MockClusterPoliciesInterface_DeleteByPolicyId_Call) Run(run func(ctx context.Context, policyId string)) *MockClusterPoliciesInterface_DeleteByPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_DeleteByPolicyId_Call) Return(_a0 error) *MockClusterPoliciesInterface_DeleteByPolicyId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClusterPoliciesInterface_DeleteByPolicyId_Call) RunAndReturn(run func(context.Context, string) error) *MockClusterPoliciesInterface_DeleteByPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// Edit provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) Edit(ctx context.Context, request compute.EditPolicy) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Edit") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.EditPolicy) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClusterPoliciesInterface_Edit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Edit' -type MockClusterPoliciesInterface_Edit_Call struct { - *mock.Call -} - -// Edit is a helper method to define mock.On call -// - ctx context.Context -// - request compute.EditPolicy -func (_e *MockClusterPoliciesInterface_Expecter) Edit(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_Edit_Call { - return &MockClusterPoliciesInterface_Edit_Call{Call: _e.mock.On("Edit", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_Edit_Call) Run(run func(ctx context.Context, request compute.EditPolicy)) *MockClusterPoliciesInterface_Edit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.EditPolicy)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_Edit_Call) Return(_a0 error) *MockClusterPoliciesInterface_Edit_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClusterPoliciesInterface_Edit_Call) RunAndReturn(run func(context.Context, compute.EditPolicy) error) *MockClusterPoliciesInterface_Edit_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) Get(ctx context.Context, request compute.GetClusterPolicyRequest) (*compute.Policy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *compute.Policy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyRequest) (*compute.Policy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyRequest) *compute.Policy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.Policy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterPolicyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockClusterPoliciesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetClusterPolicyRequest -func (_e *MockClusterPoliciesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_Get_Call { - return &MockClusterPoliciesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_Get_Call) Run(run func(ctx context.Context, request compute.GetClusterPolicyRequest)) *MockClusterPoliciesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterPolicyRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_Get_Call) Return(_a0 *compute.Policy, _a1 error) *MockClusterPoliciesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_Get_Call) RunAndReturn(run func(context.Context, compute.GetClusterPolicyRequest) (*compute.Policy, error)) *MockClusterPoliciesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockClusterPoliciesInterface) GetByName(ctx context.Context, name string) (*compute.Policy, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *compute.Policy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.Policy, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.Policy); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.Policy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockClusterPoliciesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockClusterPoliciesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockClusterPoliciesInterface_GetByName_Call { - return &MockClusterPoliciesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockClusterPoliciesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockClusterPoliciesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetByName_Call) Return(_a0 *compute.Policy, _a1 error) *MockClusterPoliciesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*compute.Policy, error)) *MockClusterPoliciesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetByPolicyId provides a mock function with given fields: ctx, policyId -func (_m *MockClusterPoliciesInterface) GetByPolicyId(ctx context.Context, policyId string) (*compute.Policy, error) { - ret := _m.Called(ctx, policyId) - - if len(ret) == 0 { - panic("no return value specified for GetByPolicyId") - } - - var r0 *compute.Policy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.Policy, error)); ok { - return rf(ctx, policyId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.Policy); ok { - r0 = rf(ctx, policyId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.Policy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, policyId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_GetByPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPolicyId' -type MockClusterPoliciesInterface_GetByPolicyId_Call struct { - *mock.Call -} - -// GetByPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - policyId string -func (_e *MockClusterPoliciesInterface_Expecter) GetByPolicyId(ctx interface{}, policyId interface{}) *MockClusterPoliciesInterface_GetByPolicyId_Call { - return &MockClusterPoliciesInterface_GetByPolicyId_Call{Call: _e.mock.On("GetByPolicyId", ctx, policyId)} -} - -func (_c *MockClusterPoliciesInterface_GetByPolicyId_Call) Run(run func(ctx context.Context, policyId string)) *MockClusterPoliciesInterface_GetByPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetByPolicyId_Call) Return(_a0 *compute.Policy, _a1 error) *MockClusterPoliciesInterface_GetByPolicyId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetByPolicyId_Call) RunAndReturn(run func(context.Context, string) (*compute.Policy, error)) *MockClusterPoliciesInterface_GetByPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) GetPermissionLevels(ctx context.Context, request compute.GetClusterPolicyPermissionLevelsRequest) (*compute.GetClusterPolicyPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *compute.GetClusterPolicyPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyPermissionLevelsRequest) (*compute.GetClusterPolicyPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyPermissionLevelsRequest) *compute.GetClusterPolicyPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetClusterPolicyPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterPolicyPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockClusterPoliciesInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetClusterPolicyPermissionLevelsRequest -func (_e *MockClusterPoliciesInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_GetPermissionLevels_Call { - return &MockClusterPoliciesInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request compute.GetClusterPolicyPermissionLevelsRequest)) *MockClusterPoliciesInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterPolicyPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissionLevels_Call) Return(_a0 *compute.GetClusterPolicyPermissionLevelsResponse, _a1 error) *MockClusterPoliciesInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, compute.GetClusterPolicyPermissionLevelsRequest) (*compute.GetClusterPolicyPermissionLevelsResponse, error)) *MockClusterPoliciesInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByClusterPolicyId provides a mock function with given fields: ctx, clusterPolicyId -func (_m *MockClusterPoliciesInterface) GetPermissionLevelsByClusterPolicyId(ctx context.Context, clusterPolicyId string) (*compute.GetClusterPolicyPermissionLevelsResponse, error) { - ret := _m.Called(ctx, clusterPolicyId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByClusterPolicyId") - } - - var r0 *compute.GetClusterPolicyPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.GetClusterPolicyPermissionLevelsResponse, error)); ok { - return rf(ctx, clusterPolicyId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.GetClusterPolicyPermissionLevelsResponse); ok { - r0 = rf(ctx, clusterPolicyId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetClusterPolicyPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, clusterPolicyId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByClusterPolicyId' -type MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByClusterPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - clusterPolicyId string -func (_e *MockClusterPoliciesInterface_Expecter) GetPermissionLevelsByClusterPolicyId(ctx interface{}, clusterPolicyId interface{}) *MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call { - return &MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call{Call: _e.mock.On("GetPermissionLevelsByClusterPolicyId", ctx, clusterPolicyId)} -} - -func (_c *MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call) Run(run func(ctx context.Context, clusterPolicyId string)) *MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call) Return(_a0 *compute.GetClusterPolicyPermissionLevelsResponse, _a1 error) *MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call) RunAndReturn(run func(context.Context, string) (*compute.GetClusterPolicyPermissionLevelsResponse, error)) *MockClusterPoliciesInterface_GetPermissionLevelsByClusterPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) GetPermissions(ctx context.Context, request compute.GetClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *compute.ClusterPolicyPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPolicyPermissionsRequest) *compute.ClusterPolicyPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPolicyPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterPolicyPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockClusterPoliciesInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetClusterPolicyPermissionsRequest -func (_e *MockClusterPoliciesInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_GetPermissions_Call { - return &MockClusterPoliciesInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_GetPermissions_Call) Run(run func(ctx context.Context, request compute.GetClusterPolicyPermissionsRequest)) *MockClusterPoliciesInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterPolicyPermissionsRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissions_Call) Return(_a0 *compute.ClusterPolicyPermissions, _a1 error) *MockClusterPoliciesInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, compute.GetClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error)) *MockClusterPoliciesInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByClusterPolicyId provides a mock function with given fields: ctx, clusterPolicyId -func (_m *MockClusterPoliciesInterface) GetPermissionsByClusterPolicyId(ctx context.Context, clusterPolicyId string) (*compute.ClusterPolicyPermissions, error) { - ret := _m.Called(ctx, clusterPolicyId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByClusterPolicyId") - } - - var r0 *compute.ClusterPolicyPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.ClusterPolicyPermissions, error)); ok { - return rf(ctx, clusterPolicyId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.ClusterPolicyPermissions); ok { - r0 = rf(ctx, clusterPolicyId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPolicyPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, clusterPolicyId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByClusterPolicyId' -type MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call struct { - *mock.Call -} - -// GetPermissionsByClusterPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - clusterPolicyId string -func (_e *MockClusterPoliciesInterface_Expecter) GetPermissionsByClusterPolicyId(ctx interface{}, clusterPolicyId interface{}) *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call { - return &MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call{Call: _e.mock.On("GetPermissionsByClusterPolicyId", ctx, clusterPolicyId)} -} - -func (_c *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call) Run(run func(ctx context.Context, clusterPolicyId string)) *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call) Return(_a0 *compute.ClusterPolicyPermissions, _a1 error) *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call) RunAndReturn(run func(context.Context, string) (*compute.ClusterPolicyPermissions, error)) *MockClusterPoliciesInterface_GetPermissionsByClusterPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) List(ctx context.Context, request compute.ListClusterPoliciesRequest) listing.Iterator[compute.Policy] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[compute.Policy] - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) listing.Iterator[compute.Policy]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.Policy]) - } - } - - return r0 -} - -// MockClusterPoliciesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockClusterPoliciesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClusterPoliciesRequest -func (_e *MockClusterPoliciesInterface_Expecter) List(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_List_Call { - return &MockClusterPoliciesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_List_Call) Run(run func(ctx context.Context, request compute.ListClusterPoliciesRequest)) *MockClusterPoliciesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterPoliciesRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_List_Call) Return(_a0 listing.Iterator[compute.Policy]) *MockClusterPoliciesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClusterPoliciesInterface_List_Call) RunAndReturn(run func(context.Context, compute.ListClusterPoliciesRequest) listing.Iterator[compute.Policy]) *MockClusterPoliciesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) ListAll(ctx context.Context, request compute.ListClusterPoliciesRequest) ([]compute.Policy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []compute.Policy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) ([]compute.Policy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) []compute.Policy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.Policy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ListClusterPoliciesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockClusterPoliciesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClusterPoliciesRequest -func (_e *MockClusterPoliciesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_ListAll_Call { - return &MockClusterPoliciesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_ListAll_Call) Run(run func(ctx context.Context, request compute.ListClusterPoliciesRequest)) *MockClusterPoliciesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterPoliciesRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_ListAll_Call) Return(_a0 []compute.Policy, _a1 error) *MockClusterPoliciesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_ListAll_Call) RunAndReturn(run func(context.Context, compute.ListClusterPoliciesRequest) ([]compute.Policy, error)) *MockClusterPoliciesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// PolicyNameToPolicyIdMap provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) PolicyNameToPolicyIdMap(ctx context.Context, request compute.ListClusterPoliciesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for PolicyNameToPolicyIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterPoliciesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ListClusterPoliciesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PolicyNameToPolicyIdMap' -type MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call struct { - *mock.Call -} - -// PolicyNameToPolicyIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClusterPoliciesRequest -func (_e *MockClusterPoliciesInterface_Expecter) PolicyNameToPolicyIdMap(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call { - return &MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call{Call: _e.mock.On("PolicyNameToPolicyIdMap", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call) Run(run func(ctx context.Context, request compute.ListClusterPoliciesRequest)) *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterPoliciesRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call) RunAndReturn(run func(context.Context, compute.ListClusterPoliciesRequest) (map[string]string, error)) *MockClusterPoliciesInterface_PolicyNameToPolicyIdMap_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) SetPermissions(ctx context.Context, request compute.ClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *compute.ClusterPolicyPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPolicyPermissionsRequest) *compute.ClusterPolicyPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPolicyPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ClusterPolicyPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockClusterPoliciesInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ClusterPolicyPermissionsRequest -func (_e *MockClusterPoliciesInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_SetPermissions_Call { - return &MockClusterPoliciesInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_SetPermissions_Call) Run(run func(ctx context.Context, request compute.ClusterPolicyPermissionsRequest)) *MockClusterPoliciesInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ClusterPolicyPermissionsRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_SetPermissions_Call) Return(_a0 *compute.ClusterPolicyPermissions, _a1 error) *MockClusterPoliciesInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, compute.ClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error)) *MockClusterPoliciesInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockClusterPoliciesInterface) UpdatePermissions(ctx context.Context, request compute.ClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *compute.ClusterPolicyPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPolicyPermissionsRequest) *compute.ClusterPolicyPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPolicyPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ClusterPolicyPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClusterPoliciesInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockClusterPoliciesInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ClusterPolicyPermissionsRequest -func (_e *MockClusterPoliciesInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockClusterPoliciesInterface_UpdatePermissions_Call { - return &MockClusterPoliciesInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockClusterPoliciesInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request compute.ClusterPolicyPermissionsRequest)) *MockClusterPoliciesInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ClusterPolicyPermissionsRequest)) - }) - return _c -} - -func (_c *MockClusterPoliciesInterface_UpdatePermissions_Call) Return(_a0 *compute.ClusterPolicyPermissions, _a1 error) *MockClusterPoliciesInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClusterPoliciesInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, compute.ClusterPolicyPermissionsRequest) (*compute.ClusterPolicyPermissions, error)) *MockClusterPoliciesInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// NewMockClusterPoliciesInterface creates a new instance of MockClusterPoliciesInterface. 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 NewMockClusterPoliciesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockClusterPoliciesInterface { - mock := &MockClusterPoliciesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_clusters_interface.go b/experimental/mocks/service/compute/mock_clusters_interface.go deleted file mode 100644 index be48ba31e..000000000 --- a/experimental/mocks/service/compute/mock_clusters_interface.go +++ /dev/null @@ -1,2883 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockClustersInterface is an autogenerated mock type for the ClustersInterface type -type MockClustersInterface struct { - mock.Mock -} - -type MockClustersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockClustersInterface) EXPECT() *MockClustersInterface_Expecter { - return &MockClustersInterface_Expecter{mock: &_m.Mock} -} - -// ChangeOwner provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) ChangeOwner(ctx context.Context, request compute.ChangeClusterOwner) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ChangeOwner") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ChangeClusterOwner) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_ChangeOwner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeOwner' -type MockClustersInterface_ChangeOwner_Call struct { - *mock.Call -} - -// ChangeOwner is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ChangeClusterOwner -func (_e *MockClustersInterface_Expecter) ChangeOwner(ctx interface{}, request interface{}) *MockClustersInterface_ChangeOwner_Call { - return &MockClustersInterface_ChangeOwner_Call{Call: _e.mock.On("ChangeOwner", ctx, request)} -} - -func (_c *MockClustersInterface_ChangeOwner_Call) Run(run func(ctx context.Context, request compute.ChangeClusterOwner)) *MockClustersInterface_ChangeOwner_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ChangeClusterOwner)) - }) - return _c -} - -func (_c *MockClustersInterface_ChangeOwner_Call) Return(_a0 error) *MockClustersInterface_ChangeOwner_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_ChangeOwner_Call) RunAndReturn(run func(context.Context, compute.ChangeClusterOwner) error) *MockClustersInterface_ChangeOwner_Call { - _c.Call.Return(run) - return _c -} - -// ClusterDetailsClusterNameToClusterIdMap provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) ClusterDetailsClusterNameToClusterIdMap(ctx context.Context, request compute.ListClustersRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ClusterDetailsClusterNameToClusterIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClustersRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClustersRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ListClustersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClusterDetailsClusterNameToClusterIdMap' -type MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call struct { - *mock.Call -} - -// ClusterDetailsClusterNameToClusterIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClustersRequest -func (_e *MockClustersInterface_Expecter) ClusterDetailsClusterNameToClusterIdMap(ctx interface{}, request interface{}) *MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call { - return &MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call{Call: _e.mock.On("ClusterDetailsClusterNameToClusterIdMap", ctx, request)} -} - -func (_c *MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call) Run(run func(ctx context.Context, request compute.ListClustersRequest)) *MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClustersRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call) RunAndReturn(run func(context.Context, compute.ListClustersRequest) (map[string]string, error)) *MockClustersInterface_ClusterDetailsClusterNameToClusterIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, createCluster -func (_m *MockClustersInterface) Create(ctx context.Context, createCluster compute.CreateCluster) (*compute.WaitGetClusterRunning[compute.CreateClusterResponse], error) { - ret := _m.Called(ctx, createCluster) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *compute.WaitGetClusterRunning[compute.CreateClusterResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateCluster) (*compute.WaitGetClusterRunning[compute.CreateClusterResponse], error)); ok { - return rf(ctx, createCluster) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateCluster) *compute.WaitGetClusterRunning[compute.CreateClusterResponse]); ok { - r0 = rf(ctx, createCluster) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitGetClusterRunning[compute.CreateClusterResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CreateCluster) error); ok { - r1 = rf(ctx, createCluster) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockClustersInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - createCluster compute.CreateCluster -func (_e *MockClustersInterface_Expecter) Create(ctx interface{}, createCluster interface{}) *MockClustersInterface_Create_Call { - return &MockClustersInterface_Create_Call{Call: _e.mock.On("Create", ctx, createCluster)} -} - -func (_c *MockClustersInterface_Create_Call) Run(run func(ctx context.Context, createCluster compute.CreateCluster)) *MockClustersInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.CreateCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Create_Call) Return(_a0 *compute.WaitGetClusterRunning[compute.CreateClusterResponse], _a1 error) *MockClustersInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Create_Call) RunAndReturn(run func(context.Context, compute.CreateCluster) (*compute.WaitGetClusterRunning[compute.CreateClusterResponse], error)) *MockClustersInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateAndWait provides a mock function with given fields: ctx, createCluster, options -func (_m *MockClustersInterface) CreateAndWait(ctx context.Context, createCluster compute.CreateCluster, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createCluster) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, createCluster, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateCluster, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, createCluster, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CreateCluster, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, createCluster, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait' -type MockClustersInterface_CreateAndWait_Call struct { - *mock.Call -} - -// CreateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createCluster compute.CreateCluster -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) CreateAndWait(ctx interface{}, createCluster interface{}, options ...interface{}) *MockClustersInterface_CreateAndWait_Call { - return &MockClustersInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait", - append([]interface{}{ctx, createCluster}, options...)...)} -} - -func (_c *MockClustersInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createCluster compute.CreateCluster, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_CreateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(compute.CreateCluster), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_CreateAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_CreateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, compute.CreateCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_CreateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, deleteCluster -func (_m *MockClustersInterface) Delete(ctx context.Context, deleteCluster compute.DeleteCluster) (*compute.WaitGetClusterTerminated[struct{}], error) { - ret := _m.Called(ctx, deleteCluster) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *compute.WaitGetClusterTerminated[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.DeleteCluster) (*compute.WaitGetClusterTerminated[struct{}], error)); ok { - return rf(ctx, deleteCluster) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.DeleteCluster) *compute.WaitGetClusterTerminated[struct{}]); ok { - r0 = rf(ctx, deleteCluster) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitGetClusterTerminated[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.DeleteCluster) error); ok { - r1 = rf(ctx, deleteCluster) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockClustersInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - deleteCluster compute.DeleteCluster -func (_e *MockClustersInterface_Expecter) Delete(ctx interface{}, deleteCluster interface{}) *MockClustersInterface_Delete_Call { - return &MockClustersInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, deleteCluster)} -} - -func (_c *MockClustersInterface_Delete_Call) Run(run func(ctx context.Context, deleteCluster compute.DeleteCluster)) *MockClustersInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.DeleteCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Delete_Call) Return(_a0 *compute.WaitGetClusterTerminated[struct{}], _a1 error) *MockClustersInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Delete_Call) RunAndReturn(run func(context.Context, compute.DeleteCluster) (*compute.WaitGetClusterTerminated[struct{}], error)) *MockClustersInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteAndWait provides a mock function with given fields: ctx, deleteCluster, options -func (_m *MockClustersInterface) DeleteAndWait(ctx context.Context, deleteCluster compute.DeleteCluster, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, deleteCluster) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for DeleteAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.DeleteCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, deleteCluster, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.DeleteCluster, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, deleteCluster, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.DeleteCluster, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, deleteCluster, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_DeleteAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAndWait' -type MockClustersInterface_DeleteAndWait_Call struct { - *mock.Call -} - -// DeleteAndWait is a helper method to define mock.On call -// - ctx context.Context -// - deleteCluster compute.DeleteCluster -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) DeleteAndWait(ctx interface{}, deleteCluster interface{}, options ...interface{}) *MockClustersInterface_DeleteAndWait_Call { - return &MockClustersInterface_DeleteAndWait_Call{Call: _e.mock.On("DeleteAndWait", - append([]interface{}{ctx, deleteCluster}, options...)...)} -} - -func (_c *MockClustersInterface_DeleteAndWait_Call) Run(run func(ctx context.Context, deleteCluster compute.DeleteCluster, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_DeleteAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(compute.DeleteCluster), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_DeleteAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_DeleteAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_DeleteAndWait_Call) RunAndReturn(run func(context.Context, compute.DeleteCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_DeleteAndWait_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) DeleteByClusterId(ctx context.Context, clusterId string) error { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByClusterId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, clusterId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_DeleteByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByClusterId' -type MockClustersInterface_DeleteByClusterId_Call struct { - *mock.Call -} - -// DeleteByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) DeleteByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_DeleteByClusterId_Call { - return &MockClustersInterface_DeleteByClusterId_Call{Call: _e.mock.On("DeleteByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_DeleteByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_DeleteByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_DeleteByClusterId_Call) Return(_a0 error) *MockClustersInterface_DeleteByClusterId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_DeleteByClusterId_Call) RunAndReturn(run func(context.Context, string) error) *MockClustersInterface_DeleteByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByClusterIdAndWait provides a mock function with given fields: ctx, clusterId, options -func (_m *MockClustersInterface) DeleteByClusterIdAndWait(ctx context.Context, clusterId string, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, clusterId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for DeleteByClusterIdAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, clusterId, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, clusterId, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, clusterId, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_DeleteByClusterIdAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByClusterIdAndWait' -type MockClustersInterface_DeleteByClusterIdAndWait_Call struct { - *mock.Call -} - -// DeleteByClusterIdAndWait is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) DeleteByClusterIdAndWait(ctx interface{}, clusterId interface{}, options ...interface{}) *MockClustersInterface_DeleteByClusterIdAndWait_Call { - return &MockClustersInterface_DeleteByClusterIdAndWait_Call{Call: _e.mock.On("DeleteByClusterIdAndWait", - append([]interface{}{ctx, clusterId}, options...)...)} -} - -func (_c *MockClustersInterface_DeleteByClusterIdAndWait_Call) Run(run func(ctx context.Context, clusterId string, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_DeleteByClusterIdAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(string), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_DeleteByClusterIdAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_DeleteByClusterIdAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_DeleteByClusterIdAndWait_Call) RunAndReturn(run func(context.Context, string, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_DeleteByClusterIdAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Edit provides a mock function with given fields: ctx, editCluster -func (_m *MockClustersInterface) Edit(ctx context.Context, editCluster compute.EditCluster) (*compute.WaitGetClusterRunning[struct{}], error) { - ret := _m.Called(ctx, editCluster) - - if len(ret) == 0 { - panic("no return value specified for Edit") - } - - var r0 *compute.WaitGetClusterRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.EditCluster) (*compute.WaitGetClusterRunning[struct{}], error)); ok { - return rf(ctx, editCluster) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.EditCluster) *compute.WaitGetClusterRunning[struct{}]); ok { - r0 = rf(ctx, editCluster) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitGetClusterRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.EditCluster) error); ok { - r1 = rf(ctx, editCluster) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Edit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Edit' -type MockClustersInterface_Edit_Call struct { - *mock.Call -} - -// Edit is a helper method to define mock.On call -// - ctx context.Context -// - editCluster compute.EditCluster -func (_e *MockClustersInterface_Expecter) Edit(ctx interface{}, editCluster interface{}) *MockClustersInterface_Edit_Call { - return &MockClustersInterface_Edit_Call{Call: _e.mock.On("Edit", ctx, editCluster)} -} - -func (_c *MockClustersInterface_Edit_Call) Run(run func(ctx context.Context, editCluster compute.EditCluster)) *MockClustersInterface_Edit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.EditCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Edit_Call) Return(_a0 *compute.WaitGetClusterRunning[struct{}], _a1 error) *MockClustersInterface_Edit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Edit_Call) RunAndReturn(run func(context.Context, compute.EditCluster) (*compute.WaitGetClusterRunning[struct{}], error)) *MockClustersInterface_Edit_Call { - _c.Call.Return(run) - return _c -} - -// EditAndWait provides a mock function with given fields: ctx, editCluster, options -func (_m *MockClustersInterface) EditAndWait(ctx context.Context, editCluster compute.EditCluster, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, editCluster) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for EditAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.EditCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, editCluster, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.EditCluster, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, editCluster, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.EditCluster, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, editCluster, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_EditAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EditAndWait' -type MockClustersInterface_EditAndWait_Call struct { - *mock.Call -} - -// EditAndWait is a helper method to define mock.On call -// - ctx context.Context -// - editCluster compute.EditCluster -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) EditAndWait(ctx interface{}, editCluster interface{}, options ...interface{}) *MockClustersInterface_EditAndWait_Call { - return &MockClustersInterface_EditAndWait_Call{Call: _e.mock.On("EditAndWait", - append([]interface{}{ctx, editCluster}, options...)...)} -} - -func (_c *MockClustersInterface_EditAndWait_Call) Run(run func(ctx context.Context, editCluster compute.EditCluster, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_EditAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(compute.EditCluster), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_EditAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_EditAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_EditAndWait_Call) RunAndReturn(run func(context.Context, compute.EditCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_EditAndWait_Call { - _c.Call.Return(run) - return _c -} - -// EnsureClusterIsRunning provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) EnsureClusterIsRunning(ctx context.Context, clusterId string) error { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for EnsureClusterIsRunning") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, clusterId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_EnsureClusterIsRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureClusterIsRunning' -type MockClustersInterface_EnsureClusterIsRunning_Call struct { - *mock.Call -} - -// EnsureClusterIsRunning is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) EnsureClusterIsRunning(ctx interface{}, clusterId interface{}) *MockClustersInterface_EnsureClusterIsRunning_Call { - return &MockClustersInterface_EnsureClusterIsRunning_Call{Call: _e.mock.On("EnsureClusterIsRunning", ctx, clusterId)} -} - -func (_c *MockClustersInterface_EnsureClusterIsRunning_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_EnsureClusterIsRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_EnsureClusterIsRunning_Call) Return(_a0 error) *MockClustersInterface_EnsureClusterIsRunning_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_EnsureClusterIsRunning_Call) RunAndReturn(run func(context.Context, string) error) *MockClustersInterface_EnsureClusterIsRunning_Call { - _c.Call.Return(run) - return _c -} - -// Events provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) Events(ctx context.Context, request compute.GetEvents) listing.Iterator[compute.ClusterEvent] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Events") - } - - var r0 listing.Iterator[compute.ClusterEvent] - if rf, ok := ret.Get(0).(func(context.Context, compute.GetEvents) listing.Iterator[compute.ClusterEvent]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.ClusterEvent]) - } - } - - return r0 -} - -// MockClustersInterface_Events_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Events' -type MockClustersInterface_Events_Call struct { - *mock.Call -} - -// Events is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetEvents -func (_e *MockClustersInterface_Expecter) Events(ctx interface{}, request interface{}) *MockClustersInterface_Events_Call { - return &MockClustersInterface_Events_Call{Call: _e.mock.On("Events", ctx, request)} -} - -func (_c *MockClustersInterface_Events_Call) Run(run func(ctx context.Context, request compute.GetEvents)) *MockClustersInterface_Events_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetEvents)) - }) - return _c -} - -func (_c *MockClustersInterface_Events_Call) Return(_a0 listing.Iterator[compute.ClusterEvent]) *MockClustersInterface_Events_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_Events_Call) RunAndReturn(run func(context.Context, compute.GetEvents) listing.Iterator[compute.ClusterEvent]) *MockClustersInterface_Events_Call { - _c.Call.Return(run) - return _c -} - -// EventsAll provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) EventsAll(ctx context.Context, request compute.GetEvents) ([]compute.ClusterEvent, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for EventsAll") - } - - var r0 []compute.ClusterEvent - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetEvents) ([]compute.ClusterEvent, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetEvents) []compute.ClusterEvent); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.ClusterEvent) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetEvents) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_EventsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EventsAll' -type MockClustersInterface_EventsAll_Call struct { - *mock.Call -} - -// EventsAll is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetEvents -func (_e *MockClustersInterface_Expecter) EventsAll(ctx interface{}, request interface{}) *MockClustersInterface_EventsAll_Call { - return &MockClustersInterface_EventsAll_Call{Call: _e.mock.On("EventsAll", ctx, request)} -} - -func (_c *MockClustersInterface_EventsAll_Call) Run(run func(ctx context.Context, request compute.GetEvents)) *MockClustersInterface_EventsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetEvents)) - }) - return _c -} - -func (_c *MockClustersInterface_EventsAll_Call) Return(_a0 []compute.ClusterEvent, _a1 error) *MockClustersInterface_EventsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_EventsAll_Call) RunAndReturn(run func(context.Context, compute.GetEvents) ([]compute.ClusterEvent, error)) *MockClustersInterface_EventsAll_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) Get(ctx context.Context, request compute.GetClusterRequest) (*compute.ClusterDetails, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterRequest) (*compute.ClusterDetails, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterRequest) *compute.ClusterDetails); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockClustersInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetClusterRequest -func (_e *MockClustersInterface_Expecter) Get(ctx interface{}, request interface{}) *MockClustersInterface_Get_Call { - return &MockClustersInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockClustersInterface_Get_Call) Run(run func(ctx context.Context, request compute.GetClusterRequest)) *MockClustersInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_Get_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Get_Call) RunAndReturn(run func(context.Context, compute.GetClusterRequest) (*compute.ClusterDetails, error)) *MockClustersInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) GetByClusterId(ctx context.Context, clusterId string) (*compute.ClusterDetails, error) { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for GetByClusterId") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.ClusterDetails, error)); ok { - return rf(ctx, clusterId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.ClusterDetails); ok { - r0 = rf(ctx, clusterId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, clusterId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_GetByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByClusterId' -type MockClustersInterface_GetByClusterId_Call struct { - *mock.Call -} - -// GetByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) GetByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_GetByClusterId_Call { - return &MockClustersInterface_GetByClusterId_Call{Call: _e.mock.On("GetByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_GetByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_GetByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_GetByClusterId_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_GetByClusterId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_GetByClusterId_Call) RunAndReturn(run func(context.Context, string) (*compute.ClusterDetails, error)) *MockClustersInterface_GetByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// GetByClusterName provides a mock function with given fields: ctx, name -func (_m *MockClustersInterface) GetByClusterName(ctx context.Context, name string) (*compute.ClusterDetails, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByClusterName") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.ClusterDetails, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.ClusterDetails); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_GetByClusterName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByClusterName' -type MockClustersInterface_GetByClusterName_Call struct { - *mock.Call -} - -// GetByClusterName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockClustersInterface_Expecter) GetByClusterName(ctx interface{}, name interface{}) *MockClustersInterface_GetByClusterName_Call { - return &MockClustersInterface_GetByClusterName_Call{Call: _e.mock.On("GetByClusterName", ctx, name)} -} - -func (_c *MockClustersInterface_GetByClusterName_Call) Run(run func(ctx context.Context, name string)) *MockClustersInterface_GetByClusterName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_GetByClusterName_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_GetByClusterName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_GetByClusterName_Call) RunAndReturn(run func(context.Context, string) (*compute.ClusterDetails, error)) *MockClustersInterface_GetByClusterName_Call { - _c.Call.Return(run) - return _c -} - -// GetOrCreateRunningCluster provides a mock function with given fields: ctx, name, custom -func (_m *MockClustersInterface) GetOrCreateRunningCluster(ctx context.Context, name string, custom ...compute.CreateCluster) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(custom)) - for _i := range custom { - _va[_i] = custom[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, name) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for GetOrCreateRunningCluster") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...compute.CreateCluster) (*compute.ClusterDetails, error)); ok { - return rf(ctx, name, custom...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...compute.CreateCluster) *compute.ClusterDetails); ok { - r0 = rf(ctx, name, custom...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...compute.CreateCluster) error); ok { - r1 = rf(ctx, name, custom...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_GetOrCreateRunningCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrCreateRunningCluster' -type MockClustersInterface_GetOrCreateRunningCluster_Call struct { - *mock.Call -} - -// GetOrCreateRunningCluster is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - custom ...compute.CreateCluster -func (_e *MockClustersInterface_Expecter) GetOrCreateRunningCluster(ctx interface{}, name interface{}, custom ...interface{}) *MockClustersInterface_GetOrCreateRunningCluster_Call { - return &MockClustersInterface_GetOrCreateRunningCluster_Call{Call: _e.mock.On("GetOrCreateRunningCluster", - append([]interface{}{ctx, name}, custom...)...)} -} - -func (_c *MockClustersInterface_GetOrCreateRunningCluster_Call) Run(run func(ctx context.Context, name string, custom ...compute.CreateCluster)) *MockClustersInterface_GetOrCreateRunningCluster_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]compute.CreateCluster, len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(compute.CreateCluster) - } - } - run(args[0].(context.Context), args[1].(string), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_GetOrCreateRunningCluster_Call) Return(c *compute.ClusterDetails, err error) *MockClustersInterface_GetOrCreateRunningCluster_Call { - _c.Call.Return(c, err) - return _c -} - -func (_c *MockClustersInterface_GetOrCreateRunningCluster_Call) RunAndReturn(run func(context.Context, string, ...compute.CreateCluster) (*compute.ClusterDetails, error)) *MockClustersInterface_GetOrCreateRunningCluster_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) GetPermissionLevels(ctx context.Context, request compute.GetClusterPermissionLevelsRequest) (*compute.GetClusterPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *compute.GetClusterPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPermissionLevelsRequest) (*compute.GetClusterPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPermissionLevelsRequest) *compute.GetClusterPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetClusterPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockClustersInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetClusterPermissionLevelsRequest -func (_e *MockClustersInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockClustersInterface_GetPermissionLevels_Call { - return &MockClustersInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockClustersInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request compute.GetClusterPermissionLevelsRequest)) *MockClustersInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_GetPermissionLevels_Call) Return(_a0 *compute.GetClusterPermissionLevelsResponse, _a1 error) *MockClustersInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, compute.GetClusterPermissionLevelsRequest) (*compute.GetClusterPermissionLevelsResponse, error)) *MockClustersInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) GetPermissionLevelsByClusterId(ctx context.Context, clusterId string) (*compute.GetClusterPermissionLevelsResponse, error) { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByClusterId") - } - - var r0 *compute.GetClusterPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.GetClusterPermissionLevelsResponse, error)); ok { - return rf(ctx, clusterId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.GetClusterPermissionLevelsResponse); ok { - r0 = rf(ctx, clusterId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetClusterPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, clusterId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_GetPermissionLevelsByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByClusterId' -type MockClustersInterface_GetPermissionLevelsByClusterId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) GetPermissionLevelsByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_GetPermissionLevelsByClusterId_Call { - return &MockClustersInterface_GetPermissionLevelsByClusterId_Call{Call: _e.mock.On("GetPermissionLevelsByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_GetPermissionLevelsByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_GetPermissionLevelsByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_GetPermissionLevelsByClusterId_Call) Return(_a0 *compute.GetClusterPermissionLevelsResponse, _a1 error) *MockClustersInterface_GetPermissionLevelsByClusterId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_GetPermissionLevelsByClusterId_Call) RunAndReturn(run func(context.Context, string) (*compute.GetClusterPermissionLevelsResponse, error)) *MockClustersInterface_GetPermissionLevelsByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) GetPermissions(ctx context.Context, request compute.GetClusterPermissionsRequest) (*compute.ClusterPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *compute.ClusterPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPermissionsRequest) (*compute.ClusterPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterPermissionsRequest) *compute.ClusterPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockClustersInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetClusterPermissionsRequest -func (_e *MockClustersInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockClustersInterface_GetPermissions_Call { - return &MockClustersInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockClustersInterface_GetPermissions_Call) Run(run func(ctx context.Context, request compute.GetClusterPermissionsRequest)) *MockClustersInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterPermissionsRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_GetPermissions_Call) Return(_a0 *compute.ClusterPermissions, _a1 error) *MockClustersInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, compute.GetClusterPermissionsRequest) (*compute.ClusterPermissions, error)) *MockClustersInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) GetPermissionsByClusterId(ctx context.Context, clusterId string) (*compute.ClusterPermissions, error) { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByClusterId") - } - - var r0 *compute.ClusterPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.ClusterPermissions, error)); ok { - return rf(ctx, clusterId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.ClusterPermissions); ok { - r0 = rf(ctx, clusterId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, clusterId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_GetPermissionsByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByClusterId' -type MockClustersInterface_GetPermissionsByClusterId_Call struct { - *mock.Call -} - -// GetPermissionsByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) GetPermissionsByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_GetPermissionsByClusterId_Call { - return &MockClustersInterface_GetPermissionsByClusterId_Call{Call: _e.mock.On("GetPermissionsByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_GetPermissionsByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_GetPermissionsByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_GetPermissionsByClusterId_Call) Return(_a0 *compute.ClusterPermissions, _a1 error) *MockClustersInterface_GetPermissionsByClusterId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_GetPermissionsByClusterId_Call) RunAndReturn(run func(context.Context, string) (*compute.ClusterPermissions, error)) *MockClustersInterface_GetPermissionsByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) List(ctx context.Context, request compute.ListClustersRequest) listing.Iterator[compute.ClusterDetails] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[compute.ClusterDetails] - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClustersRequest) listing.Iterator[compute.ClusterDetails]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.ClusterDetails]) - } - } - - return r0 -} - -// MockClustersInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockClustersInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClustersRequest -func (_e *MockClustersInterface_Expecter) List(ctx interface{}, request interface{}) *MockClustersInterface_List_Call { - return &MockClustersInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockClustersInterface_List_Call) Run(run func(ctx context.Context, request compute.ListClustersRequest)) *MockClustersInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClustersRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_List_Call) Return(_a0 listing.Iterator[compute.ClusterDetails]) *MockClustersInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_List_Call) RunAndReturn(run func(context.Context, compute.ListClustersRequest) listing.Iterator[compute.ClusterDetails]) *MockClustersInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) ListAll(ctx context.Context, request compute.ListClustersRequest) ([]compute.ClusterDetails, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClustersRequest) ([]compute.ClusterDetails, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClustersRequest) []compute.ClusterDetails); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ListClustersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockClustersInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClustersRequest -func (_e *MockClustersInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockClustersInterface_ListAll_Call { - return &MockClustersInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockClustersInterface_ListAll_Call) Run(run func(ctx context.Context, request compute.ListClustersRequest)) *MockClustersInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClustersRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_ListAll_Call) Return(_a0 []compute.ClusterDetails, _a1 error) *MockClustersInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_ListAll_Call) RunAndReturn(run func(context.Context, compute.ListClustersRequest) ([]compute.ClusterDetails, error)) *MockClustersInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListNodeTypes provides a mock function with given fields: ctx -func (_m *MockClustersInterface) ListNodeTypes(ctx context.Context) (*compute.ListNodeTypesResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListNodeTypes") - } - - var r0 *compute.ListNodeTypesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*compute.ListNodeTypesResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *compute.ListNodeTypesResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ListNodeTypesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_ListNodeTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNodeTypes' -type MockClustersInterface_ListNodeTypes_Call struct { - *mock.Call -} - -// ListNodeTypes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockClustersInterface_Expecter) ListNodeTypes(ctx interface{}) *MockClustersInterface_ListNodeTypes_Call { - return &MockClustersInterface_ListNodeTypes_Call{Call: _e.mock.On("ListNodeTypes", ctx)} -} - -func (_c *MockClustersInterface_ListNodeTypes_Call) Run(run func(ctx context.Context)) *MockClustersInterface_ListNodeTypes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockClustersInterface_ListNodeTypes_Call) Return(_a0 *compute.ListNodeTypesResponse, _a1 error) *MockClustersInterface_ListNodeTypes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_ListNodeTypes_Call) RunAndReturn(run func(context.Context) (*compute.ListNodeTypesResponse, error)) *MockClustersInterface_ListNodeTypes_Call { - _c.Call.Return(run) - return _c -} - -// ListZones provides a mock function with given fields: ctx -func (_m *MockClustersInterface) ListZones(ctx context.Context) (*compute.ListAvailableZonesResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListZones") - } - - var r0 *compute.ListAvailableZonesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*compute.ListAvailableZonesResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *compute.ListAvailableZonesResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ListAvailableZonesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_ListZones_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListZones' -type MockClustersInterface_ListZones_Call struct { - *mock.Call -} - -// ListZones is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockClustersInterface_Expecter) ListZones(ctx interface{}) *MockClustersInterface_ListZones_Call { - return &MockClustersInterface_ListZones_Call{Call: _e.mock.On("ListZones", ctx)} -} - -func (_c *MockClustersInterface_ListZones_Call) Run(run func(ctx context.Context)) *MockClustersInterface_ListZones_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockClustersInterface_ListZones_Call) Return(_a0 *compute.ListAvailableZonesResponse, _a1 error) *MockClustersInterface_ListZones_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_ListZones_Call) RunAndReturn(run func(context.Context) (*compute.ListAvailableZonesResponse, error)) *MockClustersInterface_ListZones_Call { - _c.Call.Return(run) - return _c -} - -// PermanentDelete provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) PermanentDelete(ctx context.Context, request compute.PermanentDeleteCluster) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for PermanentDelete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.PermanentDeleteCluster) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_PermanentDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PermanentDelete' -type MockClustersInterface_PermanentDelete_Call struct { - *mock.Call -} - -// PermanentDelete is a helper method to define mock.On call -// - ctx context.Context -// - request compute.PermanentDeleteCluster -func (_e *MockClustersInterface_Expecter) PermanentDelete(ctx interface{}, request interface{}) *MockClustersInterface_PermanentDelete_Call { - return &MockClustersInterface_PermanentDelete_Call{Call: _e.mock.On("PermanentDelete", ctx, request)} -} - -func (_c *MockClustersInterface_PermanentDelete_Call) Run(run func(ctx context.Context, request compute.PermanentDeleteCluster)) *MockClustersInterface_PermanentDelete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.PermanentDeleteCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_PermanentDelete_Call) Return(_a0 error) *MockClustersInterface_PermanentDelete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_PermanentDelete_Call) RunAndReturn(run func(context.Context, compute.PermanentDeleteCluster) error) *MockClustersInterface_PermanentDelete_Call { - _c.Call.Return(run) - return _c -} - -// PermanentDeleteByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) PermanentDeleteByClusterId(ctx context.Context, clusterId string) error { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for PermanentDeleteByClusterId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, clusterId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_PermanentDeleteByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PermanentDeleteByClusterId' -type MockClustersInterface_PermanentDeleteByClusterId_Call struct { - *mock.Call -} - -// PermanentDeleteByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) PermanentDeleteByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_PermanentDeleteByClusterId_Call { - return &MockClustersInterface_PermanentDeleteByClusterId_Call{Call: _e.mock.On("PermanentDeleteByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_PermanentDeleteByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_PermanentDeleteByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_PermanentDeleteByClusterId_Call) Return(_a0 error) *MockClustersInterface_PermanentDeleteByClusterId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_PermanentDeleteByClusterId_Call) RunAndReturn(run func(context.Context, string) error) *MockClustersInterface_PermanentDeleteByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// Pin provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) Pin(ctx context.Context, request compute.PinCluster) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Pin") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.PinCluster) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_Pin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pin' -type MockClustersInterface_Pin_Call struct { - *mock.Call -} - -// Pin is a helper method to define mock.On call -// - ctx context.Context -// - request compute.PinCluster -func (_e *MockClustersInterface_Expecter) Pin(ctx interface{}, request interface{}) *MockClustersInterface_Pin_Call { - return &MockClustersInterface_Pin_Call{Call: _e.mock.On("Pin", ctx, request)} -} - -func (_c *MockClustersInterface_Pin_Call) Run(run func(ctx context.Context, request compute.PinCluster)) *MockClustersInterface_Pin_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.PinCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Pin_Call) Return(_a0 error) *MockClustersInterface_Pin_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_Pin_Call) RunAndReturn(run func(context.Context, compute.PinCluster) error) *MockClustersInterface_Pin_Call { - _c.Call.Return(run) - return _c -} - -// PinByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) PinByClusterId(ctx context.Context, clusterId string) error { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for PinByClusterId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, clusterId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_PinByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PinByClusterId' -type MockClustersInterface_PinByClusterId_Call struct { - *mock.Call -} - -// PinByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) PinByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_PinByClusterId_Call { - return &MockClustersInterface_PinByClusterId_Call{Call: _e.mock.On("PinByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_PinByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_PinByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_PinByClusterId_Call) Return(_a0 error) *MockClustersInterface_PinByClusterId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_PinByClusterId_Call) RunAndReturn(run func(context.Context, string) error) *MockClustersInterface_PinByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// Resize provides a mock function with given fields: ctx, resizeCluster -func (_m *MockClustersInterface) Resize(ctx context.Context, resizeCluster compute.ResizeCluster) (*compute.WaitGetClusterRunning[struct{}], error) { - ret := _m.Called(ctx, resizeCluster) - - if len(ret) == 0 { - panic("no return value specified for Resize") - } - - var r0 *compute.WaitGetClusterRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ResizeCluster) (*compute.WaitGetClusterRunning[struct{}], error)); ok { - return rf(ctx, resizeCluster) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ResizeCluster) *compute.WaitGetClusterRunning[struct{}]); ok { - r0 = rf(ctx, resizeCluster) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitGetClusterRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ResizeCluster) error); ok { - r1 = rf(ctx, resizeCluster) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Resize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Resize' -type MockClustersInterface_Resize_Call struct { - *mock.Call -} - -// Resize is a helper method to define mock.On call -// - ctx context.Context -// - resizeCluster compute.ResizeCluster -func (_e *MockClustersInterface_Expecter) Resize(ctx interface{}, resizeCluster interface{}) *MockClustersInterface_Resize_Call { - return &MockClustersInterface_Resize_Call{Call: _e.mock.On("Resize", ctx, resizeCluster)} -} - -func (_c *MockClustersInterface_Resize_Call) Run(run func(ctx context.Context, resizeCluster compute.ResizeCluster)) *MockClustersInterface_Resize_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ResizeCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Resize_Call) Return(_a0 *compute.WaitGetClusterRunning[struct{}], _a1 error) *MockClustersInterface_Resize_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Resize_Call) RunAndReturn(run func(context.Context, compute.ResizeCluster) (*compute.WaitGetClusterRunning[struct{}], error)) *MockClustersInterface_Resize_Call { - _c.Call.Return(run) - return _c -} - -// ResizeAndWait provides a mock function with given fields: ctx, resizeCluster, options -func (_m *MockClustersInterface) ResizeAndWait(ctx context.Context, resizeCluster compute.ResizeCluster, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, resizeCluster) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for ResizeAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ResizeCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, resizeCluster, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ResizeCluster, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, resizeCluster, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ResizeCluster, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, resizeCluster, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_ResizeAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResizeAndWait' -type MockClustersInterface_ResizeAndWait_Call struct { - *mock.Call -} - -// ResizeAndWait is a helper method to define mock.On call -// - ctx context.Context -// - resizeCluster compute.ResizeCluster -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) ResizeAndWait(ctx interface{}, resizeCluster interface{}, options ...interface{}) *MockClustersInterface_ResizeAndWait_Call { - return &MockClustersInterface_ResizeAndWait_Call{Call: _e.mock.On("ResizeAndWait", - append([]interface{}{ctx, resizeCluster}, options...)...)} -} - -func (_c *MockClustersInterface_ResizeAndWait_Call) Run(run func(ctx context.Context, resizeCluster compute.ResizeCluster, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_ResizeAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(compute.ResizeCluster), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_ResizeAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_ResizeAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_ResizeAndWait_Call) RunAndReturn(run func(context.Context, compute.ResizeCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_ResizeAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Restart provides a mock function with given fields: ctx, restartCluster -func (_m *MockClustersInterface) Restart(ctx context.Context, restartCluster compute.RestartCluster) (*compute.WaitGetClusterRunning[struct{}], error) { - ret := _m.Called(ctx, restartCluster) - - if len(ret) == 0 { - panic("no return value specified for Restart") - } - - var r0 *compute.WaitGetClusterRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.RestartCluster) (*compute.WaitGetClusterRunning[struct{}], error)); ok { - return rf(ctx, restartCluster) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.RestartCluster) *compute.WaitGetClusterRunning[struct{}]); ok { - r0 = rf(ctx, restartCluster) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitGetClusterRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.RestartCluster) error); ok { - r1 = rf(ctx, restartCluster) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Restart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restart' -type MockClustersInterface_Restart_Call struct { - *mock.Call -} - -// Restart is a helper method to define mock.On call -// - ctx context.Context -// - restartCluster compute.RestartCluster -func (_e *MockClustersInterface_Expecter) Restart(ctx interface{}, restartCluster interface{}) *MockClustersInterface_Restart_Call { - return &MockClustersInterface_Restart_Call{Call: _e.mock.On("Restart", ctx, restartCluster)} -} - -func (_c *MockClustersInterface_Restart_Call) Run(run func(ctx context.Context, restartCluster compute.RestartCluster)) *MockClustersInterface_Restart_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.RestartCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Restart_Call) Return(_a0 *compute.WaitGetClusterRunning[struct{}], _a1 error) *MockClustersInterface_Restart_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Restart_Call) RunAndReturn(run func(context.Context, compute.RestartCluster) (*compute.WaitGetClusterRunning[struct{}], error)) *MockClustersInterface_Restart_Call { - _c.Call.Return(run) - return _c -} - -// RestartAndWait provides a mock function with given fields: ctx, restartCluster, options -func (_m *MockClustersInterface) RestartAndWait(ctx context.Context, restartCluster compute.RestartCluster, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, restartCluster) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for RestartAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.RestartCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, restartCluster, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.RestartCluster, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, restartCluster, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.RestartCluster, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, restartCluster, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_RestartAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestartAndWait' -type MockClustersInterface_RestartAndWait_Call struct { - *mock.Call -} - -// RestartAndWait is a helper method to define mock.On call -// - ctx context.Context -// - restartCluster compute.RestartCluster -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) RestartAndWait(ctx interface{}, restartCluster interface{}, options ...interface{}) *MockClustersInterface_RestartAndWait_Call { - return &MockClustersInterface_RestartAndWait_Call{Call: _e.mock.On("RestartAndWait", - append([]interface{}{ctx, restartCluster}, options...)...)} -} - -func (_c *MockClustersInterface_RestartAndWait_Call) Run(run func(ctx context.Context, restartCluster compute.RestartCluster, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_RestartAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(compute.RestartCluster), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_RestartAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_RestartAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_RestartAndWait_Call) RunAndReturn(run func(context.Context, compute.RestartCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_RestartAndWait_Call { - _c.Call.Return(run) - return _c -} - -// SelectNodeType provides a mock function with given fields: ctx, r -func (_m *MockClustersInterface) SelectNodeType(ctx context.Context, r compute.NodeTypeRequest) (string, error) { - ret := _m.Called(ctx, r) - - if len(ret) == 0 { - panic("no return value specified for SelectNodeType") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.NodeTypeRequest) (string, error)); ok { - return rf(ctx, r) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.NodeTypeRequest) string); ok { - r0 = rf(ctx, r) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.NodeTypeRequest) error); ok { - r1 = rf(ctx, r) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_SelectNodeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectNodeType' -type MockClustersInterface_SelectNodeType_Call struct { - *mock.Call -} - -// SelectNodeType is a helper method to define mock.On call -// - ctx context.Context -// - r compute.NodeTypeRequest -func (_e *MockClustersInterface_Expecter) SelectNodeType(ctx interface{}, r interface{}) *MockClustersInterface_SelectNodeType_Call { - return &MockClustersInterface_SelectNodeType_Call{Call: _e.mock.On("SelectNodeType", ctx, r)} -} - -func (_c *MockClustersInterface_SelectNodeType_Call) Run(run func(ctx context.Context, r compute.NodeTypeRequest)) *MockClustersInterface_SelectNodeType_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.NodeTypeRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_SelectNodeType_Call) Return(_a0 string, _a1 error) *MockClustersInterface_SelectNodeType_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_SelectNodeType_Call) RunAndReturn(run func(context.Context, compute.NodeTypeRequest) (string, error)) *MockClustersInterface_SelectNodeType_Call { - _c.Call.Return(run) - return _c -} - -// SelectSparkVersion provides a mock function with given fields: ctx, r -func (_m *MockClustersInterface) SelectSparkVersion(ctx context.Context, r compute.SparkVersionRequest) (string, error) { - ret := _m.Called(ctx, r) - - if len(ret) == 0 { - panic("no return value specified for SelectSparkVersion") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.SparkVersionRequest) (string, error)); ok { - return rf(ctx, r) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.SparkVersionRequest) string); ok { - r0 = rf(ctx, r) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.SparkVersionRequest) error); ok { - r1 = rf(ctx, r) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_SelectSparkVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectSparkVersion' -type MockClustersInterface_SelectSparkVersion_Call struct { - *mock.Call -} - -// SelectSparkVersion is a helper method to define mock.On call -// - ctx context.Context -// - r compute.SparkVersionRequest -func (_e *MockClustersInterface_Expecter) SelectSparkVersion(ctx interface{}, r interface{}) *MockClustersInterface_SelectSparkVersion_Call { - return &MockClustersInterface_SelectSparkVersion_Call{Call: _e.mock.On("SelectSparkVersion", ctx, r)} -} - -func (_c *MockClustersInterface_SelectSparkVersion_Call) Run(run func(ctx context.Context, r compute.SparkVersionRequest)) *MockClustersInterface_SelectSparkVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.SparkVersionRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_SelectSparkVersion_Call) Return(_a0 string, _a1 error) *MockClustersInterface_SelectSparkVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_SelectSparkVersion_Call) RunAndReturn(run func(context.Context, compute.SparkVersionRequest) (string, error)) *MockClustersInterface_SelectSparkVersion_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) SetPermissions(ctx context.Context, request compute.ClusterPermissionsRequest) (*compute.ClusterPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *compute.ClusterPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPermissionsRequest) (*compute.ClusterPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPermissionsRequest) *compute.ClusterPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ClusterPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockClustersInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ClusterPermissionsRequest -func (_e *MockClustersInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockClustersInterface_SetPermissions_Call { - return &MockClustersInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockClustersInterface_SetPermissions_Call) Run(run func(ctx context.Context, request compute.ClusterPermissionsRequest)) *MockClustersInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ClusterPermissionsRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_SetPermissions_Call) Return(_a0 *compute.ClusterPermissions, _a1 error) *MockClustersInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, compute.ClusterPermissionsRequest) (*compute.ClusterPermissions, error)) *MockClustersInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// SparkVersions provides a mock function with given fields: ctx -func (_m *MockClustersInterface) SparkVersions(ctx context.Context) (*compute.GetSparkVersionsResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for SparkVersions") - } - - var r0 *compute.GetSparkVersionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*compute.GetSparkVersionsResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *compute.GetSparkVersionsResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetSparkVersionsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_SparkVersions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SparkVersions' -type MockClustersInterface_SparkVersions_Call struct { - *mock.Call -} - -// SparkVersions is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockClustersInterface_Expecter) SparkVersions(ctx interface{}) *MockClustersInterface_SparkVersions_Call { - return &MockClustersInterface_SparkVersions_Call{Call: _e.mock.On("SparkVersions", ctx)} -} - -func (_c *MockClustersInterface_SparkVersions_Call) Run(run func(ctx context.Context)) *MockClustersInterface_SparkVersions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockClustersInterface_SparkVersions_Call) Return(_a0 *compute.GetSparkVersionsResponse, _a1 error) *MockClustersInterface_SparkVersions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_SparkVersions_Call) RunAndReturn(run func(context.Context) (*compute.GetSparkVersionsResponse, error)) *MockClustersInterface_SparkVersions_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: ctx, startCluster -func (_m *MockClustersInterface) Start(ctx context.Context, startCluster compute.StartCluster) (*compute.WaitGetClusterRunning[struct{}], error) { - ret := _m.Called(ctx, startCluster) - - if len(ret) == 0 { - panic("no return value specified for Start") - } - - var r0 *compute.WaitGetClusterRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.StartCluster) (*compute.WaitGetClusterRunning[struct{}], error)); ok { - return rf(ctx, startCluster) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.StartCluster) *compute.WaitGetClusterRunning[struct{}]); ok { - r0 = rf(ctx, startCluster) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitGetClusterRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.StartCluster) error); ok { - r1 = rf(ctx, startCluster) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type MockClustersInterface_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - ctx context.Context -// - startCluster compute.StartCluster -func (_e *MockClustersInterface_Expecter) Start(ctx interface{}, startCluster interface{}) *MockClustersInterface_Start_Call { - return &MockClustersInterface_Start_Call{Call: _e.mock.On("Start", ctx, startCluster)} -} - -func (_c *MockClustersInterface_Start_Call) Run(run func(ctx context.Context, startCluster compute.StartCluster)) *MockClustersInterface_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.StartCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Start_Call) Return(_a0 *compute.WaitGetClusterRunning[struct{}], _a1 error) *MockClustersInterface_Start_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Start_Call) RunAndReturn(run func(context.Context, compute.StartCluster) (*compute.WaitGetClusterRunning[struct{}], error)) *MockClustersInterface_Start_Call { - _c.Call.Return(run) - return _c -} - -// StartAndWait provides a mock function with given fields: ctx, startCluster, options -func (_m *MockClustersInterface) StartAndWait(ctx context.Context, startCluster compute.StartCluster, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, startCluster) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StartAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.StartCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, startCluster, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.StartCluster, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, startCluster, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.StartCluster, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, startCluster, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_StartAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartAndWait' -type MockClustersInterface_StartAndWait_Call struct { - *mock.Call -} - -// StartAndWait is a helper method to define mock.On call -// - ctx context.Context -// - startCluster compute.StartCluster -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) StartAndWait(ctx interface{}, startCluster interface{}, options ...interface{}) *MockClustersInterface_StartAndWait_Call { - return &MockClustersInterface_StartAndWait_Call{Call: _e.mock.On("StartAndWait", - append([]interface{}{ctx, startCluster}, options...)...)} -} - -func (_c *MockClustersInterface_StartAndWait_Call) Run(run func(ctx context.Context, startCluster compute.StartCluster, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_StartAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(compute.StartCluster), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_StartAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_StartAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_StartAndWait_Call) RunAndReturn(run func(context.Context, compute.StartCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_StartAndWait_Call { - _c.Call.Return(run) - return _c -} - -// StartByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) StartByClusterId(ctx context.Context, clusterId string) error { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for StartByClusterId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, clusterId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_StartByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartByClusterId' -type MockClustersInterface_StartByClusterId_Call struct { - *mock.Call -} - -// StartByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) StartByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_StartByClusterId_Call { - return &MockClustersInterface_StartByClusterId_Call{Call: _e.mock.On("StartByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_StartByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_StartByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_StartByClusterId_Call) Return(_a0 error) *MockClustersInterface_StartByClusterId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_StartByClusterId_Call) RunAndReturn(run func(context.Context, string) error) *MockClustersInterface_StartByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// StartByClusterIdAndWait provides a mock function with given fields: ctx, clusterId, options -func (_m *MockClustersInterface) StartByClusterIdAndWait(ctx context.Context, clusterId string, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, clusterId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StartByClusterIdAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, clusterId, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, clusterId, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, clusterId, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_StartByClusterIdAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartByClusterIdAndWait' -type MockClustersInterface_StartByClusterIdAndWait_Call struct { - *mock.Call -} - -// StartByClusterIdAndWait is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) StartByClusterIdAndWait(ctx interface{}, clusterId interface{}, options ...interface{}) *MockClustersInterface_StartByClusterIdAndWait_Call { - return &MockClustersInterface_StartByClusterIdAndWait_Call{Call: _e.mock.On("StartByClusterIdAndWait", - append([]interface{}{ctx, clusterId}, options...)...)} -} - -func (_c *MockClustersInterface_StartByClusterIdAndWait_Call) Run(run func(ctx context.Context, clusterId string, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_StartByClusterIdAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(string), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_StartByClusterIdAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_StartByClusterIdAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_StartByClusterIdAndWait_Call) RunAndReturn(run func(context.Context, string, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_StartByClusterIdAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Unpin provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) Unpin(ctx context.Context, request compute.UnpinCluster) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Unpin") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.UnpinCluster) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_Unpin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unpin' -type MockClustersInterface_Unpin_Call struct { - *mock.Call -} - -// Unpin is a helper method to define mock.On call -// - ctx context.Context -// - request compute.UnpinCluster -func (_e *MockClustersInterface_Expecter) Unpin(ctx interface{}, request interface{}) *MockClustersInterface_Unpin_Call { - return &MockClustersInterface_Unpin_Call{Call: _e.mock.On("Unpin", ctx, request)} -} - -func (_c *MockClustersInterface_Unpin_Call) Run(run func(ctx context.Context, request compute.UnpinCluster)) *MockClustersInterface_Unpin_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.UnpinCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Unpin_Call) Return(_a0 error) *MockClustersInterface_Unpin_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_Unpin_Call) RunAndReturn(run func(context.Context, compute.UnpinCluster) error) *MockClustersInterface_Unpin_Call { - _c.Call.Return(run) - return _c -} - -// UnpinByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockClustersInterface) UnpinByClusterId(ctx context.Context, clusterId string) error { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for UnpinByClusterId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, clusterId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockClustersInterface_UnpinByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnpinByClusterId' -type MockClustersInterface_UnpinByClusterId_Call struct { - *mock.Call -} - -// UnpinByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockClustersInterface_Expecter) UnpinByClusterId(ctx interface{}, clusterId interface{}) *MockClustersInterface_UnpinByClusterId_Call { - return &MockClustersInterface_UnpinByClusterId_Call{Call: _e.mock.On("UnpinByClusterId", ctx, clusterId)} -} - -func (_c *MockClustersInterface_UnpinByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockClustersInterface_UnpinByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockClustersInterface_UnpinByClusterId_Call) Return(_a0 error) *MockClustersInterface_UnpinByClusterId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockClustersInterface_UnpinByClusterId_Call) RunAndReturn(run func(context.Context, string) error) *MockClustersInterface_UnpinByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, updateCluster -func (_m *MockClustersInterface) Update(ctx context.Context, updateCluster compute.UpdateCluster) (*compute.WaitGetClusterRunning[struct{}], error) { - ret := _m.Called(ctx, updateCluster) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *compute.WaitGetClusterRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.UpdateCluster) (*compute.WaitGetClusterRunning[struct{}], error)); ok { - return rf(ctx, updateCluster) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.UpdateCluster) *compute.WaitGetClusterRunning[struct{}]); ok { - r0 = rf(ctx, updateCluster) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitGetClusterRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.UpdateCluster) error); ok { - r1 = rf(ctx, updateCluster) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockClustersInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - updateCluster compute.UpdateCluster -func (_e *MockClustersInterface_Expecter) Update(ctx interface{}, updateCluster interface{}) *MockClustersInterface_Update_Call { - return &MockClustersInterface_Update_Call{Call: _e.mock.On("Update", ctx, updateCluster)} -} - -func (_c *MockClustersInterface_Update_Call) Run(run func(ctx context.Context, updateCluster compute.UpdateCluster)) *MockClustersInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.UpdateCluster)) - }) - return _c -} - -func (_c *MockClustersInterface_Update_Call) Return(_a0 *compute.WaitGetClusterRunning[struct{}], _a1 error) *MockClustersInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_Update_Call) RunAndReturn(run func(context.Context, compute.UpdateCluster) (*compute.WaitGetClusterRunning[struct{}], error)) *MockClustersInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdateAndWait provides a mock function with given fields: ctx, updateCluster, options -func (_m *MockClustersInterface) UpdateAndWait(ctx context.Context, updateCluster compute.UpdateCluster, options ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, updateCluster) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for UpdateAndWait") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.UpdateCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)); ok { - return rf(ctx, updateCluster, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.UpdateCluster, ...retries.Option[compute.ClusterDetails]) *compute.ClusterDetails); ok { - r0 = rf(ctx, updateCluster, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.UpdateCluster, ...retries.Option[compute.ClusterDetails]) error); ok { - r1 = rf(ctx, updateCluster, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_UpdateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAndWait' -type MockClustersInterface_UpdateAndWait_Call struct { - *mock.Call -} - -// UpdateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - updateCluster compute.UpdateCluster -// - options ...retries.Option[compute.ClusterDetails] -func (_e *MockClustersInterface_Expecter) UpdateAndWait(ctx interface{}, updateCluster interface{}, options ...interface{}) *MockClustersInterface_UpdateAndWait_Call { - return &MockClustersInterface_UpdateAndWait_Call{Call: _e.mock.On("UpdateAndWait", - append([]interface{}{ctx, updateCluster}, options...)...)} -} - -func (_c *MockClustersInterface_UpdateAndWait_Call) Run(run func(ctx context.Context, updateCluster compute.UpdateCluster, options ...retries.Option[compute.ClusterDetails])) *MockClustersInterface_UpdateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterDetails], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterDetails]) - } - } - run(args[0].(context.Context), args[1].(compute.UpdateCluster), variadicArgs...) - }) - return _c -} - -func (_c *MockClustersInterface_UpdateAndWait_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_UpdateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_UpdateAndWait_Call) RunAndReturn(run func(context.Context, compute.UpdateCluster, ...retries.Option[compute.ClusterDetails]) (*compute.ClusterDetails, error)) *MockClustersInterface_UpdateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockClustersInterface) UpdatePermissions(ctx context.Context, request compute.ClusterPermissionsRequest) (*compute.ClusterPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *compute.ClusterPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPermissionsRequest) (*compute.ClusterPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterPermissionsRequest) *compute.ClusterPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ClusterPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockClustersInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ClusterPermissionsRequest -func (_e *MockClustersInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockClustersInterface_UpdatePermissions_Call { - return &MockClustersInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockClustersInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request compute.ClusterPermissionsRequest)) *MockClustersInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ClusterPermissionsRequest)) - }) - return _c -} - -func (_c *MockClustersInterface_UpdatePermissions_Call) Return(_a0 *compute.ClusterPermissions, _a1 error) *MockClustersInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, compute.ClusterPermissionsRequest) (*compute.ClusterPermissions, error)) *MockClustersInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetClusterRunning provides a mock function with given fields: ctx, clusterId, timeout, callback -func (_m *MockClustersInterface) WaitGetClusterRunning(ctx context.Context, clusterId string, timeout time.Duration, callback func(*compute.ClusterDetails)) (*compute.ClusterDetails, error) { - ret := _m.Called(ctx, clusterId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetClusterRunning") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) (*compute.ClusterDetails, error)); ok { - return rf(ctx, clusterId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) *compute.ClusterDetails); ok { - r0 = rf(ctx, clusterId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) error); ok { - r1 = rf(ctx, clusterId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_WaitGetClusterRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetClusterRunning' -type MockClustersInterface_WaitGetClusterRunning_Call struct { - *mock.Call -} - -// WaitGetClusterRunning is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -// - timeout time.Duration -// - callback func(*compute.ClusterDetails) -func (_e *MockClustersInterface_Expecter) WaitGetClusterRunning(ctx interface{}, clusterId interface{}, timeout interface{}, callback interface{}) *MockClustersInterface_WaitGetClusterRunning_Call { - return &MockClustersInterface_WaitGetClusterRunning_Call{Call: _e.mock.On("WaitGetClusterRunning", ctx, clusterId, timeout, callback)} -} - -func (_c *MockClustersInterface_WaitGetClusterRunning_Call) Run(run func(ctx context.Context, clusterId string, timeout time.Duration, callback func(*compute.ClusterDetails))) *MockClustersInterface_WaitGetClusterRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*compute.ClusterDetails))) - }) - return _c -} - -func (_c *MockClustersInterface_WaitGetClusterRunning_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_WaitGetClusterRunning_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_WaitGetClusterRunning_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) (*compute.ClusterDetails, error)) *MockClustersInterface_WaitGetClusterRunning_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetClusterTerminated provides a mock function with given fields: ctx, clusterId, timeout, callback -func (_m *MockClustersInterface) WaitGetClusterTerminated(ctx context.Context, clusterId string, timeout time.Duration, callback func(*compute.ClusterDetails)) (*compute.ClusterDetails, error) { - ret := _m.Called(ctx, clusterId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetClusterTerminated") - } - - var r0 *compute.ClusterDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) (*compute.ClusterDetails, error)); ok { - return rf(ctx, clusterId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) *compute.ClusterDetails); ok { - r0 = rf(ctx, clusterId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) error); ok { - r1 = rf(ctx, clusterId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockClustersInterface_WaitGetClusterTerminated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetClusterTerminated' -type MockClustersInterface_WaitGetClusterTerminated_Call struct { - *mock.Call -} - -// WaitGetClusterTerminated is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -// - timeout time.Duration -// - callback func(*compute.ClusterDetails) -func (_e *MockClustersInterface_Expecter) WaitGetClusterTerminated(ctx interface{}, clusterId interface{}, timeout interface{}, callback interface{}) *MockClustersInterface_WaitGetClusterTerminated_Call { - return &MockClustersInterface_WaitGetClusterTerminated_Call{Call: _e.mock.On("WaitGetClusterTerminated", ctx, clusterId, timeout, callback)} -} - -func (_c *MockClustersInterface_WaitGetClusterTerminated_Call) Run(run func(ctx context.Context, clusterId string, timeout time.Duration, callback func(*compute.ClusterDetails))) *MockClustersInterface_WaitGetClusterTerminated_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*compute.ClusterDetails))) - }) - return _c -} - -func (_c *MockClustersInterface_WaitGetClusterTerminated_Call) Return(_a0 *compute.ClusterDetails, _a1 error) *MockClustersInterface_WaitGetClusterTerminated_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockClustersInterface_WaitGetClusterTerminated_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*compute.ClusterDetails)) (*compute.ClusterDetails, error)) *MockClustersInterface_WaitGetClusterTerminated_Call { - _c.Call.Return(run) - return _c -} - -// NewMockClustersInterface creates a new instance of MockClustersInterface. 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 NewMockClustersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockClustersInterface { - mock := &MockClustersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_command_execution_interface.go b/experimental/mocks/service/compute/mock_command_execution_interface.go deleted file mode 100644 index f1908b864..000000000 --- a/experimental/mocks/service/compute/mock_command_execution_interface.go +++ /dev/null @@ -1,854 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockCommandExecutionInterface is an autogenerated mock type for the CommandExecutionInterface type -type MockCommandExecutionInterface struct { - mock.Mock -} - -type MockCommandExecutionInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCommandExecutionInterface) EXPECT() *MockCommandExecutionInterface_Expecter { - return &MockCommandExecutionInterface_Expecter{mock: &_m.Mock} -} - -// Cancel provides a mock function with given fields: ctx, cancelCommand -func (_m *MockCommandExecutionInterface) Cancel(ctx context.Context, cancelCommand compute.CancelCommand) (*compute.WaitCommandStatusCommandExecutionCancelled[struct{}], error) { - ret := _m.Called(ctx, cancelCommand) - - if len(ret) == 0 { - panic("no return value specified for Cancel") - } - - var r0 *compute.WaitCommandStatusCommandExecutionCancelled[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CancelCommand) (*compute.WaitCommandStatusCommandExecutionCancelled[struct{}], error)); ok { - return rf(ctx, cancelCommand) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CancelCommand) *compute.WaitCommandStatusCommandExecutionCancelled[struct{}]); ok { - r0 = rf(ctx, cancelCommand) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitCommandStatusCommandExecutionCancelled[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CancelCommand) error); ok { - r1 = rf(ctx, cancelCommand) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_Cancel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cancel' -type MockCommandExecutionInterface_Cancel_Call struct { - *mock.Call -} - -// Cancel is a helper method to define mock.On call -// - ctx context.Context -// - cancelCommand compute.CancelCommand -func (_e *MockCommandExecutionInterface_Expecter) Cancel(ctx interface{}, cancelCommand interface{}) *MockCommandExecutionInterface_Cancel_Call { - return &MockCommandExecutionInterface_Cancel_Call{Call: _e.mock.On("Cancel", ctx, cancelCommand)} -} - -func (_c *MockCommandExecutionInterface_Cancel_Call) Run(run func(ctx context.Context, cancelCommand compute.CancelCommand)) *MockCommandExecutionInterface_Cancel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.CancelCommand)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_Cancel_Call) Return(_a0 *compute.WaitCommandStatusCommandExecutionCancelled[struct{}], _a1 error) *MockCommandExecutionInterface_Cancel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_Cancel_Call) RunAndReturn(run func(context.Context, compute.CancelCommand) (*compute.WaitCommandStatusCommandExecutionCancelled[struct{}], error)) *MockCommandExecutionInterface_Cancel_Call { - _c.Call.Return(run) - return _c -} - -// CancelAndWait provides a mock function with given fields: ctx, cancelCommand, options -func (_m *MockCommandExecutionInterface) CancelAndWait(ctx context.Context, cancelCommand compute.CancelCommand, options ...retries.Option[compute.CommandStatusResponse]) (*compute.CommandStatusResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, cancelCommand) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CancelAndWait") - } - - var r0 *compute.CommandStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CancelCommand, ...retries.Option[compute.CommandStatusResponse]) (*compute.CommandStatusResponse, error)); ok { - return rf(ctx, cancelCommand, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CancelCommand, ...retries.Option[compute.CommandStatusResponse]) *compute.CommandStatusResponse); ok { - r0 = rf(ctx, cancelCommand, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CommandStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CancelCommand, ...retries.Option[compute.CommandStatusResponse]) error); ok { - r1 = rf(ctx, cancelCommand, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_CancelAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelAndWait' -type MockCommandExecutionInterface_CancelAndWait_Call struct { - *mock.Call -} - -// CancelAndWait is a helper method to define mock.On call -// - ctx context.Context -// - cancelCommand compute.CancelCommand -// - options ...retries.Option[compute.CommandStatusResponse] -func (_e *MockCommandExecutionInterface_Expecter) CancelAndWait(ctx interface{}, cancelCommand interface{}, options ...interface{}) *MockCommandExecutionInterface_CancelAndWait_Call { - return &MockCommandExecutionInterface_CancelAndWait_Call{Call: _e.mock.On("CancelAndWait", - append([]interface{}{ctx, cancelCommand}, options...)...)} -} - -func (_c *MockCommandExecutionInterface_CancelAndWait_Call) Run(run func(ctx context.Context, cancelCommand compute.CancelCommand, options ...retries.Option[compute.CommandStatusResponse])) *MockCommandExecutionInterface_CancelAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.CommandStatusResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.CommandStatusResponse]) - } - } - run(args[0].(context.Context), args[1].(compute.CancelCommand), variadicArgs...) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_CancelAndWait_Call) Return(_a0 *compute.CommandStatusResponse, _a1 error) *MockCommandExecutionInterface_CancelAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_CancelAndWait_Call) RunAndReturn(run func(context.Context, compute.CancelCommand, ...retries.Option[compute.CommandStatusResponse]) (*compute.CommandStatusResponse, error)) *MockCommandExecutionInterface_CancelAndWait_Call { - _c.Call.Return(run) - return _c -} - -// CommandStatus provides a mock function with given fields: ctx, request -func (_m *MockCommandExecutionInterface) CommandStatus(ctx context.Context, request compute.CommandStatusRequest) (*compute.CommandStatusResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CommandStatus") - } - - var r0 *compute.CommandStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CommandStatusRequest) (*compute.CommandStatusResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CommandStatusRequest) *compute.CommandStatusResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CommandStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CommandStatusRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_CommandStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommandStatus' -type MockCommandExecutionInterface_CommandStatus_Call struct { - *mock.Call -} - -// CommandStatus is a helper method to define mock.On call -// - ctx context.Context -// - request compute.CommandStatusRequest -func (_e *MockCommandExecutionInterface_Expecter) CommandStatus(ctx interface{}, request interface{}) *MockCommandExecutionInterface_CommandStatus_Call { - return &MockCommandExecutionInterface_CommandStatus_Call{Call: _e.mock.On("CommandStatus", ctx, request)} -} - -func (_c *MockCommandExecutionInterface_CommandStatus_Call) Run(run func(ctx context.Context, request compute.CommandStatusRequest)) *MockCommandExecutionInterface_CommandStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.CommandStatusRequest)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_CommandStatus_Call) Return(_a0 *compute.CommandStatusResponse, _a1 error) *MockCommandExecutionInterface_CommandStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_CommandStatus_Call) RunAndReturn(run func(context.Context, compute.CommandStatusRequest) (*compute.CommandStatusResponse, error)) *MockCommandExecutionInterface_CommandStatus_Call { - _c.Call.Return(run) - return _c -} - -// ContextStatus provides a mock function with given fields: ctx, request -func (_m *MockCommandExecutionInterface) ContextStatus(ctx context.Context, request compute.ContextStatusRequest) (*compute.ContextStatusResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ContextStatus") - } - - var r0 *compute.ContextStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ContextStatusRequest) (*compute.ContextStatusResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ContextStatusRequest) *compute.ContextStatusResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ContextStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ContextStatusRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_ContextStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContextStatus' -type MockCommandExecutionInterface_ContextStatus_Call struct { - *mock.Call -} - -// ContextStatus is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ContextStatusRequest -func (_e *MockCommandExecutionInterface_Expecter) ContextStatus(ctx interface{}, request interface{}) *MockCommandExecutionInterface_ContextStatus_Call { - return &MockCommandExecutionInterface_ContextStatus_Call{Call: _e.mock.On("ContextStatus", ctx, request)} -} - -func (_c *MockCommandExecutionInterface_ContextStatus_Call) Run(run func(ctx context.Context, request compute.ContextStatusRequest)) *MockCommandExecutionInterface_ContextStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ContextStatusRequest)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_ContextStatus_Call) Return(_a0 *compute.ContextStatusResponse, _a1 error) *MockCommandExecutionInterface_ContextStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_ContextStatus_Call) RunAndReturn(run func(context.Context, compute.ContextStatusRequest) (*compute.ContextStatusResponse, error)) *MockCommandExecutionInterface_ContextStatus_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, createContext -func (_m *MockCommandExecutionInterface) Create(ctx context.Context, createContext compute.CreateContext) (*compute.WaitContextStatusCommandExecutionRunning[compute.Created], error) { - ret := _m.Called(ctx, createContext) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *compute.WaitContextStatusCommandExecutionRunning[compute.Created] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateContext) (*compute.WaitContextStatusCommandExecutionRunning[compute.Created], error)); ok { - return rf(ctx, createContext) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateContext) *compute.WaitContextStatusCommandExecutionRunning[compute.Created]); ok { - r0 = rf(ctx, createContext) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitContextStatusCommandExecutionRunning[compute.Created]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CreateContext) error); ok { - r1 = rf(ctx, createContext) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockCommandExecutionInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - createContext compute.CreateContext -func (_e *MockCommandExecutionInterface_Expecter) Create(ctx interface{}, createContext interface{}) *MockCommandExecutionInterface_Create_Call { - return &MockCommandExecutionInterface_Create_Call{Call: _e.mock.On("Create", ctx, createContext)} -} - -func (_c *MockCommandExecutionInterface_Create_Call) Run(run func(ctx context.Context, createContext compute.CreateContext)) *MockCommandExecutionInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.CreateContext)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_Create_Call) Return(_a0 *compute.WaitContextStatusCommandExecutionRunning[compute.Created], _a1 error) *MockCommandExecutionInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_Create_Call) RunAndReturn(run func(context.Context, compute.CreateContext) (*compute.WaitContextStatusCommandExecutionRunning[compute.Created], error)) *MockCommandExecutionInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateAndWait provides a mock function with given fields: ctx, createContext, options -func (_m *MockCommandExecutionInterface) CreateAndWait(ctx context.Context, createContext compute.CreateContext, options ...retries.Option[compute.ContextStatusResponse]) (*compute.ContextStatusResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createContext) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateAndWait") - } - - var r0 *compute.ContextStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateContext, ...retries.Option[compute.ContextStatusResponse]) (*compute.ContextStatusResponse, error)); ok { - return rf(ctx, createContext, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateContext, ...retries.Option[compute.ContextStatusResponse]) *compute.ContextStatusResponse); ok { - r0 = rf(ctx, createContext, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ContextStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CreateContext, ...retries.Option[compute.ContextStatusResponse]) error); ok { - r1 = rf(ctx, createContext, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait' -type MockCommandExecutionInterface_CreateAndWait_Call struct { - *mock.Call -} - -// CreateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createContext compute.CreateContext -// - options ...retries.Option[compute.ContextStatusResponse] -func (_e *MockCommandExecutionInterface_Expecter) CreateAndWait(ctx interface{}, createContext interface{}, options ...interface{}) *MockCommandExecutionInterface_CreateAndWait_Call { - return &MockCommandExecutionInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait", - append([]interface{}{ctx, createContext}, options...)...)} -} - -func (_c *MockCommandExecutionInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createContext compute.CreateContext, options ...retries.Option[compute.ContextStatusResponse])) *MockCommandExecutionInterface_CreateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ContextStatusResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ContextStatusResponse]) - } - } - run(args[0].(context.Context), args[1].(compute.CreateContext), variadicArgs...) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_CreateAndWait_Call) Return(_a0 *compute.ContextStatusResponse, _a1 error) *MockCommandExecutionInterface_CreateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, compute.CreateContext, ...retries.Option[compute.ContextStatusResponse]) (*compute.ContextStatusResponse, error)) *MockCommandExecutionInterface_CreateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Destroy provides a mock function with given fields: ctx, request -func (_m *MockCommandExecutionInterface) Destroy(ctx context.Context, request compute.DestroyContext) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Destroy") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.DestroyContext) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCommandExecutionInterface_Destroy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Destroy' -type MockCommandExecutionInterface_Destroy_Call struct { - *mock.Call -} - -// Destroy is a helper method to define mock.On call -// - ctx context.Context -// - request compute.DestroyContext -func (_e *MockCommandExecutionInterface_Expecter) Destroy(ctx interface{}, request interface{}) *MockCommandExecutionInterface_Destroy_Call { - return &MockCommandExecutionInterface_Destroy_Call{Call: _e.mock.On("Destroy", ctx, request)} -} - -func (_c *MockCommandExecutionInterface_Destroy_Call) Run(run func(ctx context.Context, request compute.DestroyContext)) *MockCommandExecutionInterface_Destroy_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.DestroyContext)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_Destroy_Call) Return(_a0 error) *MockCommandExecutionInterface_Destroy_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCommandExecutionInterface_Destroy_Call) RunAndReturn(run func(context.Context, compute.DestroyContext) error) *MockCommandExecutionInterface_Destroy_Call { - _c.Call.Return(run) - return _c -} - -// Execute provides a mock function with given fields: ctx, command -func (_m *MockCommandExecutionInterface) Execute(ctx context.Context, command compute.Command) (*compute.WaitCommandStatusCommandExecutionFinishedOrError[compute.Created], error) { - ret := _m.Called(ctx, command) - - if len(ret) == 0 { - panic("no return value specified for Execute") - } - - var r0 *compute.WaitCommandStatusCommandExecutionFinishedOrError[compute.Created] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.Command) (*compute.WaitCommandStatusCommandExecutionFinishedOrError[compute.Created], error)); ok { - return rf(ctx, command) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.Command) *compute.WaitCommandStatusCommandExecutionFinishedOrError[compute.Created]); ok { - r0 = rf(ctx, command) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.WaitCommandStatusCommandExecutionFinishedOrError[compute.Created]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.Command) error); ok { - r1 = rf(ctx, command) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute' -type MockCommandExecutionInterface_Execute_Call struct { - *mock.Call -} - -// Execute is a helper method to define mock.On call -// - ctx context.Context -// - command compute.Command -func (_e *MockCommandExecutionInterface_Expecter) Execute(ctx interface{}, command interface{}) *MockCommandExecutionInterface_Execute_Call { - return &MockCommandExecutionInterface_Execute_Call{Call: _e.mock.On("Execute", ctx, command)} -} - -func (_c *MockCommandExecutionInterface_Execute_Call) Run(run func(ctx context.Context, command compute.Command)) *MockCommandExecutionInterface_Execute_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.Command)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_Execute_Call) Return(_a0 *compute.WaitCommandStatusCommandExecutionFinishedOrError[compute.Created], _a1 error) *MockCommandExecutionInterface_Execute_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_Execute_Call) RunAndReturn(run func(context.Context, compute.Command) (*compute.WaitCommandStatusCommandExecutionFinishedOrError[compute.Created], error)) *MockCommandExecutionInterface_Execute_Call { - _c.Call.Return(run) - return _c -} - -// ExecuteAndWait provides a mock function with given fields: ctx, command, options -func (_m *MockCommandExecutionInterface) ExecuteAndWait(ctx context.Context, command compute.Command, options ...retries.Option[compute.CommandStatusResponse]) (*compute.CommandStatusResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, command) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for ExecuteAndWait") - } - - var r0 *compute.CommandStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.Command, ...retries.Option[compute.CommandStatusResponse]) (*compute.CommandStatusResponse, error)); ok { - return rf(ctx, command, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.Command, ...retries.Option[compute.CommandStatusResponse]) *compute.CommandStatusResponse); ok { - r0 = rf(ctx, command, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CommandStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.Command, ...retries.Option[compute.CommandStatusResponse]) error); ok { - r1 = rf(ctx, command, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_ExecuteAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteAndWait' -type MockCommandExecutionInterface_ExecuteAndWait_Call struct { - *mock.Call -} - -// ExecuteAndWait is a helper method to define mock.On call -// - ctx context.Context -// - command compute.Command -// - options ...retries.Option[compute.CommandStatusResponse] -func (_e *MockCommandExecutionInterface_Expecter) ExecuteAndWait(ctx interface{}, command interface{}, options ...interface{}) *MockCommandExecutionInterface_ExecuteAndWait_Call { - return &MockCommandExecutionInterface_ExecuteAndWait_Call{Call: _e.mock.On("ExecuteAndWait", - append([]interface{}{ctx, command}, options...)...)} -} - -func (_c *MockCommandExecutionInterface_ExecuteAndWait_Call) Run(run func(ctx context.Context, command compute.Command, options ...retries.Option[compute.CommandStatusResponse])) *MockCommandExecutionInterface_ExecuteAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.CommandStatusResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.CommandStatusResponse]) - } - } - run(args[0].(context.Context), args[1].(compute.Command), variadicArgs...) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_ExecuteAndWait_Call) Return(_a0 *compute.CommandStatusResponse, _a1 error) *MockCommandExecutionInterface_ExecuteAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_ExecuteAndWait_Call) RunAndReturn(run func(context.Context, compute.Command, ...retries.Option[compute.CommandStatusResponse]) (*compute.CommandStatusResponse, error)) *MockCommandExecutionInterface_ExecuteAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: ctx, clusterID, language -func (_m *MockCommandExecutionInterface) Start(ctx context.Context, clusterID string, language compute.Language) (*compute.CommandExecutorV2, error) { - ret := _m.Called(ctx, clusterID, language) - - if len(ret) == 0 { - panic("no return value specified for Start") - } - - var r0 *compute.CommandExecutorV2 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, compute.Language) (*compute.CommandExecutorV2, error)); ok { - return rf(ctx, clusterID, language) - } - if rf, ok := ret.Get(0).(func(context.Context, string, compute.Language) *compute.CommandExecutorV2); ok { - r0 = rf(ctx, clusterID, language) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CommandExecutorV2) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, compute.Language) error); ok { - r1 = rf(ctx, clusterID, language) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type MockCommandExecutionInterface_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - ctx context.Context -// - clusterID string -// - language compute.Language -func (_e *MockCommandExecutionInterface_Expecter) Start(ctx interface{}, clusterID interface{}, language interface{}) *MockCommandExecutionInterface_Start_Call { - return &MockCommandExecutionInterface_Start_Call{Call: _e.mock.On("Start", ctx, clusterID, language)} -} - -func (_c *MockCommandExecutionInterface_Start_Call) Run(run func(ctx context.Context, clusterID string, language compute.Language)) *MockCommandExecutionInterface_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(compute.Language)) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_Start_Call) Return(_a0 *compute.CommandExecutorV2, _a1 error) *MockCommandExecutionInterface_Start_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_Start_Call) RunAndReturn(run func(context.Context, string, compute.Language) (*compute.CommandExecutorV2, error)) *MockCommandExecutionInterface_Start_Call { - _c.Call.Return(run) - return _c -} - -// WaitCommandStatusCommandExecutionCancelled provides a mock function with given fields: ctx, clusterId, commandId, contextId, timeout, callback -func (_m *MockCommandExecutionInterface) WaitCommandStatusCommandExecutionCancelled(ctx context.Context, clusterId string, commandId string, contextId string, timeout time.Duration, callback func(*compute.CommandStatusResponse)) (*compute.CommandStatusResponse, error) { - ret := _m.Called(ctx, clusterId, commandId, contextId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitCommandStatusCommandExecutionCancelled") - } - - var r0 *compute.CommandStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) (*compute.CommandStatusResponse, error)); ok { - return rf(ctx, clusterId, commandId, contextId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) *compute.CommandStatusResponse); ok { - r0 = rf(ctx, clusterId, commandId, contextId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CommandStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) error); ok { - r1 = rf(ctx, clusterId, commandId, contextId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitCommandStatusCommandExecutionCancelled' -type MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call struct { - *mock.Call -} - -// WaitCommandStatusCommandExecutionCancelled is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -// - commandId string -// - contextId string -// - timeout time.Duration -// - callback func(*compute.CommandStatusResponse) -func (_e *MockCommandExecutionInterface_Expecter) WaitCommandStatusCommandExecutionCancelled(ctx interface{}, clusterId interface{}, commandId interface{}, contextId interface{}, timeout interface{}, callback interface{}) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call { - return &MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call{Call: _e.mock.On("WaitCommandStatusCommandExecutionCancelled", ctx, clusterId, commandId, contextId, timeout, callback)} -} - -func (_c *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call) Run(run func(ctx context.Context, clusterId string, commandId string, contextId string, timeout time.Duration, callback func(*compute.CommandStatusResponse))) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(time.Duration), args[5].(func(*compute.CommandStatusResponse))) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call) Return(_a0 *compute.CommandStatusResponse, _a1 error) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call) RunAndReturn(run func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) (*compute.CommandStatusResponse, error)) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionCancelled_Call { - _c.Call.Return(run) - return _c -} - -// WaitCommandStatusCommandExecutionFinishedOrError provides a mock function with given fields: ctx, clusterId, commandId, contextId, timeout, callback -func (_m *MockCommandExecutionInterface) WaitCommandStatusCommandExecutionFinishedOrError(ctx context.Context, clusterId string, commandId string, contextId string, timeout time.Duration, callback func(*compute.CommandStatusResponse)) (*compute.CommandStatusResponse, error) { - ret := _m.Called(ctx, clusterId, commandId, contextId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitCommandStatusCommandExecutionFinishedOrError") - } - - var r0 *compute.CommandStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) (*compute.CommandStatusResponse, error)); ok { - return rf(ctx, clusterId, commandId, contextId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) *compute.CommandStatusResponse); ok { - r0 = rf(ctx, clusterId, commandId, contextId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CommandStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) error); ok { - r1 = rf(ctx, clusterId, commandId, contextId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitCommandStatusCommandExecutionFinishedOrError' -type MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call struct { - *mock.Call -} - -// WaitCommandStatusCommandExecutionFinishedOrError is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -// - commandId string -// - contextId string -// - timeout time.Duration -// - callback func(*compute.CommandStatusResponse) -func (_e *MockCommandExecutionInterface_Expecter) WaitCommandStatusCommandExecutionFinishedOrError(ctx interface{}, clusterId interface{}, commandId interface{}, contextId interface{}, timeout interface{}, callback interface{}) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call { - return &MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call{Call: _e.mock.On("WaitCommandStatusCommandExecutionFinishedOrError", ctx, clusterId, commandId, contextId, timeout, callback)} -} - -func (_c *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call) Run(run func(ctx context.Context, clusterId string, commandId string, contextId string, timeout time.Duration, callback func(*compute.CommandStatusResponse))) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(time.Duration), args[5].(func(*compute.CommandStatusResponse))) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call) Return(_a0 *compute.CommandStatusResponse, _a1 error) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call) RunAndReturn(run func(context.Context, string, string, string, time.Duration, func(*compute.CommandStatusResponse)) (*compute.CommandStatusResponse, error)) *MockCommandExecutionInterface_WaitCommandStatusCommandExecutionFinishedOrError_Call { - _c.Call.Return(run) - return _c -} - -// WaitContextStatusCommandExecutionRunning provides a mock function with given fields: ctx, clusterId, contextId, timeout, callback -func (_m *MockCommandExecutionInterface) WaitContextStatusCommandExecutionRunning(ctx context.Context, clusterId string, contextId string, timeout time.Duration, callback func(*compute.ContextStatusResponse)) (*compute.ContextStatusResponse, error) { - ret := _m.Called(ctx, clusterId, contextId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitContextStatusCommandExecutionRunning") - } - - var r0 *compute.ContextStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Duration, func(*compute.ContextStatusResponse)) (*compute.ContextStatusResponse, error)); ok { - return rf(ctx, clusterId, contextId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Duration, func(*compute.ContextStatusResponse)) *compute.ContextStatusResponse); ok { - r0 = rf(ctx, clusterId, contextId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ContextStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, time.Duration, func(*compute.ContextStatusResponse)) error); ok { - r1 = rf(ctx, clusterId, contextId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitContextStatusCommandExecutionRunning' -type MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call struct { - *mock.Call -} - -// WaitContextStatusCommandExecutionRunning is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -// - contextId string -// - timeout time.Duration -// - callback func(*compute.ContextStatusResponse) -func (_e *MockCommandExecutionInterface_Expecter) WaitContextStatusCommandExecutionRunning(ctx interface{}, clusterId interface{}, contextId interface{}, timeout interface{}, callback interface{}) *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call { - return &MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call{Call: _e.mock.On("WaitContextStatusCommandExecutionRunning", ctx, clusterId, contextId, timeout, callback)} -} - -func (_c *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call) Run(run func(ctx context.Context, clusterId string, contextId string, timeout time.Duration, callback func(*compute.ContextStatusResponse))) *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(time.Duration), args[4].(func(*compute.ContextStatusResponse))) - }) - return _c -} - -func (_c *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call) Return(_a0 *compute.ContextStatusResponse, _a1 error) *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call) RunAndReturn(run func(context.Context, string, string, time.Duration, func(*compute.ContextStatusResponse)) (*compute.ContextStatusResponse, error)) *MockCommandExecutionInterface_WaitContextStatusCommandExecutionRunning_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCommandExecutionInterface creates a new instance of MockCommandExecutionInterface. 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 NewMockCommandExecutionInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCommandExecutionInterface { - mock := &MockCommandExecutionInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_global_init_scripts_interface.go b/experimental/mocks/service/compute/mock_global_init_scripts_interface.go deleted file mode 100644 index d57c005c1..000000000 --- a/experimental/mocks/service/compute/mock_global_init_scripts_interface.go +++ /dev/null @@ -1,581 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockGlobalInitScriptsInterface is an autogenerated mock type for the GlobalInitScriptsInterface type -type MockGlobalInitScriptsInterface struct { - mock.Mock -} - -type MockGlobalInitScriptsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockGlobalInitScriptsInterface) EXPECT() *MockGlobalInitScriptsInterface_Expecter { - return &MockGlobalInitScriptsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockGlobalInitScriptsInterface) Create(ctx context.Context, request compute.GlobalInitScriptCreateRequest) (*compute.CreateResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *compute.CreateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GlobalInitScriptCreateRequest) (*compute.CreateResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GlobalInitScriptCreateRequest) *compute.CreateResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CreateResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GlobalInitScriptCreateRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGlobalInitScriptsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockGlobalInitScriptsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GlobalInitScriptCreateRequest -func (_e *MockGlobalInitScriptsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockGlobalInitScriptsInterface_Create_Call { - return &MockGlobalInitScriptsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockGlobalInitScriptsInterface_Create_Call) Run(run func(ctx context.Context, request compute.GlobalInitScriptCreateRequest)) *MockGlobalInitScriptsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GlobalInitScriptCreateRequest)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Create_Call) Return(_a0 *compute.CreateResponse, _a1 error) *MockGlobalInitScriptsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Create_Call) RunAndReturn(run func(context.Context, compute.GlobalInitScriptCreateRequest) (*compute.CreateResponse, error)) *MockGlobalInitScriptsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockGlobalInitScriptsInterface) Delete(ctx context.Context, request compute.DeleteGlobalInitScriptRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.DeleteGlobalInitScriptRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGlobalInitScriptsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockGlobalInitScriptsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request compute.DeleteGlobalInitScriptRequest -func (_e *MockGlobalInitScriptsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockGlobalInitScriptsInterface_Delete_Call { - return &MockGlobalInitScriptsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockGlobalInitScriptsInterface_Delete_Call) Run(run func(ctx context.Context, request compute.DeleteGlobalInitScriptRequest)) *MockGlobalInitScriptsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.DeleteGlobalInitScriptRequest)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Delete_Call) Return(_a0 error) *MockGlobalInitScriptsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Delete_Call) RunAndReturn(run func(context.Context, compute.DeleteGlobalInitScriptRequest) error) *MockGlobalInitScriptsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByScriptId provides a mock function with given fields: ctx, scriptId -func (_m *MockGlobalInitScriptsInterface) DeleteByScriptId(ctx context.Context, scriptId string) error { - ret := _m.Called(ctx, scriptId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByScriptId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, scriptId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGlobalInitScriptsInterface_DeleteByScriptId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByScriptId' -type MockGlobalInitScriptsInterface_DeleteByScriptId_Call struct { - *mock.Call -} - -// DeleteByScriptId is a helper method to define mock.On call -// - ctx context.Context -// - scriptId string -func (_e *MockGlobalInitScriptsInterface_Expecter) DeleteByScriptId(ctx interface{}, scriptId interface{}) *MockGlobalInitScriptsInterface_DeleteByScriptId_Call { - return &MockGlobalInitScriptsInterface_DeleteByScriptId_Call{Call: _e.mock.On("DeleteByScriptId", ctx, scriptId)} -} - -func (_c *MockGlobalInitScriptsInterface_DeleteByScriptId_Call) Run(run func(ctx context.Context, scriptId string)) *MockGlobalInitScriptsInterface_DeleteByScriptId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_DeleteByScriptId_Call) Return(_a0 error) *MockGlobalInitScriptsInterface_DeleteByScriptId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_DeleteByScriptId_Call) RunAndReturn(run func(context.Context, string) error) *MockGlobalInitScriptsInterface_DeleteByScriptId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockGlobalInitScriptsInterface) Get(ctx context.Context, request compute.GetGlobalInitScriptRequest) (*compute.GlobalInitScriptDetailsWithContent, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *compute.GlobalInitScriptDetailsWithContent - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetGlobalInitScriptRequest) (*compute.GlobalInitScriptDetailsWithContent, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetGlobalInitScriptRequest) *compute.GlobalInitScriptDetailsWithContent); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GlobalInitScriptDetailsWithContent) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetGlobalInitScriptRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGlobalInitScriptsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockGlobalInitScriptsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetGlobalInitScriptRequest -func (_e *MockGlobalInitScriptsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockGlobalInitScriptsInterface_Get_Call { - return &MockGlobalInitScriptsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockGlobalInitScriptsInterface_Get_Call) Run(run func(ctx context.Context, request compute.GetGlobalInitScriptRequest)) *MockGlobalInitScriptsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetGlobalInitScriptRequest)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Get_Call) Return(_a0 *compute.GlobalInitScriptDetailsWithContent, _a1 error) *MockGlobalInitScriptsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Get_Call) RunAndReturn(run func(context.Context, compute.GetGlobalInitScriptRequest) (*compute.GlobalInitScriptDetailsWithContent, error)) *MockGlobalInitScriptsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockGlobalInitScriptsInterface) GetByName(ctx context.Context, name string) (*compute.GlobalInitScriptDetails, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *compute.GlobalInitScriptDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.GlobalInitScriptDetails, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.GlobalInitScriptDetails); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GlobalInitScriptDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGlobalInitScriptsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockGlobalInitScriptsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockGlobalInitScriptsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockGlobalInitScriptsInterface_GetByName_Call { - return &MockGlobalInitScriptsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockGlobalInitScriptsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockGlobalInitScriptsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_GetByName_Call) Return(_a0 *compute.GlobalInitScriptDetails, _a1 error) *MockGlobalInitScriptsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*compute.GlobalInitScriptDetails, error)) *MockGlobalInitScriptsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetByScriptId provides a mock function with given fields: ctx, scriptId -func (_m *MockGlobalInitScriptsInterface) GetByScriptId(ctx context.Context, scriptId string) (*compute.GlobalInitScriptDetailsWithContent, error) { - ret := _m.Called(ctx, scriptId) - - if len(ret) == 0 { - panic("no return value specified for GetByScriptId") - } - - var r0 *compute.GlobalInitScriptDetailsWithContent - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.GlobalInitScriptDetailsWithContent, error)); ok { - return rf(ctx, scriptId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.GlobalInitScriptDetailsWithContent); ok { - r0 = rf(ctx, scriptId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GlobalInitScriptDetailsWithContent) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, scriptId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGlobalInitScriptsInterface_GetByScriptId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByScriptId' -type MockGlobalInitScriptsInterface_GetByScriptId_Call struct { - *mock.Call -} - -// GetByScriptId is a helper method to define mock.On call -// - ctx context.Context -// - scriptId string -func (_e *MockGlobalInitScriptsInterface_Expecter) GetByScriptId(ctx interface{}, scriptId interface{}) *MockGlobalInitScriptsInterface_GetByScriptId_Call { - return &MockGlobalInitScriptsInterface_GetByScriptId_Call{Call: _e.mock.On("GetByScriptId", ctx, scriptId)} -} - -func (_c *MockGlobalInitScriptsInterface_GetByScriptId_Call) Run(run func(ctx context.Context, scriptId string)) *MockGlobalInitScriptsInterface_GetByScriptId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_GetByScriptId_Call) Return(_a0 *compute.GlobalInitScriptDetailsWithContent, _a1 error) *MockGlobalInitScriptsInterface_GetByScriptId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_GetByScriptId_Call) RunAndReturn(run func(context.Context, string) (*compute.GlobalInitScriptDetailsWithContent, error)) *MockGlobalInitScriptsInterface_GetByScriptId_Call { - _c.Call.Return(run) - return _c -} - -// GlobalInitScriptDetailsNameToScriptIdMap provides a mock function with given fields: ctx -func (_m *MockGlobalInitScriptsInterface) GlobalInitScriptDetailsNameToScriptIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GlobalInitScriptDetailsNameToScriptIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GlobalInitScriptDetailsNameToScriptIdMap' -type MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call struct { - *mock.Call -} - -// GlobalInitScriptDetailsNameToScriptIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockGlobalInitScriptsInterface_Expecter) GlobalInitScriptDetailsNameToScriptIdMap(ctx interface{}) *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call { - return &MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call{Call: _e.mock.On("GlobalInitScriptDetailsNameToScriptIdMap", ctx)} -} - -func (_c *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call) Run(run func(ctx context.Context)) *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockGlobalInitScriptsInterface_GlobalInitScriptDetailsNameToScriptIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockGlobalInitScriptsInterface) List(ctx context.Context) listing.Iterator[compute.GlobalInitScriptDetails] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[compute.GlobalInitScriptDetails] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[compute.GlobalInitScriptDetails]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.GlobalInitScriptDetails]) - } - } - - return r0 -} - -// MockGlobalInitScriptsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockGlobalInitScriptsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockGlobalInitScriptsInterface_Expecter) List(ctx interface{}) *MockGlobalInitScriptsInterface_List_Call { - return &MockGlobalInitScriptsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockGlobalInitScriptsInterface_List_Call) Run(run func(ctx context.Context)) *MockGlobalInitScriptsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_List_Call) Return(_a0 listing.Iterator[compute.GlobalInitScriptDetails]) *MockGlobalInitScriptsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[compute.GlobalInitScriptDetails]) *MockGlobalInitScriptsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockGlobalInitScriptsInterface) ListAll(ctx context.Context) ([]compute.GlobalInitScriptDetails, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []compute.GlobalInitScriptDetails - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]compute.GlobalInitScriptDetails, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []compute.GlobalInitScriptDetails); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.GlobalInitScriptDetails) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGlobalInitScriptsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockGlobalInitScriptsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockGlobalInitScriptsInterface_Expecter) ListAll(ctx interface{}) *MockGlobalInitScriptsInterface_ListAll_Call { - return &MockGlobalInitScriptsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockGlobalInitScriptsInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockGlobalInitScriptsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_ListAll_Call) Return(_a0 []compute.GlobalInitScriptDetails, _a1 error) *MockGlobalInitScriptsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]compute.GlobalInitScriptDetails, error)) *MockGlobalInitScriptsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockGlobalInitScriptsInterface) Update(ctx context.Context, request compute.GlobalInitScriptUpdateRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GlobalInitScriptUpdateRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGlobalInitScriptsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockGlobalInitScriptsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GlobalInitScriptUpdateRequest -func (_e *MockGlobalInitScriptsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockGlobalInitScriptsInterface_Update_Call { - return &MockGlobalInitScriptsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockGlobalInitScriptsInterface_Update_Call) Run(run func(ctx context.Context, request compute.GlobalInitScriptUpdateRequest)) *MockGlobalInitScriptsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GlobalInitScriptUpdateRequest)) - }) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Update_Call) Return(_a0 error) *MockGlobalInitScriptsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGlobalInitScriptsInterface_Update_Call) RunAndReturn(run func(context.Context, compute.GlobalInitScriptUpdateRequest) error) *MockGlobalInitScriptsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockGlobalInitScriptsInterface creates a new instance of MockGlobalInitScriptsInterface. 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 NewMockGlobalInitScriptsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockGlobalInitScriptsInterface { - mock := &MockGlobalInitScriptsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_instance_pools_interface.go b/experimental/mocks/service/compute/mock_instance_pools_interface.go deleted file mode 100644 index d81eb239f..000000000 --- a/experimental/mocks/service/compute/mock_instance_pools_interface.go +++ /dev/null @@ -1,935 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockInstancePoolsInterface is an autogenerated mock type for the InstancePoolsInterface type -type MockInstancePoolsInterface struct { - mock.Mock -} - -type MockInstancePoolsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockInstancePoolsInterface) EXPECT() *MockInstancePoolsInterface_Expecter { - return &MockInstancePoolsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) Create(ctx context.Context, request compute.CreateInstancePool) (*compute.CreateInstancePoolResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *compute.CreateInstancePoolResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateInstancePool) (*compute.CreateInstancePoolResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.CreateInstancePool) *compute.CreateInstancePoolResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.CreateInstancePoolResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.CreateInstancePool) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockInstancePoolsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request compute.CreateInstancePool -func (_e *MockInstancePoolsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockInstancePoolsInterface_Create_Call { - return &MockInstancePoolsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_Create_Call) Run(run func(ctx context.Context, request compute.CreateInstancePool)) *MockInstancePoolsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.CreateInstancePool)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_Create_Call) Return(_a0 *compute.CreateInstancePoolResponse, _a1 error) *MockInstancePoolsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_Create_Call) RunAndReturn(run func(context.Context, compute.CreateInstancePool) (*compute.CreateInstancePoolResponse, error)) *MockInstancePoolsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) Delete(ctx context.Context, request compute.DeleteInstancePool) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.DeleteInstancePool) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockInstancePoolsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockInstancePoolsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request compute.DeleteInstancePool -func (_e *MockInstancePoolsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockInstancePoolsInterface_Delete_Call { - return &MockInstancePoolsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_Delete_Call) Run(run func(ctx context.Context, request compute.DeleteInstancePool)) *MockInstancePoolsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.DeleteInstancePool)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_Delete_Call) Return(_a0 error) *MockInstancePoolsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstancePoolsInterface_Delete_Call) RunAndReturn(run func(context.Context, compute.DeleteInstancePool) error) *MockInstancePoolsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByInstancePoolId provides a mock function with given fields: ctx, instancePoolId -func (_m *MockInstancePoolsInterface) DeleteByInstancePoolId(ctx context.Context, instancePoolId string) error { - ret := _m.Called(ctx, instancePoolId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByInstancePoolId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, instancePoolId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockInstancePoolsInterface_DeleteByInstancePoolId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByInstancePoolId' -type MockInstancePoolsInterface_DeleteByInstancePoolId_Call struct { - *mock.Call -} - -// DeleteByInstancePoolId is a helper method to define mock.On call -// - ctx context.Context -// - instancePoolId string -func (_e *MockInstancePoolsInterface_Expecter) DeleteByInstancePoolId(ctx interface{}, instancePoolId interface{}) *MockInstancePoolsInterface_DeleteByInstancePoolId_Call { - return &MockInstancePoolsInterface_DeleteByInstancePoolId_Call{Call: _e.mock.On("DeleteByInstancePoolId", ctx, instancePoolId)} -} - -func (_c *MockInstancePoolsInterface_DeleteByInstancePoolId_Call) Run(run func(ctx context.Context, instancePoolId string)) *MockInstancePoolsInterface_DeleteByInstancePoolId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_DeleteByInstancePoolId_Call) Return(_a0 error) *MockInstancePoolsInterface_DeleteByInstancePoolId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstancePoolsInterface_DeleteByInstancePoolId_Call) RunAndReturn(run func(context.Context, string) error) *MockInstancePoolsInterface_DeleteByInstancePoolId_Call { - _c.Call.Return(run) - return _c -} - -// Edit provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) Edit(ctx context.Context, request compute.EditInstancePool) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Edit") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.EditInstancePool) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockInstancePoolsInterface_Edit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Edit' -type MockInstancePoolsInterface_Edit_Call struct { - *mock.Call -} - -// Edit is a helper method to define mock.On call -// - ctx context.Context -// - request compute.EditInstancePool -func (_e *MockInstancePoolsInterface_Expecter) Edit(ctx interface{}, request interface{}) *MockInstancePoolsInterface_Edit_Call { - return &MockInstancePoolsInterface_Edit_Call{Call: _e.mock.On("Edit", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_Edit_Call) Run(run func(ctx context.Context, request compute.EditInstancePool)) *MockInstancePoolsInterface_Edit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.EditInstancePool)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_Edit_Call) Return(_a0 error) *MockInstancePoolsInterface_Edit_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstancePoolsInterface_Edit_Call) RunAndReturn(run func(context.Context, compute.EditInstancePool) error) *MockInstancePoolsInterface_Edit_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) Get(ctx context.Context, request compute.GetInstancePoolRequest) (*compute.GetInstancePool, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *compute.GetInstancePool - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetInstancePoolRequest) (*compute.GetInstancePool, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetInstancePoolRequest) *compute.GetInstancePool); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetInstancePool) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetInstancePoolRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockInstancePoolsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetInstancePoolRequest -func (_e *MockInstancePoolsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockInstancePoolsInterface_Get_Call { - return &MockInstancePoolsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_Get_Call) Run(run func(ctx context.Context, request compute.GetInstancePoolRequest)) *MockInstancePoolsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetInstancePoolRequest)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_Get_Call) Return(_a0 *compute.GetInstancePool, _a1 error) *MockInstancePoolsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_Get_Call) RunAndReturn(run func(context.Context, compute.GetInstancePoolRequest) (*compute.GetInstancePool, error)) *MockInstancePoolsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByInstancePoolId provides a mock function with given fields: ctx, instancePoolId -func (_m *MockInstancePoolsInterface) GetByInstancePoolId(ctx context.Context, instancePoolId string) (*compute.GetInstancePool, error) { - ret := _m.Called(ctx, instancePoolId) - - if len(ret) == 0 { - panic("no return value specified for GetByInstancePoolId") - } - - var r0 *compute.GetInstancePool - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.GetInstancePool, error)); ok { - return rf(ctx, instancePoolId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.GetInstancePool); ok { - r0 = rf(ctx, instancePoolId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetInstancePool) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, instancePoolId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_GetByInstancePoolId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByInstancePoolId' -type MockInstancePoolsInterface_GetByInstancePoolId_Call struct { - *mock.Call -} - -// GetByInstancePoolId is a helper method to define mock.On call -// - ctx context.Context -// - instancePoolId string -func (_e *MockInstancePoolsInterface_Expecter) GetByInstancePoolId(ctx interface{}, instancePoolId interface{}) *MockInstancePoolsInterface_GetByInstancePoolId_Call { - return &MockInstancePoolsInterface_GetByInstancePoolId_Call{Call: _e.mock.On("GetByInstancePoolId", ctx, instancePoolId)} -} - -func (_c *MockInstancePoolsInterface_GetByInstancePoolId_Call) Run(run func(ctx context.Context, instancePoolId string)) *MockInstancePoolsInterface_GetByInstancePoolId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_GetByInstancePoolId_Call) Return(_a0 *compute.GetInstancePool, _a1 error) *MockInstancePoolsInterface_GetByInstancePoolId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_GetByInstancePoolId_Call) RunAndReturn(run func(context.Context, string) (*compute.GetInstancePool, error)) *MockInstancePoolsInterface_GetByInstancePoolId_Call { - _c.Call.Return(run) - return _c -} - -// GetByInstancePoolName provides a mock function with given fields: ctx, name -func (_m *MockInstancePoolsInterface) GetByInstancePoolName(ctx context.Context, name string) (*compute.InstancePoolAndStats, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByInstancePoolName") - } - - var r0 *compute.InstancePoolAndStats - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.InstancePoolAndStats, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.InstancePoolAndStats); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.InstancePoolAndStats) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_GetByInstancePoolName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByInstancePoolName' -type MockInstancePoolsInterface_GetByInstancePoolName_Call struct { - *mock.Call -} - -// GetByInstancePoolName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockInstancePoolsInterface_Expecter) GetByInstancePoolName(ctx interface{}, name interface{}) *MockInstancePoolsInterface_GetByInstancePoolName_Call { - return &MockInstancePoolsInterface_GetByInstancePoolName_Call{Call: _e.mock.On("GetByInstancePoolName", ctx, name)} -} - -func (_c *MockInstancePoolsInterface_GetByInstancePoolName_Call) Run(run func(ctx context.Context, name string)) *MockInstancePoolsInterface_GetByInstancePoolName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_GetByInstancePoolName_Call) Return(_a0 *compute.InstancePoolAndStats, _a1 error) *MockInstancePoolsInterface_GetByInstancePoolName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_GetByInstancePoolName_Call) RunAndReturn(run func(context.Context, string) (*compute.InstancePoolAndStats, error)) *MockInstancePoolsInterface_GetByInstancePoolName_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) GetPermissionLevels(ctx context.Context, request compute.GetInstancePoolPermissionLevelsRequest) (*compute.GetInstancePoolPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *compute.GetInstancePoolPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetInstancePoolPermissionLevelsRequest) (*compute.GetInstancePoolPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetInstancePoolPermissionLevelsRequest) *compute.GetInstancePoolPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetInstancePoolPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetInstancePoolPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockInstancePoolsInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetInstancePoolPermissionLevelsRequest -func (_e *MockInstancePoolsInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockInstancePoolsInterface_GetPermissionLevels_Call { - return &MockInstancePoolsInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request compute.GetInstancePoolPermissionLevelsRequest)) *MockInstancePoolsInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetInstancePoolPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissionLevels_Call) Return(_a0 *compute.GetInstancePoolPermissionLevelsResponse, _a1 error) *MockInstancePoolsInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, compute.GetInstancePoolPermissionLevelsRequest) (*compute.GetInstancePoolPermissionLevelsResponse, error)) *MockInstancePoolsInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByInstancePoolId provides a mock function with given fields: ctx, instancePoolId -func (_m *MockInstancePoolsInterface) GetPermissionLevelsByInstancePoolId(ctx context.Context, instancePoolId string) (*compute.GetInstancePoolPermissionLevelsResponse, error) { - ret := _m.Called(ctx, instancePoolId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByInstancePoolId") - } - - var r0 *compute.GetInstancePoolPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.GetInstancePoolPermissionLevelsResponse, error)); ok { - return rf(ctx, instancePoolId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.GetInstancePoolPermissionLevelsResponse); ok { - r0 = rf(ctx, instancePoolId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetInstancePoolPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, instancePoolId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByInstancePoolId' -type MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByInstancePoolId is a helper method to define mock.On call -// - ctx context.Context -// - instancePoolId string -func (_e *MockInstancePoolsInterface_Expecter) GetPermissionLevelsByInstancePoolId(ctx interface{}, instancePoolId interface{}) *MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call { - return &MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call{Call: _e.mock.On("GetPermissionLevelsByInstancePoolId", ctx, instancePoolId)} -} - -func (_c *MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call) Run(run func(ctx context.Context, instancePoolId string)) *MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call) Return(_a0 *compute.GetInstancePoolPermissionLevelsResponse, _a1 error) *MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call) RunAndReturn(run func(context.Context, string) (*compute.GetInstancePoolPermissionLevelsResponse, error)) *MockInstancePoolsInterface_GetPermissionLevelsByInstancePoolId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) GetPermissions(ctx context.Context, request compute.GetInstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *compute.InstancePoolPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetInstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetInstancePoolPermissionsRequest) *compute.InstancePoolPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.InstancePoolPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetInstancePoolPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockInstancePoolsInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetInstancePoolPermissionsRequest -func (_e *MockInstancePoolsInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockInstancePoolsInterface_GetPermissions_Call { - return &MockInstancePoolsInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_GetPermissions_Call) Run(run func(ctx context.Context, request compute.GetInstancePoolPermissionsRequest)) *MockInstancePoolsInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetInstancePoolPermissionsRequest)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissions_Call) Return(_a0 *compute.InstancePoolPermissions, _a1 error) *MockInstancePoolsInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, compute.GetInstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error)) *MockInstancePoolsInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByInstancePoolId provides a mock function with given fields: ctx, instancePoolId -func (_m *MockInstancePoolsInterface) GetPermissionsByInstancePoolId(ctx context.Context, instancePoolId string) (*compute.InstancePoolPermissions, error) { - ret := _m.Called(ctx, instancePoolId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByInstancePoolId") - } - - var r0 *compute.InstancePoolPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.InstancePoolPermissions, error)); ok { - return rf(ctx, instancePoolId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.InstancePoolPermissions); ok { - r0 = rf(ctx, instancePoolId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.InstancePoolPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, instancePoolId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByInstancePoolId' -type MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call struct { - *mock.Call -} - -// GetPermissionsByInstancePoolId is a helper method to define mock.On call -// - ctx context.Context -// - instancePoolId string -func (_e *MockInstancePoolsInterface_Expecter) GetPermissionsByInstancePoolId(ctx interface{}, instancePoolId interface{}) *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call { - return &MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call{Call: _e.mock.On("GetPermissionsByInstancePoolId", ctx, instancePoolId)} -} - -func (_c *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call) Run(run func(ctx context.Context, instancePoolId string)) *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call) Return(_a0 *compute.InstancePoolPermissions, _a1 error) *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call) RunAndReturn(run func(context.Context, string) (*compute.InstancePoolPermissions, error)) *MockInstancePoolsInterface_GetPermissionsByInstancePoolId_Call { - _c.Call.Return(run) - return _c -} - -// InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap provides a mock function with given fields: ctx -func (_m *MockInstancePoolsInterface) InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap' -type MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call struct { - *mock.Call -} - -// InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockInstancePoolsInterface_Expecter) InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap(ctx interface{}) *MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call { - return &MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call{Call: _e.mock.On("InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap", ctx)} -} - -func (_c *MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call) Run(run func(ctx context.Context)) *MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockInstancePoolsInterface_InstancePoolAndStatsInstancePoolNameToInstancePoolIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockInstancePoolsInterface) List(ctx context.Context) listing.Iterator[compute.InstancePoolAndStats] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[compute.InstancePoolAndStats] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[compute.InstancePoolAndStats]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.InstancePoolAndStats]) - } - } - - return r0 -} - -// MockInstancePoolsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockInstancePoolsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockInstancePoolsInterface_Expecter) List(ctx interface{}) *MockInstancePoolsInterface_List_Call { - return &MockInstancePoolsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockInstancePoolsInterface_List_Call) Run(run func(ctx context.Context)) *MockInstancePoolsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_List_Call) Return(_a0 listing.Iterator[compute.InstancePoolAndStats]) *MockInstancePoolsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstancePoolsInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[compute.InstancePoolAndStats]) *MockInstancePoolsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockInstancePoolsInterface) ListAll(ctx context.Context) ([]compute.InstancePoolAndStats, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []compute.InstancePoolAndStats - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]compute.InstancePoolAndStats, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []compute.InstancePoolAndStats); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.InstancePoolAndStats) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockInstancePoolsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockInstancePoolsInterface_Expecter) ListAll(ctx interface{}) *MockInstancePoolsInterface_ListAll_Call { - return &MockInstancePoolsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockInstancePoolsInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockInstancePoolsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_ListAll_Call) Return(_a0 []compute.InstancePoolAndStats, _a1 error) *MockInstancePoolsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]compute.InstancePoolAndStats, error)) *MockInstancePoolsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) SetPermissions(ctx context.Context, request compute.InstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *compute.InstancePoolPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.InstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.InstancePoolPermissionsRequest) *compute.InstancePoolPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.InstancePoolPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.InstancePoolPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockInstancePoolsInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.InstancePoolPermissionsRequest -func (_e *MockInstancePoolsInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockInstancePoolsInterface_SetPermissions_Call { - return &MockInstancePoolsInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_SetPermissions_Call) Run(run func(ctx context.Context, request compute.InstancePoolPermissionsRequest)) *MockInstancePoolsInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.InstancePoolPermissionsRequest)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_SetPermissions_Call) Return(_a0 *compute.InstancePoolPermissions, _a1 error) *MockInstancePoolsInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, compute.InstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error)) *MockInstancePoolsInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockInstancePoolsInterface) UpdatePermissions(ctx context.Context, request compute.InstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *compute.InstancePoolPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.InstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.InstancePoolPermissionsRequest) *compute.InstancePoolPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.InstancePoolPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.InstancePoolPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstancePoolsInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockInstancePoolsInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request compute.InstancePoolPermissionsRequest -func (_e *MockInstancePoolsInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockInstancePoolsInterface_UpdatePermissions_Call { - return &MockInstancePoolsInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockInstancePoolsInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request compute.InstancePoolPermissionsRequest)) *MockInstancePoolsInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.InstancePoolPermissionsRequest)) - }) - return _c -} - -func (_c *MockInstancePoolsInterface_UpdatePermissions_Call) Return(_a0 *compute.InstancePoolPermissions, _a1 error) *MockInstancePoolsInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstancePoolsInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, compute.InstancePoolPermissionsRequest) (*compute.InstancePoolPermissions, error)) *MockInstancePoolsInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// NewMockInstancePoolsInterface creates a new instance of MockInstancePoolsInterface. 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 NewMockInstancePoolsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockInstancePoolsInterface { - mock := &MockInstancePoolsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_instance_profiles_interface.go b/experimental/mocks/service/compute/mock_instance_profiles_interface.go deleted file mode 100644 index 4b99f32bf..000000000 --- a/experimental/mocks/service/compute/mock_instance_profiles_interface.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockInstanceProfilesInterface is an autogenerated mock type for the InstanceProfilesInterface type -type MockInstanceProfilesInterface struct { - mock.Mock -} - -type MockInstanceProfilesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockInstanceProfilesInterface) EXPECT() *MockInstanceProfilesInterface_Expecter { - return &MockInstanceProfilesInterface_Expecter{mock: &_m.Mock} -} - -// Add provides a mock function with given fields: ctx, request -func (_m *MockInstanceProfilesInterface) Add(ctx context.Context, request compute.AddInstanceProfile) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Add") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.AddInstanceProfile) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockInstanceProfilesInterface_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' -type MockInstanceProfilesInterface_Add_Call struct { - *mock.Call -} - -// Add is a helper method to define mock.On call -// - ctx context.Context -// - request compute.AddInstanceProfile -func (_e *MockInstanceProfilesInterface_Expecter) Add(ctx interface{}, request interface{}) *MockInstanceProfilesInterface_Add_Call { - return &MockInstanceProfilesInterface_Add_Call{Call: _e.mock.On("Add", ctx, request)} -} - -func (_c *MockInstanceProfilesInterface_Add_Call) Run(run func(ctx context.Context, request compute.AddInstanceProfile)) *MockInstanceProfilesInterface_Add_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.AddInstanceProfile)) - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_Add_Call) Return(_a0 error) *MockInstanceProfilesInterface_Add_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstanceProfilesInterface_Add_Call) RunAndReturn(run func(context.Context, compute.AddInstanceProfile) error) *MockInstanceProfilesInterface_Add_Call { - _c.Call.Return(run) - return _c -} - -// Edit provides a mock function with given fields: ctx, request -func (_m *MockInstanceProfilesInterface) Edit(ctx context.Context, request compute.InstanceProfile) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Edit") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.InstanceProfile) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockInstanceProfilesInterface_Edit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Edit' -type MockInstanceProfilesInterface_Edit_Call struct { - *mock.Call -} - -// Edit is a helper method to define mock.On call -// - ctx context.Context -// - request compute.InstanceProfile -func (_e *MockInstanceProfilesInterface_Expecter) Edit(ctx interface{}, request interface{}) *MockInstanceProfilesInterface_Edit_Call { - return &MockInstanceProfilesInterface_Edit_Call{Call: _e.mock.On("Edit", ctx, request)} -} - -func (_c *MockInstanceProfilesInterface_Edit_Call) Run(run func(ctx context.Context, request compute.InstanceProfile)) *MockInstanceProfilesInterface_Edit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.InstanceProfile)) - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_Edit_Call) Return(_a0 error) *MockInstanceProfilesInterface_Edit_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstanceProfilesInterface_Edit_Call) RunAndReturn(run func(context.Context, compute.InstanceProfile) error) *MockInstanceProfilesInterface_Edit_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockInstanceProfilesInterface) List(ctx context.Context) listing.Iterator[compute.InstanceProfile] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[compute.InstanceProfile] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[compute.InstanceProfile]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.InstanceProfile]) - } - } - - return r0 -} - -// MockInstanceProfilesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockInstanceProfilesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockInstanceProfilesInterface_Expecter) List(ctx interface{}) *MockInstanceProfilesInterface_List_Call { - return &MockInstanceProfilesInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockInstanceProfilesInterface_List_Call) Run(run func(ctx context.Context)) *MockInstanceProfilesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_List_Call) Return(_a0 listing.Iterator[compute.InstanceProfile]) *MockInstanceProfilesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstanceProfilesInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[compute.InstanceProfile]) *MockInstanceProfilesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockInstanceProfilesInterface) ListAll(ctx context.Context) ([]compute.InstanceProfile, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []compute.InstanceProfile - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]compute.InstanceProfile, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []compute.InstanceProfile); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.InstanceProfile) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockInstanceProfilesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockInstanceProfilesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockInstanceProfilesInterface_Expecter) ListAll(ctx interface{}) *MockInstanceProfilesInterface_ListAll_Call { - return &MockInstanceProfilesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockInstanceProfilesInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockInstanceProfilesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_ListAll_Call) Return(_a0 []compute.InstanceProfile, _a1 error) *MockInstanceProfilesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockInstanceProfilesInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]compute.InstanceProfile, error)) *MockInstanceProfilesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Remove provides a mock function with given fields: ctx, request -func (_m *MockInstanceProfilesInterface) Remove(ctx context.Context, request compute.RemoveInstanceProfile) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Remove") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.RemoveInstanceProfile) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockInstanceProfilesInterface_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' -type MockInstanceProfilesInterface_Remove_Call struct { - *mock.Call -} - -// Remove is a helper method to define mock.On call -// - ctx context.Context -// - request compute.RemoveInstanceProfile -func (_e *MockInstanceProfilesInterface_Expecter) Remove(ctx interface{}, request interface{}) *MockInstanceProfilesInterface_Remove_Call { - return &MockInstanceProfilesInterface_Remove_Call{Call: _e.mock.On("Remove", ctx, request)} -} - -func (_c *MockInstanceProfilesInterface_Remove_Call) Run(run func(ctx context.Context, request compute.RemoveInstanceProfile)) *MockInstanceProfilesInterface_Remove_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.RemoveInstanceProfile)) - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_Remove_Call) Return(_a0 error) *MockInstanceProfilesInterface_Remove_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstanceProfilesInterface_Remove_Call) RunAndReturn(run func(context.Context, compute.RemoveInstanceProfile) error) *MockInstanceProfilesInterface_Remove_Call { - _c.Call.Return(run) - return _c -} - -// RemoveByInstanceProfileArn provides a mock function with given fields: ctx, instanceProfileArn -func (_m *MockInstanceProfilesInterface) RemoveByInstanceProfileArn(ctx context.Context, instanceProfileArn string) error { - ret := _m.Called(ctx, instanceProfileArn) - - if len(ret) == 0 { - panic("no return value specified for RemoveByInstanceProfileArn") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, instanceProfileArn) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveByInstanceProfileArn' -type MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call struct { - *mock.Call -} - -// RemoveByInstanceProfileArn is a helper method to define mock.On call -// - ctx context.Context -// - instanceProfileArn string -func (_e *MockInstanceProfilesInterface_Expecter) RemoveByInstanceProfileArn(ctx interface{}, instanceProfileArn interface{}) *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call { - return &MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call{Call: _e.mock.On("RemoveByInstanceProfileArn", ctx, instanceProfileArn)} -} - -func (_c *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call) Run(run func(ctx context.Context, instanceProfileArn string)) *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call) Return(_a0 error) *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call) RunAndReturn(run func(context.Context, string) error) *MockInstanceProfilesInterface_RemoveByInstanceProfileArn_Call { - _c.Call.Return(run) - return _c -} - -// NewMockInstanceProfilesInterface creates a new instance of MockInstanceProfilesInterface. 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 NewMockInstanceProfilesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockInstanceProfilesInterface { - mock := &MockInstanceProfilesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_libraries_interface.go b/experimental/mocks/service/compute/mock_libraries_interface.go deleted file mode 100644 index 5f9a8696a..000000000 --- a/experimental/mocks/service/compute/mock_libraries_interface.go +++ /dev/null @@ -1,471 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" -) - -// MockLibrariesInterface is an autogenerated mock type for the LibrariesInterface type -type MockLibrariesInterface struct { - mock.Mock -} - -type MockLibrariesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockLibrariesInterface) EXPECT() *MockLibrariesInterface_Expecter { - return &MockLibrariesInterface_Expecter{mock: &_m.Mock} -} - -// AllClusterStatuses provides a mock function with given fields: ctx -func (_m *MockLibrariesInterface) AllClusterStatuses(ctx context.Context) listing.Iterator[compute.ClusterLibraryStatuses] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for AllClusterStatuses") - } - - var r0 listing.Iterator[compute.ClusterLibraryStatuses] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[compute.ClusterLibraryStatuses]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.ClusterLibraryStatuses]) - } - } - - return r0 -} - -// MockLibrariesInterface_AllClusterStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllClusterStatuses' -type MockLibrariesInterface_AllClusterStatuses_Call struct { - *mock.Call -} - -// AllClusterStatuses is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockLibrariesInterface_Expecter) AllClusterStatuses(ctx interface{}) *MockLibrariesInterface_AllClusterStatuses_Call { - return &MockLibrariesInterface_AllClusterStatuses_Call{Call: _e.mock.On("AllClusterStatuses", ctx)} -} - -func (_c *MockLibrariesInterface_AllClusterStatuses_Call) Run(run func(ctx context.Context)) *MockLibrariesInterface_AllClusterStatuses_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockLibrariesInterface_AllClusterStatuses_Call) Return(_a0 listing.Iterator[compute.ClusterLibraryStatuses]) *MockLibrariesInterface_AllClusterStatuses_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLibrariesInterface_AllClusterStatuses_Call) RunAndReturn(run func(context.Context) listing.Iterator[compute.ClusterLibraryStatuses]) *MockLibrariesInterface_AllClusterStatuses_Call { - _c.Call.Return(run) - return _c -} - -// AllClusterStatusesAll provides a mock function with given fields: ctx -func (_m *MockLibrariesInterface) AllClusterStatusesAll(ctx context.Context) ([]compute.ClusterLibraryStatuses, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for AllClusterStatusesAll") - } - - var r0 []compute.ClusterLibraryStatuses - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]compute.ClusterLibraryStatuses, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []compute.ClusterLibraryStatuses); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.ClusterLibraryStatuses) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLibrariesInterface_AllClusterStatusesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllClusterStatusesAll' -type MockLibrariesInterface_AllClusterStatusesAll_Call struct { - *mock.Call -} - -// AllClusterStatusesAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockLibrariesInterface_Expecter) AllClusterStatusesAll(ctx interface{}) *MockLibrariesInterface_AllClusterStatusesAll_Call { - return &MockLibrariesInterface_AllClusterStatusesAll_Call{Call: _e.mock.On("AllClusterStatusesAll", ctx)} -} - -func (_c *MockLibrariesInterface_AllClusterStatusesAll_Call) Run(run func(ctx context.Context)) *MockLibrariesInterface_AllClusterStatusesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockLibrariesInterface_AllClusterStatusesAll_Call) Return(_a0 []compute.ClusterLibraryStatuses, _a1 error) *MockLibrariesInterface_AllClusterStatusesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLibrariesInterface_AllClusterStatusesAll_Call) RunAndReturn(run func(context.Context) ([]compute.ClusterLibraryStatuses, error)) *MockLibrariesInterface_AllClusterStatusesAll_Call { - _c.Call.Return(run) - return _c -} - -// ClusterStatus provides a mock function with given fields: ctx, request -func (_m *MockLibrariesInterface) ClusterStatus(ctx context.Context, request compute.ClusterStatus) listing.Iterator[compute.LibraryFullStatus] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ClusterStatus") - } - - var r0 listing.Iterator[compute.LibraryFullStatus] - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterStatus) listing.Iterator[compute.LibraryFullStatus]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.LibraryFullStatus]) - } - } - - return r0 -} - -// MockLibrariesInterface_ClusterStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClusterStatus' -type MockLibrariesInterface_ClusterStatus_Call struct { - *mock.Call -} - -// ClusterStatus is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ClusterStatus -func (_e *MockLibrariesInterface_Expecter) ClusterStatus(ctx interface{}, request interface{}) *MockLibrariesInterface_ClusterStatus_Call { - return &MockLibrariesInterface_ClusterStatus_Call{Call: _e.mock.On("ClusterStatus", ctx, request)} -} - -func (_c *MockLibrariesInterface_ClusterStatus_Call) Run(run func(ctx context.Context, request compute.ClusterStatus)) *MockLibrariesInterface_ClusterStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ClusterStatus)) - }) - return _c -} - -func (_c *MockLibrariesInterface_ClusterStatus_Call) Return(_a0 listing.Iterator[compute.LibraryFullStatus]) *MockLibrariesInterface_ClusterStatus_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLibrariesInterface_ClusterStatus_Call) RunAndReturn(run func(context.Context, compute.ClusterStatus) listing.Iterator[compute.LibraryFullStatus]) *MockLibrariesInterface_ClusterStatus_Call { - _c.Call.Return(run) - return _c -} - -// ClusterStatusAll provides a mock function with given fields: ctx, request -func (_m *MockLibrariesInterface) ClusterStatusAll(ctx context.Context, request compute.ClusterStatus) ([]compute.LibraryFullStatus, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ClusterStatusAll") - } - - var r0 []compute.LibraryFullStatus - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterStatus) ([]compute.LibraryFullStatus, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ClusterStatus) []compute.LibraryFullStatus); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.LibraryFullStatus) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ClusterStatus) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLibrariesInterface_ClusterStatusAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClusterStatusAll' -type MockLibrariesInterface_ClusterStatusAll_Call struct { - *mock.Call -} - -// ClusterStatusAll is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ClusterStatus -func (_e *MockLibrariesInterface_Expecter) ClusterStatusAll(ctx interface{}, request interface{}) *MockLibrariesInterface_ClusterStatusAll_Call { - return &MockLibrariesInterface_ClusterStatusAll_Call{Call: _e.mock.On("ClusterStatusAll", ctx, request)} -} - -func (_c *MockLibrariesInterface_ClusterStatusAll_Call) Run(run func(ctx context.Context, request compute.ClusterStatus)) *MockLibrariesInterface_ClusterStatusAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ClusterStatus)) - }) - return _c -} - -func (_c *MockLibrariesInterface_ClusterStatusAll_Call) Return(_a0 []compute.LibraryFullStatus, _a1 error) *MockLibrariesInterface_ClusterStatusAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLibrariesInterface_ClusterStatusAll_Call) RunAndReturn(run func(context.Context, compute.ClusterStatus) ([]compute.LibraryFullStatus, error)) *MockLibrariesInterface_ClusterStatusAll_Call { - _c.Call.Return(run) - return _c -} - -// ClusterStatusByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockLibrariesInterface) ClusterStatusByClusterId(ctx context.Context, clusterId string) (*compute.ClusterLibraryStatuses, error) { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for ClusterStatusByClusterId") - } - - var r0 *compute.ClusterLibraryStatuses - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.ClusterLibraryStatuses, error)); ok { - return rf(ctx, clusterId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.ClusterLibraryStatuses); ok { - r0 = rf(ctx, clusterId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.ClusterLibraryStatuses) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, clusterId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLibrariesInterface_ClusterStatusByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClusterStatusByClusterId' -type MockLibrariesInterface_ClusterStatusByClusterId_Call struct { - *mock.Call -} - -// ClusterStatusByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockLibrariesInterface_Expecter) ClusterStatusByClusterId(ctx interface{}, clusterId interface{}) *MockLibrariesInterface_ClusterStatusByClusterId_Call { - return &MockLibrariesInterface_ClusterStatusByClusterId_Call{Call: _e.mock.On("ClusterStatusByClusterId", ctx, clusterId)} -} - -func (_c *MockLibrariesInterface_ClusterStatusByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockLibrariesInterface_ClusterStatusByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLibrariesInterface_ClusterStatusByClusterId_Call) Return(_a0 *compute.ClusterLibraryStatuses, _a1 error) *MockLibrariesInterface_ClusterStatusByClusterId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLibrariesInterface_ClusterStatusByClusterId_Call) RunAndReturn(run func(context.Context, string) (*compute.ClusterLibraryStatuses, error)) *MockLibrariesInterface_ClusterStatusByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// Install provides a mock function with given fields: ctx, request -func (_m *MockLibrariesInterface) Install(ctx context.Context, request compute.InstallLibraries) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Install") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.InstallLibraries) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLibrariesInterface_Install_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Install' -type MockLibrariesInterface_Install_Call struct { - *mock.Call -} - -// Install is a helper method to define mock.On call -// - ctx context.Context -// - request compute.InstallLibraries -func (_e *MockLibrariesInterface_Expecter) Install(ctx interface{}, request interface{}) *MockLibrariesInterface_Install_Call { - return &MockLibrariesInterface_Install_Call{Call: _e.mock.On("Install", ctx, request)} -} - -func (_c *MockLibrariesInterface_Install_Call) Run(run func(ctx context.Context, request compute.InstallLibraries)) *MockLibrariesInterface_Install_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.InstallLibraries)) - }) - return _c -} - -func (_c *MockLibrariesInterface_Install_Call) Return(_a0 error) *MockLibrariesInterface_Install_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLibrariesInterface_Install_Call) RunAndReturn(run func(context.Context, compute.InstallLibraries) error) *MockLibrariesInterface_Install_Call { - _c.Call.Return(run) - return _c -} - -// Uninstall provides a mock function with given fields: ctx, request -func (_m *MockLibrariesInterface) Uninstall(ctx context.Context, request compute.UninstallLibraries) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Uninstall") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.UninstallLibraries) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLibrariesInterface_Uninstall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninstall' -type MockLibrariesInterface_Uninstall_Call struct { - *mock.Call -} - -// Uninstall is a helper method to define mock.On call -// - ctx context.Context -// - request compute.UninstallLibraries -func (_e *MockLibrariesInterface_Expecter) Uninstall(ctx interface{}, request interface{}) *MockLibrariesInterface_Uninstall_Call { - return &MockLibrariesInterface_Uninstall_Call{Call: _e.mock.On("Uninstall", ctx, request)} -} - -func (_c *MockLibrariesInterface_Uninstall_Call) Run(run func(ctx context.Context, request compute.UninstallLibraries)) *MockLibrariesInterface_Uninstall_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.UninstallLibraries)) - }) - return _c -} - -func (_c *MockLibrariesInterface_Uninstall_Call) Return(_a0 error) *MockLibrariesInterface_Uninstall_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLibrariesInterface_Uninstall_Call) RunAndReturn(run func(context.Context, compute.UninstallLibraries) error) *MockLibrariesInterface_Uninstall_Call { - _c.Call.Return(run) - return _c -} - -// UpdateAndWait provides a mock function with given fields: ctx, update, options -func (_m *MockLibrariesInterface) UpdateAndWait(ctx context.Context, update compute.Update, options ...retries.Option[compute.ClusterLibraryStatuses]) error { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, update) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for UpdateAndWait") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, compute.Update, ...retries.Option[compute.ClusterLibraryStatuses]) error); ok { - r0 = rf(ctx, update, options...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLibrariesInterface_UpdateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAndWait' -type MockLibrariesInterface_UpdateAndWait_Call struct { - *mock.Call -} - -// UpdateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - update compute.Update -// - options ...retries.Option[compute.ClusterLibraryStatuses] -func (_e *MockLibrariesInterface_Expecter) UpdateAndWait(ctx interface{}, update interface{}, options ...interface{}) *MockLibrariesInterface_UpdateAndWait_Call { - return &MockLibrariesInterface_UpdateAndWait_Call{Call: _e.mock.On("UpdateAndWait", - append([]interface{}{ctx, update}, options...)...)} -} - -func (_c *MockLibrariesInterface_UpdateAndWait_Call) Run(run func(ctx context.Context, update compute.Update, options ...retries.Option[compute.ClusterLibraryStatuses])) *MockLibrariesInterface_UpdateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[compute.ClusterLibraryStatuses], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[compute.ClusterLibraryStatuses]) - } - } - run(args[0].(context.Context), args[1].(compute.Update), variadicArgs...) - }) - return _c -} - -func (_c *MockLibrariesInterface_UpdateAndWait_Call) Return(_a0 error) *MockLibrariesInterface_UpdateAndWait_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLibrariesInterface_UpdateAndWait_Call) RunAndReturn(run func(context.Context, compute.Update, ...retries.Option[compute.ClusterLibraryStatuses]) error) *MockLibrariesInterface_UpdateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// NewMockLibrariesInterface creates a new instance of MockLibrariesInterface. 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 NewMockLibrariesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockLibrariesInterface { - mock := &MockLibrariesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_policy_compliance_for_clusters_interface.go b/experimental/mocks/service/compute/mock_policy_compliance_for_clusters_interface.go deleted file mode 100644 index 60ebb07c6..000000000 --- a/experimental/mocks/service/compute/mock_policy_compliance_for_clusters_interface.go +++ /dev/null @@ -1,325 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockPolicyComplianceForClustersInterface is an autogenerated mock type for the PolicyComplianceForClustersInterface type -type MockPolicyComplianceForClustersInterface struct { - mock.Mock -} - -type MockPolicyComplianceForClustersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPolicyComplianceForClustersInterface) EXPECT() *MockPolicyComplianceForClustersInterface_Expecter { - return &MockPolicyComplianceForClustersInterface_Expecter{mock: &_m.Mock} -} - -// EnforceCompliance provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForClustersInterface) EnforceCompliance(ctx context.Context, request compute.EnforceClusterComplianceRequest) (*compute.EnforceClusterComplianceResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for EnforceCompliance") - } - - var r0 *compute.EnforceClusterComplianceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.EnforceClusterComplianceRequest) (*compute.EnforceClusterComplianceResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.EnforceClusterComplianceRequest) *compute.EnforceClusterComplianceResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.EnforceClusterComplianceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.EnforceClusterComplianceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForClustersInterface_EnforceCompliance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnforceCompliance' -type MockPolicyComplianceForClustersInterface_EnforceCompliance_Call struct { - *mock.Call -} - -// EnforceCompliance is a helper method to define mock.On call -// - ctx context.Context -// - request compute.EnforceClusterComplianceRequest -func (_e *MockPolicyComplianceForClustersInterface_Expecter) EnforceCompliance(ctx interface{}, request interface{}) *MockPolicyComplianceForClustersInterface_EnforceCompliance_Call { - return &MockPolicyComplianceForClustersInterface_EnforceCompliance_Call{Call: _e.mock.On("EnforceCompliance", ctx, request)} -} - -func (_c *MockPolicyComplianceForClustersInterface_EnforceCompliance_Call) Run(run func(ctx context.Context, request compute.EnforceClusterComplianceRequest)) *MockPolicyComplianceForClustersInterface_EnforceCompliance_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.EnforceClusterComplianceRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_EnforceCompliance_Call) Return(_a0 *compute.EnforceClusterComplianceResponse, _a1 error) *MockPolicyComplianceForClustersInterface_EnforceCompliance_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_EnforceCompliance_Call) RunAndReturn(run func(context.Context, compute.EnforceClusterComplianceRequest) (*compute.EnforceClusterComplianceResponse, error)) *MockPolicyComplianceForClustersInterface_EnforceCompliance_Call { - _c.Call.Return(run) - return _c -} - -// GetCompliance provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForClustersInterface) GetCompliance(ctx context.Context, request compute.GetClusterComplianceRequest) (*compute.GetClusterComplianceResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetCompliance") - } - - var r0 *compute.GetClusterComplianceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterComplianceRequest) (*compute.GetClusterComplianceResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetClusterComplianceRequest) *compute.GetClusterComplianceResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetClusterComplianceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetClusterComplianceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForClustersInterface_GetCompliance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCompliance' -type MockPolicyComplianceForClustersInterface_GetCompliance_Call struct { - *mock.Call -} - -// GetCompliance is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetClusterComplianceRequest -func (_e *MockPolicyComplianceForClustersInterface_Expecter) GetCompliance(ctx interface{}, request interface{}) *MockPolicyComplianceForClustersInterface_GetCompliance_Call { - return &MockPolicyComplianceForClustersInterface_GetCompliance_Call{Call: _e.mock.On("GetCompliance", ctx, request)} -} - -func (_c *MockPolicyComplianceForClustersInterface_GetCompliance_Call) Run(run func(ctx context.Context, request compute.GetClusterComplianceRequest)) *MockPolicyComplianceForClustersInterface_GetCompliance_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetClusterComplianceRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_GetCompliance_Call) Return(_a0 *compute.GetClusterComplianceResponse, _a1 error) *MockPolicyComplianceForClustersInterface_GetCompliance_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_GetCompliance_Call) RunAndReturn(run func(context.Context, compute.GetClusterComplianceRequest) (*compute.GetClusterComplianceResponse, error)) *MockPolicyComplianceForClustersInterface_GetCompliance_Call { - _c.Call.Return(run) - return _c -} - -// GetComplianceByClusterId provides a mock function with given fields: ctx, clusterId -func (_m *MockPolicyComplianceForClustersInterface) GetComplianceByClusterId(ctx context.Context, clusterId string) (*compute.GetClusterComplianceResponse, error) { - ret := _m.Called(ctx, clusterId) - - if len(ret) == 0 { - panic("no return value specified for GetComplianceByClusterId") - } - - var r0 *compute.GetClusterComplianceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.GetClusterComplianceResponse, error)); ok { - return rf(ctx, clusterId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.GetClusterComplianceResponse); ok { - r0 = rf(ctx, clusterId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.GetClusterComplianceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, clusterId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComplianceByClusterId' -type MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call struct { - *mock.Call -} - -// GetComplianceByClusterId is a helper method to define mock.On call -// - ctx context.Context -// - clusterId string -func (_e *MockPolicyComplianceForClustersInterface_Expecter) GetComplianceByClusterId(ctx interface{}, clusterId interface{}) *MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call { - return &MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call{Call: _e.mock.On("GetComplianceByClusterId", ctx, clusterId)} -} - -func (_c *MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call) Run(run func(ctx context.Context, clusterId string)) *MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call) Return(_a0 *compute.GetClusterComplianceResponse, _a1 error) *MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call) RunAndReturn(run func(context.Context, string) (*compute.GetClusterComplianceResponse, error)) *MockPolicyComplianceForClustersInterface_GetComplianceByClusterId_Call { - _c.Call.Return(run) - return _c -} - -// ListCompliance provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForClustersInterface) ListCompliance(ctx context.Context, request compute.ListClusterCompliancesRequest) listing.Iterator[compute.ClusterCompliance] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListCompliance") - } - - var r0 listing.Iterator[compute.ClusterCompliance] - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterCompliancesRequest) listing.Iterator[compute.ClusterCompliance]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.ClusterCompliance]) - } - } - - return r0 -} - -// MockPolicyComplianceForClustersInterface_ListCompliance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCompliance' -type MockPolicyComplianceForClustersInterface_ListCompliance_Call struct { - *mock.Call -} - -// ListCompliance is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClusterCompliancesRequest -func (_e *MockPolicyComplianceForClustersInterface_Expecter) ListCompliance(ctx interface{}, request interface{}) *MockPolicyComplianceForClustersInterface_ListCompliance_Call { - return &MockPolicyComplianceForClustersInterface_ListCompliance_Call{Call: _e.mock.On("ListCompliance", ctx, request)} -} - -func (_c *MockPolicyComplianceForClustersInterface_ListCompliance_Call) Run(run func(ctx context.Context, request compute.ListClusterCompliancesRequest)) *MockPolicyComplianceForClustersInterface_ListCompliance_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterCompliancesRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_ListCompliance_Call) Return(_a0 listing.Iterator[compute.ClusterCompliance]) *MockPolicyComplianceForClustersInterface_ListCompliance_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_ListCompliance_Call) RunAndReturn(run func(context.Context, compute.ListClusterCompliancesRequest) listing.Iterator[compute.ClusterCompliance]) *MockPolicyComplianceForClustersInterface_ListCompliance_Call { - _c.Call.Return(run) - return _c -} - -// ListComplianceAll provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForClustersInterface) ListComplianceAll(ctx context.Context, request compute.ListClusterCompliancesRequest) ([]compute.ClusterCompliance, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListComplianceAll") - } - - var r0 []compute.ClusterCompliance - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterCompliancesRequest) ([]compute.ClusterCompliance, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListClusterCompliancesRequest) []compute.ClusterCompliance); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.ClusterCompliance) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ListClusterCompliancesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForClustersInterface_ListComplianceAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListComplianceAll' -type MockPolicyComplianceForClustersInterface_ListComplianceAll_Call struct { - *mock.Call -} - -// ListComplianceAll is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListClusterCompliancesRequest -func (_e *MockPolicyComplianceForClustersInterface_Expecter) ListComplianceAll(ctx interface{}, request interface{}) *MockPolicyComplianceForClustersInterface_ListComplianceAll_Call { - return &MockPolicyComplianceForClustersInterface_ListComplianceAll_Call{Call: _e.mock.On("ListComplianceAll", ctx, request)} -} - -func (_c *MockPolicyComplianceForClustersInterface_ListComplianceAll_Call) Run(run func(ctx context.Context, request compute.ListClusterCompliancesRequest)) *MockPolicyComplianceForClustersInterface_ListComplianceAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListClusterCompliancesRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_ListComplianceAll_Call) Return(_a0 []compute.ClusterCompliance, _a1 error) *MockPolicyComplianceForClustersInterface_ListComplianceAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForClustersInterface_ListComplianceAll_Call) RunAndReturn(run func(context.Context, compute.ListClusterCompliancesRequest) ([]compute.ClusterCompliance, error)) *MockPolicyComplianceForClustersInterface_ListComplianceAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPolicyComplianceForClustersInterface creates a new instance of MockPolicyComplianceForClustersInterface. 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 NewMockPolicyComplianceForClustersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPolicyComplianceForClustersInterface { - mock := &MockPolicyComplianceForClustersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/compute/mock_policy_families_interface.go b/experimental/mocks/service/compute/mock_policy_families_interface.go deleted file mode 100644 index 8062c31d7..000000000 --- a/experimental/mocks/service/compute/mock_policy_families_interface.go +++ /dev/null @@ -1,266 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package compute - -import ( - context "context" - - compute "github.com/databricks/databricks-sdk-go/service/compute" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" -) - -// MockPolicyFamiliesInterface is an autogenerated mock type for the PolicyFamiliesInterface type -type MockPolicyFamiliesInterface struct { - mock.Mock -} - -type MockPolicyFamiliesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPolicyFamiliesInterface) EXPECT() *MockPolicyFamiliesInterface_Expecter { - return &MockPolicyFamiliesInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockPolicyFamiliesInterface) Get(ctx context.Context, request compute.GetPolicyFamilyRequest) (*compute.PolicyFamily, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *compute.PolicyFamily - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.GetPolicyFamilyRequest) (*compute.PolicyFamily, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.GetPolicyFamilyRequest) *compute.PolicyFamily); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.PolicyFamily) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.GetPolicyFamilyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyFamiliesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPolicyFamiliesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request compute.GetPolicyFamilyRequest -func (_e *MockPolicyFamiliesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockPolicyFamiliesInterface_Get_Call { - return &MockPolicyFamiliesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockPolicyFamiliesInterface_Get_Call) Run(run func(ctx context.Context, request compute.GetPolicyFamilyRequest)) *MockPolicyFamiliesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.GetPolicyFamilyRequest)) - }) - return _c -} - -func (_c *MockPolicyFamiliesInterface_Get_Call) Return(_a0 *compute.PolicyFamily, _a1 error) *MockPolicyFamiliesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyFamiliesInterface_Get_Call) RunAndReturn(run func(context.Context, compute.GetPolicyFamilyRequest) (*compute.PolicyFamily, error)) *MockPolicyFamiliesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByPolicyFamilyId provides a mock function with given fields: ctx, policyFamilyId -func (_m *MockPolicyFamiliesInterface) GetByPolicyFamilyId(ctx context.Context, policyFamilyId string) (*compute.PolicyFamily, error) { - ret := _m.Called(ctx, policyFamilyId) - - if len(ret) == 0 { - panic("no return value specified for GetByPolicyFamilyId") - } - - var r0 *compute.PolicyFamily - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*compute.PolicyFamily, error)); ok { - return rf(ctx, policyFamilyId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *compute.PolicyFamily); ok { - r0 = rf(ctx, policyFamilyId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*compute.PolicyFamily) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, policyFamilyId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPolicyFamilyId' -type MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call struct { - *mock.Call -} - -// GetByPolicyFamilyId is a helper method to define mock.On call -// - ctx context.Context -// - policyFamilyId string -func (_e *MockPolicyFamiliesInterface_Expecter) GetByPolicyFamilyId(ctx interface{}, policyFamilyId interface{}) *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call { - return &MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call{Call: _e.mock.On("GetByPolicyFamilyId", ctx, policyFamilyId)} -} - -func (_c *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call) Run(run func(ctx context.Context, policyFamilyId string)) *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call) Return(_a0 *compute.PolicyFamily, _a1 error) *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call) RunAndReturn(run func(context.Context, string) (*compute.PolicyFamily, error)) *MockPolicyFamiliesInterface_GetByPolicyFamilyId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockPolicyFamiliesInterface) List(ctx context.Context, request compute.ListPolicyFamiliesRequest) listing.Iterator[compute.PolicyFamily] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[compute.PolicyFamily] - if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamiliesRequest) listing.Iterator[compute.PolicyFamily]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[compute.PolicyFamily]) - } - } - - return r0 -} - -// MockPolicyFamiliesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockPolicyFamiliesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListPolicyFamiliesRequest -func (_e *MockPolicyFamiliesInterface_Expecter) List(ctx interface{}, request interface{}) *MockPolicyFamiliesInterface_List_Call { - return &MockPolicyFamiliesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockPolicyFamiliesInterface_List_Call) Run(run func(ctx context.Context, request compute.ListPolicyFamiliesRequest)) *MockPolicyFamiliesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListPolicyFamiliesRequest)) - }) - return _c -} - -func (_c *MockPolicyFamiliesInterface_List_Call) Return(_a0 listing.Iterator[compute.PolicyFamily]) *MockPolicyFamiliesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPolicyFamiliesInterface_List_Call) RunAndReturn(run func(context.Context, compute.ListPolicyFamiliesRequest) listing.Iterator[compute.PolicyFamily]) *MockPolicyFamiliesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockPolicyFamiliesInterface) ListAll(ctx context.Context, request compute.ListPolicyFamiliesRequest) ([]compute.PolicyFamily, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []compute.PolicyFamily - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamiliesRequest) ([]compute.PolicyFamily, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, compute.ListPolicyFamiliesRequest) []compute.PolicyFamily); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]compute.PolicyFamily) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, compute.ListPolicyFamiliesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyFamiliesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockPolicyFamiliesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request compute.ListPolicyFamiliesRequest -func (_e *MockPolicyFamiliesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockPolicyFamiliesInterface_ListAll_Call { - return &MockPolicyFamiliesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockPolicyFamiliesInterface_ListAll_Call) Run(run func(ctx context.Context, request compute.ListPolicyFamiliesRequest)) *MockPolicyFamiliesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(compute.ListPolicyFamiliesRequest)) - }) - return _c -} - -func (_c *MockPolicyFamiliesInterface_ListAll_Call) Return(_a0 []compute.PolicyFamily, _a1 error) *MockPolicyFamiliesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyFamiliesInterface_ListAll_Call) RunAndReturn(run func(context.Context, compute.ListPolicyFamiliesRequest) ([]compute.PolicyFamily, error)) *MockPolicyFamiliesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPolicyFamiliesInterface creates a new instance of MockPolicyFamiliesInterface. 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 NewMockPolicyFamiliesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPolicyFamiliesInterface { - mock := &MockPolicyFamiliesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/dashboards/mock_genie_interface.go b/experimental/mocks/service/dashboards/mock_genie_interface.go deleted file mode 100644 index e943c8b10..000000000 --- a/experimental/mocks/service/dashboards/mock_genie_interface.go +++ /dev/null @@ -1,669 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package dashboards - -import ( - context "context" - - dashboards "github.com/databricks/databricks-sdk-go/service/dashboards" - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockGenieInterface is an autogenerated mock type for the GenieInterface type -type MockGenieInterface struct { - mock.Mock -} - -type MockGenieInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockGenieInterface) EXPECT() *MockGenieInterface_Expecter { - return &MockGenieInterface_Expecter{mock: &_m.Mock} -} - -// CreateMessage provides a mock function with given fields: ctx, genieCreateConversationMessageRequest -func (_m *MockGenieInterface) CreateMessage(ctx context.Context, genieCreateConversationMessageRequest dashboards.GenieCreateConversationMessageRequest) (*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieMessage], error) { - ret := _m.Called(ctx, genieCreateConversationMessageRequest) - - if len(ret) == 0 { - panic("no return value specified for CreateMessage") - } - - var r0 *dashboards.WaitGetMessageGenieCompleted[dashboards.GenieMessage] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieCreateConversationMessageRequest) (*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieMessage], error)); ok { - return rf(ctx, genieCreateConversationMessageRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieCreateConversationMessageRequest) *dashboards.WaitGetMessageGenieCompleted[dashboards.GenieMessage]); ok { - r0 = rf(ctx, genieCreateConversationMessageRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieMessage]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GenieCreateConversationMessageRequest) error); ok { - r1 = rf(ctx, genieCreateConversationMessageRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_CreateMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMessage' -type MockGenieInterface_CreateMessage_Call struct { - *mock.Call -} - -// CreateMessage is a helper method to define mock.On call -// - ctx context.Context -// - genieCreateConversationMessageRequest dashboards.GenieCreateConversationMessageRequest -func (_e *MockGenieInterface_Expecter) CreateMessage(ctx interface{}, genieCreateConversationMessageRequest interface{}) *MockGenieInterface_CreateMessage_Call { - return &MockGenieInterface_CreateMessage_Call{Call: _e.mock.On("CreateMessage", ctx, genieCreateConversationMessageRequest)} -} - -func (_c *MockGenieInterface_CreateMessage_Call) Run(run func(ctx context.Context, genieCreateConversationMessageRequest dashboards.GenieCreateConversationMessageRequest)) *MockGenieInterface_CreateMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GenieCreateConversationMessageRequest)) - }) - return _c -} - -func (_c *MockGenieInterface_CreateMessage_Call) Return(_a0 *dashboards.WaitGetMessageGenieCompleted[dashboards.GenieMessage], _a1 error) *MockGenieInterface_CreateMessage_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_CreateMessage_Call) RunAndReturn(run func(context.Context, dashboards.GenieCreateConversationMessageRequest) (*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieMessage], error)) *MockGenieInterface_CreateMessage_Call { - _c.Call.Return(run) - return _c -} - -// CreateMessageAndWait provides a mock function with given fields: ctx, genieCreateConversationMessageRequest, options -func (_m *MockGenieInterface) CreateMessageAndWait(ctx context.Context, genieCreateConversationMessageRequest dashboards.GenieCreateConversationMessageRequest, options ...retries.Option[dashboards.GenieMessage]) (*dashboards.GenieMessage, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, genieCreateConversationMessageRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateMessageAndWait") - } - - var r0 *dashboards.GenieMessage - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieCreateConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) (*dashboards.GenieMessage, error)); ok { - return rf(ctx, genieCreateConversationMessageRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieCreateConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) *dashboards.GenieMessage); ok { - r0 = rf(ctx, genieCreateConversationMessageRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieMessage) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GenieCreateConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) error); ok { - r1 = rf(ctx, genieCreateConversationMessageRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_CreateMessageAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMessageAndWait' -type MockGenieInterface_CreateMessageAndWait_Call struct { - *mock.Call -} - -// CreateMessageAndWait is a helper method to define mock.On call -// - ctx context.Context -// - genieCreateConversationMessageRequest dashboards.GenieCreateConversationMessageRequest -// - options ...retries.Option[dashboards.GenieMessage] -func (_e *MockGenieInterface_Expecter) CreateMessageAndWait(ctx interface{}, genieCreateConversationMessageRequest interface{}, options ...interface{}) *MockGenieInterface_CreateMessageAndWait_Call { - return &MockGenieInterface_CreateMessageAndWait_Call{Call: _e.mock.On("CreateMessageAndWait", - append([]interface{}{ctx, genieCreateConversationMessageRequest}, options...)...)} -} - -func (_c *MockGenieInterface_CreateMessageAndWait_Call) Run(run func(ctx context.Context, genieCreateConversationMessageRequest dashboards.GenieCreateConversationMessageRequest, options ...retries.Option[dashboards.GenieMessage])) *MockGenieInterface_CreateMessageAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[dashboards.GenieMessage], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[dashboards.GenieMessage]) - } - } - run(args[0].(context.Context), args[1].(dashboards.GenieCreateConversationMessageRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockGenieInterface_CreateMessageAndWait_Call) Return(_a0 *dashboards.GenieMessage, _a1 error) *MockGenieInterface_CreateMessageAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_CreateMessageAndWait_Call) RunAndReturn(run func(context.Context, dashboards.GenieCreateConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) (*dashboards.GenieMessage, error)) *MockGenieInterface_CreateMessageAndWait_Call { - _c.Call.Return(run) - return _c -} - -// ExecuteMessageQuery provides a mock function with given fields: ctx, request -func (_m *MockGenieInterface) ExecuteMessageQuery(ctx context.Context, request dashboards.GenieExecuteMessageQueryRequest) (*dashboards.GenieGetMessageQueryResultResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExecuteMessageQuery") - } - - var r0 *dashboards.GenieGetMessageQueryResultResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieExecuteMessageQueryRequest) (*dashboards.GenieGetMessageQueryResultResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieExecuteMessageQueryRequest) *dashboards.GenieGetMessageQueryResultResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieGetMessageQueryResultResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GenieExecuteMessageQueryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_ExecuteMessageQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteMessageQuery' -type MockGenieInterface_ExecuteMessageQuery_Call struct { - *mock.Call -} - -// ExecuteMessageQuery is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.GenieExecuteMessageQueryRequest -func (_e *MockGenieInterface_Expecter) ExecuteMessageQuery(ctx interface{}, request interface{}) *MockGenieInterface_ExecuteMessageQuery_Call { - return &MockGenieInterface_ExecuteMessageQuery_Call{Call: _e.mock.On("ExecuteMessageQuery", ctx, request)} -} - -func (_c *MockGenieInterface_ExecuteMessageQuery_Call) Run(run func(ctx context.Context, request dashboards.GenieExecuteMessageQueryRequest)) *MockGenieInterface_ExecuteMessageQuery_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GenieExecuteMessageQueryRequest)) - }) - return _c -} - -func (_c *MockGenieInterface_ExecuteMessageQuery_Call) Return(_a0 *dashboards.GenieGetMessageQueryResultResponse, _a1 error) *MockGenieInterface_ExecuteMessageQuery_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_ExecuteMessageQuery_Call) RunAndReturn(run func(context.Context, dashboards.GenieExecuteMessageQueryRequest) (*dashboards.GenieGetMessageQueryResultResponse, error)) *MockGenieInterface_ExecuteMessageQuery_Call { - _c.Call.Return(run) - return _c -} - -// GetMessage provides a mock function with given fields: ctx, request -func (_m *MockGenieInterface) GetMessage(ctx context.Context, request dashboards.GenieGetConversationMessageRequest) (*dashboards.GenieMessage, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetMessage") - } - - var r0 *dashboards.GenieMessage - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieGetConversationMessageRequest) (*dashboards.GenieMessage, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieGetConversationMessageRequest) *dashboards.GenieMessage); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieMessage) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GenieGetConversationMessageRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_GetMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMessage' -type MockGenieInterface_GetMessage_Call struct { - *mock.Call -} - -// GetMessage is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.GenieGetConversationMessageRequest -func (_e *MockGenieInterface_Expecter) GetMessage(ctx interface{}, request interface{}) *MockGenieInterface_GetMessage_Call { - return &MockGenieInterface_GetMessage_Call{Call: _e.mock.On("GetMessage", ctx, request)} -} - -func (_c *MockGenieInterface_GetMessage_Call) Run(run func(ctx context.Context, request dashboards.GenieGetConversationMessageRequest)) *MockGenieInterface_GetMessage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GenieGetConversationMessageRequest)) - }) - return _c -} - -func (_c *MockGenieInterface_GetMessage_Call) Return(_a0 *dashboards.GenieMessage, _a1 error) *MockGenieInterface_GetMessage_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_GetMessage_Call) RunAndReturn(run func(context.Context, dashboards.GenieGetConversationMessageRequest) (*dashboards.GenieMessage, error)) *MockGenieInterface_GetMessage_Call { - _c.Call.Return(run) - return _c -} - -// GetMessageBySpaceIdAndConversationIdAndMessageId provides a mock function with given fields: ctx, spaceId, conversationId, messageId -func (_m *MockGenieInterface) GetMessageBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*dashboards.GenieMessage, error) { - ret := _m.Called(ctx, spaceId, conversationId, messageId) - - if len(ret) == 0 { - panic("no return value specified for GetMessageBySpaceIdAndConversationIdAndMessageId") - } - - var r0 *dashboards.GenieMessage - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dashboards.GenieMessage, error)); ok { - return rf(ctx, spaceId, conversationId, messageId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dashboards.GenieMessage); ok { - r0 = rf(ctx, spaceId, conversationId, messageId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieMessage) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, spaceId, conversationId, messageId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMessageBySpaceIdAndConversationIdAndMessageId' -type MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call struct { - *mock.Call -} - -// GetMessageBySpaceIdAndConversationIdAndMessageId is a helper method to define mock.On call -// - ctx context.Context -// - spaceId string -// - conversationId string -// - messageId string -func (_e *MockGenieInterface_Expecter) GetMessageBySpaceIdAndConversationIdAndMessageId(ctx interface{}, spaceId interface{}, conversationId interface{}, messageId interface{}) *MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call { - return &MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call{Call: _e.mock.On("GetMessageBySpaceIdAndConversationIdAndMessageId", ctx, spaceId, conversationId, messageId)} -} - -func (_c *MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call) Run(run func(ctx context.Context, spaceId string, conversationId string, messageId string)) *MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) - }) - return _c -} - -func (_c *MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call) Return(_a0 *dashboards.GenieMessage, _a1 error) *MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call) RunAndReturn(run func(context.Context, string, string, string) (*dashboards.GenieMessage, error)) *MockGenieInterface_GetMessageBySpaceIdAndConversationIdAndMessageId_Call { - _c.Call.Return(run) - return _c -} - -// GetMessageQueryResult provides a mock function with given fields: ctx, request -func (_m *MockGenieInterface) GetMessageQueryResult(ctx context.Context, request dashboards.GenieGetMessageQueryResultRequest) (*dashboards.GenieGetMessageQueryResultResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetMessageQueryResult") - } - - var r0 *dashboards.GenieGetMessageQueryResultResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieGetMessageQueryResultRequest) (*dashboards.GenieGetMessageQueryResultResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieGetMessageQueryResultRequest) *dashboards.GenieGetMessageQueryResultResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieGetMessageQueryResultResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GenieGetMessageQueryResultRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_GetMessageQueryResult_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMessageQueryResult' -type MockGenieInterface_GetMessageQueryResult_Call struct { - *mock.Call -} - -// GetMessageQueryResult is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.GenieGetMessageQueryResultRequest -func (_e *MockGenieInterface_Expecter) GetMessageQueryResult(ctx interface{}, request interface{}) *MockGenieInterface_GetMessageQueryResult_Call { - return &MockGenieInterface_GetMessageQueryResult_Call{Call: _e.mock.On("GetMessageQueryResult", ctx, request)} -} - -func (_c *MockGenieInterface_GetMessageQueryResult_Call) Run(run func(ctx context.Context, request dashboards.GenieGetMessageQueryResultRequest)) *MockGenieInterface_GetMessageQueryResult_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GenieGetMessageQueryResultRequest)) - }) - return _c -} - -func (_c *MockGenieInterface_GetMessageQueryResult_Call) Return(_a0 *dashboards.GenieGetMessageQueryResultResponse, _a1 error) *MockGenieInterface_GetMessageQueryResult_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_GetMessageQueryResult_Call) RunAndReturn(run func(context.Context, dashboards.GenieGetMessageQueryResultRequest) (*dashboards.GenieGetMessageQueryResultResponse, error)) *MockGenieInterface_GetMessageQueryResult_Call { - _c.Call.Return(run) - return _c -} - -// GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId provides a mock function with given fields: ctx, spaceId, conversationId, messageId -func (_m *MockGenieInterface) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx context.Context, spaceId string, conversationId string, messageId string) (*dashboards.GenieGetMessageQueryResultResponse, error) { - ret := _m.Called(ctx, spaceId, conversationId, messageId) - - if len(ret) == 0 { - panic("no return value specified for GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId") - } - - var r0 *dashboards.GenieGetMessageQueryResultResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dashboards.GenieGetMessageQueryResultResponse, error)); ok { - return rf(ctx, spaceId, conversationId, messageId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dashboards.GenieGetMessageQueryResultResponse); ok { - r0 = rf(ctx, spaceId, conversationId, messageId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieGetMessageQueryResultResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, spaceId, conversationId, messageId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId' -type MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call struct { - *mock.Call -} - -// GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId is a helper method to define mock.On call -// - ctx context.Context -// - spaceId string -// - conversationId string -// - messageId string -func (_e *MockGenieInterface_Expecter) GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId(ctx interface{}, spaceId interface{}, conversationId interface{}, messageId interface{}) *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call { - return &MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call{Call: _e.mock.On("GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId", ctx, spaceId, conversationId, messageId)} -} - -func (_c *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call) Run(run func(ctx context.Context, spaceId string, conversationId string, messageId string)) *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) - }) - return _c -} - -func (_c *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call) Return(_a0 *dashboards.GenieGetMessageQueryResultResponse, _a1 error) *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call) RunAndReturn(run func(context.Context, string, string, string) (*dashboards.GenieGetMessageQueryResultResponse, error)) *MockGenieInterface_GetMessageQueryResultBySpaceIdAndConversationIdAndMessageId_Call { - _c.Call.Return(run) - return _c -} - -// StartConversation provides a mock function with given fields: ctx, genieStartConversationMessageRequest -func (_m *MockGenieInterface) StartConversation(ctx context.Context, genieStartConversationMessageRequest dashboards.GenieStartConversationMessageRequest) (*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieStartConversationResponse], error) { - ret := _m.Called(ctx, genieStartConversationMessageRequest) - - if len(ret) == 0 { - panic("no return value specified for StartConversation") - } - - var r0 *dashboards.WaitGetMessageGenieCompleted[dashboards.GenieStartConversationResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieStartConversationMessageRequest) (*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieStartConversationResponse], error)); ok { - return rf(ctx, genieStartConversationMessageRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieStartConversationMessageRequest) *dashboards.WaitGetMessageGenieCompleted[dashboards.GenieStartConversationResponse]); ok { - r0 = rf(ctx, genieStartConversationMessageRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieStartConversationResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GenieStartConversationMessageRequest) error); ok { - r1 = rf(ctx, genieStartConversationMessageRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_StartConversation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartConversation' -type MockGenieInterface_StartConversation_Call struct { - *mock.Call -} - -// StartConversation is a helper method to define mock.On call -// - ctx context.Context -// - genieStartConversationMessageRequest dashboards.GenieStartConversationMessageRequest -func (_e *MockGenieInterface_Expecter) StartConversation(ctx interface{}, genieStartConversationMessageRequest interface{}) *MockGenieInterface_StartConversation_Call { - return &MockGenieInterface_StartConversation_Call{Call: _e.mock.On("StartConversation", ctx, genieStartConversationMessageRequest)} -} - -func (_c *MockGenieInterface_StartConversation_Call) Run(run func(ctx context.Context, genieStartConversationMessageRequest dashboards.GenieStartConversationMessageRequest)) *MockGenieInterface_StartConversation_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GenieStartConversationMessageRequest)) - }) - return _c -} - -func (_c *MockGenieInterface_StartConversation_Call) Return(_a0 *dashboards.WaitGetMessageGenieCompleted[dashboards.GenieStartConversationResponse], _a1 error) *MockGenieInterface_StartConversation_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_StartConversation_Call) RunAndReturn(run func(context.Context, dashboards.GenieStartConversationMessageRequest) (*dashboards.WaitGetMessageGenieCompleted[dashboards.GenieStartConversationResponse], error)) *MockGenieInterface_StartConversation_Call { - _c.Call.Return(run) - return _c -} - -// StartConversationAndWait provides a mock function with given fields: ctx, genieStartConversationMessageRequest, options -func (_m *MockGenieInterface) StartConversationAndWait(ctx context.Context, genieStartConversationMessageRequest dashboards.GenieStartConversationMessageRequest, options ...retries.Option[dashboards.GenieMessage]) (*dashboards.GenieMessage, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, genieStartConversationMessageRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StartConversationAndWait") - } - - var r0 *dashboards.GenieMessage - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieStartConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) (*dashboards.GenieMessage, error)); ok { - return rf(ctx, genieStartConversationMessageRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GenieStartConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) *dashboards.GenieMessage); ok { - r0 = rf(ctx, genieStartConversationMessageRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieMessage) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GenieStartConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) error); ok { - r1 = rf(ctx, genieStartConversationMessageRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_StartConversationAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartConversationAndWait' -type MockGenieInterface_StartConversationAndWait_Call struct { - *mock.Call -} - -// StartConversationAndWait is a helper method to define mock.On call -// - ctx context.Context -// - genieStartConversationMessageRequest dashboards.GenieStartConversationMessageRequest -// - options ...retries.Option[dashboards.GenieMessage] -func (_e *MockGenieInterface_Expecter) StartConversationAndWait(ctx interface{}, genieStartConversationMessageRequest interface{}, options ...interface{}) *MockGenieInterface_StartConversationAndWait_Call { - return &MockGenieInterface_StartConversationAndWait_Call{Call: _e.mock.On("StartConversationAndWait", - append([]interface{}{ctx, genieStartConversationMessageRequest}, options...)...)} -} - -func (_c *MockGenieInterface_StartConversationAndWait_Call) Run(run func(ctx context.Context, genieStartConversationMessageRequest dashboards.GenieStartConversationMessageRequest, options ...retries.Option[dashboards.GenieMessage])) *MockGenieInterface_StartConversationAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[dashboards.GenieMessage], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[dashboards.GenieMessage]) - } - } - run(args[0].(context.Context), args[1].(dashboards.GenieStartConversationMessageRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockGenieInterface_StartConversationAndWait_Call) Return(_a0 *dashboards.GenieMessage, _a1 error) *MockGenieInterface_StartConversationAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_StartConversationAndWait_Call) RunAndReturn(run func(context.Context, dashboards.GenieStartConversationMessageRequest, ...retries.Option[dashboards.GenieMessage]) (*dashboards.GenieMessage, error)) *MockGenieInterface_StartConversationAndWait_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetMessageGenieCompleted provides a mock function with given fields: ctx, conversationId, messageId, spaceId, timeout, callback -func (_m *MockGenieInterface) WaitGetMessageGenieCompleted(ctx context.Context, conversationId string, messageId string, spaceId string, timeout time.Duration, callback func(*dashboards.GenieMessage)) (*dashboards.GenieMessage, error) { - ret := _m.Called(ctx, conversationId, messageId, spaceId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetMessageGenieCompleted") - } - - var r0 *dashboards.GenieMessage - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration, func(*dashboards.GenieMessage)) (*dashboards.GenieMessage, error)); ok { - return rf(ctx, conversationId, messageId, spaceId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, time.Duration, func(*dashboards.GenieMessage)) *dashboards.GenieMessage); ok { - r0 = rf(ctx, conversationId, messageId, spaceId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.GenieMessage) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, time.Duration, func(*dashboards.GenieMessage)) error); ok { - r1 = rf(ctx, conversationId, messageId, spaceId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGenieInterface_WaitGetMessageGenieCompleted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetMessageGenieCompleted' -type MockGenieInterface_WaitGetMessageGenieCompleted_Call struct { - *mock.Call -} - -// WaitGetMessageGenieCompleted is a helper method to define mock.On call -// - ctx context.Context -// - conversationId string -// - messageId string -// - spaceId string -// - timeout time.Duration -// - callback func(*dashboards.GenieMessage) -func (_e *MockGenieInterface_Expecter) WaitGetMessageGenieCompleted(ctx interface{}, conversationId interface{}, messageId interface{}, spaceId interface{}, timeout interface{}, callback interface{}) *MockGenieInterface_WaitGetMessageGenieCompleted_Call { - return &MockGenieInterface_WaitGetMessageGenieCompleted_Call{Call: _e.mock.On("WaitGetMessageGenieCompleted", ctx, conversationId, messageId, spaceId, timeout, callback)} -} - -func (_c *MockGenieInterface_WaitGetMessageGenieCompleted_Call) Run(run func(ctx context.Context, conversationId string, messageId string, spaceId string, timeout time.Duration, callback func(*dashboards.GenieMessage))) *MockGenieInterface_WaitGetMessageGenieCompleted_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(time.Duration), args[5].(func(*dashboards.GenieMessage))) - }) - return _c -} - -func (_c *MockGenieInterface_WaitGetMessageGenieCompleted_Call) Return(_a0 *dashboards.GenieMessage, _a1 error) *MockGenieInterface_WaitGetMessageGenieCompleted_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGenieInterface_WaitGetMessageGenieCompleted_Call) RunAndReturn(run func(context.Context, string, string, string, time.Duration, func(*dashboards.GenieMessage)) (*dashboards.GenieMessage, error)) *MockGenieInterface_WaitGetMessageGenieCompleted_Call { - _c.Call.Return(run) - return _c -} - -// NewMockGenieInterface creates a new instance of MockGenieInterface. 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 NewMockGenieInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockGenieInterface { - mock := &MockGenieInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/dashboards/mock_lakeview_interface.go b/experimental/mocks/service/dashboards/mock_lakeview_interface.go deleted file mode 100644 index 0e18d5903..000000000 --- a/experimental/mocks/service/dashboards/mock_lakeview_interface.go +++ /dev/null @@ -1,1749 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package dashboards - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - dashboards "github.com/databricks/databricks-sdk-go/service/dashboards" - - mock "github.com/stretchr/testify/mock" -) - -// MockLakeviewInterface is an autogenerated mock type for the LakeviewInterface type -type MockLakeviewInterface struct { - mock.Mock -} - -type MockLakeviewInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockLakeviewInterface) EXPECT() *MockLakeviewInterface_Expecter { - return &MockLakeviewInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) Create(ctx context.Context, request dashboards.CreateDashboardRequest) (*dashboards.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *dashboards.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.CreateDashboardRequest) (*dashboards.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.CreateDashboardRequest) *dashboards.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.CreateDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockLakeviewInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.CreateDashboardRequest -func (_e *MockLakeviewInterface_Expecter) Create(ctx interface{}, request interface{}) *MockLakeviewInterface_Create_Call { - return &MockLakeviewInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockLakeviewInterface_Create_Call) Run(run func(ctx context.Context, request dashboards.CreateDashboardRequest)) *MockLakeviewInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.CreateDashboardRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_Create_Call) Return(_a0 *dashboards.Dashboard, _a1 error) *MockLakeviewInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_Create_Call) RunAndReturn(run func(context.Context, dashboards.CreateDashboardRequest) (*dashboards.Dashboard, error)) *MockLakeviewInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateSchedule provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) CreateSchedule(ctx context.Context, request dashboards.CreateScheduleRequest) (*dashboards.Schedule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateSchedule") - } - - var r0 *dashboards.Schedule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.CreateScheduleRequest) (*dashboards.Schedule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.CreateScheduleRequest) *dashboards.Schedule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Schedule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.CreateScheduleRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_CreateSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSchedule' -type MockLakeviewInterface_CreateSchedule_Call struct { - *mock.Call -} - -// CreateSchedule is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.CreateScheduleRequest -func (_e *MockLakeviewInterface_Expecter) CreateSchedule(ctx interface{}, request interface{}) *MockLakeviewInterface_CreateSchedule_Call { - return &MockLakeviewInterface_CreateSchedule_Call{Call: _e.mock.On("CreateSchedule", ctx, request)} -} - -func (_c *MockLakeviewInterface_CreateSchedule_Call) Run(run func(ctx context.Context, request dashboards.CreateScheduleRequest)) *MockLakeviewInterface_CreateSchedule_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.CreateScheduleRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_CreateSchedule_Call) Return(_a0 *dashboards.Schedule, _a1 error) *MockLakeviewInterface_CreateSchedule_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_CreateSchedule_Call) RunAndReturn(run func(context.Context, dashboards.CreateScheduleRequest) (*dashboards.Schedule, error)) *MockLakeviewInterface_CreateSchedule_Call { - _c.Call.Return(run) - return _c -} - -// CreateSubscription provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) CreateSubscription(ctx context.Context, request dashboards.CreateSubscriptionRequest) (*dashboards.Subscription, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateSubscription") - } - - var r0 *dashboards.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.CreateSubscriptionRequest) (*dashboards.Subscription, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.CreateSubscriptionRequest) *dashboards.Subscription); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.CreateSubscriptionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_CreateSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSubscription' -type MockLakeviewInterface_CreateSubscription_Call struct { - *mock.Call -} - -// CreateSubscription is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.CreateSubscriptionRequest -func (_e *MockLakeviewInterface_Expecter) CreateSubscription(ctx interface{}, request interface{}) *MockLakeviewInterface_CreateSubscription_Call { - return &MockLakeviewInterface_CreateSubscription_Call{Call: _e.mock.On("CreateSubscription", ctx, request)} -} - -func (_c *MockLakeviewInterface_CreateSubscription_Call) Run(run func(ctx context.Context, request dashboards.CreateSubscriptionRequest)) *MockLakeviewInterface_CreateSubscription_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.CreateSubscriptionRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_CreateSubscription_Call) Return(_a0 *dashboards.Subscription, _a1 error) *MockLakeviewInterface_CreateSubscription_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_CreateSubscription_Call) RunAndReturn(run func(context.Context, dashboards.CreateSubscriptionRequest) (*dashboards.Subscription, error)) *MockLakeviewInterface_CreateSubscription_Call { - _c.Call.Return(run) - return _c -} - -// DeleteSchedule provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) DeleteSchedule(ctx context.Context, request dashboards.DeleteScheduleRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteSchedule") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.DeleteScheduleRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_DeleteSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSchedule' -type MockLakeviewInterface_DeleteSchedule_Call struct { - *mock.Call -} - -// DeleteSchedule is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.DeleteScheduleRequest -func (_e *MockLakeviewInterface_Expecter) DeleteSchedule(ctx interface{}, request interface{}) *MockLakeviewInterface_DeleteSchedule_Call { - return &MockLakeviewInterface_DeleteSchedule_Call{Call: _e.mock.On("DeleteSchedule", ctx, request)} -} - -func (_c *MockLakeviewInterface_DeleteSchedule_Call) Run(run func(ctx context.Context, request dashboards.DeleteScheduleRequest)) *MockLakeviewInterface_DeleteSchedule_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.DeleteScheduleRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_DeleteSchedule_Call) Return(_a0 error) *MockLakeviewInterface_DeleteSchedule_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_DeleteSchedule_Call) RunAndReturn(run func(context.Context, dashboards.DeleteScheduleRequest) error) *MockLakeviewInterface_DeleteSchedule_Call { - _c.Call.Return(run) - return _c -} - -// DeleteScheduleByDashboardIdAndScheduleId provides a mock function with given fields: ctx, dashboardId, scheduleId -func (_m *MockLakeviewInterface) DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error { - ret := _m.Called(ctx, dashboardId, scheduleId) - - if len(ret) == 0 { - panic("no return value specified for DeleteScheduleByDashboardIdAndScheduleId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, dashboardId, scheduleId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteScheduleByDashboardIdAndScheduleId' -type MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call struct { - *mock.Call -} - -// DeleteScheduleByDashboardIdAndScheduleId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -// - scheduleId string -func (_e *MockLakeviewInterface_Expecter) DeleteScheduleByDashboardIdAndScheduleId(ctx interface{}, dashboardId interface{}, scheduleId interface{}) *MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call { - return &MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call{Call: _e.mock.On("DeleteScheduleByDashboardIdAndScheduleId", ctx, dashboardId, scheduleId)} -} - -func (_c *MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call) Run(run func(ctx context.Context, dashboardId string, scheduleId string)) *MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call) Return(_a0 error) *MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call) RunAndReturn(run func(context.Context, string, string) error) *MockLakeviewInterface_DeleteScheduleByDashboardIdAndScheduleId_Call { - _c.Call.Return(run) - return _c -} - -// DeleteSubscription provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) DeleteSubscription(ctx context.Context, request dashboards.DeleteSubscriptionRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteSubscription") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.DeleteSubscriptionRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_DeleteSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSubscription' -type MockLakeviewInterface_DeleteSubscription_Call struct { - *mock.Call -} - -// DeleteSubscription is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.DeleteSubscriptionRequest -func (_e *MockLakeviewInterface_Expecter) DeleteSubscription(ctx interface{}, request interface{}) *MockLakeviewInterface_DeleteSubscription_Call { - return &MockLakeviewInterface_DeleteSubscription_Call{Call: _e.mock.On("DeleteSubscription", ctx, request)} -} - -func (_c *MockLakeviewInterface_DeleteSubscription_Call) Run(run func(ctx context.Context, request dashboards.DeleteSubscriptionRequest)) *MockLakeviewInterface_DeleteSubscription_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.DeleteSubscriptionRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_DeleteSubscription_Call) Return(_a0 error) *MockLakeviewInterface_DeleteSubscription_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_DeleteSubscription_Call) RunAndReturn(run func(context.Context, dashboards.DeleteSubscriptionRequest) error) *MockLakeviewInterface_DeleteSubscription_Call { - _c.Call.Return(run) - return _c -} - -// DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId provides a mock function with given fields: ctx, dashboardId, scheduleId, subscriptionId -func (_m *MockLakeviewInterface) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error { - ret := _m.Called(ctx, dashboardId, scheduleId, subscriptionId) - - if len(ret) == 0 { - panic("no return value specified for DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { - r0 = rf(ctx, dashboardId, scheduleId, subscriptionId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId' -type MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call struct { - *mock.Call -} - -// DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -// - scheduleId string -// - subscriptionId string -func (_e *MockLakeviewInterface_Expecter) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx interface{}, dashboardId interface{}, scheduleId interface{}, subscriptionId interface{}) *MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - return &MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call{Call: _e.mock.On("DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId", ctx, dashboardId, scheduleId, subscriptionId)} -} - -func (_c *MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call) Run(run func(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string)) *MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call) Return(_a0 error) *MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call) RunAndReturn(run func(context.Context, string, string, string) error) *MockLakeviewInterface_DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) Get(ctx context.Context, request dashboards.GetDashboardRequest) (*dashboards.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *dashboards.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetDashboardRequest) (*dashboards.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetDashboardRequest) *dashboards.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GetDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockLakeviewInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.GetDashboardRequest -func (_e *MockLakeviewInterface_Expecter) Get(ctx interface{}, request interface{}) *MockLakeviewInterface_Get_Call { - return &MockLakeviewInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockLakeviewInterface_Get_Call) Run(run func(ctx context.Context, request dashboards.GetDashboardRequest)) *MockLakeviewInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GetDashboardRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_Get_Call) Return(_a0 *dashboards.Dashboard, _a1 error) *MockLakeviewInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_Get_Call) RunAndReturn(run func(context.Context, dashboards.GetDashboardRequest) (*dashboards.Dashboard, error)) *MockLakeviewInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDashboardId provides a mock function with given fields: ctx, dashboardId -func (_m *MockLakeviewInterface) GetByDashboardId(ctx context.Context, dashboardId string) (*dashboards.Dashboard, error) { - ret := _m.Called(ctx, dashboardId) - - if len(ret) == 0 { - panic("no return value specified for GetByDashboardId") - } - - var r0 *dashboards.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*dashboards.Dashboard, error)); ok { - return rf(ctx, dashboardId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *dashboards.Dashboard); ok { - r0 = rf(ctx, dashboardId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, dashboardId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_GetByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDashboardId' -type MockLakeviewInterface_GetByDashboardId_Call struct { - *mock.Call -} - -// GetByDashboardId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -func (_e *MockLakeviewInterface_Expecter) GetByDashboardId(ctx interface{}, dashboardId interface{}) *MockLakeviewInterface_GetByDashboardId_Call { - return &MockLakeviewInterface_GetByDashboardId_Call{Call: _e.mock.On("GetByDashboardId", ctx, dashboardId)} -} - -func (_c *MockLakeviewInterface_GetByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockLakeviewInterface_GetByDashboardId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_GetByDashboardId_Call) Return(_a0 *dashboards.Dashboard, _a1 error) *MockLakeviewInterface_GetByDashboardId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_GetByDashboardId_Call) RunAndReturn(run func(context.Context, string) (*dashboards.Dashboard, error)) *MockLakeviewInterface_GetByDashboardId_Call { - _c.Call.Return(run) - return _c -} - -// GetPublished provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) GetPublished(ctx context.Context, request dashboards.GetPublishedDashboardRequest) (*dashboards.PublishedDashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPublished") - } - - var r0 *dashboards.PublishedDashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetPublishedDashboardRequest) (*dashboards.PublishedDashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetPublishedDashboardRequest) *dashboards.PublishedDashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.PublishedDashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GetPublishedDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_GetPublished_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPublished' -type MockLakeviewInterface_GetPublished_Call struct { - *mock.Call -} - -// GetPublished is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.GetPublishedDashboardRequest -func (_e *MockLakeviewInterface_Expecter) GetPublished(ctx interface{}, request interface{}) *MockLakeviewInterface_GetPublished_Call { - return &MockLakeviewInterface_GetPublished_Call{Call: _e.mock.On("GetPublished", ctx, request)} -} - -func (_c *MockLakeviewInterface_GetPublished_Call) Run(run func(ctx context.Context, request dashboards.GetPublishedDashboardRequest)) *MockLakeviewInterface_GetPublished_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GetPublishedDashboardRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_GetPublished_Call) Return(_a0 *dashboards.PublishedDashboard, _a1 error) *MockLakeviewInterface_GetPublished_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_GetPublished_Call) RunAndReturn(run func(context.Context, dashboards.GetPublishedDashboardRequest) (*dashboards.PublishedDashboard, error)) *MockLakeviewInterface_GetPublished_Call { - _c.Call.Return(run) - return _c -} - -// GetPublishedByDashboardId provides a mock function with given fields: ctx, dashboardId -func (_m *MockLakeviewInterface) GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*dashboards.PublishedDashboard, error) { - ret := _m.Called(ctx, dashboardId) - - if len(ret) == 0 { - panic("no return value specified for GetPublishedByDashboardId") - } - - var r0 *dashboards.PublishedDashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*dashboards.PublishedDashboard, error)); ok { - return rf(ctx, dashboardId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *dashboards.PublishedDashboard); ok { - r0 = rf(ctx, dashboardId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.PublishedDashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, dashboardId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_GetPublishedByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPublishedByDashboardId' -type MockLakeviewInterface_GetPublishedByDashboardId_Call struct { - *mock.Call -} - -// GetPublishedByDashboardId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -func (_e *MockLakeviewInterface_Expecter) GetPublishedByDashboardId(ctx interface{}, dashboardId interface{}) *MockLakeviewInterface_GetPublishedByDashboardId_Call { - return &MockLakeviewInterface_GetPublishedByDashboardId_Call{Call: _e.mock.On("GetPublishedByDashboardId", ctx, dashboardId)} -} - -func (_c *MockLakeviewInterface_GetPublishedByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockLakeviewInterface_GetPublishedByDashboardId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_GetPublishedByDashboardId_Call) Return(_a0 *dashboards.PublishedDashboard, _a1 error) *MockLakeviewInterface_GetPublishedByDashboardId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_GetPublishedByDashboardId_Call) RunAndReturn(run func(context.Context, string) (*dashboards.PublishedDashboard, error)) *MockLakeviewInterface_GetPublishedByDashboardId_Call { - _c.Call.Return(run) - return _c -} - -// GetSchedule provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) GetSchedule(ctx context.Context, request dashboards.GetScheduleRequest) (*dashboards.Schedule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetSchedule") - } - - var r0 *dashboards.Schedule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetScheduleRequest) (*dashboards.Schedule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetScheduleRequest) *dashboards.Schedule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Schedule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GetScheduleRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_GetSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSchedule' -type MockLakeviewInterface_GetSchedule_Call struct { - *mock.Call -} - -// GetSchedule is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.GetScheduleRequest -func (_e *MockLakeviewInterface_Expecter) GetSchedule(ctx interface{}, request interface{}) *MockLakeviewInterface_GetSchedule_Call { - return &MockLakeviewInterface_GetSchedule_Call{Call: _e.mock.On("GetSchedule", ctx, request)} -} - -func (_c *MockLakeviewInterface_GetSchedule_Call) Run(run func(ctx context.Context, request dashboards.GetScheduleRequest)) *MockLakeviewInterface_GetSchedule_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GetScheduleRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_GetSchedule_Call) Return(_a0 *dashboards.Schedule, _a1 error) *MockLakeviewInterface_GetSchedule_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_GetSchedule_Call) RunAndReturn(run func(context.Context, dashboards.GetScheduleRequest) (*dashboards.Schedule, error)) *MockLakeviewInterface_GetSchedule_Call { - _c.Call.Return(run) - return _c -} - -// GetScheduleByDashboardIdAndScheduleId provides a mock function with given fields: ctx, dashboardId, scheduleId -func (_m *MockLakeviewInterface) GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*dashboards.Schedule, error) { - ret := _m.Called(ctx, dashboardId, scheduleId) - - if len(ret) == 0 { - panic("no return value specified for GetScheduleByDashboardIdAndScheduleId") - } - - var r0 *dashboards.Schedule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*dashboards.Schedule, error)); ok { - return rf(ctx, dashboardId, scheduleId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *dashboards.Schedule); ok { - r0 = rf(ctx, dashboardId, scheduleId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Schedule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, dashboardId, scheduleId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetScheduleByDashboardIdAndScheduleId' -type MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call struct { - *mock.Call -} - -// GetScheduleByDashboardIdAndScheduleId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -// - scheduleId string -func (_e *MockLakeviewInterface_Expecter) GetScheduleByDashboardIdAndScheduleId(ctx interface{}, dashboardId interface{}, scheduleId interface{}) *MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call { - return &MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call{Call: _e.mock.On("GetScheduleByDashboardIdAndScheduleId", ctx, dashboardId, scheduleId)} -} - -func (_c *MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call) Run(run func(ctx context.Context, dashboardId string, scheduleId string)) *MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call) Return(_a0 *dashboards.Schedule, _a1 error) *MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call) RunAndReturn(run func(context.Context, string, string) (*dashboards.Schedule, error)) *MockLakeviewInterface_GetScheduleByDashboardIdAndScheduleId_Call { - _c.Call.Return(run) - return _c -} - -// GetSubscription provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) GetSubscription(ctx context.Context, request dashboards.GetSubscriptionRequest) (*dashboards.Subscription, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetSubscription") - } - - var r0 *dashboards.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetSubscriptionRequest) (*dashboards.Subscription, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.GetSubscriptionRequest) *dashboards.Subscription); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.GetSubscriptionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_GetSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSubscription' -type MockLakeviewInterface_GetSubscription_Call struct { - *mock.Call -} - -// GetSubscription is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.GetSubscriptionRequest -func (_e *MockLakeviewInterface_Expecter) GetSubscription(ctx interface{}, request interface{}) *MockLakeviewInterface_GetSubscription_Call { - return &MockLakeviewInterface_GetSubscription_Call{Call: _e.mock.On("GetSubscription", ctx, request)} -} - -func (_c *MockLakeviewInterface_GetSubscription_Call) Run(run func(ctx context.Context, request dashboards.GetSubscriptionRequest)) *MockLakeviewInterface_GetSubscription_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.GetSubscriptionRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_GetSubscription_Call) Return(_a0 *dashboards.Subscription, _a1 error) *MockLakeviewInterface_GetSubscription_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_GetSubscription_Call) RunAndReturn(run func(context.Context, dashboards.GetSubscriptionRequest) (*dashboards.Subscription, error)) *MockLakeviewInterface_GetSubscription_Call { - _c.Call.Return(run) - return _c -} - -// GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId provides a mock function with given fields: ctx, dashboardId, scheduleId, subscriptionId -func (_m *MockLakeviewInterface) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*dashboards.Subscription, error) { - ret := _m.Called(ctx, dashboardId, scheduleId, subscriptionId) - - if len(ret) == 0 { - panic("no return value specified for GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId") - } - - var r0 *dashboards.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dashboards.Subscription, error)); ok { - return rf(ctx, dashboardId, scheduleId, subscriptionId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dashboards.Subscription); ok { - r0 = rf(ctx, dashboardId, scheduleId, subscriptionId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { - r1 = rf(ctx, dashboardId, scheduleId, subscriptionId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId' -type MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call struct { - *mock.Call -} - -// GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -// - scheduleId string -// - subscriptionId string -func (_e *MockLakeviewInterface_Expecter) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx interface{}, dashboardId interface{}, scheduleId interface{}, subscriptionId interface{}) *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - return &MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call{Call: _e.mock.On("GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId", ctx, dashboardId, scheduleId, subscriptionId)} -} - -func (_c *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call) Run(run func(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string)) *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call) Return(_a0 *dashboards.Subscription, _a1 error) *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call) RunAndReturn(run func(context.Context, string, string, string) (*dashboards.Subscription, error)) *MockLakeviewInterface_GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) List(ctx context.Context, request dashboards.ListDashboardsRequest) listing.Iterator[dashboards.Dashboard] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[dashboards.Dashboard] - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListDashboardsRequest) listing.Iterator[dashboards.Dashboard]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[dashboards.Dashboard]) - } - } - - return r0 -} - -// MockLakeviewInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockLakeviewInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.ListDashboardsRequest -func (_e *MockLakeviewInterface_Expecter) List(ctx interface{}, request interface{}) *MockLakeviewInterface_List_Call { - return &MockLakeviewInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockLakeviewInterface_List_Call) Run(run func(ctx context.Context, request dashboards.ListDashboardsRequest)) *MockLakeviewInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.ListDashboardsRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_List_Call) Return(_a0 listing.Iterator[dashboards.Dashboard]) *MockLakeviewInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_List_Call) RunAndReturn(run func(context.Context, dashboards.ListDashboardsRequest) listing.Iterator[dashboards.Dashboard]) *MockLakeviewInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) ListAll(ctx context.Context, request dashboards.ListDashboardsRequest) ([]dashboards.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []dashboards.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListDashboardsRequest) ([]dashboards.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListDashboardsRequest) []dashboards.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]dashboards.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.ListDashboardsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockLakeviewInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.ListDashboardsRequest -func (_e *MockLakeviewInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockLakeviewInterface_ListAll_Call { - return &MockLakeviewInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockLakeviewInterface_ListAll_Call) Run(run func(ctx context.Context, request dashboards.ListDashboardsRequest)) *MockLakeviewInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.ListDashboardsRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_ListAll_Call) Return(_a0 []dashboards.Dashboard, _a1 error) *MockLakeviewInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_ListAll_Call) RunAndReturn(run func(context.Context, dashboards.ListDashboardsRequest) ([]dashboards.Dashboard, error)) *MockLakeviewInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListSchedules provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) ListSchedules(ctx context.Context, request dashboards.ListSchedulesRequest) listing.Iterator[dashboards.Schedule] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSchedules") - } - - var r0 listing.Iterator[dashboards.Schedule] - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListSchedulesRequest) listing.Iterator[dashboards.Schedule]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[dashboards.Schedule]) - } - } - - return r0 -} - -// MockLakeviewInterface_ListSchedules_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSchedules' -type MockLakeviewInterface_ListSchedules_Call struct { - *mock.Call -} - -// ListSchedules is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.ListSchedulesRequest -func (_e *MockLakeviewInterface_Expecter) ListSchedules(ctx interface{}, request interface{}) *MockLakeviewInterface_ListSchedules_Call { - return &MockLakeviewInterface_ListSchedules_Call{Call: _e.mock.On("ListSchedules", ctx, request)} -} - -func (_c *MockLakeviewInterface_ListSchedules_Call) Run(run func(ctx context.Context, request dashboards.ListSchedulesRequest)) *MockLakeviewInterface_ListSchedules_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.ListSchedulesRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_ListSchedules_Call) Return(_a0 listing.Iterator[dashboards.Schedule]) *MockLakeviewInterface_ListSchedules_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_ListSchedules_Call) RunAndReturn(run func(context.Context, dashboards.ListSchedulesRequest) listing.Iterator[dashboards.Schedule]) *MockLakeviewInterface_ListSchedules_Call { - _c.Call.Return(run) - return _c -} - -// ListSchedulesAll provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) ListSchedulesAll(ctx context.Context, request dashboards.ListSchedulesRequest) ([]dashboards.Schedule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSchedulesAll") - } - - var r0 []dashboards.Schedule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListSchedulesRequest) ([]dashboards.Schedule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListSchedulesRequest) []dashboards.Schedule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]dashboards.Schedule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.ListSchedulesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_ListSchedulesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSchedulesAll' -type MockLakeviewInterface_ListSchedulesAll_Call struct { - *mock.Call -} - -// ListSchedulesAll is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.ListSchedulesRequest -func (_e *MockLakeviewInterface_Expecter) ListSchedulesAll(ctx interface{}, request interface{}) *MockLakeviewInterface_ListSchedulesAll_Call { - return &MockLakeviewInterface_ListSchedulesAll_Call{Call: _e.mock.On("ListSchedulesAll", ctx, request)} -} - -func (_c *MockLakeviewInterface_ListSchedulesAll_Call) Run(run func(ctx context.Context, request dashboards.ListSchedulesRequest)) *MockLakeviewInterface_ListSchedulesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.ListSchedulesRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_ListSchedulesAll_Call) Return(_a0 []dashboards.Schedule, _a1 error) *MockLakeviewInterface_ListSchedulesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_ListSchedulesAll_Call) RunAndReturn(run func(context.Context, dashboards.ListSchedulesRequest) ([]dashboards.Schedule, error)) *MockLakeviewInterface_ListSchedulesAll_Call { - _c.Call.Return(run) - return _c -} - -// ListSchedulesByDashboardId provides a mock function with given fields: ctx, dashboardId -func (_m *MockLakeviewInterface) ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*dashboards.ListSchedulesResponse, error) { - ret := _m.Called(ctx, dashboardId) - - if len(ret) == 0 { - panic("no return value specified for ListSchedulesByDashboardId") - } - - var r0 *dashboards.ListSchedulesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*dashboards.ListSchedulesResponse, error)); ok { - return rf(ctx, dashboardId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *dashboards.ListSchedulesResponse); ok { - r0 = rf(ctx, dashboardId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.ListSchedulesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, dashboardId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_ListSchedulesByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSchedulesByDashboardId' -type MockLakeviewInterface_ListSchedulesByDashboardId_Call struct { - *mock.Call -} - -// ListSchedulesByDashboardId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -func (_e *MockLakeviewInterface_Expecter) ListSchedulesByDashboardId(ctx interface{}, dashboardId interface{}) *MockLakeviewInterface_ListSchedulesByDashboardId_Call { - return &MockLakeviewInterface_ListSchedulesByDashboardId_Call{Call: _e.mock.On("ListSchedulesByDashboardId", ctx, dashboardId)} -} - -func (_c *MockLakeviewInterface_ListSchedulesByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockLakeviewInterface_ListSchedulesByDashboardId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_ListSchedulesByDashboardId_Call) Return(_a0 *dashboards.ListSchedulesResponse, _a1 error) *MockLakeviewInterface_ListSchedulesByDashboardId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_ListSchedulesByDashboardId_Call) RunAndReturn(run func(context.Context, string) (*dashboards.ListSchedulesResponse, error)) *MockLakeviewInterface_ListSchedulesByDashboardId_Call { - _c.Call.Return(run) - return _c -} - -// ListSubscriptions provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) ListSubscriptions(ctx context.Context, request dashboards.ListSubscriptionsRequest) listing.Iterator[dashboards.Subscription] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSubscriptions") - } - - var r0 listing.Iterator[dashboards.Subscription] - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListSubscriptionsRequest) listing.Iterator[dashboards.Subscription]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[dashboards.Subscription]) - } - } - - return r0 -} - -// MockLakeviewInterface_ListSubscriptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSubscriptions' -type MockLakeviewInterface_ListSubscriptions_Call struct { - *mock.Call -} - -// ListSubscriptions is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.ListSubscriptionsRequest -func (_e *MockLakeviewInterface_Expecter) ListSubscriptions(ctx interface{}, request interface{}) *MockLakeviewInterface_ListSubscriptions_Call { - return &MockLakeviewInterface_ListSubscriptions_Call{Call: _e.mock.On("ListSubscriptions", ctx, request)} -} - -func (_c *MockLakeviewInterface_ListSubscriptions_Call) Run(run func(ctx context.Context, request dashboards.ListSubscriptionsRequest)) *MockLakeviewInterface_ListSubscriptions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.ListSubscriptionsRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_ListSubscriptions_Call) Return(_a0 listing.Iterator[dashboards.Subscription]) *MockLakeviewInterface_ListSubscriptions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_ListSubscriptions_Call) RunAndReturn(run func(context.Context, dashboards.ListSubscriptionsRequest) listing.Iterator[dashboards.Subscription]) *MockLakeviewInterface_ListSubscriptions_Call { - _c.Call.Return(run) - return _c -} - -// ListSubscriptionsAll provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) ListSubscriptionsAll(ctx context.Context, request dashboards.ListSubscriptionsRequest) ([]dashboards.Subscription, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSubscriptionsAll") - } - - var r0 []dashboards.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListSubscriptionsRequest) ([]dashboards.Subscription, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.ListSubscriptionsRequest) []dashboards.Subscription); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]dashboards.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.ListSubscriptionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_ListSubscriptionsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSubscriptionsAll' -type MockLakeviewInterface_ListSubscriptionsAll_Call struct { - *mock.Call -} - -// ListSubscriptionsAll is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.ListSubscriptionsRequest -func (_e *MockLakeviewInterface_Expecter) ListSubscriptionsAll(ctx interface{}, request interface{}) *MockLakeviewInterface_ListSubscriptionsAll_Call { - return &MockLakeviewInterface_ListSubscriptionsAll_Call{Call: _e.mock.On("ListSubscriptionsAll", ctx, request)} -} - -func (_c *MockLakeviewInterface_ListSubscriptionsAll_Call) Run(run func(ctx context.Context, request dashboards.ListSubscriptionsRequest)) *MockLakeviewInterface_ListSubscriptionsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.ListSubscriptionsRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_ListSubscriptionsAll_Call) Return(_a0 []dashboards.Subscription, _a1 error) *MockLakeviewInterface_ListSubscriptionsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_ListSubscriptionsAll_Call) RunAndReturn(run func(context.Context, dashboards.ListSubscriptionsRequest) ([]dashboards.Subscription, error)) *MockLakeviewInterface_ListSubscriptionsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListSubscriptionsByDashboardIdAndScheduleId provides a mock function with given fields: ctx, dashboardId, scheduleId -func (_m *MockLakeviewInterface) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*dashboards.ListSubscriptionsResponse, error) { - ret := _m.Called(ctx, dashboardId, scheduleId) - - if len(ret) == 0 { - panic("no return value specified for ListSubscriptionsByDashboardIdAndScheduleId") - } - - var r0 *dashboards.ListSubscriptionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*dashboards.ListSubscriptionsResponse, error)); ok { - return rf(ctx, dashboardId, scheduleId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *dashboards.ListSubscriptionsResponse); ok { - r0 = rf(ctx, dashboardId, scheduleId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.ListSubscriptionsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, dashboardId, scheduleId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSubscriptionsByDashboardIdAndScheduleId' -type MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call struct { - *mock.Call -} - -// ListSubscriptionsByDashboardIdAndScheduleId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -// - scheduleId string -func (_e *MockLakeviewInterface_Expecter) ListSubscriptionsByDashboardIdAndScheduleId(ctx interface{}, dashboardId interface{}, scheduleId interface{}) *MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call { - return &MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call{Call: _e.mock.On("ListSubscriptionsByDashboardIdAndScheduleId", ctx, dashboardId, scheduleId)} -} - -func (_c *MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call) Run(run func(ctx context.Context, dashboardId string, scheduleId string)) *MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call) Return(_a0 *dashboards.ListSubscriptionsResponse, _a1 error) *MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call) RunAndReturn(run func(context.Context, string, string) (*dashboards.ListSubscriptionsResponse, error)) *MockLakeviewInterface_ListSubscriptionsByDashboardIdAndScheduleId_Call { - _c.Call.Return(run) - return _c -} - -// Migrate provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) Migrate(ctx context.Context, request dashboards.MigrateDashboardRequest) (*dashboards.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Migrate") - } - - var r0 *dashboards.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.MigrateDashboardRequest) (*dashboards.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.MigrateDashboardRequest) *dashboards.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.MigrateDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_Migrate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Migrate' -type MockLakeviewInterface_Migrate_Call struct { - *mock.Call -} - -// Migrate is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.MigrateDashboardRequest -func (_e *MockLakeviewInterface_Expecter) Migrate(ctx interface{}, request interface{}) *MockLakeviewInterface_Migrate_Call { - return &MockLakeviewInterface_Migrate_Call{Call: _e.mock.On("Migrate", ctx, request)} -} - -func (_c *MockLakeviewInterface_Migrate_Call) Run(run func(ctx context.Context, request dashboards.MigrateDashboardRequest)) *MockLakeviewInterface_Migrate_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.MigrateDashboardRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_Migrate_Call) Return(_a0 *dashboards.Dashboard, _a1 error) *MockLakeviewInterface_Migrate_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_Migrate_Call) RunAndReturn(run func(context.Context, dashboards.MigrateDashboardRequest) (*dashboards.Dashboard, error)) *MockLakeviewInterface_Migrate_Call { - _c.Call.Return(run) - return _c -} - -// Publish provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) Publish(ctx context.Context, request dashboards.PublishRequest) (*dashboards.PublishedDashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Publish") - } - - var r0 *dashboards.PublishedDashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.PublishRequest) (*dashboards.PublishedDashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.PublishRequest) *dashboards.PublishedDashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.PublishedDashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.PublishRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish' -type MockLakeviewInterface_Publish_Call struct { - *mock.Call -} - -// Publish is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.PublishRequest -func (_e *MockLakeviewInterface_Expecter) Publish(ctx interface{}, request interface{}) *MockLakeviewInterface_Publish_Call { - return &MockLakeviewInterface_Publish_Call{Call: _e.mock.On("Publish", ctx, request)} -} - -func (_c *MockLakeviewInterface_Publish_Call) Run(run func(ctx context.Context, request dashboards.PublishRequest)) *MockLakeviewInterface_Publish_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.PublishRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_Publish_Call) Return(_a0 *dashboards.PublishedDashboard, _a1 error) *MockLakeviewInterface_Publish_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_Publish_Call) RunAndReturn(run func(context.Context, dashboards.PublishRequest) (*dashboards.PublishedDashboard, error)) *MockLakeviewInterface_Publish_Call { - _c.Call.Return(run) - return _c -} - -// Trash provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) Trash(ctx context.Context, request dashboards.TrashDashboardRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Trash") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.TrashDashboardRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_Trash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trash' -type MockLakeviewInterface_Trash_Call struct { - *mock.Call -} - -// Trash is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.TrashDashboardRequest -func (_e *MockLakeviewInterface_Expecter) Trash(ctx interface{}, request interface{}) *MockLakeviewInterface_Trash_Call { - return &MockLakeviewInterface_Trash_Call{Call: _e.mock.On("Trash", ctx, request)} -} - -func (_c *MockLakeviewInterface_Trash_Call) Run(run func(ctx context.Context, request dashboards.TrashDashboardRequest)) *MockLakeviewInterface_Trash_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.TrashDashboardRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_Trash_Call) Return(_a0 error) *MockLakeviewInterface_Trash_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_Trash_Call) RunAndReturn(run func(context.Context, dashboards.TrashDashboardRequest) error) *MockLakeviewInterface_Trash_Call { - _c.Call.Return(run) - return _c -} - -// TrashByDashboardId provides a mock function with given fields: ctx, dashboardId -func (_m *MockLakeviewInterface) TrashByDashboardId(ctx context.Context, dashboardId string) error { - ret := _m.Called(ctx, dashboardId) - - if len(ret) == 0 { - panic("no return value specified for TrashByDashboardId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, dashboardId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_TrashByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TrashByDashboardId' -type MockLakeviewInterface_TrashByDashboardId_Call struct { - *mock.Call -} - -// TrashByDashboardId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -func (_e *MockLakeviewInterface_Expecter) TrashByDashboardId(ctx interface{}, dashboardId interface{}) *MockLakeviewInterface_TrashByDashboardId_Call { - return &MockLakeviewInterface_TrashByDashboardId_Call{Call: _e.mock.On("TrashByDashboardId", ctx, dashboardId)} -} - -func (_c *MockLakeviewInterface_TrashByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockLakeviewInterface_TrashByDashboardId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_TrashByDashboardId_Call) Return(_a0 error) *MockLakeviewInterface_TrashByDashboardId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_TrashByDashboardId_Call) RunAndReturn(run func(context.Context, string) error) *MockLakeviewInterface_TrashByDashboardId_Call { - _c.Call.Return(run) - return _c -} - -// Unpublish provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) Unpublish(ctx context.Context, request dashboards.UnpublishDashboardRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Unpublish") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.UnpublishDashboardRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_Unpublish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unpublish' -type MockLakeviewInterface_Unpublish_Call struct { - *mock.Call -} - -// Unpublish is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.UnpublishDashboardRequest -func (_e *MockLakeviewInterface_Expecter) Unpublish(ctx interface{}, request interface{}) *MockLakeviewInterface_Unpublish_Call { - return &MockLakeviewInterface_Unpublish_Call{Call: _e.mock.On("Unpublish", ctx, request)} -} - -func (_c *MockLakeviewInterface_Unpublish_Call) Run(run func(ctx context.Context, request dashboards.UnpublishDashboardRequest)) *MockLakeviewInterface_Unpublish_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.UnpublishDashboardRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_Unpublish_Call) Return(_a0 error) *MockLakeviewInterface_Unpublish_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_Unpublish_Call) RunAndReturn(run func(context.Context, dashboards.UnpublishDashboardRequest) error) *MockLakeviewInterface_Unpublish_Call { - _c.Call.Return(run) - return _c -} - -// UnpublishByDashboardId provides a mock function with given fields: ctx, dashboardId -func (_m *MockLakeviewInterface) UnpublishByDashboardId(ctx context.Context, dashboardId string) error { - ret := _m.Called(ctx, dashboardId) - - if len(ret) == 0 { - panic("no return value specified for UnpublishByDashboardId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, dashboardId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockLakeviewInterface_UnpublishByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnpublishByDashboardId' -type MockLakeviewInterface_UnpublishByDashboardId_Call struct { - *mock.Call -} - -// UnpublishByDashboardId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -func (_e *MockLakeviewInterface_Expecter) UnpublishByDashboardId(ctx interface{}, dashboardId interface{}) *MockLakeviewInterface_UnpublishByDashboardId_Call { - return &MockLakeviewInterface_UnpublishByDashboardId_Call{Call: _e.mock.On("UnpublishByDashboardId", ctx, dashboardId)} -} - -func (_c *MockLakeviewInterface_UnpublishByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockLakeviewInterface_UnpublishByDashboardId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockLakeviewInterface_UnpublishByDashboardId_Call) Return(_a0 error) *MockLakeviewInterface_UnpublishByDashboardId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockLakeviewInterface_UnpublishByDashboardId_Call) RunAndReturn(run func(context.Context, string) error) *MockLakeviewInterface_UnpublishByDashboardId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) Update(ctx context.Context, request dashboards.UpdateDashboardRequest) (*dashboards.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *dashboards.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.UpdateDashboardRequest) (*dashboards.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.UpdateDashboardRequest) *dashboards.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.UpdateDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockLakeviewInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.UpdateDashboardRequest -func (_e *MockLakeviewInterface_Expecter) Update(ctx interface{}, request interface{}) *MockLakeviewInterface_Update_Call { - return &MockLakeviewInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockLakeviewInterface_Update_Call) Run(run func(ctx context.Context, request dashboards.UpdateDashboardRequest)) *MockLakeviewInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.UpdateDashboardRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_Update_Call) Return(_a0 *dashboards.Dashboard, _a1 error) *MockLakeviewInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_Update_Call) RunAndReturn(run func(context.Context, dashboards.UpdateDashboardRequest) (*dashboards.Dashboard, error)) *MockLakeviewInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdateSchedule provides a mock function with given fields: ctx, request -func (_m *MockLakeviewInterface) UpdateSchedule(ctx context.Context, request dashboards.UpdateScheduleRequest) (*dashboards.Schedule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateSchedule") - } - - var r0 *dashboards.Schedule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, dashboards.UpdateScheduleRequest) (*dashboards.Schedule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, dashboards.UpdateScheduleRequest) *dashboards.Schedule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*dashboards.Schedule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, dashboards.UpdateScheduleRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockLakeviewInterface_UpdateSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSchedule' -type MockLakeviewInterface_UpdateSchedule_Call struct { - *mock.Call -} - -// UpdateSchedule is a helper method to define mock.On call -// - ctx context.Context -// - request dashboards.UpdateScheduleRequest -func (_e *MockLakeviewInterface_Expecter) UpdateSchedule(ctx interface{}, request interface{}) *MockLakeviewInterface_UpdateSchedule_Call { - return &MockLakeviewInterface_UpdateSchedule_Call{Call: _e.mock.On("UpdateSchedule", ctx, request)} -} - -func (_c *MockLakeviewInterface_UpdateSchedule_Call) Run(run func(ctx context.Context, request dashboards.UpdateScheduleRequest)) *MockLakeviewInterface_UpdateSchedule_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(dashboards.UpdateScheduleRequest)) - }) - return _c -} - -func (_c *MockLakeviewInterface_UpdateSchedule_Call) Return(_a0 *dashboards.Schedule, _a1 error) *MockLakeviewInterface_UpdateSchedule_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockLakeviewInterface_UpdateSchedule_Call) RunAndReturn(run func(context.Context, dashboards.UpdateScheduleRequest) (*dashboards.Schedule, error)) *MockLakeviewInterface_UpdateSchedule_Call { - _c.Call.Return(run) - return _c -} - -// NewMockLakeviewInterface creates a new instance of MockLakeviewInterface. 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 NewMockLakeviewInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockLakeviewInterface { - mock := &MockLakeviewInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/files/mock_dbfs_interface.go b/experimental/mocks/service/files/mock_dbfs_interface.go deleted file mode 100644 index f2494b722..000000000 --- a/experimental/mocks/service/files/mock_dbfs_interface.go +++ /dev/null @@ -1,1044 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package files - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - files "github.com/databricks/databricks-sdk-go/service/files" - - mock "github.com/stretchr/testify/mock" -) - -// MockDbfsInterface is an autogenerated mock type for the DbfsInterface type -type MockDbfsInterface struct { - mock.Mock -} - -type MockDbfsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDbfsInterface) EXPECT() *MockDbfsInterface_Expecter { - return &MockDbfsInterface_Expecter{mock: &_m.Mock} -} - -// AddBlock provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) AddBlock(ctx context.Context, request files.AddBlock) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for AddBlock") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.AddBlock) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_AddBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddBlock' -type MockDbfsInterface_AddBlock_Call struct { - *mock.Call -} - -// AddBlock is a helper method to define mock.On call -// - ctx context.Context -// - request files.AddBlock -func (_e *MockDbfsInterface_Expecter) AddBlock(ctx interface{}, request interface{}) *MockDbfsInterface_AddBlock_Call { - return &MockDbfsInterface_AddBlock_Call{Call: _e.mock.On("AddBlock", ctx, request)} -} - -func (_c *MockDbfsInterface_AddBlock_Call) Run(run func(ctx context.Context, request files.AddBlock)) *MockDbfsInterface_AddBlock_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.AddBlock)) - }) - return _c -} - -func (_c *MockDbfsInterface_AddBlock_Call) Return(_a0 error) *MockDbfsInterface_AddBlock_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_AddBlock_Call) RunAndReturn(run func(context.Context, files.AddBlock) error) *MockDbfsInterface_AddBlock_Call { - _c.Call.Return(run) - return _c -} - -// Close provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) Close(ctx context.Context, request files.Close) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Close") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.Close) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' -type MockDbfsInterface_Close_Call struct { - *mock.Call -} - -// Close is a helper method to define mock.On call -// - ctx context.Context -// - request files.Close -func (_e *MockDbfsInterface_Expecter) Close(ctx interface{}, request interface{}) *MockDbfsInterface_Close_Call { - return &MockDbfsInterface_Close_Call{Call: _e.mock.On("Close", ctx, request)} -} - -func (_c *MockDbfsInterface_Close_Call) Run(run func(ctx context.Context, request files.Close)) *MockDbfsInterface_Close_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.Close)) - }) - return _c -} - -func (_c *MockDbfsInterface_Close_Call) Return(_a0 error) *MockDbfsInterface_Close_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_Close_Call) RunAndReturn(run func(context.Context, files.Close) error) *MockDbfsInterface_Close_Call { - _c.Call.Return(run) - return _c -} - -// CloseByHandle provides a mock function with given fields: ctx, handle -func (_m *MockDbfsInterface) CloseByHandle(ctx context.Context, handle int64) error { - ret := _m.Called(ctx, handle) - - if len(ret) == 0 { - panic("no return value specified for CloseByHandle") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, handle) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_CloseByHandle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseByHandle' -type MockDbfsInterface_CloseByHandle_Call struct { - *mock.Call -} - -// CloseByHandle is a helper method to define mock.On call -// - ctx context.Context -// - handle int64 -func (_e *MockDbfsInterface_Expecter) CloseByHandle(ctx interface{}, handle interface{}) *MockDbfsInterface_CloseByHandle_Call { - return &MockDbfsInterface_CloseByHandle_Call{Call: _e.mock.On("CloseByHandle", ctx, handle)} -} - -func (_c *MockDbfsInterface_CloseByHandle_Call) Run(run func(ctx context.Context, handle int64)) *MockDbfsInterface_CloseByHandle_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockDbfsInterface_CloseByHandle_Call) Return(_a0 error) *MockDbfsInterface_CloseByHandle_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_CloseByHandle_Call) RunAndReturn(run func(context.Context, int64) error) *MockDbfsInterface_CloseByHandle_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) Create(ctx context.Context, request files.Create) (*files.CreateResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *files.CreateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, files.Create) (*files.CreateResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, files.Create) *files.CreateResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.CreateResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, files.Create) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockDbfsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request files.Create -func (_e *MockDbfsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockDbfsInterface_Create_Call { - return &MockDbfsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockDbfsInterface_Create_Call) Run(run func(ctx context.Context, request files.Create)) *MockDbfsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.Create)) - }) - return _c -} - -func (_c *MockDbfsInterface_Create_Call) Return(_a0 *files.CreateResponse, _a1 error) *MockDbfsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_Create_Call) RunAndReturn(run func(context.Context, files.Create) (*files.CreateResponse, error)) *MockDbfsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) Delete(ctx context.Context, request files.Delete) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.Delete) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockDbfsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request files.Delete -func (_e *MockDbfsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDbfsInterface_Delete_Call { - return &MockDbfsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockDbfsInterface_Delete_Call) Run(run func(ctx context.Context, request files.Delete)) *MockDbfsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.Delete)) - }) - return _c -} - -func (_c *MockDbfsInterface_Delete_Call) Return(_a0 error) *MockDbfsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_Delete_Call) RunAndReturn(run func(context.Context, files.Delete) error) *MockDbfsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// GetStatus provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) GetStatus(ctx context.Context, request files.GetStatusRequest) (*files.FileInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetStatus") - } - - var r0 *files.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, files.GetStatusRequest) (*files.FileInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, files.GetStatusRequest) *files.FileInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, files.GetStatusRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus' -type MockDbfsInterface_GetStatus_Call struct { - *mock.Call -} - -// GetStatus is a helper method to define mock.On call -// - ctx context.Context -// - request files.GetStatusRequest -func (_e *MockDbfsInterface_Expecter) GetStatus(ctx interface{}, request interface{}) *MockDbfsInterface_GetStatus_Call { - return &MockDbfsInterface_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx, request)} -} - -func (_c *MockDbfsInterface_GetStatus_Call) Run(run func(ctx context.Context, request files.GetStatusRequest)) *MockDbfsInterface_GetStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.GetStatusRequest)) - }) - return _c -} - -func (_c *MockDbfsInterface_GetStatus_Call) Return(_a0 *files.FileInfo, _a1 error) *MockDbfsInterface_GetStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_GetStatus_Call) RunAndReturn(run func(context.Context, files.GetStatusRequest) (*files.FileInfo, error)) *MockDbfsInterface_GetStatus_Call { - _c.Call.Return(run) - return _c -} - -// GetStatusByPath provides a mock function with given fields: ctx, path -func (_m *MockDbfsInterface) GetStatusByPath(ctx context.Context, path string) (*files.FileInfo, error) { - ret := _m.Called(ctx, path) - - if len(ret) == 0 { - panic("no return value specified for GetStatusByPath") - } - - var r0 *files.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*files.FileInfo, error)); ok { - return rf(ctx, path) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *files.FileInfo); ok { - r0 = rf(ctx, path) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, path) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_GetStatusByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatusByPath' -type MockDbfsInterface_GetStatusByPath_Call struct { - *mock.Call -} - -// GetStatusByPath is a helper method to define mock.On call -// - ctx context.Context -// - path string -func (_e *MockDbfsInterface_Expecter) GetStatusByPath(ctx interface{}, path interface{}) *MockDbfsInterface_GetStatusByPath_Call { - return &MockDbfsInterface_GetStatusByPath_Call{Call: _e.mock.On("GetStatusByPath", ctx, path)} -} - -func (_c *MockDbfsInterface_GetStatusByPath_Call) Run(run func(ctx context.Context, path string)) *MockDbfsInterface_GetStatusByPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDbfsInterface_GetStatusByPath_Call) Return(_a0 *files.FileInfo, _a1 error) *MockDbfsInterface_GetStatusByPath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_GetStatusByPath_Call) RunAndReturn(run func(context.Context, string) (*files.FileInfo, error)) *MockDbfsInterface_GetStatusByPath_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) List(ctx context.Context, request files.ListDbfsRequest) listing.Iterator[files.FileInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[files.FileInfo] - if rf, ok := ret.Get(0).(func(context.Context, files.ListDbfsRequest) listing.Iterator[files.FileInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[files.FileInfo]) - } - } - - return r0 -} - -// MockDbfsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockDbfsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request files.ListDbfsRequest -func (_e *MockDbfsInterface_Expecter) List(ctx interface{}, request interface{}) *MockDbfsInterface_List_Call { - return &MockDbfsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockDbfsInterface_List_Call) Run(run func(ctx context.Context, request files.ListDbfsRequest)) *MockDbfsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.ListDbfsRequest)) - }) - return _c -} - -func (_c *MockDbfsInterface_List_Call) Return(_a0 listing.Iterator[files.FileInfo]) *MockDbfsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_List_Call) RunAndReturn(run func(context.Context, files.ListDbfsRequest) listing.Iterator[files.FileInfo]) *MockDbfsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) ListAll(ctx context.Context, request files.ListDbfsRequest) ([]files.FileInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []files.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, files.ListDbfsRequest) ([]files.FileInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, files.ListDbfsRequest) []files.FileInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]files.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, files.ListDbfsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockDbfsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request files.ListDbfsRequest -func (_e *MockDbfsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockDbfsInterface_ListAll_Call { - return &MockDbfsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockDbfsInterface_ListAll_Call) Run(run func(ctx context.Context, request files.ListDbfsRequest)) *MockDbfsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.ListDbfsRequest)) - }) - return _c -} - -func (_c *MockDbfsInterface_ListAll_Call) Return(_a0 []files.FileInfo, _a1 error) *MockDbfsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_ListAll_Call) RunAndReturn(run func(context.Context, files.ListDbfsRequest) ([]files.FileInfo, error)) *MockDbfsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByPath provides a mock function with given fields: ctx, path -func (_m *MockDbfsInterface) ListByPath(ctx context.Context, path string) (*files.ListStatusResponse, error) { - ret := _m.Called(ctx, path) - - if len(ret) == 0 { - panic("no return value specified for ListByPath") - } - - var r0 *files.ListStatusResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*files.ListStatusResponse, error)); ok { - return rf(ctx, path) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *files.ListStatusResponse); ok { - r0 = rf(ctx, path) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.ListStatusResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, path) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_ListByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByPath' -type MockDbfsInterface_ListByPath_Call struct { - *mock.Call -} - -// ListByPath is a helper method to define mock.On call -// - ctx context.Context -// - path string -func (_e *MockDbfsInterface_Expecter) ListByPath(ctx interface{}, path interface{}) *MockDbfsInterface_ListByPath_Call { - return &MockDbfsInterface_ListByPath_Call{Call: _e.mock.On("ListByPath", ctx, path)} -} - -func (_c *MockDbfsInterface_ListByPath_Call) Run(run func(ctx context.Context, path string)) *MockDbfsInterface_ListByPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDbfsInterface_ListByPath_Call) Return(_a0 *files.ListStatusResponse, _a1 error) *MockDbfsInterface_ListByPath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_ListByPath_Call) RunAndReturn(run func(context.Context, string) (*files.ListStatusResponse, error)) *MockDbfsInterface_ListByPath_Call { - _c.Call.Return(run) - return _c -} - -// Mkdirs provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) Mkdirs(ctx context.Context, request files.MkDirs) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Mkdirs") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.MkDirs) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_Mkdirs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mkdirs' -type MockDbfsInterface_Mkdirs_Call struct { - *mock.Call -} - -// Mkdirs is a helper method to define mock.On call -// - ctx context.Context -// - request files.MkDirs -func (_e *MockDbfsInterface_Expecter) Mkdirs(ctx interface{}, request interface{}) *MockDbfsInterface_Mkdirs_Call { - return &MockDbfsInterface_Mkdirs_Call{Call: _e.mock.On("Mkdirs", ctx, request)} -} - -func (_c *MockDbfsInterface_Mkdirs_Call) Run(run func(ctx context.Context, request files.MkDirs)) *MockDbfsInterface_Mkdirs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.MkDirs)) - }) - return _c -} - -func (_c *MockDbfsInterface_Mkdirs_Call) Return(_a0 error) *MockDbfsInterface_Mkdirs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_Mkdirs_Call) RunAndReturn(run func(context.Context, files.MkDirs) error) *MockDbfsInterface_Mkdirs_Call { - _c.Call.Return(run) - return _c -} - -// MkdirsByPath provides a mock function with given fields: ctx, path -func (_m *MockDbfsInterface) MkdirsByPath(ctx context.Context, path string) error { - ret := _m.Called(ctx, path) - - if len(ret) == 0 { - panic("no return value specified for MkdirsByPath") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, path) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_MkdirsByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MkdirsByPath' -type MockDbfsInterface_MkdirsByPath_Call struct { - *mock.Call -} - -// MkdirsByPath is a helper method to define mock.On call -// - ctx context.Context -// - path string -func (_e *MockDbfsInterface_Expecter) MkdirsByPath(ctx interface{}, path interface{}) *MockDbfsInterface_MkdirsByPath_Call { - return &MockDbfsInterface_MkdirsByPath_Call{Call: _e.mock.On("MkdirsByPath", ctx, path)} -} - -func (_c *MockDbfsInterface_MkdirsByPath_Call) Run(run func(ctx context.Context, path string)) *MockDbfsInterface_MkdirsByPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDbfsInterface_MkdirsByPath_Call) Return(_a0 error) *MockDbfsInterface_MkdirsByPath_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_MkdirsByPath_Call) RunAndReturn(run func(context.Context, string) error) *MockDbfsInterface_MkdirsByPath_Call { - _c.Call.Return(run) - return _c -} - -// Move provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) Move(ctx context.Context, request files.Move) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Move") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.Move) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move' -type MockDbfsInterface_Move_Call struct { - *mock.Call -} - -// Move is a helper method to define mock.On call -// - ctx context.Context -// - request files.Move -func (_e *MockDbfsInterface_Expecter) Move(ctx interface{}, request interface{}) *MockDbfsInterface_Move_Call { - return &MockDbfsInterface_Move_Call{Call: _e.mock.On("Move", ctx, request)} -} - -func (_c *MockDbfsInterface_Move_Call) Run(run func(ctx context.Context, request files.Move)) *MockDbfsInterface_Move_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.Move)) - }) - return _c -} - -func (_c *MockDbfsInterface_Move_Call) Return(_a0 error) *MockDbfsInterface_Move_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_Move_Call) RunAndReturn(run func(context.Context, files.Move) error) *MockDbfsInterface_Move_Call { - _c.Call.Return(run) - return _c -} - -// Open provides a mock function with given fields: ctx, path, mode -func (_m *MockDbfsInterface) Open(ctx context.Context, path string, mode files.FileMode) (files.Handle, error) { - ret := _m.Called(ctx, path, mode) - - if len(ret) == 0 { - panic("no return value specified for Open") - } - - var r0 files.Handle - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, files.FileMode) (files.Handle, error)); ok { - return rf(ctx, path, mode) - } - if rf, ok := ret.Get(0).(func(context.Context, string, files.FileMode) files.Handle); ok { - r0 = rf(ctx, path, mode) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(files.Handle) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, files.FileMode) error); ok { - r1 = rf(ctx, path, mode) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_Open_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Open' -type MockDbfsInterface_Open_Call struct { - *mock.Call -} - -// Open is a helper method to define mock.On call -// - ctx context.Context -// - path string -// - mode files.FileMode -func (_e *MockDbfsInterface_Expecter) Open(ctx interface{}, path interface{}, mode interface{}) *MockDbfsInterface_Open_Call { - return &MockDbfsInterface_Open_Call{Call: _e.mock.On("Open", ctx, path, mode)} -} - -func (_c *MockDbfsInterface_Open_Call) Run(run func(ctx context.Context, path string, mode files.FileMode)) *MockDbfsInterface_Open_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(files.FileMode)) - }) - return _c -} - -func (_c *MockDbfsInterface_Open_Call) Return(_a0 files.Handle, _a1 error) *MockDbfsInterface_Open_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_Open_Call) RunAndReturn(run func(context.Context, string, files.FileMode) (files.Handle, error)) *MockDbfsInterface_Open_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) Put(ctx context.Context, request files.Put) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Put") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.Put) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockDbfsInterface_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - ctx context.Context -// - request files.Put -func (_e *MockDbfsInterface_Expecter) Put(ctx interface{}, request interface{}) *MockDbfsInterface_Put_Call { - return &MockDbfsInterface_Put_Call{Call: _e.mock.On("Put", ctx, request)} -} - -func (_c *MockDbfsInterface_Put_Call) Run(run func(ctx context.Context, request files.Put)) *MockDbfsInterface_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.Put)) - }) - return _c -} - -func (_c *MockDbfsInterface_Put_Call) Return(_a0 error) *MockDbfsInterface_Put_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_Put_Call) RunAndReturn(run func(context.Context, files.Put) error) *MockDbfsInterface_Put_Call { - _c.Call.Return(run) - return _c -} - -// Read provides a mock function with given fields: ctx, request -func (_m *MockDbfsInterface) Read(ctx context.Context, request files.ReadDbfsRequest) (*files.ReadResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Read") - } - - var r0 *files.ReadResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, files.ReadDbfsRequest) (*files.ReadResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, files.ReadDbfsRequest) *files.ReadResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.ReadResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, files.ReadDbfsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read' -type MockDbfsInterface_Read_Call struct { - *mock.Call -} - -// Read is a helper method to define mock.On call -// - ctx context.Context -// - request files.ReadDbfsRequest -func (_e *MockDbfsInterface_Expecter) Read(ctx interface{}, request interface{}) *MockDbfsInterface_Read_Call { - return &MockDbfsInterface_Read_Call{Call: _e.mock.On("Read", ctx, request)} -} - -func (_c *MockDbfsInterface_Read_Call) Run(run func(ctx context.Context, request files.ReadDbfsRequest)) *MockDbfsInterface_Read_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.ReadDbfsRequest)) - }) - return _c -} - -func (_c *MockDbfsInterface_Read_Call) Return(_a0 *files.ReadResponse, _a1 error) *MockDbfsInterface_Read_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_Read_Call) RunAndReturn(run func(context.Context, files.ReadDbfsRequest) (*files.ReadResponse, error)) *MockDbfsInterface_Read_Call { - _c.Call.Return(run) - return _c -} - -// ReadFile provides a mock function with given fields: ctx, name -func (_m *MockDbfsInterface) ReadFile(ctx context.Context, name string) ([]byte, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for ReadFile") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_ReadFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadFile' -type MockDbfsInterface_ReadFile_Call struct { - *mock.Call -} - -// ReadFile is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockDbfsInterface_Expecter) ReadFile(ctx interface{}, name interface{}) *MockDbfsInterface_ReadFile_Call { - return &MockDbfsInterface_ReadFile_Call{Call: _e.mock.On("ReadFile", ctx, name)} -} - -func (_c *MockDbfsInterface_ReadFile_Call) Run(run func(ctx context.Context, name string)) *MockDbfsInterface_ReadFile_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDbfsInterface_ReadFile_Call) Return(_a0 []byte, _a1 error) *MockDbfsInterface_ReadFile_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_ReadFile_Call) RunAndReturn(run func(context.Context, string) ([]byte, error)) *MockDbfsInterface_ReadFile_Call { - _c.Call.Return(run) - return _c -} - -// RecursiveList provides a mock function with given fields: ctx, path -func (_m *MockDbfsInterface) RecursiveList(ctx context.Context, path string) ([]files.FileInfo, error) { - ret := _m.Called(ctx, path) - - if len(ret) == 0 { - panic("no return value specified for RecursiveList") - } - - var r0 []files.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) ([]files.FileInfo, error)); ok { - return rf(ctx, path) - } - if rf, ok := ret.Get(0).(func(context.Context, string) []files.FileInfo); ok { - r0 = rf(ctx, path) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]files.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, path) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbfsInterface_RecursiveList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecursiveList' -type MockDbfsInterface_RecursiveList_Call struct { - *mock.Call -} - -// RecursiveList is a helper method to define mock.On call -// - ctx context.Context -// - path string -func (_e *MockDbfsInterface_Expecter) RecursiveList(ctx interface{}, path interface{}) *MockDbfsInterface_RecursiveList_Call { - return &MockDbfsInterface_RecursiveList_Call{Call: _e.mock.On("RecursiveList", ctx, path)} -} - -func (_c *MockDbfsInterface_RecursiveList_Call) Run(run func(ctx context.Context, path string)) *MockDbfsInterface_RecursiveList_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDbfsInterface_RecursiveList_Call) Return(_a0 []files.FileInfo, _a1 error) *MockDbfsInterface_RecursiveList_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbfsInterface_RecursiveList_Call) RunAndReturn(run func(context.Context, string) ([]files.FileInfo, error)) *MockDbfsInterface_RecursiveList_Call { - _c.Call.Return(run) - return _c -} - -// WriteFile provides a mock function with given fields: ctx, name, data -func (_m *MockDbfsInterface) WriteFile(ctx context.Context, name string, data []byte) error { - ret := _m.Called(ctx, name, data) - - if len(ret) == 0 { - panic("no return value specified for WriteFile") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, []byte) error); ok { - r0 = rf(ctx, name, data) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDbfsInterface_WriteFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteFile' -type MockDbfsInterface_WriteFile_Call struct { - *mock.Call -} - -// WriteFile is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - data []byte -func (_e *MockDbfsInterface_Expecter) WriteFile(ctx interface{}, name interface{}, data interface{}) *MockDbfsInterface_WriteFile_Call { - return &MockDbfsInterface_WriteFile_Call{Call: _e.mock.On("WriteFile", ctx, name, data)} -} - -func (_c *MockDbfsInterface_WriteFile_Call) Run(run func(ctx context.Context, name string, data []byte)) *MockDbfsInterface_WriteFile_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]byte)) - }) - return _c -} - -func (_c *MockDbfsInterface_WriteFile_Call) Return(_a0 error) *MockDbfsInterface_WriteFile_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDbfsInterface_WriteFile_Call) RunAndReturn(run func(context.Context, string, []byte) error) *MockDbfsInterface_WriteFile_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDbfsInterface creates a new instance of MockDbfsInterface. 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 NewMockDbfsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDbfsInterface { - mock := &MockDbfsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/files/mock_files_interface.go b/experimental/mocks/service/files/mock_files_interface.go deleted file mode 100644 index dfc7c45dd..000000000 --- a/experimental/mocks/service/files/mock_files_interface.go +++ /dev/null @@ -1,818 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package files - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - files "github.com/databricks/databricks-sdk-go/service/files" - - mock "github.com/stretchr/testify/mock" -) - -// MockFilesInterface is an autogenerated mock type for the FilesInterface type -type MockFilesInterface struct { - mock.Mock -} - -type MockFilesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockFilesInterface) EXPECT() *MockFilesInterface_Expecter { - return &MockFilesInterface_Expecter{mock: &_m.Mock} -} - -// CreateDirectory provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) CreateDirectory(ctx context.Context, request files.CreateDirectoryRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateDirectory") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.CreateDirectoryRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_CreateDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDirectory' -type MockFilesInterface_CreateDirectory_Call struct { - *mock.Call -} - -// CreateDirectory is a helper method to define mock.On call -// - ctx context.Context -// - request files.CreateDirectoryRequest -func (_e *MockFilesInterface_Expecter) CreateDirectory(ctx interface{}, request interface{}) *MockFilesInterface_CreateDirectory_Call { - return &MockFilesInterface_CreateDirectory_Call{Call: _e.mock.On("CreateDirectory", ctx, request)} -} - -func (_c *MockFilesInterface_CreateDirectory_Call) Run(run func(ctx context.Context, request files.CreateDirectoryRequest)) *MockFilesInterface_CreateDirectory_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.CreateDirectoryRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_CreateDirectory_Call) Return(_a0 error) *MockFilesInterface_CreateDirectory_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_CreateDirectory_Call) RunAndReturn(run func(context.Context, files.CreateDirectoryRequest) error) *MockFilesInterface_CreateDirectory_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) Delete(ctx context.Context, request files.DeleteFileRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.DeleteFileRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockFilesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request files.DeleteFileRequest -func (_e *MockFilesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockFilesInterface_Delete_Call { - return &MockFilesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockFilesInterface_Delete_Call) Run(run func(ctx context.Context, request files.DeleteFileRequest)) *MockFilesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.DeleteFileRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_Delete_Call) Return(_a0 error) *MockFilesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_Delete_Call) RunAndReturn(run func(context.Context, files.DeleteFileRequest) error) *MockFilesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByFilePath provides a mock function with given fields: ctx, filePath -func (_m *MockFilesInterface) DeleteByFilePath(ctx context.Context, filePath string) error { - ret := _m.Called(ctx, filePath) - - if len(ret) == 0 { - panic("no return value specified for DeleteByFilePath") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, filePath) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_DeleteByFilePath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByFilePath' -type MockFilesInterface_DeleteByFilePath_Call struct { - *mock.Call -} - -// DeleteByFilePath is a helper method to define mock.On call -// - ctx context.Context -// - filePath string -func (_e *MockFilesInterface_Expecter) DeleteByFilePath(ctx interface{}, filePath interface{}) *MockFilesInterface_DeleteByFilePath_Call { - return &MockFilesInterface_DeleteByFilePath_Call{Call: _e.mock.On("DeleteByFilePath", ctx, filePath)} -} - -func (_c *MockFilesInterface_DeleteByFilePath_Call) Run(run func(ctx context.Context, filePath string)) *MockFilesInterface_DeleteByFilePath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFilesInterface_DeleteByFilePath_Call) Return(_a0 error) *MockFilesInterface_DeleteByFilePath_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_DeleteByFilePath_Call) RunAndReturn(run func(context.Context, string) error) *MockFilesInterface_DeleteByFilePath_Call { - _c.Call.Return(run) - return _c -} - -// DeleteDirectory provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) DeleteDirectory(ctx context.Context, request files.DeleteDirectoryRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteDirectory") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.DeleteDirectoryRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_DeleteDirectory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteDirectory' -type MockFilesInterface_DeleteDirectory_Call struct { - *mock.Call -} - -// DeleteDirectory is a helper method to define mock.On call -// - ctx context.Context -// - request files.DeleteDirectoryRequest -func (_e *MockFilesInterface_Expecter) DeleteDirectory(ctx interface{}, request interface{}) *MockFilesInterface_DeleteDirectory_Call { - return &MockFilesInterface_DeleteDirectory_Call{Call: _e.mock.On("DeleteDirectory", ctx, request)} -} - -func (_c *MockFilesInterface_DeleteDirectory_Call) Run(run func(ctx context.Context, request files.DeleteDirectoryRequest)) *MockFilesInterface_DeleteDirectory_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.DeleteDirectoryRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_DeleteDirectory_Call) Return(_a0 error) *MockFilesInterface_DeleteDirectory_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_DeleteDirectory_Call) RunAndReturn(run func(context.Context, files.DeleteDirectoryRequest) error) *MockFilesInterface_DeleteDirectory_Call { - _c.Call.Return(run) - return _c -} - -// DeleteDirectoryByDirectoryPath provides a mock function with given fields: ctx, directoryPath -func (_m *MockFilesInterface) DeleteDirectoryByDirectoryPath(ctx context.Context, directoryPath string) error { - ret := _m.Called(ctx, directoryPath) - - if len(ret) == 0 { - panic("no return value specified for DeleteDirectoryByDirectoryPath") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, directoryPath) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_DeleteDirectoryByDirectoryPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteDirectoryByDirectoryPath' -type MockFilesInterface_DeleteDirectoryByDirectoryPath_Call struct { - *mock.Call -} - -// DeleteDirectoryByDirectoryPath is a helper method to define mock.On call -// - ctx context.Context -// - directoryPath string -func (_e *MockFilesInterface_Expecter) DeleteDirectoryByDirectoryPath(ctx interface{}, directoryPath interface{}) *MockFilesInterface_DeleteDirectoryByDirectoryPath_Call { - return &MockFilesInterface_DeleteDirectoryByDirectoryPath_Call{Call: _e.mock.On("DeleteDirectoryByDirectoryPath", ctx, directoryPath)} -} - -func (_c *MockFilesInterface_DeleteDirectoryByDirectoryPath_Call) Run(run func(ctx context.Context, directoryPath string)) *MockFilesInterface_DeleteDirectoryByDirectoryPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFilesInterface_DeleteDirectoryByDirectoryPath_Call) Return(_a0 error) *MockFilesInterface_DeleteDirectoryByDirectoryPath_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_DeleteDirectoryByDirectoryPath_Call) RunAndReturn(run func(context.Context, string) error) *MockFilesInterface_DeleteDirectoryByDirectoryPath_Call { - _c.Call.Return(run) - return _c -} - -// Download provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) Download(ctx context.Context, request files.DownloadRequest) (*files.DownloadResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Download") - } - - var r0 *files.DownloadResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, files.DownloadRequest) (*files.DownloadResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, files.DownloadRequest) *files.DownloadResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.DownloadResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, files.DownloadRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFilesInterface_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' -type MockFilesInterface_Download_Call struct { - *mock.Call -} - -// Download is a helper method to define mock.On call -// - ctx context.Context -// - request files.DownloadRequest -func (_e *MockFilesInterface_Expecter) Download(ctx interface{}, request interface{}) *MockFilesInterface_Download_Call { - return &MockFilesInterface_Download_Call{Call: _e.mock.On("Download", ctx, request)} -} - -func (_c *MockFilesInterface_Download_Call) Run(run func(ctx context.Context, request files.DownloadRequest)) *MockFilesInterface_Download_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.DownloadRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_Download_Call) Return(_a0 *files.DownloadResponse, _a1 error) *MockFilesInterface_Download_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFilesInterface_Download_Call) RunAndReturn(run func(context.Context, files.DownloadRequest) (*files.DownloadResponse, error)) *MockFilesInterface_Download_Call { - _c.Call.Return(run) - return _c -} - -// DownloadByFilePath provides a mock function with given fields: ctx, filePath -func (_m *MockFilesInterface) DownloadByFilePath(ctx context.Context, filePath string) (*files.DownloadResponse, error) { - ret := _m.Called(ctx, filePath) - - if len(ret) == 0 { - panic("no return value specified for DownloadByFilePath") - } - - var r0 *files.DownloadResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*files.DownloadResponse, error)); ok { - return rf(ctx, filePath) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *files.DownloadResponse); ok { - r0 = rf(ctx, filePath) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.DownloadResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, filePath) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFilesInterface_DownloadByFilePath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DownloadByFilePath' -type MockFilesInterface_DownloadByFilePath_Call struct { - *mock.Call -} - -// DownloadByFilePath is a helper method to define mock.On call -// - ctx context.Context -// - filePath string -func (_e *MockFilesInterface_Expecter) DownloadByFilePath(ctx interface{}, filePath interface{}) *MockFilesInterface_DownloadByFilePath_Call { - return &MockFilesInterface_DownloadByFilePath_Call{Call: _e.mock.On("DownloadByFilePath", ctx, filePath)} -} - -func (_c *MockFilesInterface_DownloadByFilePath_Call) Run(run func(ctx context.Context, filePath string)) *MockFilesInterface_DownloadByFilePath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFilesInterface_DownloadByFilePath_Call) Return(_a0 *files.DownloadResponse, _a1 error) *MockFilesInterface_DownloadByFilePath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFilesInterface_DownloadByFilePath_Call) RunAndReturn(run func(context.Context, string) (*files.DownloadResponse, error)) *MockFilesInterface_DownloadByFilePath_Call { - _c.Call.Return(run) - return _c -} - -// GetDirectoryMetadata provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) GetDirectoryMetadata(ctx context.Context, request files.GetDirectoryMetadataRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetDirectoryMetadata") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.GetDirectoryMetadataRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_GetDirectoryMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDirectoryMetadata' -type MockFilesInterface_GetDirectoryMetadata_Call struct { - *mock.Call -} - -// GetDirectoryMetadata is a helper method to define mock.On call -// - ctx context.Context -// - request files.GetDirectoryMetadataRequest -func (_e *MockFilesInterface_Expecter) GetDirectoryMetadata(ctx interface{}, request interface{}) *MockFilesInterface_GetDirectoryMetadata_Call { - return &MockFilesInterface_GetDirectoryMetadata_Call{Call: _e.mock.On("GetDirectoryMetadata", ctx, request)} -} - -func (_c *MockFilesInterface_GetDirectoryMetadata_Call) Run(run func(ctx context.Context, request files.GetDirectoryMetadataRequest)) *MockFilesInterface_GetDirectoryMetadata_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.GetDirectoryMetadataRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_GetDirectoryMetadata_Call) Return(_a0 error) *MockFilesInterface_GetDirectoryMetadata_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_GetDirectoryMetadata_Call) RunAndReturn(run func(context.Context, files.GetDirectoryMetadataRequest) error) *MockFilesInterface_GetDirectoryMetadata_Call { - _c.Call.Return(run) - return _c -} - -// GetDirectoryMetadataByDirectoryPath provides a mock function with given fields: ctx, directoryPath -func (_m *MockFilesInterface) GetDirectoryMetadataByDirectoryPath(ctx context.Context, directoryPath string) error { - ret := _m.Called(ctx, directoryPath) - - if len(ret) == 0 { - panic("no return value specified for GetDirectoryMetadataByDirectoryPath") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, directoryPath) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDirectoryMetadataByDirectoryPath' -type MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call struct { - *mock.Call -} - -// GetDirectoryMetadataByDirectoryPath is a helper method to define mock.On call -// - ctx context.Context -// - directoryPath string -func (_e *MockFilesInterface_Expecter) GetDirectoryMetadataByDirectoryPath(ctx interface{}, directoryPath interface{}) *MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call { - return &MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call{Call: _e.mock.On("GetDirectoryMetadataByDirectoryPath", ctx, directoryPath)} -} - -func (_c *MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call) Run(run func(ctx context.Context, directoryPath string)) *MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call) Return(_a0 error) *MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call) RunAndReturn(run func(context.Context, string) error) *MockFilesInterface_GetDirectoryMetadataByDirectoryPath_Call { - _c.Call.Return(run) - return _c -} - -// GetMetadata provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) GetMetadata(ctx context.Context, request files.GetMetadataRequest) (*files.GetMetadataResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetMetadata") - } - - var r0 *files.GetMetadataResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, files.GetMetadataRequest) (*files.GetMetadataResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, files.GetMetadataRequest) *files.GetMetadataResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.GetMetadataResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, files.GetMetadataRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFilesInterface_GetMetadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetadata' -type MockFilesInterface_GetMetadata_Call struct { - *mock.Call -} - -// GetMetadata is a helper method to define mock.On call -// - ctx context.Context -// - request files.GetMetadataRequest -func (_e *MockFilesInterface_Expecter) GetMetadata(ctx interface{}, request interface{}) *MockFilesInterface_GetMetadata_Call { - return &MockFilesInterface_GetMetadata_Call{Call: _e.mock.On("GetMetadata", ctx, request)} -} - -func (_c *MockFilesInterface_GetMetadata_Call) Run(run func(ctx context.Context, request files.GetMetadataRequest)) *MockFilesInterface_GetMetadata_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.GetMetadataRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_GetMetadata_Call) Return(_a0 *files.GetMetadataResponse, _a1 error) *MockFilesInterface_GetMetadata_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFilesInterface_GetMetadata_Call) RunAndReturn(run func(context.Context, files.GetMetadataRequest) (*files.GetMetadataResponse, error)) *MockFilesInterface_GetMetadata_Call { - _c.Call.Return(run) - return _c -} - -// GetMetadataByFilePath provides a mock function with given fields: ctx, filePath -func (_m *MockFilesInterface) GetMetadataByFilePath(ctx context.Context, filePath string) (*files.GetMetadataResponse, error) { - ret := _m.Called(ctx, filePath) - - if len(ret) == 0 { - panic("no return value specified for GetMetadataByFilePath") - } - - var r0 *files.GetMetadataResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*files.GetMetadataResponse, error)); ok { - return rf(ctx, filePath) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *files.GetMetadataResponse); ok { - r0 = rf(ctx, filePath) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.GetMetadataResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, filePath) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFilesInterface_GetMetadataByFilePath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetadataByFilePath' -type MockFilesInterface_GetMetadataByFilePath_Call struct { - *mock.Call -} - -// GetMetadataByFilePath is a helper method to define mock.On call -// - ctx context.Context -// - filePath string -func (_e *MockFilesInterface_Expecter) GetMetadataByFilePath(ctx interface{}, filePath interface{}) *MockFilesInterface_GetMetadataByFilePath_Call { - return &MockFilesInterface_GetMetadataByFilePath_Call{Call: _e.mock.On("GetMetadataByFilePath", ctx, filePath)} -} - -func (_c *MockFilesInterface_GetMetadataByFilePath_Call) Run(run func(ctx context.Context, filePath string)) *MockFilesInterface_GetMetadataByFilePath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFilesInterface_GetMetadataByFilePath_Call) Return(_a0 *files.GetMetadataResponse, _a1 error) *MockFilesInterface_GetMetadataByFilePath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFilesInterface_GetMetadataByFilePath_Call) RunAndReturn(run func(context.Context, string) (*files.GetMetadataResponse, error)) *MockFilesInterface_GetMetadataByFilePath_Call { - _c.Call.Return(run) - return _c -} - -// ListDirectoryContents provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) ListDirectoryContents(ctx context.Context, request files.ListDirectoryContentsRequest) listing.Iterator[files.DirectoryEntry] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListDirectoryContents") - } - - var r0 listing.Iterator[files.DirectoryEntry] - if rf, ok := ret.Get(0).(func(context.Context, files.ListDirectoryContentsRequest) listing.Iterator[files.DirectoryEntry]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[files.DirectoryEntry]) - } - } - - return r0 -} - -// MockFilesInterface_ListDirectoryContents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDirectoryContents' -type MockFilesInterface_ListDirectoryContents_Call struct { - *mock.Call -} - -// ListDirectoryContents is a helper method to define mock.On call -// - ctx context.Context -// - request files.ListDirectoryContentsRequest -func (_e *MockFilesInterface_Expecter) ListDirectoryContents(ctx interface{}, request interface{}) *MockFilesInterface_ListDirectoryContents_Call { - return &MockFilesInterface_ListDirectoryContents_Call{Call: _e.mock.On("ListDirectoryContents", ctx, request)} -} - -func (_c *MockFilesInterface_ListDirectoryContents_Call) Run(run func(ctx context.Context, request files.ListDirectoryContentsRequest)) *MockFilesInterface_ListDirectoryContents_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.ListDirectoryContentsRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_ListDirectoryContents_Call) Return(_a0 listing.Iterator[files.DirectoryEntry]) *MockFilesInterface_ListDirectoryContents_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_ListDirectoryContents_Call) RunAndReturn(run func(context.Context, files.ListDirectoryContentsRequest) listing.Iterator[files.DirectoryEntry]) *MockFilesInterface_ListDirectoryContents_Call { - _c.Call.Return(run) - return _c -} - -// ListDirectoryContentsAll provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) ListDirectoryContentsAll(ctx context.Context, request files.ListDirectoryContentsRequest) ([]files.DirectoryEntry, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListDirectoryContentsAll") - } - - var r0 []files.DirectoryEntry - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, files.ListDirectoryContentsRequest) ([]files.DirectoryEntry, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, files.ListDirectoryContentsRequest) []files.DirectoryEntry); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]files.DirectoryEntry) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, files.ListDirectoryContentsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFilesInterface_ListDirectoryContentsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDirectoryContentsAll' -type MockFilesInterface_ListDirectoryContentsAll_Call struct { - *mock.Call -} - -// ListDirectoryContentsAll is a helper method to define mock.On call -// - ctx context.Context -// - request files.ListDirectoryContentsRequest -func (_e *MockFilesInterface_Expecter) ListDirectoryContentsAll(ctx interface{}, request interface{}) *MockFilesInterface_ListDirectoryContentsAll_Call { - return &MockFilesInterface_ListDirectoryContentsAll_Call{Call: _e.mock.On("ListDirectoryContentsAll", ctx, request)} -} - -func (_c *MockFilesInterface_ListDirectoryContentsAll_Call) Run(run func(ctx context.Context, request files.ListDirectoryContentsRequest)) *MockFilesInterface_ListDirectoryContentsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.ListDirectoryContentsRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_ListDirectoryContentsAll_Call) Return(_a0 []files.DirectoryEntry, _a1 error) *MockFilesInterface_ListDirectoryContentsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFilesInterface_ListDirectoryContentsAll_Call) RunAndReturn(run func(context.Context, files.ListDirectoryContentsRequest) ([]files.DirectoryEntry, error)) *MockFilesInterface_ListDirectoryContentsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListDirectoryContentsByDirectoryPath provides a mock function with given fields: ctx, directoryPath -func (_m *MockFilesInterface) ListDirectoryContentsByDirectoryPath(ctx context.Context, directoryPath string) (*files.ListDirectoryResponse, error) { - ret := _m.Called(ctx, directoryPath) - - if len(ret) == 0 { - panic("no return value specified for ListDirectoryContentsByDirectoryPath") - } - - var r0 *files.ListDirectoryResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*files.ListDirectoryResponse, error)); ok { - return rf(ctx, directoryPath) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *files.ListDirectoryResponse); ok { - r0 = rf(ctx, directoryPath) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*files.ListDirectoryResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, directoryPath) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDirectoryContentsByDirectoryPath' -type MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call struct { - *mock.Call -} - -// ListDirectoryContentsByDirectoryPath is a helper method to define mock.On call -// - ctx context.Context -// - directoryPath string -func (_e *MockFilesInterface_Expecter) ListDirectoryContentsByDirectoryPath(ctx interface{}, directoryPath interface{}) *MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call { - return &MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call{Call: _e.mock.On("ListDirectoryContentsByDirectoryPath", ctx, directoryPath)} -} - -func (_c *MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call) Run(run func(ctx context.Context, directoryPath string)) *MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call) Return(_a0 *files.ListDirectoryResponse, _a1 error) *MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call) RunAndReturn(run func(context.Context, string) (*files.ListDirectoryResponse, error)) *MockFilesInterface_ListDirectoryContentsByDirectoryPath_Call { - _c.Call.Return(run) - return _c -} - -// Upload provides a mock function with given fields: ctx, request -func (_m *MockFilesInterface) Upload(ctx context.Context, request files.UploadRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Upload") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, files.UploadRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockFilesInterface_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload' -type MockFilesInterface_Upload_Call struct { - *mock.Call -} - -// Upload is a helper method to define mock.On call -// - ctx context.Context -// - request files.UploadRequest -func (_e *MockFilesInterface_Expecter) Upload(ctx interface{}, request interface{}) *MockFilesInterface_Upload_Call { - return &MockFilesInterface_Upload_Call{Call: _e.mock.On("Upload", ctx, request)} -} - -func (_c *MockFilesInterface_Upload_Call) Run(run func(ctx context.Context, request files.UploadRequest)) *MockFilesInterface_Upload_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(files.UploadRequest)) - }) - return _c -} - -func (_c *MockFilesInterface_Upload_Call) Return(_a0 error) *MockFilesInterface_Upload_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockFilesInterface_Upload_Call) RunAndReturn(run func(context.Context, files.UploadRequest) error) *MockFilesInterface_Upload_Call { - _c.Call.Return(run) - return _c -} - -// NewMockFilesInterface creates a new instance of MockFilesInterface. 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 NewMockFilesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockFilesInterface { - mock := &MockFilesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_account_access_control_interface.go b/experimental/mocks/service/iam/mock_account_access_control_interface.go deleted file mode 100644 index e5e7dbbba..000000000 --- a/experimental/mocks/service/iam/mock_account_access_control_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - iam "github.com/databricks/databricks-sdk-go/service/iam" - mock "github.com/stretchr/testify/mock" -) - -// MockAccountAccessControlInterface is an autogenerated mock type for the AccountAccessControlInterface type -type MockAccountAccessControlInterface struct { - mock.Mock -} - -type MockAccountAccessControlInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountAccessControlInterface) EXPECT() *MockAccountAccessControlInterface_Expecter { - return &MockAccountAccessControlInterface_Expecter{mock: &_m.Mock} -} - -// GetAssignableRolesForResource provides a mock function with given fields: ctx, request -func (_m *MockAccountAccessControlInterface) GetAssignableRolesForResource(ctx context.Context, request iam.GetAssignableRolesForResourceRequest) (*iam.GetAssignableRolesForResourceResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetAssignableRolesForResource") - } - - var r0 *iam.GetAssignableRolesForResourceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAssignableRolesForResourceRequest) (*iam.GetAssignableRolesForResourceResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAssignableRolesForResourceRequest) *iam.GetAssignableRolesForResourceResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.GetAssignableRolesForResourceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetAssignableRolesForResourceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountAccessControlInterface_GetAssignableRolesForResource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAssignableRolesForResource' -type MockAccountAccessControlInterface_GetAssignableRolesForResource_Call struct { - *mock.Call -} - -// GetAssignableRolesForResource is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetAssignableRolesForResourceRequest -func (_e *MockAccountAccessControlInterface_Expecter) GetAssignableRolesForResource(ctx interface{}, request interface{}) *MockAccountAccessControlInterface_GetAssignableRolesForResource_Call { - return &MockAccountAccessControlInterface_GetAssignableRolesForResource_Call{Call: _e.mock.On("GetAssignableRolesForResource", ctx, request)} -} - -func (_c *MockAccountAccessControlInterface_GetAssignableRolesForResource_Call) Run(run func(ctx context.Context, request iam.GetAssignableRolesForResourceRequest)) *MockAccountAccessControlInterface_GetAssignableRolesForResource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetAssignableRolesForResourceRequest)) - }) - return _c -} - -func (_c *MockAccountAccessControlInterface_GetAssignableRolesForResource_Call) Return(_a0 *iam.GetAssignableRolesForResourceResponse, _a1 error) *MockAccountAccessControlInterface_GetAssignableRolesForResource_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountAccessControlInterface_GetAssignableRolesForResource_Call) RunAndReturn(run func(context.Context, iam.GetAssignableRolesForResourceRequest) (*iam.GetAssignableRolesForResourceResponse, error)) *MockAccountAccessControlInterface_GetAssignableRolesForResource_Call { - _c.Call.Return(run) - return _c -} - -// GetRuleSet provides a mock function with given fields: ctx, request -func (_m *MockAccountAccessControlInterface) GetRuleSet(ctx context.Context, request iam.GetRuleSetRequest) (*iam.RuleSetResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetRuleSet") - } - - var r0 *iam.RuleSetResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetRuleSetRequest) (*iam.RuleSetResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetRuleSetRequest) *iam.RuleSetResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.RuleSetResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetRuleSetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountAccessControlInterface_GetRuleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRuleSet' -type MockAccountAccessControlInterface_GetRuleSet_Call struct { - *mock.Call -} - -// GetRuleSet is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetRuleSetRequest -func (_e *MockAccountAccessControlInterface_Expecter) GetRuleSet(ctx interface{}, request interface{}) *MockAccountAccessControlInterface_GetRuleSet_Call { - return &MockAccountAccessControlInterface_GetRuleSet_Call{Call: _e.mock.On("GetRuleSet", ctx, request)} -} - -func (_c *MockAccountAccessControlInterface_GetRuleSet_Call) Run(run func(ctx context.Context, request iam.GetRuleSetRequest)) *MockAccountAccessControlInterface_GetRuleSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetRuleSetRequest)) - }) - return _c -} - -func (_c *MockAccountAccessControlInterface_GetRuleSet_Call) Return(_a0 *iam.RuleSetResponse, _a1 error) *MockAccountAccessControlInterface_GetRuleSet_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountAccessControlInterface_GetRuleSet_Call) RunAndReturn(run func(context.Context, iam.GetRuleSetRequest) (*iam.RuleSetResponse, error)) *MockAccountAccessControlInterface_GetRuleSet_Call { - _c.Call.Return(run) - return _c -} - -// UpdateRuleSet provides a mock function with given fields: ctx, request -func (_m *MockAccountAccessControlInterface) UpdateRuleSet(ctx context.Context, request iam.UpdateRuleSetRequest) (*iam.RuleSetResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateRuleSet") - } - - var r0 *iam.RuleSetResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.UpdateRuleSetRequest) (*iam.RuleSetResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.UpdateRuleSetRequest) *iam.RuleSetResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.RuleSetResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.UpdateRuleSetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountAccessControlInterface_UpdateRuleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRuleSet' -type MockAccountAccessControlInterface_UpdateRuleSet_Call struct { - *mock.Call -} - -// UpdateRuleSet is a helper method to define mock.On call -// - ctx context.Context -// - request iam.UpdateRuleSetRequest -func (_e *MockAccountAccessControlInterface_Expecter) UpdateRuleSet(ctx interface{}, request interface{}) *MockAccountAccessControlInterface_UpdateRuleSet_Call { - return &MockAccountAccessControlInterface_UpdateRuleSet_Call{Call: _e.mock.On("UpdateRuleSet", ctx, request)} -} - -func (_c *MockAccountAccessControlInterface_UpdateRuleSet_Call) Run(run func(ctx context.Context, request iam.UpdateRuleSetRequest)) *MockAccountAccessControlInterface_UpdateRuleSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.UpdateRuleSetRequest)) - }) - return _c -} - -func (_c *MockAccountAccessControlInterface_UpdateRuleSet_Call) Return(_a0 *iam.RuleSetResponse, _a1 error) *MockAccountAccessControlInterface_UpdateRuleSet_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountAccessControlInterface_UpdateRuleSet_Call) RunAndReturn(run func(context.Context, iam.UpdateRuleSetRequest) (*iam.RuleSetResponse, error)) *MockAccountAccessControlInterface_UpdateRuleSet_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountAccessControlInterface creates a new instance of MockAccountAccessControlInterface. 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 NewMockAccountAccessControlInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountAccessControlInterface { - mock := &MockAccountAccessControlInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_account_access_control_proxy_interface.go b/experimental/mocks/service/iam/mock_account_access_control_proxy_interface.go deleted file mode 100644 index 10fd30a6f..000000000 --- a/experimental/mocks/service/iam/mock_account_access_control_proxy_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - iam "github.com/databricks/databricks-sdk-go/service/iam" - mock "github.com/stretchr/testify/mock" -) - -// MockAccountAccessControlProxyInterface is an autogenerated mock type for the AccountAccessControlProxyInterface type -type MockAccountAccessControlProxyInterface struct { - mock.Mock -} - -type MockAccountAccessControlProxyInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountAccessControlProxyInterface) EXPECT() *MockAccountAccessControlProxyInterface_Expecter { - return &MockAccountAccessControlProxyInterface_Expecter{mock: &_m.Mock} -} - -// GetAssignableRolesForResource provides a mock function with given fields: ctx, request -func (_m *MockAccountAccessControlProxyInterface) GetAssignableRolesForResource(ctx context.Context, request iam.GetAssignableRolesForResourceRequest) (*iam.GetAssignableRolesForResourceResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetAssignableRolesForResource") - } - - var r0 *iam.GetAssignableRolesForResourceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAssignableRolesForResourceRequest) (*iam.GetAssignableRolesForResourceResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAssignableRolesForResourceRequest) *iam.GetAssignableRolesForResourceResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.GetAssignableRolesForResourceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetAssignableRolesForResourceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAssignableRolesForResource' -type MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call struct { - *mock.Call -} - -// GetAssignableRolesForResource is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetAssignableRolesForResourceRequest -func (_e *MockAccountAccessControlProxyInterface_Expecter) GetAssignableRolesForResource(ctx interface{}, request interface{}) *MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call { - return &MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call{Call: _e.mock.On("GetAssignableRolesForResource", ctx, request)} -} - -func (_c *MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call) Run(run func(ctx context.Context, request iam.GetAssignableRolesForResourceRequest)) *MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetAssignableRolesForResourceRequest)) - }) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call) Return(_a0 *iam.GetAssignableRolesForResourceResponse, _a1 error) *MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call) RunAndReturn(run func(context.Context, iam.GetAssignableRolesForResourceRequest) (*iam.GetAssignableRolesForResourceResponse, error)) *MockAccountAccessControlProxyInterface_GetAssignableRolesForResource_Call { - _c.Call.Return(run) - return _c -} - -// GetRuleSet provides a mock function with given fields: ctx, request -func (_m *MockAccountAccessControlProxyInterface) GetRuleSet(ctx context.Context, request iam.GetRuleSetRequest) (*iam.RuleSetResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetRuleSet") - } - - var r0 *iam.RuleSetResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetRuleSetRequest) (*iam.RuleSetResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetRuleSetRequest) *iam.RuleSetResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.RuleSetResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetRuleSetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountAccessControlProxyInterface_GetRuleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRuleSet' -type MockAccountAccessControlProxyInterface_GetRuleSet_Call struct { - *mock.Call -} - -// GetRuleSet is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetRuleSetRequest -func (_e *MockAccountAccessControlProxyInterface_Expecter) GetRuleSet(ctx interface{}, request interface{}) *MockAccountAccessControlProxyInterface_GetRuleSet_Call { - return &MockAccountAccessControlProxyInterface_GetRuleSet_Call{Call: _e.mock.On("GetRuleSet", ctx, request)} -} - -func (_c *MockAccountAccessControlProxyInterface_GetRuleSet_Call) Run(run func(ctx context.Context, request iam.GetRuleSetRequest)) *MockAccountAccessControlProxyInterface_GetRuleSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetRuleSetRequest)) - }) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_GetRuleSet_Call) Return(_a0 *iam.RuleSetResponse, _a1 error) *MockAccountAccessControlProxyInterface_GetRuleSet_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_GetRuleSet_Call) RunAndReturn(run func(context.Context, iam.GetRuleSetRequest) (*iam.RuleSetResponse, error)) *MockAccountAccessControlProxyInterface_GetRuleSet_Call { - _c.Call.Return(run) - return _c -} - -// UpdateRuleSet provides a mock function with given fields: ctx, request -func (_m *MockAccountAccessControlProxyInterface) UpdateRuleSet(ctx context.Context, request iam.UpdateRuleSetRequest) (*iam.RuleSetResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateRuleSet") - } - - var r0 *iam.RuleSetResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.UpdateRuleSetRequest) (*iam.RuleSetResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.UpdateRuleSetRequest) *iam.RuleSetResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.RuleSetResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.UpdateRuleSetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountAccessControlProxyInterface_UpdateRuleSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRuleSet' -type MockAccountAccessControlProxyInterface_UpdateRuleSet_Call struct { - *mock.Call -} - -// UpdateRuleSet is a helper method to define mock.On call -// - ctx context.Context -// - request iam.UpdateRuleSetRequest -func (_e *MockAccountAccessControlProxyInterface_Expecter) UpdateRuleSet(ctx interface{}, request interface{}) *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call { - return &MockAccountAccessControlProxyInterface_UpdateRuleSet_Call{Call: _e.mock.On("UpdateRuleSet", ctx, request)} -} - -func (_c *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call) Run(run func(ctx context.Context, request iam.UpdateRuleSetRequest)) *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.UpdateRuleSetRequest)) - }) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call) Return(_a0 *iam.RuleSetResponse, _a1 error) *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call) RunAndReturn(run func(context.Context, iam.UpdateRuleSetRequest) (*iam.RuleSetResponse, error)) *MockAccountAccessControlProxyInterface_UpdateRuleSet_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountAccessControlProxyInterface creates a new instance of MockAccountAccessControlProxyInterface. 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 NewMockAccountAccessControlProxyInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountAccessControlProxyInterface { - mock := &MockAccountAccessControlProxyInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_account_groups_interface.go b/experimental/mocks/service/iam/mock_account_groups_interface.go deleted file mode 100644 index fc79085f2..000000000 --- a/experimental/mocks/service/iam/mock_account_groups_interface.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - iam "github.com/databricks/databricks-sdk-go/service/iam" - - mock "github.com/stretchr/testify/mock" -) - -// MockAccountGroupsInterface is an autogenerated mock type for the AccountGroupsInterface type -type MockAccountGroupsInterface struct { - mock.Mock -} - -type MockAccountGroupsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountGroupsInterface) EXPECT() *MockAccountGroupsInterface_Expecter { - return &MockAccountGroupsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) Create(ctx context.Context, request iam.Group) (*iam.Group, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.Group) (*iam.Group, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.Group) *iam.Group); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.Group) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountGroupsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountGroupsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request iam.Group -func (_e *MockAccountGroupsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountGroupsInterface_Create_Call { - return &MockAccountGroupsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_Create_Call) Run(run func(ctx context.Context, request iam.Group)) *MockAccountGroupsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.Group)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_Create_Call) Return(_a0 *iam.Group, _a1 error) *MockAccountGroupsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountGroupsInterface_Create_Call) RunAndReturn(run func(context.Context, iam.Group) (*iam.Group, error)) *MockAccountGroupsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) Delete(ctx context.Context, request iam.DeleteAccountGroupRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.DeleteAccountGroupRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountGroupsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountGroupsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request iam.DeleteAccountGroupRequest -func (_e *MockAccountGroupsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountGroupsInterface_Delete_Call { - return &MockAccountGroupsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_Delete_Call) Run(run func(ctx context.Context, request iam.DeleteAccountGroupRequest)) *MockAccountGroupsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.DeleteAccountGroupRequest)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_Delete_Call) Return(_a0 error) *MockAccountGroupsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountGroupsInterface_Delete_Call) RunAndReturn(run func(context.Context, iam.DeleteAccountGroupRequest) error) *MockAccountGroupsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockAccountGroupsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountGroupsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockAccountGroupsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAccountGroupsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockAccountGroupsInterface_DeleteById_Call { - return &MockAccountGroupsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockAccountGroupsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockAccountGroupsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_DeleteById_Call) Return(_a0 error) *MockAccountGroupsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountGroupsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockAccountGroupsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) Get(ctx context.Context, request iam.GetAccountGroupRequest) (*iam.Group, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAccountGroupRequest) (*iam.Group, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAccountGroupRequest) *iam.Group); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetAccountGroupRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountGroupsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountGroupsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetAccountGroupRequest -func (_e *MockAccountGroupsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountGroupsInterface_Get_Call { - return &MockAccountGroupsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetAccountGroupRequest)) *MockAccountGroupsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetAccountGroupRequest)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_Get_Call) Return(_a0 *iam.Group, _a1 error) *MockAccountGroupsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountGroupsInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetAccountGroupRequest) (*iam.Group, error)) *MockAccountGroupsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDisplayName provides a mock function with given fields: ctx, name -func (_m *MockAccountGroupsInterface) GetByDisplayName(ctx context.Context, name string) (*iam.Group, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByDisplayName") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.Group, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.Group); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountGroupsInterface_GetByDisplayName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDisplayName' -type MockAccountGroupsInterface_GetByDisplayName_Call struct { - *mock.Call -} - -// GetByDisplayName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAccountGroupsInterface_Expecter) GetByDisplayName(ctx interface{}, name interface{}) *MockAccountGroupsInterface_GetByDisplayName_Call { - return &MockAccountGroupsInterface_GetByDisplayName_Call{Call: _e.mock.On("GetByDisplayName", ctx, name)} -} - -func (_c *MockAccountGroupsInterface_GetByDisplayName_Call) Run(run func(ctx context.Context, name string)) *MockAccountGroupsInterface_GetByDisplayName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_GetByDisplayName_Call) Return(_a0 *iam.Group, _a1 error) *MockAccountGroupsInterface_GetByDisplayName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountGroupsInterface_GetByDisplayName_Call) RunAndReturn(run func(context.Context, string) (*iam.Group, error)) *MockAccountGroupsInterface_GetByDisplayName_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockAccountGroupsInterface) GetById(ctx context.Context, id string) (*iam.Group, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.Group, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.Group); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountGroupsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockAccountGroupsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAccountGroupsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockAccountGroupsInterface_GetById_Call { - return &MockAccountGroupsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockAccountGroupsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockAccountGroupsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_GetById_Call) Return(_a0 *iam.Group, _a1 error) *MockAccountGroupsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountGroupsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*iam.Group, error)) *MockAccountGroupsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GroupDisplayNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) GroupDisplayNameToIdMap(ctx context.Context, request iam.ListAccountGroupsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GroupDisplayNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountGroupsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountGroupsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListAccountGroupsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GroupDisplayNameToIdMap' -type MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call struct { - *mock.Call -} - -// GroupDisplayNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountGroupsRequest -func (_e *MockAccountGroupsInterface_Expecter) GroupDisplayNameToIdMap(ctx interface{}, request interface{}) *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call { - return &MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call{Call: _e.mock.On("GroupDisplayNameToIdMap", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call) Run(run func(ctx context.Context, request iam.ListAccountGroupsRequest)) *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountGroupsRequest)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call) RunAndReturn(run func(context.Context, iam.ListAccountGroupsRequest) (map[string]string, error)) *MockAccountGroupsInterface_GroupDisplayNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) List(ctx context.Context, request iam.ListAccountGroupsRequest) listing.Iterator[iam.Group] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[iam.Group] - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountGroupsRequest) listing.Iterator[iam.Group]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[iam.Group]) - } - } - - return r0 -} - -// MockAccountGroupsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountGroupsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountGroupsRequest -func (_e *MockAccountGroupsInterface_Expecter) List(ctx interface{}, request interface{}) *MockAccountGroupsInterface_List_Call { - return &MockAccountGroupsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_List_Call) Run(run func(ctx context.Context, request iam.ListAccountGroupsRequest)) *MockAccountGroupsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountGroupsRequest)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_List_Call) Return(_a0 listing.Iterator[iam.Group]) *MockAccountGroupsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountGroupsInterface_List_Call) RunAndReturn(run func(context.Context, iam.ListAccountGroupsRequest) listing.Iterator[iam.Group]) *MockAccountGroupsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) ListAll(ctx context.Context, request iam.ListAccountGroupsRequest) ([]iam.Group, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountGroupsRequest) ([]iam.Group, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountGroupsRequest) []iam.Group); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListAccountGroupsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountGroupsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountGroupsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountGroupsRequest -func (_e *MockAccountGroupsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAccountGroupsInterface_ListAll_Call { - return &MockAccountGroupsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_ListAll_Call) Run(run func(ctx context.Context, request iam.ListAccountGroupsRequest)) *MockAccountGroupsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountGroupsRequest)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_ListAll_Call) Return(_a0 []iam.Group, _a1 error) *MockAccountGroupsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountGroupsInterface_ListAll_Call) RunAndReturn(run func(context.Context, iam.ListAccountGroupsRequest) ([]iam.Group, error)) *MockAccountGroupsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) Patch(ctx context.Context, request iam.PartialUpdate) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PartialUpdate) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountGroupsInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type MockAccountGroupsInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PartialUpdate -func (_e *MockAccountGroupsInterface_Expecter) Patch(ctx interface{}, request interface{}) *MockAccountGroupsInterface_Patch_Call { - return &MockAccountGroupsInterface_Patch_Call{Call: _e.mock.On("Patch", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_Patch_Call) Run(run func(ctx context.Context, request iam.PartialUpdate)) *MockAccountGroupsInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PartialUpdate)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_Patch_Call) Return(_a0 error) *MockAccountGroupsInterface_Patch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountGroupsInterface_Patch_Call) RunAndReturn(run func(context.Context, iam.PartialUpdate) error) *MockAccountGroupsInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountGroupsInterface) Update(ctx context.Context, request iam.Group) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.Group) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountGroupsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountGroupsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.Group -func (_e *MockAccountGroupsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountGroupsInterface_Update_Call { - return &MockAccountGroupsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountGroupsInterface_Update_Call) Run(run func(ctx context.Context, request iam.Group)) *MockAccountGroupsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.Group)) - }) - return _c -} - -func (_c *MockAccountGroupsInterface_Update_Call) Return(_a0 error) *MockAccountGroupsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountGroupsInterface_Update_Call) RunAndReturn(run func(context.Context, iam.Group) error) *MockAccountGroupsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountGroupsInterface creates a new instance of MockAccountGroupsInterface. 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 NewMockAccountGroupsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountGroupsInterface { - mock := &MockAccountGroupsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_account_service_principals_interface.go b/experimental/mocks/service/iam/mock_account_service_principals_interface.go deleted file mode 100644 index 3f4eebb3b..000000000 --- a/experimental/mocks/service/iam/mock_account_service_principals_interface.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - iam "github.com/databricks/databricks-sdk-go/service/iam" - - mock "github.com/stretchr/testify/mock" -) - -// MockAccountServicePrincipalsInterface is an autogenerated mock type for the AccountServicePrincipalsInterface type -type MockAccountServicePrincipalsInterface struct { - mock.Mock -} - -type MockAccountServicePrincipalsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountServicePrincipalsInterface) EXPECT() *MockAccountServicePrincipalsInterface_Expecter { - return &MockAccountServicePrincipalsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) Create(ctx context.Context, request iam.ServicePrincipal) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ServicePrincipal) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ServicePrincipal) *iam.ServicePrincipal); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ServicePrincipal) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountServicePrincipalsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountServicePrincipalsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ServicePrincipal -func (_e *MockAccountServicePrincipalsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_Create_Call { - return &MockAccountServicePrincipalsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_Create_Call) Run(run func(ctx context.Context, request iam.ServicePrincipal)) *MockAccountServicePrincipalsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ServicePrincipal)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Create_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockAccountServicePrincipalsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Create_Call) RunAndReturn(run func(context.Context, iam.ServicePrincipal) (*iam.ServicePrincipal, error)) *MockAccountServicePrincipalsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) Delete(ctx context.Context, request iam.DeleteAccountServicePrincipalRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.DeleteAccountServicePrincipalRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountServicePrincipalsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountServicePrincipalsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request iam.DeleteAccountServicePrincipalRequest -func (_e *MockAccountServicePrincipalsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_Delete_Call { - return &MockAccountServicePrincipalsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_Delete_Call) Run(run func(ctx context.Context, request iam.DeleteAccountServicePrincipalRequest)) *MockAccountServicePrincipalsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.DeleteAccountServicePrincipalRequest)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Delete_Call) Return(_a0 error) *MockAccountServicePrincipalsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Delete_Call) RunAndReturn(run func(context.Context, iam.DeleteAccountServicePrincipalRequest) error) *MockAccountServicePrincipalsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockAccountServicePrincipalsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountServicePrincipalsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockAccountServicePrincipalsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAccountServicePrincipalsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockAccountServicePrincipalsInterface_DeleteById_Call { - return &MockAccountServicePrincipalsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockAccountServicePrincipalsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockAccountServicePrincipalsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_DeleteById_Call) Return(_a0 error) *MockAccountServicePrincipalsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockAccountServicePrincipalsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) Get(ctx context.Context, request iam.GetAccountServicePrincipalRequest) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAccountServicePrincipalRequest) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAccountServicePrincipalRequest) *iam.ServicePrincipal); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetAccountServicePrincipalRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountServicePrincipalsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountServicePrincipalsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetAccountServicePrincipalRequest -func (_e *MockAccountServicePrincipalsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_Get_Call { - return &MockAccountServicePrincipalsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetAccountServicePrincipalRequest)) *MockAccountServicePrincipalsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetAccountServicePrincipalRequest)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Get_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockAccountServicePrincipalsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetAccountServicePrincipalRequest) (*iam.ServicePrincipal, error)) *MockAccountServicePrincipalsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDisplayName provides a mock function with given fields: ctx, name -func (_m *MockAccountServicePrincipalsInterface) GetByDisplayName(ctx context.Context, name string) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByDisplayName") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.ServicePrincipal); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountServicePrincipalsInterface_GetByDisplayName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDisplayName' -type MockAccountServicePrincipalsInterface_GetByDisplayName_Call struct { - *mock.Call -} - -// GetByDisplayName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAccountServicePrincipalsInterface_Expecter) GetByDisplayName(ctx interface{}, name interface{}) *MockAccountServicePrincipalsInterface_GetByDisplayName_Call { - return &MockAccountServicePrincipalsInterface_GetByDisplayName_Call{Call: _e.mock.On("GetByDisplayName", ctx, name)} -} - -func (_c *MockAccountServicePrincipalsInterface_GetByDisplayName_Call) Run(run func(ctx context.Context, name string)) *MockAccountServicePrincipalsInterface_GetByDisplayName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_GetByDisplayName_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockAccountServicePrincipalsInterface_GetByDisplayName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_GetByDisplayName_Call) RunAndReturn(run func(context.Context, string) (*iam.ServicePrincipal, error)) *MockAccountServicePrincipalsInterface_GetByDisplayName_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockAccountServicePrincipalsInterface) GetById(ctx context.Context, id string) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.ServicePrincipal); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountServicePrincipalsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockAccountServicePrincipalsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAccountServicePrincipalsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockAccountServicePrincipalsInterface_GetById_Call { - return &MockAccountServicePrincipalsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockAccountServicePrincipalsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockAccountServicePrincipalsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_GetById_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockAccountServicePrincipalsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*iam.ServicePrincipal, error)) *MockAccountServicePrincipalsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) List(ctx context.Context, request iam.ListAccountServicePrincipalsRequest) listing.Iterator[iam.ServicePrincipal] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[iam.ServicePrincipal] - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountServicePrincipalsRequest) listing.Iterator[iam.ServicePrincipal]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[iam.ServicePrincipal]) - } - } - - return r0 -} - -// MockAccountServicePrincipalsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountServicePrincipalsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountServicePrincipalsRequest -func (_e *MockAccountServicePrincipalsInterface_Expecter) List(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_List_Call { - return &MockAccountServicePrincipalsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_List_Call) Run(run func(ctx context.Context, request iam.ListAccountServicePrincipalsRequest)) *MockAccountServicePrincipalsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountServicePrincipalsRequest)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_List_Call) Return(_a0 listing.Iterator[iam.ServicePrincipal]) *MockAccountServicePrincipalsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_List_Call) RunAndReturn(run func(context.Context, iam.ListAccountServicePrincipalsRequest) listing.Iterator[iam.ServicePrincipal]) *MockAccountServicePrincipalsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) ListAll(ctx context.Context, request iam.ListAccountServicePrincipalsRequest) ([]iam.ServicePrincipal, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountServicePrincipalsRequest) ([]iam.ServicePrincipal, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountServicePrincipalsRequest) []iam.ServicePrincipal); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListAccountServicePrincipalsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountServicePrincipalsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountServicePrincipalsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountServicePrincipalsRequest -func (_e *MockAccountServicePrincipalsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_ListAll_Call { - return &MockAccountServicePrincipalsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_ListAll_Call) Run(run func(ctx context.Context, request iam.ListAccountServicePrincipalsRequest)) *MockAccountServicePrincipalsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountServicePrincipalsRequest)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_ListAll_Call) Return(_a0 []iam.ServicePrincipal, _a1 error) *MockAccountServicePrincipalsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_ListAll_Call) RunAndReturn(run func(context.Context, iam.ListAccountServicePrincipalsRequest) ([]iam.ServicePrincipal, error)) *MockAccountServicePrincipalsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) Patch(ctx context.Context, request iam.PartialUpdate) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PartialUpdate) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountServicePrincipalsInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type MockAccountServicePrincipalsInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PartialUpdate -func (_e *MockAccountServicePrincipalsInterface_Expecter) Patch(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_Patch_Call { - return &MockAccountServicePrincipalsInterface_Patch_Call{Call: _e.mock.On("Patch", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_Patch_Call) Run(run func(ctx context.Context, request iam.PartialUpdate)) *MockAccountServicePrincipalsInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PartialUpdate)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Patch_Call) Return(_a0 error) *MockAccountServicePrincipalsInterface_Patch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Patch_Call) RunAndReturn(run func(context.Context, iam.PartialUpdate) error) *MockAccountServicePrincipalsInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// ServicePrincipalDisplayNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) ServicePrincipalDisplayNameToIdMap(ctx context.Context, request iam.ListAccountServicePrincipalsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ServicePrincipalDisplayNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountServicePrincipalsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountServicePrincipalsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListAccountServicePrincipalsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ServicePrincipalDisplayNameToIdMap' -type MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call struct { - *mock.Call -} - -// ServicePrincipalDisplayNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountServicePrincipalsRequest -func (_e *MockAccountServicePrincipalsInterface_Expecter) ServicePrincipalDisplayNameToIdMap(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - return &MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call{Call: _e.mock.On("ServicePrincipalDisplayNameToIdMap", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call) Run(run func(ctx context.Context, request iam.ListAccountServicePrincipalsRequest)) *MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountServicePrincipalsRequest)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call) RunAndReturn(run func(context.Context, iam.ListAccountServicePrincipalsRequest) (map[string]string, error)) *MockAccountServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountServicePrincipalsInterface) Update(ctx context.Context, request iam.ServicePrincipal) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ServicePrincipal) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountServicePrincipalsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountServicePrincipalsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ServicePrincipal -func (_e *MockAccountServicePrincipalsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountServicePrincipalsInterface_Update_Call { - return &MockAccountServicePrincipalsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountServicePrincipalsInterface_Update_Call) Run(run func(ctx context.Context, request iam.ServicePrincipal)) *MockAccountServicePrincipalsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ServicePrincipal)) - }) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Update_Call) Return(_a0 error) *MockAccountServicePrincipalsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountServicePrincipalsInterface_Update_Call) RunAndReturn(run func(context.Context, iam.ServicePrincipal) error) *MockAccountServicePrincipalsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountServicePrincipalsInterface creates a new instance of MockAccountServicePrincipalsInterface. 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 NewMockAccountServicePrincipalsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountServicePrincipalsInterface { - mock := &MockAccountServicePrincipalsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_account_users_interface.go b/experimental/mocks/service/iam/mock_account_users_interface.go deleted file mode 100644 index dec7252ee..000000000 --- a/experimental/mocks/service/iam/mock_account_users_interface.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - iam "github.com/databricks/databricks-sdk-go/service/iam" - - mock "github.com/stretchr/testify/mock" -) - -// MockAccountUsersInterface is an autogenerated mock type for the AccountUsersInterface type -type MockAccountUsersInterface struct { - mock.Mock -} - -type MockAccountUsersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountUsersInterface) EXPECT() *MockAccountUsersInterface_Expecter { - return &MockAccountUsersInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) Create(ctx context.Context, request iam.User) (*iam.User, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.User) (*iam.User, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.User) *iam.User); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.User) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountUsersInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountUsersInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request iam.User -func (_e *MockAccountUsersInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountUsersInterface_Create_Call { - return &MockAccountUsersInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountUsersInterface_Create_Call) Run(run func(ctx context.Context, request iam.User)) *MockAccountUsersInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.User)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_Create_Call) Return(_a0 *iam.User, _a1 error) *MockAccountUsersInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountUsersInterface_Create_Call) RunAndReturn(run func(context.Context, iam.User) (*iam.User, error)) *MockAccountUsersInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) Delete(ctx context.Context, request iam.DeleteAccountUserRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.DeleteAccountUserRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountUsersInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountUsersInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request iam.DeleteAccountUserRequest -func (_e *MockAccountUsersInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountUsersInterface_Delete_Call { - return &MockAccountUsersInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountUsersInterface_Delete_Call) Run(run func(ctx context.Context, request iam.DeleteAccountUserRequest)) *MockAccountUsersInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.DeleteAccountUserRequest)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_Delete_Call) Return(_a0 error) *MockAccountUsersInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountUsersInterface_Delete_Call) RunAndReturn(run func(context.Context, iam.DeleteAccountUserRequest) error) *MockAccountUsersInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockAccountUsersInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountUsersInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockAccountUsersInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAccountUsersInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockAccountUsersInterface_DeleteById_Call { - return &MockAccountUsersInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockAccountUsersInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockAccountUsersInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_DeleteById_Call) Return(_a0 error) *MockAccountUsersInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountUsersInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockAccountUsersInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) Get(ctx context.Context, request iam.GetAccountUserRequest) (*iam.User, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAccountUserRequest) (*iam.User, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetAccountUserRequest) *iam.User); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetAccountUserRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountUsersInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountUsersInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetAccountUserRequest -func (_e *MockAccountUsersInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountUsersInterface_Get_Call { - return &MockAccountUsersInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountUsersInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetAccountUserRequest)) *MockAccountUsersInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetAccountUserRequest)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_Get_Call) Return(_a0 *iam.User, _a1 error) *MockAccountUsersInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountUsersInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetAccountUserRequest) (*iam.User, error)) *MockAccountUsersInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockAccountUsersInterface) GetById(ctx context.Context, id string) (*iam.User, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.User, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.User); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountUsersInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockAccountUsersInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAccountUsersInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockAccountUsersInterface_GetById_Call { - return &MockAccountUsersInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockAccountUsersInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockAccountUsersInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_GetById_Call) Return(_a0 *iam.User, _a1 error) *MockAccountUsersInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountUsersInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*iam.User, error)) *MockAccountUsersInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetByUserName provides a mock function with given fields: ctx, name -func (_m *MockAccountUsersInterface) GetByUserName(ctx context.Context, name string) (*iam.User, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByUserName") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.User, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.User); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountUsersInterface_GetByUserName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByUserName' -type MockAccountUsersInterface_GetByUserName_Call struct { - *mock.Call -} - -// GetByUserName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAccountUsersInterface_Expecter) GetByUserName(ctx interface{}, name interface{}) *MockAccountUsersInterface_GetByUserName_Call { - return &MockAccountUsersInterface_GetByUserName_Call{Call: _e.mock.On("GetByUserName", ctx, name)} -} - -func (_c *MockAccountUsersInterface_GetByUserName_Call) Run(run func(ctx context.Context, name string)) *MockAccountUsersInterface_GetByUserName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_GetByUserName_Call) Return(_a0 *iam.User, _a1 error) *MockAccountUsersInterface_GetByUserName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountUsersInterface_GetByUserName_Call) RunAndReturn(run func(context.Context, string) (*iam.User, error)) *MockAccountUsersInterface_GetByUserName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) List(ctx context.Context, request iam.ListAccountUsersRequest) listing.Iterator[iam.User] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[iam.User] - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountUsersRequest) listing.Iterator[iam.User]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[iam.User]) - } - } - - return r0 -} - -// MockAccountUsersInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountUsersInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountUsersRequest -func (_e *MockAccountUsersInterface_Expecter) List(ctx interface{}, request interface{}) *MockAccountUsersInterface_List_Call { - return &MockAccountUsersInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAccountUsersInterface_List_Call) Run(run func(ctx context.Context, request iam.ListAccountUsersRequest)) *MockAccountUsersInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountUsersRequest)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_List_Call) Return(_a0 listing.Iterator[iam.User]) *MockAccountUsersInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountUsersInterface_List_Call) RunAndReturn(run func(context.Context, iam.ListAccountUsersRequest) listing.Iterator[iam.User]) *MockAccountUsersInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) ListAll(ctx context.Context, request iam.ListAccountUsersRequest) ([]iam.User, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountUsersRequest) ([]iam.User, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountUsersRequest) []iam.User); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListAccountUsersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountUsersInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountUsersInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountUsersRequest -func (_e *MockAccountUsersInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAccountUsersInterface_ListAll_Call { - return &MockAccountUsersInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAccountUsersInterface_ListAll_Call) Run(run func(ctx context.Context, request iam.ListAccountUsersRequest)) *MockAccountUsersInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountUsersRequest)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_ListAll_Call) Return(_a0 []iam.User, _a1 error) *MockAccountUsersInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountUsersInterface_ListAll_Call) RunAndReturn(run func(context.Context, iam.ListAccountUsersRequest) ([]iam.User, error)) *MockAccountUsersInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) Patch(ctx context.Context, request iam.PartialUpdate) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PartialUpdate) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountUsersInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type MockAccountUsersInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PartialUpdate -func (_e *MockAccountUsersInterface_Expecter) Patch(ctx interface{}, request interface{}) *MockAccountUsersInterface_Patch_Call { - return &MockAccountUsersInterface_Patch_Call{Call: _e.mock.On("Patch", ctx, request)} -} - -func (_c *MockAccountUsersInterface_Patch_Call) Run(run func(ctx context.Context, request iam.PartialUpdate)) *MockAccountUsersInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PartialUpdate)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_Patch_Call) Return(_a0 error) *MockAccountUsersInterface_Patch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountUsersInterface_Patch_Call) RunAndReturn(run func(context.Context, iam.PartialUpdate) error) *MockAccountUsersInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) Update(ctx context.Context, request iam.User) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.User) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountUsersInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountUsersInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.User -func (_e *MockAccountUsersInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountUsersInterface_Update_Call { - return &MockAccountUsersInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountUsersInterface_Update_Call) Run(run func(ctx context.Context, request iam.User)) *MockAccountUsersInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.User)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_Update_Call) Return(_a0 error) *MockAccountUsersInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountUsersInterface_Update_Call) RunAndReturn(run func(context.Context, iam.User) error) *MockAccountUsersInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UserUserNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockAccountUsersInterface) UserUserNameToIdMap(ctx context.Context, request iam.ListAccountUsersRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UserUserNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountUsersRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListAccountUsersRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListAccountUsersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountUsersInterface_UserUserNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserUserNameToIdMap' -type MockAccountUsersInterface_UserUserNameToIdMap_Call struct { - *mock.Call -} - -// UserUserNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListAccountUsersRequest -func (_e *MockAccountUsersInterface_Expecter) UserUserNameToIdMap(ctx interface{}, request interface{}) *MockAccountUsersInterface_UserUserNameToIdMap_Call { - return &MockAccountUsersInterface_UserUserNameToIdMap_Call{Call: _e.mock.On("UserUserNameToIdMap", ctx, request)} -} - -func (_c *MockAccountUsersInterface_UserUserNameToIdMap_Call) Run(run func(ctx context.Context, request iam.ListAccountUsersRequest)) *MockAccountUsersInterface_UserUserNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListAccountUsersRequest)) - }) - return _c -} - -func (_c *MockAccountUsersInterface_UserUserNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockAccountUsersInterface_UserUserNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountUsersInterface_UserUserNameToIdMap_Call) RunAndReturn(run func(context.Context, iam.ListAccountUsersRequest) (map[string]string, error)) *MockAccountUsersInterface_UserUserNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountUsersInterface creates a new instance of MockAccountUsersInterface. 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 NewMockAccountUsersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountUsersInterface { - mock := &MockAccountUsersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_current_user_interface.go b/experimental/mocks/service/iam/mock_current_user_interface.go deleted file mode 100644 index 6ddcd3fab..000000000 --- a/experimental/mocks/service/iam/mock_current_user_interface.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - iam "github.com/databricks/databricks-sdk-go/service/iam" - mock "github.com/stretchr/testify/mock" -) - -// MockCurrentUserInterface is an autogenerated mock type for the CurrentUserInterface type -type MockCurrentUserInterface struct { - mock.Mock -} - -type MockCurrentUserInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCurrentUserInterface) EXPECT() *MockCurrentUserInterface_Expecter { - return &MockCurrentUserInterface_Expecter{mock: &_m.Mock} -} - -// Me provides a mock function with given fields: ctx -func (_m *MockCurrentUserInterface) Me(ctx context.Context) (*iam.User, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Me") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*iam.User, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *iam.User); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCurrentUserInterface_Me_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Me' -type MockCurrentUserInterface_Me_Call struct { - *mock.Call -} - -// Me is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockCurrentUserInterface_Expecter) Me(ctx interface{}) *MockCurrentUserInterface_Me_Call { - return &MockCurrentUserInterface_Me_Call{Call: _e.mock.On("Me", ctx)} -} - -func (_c *MockCurrentUserInterface_Me_Call) Run(run func(ctx context.Context)) *MockCurrentUserInterface_Me_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockCurrentUserInterface_Me_Call) Return(_a0 *iam.User, _a1 error) *MockCurrentUserInterface_Me_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCurrentUserInterface_Me_Call) RunAndReturn(run func(context.Context) (*iam.User, error)) *MockCurrentUserInterface_Me_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCurrentUserInterface creates a new instance of MockCurrentUserInterface. 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 NewMockCurrentUserInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCurrentUserInterface { - mock := &MockCurrentUserInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_groups_interface.go b/experimental/mocks/service/iam/mock_groups_interface.go deleted file mode 100644 index b86139bce..000000000 --- a/experimental/mocks/service/iam/mock_groups_interface.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - iam "github.com/databricks/databricks-sdk-go/service/iam" - - mock "github.com/stretchr/testify/mock" -) - -// MockGroupsInterface is an autogenerated mock type for the GroupsInterface type -type MockGroupsInterface struct { - mock.Mock -} - -type MockGroupsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockGroupsInterface) EXPECT() *MockGroupsInterface_Expecter { - return &MockGroupsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) Create(ctx context.Context, request iam.Group) (*iam.Group, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.Group) (*iam.Group, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.Group) *iam.Group); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.Group) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGroupsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockGroupsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request iam.Group -func (_e *MockGroupsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockGroupsInterface_Create_Call { - return &MockGroupsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockGroupsInterface_Create_Call) Run(run func(ctx context.Context, request iam.Group)) *MockGroupsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.Group)) - }) - return _c -} - -func (_c *MockGroupsInterface_Create_Call) Return(_a0 *iam.Group, _a1 error) *MockGroupsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGroupsInterface_Create_Call) RunAndReturn(run func(context.Context, iam.Group) (*iam.Group, error)) *MockGroupsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) Delete(ctx context.Context, request iam.DeleteGroupRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.DeleteGroupRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGroupsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockGroupsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request iam.DeleteGroupRequest -func (_e *MockGroupsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockGroupsInterface_Delete_Call { - return &MockGroupsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockGroupsInterface_Delete_Call) Run(run func(ctx context.Context, request iam.DeleteGroupRequest)) *MockGroupsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.DeleteGroupRequest)) - }) - return _c -} - -func (_c *MockGroupsInterface_Delete_Call) Return(_a0 error) *MockGroupsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGroupsInterface_Delete_Call) RunAndReturn(run func(context.Context, iam.DeleteGroupRequest) error) *MockGroupsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockGroupsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGroupsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockGroupsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockGroupsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockGroupsInterface_DeleteById_Call { - return &MockGroupsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockGroupsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockGroupsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockGroupsInterface_DeleteById_Call) Return(_a0 error) *MockGroupsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGroupsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockGroupsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) Get(ctx context.Context, request iam.GetGroupRequest) (*iam.Group, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetGroupRequest) (*iam.Group, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetGroupRequest) *iam.Group); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetGroupRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGroupsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockGroupsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetGroupRequest -func (_e *MockGroupsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockGroupsInterface_Get_Call { - return &MockGroupsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockGroupsInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetGroupRequest)) *MockGroupsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetGroupRequest)) - }) - return _c -} - -func (_c *MockGroupsInterface_Get_Call) Return(_a0 *iam.Group, _a1 error) *MockGroupsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGroupsInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetGroupRequest) (*iam.Group, error)) *MockGroupsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDisplayName provides a mock function with given fields: ctx, name -func (_m *MockGroupsInterface) GetByDisplayName(ctx context.Context, name string) (*iam.Group, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByDisplayName") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.Group, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.Group); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGroupsInterface_GetByDisplayName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDisplayName' -type MockGroupsInterface_GetByDisplayName_Call struct { - *mock.Call -} - -// GetByDisplayName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockGroupsInterface_Expecter) GetByDisplayName(ctx interface{}, name interface{}) *MockGroupsInterface_GetByDisplayName_Call { - return &MockGroupsInterface_GetByDisplayName_Call{Call: _e.mock.On("GetByDisplayName", ctx, name)} -} - -func (_c *MockGroupsInterface_GetByDisplayName_Call) Run(run func(ctx context.Context, name string)) *MockGroupsInterface_GetByDisplayName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockGroupsInterface_GetByDisplayName_Call) Return(_a0 *iam.Group, _a1 error) *MockGroupsInterface_GetByDisplayName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGroupsInterface_GetByDisplayName_Call) RunAndReturn(run func(context.Context, string) (*iam.Group, error)) *MockGroupsInterface_GetByDisplayName_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockGroupsInterface) GetById(ctx context.Context, id string) (*iam.Group, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.Group, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.Group); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGroupsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockGroupsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockGroupsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockGroupsInterface_GetById_Call { - return &MockGroupsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockGroupsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockGroupsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockGroupsInterface_GetById_Call) Return(_a0 *iam.Group, _a1 error) *MockGroupsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGroupsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*iam.Group, error)) *MockGroupsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GroupDisplayNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) GroupDisplayNameToIdMap(ctx context.Context, request iam.ListGroupsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GroupDisplayNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListGroupsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListGroupsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListGroupsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGroupsInterface_GroupDisplayNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GroupDisplayNameToIdMap' -type MockGroupsInterface_GroupDisplayNameToIdMap_Call struct { - *mock.Call -} - -// GroupDisplayNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListGroupsRequest -func (_e *MockGroupsInterface_Expecter) GroupDisplayNameToIdMap(ctx interface{}, request interface{}) *MockGroupsInterface_GroupDisplayNameToIdMap_Call { - return &MockGroupsInterface_GroupDisplayNameToIdMap_Call{Call: _e.mock.On("GroupDisplayNameToIdMap", ctx, request)} -} - -func (_c *MockGroupsInterface_GroupDisplayNameToIdMap_Call) Run(run func(ctx context.Context, request iam.ListGroupsRequest)) *MockGroupsInterface_GroupDisplayNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListGroupsRequest)) - }) - return _c -} - -func (_c *MockGroupsInterface_GroupDisplayNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockGroupsInterface_GroupDisplayNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGroupsInterface_GroupDisplayNameToIdMap_Call) RunAndReturn(run func(context.Context, iam.ListGroupsRequest) (map[string]string, error)) *MockGroupsInterface_GroupDisplayNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) List(ctx context.Context, request iam.ListGroupsRequest) listing.Iterator[iam.Group] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[iam.Group] - if rf, ok := ret.Get(0).(func(context.Context, iam.ListGroupsRequest) listing.Iterator[iam.Group]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[iam.Group]) - } - } - - return r0 -} - -// MockGroupsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockGroupsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListGroupsRequest -func (_e *MockGroupsInterface_Expecter) List(ctx interface{}, request interface{}) *MockGroupsInterface_List_Call { - return &MockGroupsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockGroupsInterface_List_Call) Run(run func(ctx context.Context, request iam.ListGroupsRequest)) *MockGroupsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListGroupsRequest)) - }) - return _c -} - -func (_c *MockGroupsInterface_List_Call) Return(_a0 listing.Iterator[iam.Group]) *MockGroupsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGroupsInterface_List_Call) RunAndReturn(run func(context.Context, iam.ListGroupsRequest) listing.Iterator[iam.Group]) *MockGroupsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) ListAll(ctx context.Context, request iam.ListGroupsRequest) ([]iam.Group, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []iam.Group - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListGroupsRequest) ([]iam.Group, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListGroupsRequest) []iam.Group); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]iam.Group) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListGroupsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGroupsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockGroupsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListGroupsRequest -func (_e *MockGroupsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockGroupsInterface_ListAll_Call { - return &MockGroupsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockGroupsInterface_ListAll_Call) Run(run func(ctx context.Context, request iam.ListGroupsRequest)) *MockGroupsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListGroupsRequest)) - }) - return _c -} - -func (_c *MockGroupsInterface_ListAll_Call) Return(_a0 []iam.Group, _a1 error) *MockGroupsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGroupsInterface_ListAll_Call) RunAndReturn(run func(context.Context, iam.ListGroupsRequest) ([]iam.Group, error)) *MockGroupsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) Patch(ctx context.Context, request iam.PartialUpdate) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PartialUpdate) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGroupsInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type MockGroupsInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PartialUpdate -func (_e *MockGroupsInterface_Expecter) Patch(ctx interface{}, request interface{}) *MockGroupsInterface_Patch_Call { - return &MockGroupsInterface_Patch_Call{Call: _e.mock.On("Patch", ctx, request)} -} - -func (_c *MockGroupsInterface_Patch_Call) Run(run func(ctx context.Context, request iam.PartialUpdate)) *MockGroupsInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PartialUpdate)) - }) - return _c -} - -func (_c *MockGroupsInterface_Patch_Call) Return(_a0 error) *MockGroupsInterface_Patch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGroupsInterface_Patch_Call) RunAndReturn(run func(context.Context, iam.PartialUpdate) error) *MockGroupsInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockGroupsInterface) Update(ctx context.Context, request iam.Group) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.Group) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGroupsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockGroupsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.Group -func (_e *MockGroupsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockGroupsInterface_Update_Call { - return &MockGroupsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockGroupsInterface_Update_Call) Run(run func(ctx context.Context, request iam.Group)) *MockGroupsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.Group)) - }) - return _c -} - -func (_c *MockGroupsInterface_Update_Call) Return(_a0 error) *MockGroupsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGroupsInterface_Update_Call) RunAndReturn(run func(context.Context, iam.Group) error) *MockGroupsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockGroupsInterface creates a new instance of MockGroupsInterface. 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 NewMockGroupsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockGroupsInterface { - mock := &MockGroupsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_permission_migration_interface.go b/experimental/mocks/service/iam/mock_permission_migration_interface.go deleted file mode 100644 index c2187d519..000000000 --- a/experimental/mocks/service/iam/mock_permission_migration_interface.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - iam "github.com/databricks/databricks-sdk-go/service/iam" - mock "github.com/stretchr/testify/mock" -) - -// MockPermissionMigrationInterface is an autogenerated mock type for the PermissionMigrationInterface type -type MockPermissionMigrationInterface struct { - mock.Mock -} - -type MockPermissionMigrationInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPermissionMigrationInterface) EXPECT() *MockPermissionMigrationInterface_Expecter { - return &MockPermissionMigrationInterface_Expecter{mock: &_m.Mock} -} - -// MigratePermissions provides a mock function with given fields: ctx, request -func (_m *MockPermissionMigrationInterface) MigratePermissions(ctx context.Context, request iam.MigratePermissionsRequest) (*iam.MigratePermissionsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for MigratePermissions") - } - - var r0 *iam.MigratePermissionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.MigratePermissionsRequest) (*iam.MigratePermissionsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.MigratePermissionsRequest) *iam.MigratePermissionsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.MigratePermissionsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.MigratePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPermissionMigrationInterface_MigratePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MigratePermissions' -type MockPermissionMigrationInterface_MigratePermissions_Call struct { - *mock.Call -} - -// MigratePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request iam.MigratePermissionsRequest -func (_e *MockPermissionMigrationInterface_Expecter) MigratePermissions(ctx interface{}, request interface{}) *MockPermissionMigrationInterface_MigratePermissions_Call { - return &MockPermissionMigrationInterface_MigratePermissions_Call{Call: _e.mock.On("MigratePermissions", ctx, request)} -} - -func (_c *MockPermissionMigrationInterface_MigratePermissions_Call) Run(run func(ctx context.Context, request iam.MigratePermissionsRequest)) *MockPermissionMigrationInterface_MigratePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.MigratePermissionsRequest)) - }) - return _c -} - -func (_c *MockPermissionMigrationInterface_MigratePermissions_Call) Return(_a0 *iam.MigratePermissionsResponse, _a1 error) *MockPermissionMigrationInterface_MigratePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPermissionMigrationInterface_MigratePermissions_Call) RunAndReturn(run func(context.Context, iam.MigratePermissionsRequest) (*iam.MigratePermissionsResponse, error)) *MockPermissionMigrationInterface_MigratePermissions_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPermissionMigrationInterface creates a new instance of MockPermissionMigrationInterface. 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 NewMockPermissionMigrationInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPermissionMigrationInterface { - mock := &MockPermissionMigrationInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_permissions_interface.go b/experimental/mocks/service/iam/mock_permissions_interface.go deleted file mode 100644 index 8b461769f..000000000 --- a/experimental/mocks/service/iam/mock_permissions_interface.go +++ /dev/null @@ -1,393 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - iam "github.com/databricks/databricks-sdk-go/service/iam" - mock "github.com/stretchr/testify/mock" -) - -// MockPermissionsInterface is an autogenerated mock type for the PermissionsInterface type -type MockPermissionsInterface struct { - mock.Mock -} - -type MockPermissionsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPermissionsInterface) EXPECT() *MockPermissionsInterface_Expecter { - return &MockPermissionsInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockPermissionsInterface) Get(ctx context.Context, request iam.GetPermissionRequest) (*iam.ObjectPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.ObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetPermissionRequest) (*iam.ObjectPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetPermissionRequest) *iam.ObjectPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetPermissionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPermissionsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPermissionsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetPermissionRequest -func (_e *MockPermissionsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockPermissionsInterface_Get_Call { - return &MockPermissionsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockPermissionsInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetPermissionRequest)) *MockPermissionsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetPermissionRequest)) - }) - return _c -} - -func (_c *MockPermissionsInterface_Get_Call) Return(_a0 *iam.ObjectPermissions, _a1 error) *MockPermissionsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPermissionsInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetPermissionRequest) (*iam.ObjectPermissions, error)) *MockPermissionsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByRequestObjectTypeAndRequestObjectId provides a mock function with given fields: ctx, requestObjectType, requestObjectId -func (_m *MockPermissionsInterface) GetByRequestObjectTypeAndRequestObjectId(ctx context.Context, requestObjectType string, requestObjectId string) (*iam.ObjectPermissions, error) { - ret := _m.Called(ctx, requestObjectType, requestObjectId) - - if len(ret) == 0 { - panic("no return value specified for GetByRequestObjectTypeAndRequestObjectId") - } - - var r0 *iam.ObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*iam.ObjectPermissions, error)); ok { - return rf(ctx, requestObjectType, requestObjectId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *iam.ObjectPermissions); ok { - r0 = rf(ctx, requestObjectType, requestObjectId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, requestObjectType, requestObjectId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByRequestObjectTypeAndRequestObjectId' -type MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call struct { - *mock.Call -} - -// GetByRequestObjectTypeAndRequestObjectId is a helper method to define mock.On call -// - ctx context.Context -// - requestObjectType string -// - requestObjectId string -func (_e *MockPermissionsInterface_Expecter) GetByRequestObjectTypeAndRequestObjectId(ctx interface{}, requestObjectType interface{}, requestObjectId interface{}) *MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call { - return &MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call{Call: _e.mock.On("GetByRequestObjectTypeAndRequestObjectId", ctx, requestObjectType, requestObjectId)} -} - -func (_c *MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call) Run(run func(ctx context.Context, requestObjectType string, requestObjectId string)) *MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call) Return(_a0 *iam.ObjectPermissions, _a1 error) *MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call) RunAndReturn(run func(context.Context, string, string) (*iam.ObjectPermissions, error)) *MockPermissionsInterface_GetByRequestObjectTypeAndRequestObjectId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockPermissionsInterface) GetPermissionLevels(ctx context.Context, request iam.GetPermissionLevelsRequest) (*iam.GetPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *iam.GetPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetPermissionLevelsRequest) (*iam.GetPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetPermissionLevelsRequest) *iam.GetPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.GetPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPermissionsInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockPermissionsInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetPermissionLevelsRequest -func (_e *MockPermissionsInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockPermissionsInterface_GetPermissionLevels_Call { - return &MockPermissionsInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockPermissionsInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request iam.GetPermissionLevelsRequest)) *MockPermissionsInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockPermissionsInterface_GetPermissionLevels_Call) Return(_a0 *iam.GetPermissionLevelsResponse, _a1 error) *MockPermissionsInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPermissionsInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, iam.GetPermissionLevelsRequest) (*iam.GetPermissionLevelsResponse, error)) *MockPermissionsInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByRequestObjectTypeAndRequestObjectId provides a mock function with given fields: ctx, requestObjectType, requestObjectId -func (_m *MockPermissionsInterface) GetPermissionLevelsByRequestObjectTypeAndRequestObjectId(ctx context.Context, requestObjectType string, requestObjectId string) (*iam.GetPermissionLevelsResponse, error) { - ret := _m.Called(ctx, requestObjectType, requestObjectId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByRequestObjectTypeAndRequestObjectId") - } - - var r0 *iam.GetPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*iam.GetPermissionLevelsResponse, error)); ok { - return rf(ctx, requestObjectType, requestObjectId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *iam.GetPermissionLevelsResponse); ok { - r0 = rf(ctx, requestObjectType, requestObjectId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.GetPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, requestObjectType, requestObjectId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByRequestObjectTypeAndRequestObjectId' -type MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByRequestObjectTypeAndRequestObjectId is a helper method to define mock.On call -// - ctx context.Context -// - requestObjectType string -// - requestObjectId string -func (_e *MockPermissionsInterface_Expecter) GetPermissionLevelsByRequestObjectTypeAndRequestObjectId(ctx interface{}, requestObjectType interface{}, requestObjectId interface{}) *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call { - return &MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call{Call: _e.mock.On("GetPermissionLevelsByRequestObjectTypeAndRequestObjectId", ctx, requestObjectType, requestObjectId)} -} - -func (_c *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call) Run(run func(ctx context.Context, requestObjectType string, requestObjectId string)) *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call) Return(_a0 *iam.GetPermissionLevelsResponse, _a1 error) *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call) RunAndReturn(run func(context.Context, string, string) (*iam.GetPermissionLevelsResponse, error)) *MockPermissionsInterface_GetPermissionLevelsByRequestObjectTypeAndRequestObjectId_Call { - _c.Call.Return(run) - return _c -} - -// Set provides a mock function with given fields: ctx, request -func (_m *MockPermissionsInterface) Set(ctx context.Context, request iam.PermissionsRequest) (*iam.ObjectPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Set") - } - - var r0 *iam.ObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PermissionsRequest) (*iam.ObjectPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.PermissionsRequest) *iam.ObjectPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.PermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPermissionsInterface_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type MockPermissionsInterface_Set_Call struct { - *mock.Call -} - -// Set is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PermissionsRequest -func (_e *MockPermissionsInterface_Expecter) Set(ctx interface{}, request interface{}) *MockPermissionsInterface_Set_Call { - return &MockPermissionsInterface_Set_Call{Call: _e.mock.On("Set", ctx, request)} -} - -func (_c *MockPermissionsInterface_Set_Call) Run(run func(ctx context.Context, request iam.PermissionsRequest)) *MockPermissionsInterface_Set_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PermissionsRequest)) - }) - return _c -} - -func (_c *MockPermissionsInterface_Set_Call) Return(_a0 *iam.ObjectPermissions, _a1 error) *MockPermissionsInterface_Set_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPermissionsInterface_Set_Call) RunAndReturn(run func(context.Context, iam.PermissionsRequest) (*iam.ObjectPermissions, error)) *MockPermissionsInterface_Set_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockPermissionsInterface) Update(ctx context.Context, request iam.PermissionsRequest) (*iam.ObjectPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *iam.ObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PermissionsRequest) (*iam.ObjectPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.PermissionsRequest) *iam.ObjectPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.PermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPermissionsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockPermissionsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PermissionsRequest -func (_e *MockPermissionsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockPermissionsInterface_Update_Call { - return &MockPermissionsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockPermissionsInterface_Update_Call) Run(run func(ctx context.Context, request iam.PermissionsRequest)) *MockPermissionsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PermissionsRequest)) - }) - return _c -} - -func (_c *MockPermissionsInterface_Update_Call) Return(_a0 *iam.ObjectPermissions, _a1 error) *MockPermissionsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPermissionsInterface_Update_Call) RunAndReturn(run func(context.Context, iam.PermissionsRequest) (*iam.ObjectPermissions, error)) *MockPermissionsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPermissionsInterface creates a new instance of MockPermissionsInterface. 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 NewMockPermissionsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPermissionsInterface { - mock := &MockPermissionsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_service_principals_interface.go b/experimental/mocks/service/iam/mock_service_principals_interface.go deleted file mode 100644 index bba9feb79..000000000 --- a/experimental/mocks/service/iam/mock_service_principals_interface.go +++ /dev/null @@ -1,630 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - iam "github.com/databricks/databricks-sdk-go/service/iam" - - mock "github.com/stretchr/testify/mock" -) - -// MockServicePrincipalsInterface is an autogenerated mock type for the ServicePrincipalsInterface type -type MockServicePrincipalsInterface struct { - mock.Mock -} - -type MockServicePrincipalsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServicePrincipalsInterface) EXPECT() *MockServicePrincipalsInterface_Expecter { - return &MockServicePrincipalsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) Create(ctx context.Context, request iam.ServicePrincipal) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ServicePrincipal) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ServicePrincipal) *iam.ServicePrincipal); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ServicePrincipal) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockServicePrincipalsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ServicePrincipal -func (_e *MockServicePrincipalsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_Create_Call { - return &MockServicePrincipalsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_Create_Call) Run(run func(ctx context.Context, request iam.ServicePrincipal)) *MockServicePrincipalsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ServicePrincipal)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_Create_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockServicePrincipalsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalsInterface_Create_Call) RunAndReturn(run func(context.Context, iam.ServicePrincipal) (*iam.ServicePrincipal, error)) *MockServicePrincipalsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) Delete(ctx context.Context, request iam.DeleteServicePrincipalRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.DeleteServicePrincipalRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockServicePrincipalsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request iam.DeleteServicePrincipalRequest -func (_e *MockServicePrincipalsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_Delete_Call { - return &MockServicePrincipalsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_Delete_Call) Run(run func(ctx context.Context, request iam.DeleteServicePrincipalRequest)) *MockServicePrincipalsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.DeleteServicePrincipalRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_Delete_Call) Return(_a0 error) *MockServicePrincipalsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalsInterface_Delete_Call) RunAndReturn(run func(context.Context, iam.DeleteServicePrincipalRequest) error) *MockServicePrincipalsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockServicePrincipalsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockServicePrincipalsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockServicePrincipalsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockServicePrincipalsInterface_DeleteById_Call { - return &MockServicePrincipalsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockServicePrincipalsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockServicePrincipalsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_DeleteById_Call) Return(_a0 error) *MockServicePrincipalsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockServicePrincipalsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) Get(ctx context.Context, request iam.GetServicePrincipalRequest) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetServicePrincipalRequest) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetServicePrincipalRequest) *iam.ServicePrincipal); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetServicePrincipalRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockServicePrincipalsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetServicePrincipalRequest -func (_e *MockServicePrincipalsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_Get_Call { - return &MockServicePrincipalsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetServicePrincipalRequest)) *MockServicePrincipalsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetServicePrincipalRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_Get_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockServicePrincipalsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalsInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetServicePrincipalRequest) (*iam.ServicePrincipal, error)) *MockServicePrincipalsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDisplayName provides a mock function with given fields: ctx, name -func (_m *MockServicePrincipalsInterface) GetByDisplayName(ctx context.Context, name string) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByDisplayName") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.ServicePrincipal); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalsInterface_GetByDisplayName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDisplayName' -type MockServicePrincipalsInterface_GetByDisplayName_Call struct { - *mock.Call -} - -// GetByDisplayName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockServicePrincipalsInterface_Expecter) GetByDisplayName(ctx interface{}, name interface{}) *MockServicePrincipalsInterface_GetByDisplayName_Call { - return &MockServicePrincipalsInterface_GetByDisplayName_Call{Call: _e.mock.On("GetByDisplayName", ctx, name)} -} - -func (_c *MockServicePrincipalsInterface_GetByDisplayName_Call) Run(run func(ctx context.Context, name string)) *MockServicePrincipalsInterface_GetByDisplayName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_GetByDisplayName_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockServicePrincipalsInterface_GetByDisplayName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalsInterface_GetByDisplayName_Call) RunAndReturn(run func(context.Context, string) (*iam.ServicePrincipal, error)) *MockServicePrincipalsInterface_GetByDisplayName_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockServicePrincipalsInterface) GetById(ctx context.Context, id string) (*iam.ServicePrincipal, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.ServicePrincipal, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.ServicePrincipal); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockServicePrincipalsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockServicePrincipalsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockServicePrincipalsInterface_GetById_Call { - return &MockServicePrincipalsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockServicePrincipalsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockServicePrincipalsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_GetById_Call) Return(_a0 *iam.ServicePrincipal, _a1 error) *MockServicePrincipalsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*iam.ServicePrincipal, error)) *MockServicePrincipalsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) List(ctx context.Context, request iam.ListServicePrincipalsRequest) listing.Iterator[iam.ServicePrincipal] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[iam.ServicePrincipal] - if rf, ok := ret.Get(0).(func(context.Context, iam.ListServicePrincipalsRequest) listing.Iterator[iam.ServicePrincipal]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[iam.ServicePrincipal]) - } - } - - return r0 -} - -// MockServicePrincipalsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockServicePrincipalsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListServicePrincipalsRequest -func (_e *MockServicePrincipalsInterface_Expecter) List(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_List_Call { - return &MockServicePrincipalsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_List_Call) Run(run func(ctx context.Context, request iam.ListServicePrincipalsRequest)) *MockServicePrincipalsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListServicePrincipalsRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_List_Call) Return(_a0 listing.Iterator[iam.ServicePrincipal]) *MockServicePrincipalsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalsInterface_List_Call) RunAndReturn(run func(context.Context, iam.ListServicePrincipalsRequest) listing.Iterator[iam.ServicePrincipal]) *MockServicePrincipalsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) ListAll(ctx context.Context, request iam.ListServicePrincipalsRequest) ([]iam.ServicePrincipal, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []iam.ServicePrincipal - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListServicePrincipalsRequest) ([]iam.ServicePrincipal, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListServicePrincipalsRequest) []iam.ServicePrincipal); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]iam.ServicePrincipal) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListServicePrincipalsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockServicePrincipalsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListServicePrincipalsRequest -func (_e *MockServicePrincipalsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_ListAll_Call { - return &MockServicePrincipalsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_ListAll_Call) Run(run func(ctx context.Context, request iam.ListServicePrincipalsRequest)) *MockServicePrincipalsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListServicePrincipalsRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_ListAll_Call) Return(_a0 []iam.ServicePrincipal, _a1 error) *MockServicePrincipalsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalsInterface_ListAll_Call) RunAndReturn(run func(context.Context, iam.ListServicePrincipalsRequest) ([]iam.ServicePrincipal, error)) *MockServicePrincipalsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) Patch(ctx context.Context, request iam.PartialUpdate) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PartialUpdate) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalsInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type MockServicePrincipalsInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PartialUpdate -func (_e *MockServicePrincipalsInterface_Expecter) Patch(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_Patch_Call { - return &MockServicePrincipalsInterface_Patch_Call{Call: _e.mock.On("Patch", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_Patch_Call) Run(run func(ctx context.Context, request iam.PartialUpdate)) *MockServicePrincipalsInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PartialUpdate)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_Patch_Call) Return(_a0 error) *MockServicePrincipalsInterface_Patch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalsInterface_Patch_Call) RunAndReturn(run func(context.Context, iam.PartialUpdate) error) *MockServicePrincipalsInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// ServicePrincipalDisplayNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) ServicePrincipalDisplayNameToIdMap(ctx context.Context, request iam.ListServicePrincipalsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ServicePrincipalDisplayNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListServicePrincipalsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListServicePrincipalsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListServicePrincipalsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ServicePrincipalDisplayNameToIdMap' -type MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call struct { - *mock.Call -} - -// ServicePrincipalDisplayNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListServicePrincipalsRequest -func (_e *MockServicePrincipalsInterface_Expecter) ServicePrincipalDisplayNameToIdMap(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - return &MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call{Call: _e.mock.On("ServicePrincipalDisplayNameToIdMap", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call) Run(run func(ctx context.Context, request iam.ListServicePrincipalsRequest)) *MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListServicePrincipalsRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call) RunAndReturn(run func(context.Context, iam.ListServicePrincipalsRequest) (map[string]string, error)) *MockServicePrincipalsInterface_ServicePrincipalDisplayNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalsInterface) Update(ctx context.Context, request iam.ServicePrincipal) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ServicePrincipal) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockServicePrincipalsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ServicePrincipal -func (_e *MockServicePrincipalsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockServicePrincipalsInterface_Update_Call { - return &MockServicePrincipalsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockServicePrincipalsInterface_Update_Call) Run(run func(ctx context.Context, request iam.ServicePrincipal)) *MockServicePrincipalsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ServicePrincipal)) - }) - return _c -} - -func (_c *MockServicePrincipalsInterface_Update_Call) Return(_a0 error) *MockServicePrincipalsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalsInterface_Update_Call) RunAndReturn(run func(context.Context, iam.ServicePrincipal) error) *MockServicePrincipalsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServicePrincipalsInterface creates a new instance of MockServicePrincipalsInterface. 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 NewMockServicePrincipalsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServicePrincipalsInterface { - mock := &MockServicePrincipalsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_users_interface.go b/experimental/mocks/service/iam/mock_users_interface.go deleted file mode 100644 index 9319fdade..000000000 --- a/experimental/mocks/service/iam/mock_users_interface.go +++ /dev/null @@ -1,864 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - iam "github.com/databricks/databricks-sdk-go/service/iam" - - mock "github.com/stretchr/testify/mock" -) - -// MockUsersInterface is an autogenerated mock type for the UsersInterface type -type MockUsersInterface struct { - mock.Mock -} - -type MockUsersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockUsersInterface) EXPECT() *MockUsersInterface_Expecter { - return &MockUsersInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) Create(ctx context.Context, request iam.User) (*iam.User, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.User) (*iam.User, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.User) *iam.User); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.User) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockUsersInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request iam.User -func (_e *MockUsersInterface_Expecter) Create(ctx interface{}, request interface{}) *MockUsersInterface_Create_Call { - return &MockUsersInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockUsersInterface_Create_Call) Run(run func(ctx context.Context, request iam.User)) *MockUsersInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.User)) - }) - return _c -} - -func (_c *MockUsersInterface_Create_Call) Return(_a0 *iam.User, _a1 error) *MockUsersInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_Create_Call) RunAndReturn(run func(context.Context, iam.User) (*iam.User, error)) *MockUsersInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) Delete(ctx context.Context, request iam.DeleteUserRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.DeleteUserRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockUsersInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockUsersInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request iam.DeleteUserRequest -func (_e *MockUsersInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockUsersInterface_Delete_Call { - return &MockUsersInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockUsersInterface_Delete_Call) Run(run func(ctx context.Context, request iam.DeleteUserRequest)) *MockUsersInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.DeleteUserRequest)) - }) - return _c -} - -func (_c *MockUsersInterface_Delete_Call) Return(_a0 error) *MockUsersInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsersInterface_Delete_Call) RunAndReturn(run func(context.Context, iam.DeleteUserRequest) error) *MockUsersInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockUsersInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockUsersInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockUsersInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockUsersInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockUsersInterface_DeleteById_Call { - return &MockUsersInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockUsersInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockUsersInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockUsersInterface_DeleteById_Call) Return(_a0 error) *MockUsersInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsersInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockUsersInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) Get(ctx context.Context, request iam.GetUserRequest) (*iam.User, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetUserRequest) (*iam.User, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetUserRequest) *iam.User); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetUserRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockUsersInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetUserRequest -func (_e *MockUsersInterface_Expecter) Get(ctx interface{}, request interface{}) *MockUsersInterface_Get_Call { - return &MockUsersInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockUsersInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetUserRequest)) *MockUsersInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetUserRequest)) - }) - return _c -} - -func (_c *MockUsersInterface_Get_Call) Return(_a0 *iam.User, _a1 error) *MockUsersInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetUserRequest) (*iam.User, error)) *MockUsersInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockUsersInterface) GetById(ctx context.Context, id string) (*iam.User, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.User, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.User); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockUsersInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockUsersInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockUsersInterface_GetById_Call { - return &MockUsersInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockUsersInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockUsersInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockUsersInterface_GetById_Call) Return(_a0 *iam.User, _a1 error) *MockUsersInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*iam.User, error)) *MockUsersInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetByUserName provides a mock function with given fields: ctx, name -func (_m *MockUsersInterface) GetByUserName(ctx context.Context, name string) (*iam.User, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByUserName") - } - - var r0 *iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*iam.User, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *iam.User); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_GetByUserName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByUserName' -type MockUsersInterface_GetByUserName_Call struct { - *mock.Call -} - -// GetByUserName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockUsersInterface_Expecter) GetByUserName(ctx interface{}, name interface{}) *MockUsersInterface_GetByUserName_Call { - return &MockUsersInterface_GetByUserName_Call{Call: _e.mock.On("GetByUserName", ctx, name)} -} - -func (_c *MockUsersInterface_GetByUserName_Call) Run(run func(ctx context.Context, name string)) *MockUsersInterface_GetByUserName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockUsersInterface_GetByUserName_Call) Return(_a0 *iam.User, _a1 error) *MockUsersInterface_GetByUserName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_GetByUserName_Call) RunAndReturn(run func(context.Context, string) (*iam.User, error)) *MockUsersInterface_GetByUserName_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx -func (_m *MockUsersInterface) GetPermissionLevels(ctx context.Context) (*iam.GetPasswordPermissionLevelsResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *iam.GetPasswordPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*iam.GetPasswordPermissionLevelsResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *iam.GetPasswordPermissionLevelsResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.GetPasswordPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockUsersInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockUsersInterface_Expecter) GetPermissionLevels(ctx interface{}) *MockUsersInterface_GetPermissionLevels_Call { - return &MockUsersInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx)} -} - -func (_c *MockUsersInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context)) *MockUsersInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockUsersInterface_GetPermissionLevels_Call) Return(_a0 *iam.GetPasswordPermissionLevelsResponse, _a1 error) *MockUsersInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context) (*iam.GetPasswordPermissionLevelsResponse, error)) *MockUsersInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx -func (_m *MockUsersInterface) GetPermissions(ctx context.Context) (*iam.PasswordPermissions, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *iam.PasswordPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*iam.PasswordPermissions, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *iam.PasswordPermissions); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.PasswordPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockUsersInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockUsersInterface_Expecter) GetPermissions(ctx interface{}) *MockUsersInterface_GetPermissions_Call { - return &MockUsersInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx)} -} - -func (_c *MockUsersInterface_GetPermissions_Call) Run(run func(ctx context.Context)) *MockUsersInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockUsersInterface_GetPermissions_Call) Return(_a0 *iam.PasswordPermissions, _a1 error) *MockUsersInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_GetPermissions_Call) RunAndReturn(run func(context.Context) (*iam.PasswordPermissions, error)) *MockUsersInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) List(ctx context.Context, request iam.ListUsersRequest) listing.Iterator[iam.User] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[iam.User] - if rf, ok := ret.Get(0).(func(context.Context, iam.ListUsersRequest) listing.Iterator[iam.User]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[iam.User]) - } - } - - return r0 -} - -// MockUsersInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockUsersInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListUsersRequest -func (_e *MockUsersInterface_Expecter) List(ctx interface{}, request interface{}) *MockUsersInterface_List_Call { - return &MockUsersInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockUsersInterface_List_Call) Run(run func(ctx context.Context, request iam.ListUsersRequest)) *MockUsersInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListUsersRequest)) - }) - return _c -} - -func (_c *MockUsersInterface_List_Call) Return(_a0 listing.Iterator[iam.User]) *MockUsersInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsersInterface_List_Call) RunAndReturn(run func(context.Context, iam.ListUsersRequest) listing.Iterator[iam.User]) *MockUsersInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) ListAll(ctx context.Context, request iam.ListUsersRequest) ([]iam.User, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []iam.User - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListUsersRequest) ([]iam.User, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListUsersRequest) []iam.User); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]iam.User) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListUsersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockUsersInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListUsersRequest -func (_e *MockUsersInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockUsersInterface_ListAll_Call { - return &MockUsersInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockUsersInterface_ListAll_Call) Run(run func(ctx context.Context, request iam.ListUsersRequest)) *MockUsersInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListUsersRequest)) - }) - return _c -} - -func (_c *MockUsersInterface_ListAll_Call) Return(_a0 []iam.User, _a1 error) *MockUsersInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_ListAll_Call) RunAndReturn(run func(context.Context, iam.ListUsersRequest) ([]iam.User, error)) *MockUsersInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) Patch(ctx context.Context, request iam.PartialUpdate) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PartialUpdate) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockUsersInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type MockUsersInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PartialUpdate -func (_e *MockUsersInterface_Expecter) Patch(ctx interface{}, request interface{}) *MockUsersInterface_Patch_Call { - return &MockUsersInterface_Patch_Call{Call: _e.mock.On("Patch", ctx, request)} -} - -func (_c *MockUsersInterface_Patch_Call) Run(run func(ctx context.Context, request iam.PartialUpdate)) *MockUsersInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PartialUpdate)) - }) - return _c -} - -func (_c *MockUsersInterface_Patch_Call) Return(_a0 error) *MockUsersInterface_Patch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsersInterface_Patch_Call) RunAndReturn(run func(context.Context, iam.PartialUpdate) error) *MockUsersInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) SetPermissions(ctx context.Context, request iam.PasswordPermissionsRequest) (*iam.PasswordPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *iam.PasswordPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PasswordPermissionsRequest) (*iam.PasswordPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.PasswordPermissionsRequest) *iam.PasswordPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.PasswordPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.PasswordPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockUsersInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PasswordPermissionsRequest -func (_e *MockUsersInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockUsersInterface_SetPermissions_Call { - return &MockUsersInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockUsersInterface_SetPermissions_Call) Run(run func(ctx context.Context, request iam.PasswordPermissionsRequest)) *MockUsersInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PasswordPermissionsRequest)) - }) - return _c -} - -func (_c *MockUsersInterface_SetPermissions_Call) Return(_a0 *iam.PasswordPermissions, _a1 error) *MockUsersInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, iam.PasswordPermissionsRequest) (*iam.PasswordPermissions, error)) *MockUsersInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) Update(ctx context.Context, request iam.User) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.User) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockUsersInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockUsersInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.User -func (_e *MockUsersInterface_Expecter) Update(ctx interface{}, request interface{}) *MockUsersInterface_Update_Call { - return &MockUsersInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockUsersInterface_Update_Call) Run(run func(ctx context.Context, request iam.User)) *MockUsersInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.User)) - }) - return _c -} - -func (_c *MockUsersInterface_Update_Call) Return(_a0 error) *MockUsersInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockUsersInterface_Update_Call) RunAndReturn(run func(context.Context, iam.User) error) *MockUsersInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) UpdatePermissions(ctx context.Context, request iam.PasswordPermissionsRequest) (*iam.PasswordPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *iam.PasswordPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.PasswordPermissionsRequest) (*iam.PasswordPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.PasswordPermissionsRequest) *iam.PasswordPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.PasswordPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.PasswordPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockUsersInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request iam.PasswordPermissionsRequest -func (_e *MockUsersInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockUsersInterface_UpdatePermissions_Call { - return &MockUsersInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockUsersInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request iam.PasswordPermissionsRequest)) *MockUsersInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.PasswordPermissionsRequest)) - }) - return _c -} - -func (_c *MockUsersInterface_UpdatePermissions_Call) Return(_a0 *iam.PasswordPermissions, _a1 error) *MockUsersInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, iam.PasswordPermissionsRequest) (*iam.PasswordPermissions, error)) *MockUsersInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// UserUserNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockUsersInterface) UserUserNameToIdMap(ctx context.Context, request iam.ListUsersRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UserUserNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListUsersRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListUsersRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListUsersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockUsersInterface_UserUserNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserUserNameToIdMap' -type MockUsersInterface_UserUserNameToIdMap_Call struct { - *mock.Call -} - -// UserUserNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListUsersRequest -func (_e *MockUsersInterface_Expecter) UserUserNameToIdMap(ctx interface{}, request interface{}) *MockUsersInterface_UserUserNameToIdMap_Call { - return &MockUsersInterface_UserUserNameToIdMap_Call{Call: _e.mock.On("UserUserNameToIdMap", ctx, request)} -} - -func (_c *MockUsersInterface_UserUserNameToIdMap_Call) Run(run func(ctx context.Context, request iam.ListUsersRequest)) *MockUsersInterface_UserUserNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListUsersRequest)) - }) - return _c -} - -func (_c *MockUsersInterface_UserUserNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockUsersInterface_UserUserNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockUsersInterface_UserUserNameToIdMap_Call) RunAndReturn(run func(context.Context, iam.ListUsersRequest) (map[string]string, error)) *MockUsersInterface_UserUserNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockUsersInterface creates a new instance of MockUsersInterface. 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 NewMockUsersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockUsersInterface { - mock := &MockUsersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/iam/mock_workspace_assignment_interface.go b/experimental/mocks/service/iam/mock_workspace_assignment_interface.go deleted file mode 100644 index 7625feeab..000000000 --- a/experimental/mocks/service/iam/mock_workspace_assignment_interface.go +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package iam - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - iam "github.com/databricks/databricks-sdk-go/service/iam" - - mock "github.com/stretchr/testify/mock" -) - -// MockWorkspaceAssignmentInterface is an autogenerated mock type for the WorkspaceAssignmentInterface type -type MockWorkspaceAssignmentInterface struct { - mock.Mock -} - -type MockWorkspaceAssignmentInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockWorkspaceAssignmentInterface) EXPECT() *MockWorkspaceAssignmentInterface_Expecter { - return &MockWorkspaceAssignmentInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceAssignmentInterface) Delete(ctx context.Context, request iam.DeleteWorkspaceAssignmentRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, iam.DeleteWorkspaceAssignmentRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceAssignmentInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockWorkspaceAssignmentInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request iam.DeleteWorkspaceAssignmentRequest -func (_e *MockWorkspaceAssignmentInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockWorkspaceAssignmentInterface_Delete_Call { - return &MockWorkspaceAssignmentInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockWorkspaceAssignmentInterface_Delete_Call) Run(run func(ctx context.Context, request iam.DeleteWorkspaceAssignmentRequest)) *MockWorkspaceAssignmentInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.DeleteWorkspaceAssignmentRequest)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Delete_Call) Return(_a0 error) *MockWorkspaceAssignmentInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Delete_Call) RunAndReturn(run func(context.Context, iam.DeleteWorkspaceAssignmentRequest) error) *MockWorkspaceAssignmentInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByWorkspaceIdAndPrincipalId provides a mock function with given fields: ctx, workspaceId, principalId -func (_m *MockWorkspaceAssignmentInterface) DeleteByWorkspaceIdAndPrincipalId(ctx context.Context, workspaceId int64, principalId int64) error { - ret := _m.Called(ctx, workspaceId, principalId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByWorkspaceIdAndPrincipalId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, int64) error); ok { - r0 = rf(ctx, workspaceId, principalId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByWorkspaceIdAndPrincipalId' -type MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call struct { - *mock.Call -} - -// DeleteByWorkspaceIdAndPrincipalId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -// - principalId int64 -func (_e *MockWorkspaceAssignmentInterface_Expecter) DeleteByWorkspaceIdAndPrincipalId(ctx interface{}, workspaceId interface{}, principalId interface{}) *MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call { - return &MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call{Call: _e.mock.On("DeleteByWorkspaceIdAndPrincipalId", ctx, workspaceId, principalId)} -} - -func (_c *MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call) Run(run func(ctx context.Context, workspaceId int64, principalId int64)) *MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(int64)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call) Return(_a0 error) *MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call) RunAndReturn(run func(context.Context, int64, int64) error) *MockWorkspaceAssignmentInterface_DeleteByWorkspaceIdAndPrincipalId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceAssignmentInterface) Get(ctx context.Context, request iam.GetWorkspaceAssignmentRequest) (*iam.WorkspacePermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *iam.WorkspacePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.GetWorkspaceAssignmentRequest) (*iam.WorkspacePermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.GetWorkspaceAssignmentRequest) *iam.WorkspacePermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.WorkspacePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.GetWorkspaceAssignmentRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceAssignmentInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockWorkspaceAssignmentInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request iam.GetWorkspaceAssignmentRequest -func (_e *MockWorkspaceAssignmentInterface_Expecter) Get(ctx interface{}, request interface{}) *MockWorkspaceAssignmentInterface_Get_Call { - return &MockWorkspaceAssignmentInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockWorkspaceAssignmentInterface_Get_Call) Run(run func(ctx context.Context, request iam.GetWorkspaceAssignmentRequest)) *MockWorkspaceAssignmentInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.GetWorkspaceAssignmentRequest)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Get_Call) Return(_a0 *iam.WorkspacePermissions, _a1 error) *MockWorkspaceAssignmentInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Get_Call) RunAndReturn(run func(context.Context, iam.GetWorkspaceAssignmentRequest) (*iam.WorkspacePermissions, error)) *MockWorkspaceAssignmentInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByWorkspaceId provides a mock function with given fields: ctx, workspaceId -func (_m *MockWorkspaceAssignmentInterface) GetByWorkspaceId(ctx context.Context, workspaceId int64) (*iam.WorkspacePermissions, error) { - ret := _m.Called(ctx, workspaceId) - - if len(ret) == 0 { - panic("no return value specified for GetByWorkspaceId") - } - - var r0 *iam.WorkspacePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*iam.WorkspacePermissions, error)); ok { - return rf(ctx, workspaceId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *iam.WorkspacePermissions); ok { - r0 = rf(ctx, workspaceId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.WorkspacePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, workspaceId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByWorkspaceId' -type MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call struct { - *mock.Call -} - -// GetByWorkspaceId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -func (_e *MockWorkspaceAssignmentInterface_Expecter) GetByWorkspaceId(ctx interface{}, workspaceId interface{}) *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call { - return &MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call{Call: _e.mock.On("GetByWorkspaceId", ctx, workspaceId)} -} - -func (_c *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call) Run(run func(ctx context.Context, workspaceId int64)) *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call) Return(_a0 *iam.WorkspacePermissions, _a1 error) *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call) RunAndReturn(run func(context.Context, int64) (*iam.WorkspacePermissions, error)) *MockWorkspaceAssignmentInterface_GetByWorkspaceId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceAssignmentInterface) List(ctx context.Context, request iam.ListWorkspaceAssignmentRequest) listing.Iterator[iam.PermissionAssignment] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[iam.PermissionAssignment] - if rf, ok := ret.Get(0).(func(context.Context, iam.ListWorkspaceAssignmentRequest) listing.Iterator[iam.PermissionAssignment]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[iam.PermissionAssignment]) - } - } - - return r0 -} - -// MockWorkspaceAssignmentInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockWorkspaceAssignmentInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListWorkspaceAssignmentRequest -func (_e *MockWorkspaceAssignmentInterface_Expecter) List(ctx interface{}, request interface{}) *MockWorkspaceAssignmentInterface_List_Call { - return &MockWorkspaceAssignmentInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockWorkspaceAssignmentInterface_List_Call) Run(run func(ctx context.Context, request iam.ListWorkspaceAssignmentRequest)) *MockWorkspaceAssignmentInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListWorkspaceAssignmentRequest)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_List_Call) Return(_a0 listing.Iterator[iam.PermissionAssignment]) *MockWorkspaceAssignmentInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_List_Call) RunAndReturn(run func(context.Context, iam.ListWorkspaceAssignmentRequest) listing.Iterator[iam.PermissionAssignment]) *MockWorkspaceAssignmentInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceAssignmentInterface) ListAll(ctx context.Context, request iam.ListWorkspaceAssignmentRequest) ([]iam.PermissionAssignment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []iam.PermissionAssignment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.ListWorkspaceAssignmentRequest) ([]iam.PermissionAssignment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.ListWorkspaceAssignmentRequest) []iam.PermissionAssignment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]iam.PermissionAssignment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.ListWorkspaceAssignmentRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceAssignmentInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockWorkspaceAssignmentInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request iam.ListWorkspaceAssignmentRequest -func (_e *MockWorkspaceAssignmentInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockWorkspaceAssignmentInterface_ListAll_Call { - return &MockWorkspaceAssignmentInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockWorkspaceAssignmentInterface_ListAll_Call) Run(run func(ctx context.Context, request iam.ListWorkspaceAssignmentRequest)) *MockWorkspaceAssignmentInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.ListWorkspaceAssignmentRequest)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_ListAll_Call) Return(_a0 []iam.PermissionAssignment, _a1 error) *MockWorkspaceAssignmentInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_ListAll_Call) RunAndReturn(run func(context.Context, iam.ListWorkspaceAssignmentRequest) ([]iam.PermissionAssignment, error)) *MockWorkspaceAssignmentInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByWorkspaceId provides a mock function with given fields: ctx, workspaceId -func (_m *MockWorkspaceAssignmentInterface) ListByWorkspaceId(ctx context.Context, workspaceId int64) (*iam.PermissionAssignments, error) { - ret := _m.Called(ctx, workspaceId) - - if len(ret) == 0 { - panic("no return value specified for ListByWorkspaceId") - } - - var r0 *iam.PermissionAssignments - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*iam.PermissionAssignments, error)); ok { - return rf(ctx, workspaceId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *iam.PermissionAssignments); ok { - r0 = rf(ctx, workspaceId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.PermissionAssignments) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, workspaceId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByWorkspaceId' -type MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call struct { - *mock.Call -} - -// ListByWorkspaceId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -func (_e *MockWorkspaceAssignmentInterface_Expecter) ListByWorkspaceId(ctx interface{}, workspaceId interface{}) *MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call { - return &MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call{Call: _e.mock.On("ListByWorkspaceId", ctx, workspaceId)} -} - -func (_c *MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call) Run(run func(ctx context.Context, workspaceId int64)) *MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call) Return(_a0 *iam.PermissionAssignments, _a1 error) *MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call) RunAndReturn(run func(context.Context, int64) (*iam.PermissionAssignments, error)) *MockWorkspaceAssignmentInterface_ListByWorkspaceId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceAssignmentInterface) Update(ctx context.Context, request iam.UpdateWorkspaceAssignments) (*iam.PermissionAssignment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *iam.PermissionAssignment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, iam.UpdateWorkspaceAssignments) (*iam.PermissionAssignment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, iam.UpdateWorkspaceAssignments) *iam.PermissionAssignment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*iam.PermissionAssignment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, iam.UpdateWorkspaceAssignments) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceAssignmentInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockWorkspaceAssignmentInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request iam.UpdateWorkspaceAssignments -func (_e *MockWorkspaceAssignmentInterface_Expecter) Update(ctx interface{}, request interface{}) *MockWorkspaceAssignmentInterface_Update_Call { - return &MockWorkspaceAssignmentInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockWorkspaceAssignmentInterface_Update_Call) Run(run func(ctx context.Context, request iam.UpdateWorkspaceAssignments)) *MockWorkspaceAssignmentInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(iam.UpdateWorkspaceAssignments)) - }) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Update_Call) Return(_a0 *iam.PermissionAssignment, _a1 error) *MockWorkspaceAssignmentInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceAssignmentInterface_Update_Call) RunAndReturn(run func(context.Context, iam.UpdateWorkspaceAssignments) (*iam.PermissionAssignment, error)) *MockWorkspaceAssignmentInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockWorkspaceAssignmentInterface creates a new instance of MockWorkspaceAssignmentInterface. 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 NewMockWorkspaceAssignmentInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWorkspaceAssignmentInterface { - mock := &MockWorkspaceAssignmentInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/jobs/mock_jobs_interface.go b/experimental/mocks/service/jobs/mock_jobs_interface.go deleted file mode 100644 index c00b20329..000000000 --- a/experimental/mocks/service/jobs/mock_jobs_interface.go +++ /dev/null @@ -1,2187 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package jobs - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - jobs "github.com/databricks/databricks-sdk-go/service/jobs" - - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockJobsInterface is an autogenerated mock type for the JobsInterface type -type MockJobsInterface struct { - mock.Mock -} - -type MockJobsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockJobsInterface) EXPECT() *MockJobsInterface_Expecter { - return &MockJobsInterface_Expecter{mock: &_m.Mock} -} - -// BaseJobSettingsNameToJobIdMap provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) BaseJobSettingsNameToJobIdMap(ctx context.Context, request jobs.ListJobsRequest) (map[string]int64, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for BaseJobSettingsNameToJobIdMap") - } - - var r0 map[string]int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobsRequest) (map[string]int64, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobsRequest) map[string]int64); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]int64) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.ListJobsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BaseJobSettingsNameToJobIdMap' -type MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call struct { - *mock.Call -} - -// BaseJobSettingsNameToJobIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ListJobsRequest -func (_e *MockJobsInterface_Expecter) BaseJobSettingsNameToJobIdMap(ctx interface{}, request interface{}) *MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call { - return &MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call{Call: _e.mock.On("BaseJobSettingsNameToJobIdMap", ctx, request)} -} - -func (_c *MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call) Run(run func(ctx context.Context, request jobs.ListJobsRequest)) *MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ListJobsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call) Return(_a0 map[string]int64, _a1 error) *MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call) RunAndReturn(run func(context.Context, jobs.ListJobsRequest) (map[string]int64, error)) *MockJobsInterface_BaseJobSettingsNameToJobIdMap_Call { - _c.Call.Return(run) - return _c -} - -// CancelAllRuns provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) CancelAllRuns(ctx context.Context, request jobs.CancelAllRuns) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CancelAllRuns") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.CancelAllRuns) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_CancelAllRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelAllRuns' -type MockJobsInterface_CancelAllRuns_Call struct { - *mock.Call -} - -// CancelAllRuns is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.CancelAllRuns -func (_e *MockJobsInterface_Expecter) CancelAllRuns(ctx interface{}, request interface{}) *MockJobsInterface_CancelAllRuns_Call { - return &MockJobsInterface_CancelAllRuns_Call{Call: _e.mock.On("CancelAllRuns", ctx, request)} -} - -func (_c *MockJobsInterface_CancelAllRuns_Call) Run(run func(ctx context.Context, request jobs.CancelAllRuns)) *MockJobsInterface_CancelAllRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.CancelAllRuns)) - }) - return _c -} - -func (_c *MockJobsInterface_CancelAllRuns_Call) Return(_a0 error) *MockJobsInterface_CancelAllRuns_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_CancelAllRuns_Call) RunAndReturn(run func(context.Context, jobs.CancelAllRuns) error) *MockJobsInterface_CancelAllRuns_Call { - _c.Call.Return(run) - return _c -} - -// CancelRun provides a mock function with given fields: ctx, cancelRun -func (_m *MockJobsInterface) CancelRun(ctx context.Context, cancelRun jobs.CancelRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[struct{}], error) { - ret := _m.Called(ctx, cancelRun) - - if len(ret) == 0 { - panic("no return value specified for CancelRun") - } - - var r0 *jobs.WaitGetRunJobTerminatedOrSkipped[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.CancelRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[struct{}], error)); ok { - return rf(ctx, cancelRun) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.CancelRun) *jobs.WaitGetRunJobTerminatedOrSkipped[struct{}]); ok { - r0 = rf(ctx, cancelRun) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.WaitGetRunJobTerminatedOrSkipped[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.CancelRun) error); ok { - r1 = rf(ctx, cancelRun) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_CancelRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRun' -type MockJobsInterface_CancelRun_Call struct { - *mock.Call -} - -// CancelRun is a helper method to define mock.On call -// - ctx context.Context -// - cancelRun jobs.CancelRun -func (_e *MockJobsInterface_Expecter) CancelRun(ctx interface{}, cancelRun interface{}) *MockJobsInterface_CancelRun_Call { - return &MockJobsInterface_CancelRun_Call{Call: _e.mock.On("CancelRun", ctx, cancelRun)} -} - -func (_c *MockJobsInterface_CancelRun_Call) Run(run func(ctx context.Context, cancelRun jobs.CancelRun)) *MockJobsInterface_CancelRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.CancelRun)) - }) - return _c -} - -func (_c *MockJobsInterface_CancelRun_Call) Return(_a0 *jobs.WaitGetRunJobTerminatedOrSkipped[struct{}], _a1 error) *MockJobsInterface_CancelRun_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_CancelRun_Call) RunAndReturn(run func(context.Context, jobs.CancelRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[struct{}], error)) *MockJobsInterface_CancelRun_Call { - _c.Call.Return(run) - return _c -} - -// CancelRunAndWait provides a mock function with given fields: ctx, cancelRun, options -func (_m *MockJobsInterface) CancelRunAndWait(ctx context.Context, cancelRun jobs.CancelRun, options ...retries.Option[jobs.Run]) (*jobs.Run, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, cancelRun) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CancelRunAndWait") - } - - var r0 *jobs.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.CancelRun, ...retries.Option[jobs.Run]) (*jobs.Run, error)); ok { - return rf(ctx, cancelRun, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.CancelRun, ...retries.Option[jobs.Run]) *jobs.Run); ok { - r0 = rf(ctx, cancelRun, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.CancelRun, ...retries.Option[jobs.Run]) error); ok { - r1 = rf(ctx, cancelRun, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_CancelRunAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRunAndWait' -type MockJobsInterface_CancelRunAndWait_Call struct { - *mock.Call -} - -// CancelRunAndWait is a helper method to define mock.On call -// - ctx context.Context -// - cancelRun jobs.CancelRun -// - options ...retries.Option[jobs.Run] -func (_e *MockJobsInterface_Expecter) CancelRunAndWait(ctx interface{}, cancelRun interface{}, options ...interface{}) *MockJobsInterface_CancelRunAndWait_Call { - return &MockJobsInterface_CancelRunAndWait_Call{Call: _e.mock.On("CancelRunAndWait", - append([]interface{}{ctx, cancelRun}, options...)...)} -} - -func (_c *MockJobsInterface_CancelRunAndWait_Call) Run(run func(ctx context.Context, cancelRun jobs.CancelRun, options ...retries.Option[jobs.Run])) *MockJobsInterface_CancelRunAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[jobs.Run], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[jobs.Run]) - } - } - run(args[0].(context.Context), args[1].(jobs.CancelRun), variadicArgs...) - }) - return _c -} - -func (_c *MockJobsInterface_CancelRunAndWait_Call) Return(_a0 *jobs.Run, _a1 error) *MockJobsInterface_CancelRunAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_CancelRunAndWait_Call) RunAndReturn(run func(context.Context, jobs.CancelRun, ...retries.Option[jobs.Run]) (*jobs.Run, error)) *MockJobsInterface_CancelRunAndWait_Call { - _c.Call.Return(run) - return _c -} - -// CancelRunByRunId provides a mock function with given fields: ctx, runId -func (_m *MockJobsInterface) CancelRunByRunId(ctx context.Context, runId int64) error { - ret := _m.Called(ctx, runId) - - if len(ret) == 0 { - panic("no return value specified for CancelRunByRunId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, runId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_CancelRunByRunId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRunByRunId' -type MockJobsInterface_CancelRunByRunId_Call struct { - *mock.Call -} - -// CancelRunByRunId is a helper method to define mock.On call -// - ctx context.Context -// - runId int64 -func (_e *MockJobsInterface_Expecter) CancelRunByRunId(ctx interface{}, runId interface{}) *MockJobsInterface_CancelRunByRunId_Call { - return &MockJobsInterface_CancelRunByRunId_Call{Call: _e.mock.On("CancelRunByRunId", ctx, runId)} -} - -func (_c *MockJobsInterface_CancelRunByRunId_Call) Run(run func(ctx context.Context, runId int64)) *MockJobsInterface_CancelRunByRunId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockJobsInterface_CancelRunByRunId_Call) Return(_a0 error) *MockJobsInterface_CancelRunByRunId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_CancelRunByRunId_Call) RunAndReturn(run func(context.Context, int64) error) *MockJobsInterface_CancelRunByRunId_Call { - _c.Call.Return(run) - return _c -} - -// CancelRunByRunIdAndWait provides a mock function with given fields: ctx, runId, options -func (_m *MockJobsInterface) CancelRunByRunIdAndWait(ctx context.Context, runId int64, options ...retries.Option[jobs.Run]) (*jobs.Run, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, runId) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CancelRunByRunIdAndWait") - } - - var r0 *jobs.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, ...retries.Option[jobs.Run]) (*jobs.Run, error)); ok { - return rf(ctx, runId, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, ...retries.Option[jobs.Run]) *jobs.Run); ok { - r0 = rf(ctx, runId, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, ...retries.Option[jobs.Run]) error); ok { - r1 = rf(ctx, runId, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_CancelRunByRunIdAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelRunByRunIdAndWait' -type MockJobsInterface_CancelRunByRunIdAndWait_Call struct { - *mock.Call -} - -// CancelRunByRunIdAndWait is a helper method to define mock.On call -// - ctx context.Context -// - runId int64 -// - options ...retries.Option[jobs.Run] -func (_e *MockJobsInterface_Expecter) CancelRunByRunIdAndWait(ctx interface{}, runId interface{}, options ...interface{}) *MockJobsInterface_CancelRunByRunIdAndWait_Call { - return &MockJobsInterface_CancelRunByRunIdAndWait_Call{Call: _e.mock.On("CancelRunByRunIdAndWait", - append([]interface{}{ctx, runId}, options...)...)} -} - -func (_c *MockJobsInterface_CancelRunByRunIdAndWait_Call) Run(run func(ctx context.Context, runId int64, options ...retries.Option[jobs.Run])) *MockJobsInterface_CancelRunByRunIdAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[jobs.Run], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[jobs.Run]) - } - } - run(args[0].(context.Context), args[1].(int64), variadicArgs...) - }) - return _c -} - -func (_c *MockJobsInterface_CancelRunByRunIdAndWait_Call) Return(_a0 *jobs.Run, _a1 error) *MockJobsInterface_CancelRunByRunIdAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_CancelRunByRunIdAndWait_Call) RunAndReturn(run func(context.Context, int64, ...retries.Option[jobs.Run]) (*jobs.Run, error)) *MockJobsInterface_CancelRunByRunIdAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) Create(ctx context.Context, request jobs.CreateJob) (*jobs.CreateResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *jobs.CreateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.CreateJob) (*jobs.CreateResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.CreateJob) *jobs.CreateResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.CreateResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.CreateJob) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockJobsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.CreateJob -func (_e *MockJobsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockJobsInterface_Create_Call { - return &MockJobsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockJobsInterface_Create_Call) Run(run func(ctx context.Context, request jobs.CreateJob)) *MockJobsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.CreateJob)) - }) - return _c -} - -func (_c *MockJobsInterface_Create_Call) Return(_a0 *jobs.CreateResponse, _a1 error) *MockJobsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_Create_Call) RunAndReturn(run func(context.Context, jobs.CreateJob) (*jobs.CreateResponse, error)) *MockJobsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) Delete(ctx context.Context, request jobs.DeleteJob) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.DeleteJob) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockJobsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.DeleteJob -func (_e *MockJobsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockJobsInterface_Delete_Call { - return &MockJobsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockJobsInterface_Delete_Call) Run(run func(ctx context.Context, request jobs.DeleteJob)) *MockJobsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.DeleteJob)) - }) - return _c -} - -func (_c *MockJobsInterface_Delete_Call) Return(_a0 error) *MockJobsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_Delete_Call) RunAndReturn(run func(context.Context, jobs.DeleteJob) error) *MockJobsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByJobId provides a mock function with given fields: ctx, jobId -func (_m *MockJobsInterface) DeleteByJobId(ctx context.Context, jobId int64) error { - ret := _m.Called(ctx, jobId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByJobId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, jobId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_DeleteByJobId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByJobId' -type MockJobsInterface_DeleteByJobId_Call struct { - *mock.Call -} - -// DeleteByJobId is a helper method to define mock.On call -// - ctx context.Context -// - jobId int64 -func (_e *MockJobsInterface_Expecter) DeleteByJobId(ctx interface{}, jobId interface{}) *MockJobsInterface_DeleteByJobId_Call { - return &MockJobsInterface_DeleteByJobId_Call{Call: _e.mock.On("DeleteByJobId", ctx, jobId)} -} - -func (_c *MockJobsInterface_DeleteByJobId_Call) Run(run func(ctx context.Context, jobId int64)) *MockJobsInterface_DeleteByJobId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockJobsInterface_DeleteByJobId_Call) Return(_a0 error) *MockJobsInterface_DeleteByJobId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_DeleteByJobId_Call) RunAndReturn(run func(context.Context, int64) error) *MockJobsInterface_DeleteByJobId_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRun provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) DeleteRun(ctx context.Context, request jobs.DeleteRun) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteRun") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.DeleteRun) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_DeleteRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRun' -type MockJobsInterface_DeleteRun_Call struct { - *mock.Call -} - -// DeleteRun is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.DeleteRun -func (_e *MockJobsInterface_Expecter) DeleteRun(ctx interface{}, request interface{}) *MockJobsInterface_DeleteRun_Call { - return &MockJobsInterface_DeleteRun_Call{Call: _e.mock.On("DeleteRun", ctx, request)} -} - -func (_c *MockJobsInterface_DeleteRun_Call) Run(run func(ctx context.Context, request jobs.DeleteRun)) *MockJobsInterface_DeleteRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.DeleteRun)) - }) - return _c -} - -func (_c *MockJobsInterface_DeleteRun_Call) Return(_a0 error) *MockJobsInterface_DeleteRun_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_DeleteRun_Call) RunAndReturn(run func(context.Context, jobs.DeleteRun) error) *MockJobsInterface_DeleteRun_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRunByRunId provides a mock function with given fields: ctx, runId -func (_m *MockJobsInterface) DeleteRunByRunId(ctx context.Context, runId int64) error { - ret := _m.Called(ctx, runId) - - if len(ret) == 0 { - panic("no return value specified for DeleteRunByRunId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, runId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_DeleteRunByRunId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRunByRunId' -type MockJobsInterface_DeleteRunByRunId_Call struct { - *mock.Call -} - -// DeleteRunByRunId is a helper method to define mock.On call -// - ctx context.Context -// - runId int64 -func (_e *MockJobsInterface_Expecter) DeleteRunByRunId(ctx interface{}, runId interface{}) *MockJobsInterface_DeleteRunByRunId_Call { - return &MockJobsInterface_DeleteRunByRunId_Call{Call: _e.mock.On("DeleteRunByRunId", ctx, runId)} -} - -func (_c *MockJobsInterface_DeleteRunByRunId_Call) Run(run func(ctx context.Context, runId int64)) *MockJobsInterface_DeleteRunByRunId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockJobsInterface_DeleteRunByRunId_Call) Return(_a0 error) *MockJobsInterface_DeleteRunByRunId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_DeleteRunByRunId_Call) RunAndReturn(run func(context.Context, int64) error) *MockJobsInterface_DeleteRunByRunId_Call { - _c.Call.Return(run) - return _c -} - -// ExportRun provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) ExportRun(ctx context.Context, request jobs.ExportRunRequest) (*jobs.ExportRunOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExportRun") - } - - var r0 *jobs.ExportRunOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.ExportRunRequest) (*jobs.ExportRunOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.ExportRunRequest) *jobs.ExportRunOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.ExportRunOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.ExportRunRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_ExportRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportRun' -type MockJobsInterface_ExportRun_Call struct { - *mock.Call -} - -// ExportRun is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ExportRunRequest -func (_e *MockJobsInterface_Expecter) ExportRun(ctx interface{}, request interface{}) *MockJobsInterface_ExportRun_Call { - return &MockJobsInterface_ExportRun_Call{Call: _e.mock.On("ExportRun", ctx, request)} -} - -func (_c *MockJobsInterface_ExportRun_Call) Run(run func(ctx context.Context, request jobs.ExportRunRequest)) *MockJobsInterface_ExportRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ExportRunRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_ExportRun_Call) Return(_a0 *jobs.ExportRunOutput, _a1 error) *MockJobsInterface_ExportRun_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_ExportRun_Call) RunAndReturn(run func(context.Context, jobs.ExportRunRequest) (*jobs.ExportRunOutput, error)) *MockJobsInterface_ExportRun_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) Get(ctx context.Context, request jobs.GetJobRequest) (*jobs.Job, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *jobs.Job - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetJobRequest) (*jobs.Job, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetJobRequest) *jobs.Job); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Job) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.GetJobRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockJobsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.GetJobRequest -func (_e *MockJobsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockJobsInterface_Get_Call { - return &MockJobsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockJobsInterface_Get_Call) Run(run func(ctx context.Context, request jobs.GetJobRequest)) *MockJobsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.GetJobRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_Get_Call) Return(_a0 *jobs.Job, _a1 error) *MockJobsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_Get_Call) RunAndReturn(run func(context.Context, jobs.GetJobRequest) (*jobs.Job, error)) *MockJobsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByJobId provides a mock function with given fields: ctx, jobId -func (_m *MockJobsInterface) GetByJobId(ctx context.Context, jobId int64) (*jobs.Job, error) { - ret := _m.Called(ctx, jobId) - - if len(ret) == 0 { - panic("no return value specified for GetByJobId") - } - - var r0 *jobs.Job - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*jobs.Job, error)); ok { - return rf(ctx, jobId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *jobs.Job); ok { - r0 = rf(ctx, jobId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Job) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, jobId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetByJobId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByJobId' -type MockJobsInterface_GetByJobId_Call struct { - *mock.Call -} - -// GetByJobId is a helper method to define mock.On call -// - ctx context.Context -// - jobId int64 -func (_e *MockJobsInterface_Expecter) GetByJobId(ctx interface{}, jobId interface{}) *MockJobsInterface_GetByJobId_Call { - return &MockJobsInterface_GetByJobId_Call{Call: _e.mock.On("GetByJobId", ctx, jobId)} -} - -func (_c *MockJobsInterface_GetByJobId_Call) Run(run func(ctx context.Context, jobId int64)) *MockJobsInterface_GetByJobId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockJobsInterface_GetByJobId_Call) Return(_a0 *jobs.Job, _a1 error) *MockJobsInterface_GetByJobId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetByJobId_Call) RunAndReturn(run func(context.Context, int64) (*jobs.Job, error)) *MockJobsInterface_GetByJobId_Call { - _c.Call.Return(run) - return _c -} - -// GetBySettingsName provides a mock function with given fields: ctx, name -func (_m *MockJobsInterface) GetBySettingsName(ctx context.Context, name string) (*jobs.BaseJob, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetBySettingsName") - } - - var r0 *jobs.BaseJob - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*jobs.BaseJob, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *jobs.BaseJob); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.BaseJob) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetBySettingsName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBySettingsName' -type MockJobsInterface_GetBySettingsName_Call struct { - *mock.Call -} - -// GetBySettingsName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockJobsInterface_Expecter) GetBySettingsName(ctx interface{}, name interface{}) *MockJobsInterface_GetBySettingsName_Call { - return &MockJobsInterface_GetBySettingsName_Call{Call: _e.mock.On("GetBySettingsName", ctx, name)} -} - -func (_c *MockJobsInterface_GetBySettingsName_Call) Run(run func(ctx context.Context, name string)) *MockJobsInterface_GetBySettingsName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockJobsInterface_GetBySettingsName_Call) Return(_a0 *jobs.BaseJob, _a1 error) *MockJobsInterface_GetBySettingsName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetBySettingsName_Call) RunAndReturn(run func(context.Context, string) (*jobs.BaseJob, error)) *MockJobsInterface_GetBySettingsName_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) GetPermissionLevels(ctx context.Context, request jobs.GetJobPermissionLevelsRequest) (*jobs.GetJobPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *jobs.GetJobPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetJobPermissionLevelsRequest) (*jobs.GetJobPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetJobPermissionLevelsRequest) *jobs.GetJobPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.GetJobPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.GetJobPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockJobsInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.GetJobPermissionLevelsRequest -func (_e *MockJobsInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockJobsInterface_GetPermissionLevels_Call { - return &MockJobsInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockJobsInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request jobs.GetJobPermissionLevelsRequest)) *MockJobsInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.GetJobPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_GetPermissionLevels_Call) Return(_a0 *jobs.GetJobPermissionLevelsResponse, _a1 error) *MockJobsInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, jobs.GetJobPermissionLevelsRequest) (*jobs.GetJobPermissionLevelsResponse, error)) *MockJobsInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByJobId provides a mock function with given fields: ctx, jobId -func (_m *MockJobsInterface) GetPermissionLevelsByJobId(ctx context.Context, jobId string) (*jobs.GetJobPermissionLevelsResponse, error) { - ret := _m.Called(ctx, jobId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByJobId") - } - - var r0 *jobs.GetJobPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*jobs.GetJobPermissionLevelsResponse, error)); ok { - return rf(ctx, jobId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *jobs.GetJobPermissionLevelsResponse); ok { - r0 = rf(ctx, jobId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.GetJobPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, jobId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetPermissionLevelsByJobId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByJobId' -type MockJobsInterface_GetPermissionLevelsByJobId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByJobId is a helper method to define mock.On call -// - ctx context.Context -// - jobId string -func (_e *MockJobsInterface_Expecter) GetPermissionLevelsByJobId(ctx interface{}, jobId interface{}) *MockJobsInterface_GetPermissionLevelsByJobId_Call { - return &MockJobsInterface_GetPermissionLevelsByJobId_Call{Call: _e.mock.On("GetPermissionLevelsByJobId", ctx, jobId)} -} - -func (_c *MockJobsInterface_GetPermissionLevelsByJobId_Call) Run(run func(ctx context.Context, jobId string)) *MockJobsInterface_GetPermissionLevelsByJobId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockJobsInterface_GetPermissionLevelsByJobId_Call) Return(_a0 *jobs.GetJobPermissionLevelsResponse, _a1 error) *MockJobsInterface_GetPermissionLevelsByJobId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetPermissionLevelsByJobId_Call) RunAndReturn(run func(context.Context, string) (*jobs.GetJobPermissionLevelsResponse, error)) *MockJobsInterface_GetPermissionLevelsByJobId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) GetPermissions(ctx context.Context, request jobs.GetJobPermissionsRequest) (*jobs.JobPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *jobs.JobPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetJobPermissionsRequest) (*jobs.JobPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetJobPermissionsRequest) *jobs.JobPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.JobPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.GetJobPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockJobsInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.GetJobPermissionsRequest -func (_e *MockJobsInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockJobsInterface_GetPermissions_Call { - return &MockJobsInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockJobsInterface_GetPermissions_Call) Run(run func(ctx context.Context, request jobs.GetJobPermissionsRequest)) *MockJobsInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.GetJobPermissionsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_GetPermissions_Call) Return(_a0 *jobs.JobPermissions, _a1 error) *MockJobsInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, jobs.GetJobPermissionsRequest) (*jobs.JobPermissions, error)) *MockJobsInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByJobId provides a mock function with given fields: ctx, jobId -func (_m *MockJobsInterface) GetPermissionsByJobId(ctx context.Context, jobId string) (*jobs.JobPermissions, error) { - ret := _m.Called(ctx, jobId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByJobId") - } - - var r0 *jobs.JobPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*jobs.JobPermissions, error)); ok { - return rf(ctx, jobId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *jobs.JobPermissions); ok { - r0 = rf(ctx, jobId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.JobPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, jobId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetPermissionsByJobId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByJobId' -type MockJobsInterface_GetPermissionsByJobId_Call struct { - *mock.Call -} - -// GetPermissionsByJobId is a helper method to define mock.On call -// - ctx context.Context -// - jobId string -func (_e *MockJobsInterface_Expecter) GetPermissionsByJobId(ctx interface{}, jobId interface{}) *MockJobsInterface_GetPermissionsByJobId_Call { - return &MockJobsInterface_GetPermissionsByJobId_Call{Call: _e.mock.On("GetPermissionsByJobId", ctx, jobId)} -} - -func (_c *MockJobsInterface_GetPermissionsByJobId_Call) Run(run func(ctx context.Context, jobId string)) *MockJobsInterface_GetPermissionsByJobId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockJobsInterface_GetPermissionsByJobId_Call) Return(_a0 *jobs.JobPermissions, _a1 error) *MockJobsInterface_GetPermissionsByJobId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetPermissionsByJobId_Call) RunAndReturn(run func(context.Context, string) (*jobs.JobPermissions, error)) *MockJobsInterface_GetPermissionsByJobId_Call { - _c.Call.Return(run) - return _c -} - -// GetRun provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) GetRun(ctx context.Context, request jobs.GetRunRequest) (*jobs.Run, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetRun") - } - - var r0 *jobs.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetRunRequest) (*jobs.Run, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetRunRequest) *jobs.Run); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.GetRunRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRun' -type MockJobsInterface_GetRun_Call struct { - *mock.Call -} - -// GetRun is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.GetRunRequest -func (_e *MockJobsInterface_Expecter) GetRun(ctx interface{}, request interface{}) *MockJobsInterface_GetRun_Call { - return &MockJobsInterface_GetRun_Call{Call: _e.mock.On("GetRun", ctx, request)} -} - -func (_c *MockJobsInterface_GetRun_Call) Run(run func(ctx context.Context, request jobs.GetRunRequest)) *MockJobsInterface_GetRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.GetRunRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_GetRun_Call) Return(_a0 *jobs.Run, _a1 error) *MockJobsInterface_GetRun_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetRun_Call) RunAndReturn(run func(context.Context, jobs.GetRunRequest) (*jobs.Run, error)) *MockJobsInterface_GetRun_Call { - _c.Call.Return(run) - return _c -} - -// GetRunOutput provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) GetRunOutput(ctx context.Context, request jobs.GetRunOutputRequest) (*jobs.RunOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetRunOutput") - } - - var r0 *jobs.RunOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetRunOutputRequest) (*jobs.RunOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetRunOutputRequest) *jobs.RunOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.RunOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.GetRunOutputRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetRunOutput_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunOutput' -type MockJobsInterface_GetRunOutput_Call struct { - *mock.Call -} - -// GetRunOutput is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.GetRunOutputRequest -func (_e *MockJobsInterface_Expecter) GetRunOutput(ctx interface{}, request interface{}) *MockJobsInterface_GetRunOutput_Call { - return &MockJobsInterface_GetRunOutput_Call{Call: _e.mock.On("GetRunOutput", ctx, request)} -} - -func (_c *MockJobsInterface_GetRunOutput_Call) Run(run func(ctx context.Context, request jobs.GetRunOutputRequest)) *MockJobsInterface_GetRunOutput_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.GetRunOutputRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_GetRunOutput_Call) Return(_a0 *jobs.RunOutput, _a1 error) *MockJobsInterface_GetRunOutput_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetRunOutput_Call) RunAndReturn(run func(context.Context, jobs.GetRunOutputRequest) (*jobs.RunOutput, error)) *MockJobsInterface_GetRunOutput_Call { - _c.Call.Return(run) - return _c -} - -// GetRunOutputByRunId provides a mock function with given fields: ctx, runId -func (_m *MockJobsInterface) GetRunOutputByRunId(ctx context.Context, runId int64) (*jobs.RunOutput, error) { - ret := _m.Called(ctx, runId) - - if len(ret) == 0 { - panic("no return value specified for GetRunOutputByRunId") - } - - var r0 *jobs.RunOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*jobs.RunOutput, error)); ok { - return rf(ctx, runId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *jobs.RunOutput); ok { - r0 = rf(ctx, runId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.RunOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, runId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_GetRunOutputByRunId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRunOutputByRunId' -type MockJobsInterface_GetRunOutputByRunId_Call struct { - *mock.Call -} - -// GetRunOutputByRunId is a helper method to define mock.On call -// - ctx context.Context -// - runId int64 -func (_e *MockJobsInterface_Expecter) GetRunOutputByRunId(ctx interface{}, runId interface{}) *MockJobsInterface_GetRunOutputByRunId_Call { - return &MockJobsInterface_GetRunOutputByRunId_Call{Call: _e.mock.On("GetRunOutputByRunId", ctx, runId)} -} - -func (_c *MockJobsInterface_GetRunOutputByRunId_Call) Run(run func(ctx context.Context, runId int64)) *MockJobsInterface_GetRunOutputByRunId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockJobsInterface_GetRunOutputByRunId_Call) Return(_a0 *jobs.RunOutput, _a1 error) *MockJobsInterface_GetRunOutputByRunId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_GetRunOutputByRunId_Call) RunAndReturn(run func(context.Context, int64) (*jobs.RunOutput, error)) *MockJobsInterface_GetRunOutputByRunId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) List(ctx context.Context, request jobs.ListJobsRequest) listing.Iterator[jobs.BaseJob] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[jobs.BaseJob] - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobsRequest) listing.Iterator[jobs.BaseJob]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[jobs.BaseJob]) - } - } - - return r0 -} - -// MockJobsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockJobsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ListJobsRequest -func (_e *MockJobsInterface_Expecter) List(ctx interface{}, request interface{}) *MockJobsInterface_List_Call { - return &MockJobsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockJobsInterface_List_Call) Run(run func(ctx context.Context, request jobs.ListJobsRequest)) *MockJobsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ListJobsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_List_Call) Return(_a0 listing.Iterator[jobs.BaseJob]) *MockJobsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_List_Call) RunAndReturn(run func(context.Context, jobs.ListJobsRequest) listing.Iterator[jobs.BaseJob]) *MockJobsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) ListAll(ctx context.Context, request jobs.ListJobsRequest) ([]jobs.BaseJob, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []jobs.BaseJob - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobsRequest) ([]jobs.BaseJob, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobsRequest) []jobs.BaseJob); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]jobs.BaseJob) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.ListJobsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockJobsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ListJobsRequest -func (_e *MockJobsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockJobsInterface_ListAll_Call { - return &MockJobsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockJobsInterface_ListAll_Call) Run(run func(ctx context.Context, request jobs.ListJobsRequest)) *MockJobsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ListJobsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_ListAll_Call) Return(_a0 []jobs.BaseJob, _a1 error) *MockJobsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_ListAll_Call) RunAndReturn(run func(context.Context, jobs.ListJobsRequest) ([]jobs.BaseJob, error)) *MockJobsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListRuns provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) ListRuns(ctx context.Context, request jobs.ListRunsRequest) listing.Iterator[jobs.BaseRun] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListRuns") - } - - var r0 listing.Iterator[jobs.BaseRun] - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListRunsRequest) listing.Iterator[jobs.BaseRun]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[jobs.BaseRun]) - } - } - - return r0 -} - -// MockJobsInterface_ListRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRuns' -type MockJobsInterface_ListRuns_Call struct { - *mock.Call -} - -// ListRuns is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ListRunsRequest -func (_e *MockJobsInterface_Expecter) ListRuns(ctx interface{}, request interface{}) *MockJobsInterface_ListRuns_Call { - return &MockJobsInterface_ListRuns_Call{Call: _e.mock.On("ListRuns", ctx, request)} -} - -func (_c *MockJobsInterface_ListRuns_Call) Run(run func(ctx context.Context, request jobs.ListRunsRequest)) *MockJobsInterface_ListRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ListRunsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_ListRuns_Call) Return(_a0 listing.Iterator[jobs.BaseRun]) *MockJobsInterface_ListRuns_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_ListRuns_Call) RunAndReturn(run func(context.Context, jobs.ListRunsRequest) listing.Iterator[jobs.BaseRun]) *MockJobsInterface_ListRuns_Call { - _c.Call.Return(run) - return _c -} - -// ListRunsAll provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) ListRunsAll(ctx context.Context, request jobs.ListRunsRequest) ([]jobs.BaseRun, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListRunsAll") - } - - var r0 []jobs.BaseRun - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListRunsRequest) ([]jobs.BaseRun, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListRunsRequest) []jobs.BaseRun); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]jobs.BaseRun) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.ListRunsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_ListRunsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListRunsAll' -type MockJobsInterface_ListRunsAll_Call struct { - *mock.Call -} - -// ListRunsAll is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ListRunsRequest -func (_e *MockJobsInterface_Expecter) ListRunsAll(ctx interface{}, request interface{}) *MockJobsInterface_ListRunsAll_Call { - return &MockJobsInterface_ListRunsAll_Call{Call: _e.mock.On("ListRunsAll", ctx, request)} -} - -func (_c *MockJobsInterface_ListRunsAll_Call) Run(run func(ctx context.Context, request jobs.ListRunsRequest)) *MockJobsInterface_ListRunsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ListRunsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_ListRunsAll_Call) Return(_a0 []jobs.BaseRun, _a1 error) *MockJobsInterface_ListRunsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_ListRunsAll_Call) RunAndReturn(run func(context.Context, jobs.ListRunsRequest) ([]jobs.BaseRun, error)) *MockJobsInterface_ListRunsAll_Call { - _c.Call.Return(run) - return _c -} - -// RepairRun provides a mock function with given fields: ctx, repairRun -func (_m *MockJobsInterface) RepairRun(ctx context.Context, repairRun jobs.RepairRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RepairRunResponse], error) { - ret := _m.Called(ctx, repairRun) - - if len(ret) == 0 { - panic("no return value specified for RepairRun") - } - - var r0 *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RepairRunResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.RepairRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RepairRunResponse], error)); ok { - return rf(ctx, repairRun) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.RepairRun) *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RepairRunResponse]); ok { - r0 = rf(ctx, repairRun) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RepairRunResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.RepairRun) error); ok { - r1 = rf(ctx, repairRun) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_RepairRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepairRun' -type MockJobsInterface_RepairRun_Call struct { - *mock.Call -} - -// RepairRun is a helper method to define mock.On call -// - ctx context.Context -// - repairRun jobs.RepairRun -func (_e *MockJobsInterface_Expecter) RepairRun(ctx interface{}, repairRun interface{}) *MockJobsInterface_RepairRun_Call { - return &MockJobsInterface_RepairRun_Call{Call: _e.mock.On("RepairRun", ctx, repairRun)} -} - -func (_c *MockJobsInterface_RepairRun_Call) Run(run func(ctx context.Context, repairRun jobs.RepairRun)) *MockJobsInterface_RepairRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.RepairRun)) - }) - return _c -} - -func (_c *MockJobsInterface_RepairRun_Call) Return(_a0 *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RepairRunResponse], _a1 error) *MockJobsInterface_RepairRun_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_RepairRun_Call) RunAndReturn(run func(context.Context, jobs.RepairRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RepairRunResponse], error)) *MockJobsInterface_RepairRun_Call { - _c.Call.Return(run) - return _c -} - -// RepairRunAndWait provides a mock function with given fields: ctx, repairRun, options -func (_m *MockJobsInterface) RepairRunAndWait(ctx context.Context, repairRun jobs.RepairRun, options ...retries.Option[jobs.Run]) (*jobs.Run, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, repairRun) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for RepairRunAndWait") - } - - var r0 *jobs.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.RepairRun, ...retries.Option[jobs.Run]) (*jobs.Run, error)); ok { - return rf(ctx, repairRun, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.RepairRun, ...retries.Option[jobs.Run]) *jobs.Run); ok { - r0 = rf(ctx, repairRun, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.RepairRun, ...retries.Option[jobs.Run]) error); ok { - r1 = rf(ctx, repairRun, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_RepairRunAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepairRunAndWait' -type MockJobsInterface_RepairRunAndWait_Call struct { - *mock.Call -} - -// RepairRunAndWait is a helper method to define mock.On call -// - ctx context.Context -// - repairRun jobs.RepairRun -// - options ...retries.Option[jobs.Run] -func (_e *MockJobsInterface_Expecter) RepairRunAndWait(ctx interface{}, repairRun interface{}, options ...interface{}) *MockJobsInterface_RepairRunAndWait_Call { - return &MockJobsInterface_RepairRunAndWait_Call{Call: _e.mock.On("RepairRunAndWait", - append([]interface{}{ctx, repairRun}, options...)...)} -} - -func (_c *MockJobsInterface_RepairRunAndWait_Call) Run(run func(ctx context.Context, repairRun jobs.RepairRun, options ...retries.Option[jobs.Run])) *MockJobsInterface_RepairRunAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[jobs.Run], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[jobs.Run]) - } - } - run(args[0].(context.Context), args[1].(jobs.RepairRun), variadicArgs...) - }) - return _c -} - -func (_c *MockJobsInterface_RepairRunAndWait_Call) Return(_a0 *jobs.Run, _a1 error) *MockJobsInterface_RepairRunAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_RepairRunAndWait_Call) RunAndReturn(run func(context.Context, jobs.RepairRun, ...retries.Option[jobs.Run]) (*jobs.Run, error)) *MockJobsInterface_RepairRunAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Reset provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) Reset(ctx context.Context, request jobs.ResetJob) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Reset") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.ResetJob) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' -type MockJobsInterface_Reset_Call struct { - *mock.Call -} - -// Reset is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ResetJob -func (_e *MockJobsInterface_Expecter) Reset(ctx interface{}, request interface{}) *MockJobsInterface_Reset_Call { - return &MockJobsInterface_Reset_Call{Call: _e.mock.On("Reset", ctx, request)} -} - -func (_c *MockJobsInterface_Reset_Call) Run(run func(ctx context.Context, request jobs.ResetJob)) *MockJobsInterface_Reset_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ResetJob)) - }) - return _c -} - -func (_c *MockJobsInterface_Reset_Call) Return(_a0 error) *MockJobsInterface_Reset_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_Reset_Call) RunAndReturn(run func(context.Context, jobs.ResetJob) error) *MockJobsInterface_Reset_Call { - _c.Call.Return(run) - return _c -} - -// RunNow provides a mock function with given fields: ctx, runNow -func (_m *MockJobsInterface) RunNow(ctx context.Context, runNow jobs.RunNow) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RunNowResponse], error) { - ret := _m.Called(ctx, runNow) - - if len(ret) == 0 { - panic("no return value specified for RunNow") - } - - var r0 *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RunNowResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.RunNow) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RunNowResponse], error)); ok { - return rf(ctx, runNow) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.RunNow) *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RunNowResponse]); ok { - r0 = rf(ctx, runNow) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RunNowResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.RunNow) error); ok { - r1 = rf(ctx, runNow) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_RunNow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunNow' -type MockJobsInterface_RunNow_Call struct { - *mock.Call -} - -// RunNow is a helper method to define mock.On call -// - ctx context.Context -// - runNow jobs.RunNow -func (_e *MockJobsInterface_Expecter) RunNow(ctx interface{}, runNow interface{}) *MockJobsInterface_RunNow_Call { - return &MockJobsInterface_RunNow_Call{Call: _e.mock.On("RunNow", ctx, runNow)} -} - -func (_c *MockJobsInterface_RunNow_Call) Run(run func(ctx context.Context, runNow jobs.RunNow)) *MockJobsInterface_RunNow_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.RunNow)) - }) - return _c -} - -func (_c *MockJobsInterface_RunNow_Call) Return(_a0 *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RunNowResponse], _a1 error) *MockJobsInterface_RunNow_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_RunNow_Call) RunAndReturn(run func(context.Context, jobs.RunNow) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.RunNowResponse], error)) *MockJobsInterface_RunNow_Call { - _c.Call.Return(run) - return _c -} - -// RunNowAndWait provides a mock function with given fields: ctx, runNow, options -func (_m *MockJobsInterface) RunNowAndWait(ctx context.Context, runNow jobs.RunNow, options ...retries.Option[jobs.Run]) (*jobs.Run, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, runNow) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for RunNowAndWait") - } - - var r0 *jobs.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.RunNow, ...retries.Option[jobs.Run]) (*jobs.Run, error)); ok { - return rf(ctx, runNow, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.RunNow, ...retries.Option[jobs.Run]) *jobs.Run); ok { - r0 = rf(ctx, runNow, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.RunNow, ...retries.Option[jobs.Run]) error); ok { - r1 = rf(ctx, runNow, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_RunNowAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunNowAndWait' -type MockJobsInterface_RunNowAndWait_Call struct { - *mock.Call -} - -// RunNowAndWait is a helper method to define mock.On call -// - ctx context.Context -// - runNow jobs.RunNow -// - options ...retries.Option[jobs.Run] -func (_e *MockJobsInterface_Expecter) RunNowAndWait(ctx interface{}, runNow interface{}, options ...interface{}) *MockJobsInterface_RunNowAndWait_Call { - return &MockJobsInterface_RunNowAndWait_Call{Call: _e.mock.On("RunNowAndWait", - append([]interface{}{ctx, runNow}, options...)...)} -} - -func (_c *MockJobsInterface_RunNowAndWait_Call) Run(run func(ctx context.Context, runNow jobs.RunNow, options ...retries.Option[jobs.Run])) *MockJobsInterface_RunNowAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[jobs.Run], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[jobs.Run]) - } - } - run(args[0].(context.Context), args[1].(jobs.RunNow), variadicArgs...) - }) - return _c -} - -func (_c *MockJobsInterface_RunNowAndWait_Call) Return(_a0 *jobs.Run, _a1 error) *MockJobsInterface_RunNowAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_RunNowAndWait_Call) RunAndReturn(run func(context.Context, jobs.RunNow, ...retries.Option[jobs.Run]) (*jobs.Run, error)) *MockJobsInterface_RunNowAndWait_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) SetPermissions(ctx context.Context, request jobs.JobPermissionsRequest) (*jobs.JobPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *jobs.JobPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.JobPermissionsRequest) (*jobs.JobPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.JobPermissionsRequest) *jobs.JobPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.JobPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.JobPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockJobsInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.JobPermissionsRequest -func (_e *MockJobsInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockJobsInterface_SetPermissions_Call { - return &MockJobsInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockJobsInterface_SetPermissions_Call) Run(run func(ctx context.Context, request jobs.JobPermissionsRequest)) *MockJobsInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.JobPermissionsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_SetPermissions_Call) Return(_a0 *jobs.JobPermissions, _a1 error) *MockJobsInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, jobs.JobPermissionsRequest) (*jobs.JobPermissions, error)) *MockJobsInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// Submit provides a mock function with given fields: ctx, submitRun -func (_m *MockJobsInterface) Submit(ctx context.Context, submitRun jobs.SubmitRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.SubmitRunResponse], error) { - ret := _m.Called(ctx, submitRun) - - if len(ret) == 0 { - panic("no return value specified for Submit") - } - - var r0 *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.SubmitRunResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.SubmitRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.SubmitRunResponse], error)); ok { - return rf(ctx, submitRun) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.SubmitRun) *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.SubmitRunResponse]); ok { - r0 = rf(ctx, submitRun) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.SubmitRunResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.SubmitRun) error); ok { - r1 = rf(ctx, submitRun) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_Submit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Submit' -type MockJobsInterface_Submit_Call struct { - *mock.Call -} - -// Submit is a helper method to define mock.On call -// - ctx context.Context -// - submitRun jobs.SubmitRun -func (_e *MockJobsInterface_Expecter) Submit(ctx interface{}, submitRun interface{}) *MockJobsInterface_Submit_Call { - return &MockJobsInterface_Submit_Call{Call: _e.mock.On("Submit", ctx, submitRun)} -} - -func (_c *MockJobsInterface_Submit_Call) Run(run func(ctx context.Context, submitRun jobs.SubmitRun)) *MockJobsInterface_Submit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.SubmitRun)) - }) - return _c -} - -func (_c *MockJobsInterface_Submit_Call) Return(_a0 *jobs.WaitGetRunJobTerminatedOrSkipped[jobs.SubmitRunResponse], _a1 error) *MockJobsInterface_Submit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_Submit_Call) RunAndReturn(run func(context.Context, jobs.SubmitRun) (*jobs.WaitGetRunJobTerminatedOrSkipped[jobs.SubmitRunResponse], error)) *MockJobsInterface_Submit_Call { - _c.Call.Return(run) - return _c -} - -// SubmitAndWait provides a mock function with given fields: ctx, submitRun, options -func (_m *MockJobsInterface) SubmitAndWait(ctx context.Context, submitRun jobs.SubmitRun, options ...retries.Option[jobs.Run]) (*jobs.Run, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, submitRun) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for SubmitAndWait") - } - - var r0 *jobs.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.SubmitRun, ...retries.Option[jobs.Run]) (*jobs.Run, error)); ok { - return rf(ctx, submitRun, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.SubmitRun, ...retries.Option[jobs.Run]) *jobs.Run); ok { - r0 = rf(ctx, submitRun, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.SubmitRun, ...retries.Option[jobs.Run]) error); ok { - r1 = rf(ctx, submitRun, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_SubmitAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubmitAndWait' -type MockJobsInterface_SubmitAndWait_Call struct { - *mock.Call -} - -// SubmitAndWait is a helper method to define mock.On call -// - ctx context.Context -// - submitRun jobs.SubmitRun -// - options ...retries.Option[jobs.Run] -func (_e *MockJobsInterface_Expecter) SubmitAndWait(ctx interface{}, submitRun interface{}, options ...interface{}) *MockJobsInterface_SubmitAndWait_Call { - return &MockJobsInterface_SubmitAndWait_Call{Call: _e.mock.On("SubmitAndWait", - append([]interface{}{ctx, submitRun}, options...)...)} -} - -func (_c *MockJobsInterface_SubmitAndWait_Call) Run(run func(ctx context.Context, submitRun jobs.SubmitRun, options ...retries.Option[jobs.Run])) *MockJobsInterface_SubmitAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[jobs.Run], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[jobs.Run]) - } - } - run(args[0].(context.Context), args[1].(jobs.SubmitRun), variadicArgs...) - }) - return _c -} - -func (_c *MockJobsInterface_SubmitAndWait_Call) Return(_a0 *jobs.Run, _a1 error) *MockJobsInterface_SubmitAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_SubmitAndWait_Call) RunAndReturn(run func(context.Context, jobs.SubmitRun, ...retries.Option[jobs.Run]) (*jobs.Run, error)) *MockJobsInterface_SubmitAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) Update(ctx context.Context, request jobs.UpdateJob) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.UpdateJob) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockJobsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockJobsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.UpdateJob -func (_e *MockJobsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockJobsInterface_Update_Call { - return &MockJobsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockJobsInterface_Update_Call) Run(run func(ctx context.Context, request jobs.UpdateJob)) *MockJobsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.UpdateJob)) - }) - return _c -} - -func (_c *MockJobsInterface_Update_Call) Return(_a0 error) *MockJobsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockJobsInterface_Update_Call) RunAndReturn(run func(context.Context, jobs.UpdateJob) error) *MockJobsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockJobsInterface) UpdatePermissions(ctx context.Context, request jobs.JobPermissionsRequest) (*jobs.JobPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *jobs.JobPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.JobPermissionsRequest) (*jobs.JobPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.JobPermissionsRequest) *jobs.JobPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.JobPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.JobPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockJobsInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.JobPermissionsRequest -func (_e *MockJobsInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockJobsInterface_UpdatePermissions_Call { - return &MockJobsInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockJobsInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request jobs.JobPermissionsRequest)) *MockJobsInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.JobPermissionsRequest)) - }) - return _c -} - -func (_c *MockJobsInterface_UpdatePermissions_Call) Return(_a0 *jobs.JobPermissions, _a1 error) *MockJobsInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, jobs.JobPermissionsRequest) (*jobs.JobPermissions, error)) *MockJobsInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetRunJobTerminatedOrSkipped provides a mock function with given fields: ctx, runId, timeout, callback -func (_m *MockJobsInterface) WaitGetRunJobTerminatedOrSkipped(ctx context.Context, runId int64, timeout time.Duration, callback func(*jobs.Run)) (*jobs.Run, error) { - ret := _m.Called(ctx, runId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetRunJobTerminatedOrSkipped") - } - - var r0 *jobs.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, time.Duration, func(*jobs.Run)) (*jobs.Run, error)); ok { - return rf(ctx, runId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, time.Duration, func(*jobs.Run)) *jobs.Run); ok { - r0 = rf(ctx, runId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, time.Duration, func(*jobs.Run)) error); ok { - r1 = rf(ctx, runId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetRunJobTerminatedOrSkipped' -type MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call struct { - *mock.Call -} - -// WaitGetRunJobTerminatedOrSkipped is a helper method to define mock.On call -// - ctx context.Context -// - runId int64 -// - timeout time.Duration -// - callback func(*jobs.Run) -func (_e *MockJobsInterface_Expecter) WaitGetRunJobTerminatedOrSkipped(ctx interface{}, runId interface{}, timeout interface{}, callback interface{}) *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call { - return &MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call{Call: _e.mock.On("WaitGetRunJobTerminatedOrSkipped", ctx, runId, timeout, callback)} -} - -func (_c *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call) Run(run func(ctx context.Context, runId int64, timeout time.Duration, callback func(*jobs.Run))) *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(time.Duration), args[3].(func(*jobs.Run))) - }) - return _c -} - -func (_c *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call) Return(_a0 *jobs.Run, _a1 error) *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call) RunAndReturn(run func(context.Context, int64, time.Duration, func(*jobs.Run)) (*jobs.Run, error)) *MockJobsInterface_WaitGetRunJobTerminatedOrSkipped_Call { - _c.Call.Return(run) - return _c -} - -// NewMockJobsInterface creates a new instance of MockJobsInterface. 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 NewMockJobsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockJobsInterface { - mock := &MockJobsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/jobs/mock_policy_compliance_for_jobs_interface.go b/experimental/mocks/service/jobs/mock_policy_compliance_for_jobs_interface.go deleted file mode 100644 index ab681d1ba..000000000 --- a/experimental/mocks/service/jobs/mock_policy_compliance_for_jobs_interface.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package jobs - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - jobs "github.com/databricks/databricks-sdk-go/service/jobs" - - mock "github.com/stretchr/testify/mock" -) - -// MockPolicyComplianceForJobsInterface is an autogenerated mock type for the PolicyComplianceForJobsInterface type -type MockPolicyComplianceForJobsInterface struct { - mock.Mock -} - -type MockPolicyComplianceForJobsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPolicyComplianceForJobsInterface) EXPECT() *MockPolicyComplianceForJobsInterface_Expecter { - return &MockPolicyComplianceForJobsInterface_Expecter{mock: &_m.Mock} -} - -// EnforceCompliance provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForJobsInterface) EnforceCompliance(ctx context.Context, request jobs.EnforcePolicyComplianceRequest) (*jobs.EnforcePolicyComplianceResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for EnforceCompliance") - } - - var r0 *jobs.EnforcePolicyComplianceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.EnforcePolicyComplianceRequest) (*jobs.EnforcePolicyComplianceResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.EnforcePolicyComplianceRequest) *jobs.EnforcePolicyComplianceResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.EnforcePolicyComplianceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.EnforcePolicyComplianceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForJobsInterface_EnforceCompliance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnforceCompliance' -type MockPolicyComplianceForJobsInterface_EnforceCompliance_Call struct { - *mock.Call -} - -// EnforceCompliance is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.EnforcePolicyComplianceRequest -func (_e *MockPolicyComplianceForJobsInterface_Expecter) EnforceCompliance(ctx interface{}, request interface{}) *MockPolicyComplianceForJobsInterface_EnforceCompliance_Call { - return &MockPolicyComplianceForJobsInterface_EnforceCompliance_Call{Call: _e.mock.On("EnforceCompliance", ctx, request)} -} - -func (_c *MockPolicyComplianceForJobsInterface_EnforceCompliance_Call) Run(run func(ctx context.Context, request jobs.EnforcePolicyComplianceRequest)) *MockPolicyComplianceForJobsInterface_EnforceCompliance_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.EnforcePolicyComplianceRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_EnforceCompliance_Call) Return(_a0 *jobs.EnforcePolicyComplianceResponse, _a1 error) *MockPolicyComplianceForJobsInterface_EnforceCompliance_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_EnforceCompliance_Call) RunAndReturn(run func(context.Context, jobs.EnforcePolicyComplianceRequest) (*jobs.EnforcePolicyComplianceResponse, error)) *MockPolicyComplianceForJobsInterface_EnforceCompliance_Call { - _c.Call.Return(run) - return _c -} - -// GetCompliance provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForJobsInterface) GetCompliance(ctx context.Context, request jobs.GetPolicyComplianceRequest) (*jobs.GetPolicyComplianceResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetCompliance") - } - - var r0 *jobs.GetPolicyComplianceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetPolicyComplianceRequest) (*jobs.GetPolicyComplianceResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.GetPolicyComplianceRequest) *jobs.GetPolicyComplianceResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.GetPolicyComplianceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.GetPolicyComplianceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForJobsInterface_GetCompliance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCompliance' -type MockPolicyComplianceForJobsInterface_GetCompliance_Call struct { - *mock.Call -} - -// GetCompliance is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.GetPolicyComplianceRequest -func (_e *MockPolicyComplianceForJobsInterface_Expecter) GetCompliance(ctx interface{}, request interface{}) *MockPolicyComplianceForJobsInterface_GetCompliance_Call { - return &MockPolicyComplianceForJobsInterface_GetCompliance_Call{Call: _e.mock.On("GetCompliance", ctx, request)} -} - -func (_c *MockPolicyComplianceForJobsInterface_GetCompliance_Call) Run(run func(ctx context.Context, request jobs.GetPolicyComplianceRequest)) *MockPolicyComplianceForJobsInterface_GetCompliance_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.GetPolicyComplianceRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_GetCompliance_Call) Return(_a0 *jobs.GetPolicyComplianceResponse, _a1 error) *MockPolicyComplianceForJobsInterface_GetCompliance_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_GetCompliance_Call) RunAndReturn(run func(context.Context, jobs.GetPolicyComplianceRequest) (*jobs.GetPolicyComplianceResponse, error)) *MockPolicyComplianceForJobsInterface_GetCompliance_Call { - _c.Call.Return(run) - return _c -} - -// GetComplianceByJobId provides a mock function with given fields: ctx, jobId -func (_m *MockPolicyComplianceForJobsInterface) GetComplianceByJobId(ctx context.Context, jobId int64) (*jobs.GetPolicyComplianceResponse, error) { - ret := _m.Called(ctx, jobId) - - if len(ret) == 0 { - panic("no return value specified for GetComplianceByJobId") - } - - var r0 *jobs.GetPolicyComplianceResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*jobs.GetPolicyComplianceResponse, error)); ok { - return rf(ctx, jobId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *jobs.GetPolicyComplianceResponse); ok { - r0 = rf(ctx, jobId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*jobs.GetPolicyComplianceResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, jobId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComplianceByJobId' -type MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call struct { - *mock.Call -} - -// GetComplianceByJobId is a helper method to define mock.On call -// - ctx context.Context -// - jobId int64 -func (_e *MockPolicyComplianceForJobsInterface_Expecter) GetComplianceByJobId(ctx interface{}, jobId interface{}) *MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call { - return &MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call{Call: _e.mock.On("GetComplianceByJobId", ctx, jobId)} -} - -func (_c *MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call) Run(run func(ctx context.Context, jobId int64)) *MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call) Return(_a0 *jobs.GetPolicyComplianceResponse, _a1 error) *MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call) RunAndReturn(run func(context.Context, int64) (*jobs.GetPolicyComplianceResponse, error)) *MockPolicyComplianceForJobsInterface_GetComplianceByJobId_Call { - _c.Call.Return(run) - return _c -} - -// ListCompliance provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForJobsInterface) ListCompliance(ctx context.Context, request jobs.ListJobComplianceRequest) listing.Iterator[jobs.JobCompliance] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListCompliance") - } - - var r0 listing.Iterator[jobs.JobCompliance] - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobComplianceRequest) listing.Iterator[jobs.JobCompliance]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[jobs.JobCompliance]) - } - } - - return r0 -} - -// MockPolicyComplianceForJobsInterface_ListCompliance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListCompliance' -type MockPolicyComplianceForJobsInterface_ListCompliance_Call struct { - *mock.Call -} - -// ListCompliance is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ListJobComplianceRequest -func (_e *MockPolicyComplianceForJobsInterface_Expecter) ListCompliance(ctx interface{}, request interface{}) *MockPolicyComplianceForJobsInterface_ListCompliance_Call { - return &MockPolicyComplianceForJobsInterface_ListCompliance_Call{Call: _e.mock.On("ListCompliance", ctx, request)} -} - -func (_c *MockPolicyComplianceForJobsInterface_ListCompliance_Call) Run(run func(ctx context.Context, request jobs.ListJobComplianceRequest)) *MockPolicyComplianceForJobsInterface_ListCompliance_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ListJobComplianceRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_ListCompliance_Call) Return(_a0 listing.Iterator[jobs.JobCompliance]) *MockPolicyComplianceForJobsInterface_ListCompliance_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_ListCompliance_Call) RunAndReturn(run func(context.Context, jobs.ListJobComplianceRequest) listing.Iterator[jobs.JobCompliance]) *MockPolicyComplianceForJobsInterface_ListCompliance_Call { - _c.Call.Return(run) - return _c -} - -// ListComplianceAll provides a mock function with given fields: ctx, request -func (_m *MockPolicyComplianceForJobsInterface) ListComplianceAll(ctx context.Context, request jobs.ListJobComplianceRequest) ([]jobs.JobCompliance, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListComplianceAll") - } - - var r0 []jobs.JobCompliance - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobComplianceRequest) ([]jobs.JobCompliance, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, jobs.ListJobComplianceRequest) []jobs.JobCompliance); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]jobs.JobCompliance) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, jobs.ListJobComplianceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPolicyComplianceForJobsInterface_ListComplianceAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListComplianceAll' -type MockPolicyComplianceForJobsInterface_ListComplianceAll_Call struct { - *mock.Call -} - -// ListComplianceAll is a helper method to define mock.On call -// - ctx context.Context -// - request jobs.ListJobComplianceRequest -func (_e *MockPolicyComplianceForJobsInterface_Expecter) ListComplianceAll(ctx interface{}, request interface{}) *MockPolicyComplianceForJobsInterface_ListComplianceAll_Call { - return &MockPolicyComplianceForJobsInterface_ListComplianceAll_Call{Call: _e.mock.On("ListComplianceAll", ctx, request)} -} - -func (_c *MockPolicyComplianceForJobsInterface_ListComplianceAll_Call) Run(run func(ctx context.Context, request jobs.ListJobComplianceRequest)) *MockPolicyComplianceForJobsInterface_ListComplianceAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(jobs.ListJobComplianceRequest)) - }) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_ListComplianceAll_Call) Return(_a0 []jobs.JobCompliance, _a1 error) *MockPolicyComplianceForJobsInterface_ListComplianceAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPolicyComplianceForJobsInterface_ListComplianceAll_Call) RunAndReturn(run func(context.Context, jobs.ListJobComplianceRequest) ([]jobs.JobCompliance, error)) *MockPolicyComplianceForJobsInterface_ListComplianceAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPolicyComplianceForJobsInterface creates a new instance of MockPolicyComplianceForJobsInterface. 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 NewMockPolicyComplianceForJobsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPolicyComplianceForJobsInterface { - mock := &MockPolicyComplianceForJobsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_consumer_fulfillments_interface.go b/experimental/mocks/service/marketplace/mock_consumer_fulfillments_interface.go deleted file mode 100644 index 001d37a17..000000000 --- a/experimental/mocks/service/marketplace/mock_consumer_fulfillments_interface.go +++ /dev/null @@ -1,373 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockConsumerFulfillmentsInterface is an autogenerated mock type for the ConsumerFulfillmentsInterface type -type MockConsumerFulfillmentsInterface struct { - mock.Mock -} - -type MockConsumerFulfillmentsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockConsumerFulfillmentsInterface) EXPECT() *MockConsumerFulfillmentsInterface_Expecter { - return &MockConsumerFulfillmentsInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockConsumerFulfillmentsInterface) Get(ctx context.Context, request marketplace.GetListingContentMetadataRequest) listing.Iterator[marketplace.SharedDataObject] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 listing.Iterator[marketplace.SharedDataObject] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingContentMetadataRequest) listing.Iterator[marketplace.SharedDataObject]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.SharedDataObject]) - } - } - - return r0 -} - -// MockConsumerFulfillmentsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockConsumerFulfillmentsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetListingContentMetadataRequest -func (_e *MockConsumerFulfillmentsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockConsumerFulfillmentsInterface_Get_Call { - return &MockConsumerFulfillmentsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockConsumerFulfillmentsInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetListingContentMetadataRequest)) *MockConsumerFulfillmentsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetListingContentMetadataRequest)) - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_Get_Call) Return(_a0 listing.Iterator[marketplace.SharedDataObject]) *MockConsumerFulfillmentsInterface_Get_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetListingContentMetadataRequest) listing.Iterator[marketplace.SharedDataObject]) *MockConsumerFulfillmentsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerFulfillmentsInterface) GetAll(ctx context.Context, request marketplace.GetListingContentMetadataRequest) ([]marketplace.SharedDataObject, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - - var r0 []marketplace.SharedDataObject - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingContentMetadataRequest) ([]marketplace.SharedDataObject, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingContentMetadataRequest) []marketplace.SharedDataObject); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.SharedDataObject) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetListingContentMetadataRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerFulfillmentsInterface_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' -type MockConsumerFulfillmentsInterface_GetAll_Call struct { - *mock.Call -} - -// GetAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetListingContentMetadataRequest -func (_e *MockConsumerFulfillmentsInterface_Expecter) GetAll(ctx interface{}, request interface{}) *MockConsumerFulfillmentsInterface_GetAll_Call { - return &MockConsumerFulfillmentsInterface_GetAll_Call{Call: _e.mock.On("GetAll", ctx, request)} -} - -func (_c *MockConsumerFulfillmentsInterface_GetAll_Call) Run(run func(ctx context.Context, request marketplace.GetListingContentMetadataRequest)) *MockConsumerFulfillmentsInterface_GetAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetListingContentMetadataRequest)) - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_GetAll_Call) Return(_a0 []marketplace.SharedDataObject, _a1 error) *MockConsumerFulfillmentsInterface_GetAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_GetAll_Call) RunAndReturn(run func(context.Context, marketplace.GetListingContentMetadataRequest) ([]marketplace.SharedDataObject, error)) *MockConsumerFulfillmentsInterface_GetAll_Call { - _c.Call.Return(run) - return _c -} - -// GetByListingId provides a mock function with given fields: ctx, listingId -func (_m *MockConsumerFulfillmentsInterface) GetByListingId(ctx context.Context, listingId string) (*marketplace.GetListingContentMetadataResponse, error) { - ret := _m.Called(ctx, listingId) - - if len(ret) == 0 { - panic("no return value specified for GetByListingId") - } - - var r0 *marketplace.GetListingContentMetadataResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetListingContentMetadataResponse, error)); ok { - return rf(ctx, listingId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetListingContentMetadataResponse); ok { - r0 = rf(ctx, listingId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetListingContentMetadataResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, listingId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerFulfillmentsInterface_GetByListingId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByListingId' -type MockConsumerFulfillmentsInterface_GetByListingId_Call struct { - *mock.Call -} - -// GetByListingId is a helper method to define mock.On call -// - ctx context.Context -// - listingId string -func (_e *MockConsumerFulfillmentsInterface_Expecter) GetByListingId(ctx interface{}, listingId interface{}) *MockConsumerFulfillmentsInterface_GetByListingId_Call { - return &MockConsumerFulfillmentsInterface_GetByListingId_Call{Call: _e.mock.On("GetByListingId", ctx, listingId)} -} - -func (_c *MockConsumerFulfillmentsInterface_GetByListingId_Call) Run(run func(ctx context.Context, listingId string)) *MockConsumerFulfillmentsInterface_GetByListingId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_GetByListingId_Call) Return(_a0 *marketplace.GetListingContentMetadataResponse, _a1 error) *MockConsumerFulfillmentsInterface_GetByListingId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_GetByListingId_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetListingContentMetadataResponse, error)) *MockConsumerFulfillmentsInterface_GetByListingId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockConsumerFulfillmentsInterface) List(ctx context.Context, request marketplace.ListFulfillmentsRequest) listing.Iterator[marketplace.ListingFulfillment] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.ListingFulfillment] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFulfillmentsRequest) listing.Iterator[marketplace.ListingFulfillment]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.ListingFulfillment]) - } - } - - return r0 -} - -// MockConsumerFulfillmentsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockConsumerFulfillmentsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListFulfillmentsRequest -func (_e *MockConsumerFulfillmentsInterface_Expecter) List(ctx interface{}, request interface{}) *MockConsumerFulfillmentsInterface_List_Call { - return &MockConsumerFulfillmentsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockConsumerFulfillmentsInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListFulfillmentsRequest)) *MockConsumerFulfillmentsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListFulfillmentsRequest)) - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_List_Call) Return(_a0 listing.Iterator[marketplace.ListingFulfillment]) *MockConsumerFulfillmentsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListFulfillmentsRequest) listing.Iterator[marketplace.ListingFulfillment]) *MockConsumerFulfillmentsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerFulfillmentsInterface) ListAll(ctx context.Context, request marketplace.ListFulfillmentsRequest) ([]marketplace.ListingFulfillment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.ListingFulfillment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFulfillmentsRequest) ([]marketplace.ListingFulfillment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFulfillmentsRequest) []marketplace.ListingFulfillment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.ListingFulfillment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListFulfillmentsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerFulfillmentsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockConsumerFulfillmentsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListFulfillmentsRequest -func (_e *MockConsumerFulfillmentsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockConsumerFulfillmentsInterface_ListAll_Call { - return &MockConsumerFulfillmentsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockConsumerFulfillmentsInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListFulfillmentsRequest)) *MockConsumerFulfillmentsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListFulfillmentsRequest)) - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_ListAll_Call) Return(_a0 []marketplace.ListingFulfillment, _a1 error) *MockConsumerFulfillmentsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListFulfillmentsRequest) ([]marketplace.ListingFulfillment, error)) *MockConsumerFulfillmentsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByListingId provides a mock function with given fields: ctx, listingId -func (_m *MockConsumerFulfillmentsInterface) ListByListingId(ctx context.Context, listingId string) (*marketplace.ListFulfillmentsResponse, error) { - ret := _m.Called(ctx, listingId) - - if len(ret) == 0 { - panic("no return value specified for ListByListingId") - } - - var r0 *marketplace.ListFulfillmentsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.ListFulfillmentsResponse, error)); ok { - return rf(ctx, listingId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.ListFulfillmentsResponse); ok { - r0 = rf(ctx, listingId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ListFulfillmentsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, listingId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerFulfillmentsInterface_ListByListingId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByListingId' -type MockConsumerFulfillmentsInterface_ListByListingId_Call struct { - *mock.Call -} - -// ListByListingId is a helper method to define mock.On call -// - ctx context.Context -// - listingId string -func (_e *MockConsumerFulfillmentsInterface_Expecter) ListByListingId(ctx interface{}, listingId interface{}) *MockConsumerFulfillmentsInterface_ListByListingId_Call { - return &MockConsumerFulfillmentsInterface_ListByListingId_Call{Call: _e.mock.On("ListByListingId", ctx, listingId)} -} - -func (_c *MockConsumerFulfillmentsInterface_ListByListingId_Call) Run(run func(ctx context.Context, listingId string)) *MockConsumerFulfillmentsInterface_ListByListingId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_ListByListingId_Call) Return(_a0 *marketplace.ListFulfillmentsResponse, _a1 error) *MockConsumerFulfillmentsInterface_ListByListingId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerFulfillmentsInterface_ListByListingId_Call) RunAndReturn(run func(context.Context, string) (*marketplace.ListFulfillmentsResponse, error)) *MockConsumerFulfillmentsInterface_ListByListingId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockConsumerFulfillmentsInterface creates a new instance of MockConsumerFulfillmentsInterface. 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 NewMockConsumerFulfillmentsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConsumerFulfillmentsInterface { - mock := &MockConsumerFulfillmentsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_consumer_installations_interface.go b/experimental/mocks/service/marketplace/mock_consumer_installations_interface.go deleted file mode 100644 index 7bc4dcde2..000000000 --- a/experimental/mocks/service/marketplace/mock_consumer_installations_interface.go +++ /dev/null @@ -1,527 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockConsumerInstallationsInterface is an autogenerated mock type for the ConsumerInstallationsInterface type -type MockConsumerInstallationsInterface struct { - mock.Mock -} - -type MockConsumerInstallationsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockConsumerInstallationsInterface) EXPECT() *MockConsumerInstallationsInterface_Expecter { - return &MockConsumerInstallationsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockConsumerInstallationsInterface) Create(ctx context.Context, request marketplace.CreateInstallationRequest) (*marketplace.Installation, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.Installation - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateInstallationRequest) (*marketplace.Installation, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateInstallationRequest) *marketplace.Installation); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.Installation) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.CreateInstallationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerInstallationsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockConsumerInstallationsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.CreateInstallationRequest -func (_e *MockConsumerInstallationsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockConsumerInstallationsInterface_Create_Call { - return &MockConsumerInstallationsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockConsumerInstallationsInterface_Create_Call) Run(run func(ctx context.Context, request marketplace.CreateInstallationRequest)) *MockConsumerInstallationsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.CreateInstallationRequest)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Create_Call) Return(_a0 *marketplace.Installation, _a1 error) *MockConsumerInstallationsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Create_Call) RunAndReturn(run func(context.Context, marketplace.CreateInstallationRequest) (*marketplace.Installation, error)) *MockConsumerInstallationsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockConsumerInstallationsInterface) Delete(ctx context.Context, request marketplace.DeleteInstallationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.DeleteInstallationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockConsumerInstallationsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockConsumerInstallationsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.DeleteInstallationRequest -func (_e *MockConsumerInstallationsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockConsumerInstallationsInterface_Delete_Call { - return &MockConsumerInstallationsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockConsumerInstallationsInterface_Delete_Call) Run(run func(ctx context.Context, request marketplace.DeleteInstallationRequest)) *MockConsumerInstallationsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.DeleteInstallationRequest)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Delete_Call) Return(_a0 error) *MockConsumerInstallationsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Delete_Call) RunAndReturn(run func(context.Context, marketplace.DeleteInstallationRequest) error) *MockConsumerInstallationsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByListingIdAndInstallationId provides a mock function with given fields: ctx, listingId, installationId -func (_m *MockConsumerInstallationsInterface) DeleteByListingIdAndInstallationId(ctx context.Context, listingId string, installationId string) error { - ret := _m.Called(ctx, listingId, installationId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByListingIdAndInstallationId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, listingId, installationId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByListingIdAndInstallationId' -type MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call struct { - *mock.Call -} - -// DeleteByListingIdAndInstallationId is a helper method to define mock.On call -// - ctx context.Context -// - listingId string -// - installationId string -func (_e *MockConsumerInstallationsInterface_Expecter) DeleteByListingIdAndInstallationId(ctx interface{}, listingId interface{}, installationId interface{}) *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call { - return &MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call{Call: _e.mock.On("DeleteByListingIdAndInstallationId", ctx, listingId, installationId)} -} - -func (_c *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call) Run(run func(ctx context.Context, listingId string, installationId string)) *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call) Return(_a0 error) *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call) RunAndReturn(run func(context.Context, string, string) error) *MockConsumerInstallationsInterface_DeleteByListingIdAndInstallationId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockConsumerInstallationsInterface) List(ctx context.Context, request marketplace.ListAllInstallationsRequest) listing.Iterator[marketplace.InstallationDetail] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.InstallationDetail] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllInstallationsRequest) listing.Iterator[marketplace.InstallationDetail]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.InstallationDetail]) - } - } - - return r0 -} - -// MockConsumerInstallationsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockConsumerInstallationsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListAllInstallationsRequest -func (_e *MockConsumerInstallationsInterface_Expecter) List(ctx interface{}, request interface{}) *MockConsumerInstallationsInterface_List_Call { - return &MockConsumerInstallationsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockConsumerInstallationsInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListAllInstallationsRequest)) *MockConsumerInstallationsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListAllInstallationsRequest)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_List_Call) Return(_a0 listing.Iterator[marketplace.InstallationDetail]) *MockConsumerInstallationsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerInstallationsInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListAllInstallationsRequest) listing.Iterator[marketplace.InstallationDetail]) *MockConsumerInstallationsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerInstallationsInterface) ListAll(ctx context.Context, request marketplace.ListAllInstallationsRequest) ([]marketplace.InstallationDetail, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.InstallationDetail - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllInstallationsRequest) ([]marketplace.InstallationDetail, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllInstallationsRequest) []marketplace.InstallationDetail); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.InstallationDetail) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListAllInstallationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerInstallationsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockConsumerInstallationsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListAllInstallationsRequest -func (_e *MockConsumerInstallationsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockConsumerInstallationsInterface_ListAll_Call { - return &MockConsumerInstallationsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockConsumerInstallationsInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListAllInstallationsRequest)) *MockConsumerInstallationsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListAllInstallationsRequest)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListAll_Call) Return(_a0 []marketplace.InstallationDetail, _a1 error) *MockConsumerInstallationsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListAllInstallationsRequest) ([]marketplace.InstallationDetail, error)) *MockConsumerInstallationsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListListingInstallations provides a mock function with given fields: ctx, request -func (_m *MockConsumerInstallationsInterface) ListListingInstallations(ctx context.Context, request marketplace.ListInstallationsRequest) listing.Iterator[marketplace.InstallationDetail] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListListingInstallations") - } - - var r0 listing.Iterator[marketplace.InstallationDetail] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListInstallationsRequest) listing.Iterator[marketplace.InstallationDetail]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.InstallationDetail]) - } - } - - return r0 -} - -// MockConsumerInstallationsInterface_ListListingInstallations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListListingInstallations' -type MockConsumerInstallationsInterface_ListListingInstallations_Call struct { - *mock.Call -} - -// ListListingInstallations is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListInstallationsRequest -func (_e *MockConsumerInstallationsInterface_Expecter) ListListingInstallations(ctx interface{}, request interface{}) *MockConsumerInstallationsInterface_ListListingInstallations_Call { - return &MockConsumerInstallationsInterface_ListListingInstallations_Call{Call: _e.mock.On("ListListingInstallations", ctx, request)} -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallations_Call) Run(run func(ctx context.Context, request marketplace.ListInstallationsRequest)) *MockConsumerInstallationsInterface_ListListingInstallations_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListInstallationsRequest)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallations_Call) Return(_a0 listing.Iterator[marketplace.InstallationDetail]) *MockConsumerInstallationsInterface_ListListingInstallations_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallations_Call) RunAndReturn(run func(context.Context, marketplace.ListInstallationsRequest) listing.Iterator[marketplace.InstallationDetail]) *MockConsumerInstallationsInterface_ListListingInstallations_Call { - _c.Call.Return(run) - return _c -} - -// ListListingInstallationsAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerInstallationsInterface) ListListingInstallationsAll(ctx context.Context, request marketplace.ListInstallationsRequest) ([]marketplace.InstallationDetail, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListListingInstallationsAll") - } - - var r0 []marketplace.InstallationDetail - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListInstallationsRequest) ([]marketplace.InstallationDetail, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListInstallationsRequest) []marketplace.InstallationDetail); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.InstallationDetail) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListInstallationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerInstallationsInterface_ListListingInstallationsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListListingInstallationsAll' -type MockConsumerInstallationsInterface_ListListingInstallationsAll_Call struct { - *mock.Call -} - -// ListListingInstallationsAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListInstallationsRequest -func (_e *MockConsumerInstallationsInterface_Expecter) ListListingInstallationsAll(ctx interface{}, request interface{}) *MockConsumerInstallationsInterface_ListListingInstallationsAll_Call { - return &MockConsumerInstallationsInterface_ListListingInstallationsAll_Call{Call: _e.mock.On("ListListingInstallationsAll", ctx, request)} -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallationsAll_Call) Run(run func(ctx context.Context, request marketplace.ListInstallationsRequest)) *MockConsumerInstallationsInterface_ListListingInstallationsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListInstallationsRequest)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallationsAll_Call) Return(_a0 []marketplace.InstallationDetail, _a1 error) *MockConsumerInstallationsInterface_ListListingInstallationsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallationsAll_Call) RunAndReturn(run func(context.Context, marketplace.ListInstallationsRequest) ([]marketplace.InstallationDetail, error)) *MockConsumerInstallationsInterface_ListListingInstallationsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListListingInstallationsByListingId provides a mock function with given fields: ctx, listingId -func (_m *MockConsumerInstallationsInterface) ListListingInstallationsByListingId(ctx context.Context, listingId string) (*marketplace.ListInstallationsResponse, error) { - ret := _m.Called(ctx, listingId) - - if len(ret) == 0 { - panic("no return value specified for ListListingInstallationsByListingId") - } - - var r0 *marketplace.ListInstallationsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.ListInstallationsResponse, error)); ok { - return rf(ctx, listingId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.ListInstallationsResponse); ok { - r0 = rf(ctx, listingId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ListInstallationsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, listingId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListListingInstallationsByListingId' -type MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call struct { - *mock.Call -} - -// ListListingInstallationsByListingId is a helper method to define mock.On call -// - ctx context.Context -// - listingId string -func (_e *MockConsumerInstallationsInterface_Expecter) ListListingInstallationsByListingId(ctx interface{}, listingId interface{}) *MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call { - return &MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call{Call: _e.mock.On("ListListingInstallationsByListingId", ctx, listingId)} -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call) Run(run func(ctx context.Context, listingId string)) *MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call) Return(_a0 *marketplace.ListInstallationsResponse, _a1 error) *MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call) RunAndReturn(run func(context.Context, string) (*marketplace.ListInstallationsResponse, error)) *MockConsumerInstallationsInterface_ListListingInstallationsByListingId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockConsumerInstallationsInterface) Update(ctx context.Context, request marketplace.UpdateInstallationRequest) (*marketplace.UpdateInstallationResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *marketplace.UpdateInstallationResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateInstallationRequest) (*marketplace.UpdateInstallationResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateInstallationRequest) *marketplace.UpdateInstallationResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.UpdateInstallationResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.UpdateInstallationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerInstallationsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockConsumerInstallationsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.UpdateInstallationRequest -func (_e *MockConsumerInstallationsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockConsumerInstallationsInterface_Update_Call { - return &MockConsumerInstallationsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockConsumerInstallationsInterface_Update_Call) Run(run func(ctx context.Context, request marketplace.UpdateInstallationRequest)) *MockConsumerInstallationsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.UpdateInstallationRequest)) - }) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Update_Call) Return(_a0 *marketplace.UpdateInstallationResponse, _a1 error) *MockConsumerInstallationsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerInstallationsInterface_Update_Call) RunAndReturn(run func(context.Context, marketplace.UpdateInstallationRequest) (*marketplace.UpdateInstallationResponse, error)) *MockConsumerInstallationsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockConsumerInstallationsInterface creates a new instance of MockConsumerInstallationsInterface. 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 NewMockConsumerInstallationsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConsumerInstallationsInterface { - mock := &MockConsumerInstallationsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_consumer_listings_interface.go b/experimental/mocks/service/marketplace/mock_consumer_listings_interface.go deleted file mode 100644 index aceb32726..000000000 --- a/experimental/mocks/service/marketplace/mock_consumer_listings_interface.go +++ /dev/null @@ -1,550 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockConsumerListingsInterface is an autogenerated mock type for the ConsumerListingsInterface type -type MockConsumerListingsInterface struct { - mock.Mock -} - -type MockConsumerListingsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockConsumerListingsInterface) EXPECT() *MockConsumerListingsInterface_Expecter { - return &MockConsumerListingsInterface_Expecter{mock: &_m.Mock} -} - -// BatchGet provides a mock function with given fields: ctx, request -func (_m *MockConsumerListingsInterface) BatchGet(ctx context.Context, request marketplace.BatchGetListingsRequest) (*marketplace.BatchGetListingsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for BatchGet") - } - - var r0 *marketplace.BatchGetListingsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.BatchGetListingsRequest) (*marketplace.BatchGetListingsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.BatchGetListingsRequest) *marketplace.BatchGetListingsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.BatchGetListingsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.BatchGetListingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerListingsInterface_BatchGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchGet' -type MockConsumerListingsInterface_BatchGet_Call struct { - *mock.Call -} - -// BatchGet is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.BatchGetListingsRequest -func (_e *MockConsumerListingsInterface_Expecter) BatchGet(ctx interface{}, request interface{}) *MockConsumerListingsInterface_BatchGet_Call { - return &MockConsumerListingsInterface_BatchGet_Call{Call: _e.mock.On("BatchGet", ctx, request)} -} - -func (_c *MockConsumerListingsInterface_BatchGet_Call) Run(run func(ctx context.Context, request marketplace.BatchGetListingsRequest)) *MockConsumerListingsInterface_BatchGet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.BatchGetListingsRequest)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_BatchGet_Call) Return(_a0 *marketplace.BatchGetListingsResponse, _a1 error) *MockConsumerListingsInterface_BatchGet_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerListingsInterface_BatchGet_Call) RunAndReturn(run func(context.Context, marketplace.BatchGetListingsRequest) (*marketplace.BatchGetListingsResponse, error)) *MockConsumerListingsInterface_BatchGet_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockConsumerListingsInterface) Get(ctx context.Context, request marketplace.GetListingRequest) (*marketplace.GetListingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.GetListingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingRequest) (*marketplace.GetListingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingRequest) *marketplace.GetListingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetListingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetListingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerListingsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockConsumerListingsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetListingRequest -func (_e *MockConsumerListingsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockConsumerListingsInterface_Get_Call { - return &MockConsumerListingsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockConsumerListingsInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetListingRequest)) *MockConsumerListingsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetListingRequest)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_Get_Call) Return(_a0 *marketplace.GetListingResponse, _a1 error) *MockConsumerListingsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerListingsInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetListingRequest) (*marketplace.GetListingResponse, error)) *MockConsumerListingsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockConsumerListingsInterface) GetById(ctx context.Context, id string) (*marketplace.GetListingResponse, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *marketplace.GetListingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetListingResponse, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetListingResponse); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetListingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerListingsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockConsumerListingsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockConsumerListingsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockConsumerListingsInterface_GetById_Call { - return &MockConsumerListingsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockConsumerListingsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockConsumerListingsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_GetById_Call) Return(_a0 *marketplace.GetListingResponse, _a1 error) *MockConsumerListingsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerListingsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetListingResponse, error)) *MockConsumerListingsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetBySummaryName provides a mock function with given fields: ctx, name -func (_m *MockConsumerListingsInterface) GetBySummaryName(ctx context.Context, name string) (*marketplace.Listing, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetBySummaryName") - } - - var r0 *marketplace.Listing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.Listing, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.Listing); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.Listing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerListingsInterface_GetBySummaryName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBySummaryName' -type MockConsumerListingsInterface_GetBySummaryName_Call struct { - *mock.Call -} - -// GetBySummaryName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockConsumerListingsInterface_Expecter) GetBySummaryName(ctx interface{}, name interface{}) *MockConsumerListingsInterface_GetBySummaryName_Call { - return &MockConsumerListingsInterface_GetBySummaryName_Call{Call: _e.mock.On("GetBySummaryName", ctx, name)} -} - -func (_c *MockConsumerListingsInterface_GetBySummaryName_Call) Run(run func(ctx context.Context, name string)) *MockConsumerListingsInterface_GetBySummaryName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_GetBySummaryName_Call) Return(_a0 *marketplace.Listing, _a1 error) *MockConsumerListingsInterface_GetBySummaryName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerListingsInterface_GetBySummaryName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.Listing, error)) *MockConsumerListingsInterface_GetBySummaryName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockConsumerListingsInterface) List(ctx context.Context, request marketplace.ListListingsRequest) listing.Iterator[marketplace.Listing] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.Listing] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsRequest) listing.Iterator[marketplace.Listing]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.Listing]) - } - } - - return r0 -} - -// MockConsumerListingsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockConsumerListingsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListListingsRequest -func (_e *MockConsumerListingsInterface_Expecter) List(ctx interface{}, request interface{}) *MockConsumerListingsInterface_List_Call { - return &MockConsumerListingsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockConsumerListingsInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListListingsRequest)) *MockConsumerListingsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListListingsRequest)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_List_Call) Return(_a0 listing.Iterator[marketplace.Listing]) *MockConsumerListingsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerListingsInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListListingsRequest) listing.Iterator[marketplace.Listing]) *MockConsumerListingsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerListingsInterface) ListAll(ctx context.Context, request marketplace.ListListingsRequest) ([]marketplace.Listing, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.Listing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsRequest) ([]marketplace.Listing, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsRequest) []marketplace.Listing); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.Listing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListListingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerListingsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockConsumerListingsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListListingsRequest -func (_e *MockConsumerListingsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockConsumerListingsInterface_ListAll_Call { - return &MockConsumerListingsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockConsumerListingsInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListListingsRequest)) *MockConsumerListingsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListListingsRequest)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_ListAll_Call) Return(_a0 []marketplace.Listing, _a1 error) *MockConsumerListingsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerListingsInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListListingsRequest) ([]marketplace.Listing, error)) *MockConsumerListingsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListingSummaryNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockConsumerListingsInterface) ListingSummaryNameToIdMap(ctx context.Context, request marketplace.ListListingsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListingSummaryNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListListingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListingSummaryNameToIdMap' -type MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call struct { - *mock.Call -} - -// ListingSummaryNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListListingsRequest -func (_e *MockConsumerListingsInterface_Expecter) ListingSummaryNameToIdMap(ctx interface{}, request interface{}) *MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call { - return &MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call{Call: _e.mock.On("ListingSummaryNameToIdMap", ctx, request)} -} - -func (_c *MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListListingsRequest)) *MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListListingsRequest)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListListingsRequest) (map[string]string, error)) *MockConsumerListingsInterface_ListingSummaryNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Search provides a mock function with given fields: ctx, request -func (_m *MockConsumerListingsInterface) Search(ctx context.Context, request marketplace.SearchListingsRequest) listing.Iterator[marketplace.Listing] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Search") - } - - var r0 listing.Iterator[marketplace.Listing] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.SearchListingsRequest) listing.Iterator[marketplace.Listing]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.Listing]) - } - } - - return r0 -} - -// MockConsumerListingsInterface_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' -type MockConsumerListingsInterface_Search_Call struct { - *mock.Call -} - -// Search is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.SearchListingsRequest -func (_e *MockConsumerListingsInterface_Expecter) Search(ctx interface{}, request interface{}) *MockConsumerListingsInterface_Search_Call { - return &MockConsumerListingsInterface_Search_Call{Call: _e.mock.On("Search", ctx, request)} -} - -func (_c *MockConsumerListingsInterface_Search_Call) Run(run func(ctx context.Context, request marketplace.SearchListingsRequest)) *MockConsumerListingsInterface_Search_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.SearchListingsRequest)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_Search_Call) Return(_a0 listing.Iterator[marketplace.Listing]) *MockConsumerListingsInterface_Search_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerListingsInterface_Search_Call) RunAndReturn(run func(context.Context, marketplace.SearchListingsRequest) listing.Iterator[marketplace.Listing]) *MockConsumerListingsInterface_Search_Call { - _c.Call.Return(run) - return _c -} - -// SearchAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerListingsInterface) SearchAll(ctx context.Context, request marketplace.SearchListingsRequest) ([]marketplace.Listing, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchAll") - } - - var r0 []marketplace.Listing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.SearchListingsRequest) ([]marketplace.Listing, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.SearchListingsRequest) []marketplace.Listing); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.Listing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.SearchListingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerListingsInterface_SearchAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchAll' -type MockConsumerListingsInterface_SearchAll_Call struct { - *mock.Call -} - -// SearchAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.SearchListingsRequest -func (_e *MockConsumerListingsInterface_Expecter) SearchAll(ctx interface{}, request interface{}) *MockConsumerListingsInterface_SearchAll_Call { - return &MockConsumerListingsInterface_SearchAll_Call{Call: _e.mock.On("SearchAll", ctx, request)} -} - -func (_c *MockConsumerListingsInterface_SearchAll_Call) Run(run func(ctx context.Context, request marketplace.SearchListingsRequest)) *MockConsumerListingsInterface_SearchAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.SearchListingsRequest)) - }) - return _c -} - -func (_c *MockConsumerListingsInterface_SearchAll_Call) Return(_a0 []marketplace.Listing, _a1 error) *MockConsumerListingsInterface_SearchAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerListingsInterface_SearchAll_Call) RunAndReturn(run func(context.Context, marketplace.SearchListingsRequest) ([]marketplace.Listing, error)) *MockConsumerListingsInterface_SearchAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockConsumerListingsInterface creates a new instance of MockConsumerListingsInterface. 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 NewMockConsumerListingsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConsumerListingsInterface { - mock := &MockConsumerListingsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_consumer_personalization_requests_interface.go b/experimental/mocks/service/marketplace/mock_consumer_personalization_requests_interface.go deleted file mode 100644 index dddb0cb00..000000000 --- a/experimental/mocks/service/marketplace/mock_consumer_personalization_requests_interface.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockConsumerPersonalizationRequestsInterface is an autogenerated mock type for the ConsumerPersonalizationRequestsInterface type -type MockConsumerPersonalizationRequestsInterface struct { - mock.Mock -} - -type MockConsumerPersonalizationRequestsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockConsumerPersonalizationRequestsInterface) EXPECT() *MockConsumerPersonalizationRequestsInterface_Expecter { - return &MockConsumerPersonalizationRequestsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockConsumerPersonalizationRequestsInterface) Create(ctx context.Context, request marketplace.CreatePersonalizationRequest) (*marketplace.CreatePersonalizationRequestResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.CreatePersonalizationRequestResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreatePersonalizationRequest) (*marketplace.CreatePersonalizationRequestResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreatePersonalizationRequest) *marketplace.CreatePersonalizationRequestResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.CreatePersonalizationRequestResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.CreatePersonalizationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerPersonalizationRequestsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockConsumerPersonalizationRequestsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.CreatePersonalizationRequest -func (_e *MockConsumerPersonalizationRequestsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockConsumerPersonalizationRequestsInterface_Create_Call { - return &MockConsumerPersonalizationRequestsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Create_Call) Run(run func(ctx context.Context, request marketplace.CreatePersonalizationRequest)) *MockConsumerPersonalizationRequestsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.CreatePersonalizationRequest)) - }) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Create_Call) Return(_a0 *marketplace.CreatePersonalizationRequestResponse, _a1 error) *MockConsumerPersonalizationRequestsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Create_Call) RunAndReturn(run func(context.Context, marketplace.CreatePersonalizationRequest) (*marketplace.CreatePersonalizationRequestResponse, error)) *MockConsumerPersonalizationRequestsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockConsumerPersonalizationRequestsInterface) Get(ctx context.Context, request marketplace.GetPersonalizationRequestRequest) (*marketplace.GetPersonalizationRequestResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.GetPersonalizationRequestResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetPersonalizationRequestRequest) (*marketplace.GetPersonalizationRequestResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetPersonalizationRequestRequest) *marketplace.GetPersonalizationRequestResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetPersonalizationRequestResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetPersonalizationRequestRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerPersonalizationRequestsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockConsumerPersonalizationRequestsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetPersonalizationRequestRequest -func (_e *MockConsumerPersonalizationRequestsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockConsumerPersonalizationRequestsInterface_Get_Call { - return &MockConsumerPersonalizationRequestsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetPersonalizationRequestRequest)) *MockConsumerPersonalizationRequestsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetPersonalizationRequestRequest)) - }) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Get_Call) Return(_a0 *marketplace.GetPersonalizationRequestResponse, _a1 error) *MockConsumerPersonalizationRequestsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetPersonalizationRequestRequest) (*marketplace.GetPersonalizationRequestResponse, error)) *MockConsumerPersonalizationRequestsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByListingId provides a mock function with given fields: ctx, listingId -func (_m *MockConsumerPersonalizationRequestsInterface) GetByListingId(ctx context.Context, listingId string) (*marketplace.GetPersonalizationRequestResponse, error) { - ret := _m.Called(ctx, listingId) - - if len(ret) == 0 { - panic("no return value specified for GetByListingId") - } - - var r0 *marketplace.GetPersonalizationRequestResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetPersonalizationRequestResponse, error)); ok { - return rf(ctx, listingId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetPersonalizationRequestResponse); ok { - r0 = rf(ctx, listingId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetPersonalizationRequestResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, listingId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerPersonalizationRequestsInterface_GetByListingId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByListingId' -type MockConsumerPersonalizationRequestsInterface_GetByListingId_Call struct { - *mock.Call -} - -// GetByListingId is a helper method to define mock.On call -// - ctx context.Context -// - listingId string -func (_e *MockConsumerPersonalizationRequestsInterface_Expecter) GetByListingId(ctx interface{}, listingId interface{}) *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call { - return &MockConsumerPersonalizationRequestsInterface_GetByListingId_Call{Call: _e.mock.On("GetByListingId", ctx, listingId)} -} - -func (_c *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call) Run(run func(ctx context.Context, listingId string)) *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call) Return(_a0 *marketplace.GetPersonalizationRequestResponse, _a1 error) *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetPersonalizationRequestResponse, error)) *MockConsumerPersonalizationRequestsInterface_GetByListingId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockConsumerPersonalizationRequestsInterface) List(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest) listing.Iterator[marketplace.PersonalizationRequest] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.PersonalizationRequest] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) listing.Iterator[marketplace.PersonalizationRequest]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.PersonalizationRequest]) - } - } - - return r0 -} - -// MockConsumerPersonalizationRequestsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockConsumerPersonalizationRequestsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListAllPersonalizationRequestsRequest -func (_e *MockConsumerPersonalizationRequestsInterface_Expecter) List(ctx interface{}, request interface{}) *MockConsumerPersonalizationRequestsInterface_List_Call { - return &MockConsumerPersonalizationRequestsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockConsumerPersonalizationRequestsInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest)) *MockConsumerPersonalizationRequestsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListAllPersonalizationRequestsRequest)) - }) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_List_Call) Return(_a0 listing.Iterator[marketplace.PersonalizationRequest]) *MockConsumerPersonalizationRequestsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) listing.Iterator[marketplace.PersonalizationRequest]) *MockConsumerPersonalizationRequestsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerPersonalizationRequestsInterface) ListAll(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest) ([]marketplace.PersonalizationRequest, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.PersonalizationRequest - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) ([]marketplace.PersonalizationRequest, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) []marketplace.PersonalizationRequest); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.PersonalizationRequest) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerPersonalizationRequestsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockConsumerPersonalizationRequestsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListAllPersonalizationRequestsRequest -func (_e *MockConsumerPersonalizationRequestsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockConsumerPersonalizationRequestsInterface_ListAll_Call { - return &MockConsumerPersonalizationRequestsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockConsumerPersonalizationRequestsInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest)) *MockConsumerPersonalizationRequestsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListAllPersonalizationRequestsRequest)) - }) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_ListAll_Call) Return(_a0 []marketplace.PersonalizationRequest, _a1 error) *MockConsumerPersonalizationRequestsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerPersonalizationRequestsInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) ([]marketplace.PersonalizationRequest, error)) *MockConsumerPersonalizationRequestsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockConsumerPersonalizationRequestsInterface creates a new instance of MockConsumerPersonalizationRequestsInterface. 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 NewMockConsumerPersonalizationRequestsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConsumerPersonalizationRequestsInterface { - mock := &MockConsumerPersonalizationRequestsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_consumer_providers_interface.go b/experimental/mocks/service/marketplace/mock_consumer_providers_interface.go deleted file mode 100644 index ecb1d5b07..000000000 --- a/experimental/mocks/service/marketplace/mock_consumer_providers_interface.go +++ /dev/null @@ -1,442 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockConsumerProvidersInterface is an autogenerated mock type for the ConsumerProvidersInterface type -type MockConsumerProvidersInterface struct { - mock.Mock -} - -type MockConsumerProvidersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockConsumerProvidersInterface) EXPECT() *MockConsumerProvidersInterface_Expecter { - return &MockConsumerProvidersInterface_Expecter{mock: &_m.Mock} -} - -// BatchGet provides a mock function with given fields: ctx, request -func (_m *MockConsumerProvidersInterface) BatchGet(ctx context.Context, request marketplace.BatchGetProvidersRequest) (*marketplace.BatchGetProvidersResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for BatchGet") - } - - var r0 *marketplace.BatchGetProvidersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.BatchGetProvidersRequest) (*marketplace.BatchGetProvidersResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.BatchGetProvidersRequest) *marketplace.BatchGetProvidersResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.BatchGetProvidersResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.BatchGetProvidersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerProvidersInterface_BatchGet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchGet' -type MockConsumerProvidersInterface_BatchGet_Call struct { - *mock.Call -} - -// BatchGet is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.BatchGetProvidersRequest -func (_e *MockConsumerProvidersInterface_Expecter) BatchGet(ctx interface{}, request interface{}) *MockConsumerProvidersInterface_BatchGet_Call { - return &MockConsumerProvidersInterface_BatchGet_Call{Call: _e.mock.On("BatchGet", ctx, request)} -} - -func (_c *MockConsumerProvidersInterface_BatchGet_Call) Run(run func(ctx context.Context, request marketplace.BatchGetProvidersRequest)) *MockConsumerProvidersInterface_BatchGet_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.BatchGetProvidersRequest)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_BatchGet_Call) Return(_a0 *marketplace.BatchGetProvidersResponse, _a1 error) *MockConsumerProvidersInterface_BatchGet_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerProvidersInterface_BatchGet_Call) RunAndReturn(run func(context.Context, marketplace.BatchGetProvidersRequest) (*marketplace.BatchGetProvidersResponse, error)) *MockConsumerProvidersInterface_BatchGet_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockConsumerProvidersInterface) Get(ctx context.Context, request marketplace.GetProviderRequest) (*marketplace.GetProviderResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.GetProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetProviderRequest) (*marketplace.GetProviderResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetProviderRequest) *marketplace.GetProviderResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetProviderRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerProvidersInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockConsumerProvidersInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetProviderRequest -func (_e *MockConsumerProvidersInterface_Expecter) Get(ctx interface{}, request interface{}) *MockConsumerProvidersInterface_Get_Call { - return &MockConsumerProvidersInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockConsumerProvidersInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetProviderRequest)) *MockConsumerProvidersInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetProviderRequest)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_Get_Call) Return(_a0 *marketplace.GetProviderResponse, _a1 error) *MockConsumerProvidersInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerProvidersInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetProviderRequest) (*marketplace.GetProviderResponse, error)) *MockConsumerProvidersInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockConsumerProvidersInterface) GetById(ctx context.Context, id string) (*marketplace.GetProviderResponse, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *marketplace.GetProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetProviderResponse, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetProviderResponse); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerProvidersInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockConsumerProvidersInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockConsumerProvidersInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockConsumerProvidersInterface_GetById_Call { - return &MockConsumerProvidersInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockConsumerProvidersInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockConsumerProvidersInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_GetById_Call) Return(_a0 *marketplace.GetProviderResponse, _a1 error) *MockConsumerProvidersInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerProvidersInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetProviderResponse, error)) *MockConsumerProvidersInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockConsumerProvidersInterface) GetByName(ctx context.Context, name string) (*marketplace.ProviderInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *marketplace.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.ProviderInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.ProviderInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerProvidersInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockConsumerProvidersInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockConsumerProvidersInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockConsumerProvidersInterface_GetByName_Call { - return &MockConsumerProvidersInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockConsumerProvidersInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockConsumerProvidersInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_GetByName_Call) Return(_a0 *marketplace.ProviderInfo, _a1 error) *MockConsumerProvidersInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerProvidersInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.ProviderInfo, error)) *MockConsumerProvidersInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockConsumerProvidersInterface) List(ctx context.Context, request marketplace.ListProvidersRequest) listing.Iterator[marketplace.ProviderInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.ProviderInfo] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) listing.Iterator[marketplace.ProviderInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.ProviderInfo]) - } - } - - return r0 -} - -// MockConsumerProvidersInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockConsumerProvidersInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListProvidersRequest -func (_e *MockConsumerProvidersInterface_Expecter) List(ctx interface{}, request interface{}) *MockConsumerProvidersInterface_List_Call { - return &MockConsumerProvidersInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockConsumerProvidersInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListProvidersRequest)) *MockConsumerProvidersInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_List_Call) Return(_a0 listing.Iterator[marketplace.ProviderInfo]) *MockConsumerProvidersInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockConsumerProvidersInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListProvidersRequest) listing.Iterator[marketplace.ProviderInfo]) *MockConsumerProvidersInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockConsumerProvidersInterface) ListAll(ctx context.Context, request marketplace.ListProvidersRequest) ([]marketplace.ProviderInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) ([]marketplace.ProviderInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) []marketplace.ProviderInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListProvidersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerProvidersInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockConsumerProvidersInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListProvidersRequest -func (_e *MockConsumerProvidersInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockConsumerProvidersInterface_ListAll_Call { - return &MockConsumerProvidersInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockConsumerProvidersInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListProvidersRequest)) *MockConsumerProvidersInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_ListAll_Call) Return(_a0 []marketplace.ProviderInfo, _a1 error) *MockConsumerProvidersInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerProvidersInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListProvidersRequest) ([]marketplace.ProviderInfo, error)) *MockConsumerProvidersInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ProviderInfoNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockConsumerProvidersInterface) ProviderInfoNameToIdMap(ctx context.Context, request marketplace.ListProvidersRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ProviderInfoNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListProvidersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProviderInfoNameToIdMap' -type MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call struct { - *mock.Call -} - -// ProviderInfoNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListProvidersRequest -func (_e *MockConsumerProvidersInterface_Expecter) ProviderInfoNameToIdMap(ctx interface{}, request interface{}) *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call { - return &MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call{Call: _e.mock.On("ProviderInfoNameToIdMap", ctx, request)} -} - -func (_c *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListProvidersRequest)) *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListProvidersRequest) (map[string]string, error)) *MockConsumerProvidersInterface_ProviderInfoNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockConsumerProvidersInterface creates a new instance of MockConsumerProvidersInterface. 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 NewMockConsumerProvidersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockConsumerProvidersInterface { - mock := &MockConsumerProvidersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_provider_exchange_filters_interface.go b/experimental/mocks/service/marketplace/mock_provider_exchange_filters_interface.go deleted file mode 100644 index 1e7826be3..000000000 --- a/experimental/mocks/service/marketplace/mock_provider_exchange_filters_interface.go +++ /dev/null @@ -1,477 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockProviderExchangeFiltersInterface is an autogenerated mock type for the ProviderExchangeFiltersInterface type -type MockProviderExchangeFiltersInterface struct { - mock.Mock -} - -type MockProviderExchangeFiltersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProviderExchangeFiltersInterface) EXPECT() *MockProviderExchangeFiltersInterface_Expecter { - return &MockProviderExchangeFiltersInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangeFiltersInterface) Create(ctx context.Context, request marketplace.CreateExchangeFilterRequest) (*marketplace.CreateExchangeFilterResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.CreateExchangeFilterResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateExchangeFilterRequest) (*marketplace.CreateExchangeFilterResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateExchangeFilterRequest) *marketplace.CreateExchangeFilterResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.CreateExchangeFilterResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.CreateExchangeFilterRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangeFiltersInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockProviderExchangeFiltersInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.CreateExchangeFilterRequest -func (_e *MockProviderExchangeFiltersInterface_Expecter) Create(ctx interface{}, request interface{}) *MockProviderExchangeFiltersInterface_Create_Call { - return &MockProviderExchangeFiltersInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockProviderExchangeFiltersInterface_Create_Call) Run(run func(ctx context.Context, request marketplace.CreateExchangeFilterRequest)) *MockProviderExchangeFiltersInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.CreateExchangeFilterRequest)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Create_Call) Return(_a0 *marketplace.CreateExchangeFilterResponse, _a1 error) *MockProviderExchangeFiltersInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Create_Call) RunAndReturn(run func(context.Context, marketplace.CreateExchangeFilterRequest) (*marketplace.CreateExchangeFilterResponse, error)) *MockProviderExchangeFiltersInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangeFiltersInterface) Delete(ctx context.Context, request marketplace.DeleteExchangeFilterRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.DeleteExchangeFilterRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderExchangeFiltersInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockProviderExchangeFiltersInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.DeleteExchangeFilterRequest -func (_e *MockProviderExchangeFiltersInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockProviderExchangeFiltersInterface_Delete_Call { - return &MockProviderExchangeFiltersInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockProviderExchangeFiltersInterface_Delete_Call) Run(run func(ctx context.Context, request marketplace.DeleteExchangeFilterRequest)) *MockProviderExchangeFiltersInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.DeleteExchangeFilterRequest)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Delete_Call) Return(_a0 error) *MockProviderExchangeFiltersInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Delete_Call) RunAndReturn(run func(context.Context, marketplace.DeleteExchangeFilterRequest) error) *MockProviderExchangeFiltersInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockProviderExchangeFiltersInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderExchangeFiltersInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockProviderExchangeFiltersInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderExchangeFiltersInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockProviderExchangeFiltersInterface_DeleteById_Call { - return &MockProviderExchangeFiltersInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockProviderExchangeFiltersInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockProviderExchangeFiltersInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_DeleteById_Call) Return(_a0 error) *MockProviderExchangeFiltersInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockProviderExchangeFiltersInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// ExchangeFilterNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangeFiltersInterface) ExchangeFilterNameToIdMap(ctx context.Context, request marketplace.ListExchangeFiltersRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExchangeFilterNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangeFiltersRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangeFiltersRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListExchangeFiltersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeFilterNameToIdMap' -type MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call struct { - *mock.Call -} - -// ExchangeFilterNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangeFiltersRequest -func (_e *MockProviderExchangeFiltersInterface_Expecter) ExchangeFilterNameToIdMap(ctx interface{}, request interface{}) *MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call { - return &MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call{Call: _e.mock.On("ExchangeFilterNameToIdMap", ctx, request)} -} - -func (_c *MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListExchangeFiltersRequest)) *MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangeFiltersRequest)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangeFiltersRequest) (map[string]string, error)) *MockProviderExchangeFiltersInterface_ExchangeFilterNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockProviderExchangeFiltersInterface) GetByName(ctx context.Context, name string) (*marketplace.ExchangeFilter, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *marketplace.ExchangeFilter - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.ExchangeFilter, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.ExchangeFilter); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ExchangeFilter) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangeFiltersInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockProviderExchangeFiltersInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProviderExchangeFiltersInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockProviderExchangeFiltersInterface_GetByName_Call { - return &MockProviderExchangeFiltersInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockProviderExchangeFiltersInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockProviderExchangeFiltersInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_GetByName_Call) Return(_a0 *marketplace.ExchangeFilter, _a1 error) *MockProviderExchangeFiltersInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.ExchangeFilter, error)) *MockProviderExchangeFiltersInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangeFiltersInterface) List(ctx context.Context, request marketplace.ListExchangeFiltersRequest) listing.Iterator[marketplace.ExchangeFilter] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.ExchangeFilter] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangeFiltersRequest) listing.Iterator[marketplace.ExchangeFilter]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.ExchangeFilter]) - } - } - - return r0 -} - -// MockProviderExchangeFiltersInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockProviderExchangeFiltersInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangeFiltersRequest -func (_e *MockProviderExchangeFiltersInterface_Expecter) List(ctx interface{}, request interface{}) *MockProviderExchangeFiltersInterface_List_Call { - return &MockProviderExchangeFiltersInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockProviderExchangeFiltersInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListExchangeFiltersRequest)) *MockProviderExchangeFiltersInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangeFiltersRequest)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_List_Call) Return(_a0 listing.Iterator[marketplace.ExchangeFilter]) *MockProviderExchangeFiltersInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangeFiltersRequest) listing.Iterator[marketplace.ExchangeFilter]) *MockProviderExchangeFiltersInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangeFiltersInterface) ListAll(ctx context.Context, request marketplace.ListExchangeFiltersRequest) ([]marketplace.ExchangeFilter, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.ExchangeFilter - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangeFiltersRequest) ([]marketplace.ExchangeFilter, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangeFiltersRequest) []marketplace.ExchangeFilter); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.ExchangeFilter) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListExchangeFiltersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangeFiltersInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockProviderExchangeFiltersInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangeFiltersRequest -func (_e *MockProviderExchangeFiltersInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockProviderExchangeFiltersInterface_ListAll_Call { - return &MockProviderExchangeFiltersInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockProviderExchangeFiltersInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListExchangeFiltersRequest)) *MockProviderExchangeFiltersInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangeFiltersRequest)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_ListAll_Call) Return(_a0 []marketplace.ExchangeFilter, _a1 error) *MockProviderExchangeFiltersInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangeFiltersRequest) ([]marketplace.ExchangeFilter, error)) *MockProviderExchangeFiltersInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangeFiltersInterface) Update(ctx context.Context, request marketplace.UpdateExchangeFilterRequest) (*marketplace.UpdateExchangeFilterResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *marketplace.UpdateExchangeFilterResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateExchangeFilterRequest) (*marketplace.UpdateExchangeFilterResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateExchangeFilterRequest) *marketplace.UpdateExchangeFilterResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.UpdateExchangeFilterResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.UpdateExchangeFilterRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangeFiltersInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockProviderExchangeFiltersInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.UpdateExchangeFilterRequest -func (_e *MockProviderExchangeFiltersInterface_Expecter) Update(ctx interface{}, request interface{}) *MockProviderExchangeFiltersInterface_Update_Call { - return &MockProviderExchangeFiltersInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockProviderExchangeFiltersInterface_Update_Call) Run(run func(ctx context.Context, request marketplace.UpdateExchangeFilterRequest)) *MockProviderExchangeFiltersInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.UpdateExchangeFilterRequest)) - }) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Update_Call) Return(_a0 *marketplace.UpdateExchangeFilterResponse, _a1 error) *MockProviderExchangeFiltersInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangeFiltersInterface_Update_Call) RunAndReturn(run func(context.Context, marketplace.UpdateExchangeFilterRequest) (*marketplace.UpdateExchangeFilterResponse, error)) *MockProviderExchangeFiltersInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProviderExchangeFiltersInterface creates a new instance of MockProviderExchangeFiltersInterface. 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 NewMockProviderExchangeFiltersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProviderExchangeFiltersInterface { - mock := &MockProviderExchangeFiltersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_provider_exchanges_interface.go b/experimental/mocks/service/marketplace/mock_provider_exchanges_interface.go deleted file mode 100644 index 4c03760ad..000000000 --- a/experimental/mocks/service/marketplace/mock_provider_exchanges_interface.go +++ /dev/null @@ -1,1200 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockProviderExchangesInterface is an autogenerated mock type for the ProviderExchangesInterface type -type MockProviderExchangesInterface struct { - mock.Mock -} - -type MockProviderExchangesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProviderExchangesInterface) EXPECT() *MockProviderExchangesInterface_Expecter { - return &MockProviderExchangesInterface_Expecter{mock: &_m.Mock} -} - -// AddListingToExchange provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) AddListingToExchange(ctx context.Context, request marketplace.AddExchangeForListingRequest) (*marketplace.AddExchangeForListingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for AddListingToExchange") - } - - var r0 *marketplace.AddExchangeForListingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.AddExchangeForListingRequest) (*marketplace.AddExchangeForListingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.AddExchangeForListingRequest) *marketplace.AddExchangeForListingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.AddExchangeForListingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.AddExchangeForListingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_AddListingToExchange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddListingToExchange' -type MockProviderExchangesInterface_AddListingToExchange_Call struct { - *mock.Call -} - -// AddListingToExchange is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.AddExchangeForListingRequest -func (_e *MockProviderExchangesInterface_Expecter) AddListingToExchange(ctx interface{}, request interface{}) *MockProviderExchangesInterface_AddListingToExchange_Call { - return &MockProviderExchangesInterface_AddListingToExchange_Call{Call: _e.mock.On("AddListingToExchange", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_AddListingToExchange_Call) Run(run func(ctx context.Context, request marketplace.AddExchangeForListingRequest)) *MockProviderExchangesInterface_AddListingToExchange_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.AddExchangeForListingRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_AddListingToExchange_Call) Return(_a0 *marketplace.AddExchangeForListingResponse, _a1 error) *MockProviderExchangesInterface_AddListingToExchange_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_AddListingToExchange_Call) RunAndReturn(run func(context.Context, marketplace.AddExchangeForListingRequest) (*marketplace.AddExchangeForListingResponse, error)) *MockProviderExchangesInterface_AddListingToExchange_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) Create(ctx context.Context, request marketplace.CreateExchangeRequest) (*marketplace.CreateExchangeResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.CreateExchangeResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateExchangeRequest) (*marketplace.CreateExchangeResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateExchangeRequest) *marketplace.CreateExchangeResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.CreateExchangeResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.CreateExchangeRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockProviderExchangesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.CreateExchangeRequest -func (_e *MockProviderExchangesInterface_Expecter) Create(ctx interface{}, request interface{}) *MockProviderExchangesInterface_Create_Call { - return &MockProviderExchangesInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_Create_Call) Run(run func(ctx context.Context, request marketplace.CreateExchangeRequest)) *MockProviderExchangesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.CreateExchangeRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_Create_Call) Return(_a0 *marketplace.CreateExchangeResponse, _a1 error) *MockProviderExchangesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_Create_Call) RunAndReturn(run func(context.Context, marketplace.CreateExchangeRequest) (*marketplace.CreateExchangeResponse, error)) *MockProviderExchangesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) Delete(ctx context.Context, request marketplace.DeleteExchangeRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.DeleteExchangeRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderExchangesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockProviderExchangesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.DeleteExchangeRequest -func (_e *MockProviderExchangesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockProviderExchangesInterface_Delete_Call { - return &MockProviderExchangesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_Delete_Call) Run(run func(ctx context.Context, request marketplace.DeleteExchangeRequest)) *MockProviderExchangesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.DeleteExchangeRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_Delete_Call) Return(_a0 error) *MockProviderExchangesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_Delete_Call) RunAndReturn(run func(context.Context, marketplace.DeleteExchangeRequest) error) *MockProviderExchangesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockProviderExchangesInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderExchangesInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockProviderExchangesInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderExchangesInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockProviderExchangesInterface_DeleteById_Call { - return &MockProviderExchangesInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockProviderExchangesInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockProviderExchangesInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_DeleteById_Call) Return(_a0 error) *MockProviderExchangesInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockProviderExchangesInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// DeleteListingFromExchange provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) DeleteListingFromExchange(ctx context.Context, request marketplace.RemoveExchangeForListingRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteListingFromExchange") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.RemoveExchangeForListingRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderExchangesInterface_DeleteListingFromExchange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteListingFromExchange' -type MockProviderExchangesInterface_DeleteListingFromExchange_Call struct { - *mock.Call -} - -// DeleteListingFromExchange is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.RemoveExchangeForListingRequest -func (_e *MockProviderExchangesInterface_Expecter) DeleteListingFromExchange(ctx interface{}, request interface{}) *MockProviderExchangesInterface_DeleteListingFromExchange_Call { - return &MockProviderExchangesInterface_DeleteListingFromExchange_Call{Call: _e.mock.On("DeleteListingFromExchange", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_DeleteListingFromExchange_Call) Run(run func(ctx context.Context, request marketplace.RemoveExchangeForListingRequest)) *MockProviderExchangesInterface_DeleteListingFromExchange_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.RemoveExchangeForListingRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_DeleteListingFromExchange_Call) Return(_a0 error) *MockProviderExchangesInterface_DeleteListingFromExchange_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_DeleteListingFromExchange_Call) RunAndReturn(run func(context.Context, marketplace.RemoveExchangeForListingRequest) error) *MockProviderExchangesInterface_DeleteListingFromExchange_Call { - _c.Call.Return(run) - return _c -} - -// DeleteListingFromExchangeById provides a mock function with given fields: ctx, id -func (_m *MockProviderExchangesInterface) DeleteListingFromExchangeById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteListingFromExchangeById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderExchangesInterface_DeleteListingFromExchangeById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteListingFromExchangeById' -type MockProviderExchangesInterface_DeleteListingFromExchangeById_Call struct { - *mock.Call -} - -// DeleteListingFromExchangeById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderExchangesInterface_Expecter) DeleteListingFromExchangeById(ctx interface{}, id interface{}) *MockProviderExchangesInterface_DeleteListingFromExchangeById_Call { - return &MockProviderExchangesInterface_DeleteListingFromExchangeById_Call{Call: _e.mock.On("DeleteListingFromExchangeById", ctx, id)} -} - -func (_c *MockProviderExchangesInterface_DeleteListingFromExchangeById_Call) Run(run func(ctx context.Context, id string)) *MockProviderExchangesInterface_DeleteListingFromExchangeById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_DeleteListingFromExchangeById_Call) Return(_a0 error) *MockProviderExchangesInterface_DeleteListingFromExchangeById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_DeleteListingFromExchangeById_Call) RunAndReturn(run func(context.Context, string) error) *MockProviderExchangesInterface_DeleteListingFromExchangeById_Call { - _c.Call.Return(run) - return _c -} - -// ExchangeListingExchangeNameToExchangeIdMap provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ExchangeListingExchangeNameToExchangeIdMap(ctx context.Context, request marketplace.ListExchangesForListingRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExchangeListingExchangeNameToExchangeIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesForListingRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesForListingRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListExchangesForListingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeListingExchangeNameToExchangeIdMap' -type MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call struct { - *mock.Call -} - -// ExchangeListingExchangeNameToExchangeIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangesForListingRequest -func (_e *MockProviderExchangesInterface_Expecter) ExchangeListingExchangeNameToExchangeIdMap(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call { - return &MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call{Call: _e.mock.On("ExchangeListingExchangeNameToExchangeIdMap", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListExchangesForListingRequest)) *MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangesForListingRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangesForListingRequest) (map[string]string, error)) *MockProviderExchangesInterface_ExchangeListingExchangeNameToExchangeIdMap_Call { - _c.Call.Return(run) - return _c -} - -// ExchangeListingListingNameToListingIdMap provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ExchangeListingListingNameToListingIdMap(ctx context.Context, request marketplace.ListListingsForExchangeRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExchangeListingListingNameToListingIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsForExchangeRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsForExchangeRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListListingsForExchangeRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeListingListingNameToListingIdMap' -type MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call struct { - *mock.Call -} - -// ExchangeListingListingNameToListingIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListListingsForExchangeRequest -func (_e *MockProviderExchangesInterface_Expecter) ExchangeListingListingNameToListingIdMap(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call { - return &MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call{Call: _e.mock.On("ExchangeListingListingNameToListingIdMap", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListListingsForExchangeRequest)) *MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListListingsForExchangeRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListListingsForExchangeRequest) (map[string]string, error)) *MockProviderExchangesInterface_ExchangeListingListingNameToListingIdMap_Call { - _c.Call.Return(run) - return _c -} - -// ExchangeNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ExchangeNameToIdMap(ctx context.Context, request marketplace.ListExchangesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExchangeNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListExchangesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_ExchangeNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeNameToIdMap' -type MockProviderExchangesInterface_ExchangeNameToIdMap_Call struct { - *mock.Call -} - -// ExchangeNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangesRequest -func (_e *MockProviderExchangesInterface_Expecter) ExchangeNameToIdMap(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ExchangeNameToIdMap_Call { - return &MockProviderExchangesInterface_ExchangeNameToIdMap_Call{Call: _e.mock.On("ExchangeNameToIdMap", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ExchangeNameToIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListExchangesRequest)) *MockProviderExchangesInterface_ExchangeNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangesRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ExchangeNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProviderExchangesInterface_ExchangeNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_ExchangeNameToIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangesRequest) (map[string]string, error)) *MockProviderExchangesInterface_ExchangeNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) Get(ctx context.Context, request marketplace.GetExchangeRequest) (*marketplace.GetExchangeResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.GetExchangeResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetExchangeRequest) (*marketplace.GetExchangeResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetExchangeRequest) *marketplace.GetExchangeResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetExchangeResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetExchangeRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockProviderExchangesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetExchangeRequest -func (_e *MockProviderExchangesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockProviderExchangesInterface_Get_Call { - return &MockProviderExchangesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetExchangeRequest)) *MockProviderExchangesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetExchangeRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_Get_Call) Return(_a0 *marketplace.GetExchangeResponse, _a1 error) *MockProviderExchangesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetExchangeRequest) (*marketplace.GetExchangeResponse, error)) *MockProviderExchangesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByExchangeName provides a mock function with given fields: ctx, name -func (_m *MockProviderExchangesInterface) GetByExchangeName(ctx context.Context, name string) (*marketplace.ExchangeListing, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByExchangeName") - } - - var r0 *marketplace.ExchangeListing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.ExchangeListing, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.ExchangeListing); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ExchangeListing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_GetByExchangeName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByExchangeName' -type MockProviderExchangesInterface_GetByExchangeName_Call struct { - *mock.Call -} - -// GetByExchangeName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProviderExchangesInterface_Expecter) GetByExchangeName(ctx interface{}, name interface{}) *MockProviderExchangesInterface_GetByExchangeName_Call { - return &MockProviderExchangesInterface_GetByExchangeName_Call{Call: _e.mock.On("GetByExchangeName", ctx, name)} -} - -func (_c *MockProviderExchangesInterface_GetByExchangeName_Call) Run(run func(ctx context.Context, name string)) *MockProviderExchangesInterface_GetByExchangeName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_GetByExchangeName_Call) Return(_a0 *marketplace.ExchangeListing, _a1 error) *MockProviderExchangesInterface_GetByExchangeName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_GetByExchangeName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.ExchangeListing, error)) *MockProviderExchangesInterface_GetByExchangeName_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockProviderExchangesInterface) GetById(ctx context.Context, id string) (*marketplace.GetExchangeResponse, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *marketplace.GetExchangeResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetExchangeResponse, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetExchangeResponse); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetExchangeResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockProviderExchangesInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderExchangesInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockProviderExchangesInterface_GetById_Call { - return &MockProviderExchangesInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockProviderExchangesInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockProviderExchangesInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_GetById_Call) Return(_a0 *marketplace.GetExchangeResponse, _a1 error) *MockProviderExchangesInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetExchangeResponse, error)) *MockProviderExchangesInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetByListingName provides a mock function with given fields: ctx, name -func (_m *MockProviderExchangesInterface) GetByListingName(ctx context.Context, name string) (*marketplace.ExchangeListing, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByListingName") - } - - var r0 *marketplace.ExchangeListing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.ExchangeListing, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.ExchangeListing); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ExchangeListing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_GetByListingName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByListingName' -type MockProviderExchangesInterface_GetByListingName_Call struct { - *mock.Call -} - -// GetByListingName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProviderExchangesInterface_Expecter) GetByListingName(ctx interface{}, name interface{}) *MockProviderExchangesInterface_GetByListingName_Call { - return &MockProviderExchangesInterface_GetByListingName_Call{Call: _e.mock.On("GetByListingName", ctx, name)} -} - -func (_c *MockProviderExchangesInterface_GetByListingName_Call) Run(run func(ctx context.Context, name string)) *MockProviderExchangesInterface_GetByListingName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_GetByListingName_Call) Return(_a0 *marketplace.ExchangeListing, _a1 error) *MockProviderExchangesInterface_GetByListingName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_GetByListingName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.ExchangeListing, error)) *MockProviderExchangesInterface_GetByListingName_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockProviderExchangesInterface) GetByName(ctx context.Context, name string) (*marketplace.Exchange, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *marketplace.Exchange - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.Exchange, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.Exchange); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.Exchange) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockProviderExchangesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProviderExchangesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockProviderExchangesInterface_GetByName_Call { - return &MockProviderExchangesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockProviderExchangesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockProviderExchangesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_GetByName_Call) Return(_a0 *marketplace.Exchange, _a1 error) *MockProviderExchangesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.Exchange, error)) *MockProviderExchangesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) List(ctx context.Context, request marketplace.ListExchangesRequest) listing.Iterator[marketplace.Exchange] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.Exchange] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesRequest) listing.Iterator[marketplace.Exchange]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.Exchange]) - } - } - - return r0 -} - -// MockProviderExchangesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockProviderExchangesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangesRequest -func (_e *MockProviderExchangesInterface_Expecter) List(ctx interface{}, request interface{}) *MockProviderExchangesInterface_List_Call { - return &MockProviderExchangesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListExchangesRequest)) *MockProviderExchangesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangesRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_List_Call) Return(_a0 listing.Iterator[marketplace.Exchange]) *MockProviderExchangesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangesRequest) listing.Iterator[marketplace.Exchange]) *MockProviderExchangesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ListAll(ctx context.Context, request marketplace.ListExchangesRequest) ([]marketplace.Exchange, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.Exchange - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesRequest) ([]marketplace.Exchange, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesRequest) []marketplace.Exchange); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.Exchange) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListExchangesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockProviderExchangesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangesRequest -func (_e *MockProviderExchangesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ListAll_Call { - return &MockProviderExchangesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListExchangesRequest)) *MockProviderExchangesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangesRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ListAll_Call) Return(_a0 []marketplace.Exchange, _a1 error) *MockProviderExchangesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangesRequest) ([]marketplace.Exchange, error)) *MockProviderExchangesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListExchangesForListing provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ListExchangesForListing(ctx context.Context, request marketplace.ListExchangesForListingRequest) listing.Iterator[marketplace.ExchangeListing] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListExchangesForListing") - } - - var r0 listing.Iterator[marketplace.ExchangeListing] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesForListingRequest) listing.Iterator[marketplace.ExchangeListing]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.ExchangeListing]) - } - } - - return r0 -} - -// MockProviderExchangesInterface_ListExchangesForListing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListExchangesForListing' -type MockProviderExchangesInterface_ListExchangesForListing_Call struct { - *mock.Call -} - -// ListExchangesForListing is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangesForListingRequest -func (_e *MockProviderExchangesInterface_Expecter) ListExchangesForListing(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ListExchangesForListing_Call { - return &MockProviderExchangesInterface_ListExchangesForListing_Call{Call: _e.mock.On("ListExchangesForListing", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ListExchangesForListing_Call) Run(run func(ctx context.Context, request marketplace.ListExchangesForListingRequest)) *MockProviderExchangesInterface_ListExchangesForListing_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangesForListingRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ListExchangesForListing_Call) Return(_a0 listing.Iterator[marketplace.ExchangeListing]) *MockProviderExchangesInterface_ListExchangesForListing_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_ListExchangesForListing_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangesForListingRequest) listing.Iterator[marketplace.ExchangeListing]) *MockProviderExchangesInterface_ListExchangesForListing_Call { - _c.Call.Return(run) - return _c -} - -// ListExchangesForListingAll provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ListExchangesForListingAll(ctx context.Context, request marketplace.ListExchangesForListingRequest) ([]marketplace.ExchangeListing, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListExchangesForListingAll") - } - - var r0 []marketplace.ExchangeListing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesForListingRequest) ([]marketplace.ExchangeListing, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListExchangesForListingRequest) []marketplace.ExchangeListing); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.ExchangeListing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListExchangesForListingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_ListExchangesForListingAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListExchangesForListingAll' -type MockProviderExchangesInterface_ListExchangesForListingAll_Call struct { - *mock.Call -} - -// ListExchangesForListingAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListExchangesForListingRequest -func (_e *MockProviderExchangesInterface_Expecter) ListExchangesForListingAll(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ListExchangesForListingAll_Call { - return &MockProviderExchangesInterface_ListExchangesForListingAll_Call{Call: _e.mock.On("ListExchangesForListingAll", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ListExchangesForListingAll_Call) Run(run func(ctx context.Context, request marketplace.ListExchangesForListingRequest)) *MockProviderExchangesInterface_ListExchangesForListingAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListExchangesForListingRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ListExchangesForListingAll_Call) Return(_a0 []marketplace.ExchangeListing, _a1 error) *MockProviderExchangesInterface_ListExchangesForListingAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_ListExchangesForListingAll_Call) RunAndReturn(run func(context.Context, marketplace.ListExchangesForListingRequest) ([]marketplace.ExchangeListing, error)) *MockProviderExchangesInterface_ListExchangesForListingAll_Call { - _c.Call.Return(run) - return _c -} - -// ListListingsForExchange provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ListListingsForExchange(ctx context.Context, request marketplace.ListListingsForExchangeRequest) listing.Iterator[marketplace.ExchangeListing] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListListingsForExchange") - } - - var r0 listing.Iterator[marketplace.ExchangeListing] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsForExchangeRequest) listing.Iterator[marketplace.ExchangeListing]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.ExchangeListing]) - } - } - - return r0 -} - -// MockProviderExchangesInterface_ListListingsForExchange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListListingsForExchange' -type MockProviderExchangesInterface_ListListingsForExchange_Call struct { - *mock.Call -} - -// ListListingsForExchange is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListListingsForExchangeRequest -func (_e *MockProviderExchangesInterface_Expecter) ListListingsForExchange(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ListListingsForExchange_Call { - return &MockProviderExchangesInterface_ListListingsForExchange_Call{Call: _e.mock.On("ListListingsForExchange", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ListListingsForExchange_Call) Run(run func(ctx context.Context, request marketplace.ListListingsForExchangeRequest)) *MockProviderExchangesInterface_ListListingsForExchange_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListListingsForExchangeRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ListListingsForExchange_Call) Return(_a0 listing.Iterator[marketplace.ExchangeListing]) *MockProviderExchangesInterface_ListListingsForExchange_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderExchangesInterface_ListListingsForExchange_Call) RunAndReturn(run func(context.Context, marketplace.ListListingsForExchangeRequest) listing.Iterator[marketplace.ExchangeListing]) *MockProviderExchangesInterface_ListListingsForExchange_Call { - _c.Call.Return(run) - return _c -} - -// ListListingsForExchangeAll provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) ListListingsForExchangeAll(ctx context.Context, request marketplace.ListListingsForExchangeRequest) ([]marketplace.ExchangeListing, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListListingsForExchangeAll") - } - - var r0 []marketplace.ExchangeListing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsForExchangeRequest) ([]marketplace.ExchangeListing, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListListingsForExchangeRequest) []marketplace.ExchangeListing); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.ExchangeListing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListListingsForExchangeRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_ListListingsForExchangeAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListListingsForExchangeAll' -type MockProviderExchangesInterface_ListListingsForExchangeAll_Call struct { - *mock.Call -} - -// ListListingsForExchangeAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListListingsForExchangeRequest -func (_e *MockProviderExchangesInterface_Expecter) ListListingsForExchangeAll(ctx interface{}, request interface{}) *MockProviderExchangesInterface_ListListingsForExchangeAll_Call { - return &MockProviderExchangesInterface_ListListingsForExchangeAll_Call{Call: _e.mock.On("ListListingsForExchangeAll", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_ListListingsForExchangeAll_Call) Run(run func(ctx context.Context, request marketplace.ListListingsForExchangeRequest)) *MockProviderExchangesInterface_ListListingsForExchangeAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListListingsForExchangeRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_ListListingsForExchangeAll_Call) Return(_a0 []marketplace.ExchangeListing, _a1 error) *MockProviderExchangesInterface_ListListingsForExchangeAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_ListListingsForExchangeAll_Call) RunAndReturn(run func(context.Context, marketplace.ListListingsForExchangeRequest) ([]marketplace.ExchangeListing, error)) *MockProviderExchangesInterface_ListListingsForExchangeAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockProviderExchangesInterface) Update(ctx context.Context, request marketplace.UpdateExchangeRequest) (*marketplace.UpdateExchangeResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *marketplace.UpdateExchangeResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateExchangeRequest) (*marketplace.UpdateExchangeResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateExchangeRequest) *marketplace.UpdateExchangeResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.UpdateExchangeResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.UpdateExchangeRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderExchangesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockProviderExchangesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.UpdateExchangeRequest -func (_e *MockProviderExchangesInterface_Expecter) Update(ctx interface{}, request interface{}) *MockProviderExchangesInterface_Update_Call { - return &MockProviderExchangesInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockProviderExchangesInterface_Update_Call) Run(run func(ctx context.Context, request marketplace.UpdateExchangeRequest)) *MockProviderExchangesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.UpdateExchangeRequest)) - }) - return _c -} - -func (_c *MockProviderExchangesInterface_Update_Call) Return(_a0 *marketplace.UpdateExchangeResponse, _a1 error) *MockProviderExchangesInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderExchangesInterface_Update_Call) RunAndReturn(run func(context.Context, marketplace.UpdateExchangeRequest) (*marketplace.UpdateExchangeResponse, error)) *MockProviderExchangesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProviderExchangesInterface creates a new instance of MockProviderExchangesInterface. 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 NewMockProviderExchangesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProviderExchangesInterface { - mock := &MockProviderExchangesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_provider_files_interface.go b/experimental/mocks/service/marketplace/mock_provider_files_interface.go deleted file mode 100644 index 4c05d72af..000000000 --- a/experimental/mocks/service/marketplace/mock_provider_files_interface.go +++ /dev/null @@ -1,536 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockProviderFilesInterface is an autogenerated mock type for the ProviderFilesInterface type -type MockProviderFilesInterface struct { - mock.Mock -} - -type MockProviderFilesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProviderFilesInterface) EXPECT() *MockProviderFilesInterface_Expecter { - return &MockProviderFilesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockProviderFilesInterface) Create(ctx context.Context, request marketplace.CreateFileRequest) (*marketplace.CreateFileResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.CreateFileResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateFileRequest) (*marketplace.CreateFileResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateFileRequest) *marketplace.CreateFileResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.CreateFileResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.CreateFileRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderFilesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockProviderFilesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.CreateFileRequest -func (_e *MockProviderFilesInterface_Expecter) Create(ctx interface{}, request interface{}) *MockProviderFilesInterface_Create_Call { - return &MockProviderFilesInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockProviderFilesInterface_Create_Call) Run(run func(ctx context.Context, request marketplace.CreateFileRequest)) *MockProviderFilesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.CreateFileRequest)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_Create_Call) Return(_a0 *marketplace.CreateFileResponse, _a1 error) *MockProviderFilesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderFilesInterface_Create_Call) RunAndReturn(run func(context.Context, marketplace.CreateFileRequest) (*marketplace.CreateFileResponse, error)) *MockProviderFilesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockProviderFilesInterface) Delete(ctx context.Context, request marketplace.DeleteFileRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.DeleteFileRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderFilesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockProviderFilesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.DeleteFileRequest -func (_e *MockProviderFilesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockProviderFilesInterface_Delete_Call { - return &MockProviderFilesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockProviderFilesInterface_Delete_Call) Run(run func(ctx context.Context, request marketplace.DeleteFileRequest)) *MockProviderFilesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.DeleteFileRequest)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_Delete_Call) Return(_a0 error) *MockProviderFilesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderFilesInterface_Delete_Call) RunAndReturn(run func(context.Context, marketplace.DeleteFileRequest) error) *MockProviderFilesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByFileId provides a mock function with given fields: ctx, fileId -func (_m *MockProviderFilesInterface) DeleteByFileId(ctx context.Context, fileId string) error { - ret := _m.Called(ctx, fileId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByFileId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, fileId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderFilesInterface_DeleteByFileId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByFileId' -type MockProviderFilesInterface_DeleteByFileId_Call struct { - *mock.Call -} - -// DeleteByFileId is a helper method to define mock.On call -// - ctx context.Context -// - fileId string -func (_e *MockProviderFilesInterface_Expecter) DeleteByFileId(ctx interface{}, fileId interface{}) *MockProviderFilesInterface_DeleteByFileId_Call { - return &MockProviderFilesInterface_DeleteByFileId_Call{Call: _e.mock.On("DeleteByFileId", ctx, fileId)} -} - -func (_c *MockProviderFilesInterface_DeleteByFileId_Call) Run(run func(ctx context.Context, fileId string)) *MockProviderFilesInterface_DeleteByFileId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_DeleteByFileId_Call) Return(_a0 error) *MockProviderFilesInterface_DeleteByFileId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderFilesInterface_DeleteByFileId_Call) RunAndReturn(run func(context.Context, string) error) *MockProviderFilesInterface_DeleteByFileId_Call { - _c.Call.Return(run) - return _c -} - -// FileInfoDisplayNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockProviderFilesInterface) FileInfoDisplayNameToIdMap(ctx context.Context, request marketplace.ListFilesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for FileInfoDisplayNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFilesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFilesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListFilesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FileInfoDisplayNameToIdMap' -type MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call struct { - *mock.Call -} - -// FileInfoDisplayNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListFilesRequest -func (_e *MockProviderFilesInterface_Expecter) FileInfoDisplayNameToIdMap(ctx interface{}, request interface{}) *MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call { - return &MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call{Call: _e.mock.On("FileInfoDisplayNameToIdMap", ctx, request)} -} - -func (_c *MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListFilesRequest)) *MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListFilesRequest)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListFilesRequest) (map[string]string, error)) *MockProviderFilesInterface_FileInfoDisplayNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockProviderFilesInterface) Get(ctx context.Context, request marketplace.GetFileRequest) (*marketplace.GetFileResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.GetFileResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetFileRequest) (*marketplace.GetFileResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetFileRequest) *marketplace.GetFileResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetFileResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetFileRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderFilesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockProviderFilesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetFileRequest -func (_e *MockProviderFilesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockProviderFilesInterface_Get_Call { - return &MockProviderFilesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockProviderFilesInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetFileRequest)) *MockProviderFilesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetFileRequest)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_Get_Call) Return(_a0 *marketplace.GetFileResponse, _a1 error) *MockProviderFilesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderFilesInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetFileRequest) (*marketplace.GetFileResponse, error)) *MockProviderFilesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDisplayName provides a mock function with given fields: ctx, name -func (_m *MockProviderFilesInterface) GetByDisplayName(ctx context.Context, name string) (*marketplace.FileInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByDisplayName") - } - - var r0 *marketplace.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.FileInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.FileInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderFilesInterface_GetByDisplayName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDisplayName' -type MockProviderFilesInterface_GetByDisplayName_Call struct { - *mock.Call -} - -// GetByDisplayName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProviderFilesInterface_Expecter) GetByDisplayName(ctx interface{}, name interface{}) *MockProviderFilesInterface_GetByDisplayName_Call { - return &MockProviderFilesInterface_GetByDisplayName_Call{Call: _e.mock.On("GetByDisplayName", ctx, name)} -} - -func (_c *MockProviderFilesInterface_GetByDisplayName_Call) Run(run func(ctx context.Context, name string)) *MockProviderFilesInterface_GetByDisplayName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_GetByDisplayName_Call) Return(_a0 *marketplace.FileInfo, _a1 error) *MockProviderFilesInterface_GetByDisplayName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderFilesInterface_GetByDisplayName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.FileInfo, error)) *MockProviderFilesInterface_GetByDisplayName_Call { - _c.Call.Return(run) - return _c -} - -// GetByFileId provides a mock function with given fields: ctx, fileId -func (_m *MockProviderFilesInterface) GetByFileId(ctx context.Context, fileId string) (*marketplace.GetFileResponse, error) { - ret := _m.Called(ctx, fileId) - - if len(ret) == 0 { - panic("no return value specified for GetByFileId") - } - - var r0 *marketplace.GetFileResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetFileResponse, error)); ok { - return rf(ctx, fileId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetFileResponse); ok { - r0 = rf(ctx, fileId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetFileResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, fileId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderFilesInterface_GetByFileId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByFileId' -type MockProviderFilesInterface_GetByFileId_Call struct { - *mock.Call -} - -// GetByFileId is a helper method to define mock.On call -// - ctx context.Context -// - fileId string -func (_e *MockProviderFilesInterface_Expecter) GetByFileId(ctx interface{}, fileId interface{}) *MockProviderFilesInterface_GetByFileId_Call { - return &MockProviderFilesInterface_GetByFileId_Call{Call: _e.mock.On("GetByFileId", ctx, fileId)} -} - -func (_c *MockProviderFilesInterface_GetByFileId_Call) Run(run func(ctx context.Context, fileId string)) *MockProviderFilesInterface_GetByFileId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_GetByFileId_Call) Return(_a0 *marketplace.GetFileResponse, _a1 error) *MockProviderFilesInterface_GetByFileId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderFilesInterface_GetByFileId_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetFileResponse, error)) *MockProviderFilesInterface_GetByFileId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockProviderFilesInterface) List(ctx context.Context, request marketplace.ListFilesRequest) listing.Iterator[marketplace.FileInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.FileInfo] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFilesRequest) listing.Iterator[marketplace.FileInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.FileInfo]) - } - } - - return r0 -} - -// MockProviderFilesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockProviderFilesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListFilesRequest -func (_e *MockProviderFilesInterface_Expecter) List(ctx interface{}, request interface{}) *MockProviderFilesInterface_List_Call { - return &MockProviderFilesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockProviderFilesInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListFilesRequest)) *MockProviderFilesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListFilesRequest)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_List_Call) Return(_a0 listing.Iterator[marketplace.FileInfo]) *MockProviderFilesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderFilesInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListFilesRequest) listing.Iterator[marketplace.FileInfo]) *MockProviderFilesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockProviderFilesInterface) ListAll(ctx context.Context, request marketplace.ListFilesRequest) ([]marketplace.FileInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFilesRequest) ([]marketplace.FileInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListFilesRequest) []marketplace.FileInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListFilesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderFilesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockProviderFilesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListFilesRequest -func (_e *MockProviderFilesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockProviderFilesInterface_ListAll_Call { - return &MockProviderFilesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockProviderFilesInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListFilesRequest)) *MockProviderFilesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListFilesRequest)) - }) - return _c -} - -func (_c *MockProviderFilesInterface_ListAll_Call) Return(_a0 []marketplace.FileInfo, _a1 error) *MockProviderFilesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderFilesInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListFilesRequest) ([]marketplace.FileInfo, error)) *MockProviderFilesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProviderFilesInterface creates a new instance of MockProviderFilesInterface. 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 NewMockProviderFilesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProviderFilesInterface { - mock := &MockProviderFilesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_provider_listings_interface.go b/experimental/mocks/service/marketplace/mock_provider_listings_interface.go deleted file mode 100644 index b1c0a55bc..000000000 --- a/experimental/mocks/service/marketplace/mock_provider_listings_interface.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockProviderListingsInterface is an autogenerated mock type for the ProviderListingsInterface type -type MockProviderListingsInterface struct { - mock.Mock -} - -type MockProviderListingsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProviderListingsInterface) EXPECT() *MockProviderListingsInterface_Expecter { - return &MockProviderListingsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockProviderListingsInterface) Create(ctx context.Context, request marketplace.CreateListingRequest) (*marketplace.CreateListingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.CreateListingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateListingRequest) (*marketplace.CreateListingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateListingRequest) *marketplace.CreateListingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.CreateListingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.CreateListingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderListingsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockProviderListingsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.CreateListingRequest -func (_e *MockProviderListingsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockProviderListingsInterface_Create_Call { - return &MockProviderListingsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockProviderListingsInterface_Create_Call) Run(run func(ctx context.Context, request marketplace.CreateListingRequest)) *MockProviderListingsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.CreateListingRequest)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_Create_Call) Return(_a0 *marketplace.CreateListingResponse, _a1 error) *MockProviderListingsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderListingsInterface_Create_Call) RunAndReturn(run func(context.Context, marketplace.CreateListingRequest) (*marketplace.CreateListingResponse, error)) *MockProviderListingsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockProviderListingsInterface) Delete(ctx context.Context, request marketplace.DeleteListingRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.DeleteListingRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderListingsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockProviderListingsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.DeleteListingRequest -func (_e *MockProviderListingsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockProviderListingsInterface_Delete_Call { - return &MockProviderListingsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockProviderListingsInterface_Delete_Call) Run(run func(ctx context.Context, request marketplace.DeleteListingRequest)) *MockProviderListingsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.DeleteListingRequest)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_Delete_Call) Return(_a0 error) *MockProviderListingsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderListingsInterface_Delete_Call) RunAndReturn(run func(context.Context, marketplace.DeleteListingRequest) error) *MockProviderListingsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockProviderListingsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderListingsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockProviderListingsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderListingsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockProviderListingsInterface_DeleteById_Call { - return &MockProviderListingsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockProviderListingsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockProviderListingsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_DeleteById_Call) Return(_a0 error) *MockProviderListingsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderListingsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockProviderListingsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockProviderListingsInterface) Get(ctx context.Context, request marketplace.GetListingRequest) (*marketplace.GetListingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.GetListingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingRequest) (*marketplace.GetListingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingRequest) *marketplace.GetListingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetListingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetListingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderListingsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockProviderListingsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetListingRequest -func (_e *MockProviderListingsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockProviderListingsInterface_Get_Call { - return &MockProviderListingsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockProviderListingsInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetListingRequest)) *MockProviderListingsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetListingRequest)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_Get_Call) Return(_a0 *marketplace.GetListingResponse, _a1 error) *MockProviderListingsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderListingsInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetListingRequest) (*marketplace.GetListingResponse, error)) *MockProviderListingsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockProviderListingsInterface) GetById(ctx context.Context, id string) (*marketplace.GetListingResponse, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *marketplace.GetListingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetListingResponse, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetListingResponse); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetListingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderListingsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockProviderListingsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderListingsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockProviderListingsInterface_GetById_Call { - return &MockProviderListingsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockProviderListingsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockProviderListingsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_GetById_Call) Return(_a0 *marketplace.GetListingResponse, _a1 error) *MockProviderListingsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderListingsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetListingResponse, error)) *MockProviderListingsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetBySummaryName provides a mock function with given fields: ctx, name -func (_m *MockProviderListingsInterface) GetBySummaryName(ctx context.Context, name string) (*marketplace.Listing, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetBySummaryName") - } - - var r0 *marketplace.Listing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.Listing, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.Listing); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.Listing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderListingsInterface_GetBySummaryName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBySummaryName' -type MockProviderListingsInterface_GetBySummaryName_Call struct { - *mock.Call -} - -// GetBySummaryName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProviderListingsInterface_Expecter) GetBySummaryName(ctx interface{}, name interface{}) *MockProviderListingsInterface_GetBySummaryName_Call { - return &MockProviderListingsInterface_GetBySummaryName_Call{Call: _e.mock.On("GetBySummaryName", ctx, name)} -} - -func (_c *MockProviderListingsInterface_GetBySummaryName_Call) Run(run func(ctx context.Context, name string)) *MockProviderListingsInterface_GetBySummaryName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_GetBySummaryName_Call) Return(_a0 *marketplace.Listing, _a1 error) *MockProviderListingsInterface_GetBySummaryName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderListingsInterface_GetBySummaryName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.Listing, error)) *MockProviderListingsInterface_GetBySummaryName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockProviderListingsInterface) List(ctx context.Context, request marketplace.GetListingsRequest) listing.Iterator[marketplace.Listing] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.Listing] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingsRequest) listing.Iterator[marketplace.Listing]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.Listing]) - } - } - - return r0 -} - -// MockProviderListingsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockProviderListingsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetListingsRequest -func (_e *MockProviderListingsInterface_Expecter) List(ctx interface{}, request interface{}) *MockProviderListingsInterface_List_Call { - return &MockProviderListingsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockProviderListingsInterface_List_Call) Run(run func(ctx context.Context, request marketplace.GetListingsRequest)) *MockProviderListingsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetListingsRequest)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_List_Call) Return(_a0 listing.Iterator[marketplace.Listing]) *MockProviderListingsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderListingsInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.GetListingsRequest) listing.Iterator[marketplace.Listing]) *MockProviderListingsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockProviderListingsInterface) ListAll(ctx context.Context, request marketplace.GetListingsRequest) ([]marketplace.Listing, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.Listing - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingsRequest) ([]marketplace.Listing, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingsRequest) []marketplace.Listing); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.Listing) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetListingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderListingsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockProviderListingsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetListingsRequest -func (_e *MockProviderListingsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockProviderListingsInterface_ListAll_Call { - return &MockProviderListingsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockProviderListingsInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.GetListingsRequest)) *MockProviderListingsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetListingsRequest)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_ListAll_Call) Return(_a0 []marketplace.Listing, _a1 error) *MockProviderListingsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderListingsInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.GetListingsRequest) ([]marketplace.Listing, error)) *MockProviderListingsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListingSummaryNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockProviderListingsInterface) ListingSummaryNameToIdMap(ctx context.Context, request marketplace.GetListingsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListingSummaryNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetListingsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetListingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderListingsInterface_ListingSummaryNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListingSummaryNameToIdMap' -type MockProviderListingsInterface_ListingSummaryNameToIdMap_Call struct { - *mock.Call -} - -// ListingSummaryNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetListingsRequest -func (_e *MockProviderListingsInterface_Expecter) ListingSummaryNameToIdMap(ctx interface{}, request interface{}) *MockProviderListingsInterface_ListingSummaryNameToIdMap_Call { - return &MockProviderListingsInterface_ListingSummaryNameToIdMap_Call{Call: _e.mock.On("ListingSummaryNameToIdMap", ctx, request)} -} - -func (_c *MockProviderListingsInterface_ListingSummaryNameToIdMap_Call) Run(run func(ctx context.Context, request marketplace.GetListingsRequest)) *MockProviderListingsInterface_ListingSummaryNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetListingsRequest)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_ListingSummaryNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProviderListingsInterface_ListingSummaryNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderListingsInterface_ListingSummaryNameToIdMap_Call) RunAndReturn(run func(context.Context, marketplace.GetListingsRequest) (map[string]string, error)) *MockProviderListingsInterface_ListingSummaryNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockProviderListingsInterface) Update(ctx context.Context, request marketplace.UpdateListingRequest) (*marketplace.UpdateListingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *marketplace.UpdateListingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateListingRequest) (*marketplace.UpdateListingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateListingRequest) *marketplace.UpdateListingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.UpdateListingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.UpdateListingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderListingsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockProviderListingsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.UpdateListingRequest -func (_e *MockProviderListingsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockProviderListingsInterface_Update_Call { - return &MockProviderListingsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockProviderListingsInterface_Update_Call) Run(run func(ctx context.Context, request marketplace.UpdateListingRequest)) *MockProviderListingsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.UpdateListingRequest)) - }) - return _c -} - -func (_c *MockProviderListingsInterface_Update_Call) Return(_a0 *marketplace.UpdateListingResponse, _a1 error) *MockProviderListingsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderListingsInterface_Update_Call) RunAndReturn(run func(context.Context, marketplace.UpdateListingRequest) (*marketplace.UpdateListingResponse, error)) *MockProviderListingsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProviderListingsInterface creates a new instance of MockProviderListingsInterface. 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 NewMockProviderListingsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProviderListingsInterface { - mock := &MockProviderListingsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go b/experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go deleted file mode 100644 index 0792ffc86..000000000 --- a/experimental/mocks/service/marketplace/mock_provider_personalization_requests_interface.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockProviderPersonalizationRequestsInterface is an autogenerated mock type for the ProviderPersonalizationRequestsInterface type -type MockProviderPersonalizationRequestsInterface struct { - mock.Mock -} - -type MockProviderPersonalizationRequestsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProviderPersonalizationRequestsInterface) EXPECT() *MockProviderPersonalizationRequestsInterface_Expecter { - return &MockProviderPersonalizationRequestsInterface_Expecter{mock: &_m.Mock} -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockProviderPersonalizationRequestsInterface) List(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest) listing.Iterator[marketplace.PersonalizationRequest] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.PersonalizationRequest] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) listing.Iterator[marketplace.PersonalizationRequest]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.PersonalizationRequest]) - } - } - - return r0 -} - -// MockProviderPersonalizationRequestsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockProviderPersonalizationRequestsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListAllPersonalizationRequestsRequest -func (_e *MockProviderPersonalizationRequestsInterface_Expecter) List(ctx interface{}, request interface{}) *MockProviderPersonalizationRequestsInterface_List_Call { - return &MockProviderPersonalizationRequestsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockProviderPersonalizationRequestsInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest)) *MockProviderPersonalizationRequestsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListAllPersonalizationRequestsRequest)) - }) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_List_Call) Return(_a0 listing.Iterator[marketplace.PersonalizationRequest]) *MockProviderPersonalizationRequestsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) listing.Iterator[marketplace.PersonalizationRequest]) *MockProviderPersonalizationRequestsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockProviderPersonalizationRequestsInterface) ListAll(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest) ([]marketplace.PersonalizationRequest, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.PersonalizationRequest - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) ([]marketplace.PersonalizationRequest, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) []marketplace.PersonalizationRequest); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.PersonalizationRequest) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderPersonalizationRequestsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockProviderPersonalizationRequestsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListAllPersonalizationRequestsRequest -func (_e *MockProviderPersonalizationRequestsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockProviderPersonalizationRequestsInterface_ListAll_Call { - return &MockProviderPersonalizationRequestsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockProviderPersonalizationRequestsInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListAllPersonalizationRequestsRequest)) *MockProviderPersonalizationRequestsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListAllPersonalizationRequestsRequest)) - }) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_ListAll_Call) Return(_a0 []marketplace.PersonalizationRequest, _a1 error) *MockProviderPersonalizationRequestsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListAllPersonalizationRequestsRequest) ([]marketplace.PersonalizationRequest, error)) *MockProviderPersonalizationRequestsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockProviderPersonalizationRequestsInterface) Update(ctx context.Context, request marketplace.UpdatePersonalizationRequestRequest) (*marketplace.UpdatePersonalizationRequestResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *marketplace.UpdatePersonalizationRequestResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdatePersonalizationRequestRequest) (*marketplace.UpdatePersonalizationRequestResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdatePersonalizationRequestRequest) *marketplace.UpdatePersonalizationRequestResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.UpdatePersonalizationRequestResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.UpdatePersonalizationRequestRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderPersonalizationRequestsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockProviderPersonalizationRequestsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.UpdatePersonalizationRequestRequest -func (_e *MockProviderPersonalizationRequestsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockProviderPersonalizationRequestsInterface_Update_Call { - return &MockProviderPersonalizationRequestsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockProviderPersonalizationRequestsInterface_Update_Call) Run(run func(ctx context.Context, request marketplace.UpdatePersonalizationRequestRequest)) *MockProviderPersonalizationRequestsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.UpdatePersonalizationRequestRequest)) - }) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_Update_Call) Return(_a0 *marketplace.UpdatePersonalizationRequestResponse, _a1 error) *MockProviderPersonalizationRequestsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderPersonalizationRequestsInterface_Update_Call) RunAndReturn(run func(context.Context, marketplace.UpdatePersonalizationRequestRequest) (*marketplace.UpdatePersonalizationRequestResponse, error)) *MockProviderPersonalizationRequestsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProviderPersonalizationRequestsInterface creates a new instance of MockProviderPersonalizationRequestsInterface. 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 NewMockProviderPersonalizationRequestsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProviderPersonalizationRequestsInterface { - mock := &MockProviderPersonalizationRequestsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_provider_provider_analytics_dashboards_interface.go b/experimental/mocks/service/marketplace/mock_provider_provider_analytics_dashboards_interface.go deleted file mode 100644 index 3bee4950a..000000000 --- a/experimental/mocks/service/marketplace/mock_provider_provider_analytics_dashboards_interface.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - mock "github.com/stretchr/testify/mock" -) - -// MockProviderProviderAnalyticsDashboardsInterface is an autogenerated mock type for the ProviderProviderAnalyticsDashboardsInterface type -type MockProviderProviderAnalyticsDashboardsInterface struct { - mock.Mock -} - -type MockProviderProviderAnalyticsDashboardsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProviderProviderAnalyticsDashboardsInterface) EXPECT() *MockProviderProviderAnalyticsDashboardsInterface_Expecter { - return &MockProviderProviderAnalyticsDashboardsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx -func (_m *MockProviderProviderAnalyticsDashboardsInterface) Create(ctx context.Context) (*marketplace.ProviderAnalyticsDashboard, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.ProviderAnalyticsDashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*marketplace.ProviderAnalyticsDashboard, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *marketplace.ProviderAnalyticsDashboard); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ProviderAnalyticsDashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProviderAnalyticsDashboardsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockProviderProviderAnalyticsDashboardsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockProviderProviderAnalyticsDashboardsInterface_Expecter) Create(ctx interface{}) *MockProviderProviderAnalyticsDashboardsInterface_Create_Call { - return &MockProviderProviderAnalyticsDashboardsInterface_Create_Call{Call: _e.mock.On("Create", ctx)} -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Create_Call) Run(run func(ctx context.Context)) *MockProviderProviderAnalyticsDashboardsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Create_Call) Return(_a0 *marketplace.ProviderAnalyticsDashboard, _a1 error) *MockProviderProviderAnalyticsDashboardsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Create_Call) RunAndReturn(run func(context.Context) (*marketplace.ProviderAnalyticsDashboard, error)) *MockProviderProviderAnalyticsDashboardsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx -func (_m *MockProviderProviderAnalyticsDashboardsInterface) Get(ctx context.Context) (*marketplace.ListProviderAnalyticsDashboardResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.ListProviderAnalyticsDashboardResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*marketplace.ListProviderAnalyticsDashboardResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *marketplace.ListProviderAnalyticsDashboardResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ListProviderAnalyticsDashboardResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProviderAnalyticsDashboardsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockProviderProviderAnalyticsDashboardsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockProviderProviderAnalyticsDashboardsInterface_Expecter) Get(ctx interface{}) *MockProviderProviderAnalyticsDashboardsInterface_Get_Call { - return &MockProviderProviderAnalyticsDashboardsInterface_Get_Call{Call: _e.mock.On("Get", ctx)} -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Get_Call) Run(run func(ctx context.Context)) *MockProviderProviderAnalyticsDashboardsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Get_Call) Return(_a0 *marketplace.ListProviderAnalyticsDashboardResponse, _a1 error) *MockProviderProviderAnalyticsDashboardsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Get_Call) RunAndReturn(run func(context.Context) (*marketplace.ListProviderAnalyticsDashboardResponse, error)) *MockProviderProviderAnalyticsDashboardsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetLatestVersion provides a mock function with given fields: ctx -func (_m *MockProviderProviderAnalyticsDashboardsInterface) GetLatestVersion(ctx context.Context) (*marketplace.GetLatestVersionProviderAnalyticsDashboardResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetLatestVersion") - } - - var r0 *marketplace.GetLatestVersionProviderAnalyticsDashboardResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*marketplace.GetLatestVersionProviderAnalyticsDashboardResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *marketplace.GetLatestVersionProviderAnalyticsDashboardResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetLatestVersionProviderAnalyticsDashboardResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVersion' -type MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call struct { - *mock.Call -} - -// GetLatestVersion is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockProviderProviderAnalyticsDashboardsInterface_Expecter) GetLatestVersion(ctx interface{}) *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call { - return &MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call{Call: _e.mock.On("GetLatestVersion", ctx)} -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call) Run(run func(ctx context.Context)) *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call) Return(_a0 *marketplace.GetLatestVersionProviderAnalyticsDashboardResponse, _a1 error) *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call) RunAndReturn(run func(context.Context) (*marketplace.GetLatestVersionProviderAnalyticsDashboardResponse, error)) *MockProviderProviderAnalyticsDashboardsInterface_GetLatestVersion_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockProviderProviderAnalyticsDashboardsInterface) Update(ctx context.Context, request marketplace.UpdateProviderAnalyticsDashboardRequest) (*marketplace.UpdateProviderAnalyticsDashboardResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *marketplace.UpdateProviderAnalyticsDashboardResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateProviderAnalyticsDashboardRequest) (*marketplace.UpdateProviderAnalyticsDashboardResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateProviderAnalyticsDashboardRequest) *marketplace.UpdateProviderAnalyticsDashboardResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.UpdateProviderAnalyticsDashboardResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.UpdateProviderAnalyticsDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProviderAnalyticsDashboardsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockProviderProviderAnalyticsDashboardsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.UpdateProviderAnalyticsDashboardRequest -func (_e *MockProviderProviderAnalyticsDashboardsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockProviderProviderAnalyticsDashboardsInterface_Update_Call { - return &MockProviderProviderAnalyticsDashboardsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Update_Call) Run(run func(ctx context.Context, request marketplace.UpdateProviderAnalyticsDashboardRequest)) *MockProviderProviderAnalyticsDashboardsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.UpdateProviderAnalyticsDashboardRequest)) - }) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Update_Call) Return(_a0 *marketplace.UpdateProviderAnalyticsDashboardResponse, _a1 error) *MockProviderProviderAnalyticsDashboardsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProviderAnalyticsDashboardsInterface_Update_Call) RunAndReturn(run func(context.Context, marketplace.UpdateProviderAnalyticsDashboardRequest) (*marketplace.UpdateProviderAnalyticsDashboardResponse, error)) *MockProviderProviderAnalyticsDashboardsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProviderProviderAnalyticsDashboardsInterface creates a new instance of MockProviderProviderAnalyticsDashboardsInterface. 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 NewMockProviderProviderAnalyticsDashboardsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProviderProviderAnalyticsDashboardsInterface { - mock := &MockProviderProviderAnalyticsDashboardsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/marketplace/mock_provider_providers_interface.go b/experimental/mocks/service/marketplace/mock_provider_providers_interface.go deleted file mode 100644 index bbab1a55e..000000000 --- a/experimental/mocks/service/marketplace/mock_provider_providers_interface.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package marketplace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - marketplace "github.com/databricks/databricks-sdk-go/service/marketplace" - - mock "github.com/stretchr/testify/mock" -) - -// MockProviderProvidersInterface is an autogenerated mock type for the ProviderProvidersInterface type -type MockProviderProvidersInterface struct { - mock.Mock -} - -type MockProviderProvidersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProviderProvidersInterface) EXPECT() *MockProviderProvidersInterface_Expecter { - return &MockProviderProvidersInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockProviderProvidersInterface) Create(ctx context.Context, request marketplace.CreateProviderRequest) (*marketplace.CreateProviderResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *marketplace.CreateProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateProviderRequest) (*marketplace.CreateProviderResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.CreateProviderRequest) *marketplace.CreateProviderResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.CreateProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.CreateProviderRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProvidersInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockProviderProvidersInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.CreateProviderRequest -func (_e *MockProviderProvidersInterface_Expecter) Create(ctx interface{}, request interface{}) *MockProviderProvidersInterface_Create_Call { - return &MockProviderProvidersInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockProviderProvidersInterface_Create_Call) Run(run func(ctx context.Context, request marketplace.CreateProviderRequest)) *MockProviderProvidersInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.CreateProviderRequest)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_Create_Call) Return(_a0 *marketplace.CreateProviderResponse, _a1 error) *MockProviderProvidersInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProvidersInterface_Create_Call) RunAndReturn(run func(context.Context, marketplace.CreateProviderRequest) (*marketplace.CreateProviderResponse, error)) *MockProviderProvidersInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockProviderProvidersInterface) Delete(ctx context.Context, request marketplace.DeleteProviderRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.DeleteProviderRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderProvidersInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockProviderProvidersInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.DeleteProviderRequest -func (_e *MockProviderProvidersInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockProviderProvidersInterface_Delete_Call { - return &MockProviderProvidersInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockProviderProvidersInterface_Delete_Call) Run(run func(ctx context.Context, request marketplace.DeleteProviderRequest)) *MockProviderProvidersInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.DeleteProviderRequest)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_Delete_Call) Return(_a0 error) *MockProviderProvidersInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderProvidersInterface_Delete_Call) RunAndReturn(run func(context.Context, marketplace.DeleteProviderRequest) error) *MockProviderProvidersInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockProviderProvidersInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProviderProvidersInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockProviderProvidersInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderProvidersInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockProviderProvidersInterface_DeleteById_Call { - return &MockProviderProvidersInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockProviderProvidersInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockProviderProvidersInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_DeleteById_Call) Return(_a0 error) *MockProviderProvidersInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderProvidersInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockProviderProvidersInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockProviderProvidersInterface) Get(ctx context.Context, request marketplace.GetProviderRequest) (*marketplace.GetProviderResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *marketplace.GetProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetProviderRequest) (*marketplace.GetProviderResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.GetProviderRequest) *marketplace.GetProviderResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.GetProviderRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProvidersInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockProviderProvidersInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.GetProviderRequest -func (_e *MockProviderProvidersInterface_Expecter) Get(ctx interface{}, request interface{}) *MockProviderProvidersInterface_Get_Call { - return &MockProviderProvidersInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockProviderProvidersInterface_Get_Call) Run(run func(ctx context.Context, request marketplace.GetProviderRequest)) *MockProviderProvidersInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.GetProviderRequest)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_Get_Call) Return(_a0 *marketplace.GetProviderResponse, _a1 error) *MockProviderProvidersInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProvidersInterface_Get_Call) RunAndReturn(run func(context.Context, marketplace.GetProviderRequest) (*marketplace.GetProviderResponse, error)) *MockProviderProvidersInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockProviderProvidersInterface) GetById(ctx context.Context, id string) (*marketplace.GetProviderResponse, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *marketplace.GetProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.GetProviderResponse, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.GetProviderResponse); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.GetProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProvidersInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockProviderProvidersInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockProviderProvidersInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockProviderProvidersInterface_GetById_Call { - return &MockProviderProvidersInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockProviderProvidersInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockProviderProvidersInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_GetById_Call) Return(_a0 *marketplace.GetProviderResponse, _a1 error) *MockProviderProvidersInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProvidersInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*marketplace.GetProviderResponse, error)) *MockProviderProvidersInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockProviderProvidersInterface) GetByName(ctx context.Context, name string) (*marketplace.ProviderInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *marketplace.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*marketplace.ProviderInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *marketplace.ProviderInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProvidersInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockProviderProvidersInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProviderProvidersInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockProviderProvidersInterface_GetByName_Call { - return &MockProviderProvidersInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockProviderProvidersInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockProviderProvidersInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_GetByName_Call) Return(_a0 *marketplace.ProviderInfo, _a1 error) *MockProviderProvidersInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProvidersInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*marketplace.ProviderInfo, error)) *MockProviderProvidersInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockProviderProvidersInterface) List(ctx context.Context, request marketplace.ListProvidersRequest) listing.Iterator[marketplace.ProviderInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[marketplace.ProviderInfo] - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) listing.Iterator[marketplace.ProviderInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[marketplace.ProviderInfo]) - } - } - - return r0 -} - -// MockProviderProvidersInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockProviderProvidersInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListProvidersRequest -func (_e *MockProviderProvidersInterface_Expecter) List(ctx interface{}, request interface{}) *MockProviderProvidersInterface_List_Call { - return &MockProviderProvidersInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockProviderProvidersInterface_List_Call) Run(run func(ctx context.Context, request marketplace.ListProvidersRequest)) *MockProviderProvidersInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_List_Call) Return(_a0 listing.Iterator[marketplace.ProviderInfo]) *MockProviderProvidersInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProviderProvidersInterface_List_Call) RunAndReturn(run func(context.Context, marketplace.ListProvidersRequest) listing.Iterator[marketplace.ProviderInfo]) *MockProviderProvidersInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockProviderProvidersInterface) ListAll(ctx context.Context, request marketplace.ListProvidersRequest) ([]marketplace.ProviderInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []marketplace.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) ([]marketplace.ProviderInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) []marketplace.ProviderInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]marketplace.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListProvidersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProvidersInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockProviderProvidersInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListProvidersRequest -func (_e *MockProviderProvidersInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockProviderProvidersInterface_ListAll_Call { - return &MockProviderProvidersInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockProviderProvidersInterface_ListAll_Call) Run(run func(ctx context.Context, request marketplace.ListProvidersRequest)) *MockProviderProvidersInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_ListAll_Call) Return(_a0 []marketplace.ProviderInfo, _a1 error) *MockProviderProvidersInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProvidersInterface_ListAll_Call) RunAndReturn(run func(context.Context, marketplace.ListProvidersRequest) ([]marketplace.ProviderInfo, error)) *MockProviderProvidersInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ProviderInfoNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockProviderProvidersInterface) ProviderInfoNameToIdMap(ctx context.Context, request marketplace.ListProvidersRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ProviderInfoNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.ListProvidersRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.ListProvidersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProviderInfoNameToIdMap' -type MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call struct { - *mock.Call -} - -// ProviderInfoNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.ListProvidersRequest -func (_e *MockProviderProvidersInterface_Expecter) ProviderInfoNameToIdMap(ctx interface{}, request interface{}) *MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call { - return &MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call{Call: _e.mock.On("ProviderInfoNameToIdMap", ctx, request)} -} - -func (_c *MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call) Run(run func(ctx context.Context, request marketplace.ListProvidersRequest)) *MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call) RunAndReturn(run func(context.Context, marketplace.ListProvidersRequest) (map[string]string, error)) *MockProviderProvidersInterface_ProviderInfoNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockProviderProvidersInterface) Update(ctx context.Context, request marketplace.UpdateProviderRequest) (*marketplace.UpdateProviderResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *marketplace.UpdateProviderResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateProviderRequest) (*marketplace.UpdateProviderResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, marketplace.UpdateProviderRequest) *marketplace.UpdateProviderResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*marketplace.UpdateProviderResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, marketplace.UpdateProviderRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProviderProvidersInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockProviderProvidersInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request marketplace.UpdateProviderRequest -func (_e *MockProviderProvidersInterface_Expecter) Update(ctx interface{}, request interface{}) *MockProviderProvidersInterface_Update_Call { - return &MockProviderProvidersInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockProviderProvidersInterface_Update_Call) Run(run func(ctx context.Context, request marketplace.UpdateProviderRequest)) *MockProviderProvidersInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(marketplace.UpdateProviderRequest)) - }) - return _c -} - -func (_c *MockProviderProvidersInterface_Update_Call) Return(_a0 *marketplace.UpdateProviderResponse, _a1 error) *MockProviderProvidersInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProviderProvidersInterface_Update_Call) RunAndReturn(run func(context.Context, marketplace.UpdateProviderRequest) (*marketplace.UpdateProviderResponse, error)) *MockProviderProvidersInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProviderProvidersInterface creates a new instance of MockProviderProvidersInterface. 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 NewMockProviderProvidersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProviderProvidersInterface { - mock := &MockProviderProvidersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/ml/mock_experiments_interface.go b/experimental/mocks/service/ml/mock_experiments_interface.go deleted file mode 100644 index 0743f56c9..000000000 --- a/experimental/mocks/service/ml/mock_experiments_interface.go +++ /dev/null @@ -1,2016 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package ml - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - ml "github.com/databricks/databricks-sdk-go/service/ml" - - mock "github.com/stretchr/testify/mock" -) - -// MockExperimentsInterface is an autogenerated mock type for the ExperimentsInterface type -type MockExperimentsInterface struct { - mock.Mock -} - -type MockExperimentsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockExperimentsInterface) EXPECT() *MockExperimentsInterface_Expecter { - return &MockExperimentsInterface_Expecter{mock: &_m.Mock} -} - -// CreateExperiment provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) CreateExperiment(ctx context.Context, request ml.CreateExperiment) (*ml.CreateExperimentResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateExperiment") - } - - var r0 *ml.CreateExperimentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateExperiment) (*ml.CreateExperimentResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateExperiment) *ml.CreateExperimentResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.CreateExperimentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.CreateExperiment) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_CreateExperiment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateExperiment' -type MockExperimentsInterface_CreateExperiment_Call struct { - *mock.Call -} - -// CreateExperiment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.CreateExperiment -func (_e *MockExperimentsInterface_Expecter) CreateExperiment(ctx interface{}, request interface{}) *MockExperimentsInterface_CreateExperiment_Call { - return &MockExperimentsInterface_CreateExperiment_Call{Call: _e.mock.On("CreateExperiment", ctx, request)} -} - -func (_c *MockExperimentsInterface_CreateExperiment_Call) Run(run func(ctx context.Context, request ml.CreateExperiment)) *MockExperimentsInterface_CreateExperiment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.CreateExperiment)) - }) - return _c -} - -func (_c *MockExperimentsInterface_CreateExperiment_Call) Return(_a0 *ml.CreateExperimentResponse, _a1 error) *MockExperimentsInterface_CreateExperiment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_CreateExperiment_Call) RunAndReturn(run func(context.Context, ml.CreateExperiment) (*ml.CreateExperimentResponse, error)) *MockExperimentsInterface_CreateExperiment_Call { - _c.Call.Return(run) - return _c -} - -// CreateRun provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) CreateRun(ctx context.Context, request ml.CreateRun) (*ml.CreateRunResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateRun") - } - - var r0 *ml.CreateRunResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateRun) (*ml.CreateRunResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateRun) *ml.CreateRunResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.CreateRunResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.CreateRun) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_CreateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRun' -type MockExperimentsInterface_CreateRun_Call struct { - *mock.Call -} - -// CreateRun is a helper method to define mock.On call -// - ctx context.Context -// - request ml.CreateRun -func (_e *MockExperimentsInterface_Expecter) CreateRun(ctx interface{}, request interface{}) *MockExperimentsInterface_CreateRun_Call { - return &MockExperimentsInterface_CreateRun_Call{Call: _e.mock.On("CreateRun", ctx, request)} -} - -func (_c *MockExperimentsInterface_CreateRun_Call) Run(run func(ctx context.Context, request ml.CreateRun)) *MockExperimentsInterface_CreateRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.CreateRun)) - }) - return _c -} - -func (_c *MockExperimentsInterface_CreateRun_Call) Return(_a0 *ml.CreateRunResponse, _a1 error) *MockExperimentsInterface_CreateRun_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_CreateRun_Call) RunAndReturn(run func(context.Context, ml.CreateRun) (*ml.CreateRunResponse, error)) *MockExperimentsInterface_CreateRun_Call { - _c.Call.Return(run) - return _c -} - -// DeleteExperiment provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) DeleteExperiment(ctx context.Context, request ml.DeleteExperiment) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteExperiment") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteExperiment) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_DeleteExperiment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExperiment' -type MockExperimentsInterface_DeleteExperiment_Call struct { - *mock.Call -} - -// DeleteExperiment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteExperiment -func (_e *MockExperimentsInterface_Expecter) DeleteExperiment(ctx interface{}, request interface{}) *MockExperimentsInterface_DeleteExperiment_Call { - return &MockExperimentsInterface_DeleteExperiment_Call{Call: _e.mock.On("DeleteExperiment", ctx, request)} -} - -func (_c *MockExperimentsInterface_DeleteExperiment_Call) Run(run func(ctx context.Context, request ml.DeleteExperiment)) *MockExperimentsInterface_DeleteExperiment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteExperiment)) - }) - return _c -} - -func (_c *MockExperimentsInterface_DeleteExperiment_Call) Return(_a0 error) *MockExperimentsInterface_DeleteExperiment_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_DeleteExperiment_Call) RunAndReturn(run func(context.Context, ml.DeleteExperiment) error) *MockExperimentsInterface_DeleteExperiment_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRun provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) DeleteRun(ctx context.Context, request ml.DeleteRun) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteRun") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteRun) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_DeleteRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRun' -type MockExperimentsInterface_DeleteRun_Call struct { - *mock.Call -} - -// DeleteRun is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteRun -func (_e *MockExperimentsInterface_Expecter) DeleteRun(ctx interface{}, request interface{}) *MockExperimentsInterface_DeleteRun_Call { - return &MockExperimentsInterface_DeleteRun_Call{Call: _e.mock.On("DeleteRun", ctx, request)} -} - -func (_c *MockExperimentsInterface_DeleteRun_Call) Run(run func(ctx context.Context, request ml.DeleteRun)) *MockExperimentsInterface_DeleteRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteRun)) - }) - return _c -} - -func (_c *MockExperimentsInterface_DeleteRun_Call) Return(_a0 error) *MockExperimentsInterface_DeleteRun_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_DeleteRun_Call) RunAndReturn(run func(context.Context, ml.DeleteRun) error) *MockExperimentsInterface_DeleteRun_Call { - _c.Call.Return(run) - return _c -} - -// DeleteRuns provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) DeleteRuns(ctx context.Context, request ml.DeleteRuns) (*ml.DeleteRunsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteRuns") - } - - var r0 *ml.DeleteRunsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteRuns) (*ml.DeleteRunsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteRuns) *ml.DeleteRunsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.DeleteRunsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.DeleteRuns) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_DeleteRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRuns' -type MockExperimentsInterface_DeleteRuns_Call struct { - *mock.Call -} - -// DeleteRuns is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteRuns -func (_e *MockExperimentsInterface_Expecter) DeleteRuns(ctx interface{}, request interface{}) *MockExperimentsInterface_DeleteRuns_Call { - return &MockExperimentsInterface_DeleteRuns_Call{Call: _e.mock.On("DeleteRuns", ctx, request)} -} - -func (_c *MockExperimentsInterface_DeleteRuns_Call) Run(run func(ctx context.Context, request ml.DeleteRuns)) *MockExperimentsInterface_DeleteRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteRuns)) - }) - return _c -} - -func (_c *MockExperimentsInterface_DeleteRuns_Call) Return(_a0 *ml.DeleteRunsResponse, _a1 error) *MockExperimentsInterface_DeleteRuns_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_DeleteRuns_Call) RunAndReturn(run func(context.Context, ml.DeleteRuns) (*ml.DeleteRunsResponse, error)) *MockExperimentsInterface_DeleteRuns_Call { - _c.Call.Return(run) - return _c -} - -// DeleteTag provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) DeleteTag(ctx context.Context, request ml.DeleteTag) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteTag") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteTag) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_DeleteTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTag' -type MockExperimentsInterface_DeleteTag_Call struct { - *mock.Call -} - -// DeleteTag is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteTag -func (_e *MockExperimentsInterface_Expecter) DeleteTag(ctx interface{}, request interface{}) *MockExperimentsInterface_DeleteTag_Call { - return &MockExperimentsInterface_DeleteTag_Call{Call: _e.mock.On("DeleteTag", ctx, request)} -} - -func (_c *MockExperimentsInterface_DeleteTag_Call) Run(run func(ctx context.Context, request ml.DeleteTag)) *MockExperimentsInterface_DeleteTag_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteTag)) - }) - return _c -} - -func (_c *MockExperimentsInterface_DeleteTag_Call) Return(_a0 error) *MockExperimentsInterface_DeleteTag_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_DeleteTag_Call) RunAndReturn(run func(context.Context, ml.DeleteTag) error) *MockExperimentsInterface_DeleteTag_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) GetByName(ctx context.Context, request ml.GetByNameRequest) (*ml.GetExperimentResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *ml.GetExperimentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetByNameRequest) (*ml.GetExperimentResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetByNameRequest) *ml.GetExperimentResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetExperimentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetByNameRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockExperimentsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetByNameRequest -func (_e *MockExperimentsInterface_Expecter) GetByName(ctx interface{}, request interface{}) *MockExperimentsInterface_GetByName_Call { - return &MockExperimentsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, request)} -} - -func (_c *MockExperimentsInterface_GetByName_Call) Run(run func(ctx context.Context, request ml.GetByNameRequest)) *MockExperimentsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetByNameRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetByName_Call) Return(_a0 *ml.GetExperimentResponse, _a1 error) *MockExperimentsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetByName_Call) RunAndReturn(run func(context.Context, ml.GetByNameRequest) (*ml.GetExperimentResponse, error)) *MockExperimentsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetExperiment provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) GetExperiment(ctx context.Context, request ml.GetExperimentRequest) (*ml.GetExperimentResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetExperiment") - } - - var r0 *ml.GetExperimentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetExperimentRequest) (*ml.GetExperimentResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetExperimentRequest) *ml.GetExperimentResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetExperimentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetExperimentRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetExperiment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExperiment' -type MockExperimentsInterface_GetExperiment_Call struct { - *mock.Call -} - -// GetExperiment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetExperimentRequest -func (_e *MockExperimentsInterface_Expecter) GetExperiment(ctx interface{}, request interface{}) *MockExperimentsInterface_GetExperiment_Call { - return &MockExperimentsInterface_GetExperiment_Call{Call: _e.mock.On("GetExperiment", ctx, request)} -} - -func (_c *MockExperimentsInterface_GetExperiment_Call) Run(run func(ctx context.Context, request ml.GetExperimentRequest)) *MockExperimentsInterface_GetExperiment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetExperimentRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetExperiment_Call) Return(_a0 *ml.GetExperimentResponse, _a1 error) *MockExperimentsInterface_GetExperiment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetExperiment_Call) RunAndReturn(run func(context.Context, ml.GetExperimentRequest) (*ml.GetExperimentResponse, error)) *MockExperimentsInterface_GetExperiment_Call { - _c.Call.Return(run) - return _c -} - -// GetHistory provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) GetHistory(ctx context.Context, request ml.GetHistoryRequest) listing.Iterator[ml.Metric] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetHistory") - } - - var r0 listing.Iterator[ml.Metric] - if rf, ok := ret.Get(0).(func(context.Context, ml.GetHistoryRequest) listing.Iterator[ml.Metric]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.Metric]) - } - } - - return r0 -} - -// MockExperimentsInterface_GetHistory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHistory' -type MockExperimentsInterface_GetHistory_Call struct { - *mock.Call -} - -// GetHistory is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetHistoryRequest -func (_e *MockExperimentsInterface_Expecter) GetHistory(ctx interface{}, request interface{}) *MockExperimentsInterface_GetHistory_Call { - return &MockExperimentsInterface_GetHistory_Call{Call: _e.mock.On("GetHistory", ctx, request)} -} - -func (_c *MockExperimentsInterface_GetHistory_Call) Run(run func(ctx context.Context, request ml.GetHistoryRequest)) *MockExperimentsInterface_GetHistory_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetHistoryRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetHistory_Call) Return(_a0 listing.Iterator[ml.Metric]) *MockExperimentsInterface_GetHistory_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_GetHistory_Call) RunAndReturn(run func(context.Context, ml.GetHistoryRequest) listing.Iterator[ml.Metric]) *MockExperimentsInterface_GetHistory_Call { - _c.Call.Return(run) - return _c -} - -// GetHistoryAll provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) GetHistoryAll(ctx context.Context, request ml.GetHistoryRequest) ([]ml.Metric, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetHistoryAll") - } - - var r0 []ml.Metric - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetHistoryRequest) ([]ml.Metric, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetHistoryRequest) []ml.Metric); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.Metric) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetHistoryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetHistoryAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHistoryAll' -type MockExperimentsInterface_GetHistoryAll_Call struct { - *mock.Call -} - -// GetHistoryAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetHistoryRequest -func (_e *MockExperimentsInterface_Expecter) GetHistoryAll(ctx interface{}, request interface{}) *MockExperimentsInterface_GetHistoryAll_Call { - return &MockExperimentsInterface_GetHistoryAll_Call{Call: _e.mock.On("GetHistoryAll", ctx, request)} -} - -func (_c *MockExperimentsInterface_GetHistoryAll_Call) Run(run func(ctx context.Context, request ml.GetHistoryRequest)) *MockExperimentsInterface_GetHistoryAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetHistoryRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetHistoryAll_Call) Return(_a0 []ml.Metric, _a1 error) *MockExperimentsInterface_GetHistoryAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetHistoryAll_Call) RunAndReturn(run func(context.Context, ml.GetHistoryRequest) ([]ml.Metric, error)) *MockExperimentsInterface_GetHistoryAll_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) GetPermissionLevels(ctx context.Context, request ml.GetExperimentPermissionLevelsRequest) (*ml.GetExperimentPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *ml.GetExperimentPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetExperimentPermissionLevelsRequest) (*ml.GetExperimentPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetExperimentPermissionLevelsRequest) *ml.GetExperimentPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetExperimentPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetExperimentPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockExperimentsInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetExperimentPermissionLevelsRequest -func (_e *MockExperimentsInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockExperimentsInterface_GetPermissionLevels_Call { - return &MockExperimentsInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockExperimentsInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request ml.GetExperimentPermissionLevelsRequest)) *MockExperimentsInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetExperimentPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissionLevels_Call) Return(_a0 *ml.GetExperimentPermissionLevelsResponse, _a1 error) *MockExperimentsInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, ml.GetExperimentPermissionLevelsRequest) (*ml.GetExperimentPermissionLevelsResponse, error)) *MockExperimentsInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByExperimentId provides a mock function with given fields: ctx, experimentId -func (_m *MockExperimentsInterface) GetPermissionLevelsByExperimentId(ctx context.Context, experimentId string) (*ml.GetExperimentPermissionLevelsResponse, error) { - ret := _m.Called(ctx, experimentId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByExperimentId") - } - - var r0 *ml.GetExperimentPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*ml.GetExperimentPermissionLevelsResponse, error)); ok { - return rf(ctx, experimentId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *ml.GetExperimentPermissionLevelsResponse); ok { - r0 = rf(ctx, experimentId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetExperimentPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, experimentId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByExperimentId' -type MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByExperimentId is a helper method to define mock.On call -// - ctx context.Context -// - experimentId string -func (_e *MockExperimentsInterface_Expecter) GetPermissionLevelsByExperimentId(ctx interface{}, experimentId interface{}) *MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call { - return &MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call{Call: _e.mock.On("GetPermissionLevelsByExperimentId", ctx, experimentId)} -} - -func (_c *MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call) Run(run func(ctx context.Context, experimentId string)) *MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call) Return(_a0 *ml.GetExperimentPermissionLevelsResponse, _a1 error) *MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call) RunAndReturn(run func(context.Context, string) (*ml.GetExperimentPermissionLevelsResponse, error)) *MockExperimentsInterface_GetPermissionLevelsByExperimentId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) GetPermissions(ctx context.Context, request ml.GetExperimentPermissionsRequest) (*ml.ExperimentPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *ml.ExperimentPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetExperimentPermissionsRequest) (*ml.ExperimentPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetExperimentPermissionsRequest) *ml.ExperimentPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.ExperimentPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetExperimentPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockExperimentsInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetExperimentPermissionsRequest -func (_e *MockExperimentsInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockExperimentsInterface_GetPermissions_Call { - return &MockExperimentsInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockExperimentsInterface_GetPermissions_Call) Run(run func(ctx context.Context, request ml.GetExperimentPermissionsRequest)) *MockExperimentsInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetExperimentPermissionsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissions_Call) Return(_a0 *ml.ExperimentPermissions, _a1 error) *MockExperimentsInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, ml.GetExperimentPermissionsRequest) (*ml.ExperimentPermissions, error)) *MockExperimentsInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByExperimentId provides a mock function with given fields: ctx, experimentId -func (_m *MockExperimentsInterface) GetPermissionsByExperimentId(ctx context.Context, experimentId string) (*ml.ExperimentPermissions, error) { - ret := _m.Called(ctx, experimentId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByExperimentId") - } - - var r0 *ml.ExperimentPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*ml.ExperimentPermissions, error)); ok { - return rf(ctx, experimentId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *ml.ExperimentPermissions); ok { - r0 = rf(ctx, experimentId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.ExperimentPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, experimentId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetPermissionsByExperimentId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByExperimentId' -type MockExperimentsInterface_GetPermissionsByExperimentId_Call struct { - *mock.Call -} - -// GetPermissionsByExperimentId is a helper method to define mock.On call -// - ctx context.Context -// - experimentId string -func (_e *MockExperimentsInterface_Expecter) GetPermissionsByExperimentId(ctx interface{}, experimentId interface{}) *MockExperimentsInterface_GetPermissionsByExperimentId_Call { - return &MockExperimentsInterface_GetPermissionsByExperimentId_Call{Call: _e.mock.On("GetPermissionsByExperimentId", ctx, experimentId)} -} - -func (_c *MockExperimentsInterface_GetPermissionsByExperimentId_Call) Run(run func(ctx context.Context, experimentId string)) *MockExperimentsInterface_GetPermissionsByExperimentId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissionsByExperimentId_Call) Return(_a0 *ml.ExperimentPermissions, _a1 error) *MockExperimentsInterface_GetPermissionsByExperimentId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetPermissionsByExperimentId_Call) RunAndReturn(run func(context.Context, string) (*ml.ExperimentPermissions, error)) *MockExperimentsInterface_GetPermissionsByExperimentId_Call { - _c.Call.Return(run) - return _c -} - -// GetRun provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) GetRun(ctx context.Context, request ml.GetRunRequest) (*ml.GetRunResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetRun") - } - - var r0 *ml.GetRunResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetRunRequest) (*ml.GetRunResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetRunRequest) *ml.GetRunResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetRunResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetRunRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_GetRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRun' -type MockExperimentsInterface_GetRun_Call struct { - *mock.Call -} - -// GetRun is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetRunRequest -func (_e *MockExperimentsInterface_Expecter) GetRun(ctx interface{}, request interface{}) *MockExperimentsInterface_GetRun_Call { - return &MockExperimentsInterface_GetRun_Call{Call: _e.mock.On("GetRun", ctx, request)} -} - -func (_c *MockExperimentsInterface_GetRun_Call) Run(run func(ctx context.Context, request ml.GetRunRequest)) *MockExperimentsInterface_GetRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetRunRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_GetRun_Call) Return(_a0 *ml.GetRunResponse, _a1 error) *MockExperimentsInterface_GetRun_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_GetRun_Call) RunAndReturn(run func(context.Context, ml.GetRunRequest) (*ml.GetRunResponse, error)) *MockExperimentsInterface_GetRun_Call { - _c.Call.Return(run) - return _c -} - -// ListArtifacts provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) ListArtifacts(ctx context.Context, request ml.ListArtifactsRequest) listing.Iterator[ml.FileInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListArtifacts") - } - - var r0 listing.Iterator[ml.FileInfo] - if rf, ok := ret.Get(0).(func(context.Context, ml.ListArtifactsRequest) listing.Iterator[ml.FileInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.FileInfo]) - } - } - - return r0 -} - -// MockExperimentsInterface_ListArtifacts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListArtifacts' -type MockExperimentsInterface_ListArtifacts_Call struct { - *mock.Call -} - -// ListArtifacts is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListArtifactsRequest -func (_e *MockExperimentsInterface_Expecter) ListArtifacts(ctx interface{}, request interface{}) *MockExperimentsInterface_ListArtifacts_Call { - return &MockExperimentsInterface_ListArtifacts_Call{Call: _e.mock.On("ListArtifacts", ctx, request)} -} - -func (_c *MockExperimentsInterface_ListArtifacts_Call) Run(run func(ctx context.Context, request ml.ListArtifactsRequest)) *MockExperimentsInterface_ListArtifacts_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListArtifactsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_ListArtifacts_Call) Return(_a0 listing.Iterator[ml.FileInfo]) *MockExperimentsInterface_ListArtifacts_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_ListArtifacts_Call) RunAndReturn(run func(context.Context, ml.ListArtifactsRequest) listing.Iterator[ml.FileInfo]) *MockExperimentsInterface_ListArtifacts_Call { - _c.Call.Return(run) - return _c -} - -// ListArtifactsAll provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) ListArtifactsAll(ctx context.Context, request ml.ListArtifactsRequest) ([]ml.FileInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListArtifactsAll") - } - - var r0 []ml.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ListArtifactsRequest) ([]ml.FileInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ListArtifactsRequest) []ml.FileInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ListArtifactsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_ListArtifactsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListArtifactsAll' -type MockExperimentsInterface_ListArtifactsAll_Call struct { - *mock.Call -} - -// ListArtifactsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListArtifactsRequest -func (_e *MockExperimentsInterface_Expecter) ListArtifactsAll(ctx interface{}, request interface{}) *MockExperimentsInterface_ListArtifactsAll_Call { - return &MockExperimentsInterface_ListArtifactsAll_Call{Call: _e.mock.On("ListArtifactsAll", ctx, request)} -} - -func (_c *MockExperimentsInterface_ListArtifactsAll_Call) Run(run func(ctx context.Context, request ml.ListArtifactsRequest)) *MockExperimentsInterface_ListArtifactsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListArtifactsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_ListArtifactsAll_Call) Return(_a0 []ml.FileInfo, _a1 error) *MockExperimentsInterface_ListArtifactsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_ListArtifactsAll_Call) RunAndReturn(run func(context.Context, ml.ListArtifactsRequest) ([]ml.FileInfo, error)) *MockExperimentsInterface_ListArtifactsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListExperiments provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) ListExperiments(ctx context.Context, request ml.ListExperimentsRequest) listing.Iterator[ml.Experiment] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListExperiments") - } - - var r0 listing.Iterator[ml.Experiment] - if rf, ok := ret.Get(0).(func(context.Context, ml.ListExperimentsRequest) listing.Iterator[ml.Experiment]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.Experiment]) - } - } - - return r0 -} - -// MockExperimentsInterface_ListExperiments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListExperiments' -type MockExperimentsInterface_ListExperiments_Call struct { - *mock.Call -} - -// ListExperiments is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListExperimentsRequest -func (_e *MockExperimentsInterface_Expecter) ListExperiments(ctx interface{}, request interface{}) *MockExperimentsInterface_ListExperiments_Call { - return &MockExperimentsInterface_ListExperiments_Call{Call: _e.mock.On("ListExperiments", ctx, request)} -} - -func (_c *MockExperimentsInterface_ListExperiments_Call) Run(run func(ctx context.Context, request ml.ListExperimentsRequest)) *MockExperimentsInterface_ListExperiments_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListExperimentsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_ListExperiments_Call) Return(_a0 listing.Iterator[ml.Experiment]) *MockExperimentsInterface_ListExperiments_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_ListExperiments_Call) RunAndReturn(run func(context.Context, ml.ListExperimentsRequest) listing.Iterator[ml.Experiment]) *MockExperimentsInterface_ListExperiments_Call { - _c.Call.Return(run) - return _c -} - -// ListExperimentsAll provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) ListExperimentsAll(ctx context.Context, request ml.ListExperimentsRequest) ([]ml.Experiment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListExperimentsAll") - } - - var r0 []ml.Experiment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ListExperimentsRequest) ([]ml.Experiment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ListExperimentsRequest) []ml.Experiment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.Experiment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ListExperimentsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_ListExperimentsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListExperimentsAll' -type MockExperimentsInterface_ListExperimentsAll_Call struct { - *mock.Call -} - -// ListExperimentsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListExperimentsRequest -func (_e *MockExperimentsInterface_Expecter) ListExperimentsAll(ctx interface{}, request interface{}) *MockExperimentsInterface_ListExperimentsAll_Call { - return &MockExperimentsInterface_ListExperimentsAll_Call{Call: _e.mock.On("ListExperimentsAll", ctx, request)} -} - -func (_c *MockExperimentsInterface_ListExperimentsAll_Call) Run(run func(ctx context.Context, request ml.ListExperimentsRequest)) *MockExperimentsInterface_ListExperimentsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListExperimentsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_ListExperimentsAll_Call) Return(_a0 []ml.Experiment, _a1 error) *MockExperimentsInterface_ListExperimentsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_ListExperimentsAll_Call) RunAndReturn(run func(context.Context, ml.ListExperimentsRequest) ([]ml.Experiment, error)) *MockExperimentsInterface_ListExperimentsAll_Call { - _c.Call.Return(run) - return _c -} - -// LogBatch provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) LogBatch(ctx context.Context, request ml.LogBatch) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for LogBatch") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.LogBatch) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_LogBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogBatch' -type MockExperimentsInterface_LogBatch_Call struct { - *mock.Call -} - -// LogBatch is a helper method to define mock.On call -// - ctx context.Context -// - request ml.LogBatch -func (_e *MockExperimentsInterface_Expecter) LogBatch(ctx interface{}, request interface{}) *MockExperimentsInterface_LogBatch_Call { - return &MockExperimentsInterface_LogBatch_Call{Call: _e.mock.On("LogBatch", ctx, request)} -} - -func (_c *MockExperimentsInterface_LogBatch_Call) Run(run func(ctx context.Context, request ml.LogBatch)) *MockExperimentsInterface_LogBatch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.LogBatch)) - }) - return _c -} - -func (_c *MockExperimentsInterface_LogBatch_Call) Return(_a0 error) *MockExperimentsInterface_LogBatch_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_LogBatch_Call) RunAndReturn(run func(context.Context, ml.LogBatch) error) *MockExperimentsInterface_LogBatch_Call { - _c.Call.Return(run) - return _c -} - -// LogInputs provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) LogInputs(ctx context.Context, request ml.LogInputs) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for LogInputs") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.LogInputs) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_LogInputs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogInputs' -type MockExperimentsInterface_LogInputs_Call struct { - *mock.Call -} - -// LogInputs is a helper method to define mock.On call -// - ctx context.Context -// - request ml.LogInputs -func (_e *MockExperimentsInterface_Expecter) LogInputs(ctx interface{}, request interface{}) *MockExperimentsInterface_LogInputs_Call { - return &MockExperimentsInterface_LogInputs_Call{Call: _e.mock.On("LogInputs", ctx, request)} -} - -func (_c *MockExperimentsInterface_LogInputs_Call) Run(run func(ctx context.Context, request ml.LogInputs)) *MockExperimentsInterface_LogInputs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.LogInputs)) - }) - return _c -} - -func (_c *MockExperimentsInterface_LogInputs_Call) Return(_a0 error) *MockExperimentsInterface_LogInputs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_LogInputs_Call) RunAndReturn(run func(context.Context, ml.LogInputs) error) *MockExperimentsInterface_LogInputs_Call { - _c.Call.Return(run) - return _c -} - -// LogMetric provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) LogMetric(ctx context.Context, request ml.LogMetric) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for LogMetric") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.LogMetric) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_LogMetric_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogMetric' -type MockExperimentsInterface_LogMetric_Call struct { - *mock.Call -} - -// LogMetric is a helper method to define mock.On call -// - ctx context.Context -// - request ml.LogMetric -func (_e *MockExperimentsInterface_Expecter) LogMetric(ctx interface{}, request interface{}) *MockExperimentsInterface_LogMetric_Call { - return &MockExperimentsInterface_LogMetric_Call{Call: _e.mock.On("LogMetric", ctx, request)} -} - -func (_c *MockExperimentsInterface_LogMetric_Call) Run(run func(ctx context.Context, request ml.LogMetric)) *MockExperimentsInterface_LogMetric_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.LogMetric)) - }) - return _c -} - -func (_c *MockExperimentsInterface_LogMetric_Call) Return(_a0 error) *MockExperimentsInterface_LogMetric_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_LogMetric_Call) RunAndReturn(run func(context.Context, ml.LogMetric) error) *MockExperimentsInterface_LogMetric_Call { - _c.Call.Return(run) - return _c -} - -// LogModel provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) LogModel(ctx context.Context, request ml.LogModel) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for LogModel") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.LogModel) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_LogModel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogModel' -type MockExperimentsInterface_LogModel_Call struct { - *mock.Call -} - -// LogModel is a helper method to define mock.On call -// - ctx context.Context -// - request ml.LogModel -func (_e *MockExperimentsInterface_Expecter) LogModel(ctx interface{}, request interface{}) *MockExperimentsInterface_LogModel_Call { - return &MockExperimentsInterface_LogModel_Call{Call: _e.mock.On("LogModel", ctx, request)} -} - -func (_c *MockExperimentsInterface_LogModel_Call) Run(run func(ctx context.Context, request ml.LogModel)) *MockExperimentsInterface_LogModel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.LogModel)) - }) - return _c -} - -func (_c *MockExperimentsInterface_LogModel_Call) Return(_a0 error) *MockExperimentsInterface_LogModel_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_LogModel_Call) RunAndReturn(run func(context.Context, ml.LogModel) error) *MockExperimentsInterface_LogModel_Call { - _c.Call.Return(run) - return _c -} - -// LogParam provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) LogParam(ctx context.Context, request ml.LogParam) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for LogParam") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.LogParam) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_LogParam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogParam' -type MockExperimentsInterface_LogParam_Call struct { - *mock.Call -} - -// LogParam is a helper method to define mock.On call -// - ctx context.Context -// - request ml.LogParam -func (_e *MockExperimentsInterface_Expecter) LogParam(ctx interface{}, request interface{}) *MockExperimentsInterface_LogParam_Call { - return &MockExperimentsInterface_LogParam_Call{Call: _e.mock.On("LogParam", ctx, request)} -} - -func (_c *MockExperimentsInterface_LogParam_Call) Run(run func(ctx context.Context, request ml.LogParam)) *MockExperimentsInterface_LogParam_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.LogParam)) - }) - return _c -} - -func (_c *MockExperimentsInterface_LogParam_Call) Return(_a0 error) *MockExperimentsInterface_LogParam_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_LogParam_Call) RunAndReturn(run func(context.Context, ml.LogParam) error) *MockExperimentsInterface_LogParam_Call { - _c.Call.Return(run) - return _c -} - -// RestoreExperiment provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) RestoreExperiment(ctx context.Context, request ml.RestoreExperiment) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RestoreExperiment") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.RestoreExperiment) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_RestoreExperiment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreExperiment' -type MockExperimentsInterface_RestoreExperiment_Call struct { - *mock.Call -} - -// RestoreExperiment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.RestoreExperiment -func (_e *MockExperimentsInterface_Expecter) RestoreExperiment(ctx interface{}, request interface{}) *MockExperimentsInterface_RestoreExperiment_Call { - return &MockExperimentsInterface_RestoreExperiment_Call{Call: _e.mock.On("RestoreExperiment", ctx, request)} -} - -func (_c *MockExperimentsInterface_RestoreExperiment_Call) Run(run func(ctx context.Context, request ml.RestoreExperiment)) *MockExperimentsInterface_RestoreExperiment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.RestoreExperiment)) - }) - return _c -} - -func (_c *MockExperimentsInterface_RestoreExperiment_Call) Return(_a0 error) *MockExperimentsInterface_RestoreExperiment_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_RestoreExperiment_Call) RunAndReturn(run func(context.Context, ml.RestoreExperiment) error) *MockExperimentsInterface_RestoreExperiment_Call { - _c.Call.Return(run) - return _c -} - -// RestoreRun provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) RestoreRun(ctx context.Context, request ml.RestoreRun) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RestoreRun") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.RestoreRun) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_RestoreRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRun' -type MockExperimentsInterface_RestoreRun_Call struct { - *mock.Call -} - -// RestoreRun is a helper method to define mock.On call -// - ctx context.Context -// - request ml.RestoreRun -func (_e *MockExperimentsInterface_Expecter) RestoreRun(ctx interface{}, request interface{}) *MockExperimentsInterface_RestoreRun_Call { - return &MockExperimentsInterface_RestoreRun_Call{Call: _e.mock.On("RestoreRun", ctx, request)} -} - -func (_c *MockExperimentsInterface_RestoreRun_Call) Run(run func(ctx context.Context, request ml.RestoreRun)) *MockExperimentsInterface_RestoreRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.RestoreRun)) - }) - return _c -} - -func (_c *MockExperimentsInterface_RestoreRun_Call) Return(_a0 error) *MockExperimentsInterface_RestoreRun_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_RestoreRun_Call) RunAndReturn(run func(context.Context, ml.RestoreRun) error) *MockExperimentsInterface_RestoreRun_Call { - _c.Call.Return(run) - return _c -} - -// RestoreRuns provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) RestoreRuns(ctx context.Context, request ml.RestoreRuns) (*ml.RestoreRunsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RestoreRuns") - } - - var r0 *ml.RestoreRunsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.RestoreRuns) (*ml.RestoreRunsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.RestoreRuns) *ml.RestoreRunsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.RestoreRunsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.RestoreRuns) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_RestoreRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRuns' -type MockExperimentsInterface_RestoreRuns_Call struct { - *mock.Call -} - -// RestoreRuns is a helper method to define mock.On call -// - ctx context.Context -// - request ml.RestoreRuns -func (_e *MockExperimentsInterface_Expecter) RestoreRuns(ctx interface{}, request interface{}) *MockExperimentsInterface_RestoreRuns_Call { - return &MockExperimentsInterface_RestoreRuns_Call{Call: _e.mock.On("RestoreRuns", ctx, request)} -} - -func (_c *MockExperimentsInterface_RestoreRuns_Call) Run(run func(ctx context.Context, request ml.RestoreRuns)) *MockExperimentsInterface_RestoreRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.RestoreRuns)) - }) - return _c -} - -func (_c *MockExperimentsInterface_RestoreRuns_Call) Return(_a0 *ml.RestoreRunsResponse, _a1 error) *MockExperimentsInterface_RestoreRuns_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_RestoreRuns_Call) RunAndReturn(run func(context.Context, ml.RestoreRuns) (*ml.RestoreRunsResponse, error)) *MockExperimentsInterface_RestoreRuns_Call { - _c.Call.Return(run) - return _c -} - -// SearchExperiments provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) SearchExperiments(ctx context.Context, request ml.SearchExperiments) listing.Iterator[ml.Experiment] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchExperiments") - } - - var r0 listing.Iterator[ml.Experiment] - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchExperiments) listing.Iterator[ml.Experiment]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.Experiment]) - } - } - - return r0 -} - -// MockExperimentsInterface_SearchExperiments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchExperiments' -type MockExperimentsInterface_SearchExperiments_Call struct { - *mock.Call -} - -// SearchExperiments is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchExperiments -func (_e *MockExperimentsInterface_Expecter) SearchExperiments(ctx interface{}, request interface{}) *MockExperimentsInterface_SearchExperiments_Call { - return &MockExperimentsInterface_SearchExperiments_Call{Call: _e.mock.On("SearchExperiments", ctx, request)} -} - -func (_c *MockExperimentsInterface_SearchExperiments_Call) Run(run func(ctx context.Context, request ml.SearchExperiments)) *MockExperimentsInterface_SearchExperiments_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchExperiments)) - }) - return _c -} - -func (_c *MockExperimentsInterface_SearchExperiments_Call) Return(_a0 listing.Iterator[ml.Experiment]) *MockExperimentsInterface_SearchExperiments_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_SearchExperiments_Call) RunAndReturn(run func(context.Context, ml.SearchExperiments) listing.Iterator[ml.Experiment]) *MockExperimentsInterface_SearchExperiments_Call { - _c.Call.Return(run) - return _c -} - -// SearchExperimentsAll provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) SearchExperimentsAll(ctx context.Context, request ml.SearchExperiments) ([]ml.Experiment, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchExperimentsAll") - } - - var r0 []ml.Experiment - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchExperiments) ([]ml.Experiment, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchExperiments) []ml.Experiment); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.Experiment) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.SearchExperiments) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_SearchExperimentsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchExperimentsAll' -type MockExperimentsInterface_SearchExperimentsAll_Call struct { - *mock.Call -} - -// SearchExperimentsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchExperiments -func (_e *MockExperimentsInterface_Expecter) SearchExperimentsAll(ctx interface{}, request interface{}) *MockExperimentsInterface_SearchExperimentsAll_Call { - return &MockExperimentsInterface_SearchExperimentsAll_Call{Call: _e.mock.On("SearchExperimentsAll", ctx, request)} -} - -func (_c *MockExperimentsInterface_SearchExperimentsAll_Call) Run(run func(ctx context.Context, request ml.SearchExperiments)) *MockExperimentsInterface_SearchExperimentsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchExperiments)) - }) - return _c -} - -func (_c *MockExperimentsInterface_SearchExperimentsAll_Call) Return(_a0 []ml.Experiment, _a1 error) *MockExperimentsInterface_SearchExperimentsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_SearchExperimentsAll_Call) RunAndReturn(run func(context.Context, ml.SearchExperiments) ([]ml.Experiment, error)) *MockExperimentsInterface_SearchExperimentsAll_Call { - _c.Call.Return(run) - return _c -} - -// SearchRuns provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) SearchRuns(ctx context.Context, request ml.SearchRuns) listing.Iterator[ml.Run] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchRuns") - } - - var r0 listing.Iterator[ml.Run] - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchRuns) listing.Iterator[ml.Run]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.Run]) - } - } - - return r0 -} - -// MockExperimentsInterface_SearchRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchRuns' -type MockExperimentsInterface_SearchRuns_Call struct { - *mock.Call -} - -// SearchRuns is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchRuns -func (_e *MockExperimentsInterface_Expecter) SearchRuns(ctx interface{}, request interface{}) *MockExperimentsInterface_SearchRuns_Call { - return &MockExperimentsInterface_SearchRuns_Call{Call: _e.mock.On("SearchRuns", ctx, request)} -} - -func (_c *MockExperimentsInterface_SearchRuns_Call) Run(run func(ctx context.Context, request ml.SearchRuns)) *MockExperimentsInterface_SearchRuns_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchRuns)) - }) - return _c -} - -func (_c *MockExperimentsInterface_SearchRuns_Call) Return(_a0 listing.Iterator[ml.Run]) *MockExperimentsInterface_SearchRuns_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_SearchRuns_Call) RunAndReturn(run func(context.Context, ml.SearchRuns) listing.Iterator[ml.Run]) *MockExperimentsInterface_SearchRuns_Call { - _c.Call.Return(run) - return _c -} - -// SearchRunsAll provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) SearchRunsAll(ctx context.Context, request ml.SearchRuns) ([]ml.Run, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchRunsAll") - } - - var r0 []ml.Run - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchRuns) ([]ml.Run, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchRuns) []ml.Run); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.Run) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.SearchRuns) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_SearchRunsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchRunsAll' -type MockExperimentsInterface_SearchRunsAll_Call struct { - *mock.Call -} - -// SearchRunsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchRuns -func (_e *MockExperimentsInterface_Expecter) SearchRunsAll(ctx interface{}, request interface{}) *MockExperimentsInterface_SearchRunsAll_Call { - return &MockExperimentsInterface_SearchRunsAll_Call{Call: _e.mock.On("SearchRunsAll", ctx, request)} -} - -func (_c *MockExperimentsInterface_SearchRunsAll_Call) Run(run func(ctx context.Context, request ml.SearchRuns)) *MockExperimentsInterface_SearchRunsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchRuns)) - }) - return _c -} - -func (_c *MockExperimentsInterface_SearchRunsAll_Call) Return(_a0 []ml.Run, _a1 error) *MockExperimentsInterface_SearchRunsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_SearchRunsAll_Call) RunAndReturn(run func(context.Context, ml.SearchRuns) ([]ml.Run, error)) *MockExperimentsInterface_SearchRunsAll_Call { - _c.Call.Return(run) - return _c -} - -// SetExperimentTag provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) SetExperimentTag(ctx context.Context, request ml.SetExperimentTag) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetExperimentTag") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SetExperimentTag) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_SetExperimentTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetExperimentTag' -type MockExperimentsInterface_SetExperimentTag_Call struct { - *mock.Call -} - -// SetExperimentTag is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SetExperimentTag -func (_e *MockExperimentsInterface_Expecter) SetExperimentTag(ctx interface{}, request interface{}) *MockExperimentsInterface_SetExperimentTag_Call { - return &MockExperimentsInterface_SetExperimentTag_Call{Call: _e.mock.On("SetExperimentTag", ctx, request)} -} - -func (_c *MockExperimentsInterface_SetExperimentTag_Call) Run(run func(ctx context.Context, request ml.SetExperimentTag)) *MockExperimentsInterface_SetExperimentTag_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SetExperimentTag)) - }) - return _c -} - -func (_c *MockExperimentsInterface_SetExperimentTag_Call) Return(_a0 error) *MockExperimentsInterface_SetExperimentTag_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_SetExperimentTag_Call) RunAndReturn(run func(context.Context, ml.SetExperimentTag) error) *MockExperimentsInterface_SetExperimentTag_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) SetPermissions(ctx context.Context, request ml.ExperimentPermissionsRequest) (*ml.ExperimentPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *ml.ExperimentPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ExperimentPermissionsRequest) (*ml.ExperimentPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ExperimentPermissionsRequest) *ml.ExperimentPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.ExperimentPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ExperimentPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockExperimentsInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ExperimentPermissionsRequest -func (_e *MockExperimentsInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockExperimentsInterface_SetPermissions_Call { - return &MockExperimentsInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockExperimentsInterface_SetPermissions_Call) Run(run func(ctx context.Context, request ml.ExperimentPermissionsRequest)) *MockExperimentsInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ExperimentPermissionsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_SetPermissions_Call) Return(_a0 *ml.ExperimentPermissions, _a1 error) *MockExperimentsInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, ml.ExperimentPermissionsRequest) (*ml.ExperimentPermissions, error)) *MockExperimentsInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// SetTag provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) SetTag(ctx context.Context, request ml.SetTag) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetTag") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SetTag) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_SetTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTag' -type MockExperimentsInterface_SetTag_Call struct { - *mock.Call -} - -// SetTag is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SetTag -func (_e *MockExperimentsInterface_Expecter) SetTag(ctx interface{}, request interface{}) *MockExperimentsInterface_SetTag_Call { - return &MockExperimentsInterface_SetTag_Call{Call: _e.mock.On("SetTag", ctx, request)} -} - -func (_c *MockExperimentsInterface_SetTag_Call) Run(run func(ctx context.Context, request ml.SetTag)) *MockExperimentsInterface_SetTag_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SetTag)) - }) - return _c -} - -func (_c *MockExperimentsInterface_SetTag_Call) Return(_a0 error) *MockExperimentsInterface_SetTag_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_SetTag_Call) RunAndReturn(run func(context.Context, ml.SetTag) error) *MockExperimentsInterface_SetTag_Call { - _c.Call.Return(run) - return _c -} - -// UpdateExperiment provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) UpdateExperiment(ctx context.Context, request ml.UpdateExperiment) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateExperiment") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateExperiment) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockExperimentsInterface_UpdateExperiment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateExperiment' -type MockExperimentsInterface_UpdateExperiment_Call struct { - *mock.Call -} - -// UpdateExperiment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.UpdateExperiment -func (_e *MockExperimentsInterface_Expecter) UpdateExperiment(ctx interface{}, request interface{}) *MockExperimentsInterface_UpdateExperiment_Call { - return &MockExperimentsInterface_UpdateExperiment_Call{Call: _e.mock.On("UpdateExperiment", ctx, request)} -} - -func (_c *MockExperimentsInterface_UpdateExperiment_Call) Run(run func(ctx context.Context, request ml.UpdateExperiment)) *MockExperimentsInterface_UpdateExperiment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.UpdateExperiment)) - }) - return _c -} - -func (_c *MockExperimentsInterface_UpdateExperiment_Call) Return(_a0 error) *MockExperimentsInterface_UpdateExperiment_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockExperimentsInterface_UpdateExperiment_Call) RunAndReturn(run func(context.Context, ml.UpdateExperiment) error) *MockExperimentsInterface_UpdateExperiment_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) UpdatePermissions(ctx context.Context, request ml.ExperimentPermissionsRequest) (*ml.ExperimentPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *ml.ExperimentPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ExperimentPermissionsRequest) (*ml.ExperimentPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ExperimentPermissionsRequest) *ml.ExperimentPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.ExperimentPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ExperimentPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockExperimentsInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ExperimentPermissionsRequest -func (_e *MockExperimentsInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockExperimentsInterface_UpdatePermissions_Call { - return &MockExperimentsInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockExperimentsInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request ml.ExperimentPermissionsRequest)) *MockExperimentsInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ExperimentPermissionsRequest)) - }) - return _c -} - -func (_c *MockExperimentsInterface_UpdatePermissions_Call) Return(_a0 *ml.ExperimentPermissions, _a1 error) *MockExperimentsInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, ml.ExperimentPermissionsRequest) (*ml.ExperimentPermissions, error)) *MockExperimentsInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// UpdateRun provides a mock function with given fields: ctx, request -func (_m *MockExperimentsInterface) UpdateRun(ctx context.Context, request ml.UpdateRun) (*ml.UpdateRunResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateRun") - } - - var r0 *ml.UpdateRunResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateRun) (*ml.UpdateRunResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateRun) *ml.UpdateRunResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.UpdateRunResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.UpdateRun) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockExperimentsInterface_UpdateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRun' -type MockExperimentsInterface_UpdateRun_Call struct { - *mock.Call -} - -// UpdateRun is a helper method to define mock.On call -// - ctx context.Context -// - request ml.UpdateRun -func (_e *MockExperimentsInterface_Expecter) UpdateRun(ctx interface{}, request interface{}) *MockExperimentsInterface_UpdateRun_Call { - return &MockExperimentsInterface_UpdateRun_Call{Call: _e.mock.On("UpdateRun", ctx, request)} -} - -func (_c *MockExperimentsInterface_UpdateRun_Call) Run(run func(ctx context.Context, request ml.UpdateRun)) *MockExperimentsInterface_UpdateRun_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.UpdateRun)) - }) - return _c -} - -func (_c *MockExperimentsInterface_UpdateRun_Call) Return(_a0 *ml.UpdateRunResponse, _a1 error) *MockExperimentsInterface_UpdateRun_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockExperimentsInterface_UpdateRun_Call) RunAndReturn(run func(context.Context, ml.UpdateRun) (*ml.UpdateRunResponse, error)) *MockExperimentsInterface_UpdateRun_Call { - _c.Call.Return(run) - return _c -} - -// NewMockExperimentsInterface creates a new instance of MockExperimentsInterface. 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 NewMockExperimentsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockExperimentsInterface { - mock := &MockExperimentsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/ml/mock_model_registry_interface.go b/experimental/mocks/service/ml/mock_model_registry_interface.go deleted file mode 100644 index c4196bccd..000000000 --- a/experimental/mocks/service/ml/mock_model_registry_interface.go +++ /dev/null @@ -1,2431 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package ml - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - ml "github.com/databricks/databricks-sdk-go/service/ml" - - mock "github.com/stretchr/testify/mock" -) - -// MockModelRegistryInterface is an autogenerated mock type for the ModelRegistryInterface type -type MockModelRegistryInterface struct { - mock.Mock -} - -type MockModelRegistryInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockModelRegistryInterface) EXPECT() *MockModelRegistryInterface_Expecter { - return &MockModelRegistryInterface_Expecter{mock: &_m.Mock} -} - -// ApproveTransitionRequest provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) ApproveTransitionRequest(ctx context.Context, request ml.ApproveTransitionRequest) (*ml.ApproveTransitionRequestResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ApproveTransitionRequest") - } - - var r0 *ml.ApproveTransitionRequestResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ApproveTransitionRequest) (*ml.ApproveTransitionRequestResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ApproveTransitionRequest) *ml.ApproveTransitionRequestResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.ApproveTransitionRequestResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ApproveTransitionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_ApproveTransitionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApproveTransitionRequest' -type MockModelRegistryInterface_ApproveTransitionRequest_Call struct { - *mock.Call -} - -// ApproveTransitionRequest is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ApproveTransitionRequest -func (_e *MockModelRegistryInterface_Expecter) ApproveTransitionRequest(ctx interface{}, request interface{}) *MockModelRegistryInterface_ApproveTransitionRequest_Call { - return &MockModelRegistryInterface_ApproveTransitionRequest_Call{Call: _e.mock.On("ApproveTransitionRequest", ctx, request)} -} - -func (_c *MockModelRegistryInterface_ApproveTransitionRequest_Call) Run(run func(ctx context.Context, request ml.ApproveTransitionRequest)) *MockModelRegistryInterface_ApproveTransitionRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ApproveTransitionRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_ApproveTransitionRequest_Call) Return(_a0 *ml.ApproveTransitionRequestResponse, _a1 error) *MockModelRegistryInterface_ApproveTransitionRequest_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_ApproveTransitionRequest_Call) RunAndReturn(run func(context.Context, ml.ApproveTransitionRequest) (*ml.ApproveTransitionRequestResponse, error)) *MockModelRegistryInterface_ApproveTransitionRequest_Call { - _c.Call.Return(run) - return _c -} - -// CreateComment provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) CreateComment(ctx context.Context, request ml.CreateComment) (*ml.CreateCommentResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateComment") - } - - var r0 *ml.CreateCommentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateComment) (*ml.CreateCommentResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateComment) *ml.CreateCommentResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.CreateCommentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.CreateComment) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_CreateComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateComment' -type MockModelRegistryInterface_CreateComment_Call struct { - *mock.Call -} - -// CreateComment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.CreateComment -func (_e *MockModelRegistryInterface_Expecter) CreateComment(ctx interface{}, request interface{}) *MockModelRegistryInterface_CreateComment_Call { - return &MockModelRegistryInterface_CreateComment_Call{Call: _e.mock.On("CreateComment", ctx, request)} -} - -func (_c *MockModelRegistryInterface_CreateComment_Call) Run(run func(ctx context.Context, request ml.CreateComment)) *MockModelRegistryInterface_CreateComment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.CreateComment)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_CreateComment_Call) Return(_a0 *ml.CreateCommentResponse, _a1 error) *MockModelRegistryInterface_CreateComment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_CreateComment_Call) RunAndReturn(run func(context.Context, ml.CreateComment) (*ml.CreateCommentResponse, error)) *MockModelRegistryInterface_CreateComment_Call { - _c.Call.Return(run) - return _c -} - -// CreateModel provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) CreateModel(ctx context.Context, request ml.CreateModelRequest) (*ml.CreateModelResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateModel") - } - - var r0 *ml.CreateModelResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateModelRequest) (*ml.CreateModelResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateModelRequest) *ml.CreateModelResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.CreateModelResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.CreateModelRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_CreateModel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateModel' -type MockModelRegistryInterface_CreateModel_Call struct { - *mock.Call -} - -// CreateModel is a helper method to define mock.On call -// - ctx context.Context -// - request ml.CreateModelRequest -func (_e *MockModelRegistryInterface_Expecter) CreateModel(ctx interface{}, request interface{}) *MockModelRegistryInterface_CreateModel_Call { - return &MockModelRegistryInterface_CreateModel_Call{Call: _e.mock.On("CreateModel", ctx, request)} -} - -func (_c *MockModelRegistryInterface_CreateModel_Call) Run(run func(ctx context.Context, request ml.CreateModelRequest)) *MockModelRegistryInterface_CreateModel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.CreateModelRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_CreateModel_Call) Return(_a0 *ml.CreateModelResponse, _a1 error) *MockModelRegistryInterface_CreateModel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_CreateModel_Call) RunAndReturn(run func(context.Context, ml.CreateModelRequest) (*ml.CreateModelResponse, error)) *MockModelRegistryInterface_CreateModel_Call { - _c.Call.Return(run) - return _c -} - -// CreateModelVersion provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) CreateModelVersion(ctx context.Context, request ml.CreateModelVersionRequest) (*ml.CreateModelVersionResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateModelVersion") - } - - var r0 *ml.CreateModelVersionResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateModelVersionRequest) (*ml.CreateModelVersionResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateModelVersionRequest) *ml.CreateModelVersionResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.CreateModelVersionResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.CreateModelVersionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_CreateModelVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateModelVersion' -type MockModelRegistryInterface_CreateModelVersion_Call struct { - *mock.Call -} - -// CreateModelVersion is a helper method to define mock.On call -// - ctx context.Context -// - request ml.CreateModelVersionRequest -func (_e *MockModelRegistryInterface_Expecter) CreateModelVersion(ctx interface{}, request interface{}) *MockModelRegistryInterface_CreateModelVersion_Call { - return &MockModelRegistryInterface_CreateModelVersion_Call{Call: _e.mock.On("CreateModelVersion", ctx, request)} -} - -func (_c *MockModelRegistryInterface_CreateModelVersion_Call) Run(run func(ctx context.Context, request ml.CreateModelVersionRequest)) *MockModelRegistryInterface_CreateModelVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.CreateModelVersionRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_CreateModelVersion_Call) Return(_a0 *ml.CreateModelVersionResponse, _a1 error) *MockModelRegistryInterface_CreateModelVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_CreateModelVersion_Call) RunAndReturn(run func(context.Context, ml.CreateModelVersionRequest) (*ml.CreateModelVersionResponse, error)) *MockModelRegistryInterface_CreateModelVersion_Call { - _c.Call.Return(run) - return _c -} - -// CreateTransitionRequest provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) CreateTransitionRequest(ctx context.Context, request ml.CreateTransitionRequest) (*ml.CreateTransitionRequestResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateTransitionRequest") - } - - var r0 *ml.CreateTransitionRequestResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateTransitionRequest) (*ml.CreateTransitionRequestResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateTransitionRequest) *ml.CreateTransitionRequestResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.CreateTransitionRequestResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.CreateTransitionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_CreateTransitionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTransitionRequest' -type MockModelRegistryInterface_CreateTransitionRequest_Call struct { - *mock.Call -} - -// CreateTransitionRequest is a helper method to define mock.On call -// - ctx context.Context -// - request ml.CreateTransitionRequest -func (_e *MockModelRegistryInterface_Expecter) CreateTransitionRequest(ctx interface{}, request interface{}) *MockModelRegistryInterface_CreateTransitionRequest_Call { - return &MockModelRegistryInterface_CreateTransitionRequest_Call{Call: _e.mock.On("CreateTransitionRequest", ctx, request)} -} - -func (_c *MockModelRegistryInterface_CreateTransitionRequest_Call) Run(run func(ctx context.Context, request ml.CreateTransitionRequest)) *MockModelRegistryInterface_CreateTransitionRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.CreateTransitionRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_CreateTransitionRequest_Call) Return(_a0 *ml.CreateTransitionRequestResponse, _a1 error) *MockModelRegistryInterface_CreateTransitionRequest_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_CreateTransitionRequest_Call) RunAndReturn(run func(context.Context, ml.CreateTransitionRequest) (*ml.CreateTransitionRequestResponse, error)) *MockModelRegistryInterface_CreateTransitionRequest_Call { - _c.Call.Return(run) - return _c -} - -// CreateWebhook provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) CreateWebhook(ctx context.Context, request ml.CreateRegistryWebhook) (*ml.CreateWebhookResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateWebhook") - } - - var r0 *ml.CreateWebhookResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateRegistryWebhook) (*ml.CreateWebhookResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.CreateRegistryWebhook) *ml.CreateWebhookResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.CreateWebhookResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.CreateRegistryWebhook) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_CreateWebhook_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateWebhook' -type MockModelRegistryInterface_CreateWebhook_Call struct { - *mock.Call -} - -// CreateWebhook is a helper method to define mock.On call -// - ctx context.Context -// - request ml.CreateRegistryWebhook -func (_e *MockModelRegistryInterface_Expecter) CreateWebhook(ctx interface{}, request interface{}) *MockModelRegistryInterface_CreateWebhook_Call { - return &MockModelRegistryInterface_CreateWebhook_Call{Call: _e.mock.On("CreateWebhook", ctx, request)} -} - -func (_c *MockModelRegistryInterface_CreateWebhook_Call) Run(run func(ctx context.Context, request ml.CreateRegistryWebhook)) *MockModelRegistryInterface_CreateWebhook_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.CreateRegistryWebhook)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_CreateWebhook_Call) Return(_a0 *ml.CreateWebhookResponse, _a1 error) *MockModelRegistryInterface_CreateWebhook_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_CreateWebhook_Call) RunAndReturn(run func(context.Context, ml.CreateRegistryWebhook) (*ml.CreateWebhookResponse, error)) *MockModelRegistryInterface_CreateWebhook_Call { - _c.Call.Return(run) - return _c -} - -// DeleteComment provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) DeleteComment(ctx context.Context, request ml.DeleteCommentRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteComment") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteCommentRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_DeleteComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteComment' -type MockModelRegistryInterface_DeleteComment_Call struct { - *mock.Call -} - -// DeleteComment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteCommentRequest -func (_e *MockModelRegistryInterface_Expecter) DeleteComment(ctx interface{}, request interface{}) *MockModelRegistryInterface_DeleteComment_Call { - return &MockModelRegistryInterface_DeleteComment_Call{Call: _e.mock.On("DeleteComment", ctx, request)} -} - -func (_c *MockModelRegistryInterface_DeleteComment_Call) Run(run func(ctx context.Context, request ml.DeleteCommentRequest)) *MockModelRegistryInterface_DeleteComment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteCommentRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteComment_Call) Return(_a0 error) *MockModelRegistryInterface_DeleteComment_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteComment_Call) RunAndReturn(run func(context.Context, ml.DeleteCommentRequest) error) *MockModelRegistryInterface_DeleteComment_Call { - _c.Call.Return(run) - return _c -} - -// DeleteModel provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) DeleteModel(ctx context.Context, request ml.DeleteModelRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteModel") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteModelRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_DeleteModel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteModel' -type MockModelRegistryInterface_DeleteModel_Call struct { - *mock.Call -} - -// DeleteModel is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteModelRequest -func (_e *MockModelRegistryInterface_Expecter) DeleteModel(ctx interface{}, request interface{}) *MockModelRegistryInterface_DeleteModel_Call { - return &MockModelRegistryInterface_DeleteModel_Call{Call: _e.mock.On("DeleteModel", ctx, request)} -} - -func (_c *MockModelRegistryInterface_DeleteModel_Call) Run(run func(ctx context.Context, request ml.DeleteModelRequest)) *MockModelRegistryInterface_DeleteModel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteModelRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModel_Call) Return(_a0 error) *MockModelRegistryInterface_DeleteModel_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModel_Call) RunAndReturn(run func(context.Context, ml.DeleteModelRequest) error) *MockModelRegistryInterface_DeleteModel_Call { - _c.Call.Return(run) - return _c -} - -// DeleteModelTag provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) DeleteModelTag(ctx context.Context, request ml.DeleteModelTagRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteModelTag") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteModelTagRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_DeleteModelTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteModelTag' -type MockModelRegistryInterface_DeleteModelTag_Call struct { - *mock.Call -} - -// DeleteModelTag is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteModelTagRequest -func (_e *MockModelRegistryInterface_Expecter) DeleteModelTag(ctx interface{}, request interface{}) *MockModelRegistryInterface_DeleteModelTag_Call { - return &MockModelRegistryInterface_DeleteModelTag_Call{Call: _e.mock.On("DeleteModelTag", ctx, request)} -} - -func (_c *MockModelRegistryInterface_DeleteModelTag_Call) Run(run func(ctx context.Context, request ml.DeleteModelTagRequest)) *MockModelRegistryInterface_DeleteModelTag_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteModelTagRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModelTag_Call) Return(_a0 error) *MockModelRegistryInterface_DeleteModelTag_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModelTag_Call) RunAndReturn(run func(context.Context, ml.DeleteModelTagRequest) error) *MockModelRegistryInterface_DeleteModelTag_Call { - _c.Call.Return(run) - return _c -} - -// DeleteModelVersion provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) DeleteModelVersion(ctx context.Context, request ml.DeleteModelVersionRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteModelVersion") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteModelVersionRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_DeleteModelVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteModelVersion' -type MockModelRegistryInterface_DeleteModelVersion_Call struct { - *mock.Call -} - -// DeleteModelVersion is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteModelVersionRequest -func (_e *MockModelRegistryInterface_Expecter) DeleteModelVersion(ctx interface{}, request interface{}) *MockModelRegistryInterface_DeleteModelVersion_Call { - return &MockModelRegistryInterface_DeleteModelVersion_Call{Call: _e.mock.On("DeleteModelVersion", ctx, request)} -} - -func (_c *MockModelRegistryInterface_DeleteModelVersion_Call) Run(run func(ctx context.Context, request ml.DeleteModelVersionRequest)) *MockModelRegistryInterface_DeleteModelVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteModelVersionRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModelVersion_Call) Return(_a0 error) *MockModelRegistryInterface_DeleteModelVersion_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModelVersion_Call) RunAndReturn(run func(context.Context, ml.DeleteModelVersionRequest) error) *MockModelRegistryInterface_DeleteModelVersion_Call { - _c.Call.Return(run) - return _c -} - -// DeleteModelVersionTag provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) DeleteModelVersionTag(ctx context.Context, request ml.DeleteModelVersionTagRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteModelVersionTag") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteModelVersionTagRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_DeleteModelVersionTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteModelVersionTag' -type MockModelRegistryInterface_DeleteModelVersionTag_Call struct { - *mock.Call -} - -// DeleteModelVersionTag is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteModelVersionTagRequest -func (_e *MockModelRegistryInterface_Expecter) DeleteModelVersionTag(ctx interface{}, request interface{}) *MockModelRegistryInterface_DeleteModelVersionTag_Call { - return &MockModelRegistryInterface_DeleteModelVersionTag_Call{Call: _e.mock.On("DeleteModelVersionTag", ctx, request)} -} - -func (_c *MockModelRegistryInterface_DeleteModelVersionTag_Call) Run(run func(ctx context.Context, request ml.DeleteModelVersionTagRequest)) *MockModelRegistryInterface_DeleteModelVersionTag_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteModelVersionTagRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModelVersionTag_Call) Return(_a0 error) *MockModelRegistryInterface_DeleteModelVersionTag_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteModelVersionTag_Call) RunAndReturn(run func(context.Context, ml.DeleteModelVersionTagRequest) error) *MockModelRegistryInterface_DeleteModelVersionTag_Call { - _c.Call.Return(run) - return _c -} - -// DeleteTransitionRequest provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) DeleteTransitionRequest(ctx context.Context, request ml.DeleteTransitionRequestRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteTransitionRequest") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteTransitionRequestRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_DeleteTransitionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTransitionRequest' -type MockModelRegistryInterface_DeleteTransitionRequest_Call struct { - *mock.Call -} - -// DeleteTransitionRequest is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteTransitionRequestRequest -func (_e *MockModelRegistryInterface_Expecter) DeleteTransitionRequest(ctx interface{}, request interface{}) *MockModelRegistryInterface_DeleteTransitionRequest_Call { - return &MockModelRegistryInterface_DeleteTransitionRequest_Call{Call: _e.mock.On("DeleteTransitionRequest", ctx, request)} -} - -func (_c *MockModelRegistryInterface_DeleteTransitionRequest_Call) Run(run func(ctx context.Context, request ml.DeleteTransitionRequestRequest)) *MockModelRegistryInterface_DeleteTransitionRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteTransitionRequestRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteTransitionRequest_Call) Return(_a0 error) *MockModelRegistryInterface_DeleteTransitionRequest_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteTransitionRequest_Call) RunAndReturn(run func(context.Context, ml.DeleteTransitionRequestRequest) error) *MockModelRegistryInterface_DeleteTransitionRequest_Call { - _c.Call.Return(run) - return _c -} - -// DeleteWebhook provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) DeleteWebhook(ctx context.Context, request ml.DeleteWebhookRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteWebhook") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.DeleteWebhookRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_DeleteWebhook_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteWebhook' -type MockModelRegistryInterface_DeleteWebhook_Call struct { - *mock.Call -} - -// DeleteWebhook is a helper method to define mock.On call -// - ctx context.Context -// - request ml.DeleteWebhookRequest -func (_e *MockModelRegistryInterface_Expecter) DeleteWebhook(ctx interface{}, request interface{}) *MockModelRegistryInterface_DeleteWebhook_Call { - return &MockModelRegistryInterface_DeleteWebhook_Call{Call: _e.mock.On("DeleteWebhook", ctx, request)} -} - -func (_c *MockModelRegistryInterface_DeleteWebhook_Call) Run(run func(ctx context.Context, request ml.DeleteWebhookRequest)) *MockModelRegistryInterface_DeleteWebhook_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.DeleteWebhookRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteWebhook_Call) Return(_a0 error) *MockModelRegistryInterface_DeleteWebhook_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_DeleteWebhook_Call) RunAndReturn(run func(context.Context, ml.DeleteWebhookRequest) error) *MockModelRegistryInterface_DeleteWebhook_Call { - _c.Call.Return(run) - return _c -} - -// GetLatestVersions provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) GetLatestVersions(ctx context.Context, request ml.GetLatestVersionsRequest) listing.Iterator[ml.ModelVersion] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetLatestVersions") - } - - var r0 listing.Iterator[ml.ModelVersion] - if rf, ok := ret.Get(0).(func(context.Context, ml.GetLatestVersionsRequest) listing.Iterator[ml.ModelVersion]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.ModelVersion]) - } - } - - return r0 -} - -// MockModelRegistryInterface_GetLatestVersions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVersions' -type MockModelRegistryInterface_GetLatestVersions_Call struct { - *mock.Call -} - -// GetLatestVersions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetLatestVersionsRequest -func (_e *MockModelRegistryInterface_Expecter) GetLatestVersions(ctx interface{}, request interface{}) *MockModelRegistryInterface_GetLatestVersions_Call { - return &MockModelRegistryInterface_GetLatestVersions_Call{Call: _e.mock.On("GetLatestVersions", ctx, request)} -} - -func (_c *MockModelRegistryInterface_GetLatestVersions_Call) Run(run func(ctx context.Context, request ml.GetLatestVersionsRequest)) *MockModelRegistryInterface_GetLatestVersions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetLatestVersionsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetLatestVersions_Call) Return(_a0 listing.Iterator[ml.ModelVersion]) *MockModelRegistryInterface_GetLatestVersions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_GetLatestVersions_Call) RunAndReturn(run func(context.Context, ml.GetLatestVersionsRequest) listing.Iterator[ml.ModelVersion]) *MockModelRegistryInterface_GetLatestVersions_Call { - _c.Call.Return(run) - return _c -} - -// GetLatestVersionsAll provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) GetLatestVersionsAll(ctx context.Context, request ml.GetLatestVersionsRequest) ([]ml.ModelVersion, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetLatestVersionsAll") - } - - var r0 []ml.ModelVersion - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetLatestVersionsRequest) ([]ml.ModelVersion, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetLatestVersionsRequest) []ml.ModelVersion); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.ModelVersion) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetLatestVersionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetLatestVersionsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestVersionsAll' -type MockModelRegistryInterface_GetLatestVersionsAll_Call struct { - *mock.Call -} - -// GetLatestVersionsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetLatestVersionsRequest -func (_e *MockModelRegistryInterface_Expecter) GetLatestVersionsAll(ctx interface{}, request interface{}) *MockModelRegistryInterface_GetLatestVersionsAll_Call { - return &MockModelRegistryInterface_GetLatestVersionsAll_Call{Call: _e.mock.On("GetLatestVersionsAll", ctx, request)} -} - -func (_c *MockModelRegistryInterface_GetLatestVersionsAll_Call) Run(run func(ctx context.Context, request ml.GetLatestVersionsRequest)) *MockModelRegistryInterface_GetLatestVersionsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetLatestVersionsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetLatestVersionsAll_Call) Return(_a0 []ml.ModelVersion, _a1 error) *MockModelRegistryInterface_GetLatestVersionsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetLatestVersionsAll_Call) RunAndReturn(run func(context.Context, ml.GetLatestVersionsRequest) ([]ml.ModelVersion, error)) *MockModelRegistryInterface_GetLatestVersionsAll_Call { - _c.Call.Return(run) - return _c -} - -// GetModel provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) GetModel(ctx context.Context, request ml.GetModelRequest) (*ml.GetModelResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetModel") - } - - var r0 *ml.GetModelResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetModelRequest) (*ml.GetModelResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetModelRequest) *ml.GetModelResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetModelResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetModelRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetModel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetModel' -type MockModelRegistryInterface_GetModel_Call struct { - *mock.Call -} - -// GetModel is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetModelRequest -func (_e *MockModelRegistryInterface_Expecter) GetModel(ctx interface{}, request interface{}) *MockModelRegistryInterface_GetModel_Call { - return &MockModelRegistryInterface_GetModel_Call{Call: _e.mock.On("GetModel", ctx, request)} -} - -func (_c *MockModelRegistryInterface_GetModel_Call) Run(run func(ctx context.Context, request ml.GetModelRequest)) *MockModelRegistryInterface_GetModel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetModelRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetModel_Call) Return(_a0 *ml.GetModelResponse, _a1 error) *MockModelRegistryInterface_GetModel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetModel_Call) RunAndReturn(run func(context.Context, ml.GetModelRequest) (*ml.GetModelResponse, error)) *MockModelRegistryInterface_GetModel_Call { - _c.Call.Return(run) - return _c -} - -// GetModelVersion provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) GetModelVersion(ctx context.Context, request ml.GetModelVersionRequest) (*ml.GetModelVersionResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetModelVersion") - } - - var r0 *ml.GetModelVersionResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetModelVersionRequest) (*ml.GetModelVersionResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetModelVersionRequest) *ml.GetModelVersionResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetModelVersionResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetModelVersionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetModelVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetModelVersion' -type MockModelRegistryInterface_GetModelVersion_Call struct { - *mock.Call -} - -// GetModelVersion is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetModelVersionRequest -func (_e *MockModelRegistryInterface_Expecter) GetModelVersion(ctx interface{}, request interface{}) *MockModelRegistryInterface_GetModelVersion_Call { - return &MockModelRegistryInterface_GetModelVersion_Call{Call: _e.mock.On("GetModelVersion", ctx, request)} -} - -func (_c *MockModelRegistryInterface_GetModelVersion_Call) Run(run func(ctx context.Context, request ml.GetModelVersionRequest)) *MockModelRegistryInterface_GetModelVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetModelVersionRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetModelVersion_Call) Return(_a0 *ml.GetModelVersionResponse, _a1 error) *MockModelRegistryInterface_GetModelVersion_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetModelVersion_Call) RunAndReturn(run func(context.Context, ml.GetModelVersionRequest) (*ml.GetModelVersionResponse, error)) *MockModelRegistryInterface_GetModelVersion_Call { - _c.Call.Return(run) - return _c -} - -// GetModelVersionDownloadUri provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) GetModelVersionDownloadUri(ctx context.Context, request ml.GetModelVersionDownloadUriRequest) (*ml.GetModelVersionDownloadUriResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetModelVersionDownloadUri") - } - - var r0 *ml.GetModelVersionDownloadUriResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetModelVersionDownloadUriRequest) (*ml.GetModelVersionDownloadUriResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetModelVersionDownloadUriRequest) *ml.GetModelVersionDownloadUriResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetModelVersionDownloadUriResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetModelVersionDownloadUriRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetModelVersionDownloadUri_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetModelVersionDownloadUri' -type MockModelRegistryInterface_GetModelVersionDownloadUri_Call struct { - *mock.Call -} - -// GetModelVersionDownloadUri is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetModelVersionDownloadUriRequest -func (_e *MockModelRegistryInterface_Expecter) GetModelVersionDownloadUri(ctx interface{}, request interface{}) *MockModelRegistryInterface_GetModelVersionDownloadUri_Call { - return &MockModelRegistryInterface_GetModelVersionDownloadUri_Call{Call: _e.mock.On("GetModelVersionDownloadUri", ctx, request)} -} - -func (_c *MockModelRegistryInterface_GetModelVersionDownloadUri_Call) Run(run func(ctx context.Context, request ml.GetModelVersionDownloadUriRequest)) *MockModelRegistryInterface_GetModelVersionDownloadUri_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetModelVersionDownloadUriRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetModelVersionDownloadUri_Call) Return(_a0 *ml.GetModelVersionDownloadUriResponse, _a1 error) *MockModelRegistryInterface_GetModelVersionDownloadUri_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetModelVersionDownloadUri_Call) RunAndReturn(run func(context.Context, ml.GetModelVersionDownloadUriRequest) (*ml.GetModelVersionDownloadUriResponse, error)) *MockModelRegistryInterface_GetModelVersionDownloadUri_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) GetPermissionLevels(ctx context.Context, request ml.GetRegisteredModelPermissionLevelsRequest) (*ml.GetRegisteredModelPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *ml.GetRegisteredModelPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetRegisteredModelPermissionLevelsRequest) (*ml.GetRegisteredModelPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetRegisteredModelPermissionLevelsRequest) *ml.GetRegisteredModelPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetRegisteredModelPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetRegisteredModelPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockModelRegistryInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetRegisteredModelPermissionLevelsRequest -func (_e *MockModelRegistryInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockModelRegistryInterface_GetPermissionLevels_Call { - return &MockModelRegistryInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockModelRegistryInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request ml.GetRegisteredModelPermissionLevelsRequest)) *MockModelRegistryInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetRegisteredModelPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissionLevels_Call) Return(_a0 *ml.GetRegisteredModelPermissionLevelsResponse, _a1 error) *MockModelRegistryInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, ml.GetRegisteredModelPermissionLevelsRequest) (*ml.GetRegisteredModelPermissionLevelsResponse, error)) *MockModelRegistryInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByRegisteredModelId provides a mock function with given fields: ctx, registeredModelId -func (_m *MockModelRegistryInterface) GetPermissionLevelsByRegisteredModelId(ctx context.Context, registeredModelId string) (*ml.GetRegisteredModelPermissionLevelsResponse, error) { - ret := _m.Called(ctx, registeredModelId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByRegisteredModelId") - } - - var r0 *ml.GetRegisteredModelPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*ml.GetRegisteredModelPermissionLevelsResponse, error)); ok { - return rf(ctx, registeredModelId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *ml.GetRegisteredModelPermissionLevelsResponse); ok { - r0 = rf(ctx, registeredModelId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.GetRegisteredModelPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, registeredModelId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByRegisteredModelId' -type MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByRegisteredModelId is a helper method to define mock.On call -// - ctx context.Context -// - registeredModelId string -func (_e *MockModelRegistryInterface_Expecter) GetPermissionLevelsByRegisteredModelId(ctx interface{}, registeredModelId interface{}) *MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call { - return &MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call{Call: _e.mock.On("GetPermissionLevelsByRegisteredModelId", ctx, registeredModelId)} -} - -func (_c *MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call) Run(run func(ctx context.Context, registeredModelId string)) *MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call) Return(_a0 *ml.GetRegisteredModelPermissionLevelsResponse, _a1 error) *MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call) RunAndReturn(run func(context.Context, string) (*ml.GetRegisteredModelPermissionLevelsResponse, error)) *MockModelRegistryInterface_GetPermissionLevelsByRegisteredModelId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) GetPermissions(ctx context.Context, request ml.GetRegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *ml.RegisteredModelPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.GetRegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.GetRegisteredModelPermissionsRequest) *ml.RegisteredModelPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.RegisteredModelPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.GetRegisteredModelPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockModelRegistryInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.GetRegisteredModelPermissionsRequest -func (_e *MockModelRegistryInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockModelRegistryInterface_GetPermissions_Call { - return &MockModelRegistryInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockModelRegistryInterface_GetPermissions_Call) Run(run func(ctx context.Context, request ml.GetRegisteredModelPermissionsRequest)) *MockModelRegistryInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.GetRegisteredModelPermissionsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissions_Call) Return(_a0 *ml.RegisteredModelPermissions, _a1 error) *MockModelRegistryInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, ml.GetRegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error)) *MockModelRegistryInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByRegisteredModelId provides a mock function with given fields: ctx, registeredModelId -func (_m *MockModelRegistryInterface) GetPermissionsByRegisteredModelId(ctx context.Context, registeredModelId string) (*ml.RegisteredModelPermissions, error) { - ret := _m.Called(ctx, registeredModelId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByRegisteredModelId") - } - - var r0 *ml.RegisteredModelPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*ml.RegisteredModelPermissions, error)); ok { - return rf(ctx, registeredModelId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *ml.RegisteredModelPermissions); ok { - r0 = rf(ctx, registeredModelId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.RegisteredModelPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, registeredModelId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByRegisteredModelId' -type MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call struct { - *mock.Call -} - -// GetPermissionsByRegisteredModelId is a helper method to define mock.On call -// - ctx context.Context -// - registeredModelId string -func (_e *MockModelRegistryInterface_Expecter) GetPermissionsByRegisteredModelId(ctx interface{}, registeredModelId interface{}) *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call { - return &MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call{Call: _e.mock.On("GetPermissionsByRegisteredModelId", ctx, registeredModelId)} -} - -func (_c *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call) Run(run func(ctx context.Context, registeredModelId string)) *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call) Return(_a0 *ml.RegisteredModelPermissions, _a1 error) *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call) RunAndReturn(run func(context.Context, string) (*ml.RegisteredModelPermissions, error)) *MockModelRegistryInterface_GetPermissionsByRegisteredModelId_Call { - _c.Call.Return(run) - return _c -} - -// ListModels provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) ListModels(ctx context.Context, request ml.ListModelsRequest) listing.Iterator[ml.Model] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListModels") - } - - var r0 listing.Iterator[ml.Model] - if rf, ok := ret.Get(0).(func(context.Context, ml.ListModelsRequest) listing.Iterator[ml.Model]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.Model]) - } - } - - return r0 -} - -// MockModelRegistryInterface_ListModels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListModels' -type MockModelRegistryInterface_ListModels_Call struct { - *mock.Call -} - -// ListModels is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListModelsRequest -func (_e *MockModelRegistryInterface_Expecter) ListModels(ctx interface{}, request interface{}) *MockModelRegistryInterface_ListModels_Call { - return &MockModelRegistryInterface_ListModels_Call{Call: _e.mock.On("ListModels", ctx, request)} -} - -func (_c *MockModelRegistryInterface_ListModels_Call) Run(run func(ctx context.Context, request ml.ListModelsRequest)) *MockModelRegistryInterface_ListModels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListModelsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_ListModels_Call) Return(_a0 listing.Iterator[ml.Model]) *MockModelRegistryInterface_ListModels_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_ListModels_Call) RunAndReturn(run func(context.Context, ml.ListModelsRequest) listing.Iterator[ml.Model]) *MockModelRegistryInterface_ListModels_Call { - _c.Call.Return(run) - return _c -} - -// ListModelsAll provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) ListModelsAll(ctx context.Context, request ml.ListModelsRequest) ([]ml.Model, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListModelsAll") - } - - var r0 []ml.Model - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ListModelsRequest) ([]ml.Model, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ListModelsRequest) []ml.Model); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.Model) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ListModelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_ListModelsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListModelsAll' -type MockModelRegistryInterface_ListModelsAll_Call struct { - *mock.Call -} - -// ListModelsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListModelsRequest -func (_e *MockModelRegistryInterface_Expecter) ListModelsAll(ctx interface{}, request interface{}) *MockModelRegistryInterface_ListModelsAll_Call { - return &MockModelRegistryInterface_ListModelsAll_Call{Call: _e.mock.On("ListModelsAll", ctx, request)} -} - -func (_c *MockModelRegistryInterface_ListModelsAll_Call) Run(run func(ctx context.Context, request ml.ListModelsRequest)) *MockModelRegistryInterface_ListModelsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListModelsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_ListModelsAll_Call) Return(_a0 []ml.Model, _a1 error) *MockModelRegistryInterface_ListModelsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_ListModelsAll_Call) RunAndReturn(run func(context.Context, ml.ListModelsRequest) ([]ml.Model, error)) *MockModelRegistryInterface_ListModelsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListTransitionRequests provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) ListTransitionRequests(ctx context.Context, request ml.ListTransitionRequestsRequest) listing.Iterator[ml.Activity] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListTransitionRequests") - } - - var r0 listing.Iterator[ml.Activity] - if rf, ok := ret.Get(0).(func(context.Context, ml.ListTransitionRequestsRequest) listing.Iterator[ml.Activity]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.Activity]) - } - } - - return r0 -} - -// MockModelRegistryInterface_ListTransitionRequests_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTransitionRequests' -type MockModelRegistryInterface_ListTransitionRequests_Call struct { - *mock.Call -} - -// ListTransitionRequests is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListTransitionRequestsRequest -func (_e *MockModelRegistryInterface_Expecter) ListTransitionRequests(ctx interface{}, request interface{}) *MockModelRegistryInterface_ListTransitionRequests_Call { - return &MockModelRegistryInterface_ListTransitionRequests_Call{Call: _e.mock.On("ListTransitionRequests", ctx, request)} -} - -func (_c *MockModelRegistryInterface_ListTransitionRequests_Call) Run(run func(ctx context.Context, request ml.ListTransitionRequestsRequest)) *MockModelRegistryInterface_ListTransitionRequests_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListTransitionRequestsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_ListTransitionRequests_Call) Return(_a0 listing.Iterator[ml.Activity]) *MockModelRegistryInterface_ListTransitionRequests_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_ListTransitionRequests_Call) RunAndReturn(run func(context.Context, ml.ListTransitionRequestsRequest) listing.Iterator[ml.Activity]) *MockModelRegistryInterface_ListTransitionRequests_Call { - _c.Call.Return(run) - return _c -} - -// ListTransitionRequestsAll provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) ListTransitionRequestsAll(ctx context.Context, request ml.ListTransitionRequestsRequest) ([]ml.Activity, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListTransitionRequestsAll") - } - - var r0 []ml.Activity - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ListTransitionRequestsRequest) ([]ml.Activity, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ListTransitionRequestsRequest) []ml.Activity); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.Activity) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ListTransitionRequestsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_ListTransitionRequestsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListTransitionRequestsAll' -type MockModelRegistryInterface_ListTransitionRequestsAll_Call struct { - *mock.Call -} - -// ListTransitionRequestsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListTransitionRequestsRequest -func (_e *MockModelRegistryInterface_Expecter) ListTransitionRequestsAll(ctx interface{}, request interface{}) *MockModelRegistryInterface_ListTransitionRequestsAll_Call { - return &MockModelRegistryInterface_ListTransitionRequestsAll_Call{Call: _e.mock.On("ListTransitionRequestsAll", ctx, request)} -} - -func (_c *MockModelRegistryInterface_ListTransitionRequestsAll_Call) Run(run func(ctx context.Context, request ml.ListTransitionRequestsRequest)) *MockModelRegistryInterface_ListTransitionRequestsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListTransitionRequestsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_ListTransitionRequestsAll_Call) Return(_a0 []ml.Activity, _a1 error) *MockModelRegistryInterface_ListTransitionRequestsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_ListTransitionRequestsAll_Call) RunAndReturn(run func(context.Context, ml.ListTransitionRequestsRequest) ([]ml.Activity, error)) *MockModelRegistryInterface_ListTransitionRequestsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListWebhooks provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) ListWebhooks(ctx context.Context, request ml.ListWebhooksRequest) listing.Iterator[ml.RegistryWebhook] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListWebhooks") - } - - var r0 listing.Iterator[ml.RegistryWebhook] - if rf, ok := ret.Get(0).(func(context.Context, ml.ListWebhooksRequest) listing.Iterator[ml.RegistryWebhook]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.RegistryWebhook]) - } - } - - return r0 -} - -// MockModelRegistryInterface_ListWebhooks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWebhooks' -type MockModelRegistryInterface_ListWebhooks_Call struct { - *mock.Call -} - -// ListWebhooks is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListWebhooksRequest -func (_e *MockModelRegistryInterface_Expecter) ListWebhooks(ctx interface{}, request interface{}) *MockModelRegistryInterface_ListWebhooks_Call { - return &MockModelRegistryInterface_ListWebhooks_Call{Call: _e.mock.On("ListWebhooks", ctx, request)} -} - -func (_c *MockModelRegistryInterface_ListWebhooks_Call) Run(run func(ctx context.Context, request ml.ListWebhooksRequest)) *MockModelRegistryInterface_ListWebhooks_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListWebhooksRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_ListWebhooks_Call) Return(_a0 listing.Iterator[ml.RegistryWebhook]) *MockModelRegistryInterface_ListWebhooks_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_ListWebhooks_Call) RunAndReturn(run func(context.Context, ml.ListWebhooksRequest) listing.Iterator[ml.RegistryWebhook]) *MockModelRegistryInterface_ListWebhooks_Call { - _c.Call.Return(run) - return _c -} - -// ListWebhooksAll provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) ListWebhooksAll(ctx context.Context, request ml.ListWebhooksRequest) ([]ml.RegistryWebhook, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListWebhooksAll") - } - - var r0 []ml.RegistryWebhook - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.ListWebhooksRequest) ([]ml.RegistryWebhook, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.ListWebhooksRequest) []ml.RegistryWebhook); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.RegistryWebhook) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.ListWebhooksRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_ListWebhooksAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListWebhooksAll' -type MockModelRegistryInterface_ListWebhooksAll_Call struct { - *mock.Call -} - -// ListWebhooksAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.ListWebhooksRequest -func (_e *MockModelRegistryInterface_Expecter) ListWebhooksAll(ctx interface{}, request interface{}) *MockModelRegistryInterface_ListWebhooksAll_Call { - return &MockModelRegistryInterface_ListWebhooksAll_Call{Call: _e.mock.On("ListWebhooksAll", ctx, request)} -} - -func (_c *MockModelRegistryInterface_ListWebhooksAll_Call) Run(run func(ctx context.Context, request ml.ListWebhooksRequest)) *MockModelRegistryInterface_ListWebhooksAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.ListWebhooksRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_ListWebhooksAll_Call) Return(_a0 []ml.RegistryWebhook, _a1 error) *MockModelRegistryInterface_ListWebhooksAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_ListWebhooksAll_Call) RunAndReturn(run func(context.Context, ml.ListWebhooksRequest) ([]ml.RegistryWebhook, error)) *MockModelRegistryInterface_ListWebhooksAll_Call { - _c.Call.Return(run) - return _c -} - -// RejectTransitionRequest provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) RejectTransitionRequest(ctx context.Context, request ml.RejectTransitionRequest) (*ml.RejectTransitionRequestResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RejectTransitionRequest") - } - - var r0 *ml.RejectTransitionRequestResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.RejectTransitionRequest) (*ml.RejectTransitionRequestResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.RejectTransitionRequest) *ml.RejectTransitionRequestResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.RejectTransitionRequestResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.RejectTransitionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_RejectTransitionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RejectTransitionRequest' -type MockModelRegistryInterface_RejectTransitionRequest_Call struct { - *mock.Call -} - -// RejectTransitionRequest is a helper method to define mock.On call -// - ctx context.Context -// - request ml.RejectTransitionRequest -func (_e *MockModelRegistryInterface_Expecter) RejectTransitionRequest(ctx interface{}, request interface{}) *MockModelRegistryInterface_RejectTransitionRequest_Call { - return &MockModelRegistryInterface_RejectTransitionRequest_Call{Call: _e.mock.On("RejectTransitionRequest", ctx, request)} -} - -func (_c *MockModelRegistryInterface_RejectTransitionRequest_Call) Run(run func(ctx context.Context, request ml.RejectTransitionRequest)) *MockModelRegistryInterface_RejectTransitionRequest_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.RejectTransitionRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_RejectTransitionRequest_Call) Return(_a0 *ml.RejectTransitionRequestResponse, _a1 error) *MockModelRegistryInterface_RejectTransitionRequest_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_RejectTransitionRequest_Call) RunAndReturn(run func(context.Context, ml.RejectTransitionRequest) (*ml.RejectTransitionRequestResponse, error)) *MockModelRegistryInterface_RejectTransitionRequest_Call { - _c.Call.Return(run) - return _c -} - -// RenameModel provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) RenameModel(ctx context.Context, request ml.RenameModelRequest) (*ml.RenameModelResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RenameModel") - } - - var r0 *ml.RenameModelResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.RenameModelRequest) (*ml.RenameModelResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.RenameModelRequest) *ml.RenameModelResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.RenameModelResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.RenameModelRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_RenameModel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RenameModel' -type MockModelRegistryInterface_RenameModel_Call struct { - *mock.Call -} - -// RenameModel is a helper method to define mock.On call -// - ctx context.Context -// - request ml.RenameModelRequest -func (_e *MockModelRegistryInterface_Expecter) RenameModel(ctx interface{}, request interface{}) *MockModelRegistryInterface_RenameModel_Call { - return &MockModelRegistryInterface_RenameModel_Call{Call: _e.mock.On("RenameModel", ctx, request)} -} - -func (_c *MockModelRegistryInterface_RenameModel_Call) Run(run func(ctx context.Context, request ml.RenameModelRequest)) *MockModelRegistryInterface_RenameModel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.RenameModelRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_RenameModel_Call) Return(_a0 *ml.RenameModelResponse, _a1 error) *MockModelRegistryInterface_RenameModel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_RenameModel_Call) RunAndReturn(run func(context.Context, ml.RenameModelRequest) (*ml.RenameModelResponse, error)) *MockModelRegistryInterface_RenameModel_Call { - _c.Call.Return(run) - return _c -} - -// SearchModelVersions provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) SearchModelVersions(ctx context.Context, request ml.SearchModelVersionsRequest) listing.Iterator[ml.ModelVersion] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchModelVersions") - } - - var r0 listing.Iterator[ml.ModelVersion] - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchModelVersionsRequest) listing.Iterator[ml.ModelVersion]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.ModelVersion]) - } - } - - return r0 -} - -// MockModelRegistryInterface_SearchModelVersions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchModelVersions' -type MockModelRegistryInterface_SearchModelVersions_Call struct { - *mock.Call -} - -// SearchModelVersions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchModelVersionsRequest -func (_e *MockModelRegistryInterface_Expecter) SearchModelVersions(ctx interface{}, request interface{}) *MockModelRegistryInterface_SearchModelVersions_Call { - return &MockModelRegistryInterface_SearchModelVersions_Call{Call: _e.mock.On("SearchModelVersions", ctx, request)} -} - -func (_c *MockModelRegistryInterface_SearchModelVersions_Call) Run(run func(ctx context.Context, request ml.SearchModelVersionsRequest)) *MockModelRegistryInterface_SearchModelVersions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchModelVersionsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModelVersions_Call) Return(_a0 listing.Iterator[ml.ModelVersion]) *MockModelRegistryInterface_SearchModelVersions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModelVersions_Call) RunAndReturn(run func(context.Context, ml.SearchModelVersionsRequest) listing.Iterator[ml.ModelVersion]) *MockModelRegistryInterface_SearchModelVersions_Call { - _c.Call.Return(run) - return _c -} - -// SearchModelVersionsAll provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) SearchModelVersionsAll(ctx context.Context, request ml.SearchModelVersionsRequest) ([]ml.ModelVersion, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchModelVersionsAll") - } - - var r0 []ml.ModelVersion - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchModelVersionsRequest) ([]ml.ModelVersion, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchModelVersionsRequest) []ml.ModelVersion); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.ModelVersion) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.SearchModelVersionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_SearchModelVersionsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchModelVersionsAll' -type MockModelRegistryInterface_SearchModelVersionsAll_Call struct { - *mock.Call -} - -// SearchModelVersionsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchModelVersionsRequest -func (_e *MockModelRegistryInterface_Expecter) SearchModelVersionsAll(ctx interface{}, request interface{}) *MockModelRegistryInterface_SearchModelVersionsAll_Call { - return &MockModelRegistryInterface_SearchModelVersionsAll_Call{Call: _e.mock.On("SearchModelVersionsAll", ctx, request)} -} - -func (_c *MockModelRegistryInterface_SearchModelVersionsAll_Call) Run(run func(ctx context.Context, request ml.SearchModelVersionsRequest)) *MockModelRegistryInterface_SearchModelVersionsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchModelVersionsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModelVersionsAll_Call) Return(_a0 []ml.ModelVersion, _a1 error) *MockModelRegistryInterface_SearchModelVersionsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModelVersionsAll_Call) RunAndReturn(run func(context.Context, ml.SearchModelVersionsRequest) ([]ml.ModelVersion, error)) *MockModelRegistryInterface_SearchModelVersionsAll_Call { - _c.Call.Return(run) - return _c -} - -// SearchModels provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) SearchModels(ctx context.Context, request ml.SearchModelsRequest) listing.Iterator[ml.Model] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchModels") - } - - var r0 listing.Iterator[ml.Model] - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchModelsRequest) listing.Iterator[ml.Model]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[ml.Model]) - } - } - - return r0 -} - -// MockModelRegistryInterface_SearchModels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchModels' -type MockModelRegistryInterface_SearchModels_Call struct { - *mock.Call -} - -// SearchModels is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchModelsRequest -func (_e *MockModelRegistryInterface_Expecter) SearchModels(ctx interface{}, request interface{}) *MockModelRegistryInterface_SearchModels_Call { - return &MockModelRegistryInterface_SearchModels_Call{Call: _e.mock.On("SearchModels", ctx, request)} -} - -func (_c *MockModelRegistryInterface_SearchModels_Call) Run(run func(ctx context.Context, request ml.SearchModelsRequest)) *MockModelRegistryInterface_SearchModels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchModelsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModels_Call) Return(_a0 listing.Iterator[ml.Model]) *MockModelRegistryInterface_SearchModels_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModels_Call) RunAndReturn(run func(context.Context, ml.SearchModelsRequest) listing.Iterator[ml.Model]) *MockModelRegistryInterface_SearchModels_Call { - _c.Call.Return(run) - return _c -} - -// SearchModelsAll provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) SearchModelsAll(ctx context.Context, request ml.SearchModelsRequest) ([]ml.Model, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SearchModelsAll") - } - - var r0 []ml.Model - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchModelsRequest) ([]ml.Model, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.SearchModelsRequest) []ml.Model); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]ml.Model) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.SearchModelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_SearchModelsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SearchModelsAll' -type MockModelRegistryInterface_SearchModelsAll_Call struct { - *mock.Call -} - -// SearchModelsAll is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SearchModelsRequest -func (_e *MockModelRegistryInterface_Expecter) SearchModelsAll(ctx interface{}, request interface{}) *MockModelRegistryInterface_SearchModelsAll_Call { - return &MockModelRegistryInterface_SearchModelsAll_Call{Call: _e.mock.On("SearchModelsAll", ctx, request)} -} - -func (_c *MockModelRegistryInterface_SearchModelsAll_Call) Run(run func(ctx context.Context, request ml.SearchModelsRequest)) *MockModelRegistryInterface_SearchModelsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SearchModelsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModelsAll_Call) Return(_a0 []ml.Model, _a1 error) *MockModelRegistryInterface_SearchModelsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_SearchModelsAll_Call) RunAndReturn(run func(context.Context, ml.SearchModelsRequest) ([]ml.Model, error)) *MockModelRegistryInterface_SearchModelsAll_Call { - _c.Call.Return(run) - return _c -} - -// SetModelTag provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) SetModelTag(ctx context.Context, request ml.SetModelTagRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetModelTag") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SetModelTagRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_SetModelTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetModelTag' -type MockModelRegistryInterface_SetModelTag_Call struct { - *mock.Call -} - -// SetModelTag is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SetModelTagRequest -func (_e *MockModelRegistryInterface_Expecter) SetModelTag(ctx interface{}, request interface{}) *MockModelRegistryInterface_SetModelTag_Call { - return &MockModelRegistryInterface_SetModelTag_Call{Call: _e.mock.On("SetModelTag", ctx, request)} -} - -func (_c *MockModelRegistryInterface_SetModelTag_Call) Run(run func(ctx context.Context, request ml.SetModelTagRequest)) *MockModelRegistryInterface_SetModelTag_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SetModelTagRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_SetModelTag_Call) Return(_a0 error) *MockModelRegistryInterface_SetModelTag_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_SetModelTag_Call) RunAndReturn(run func(context.Context, ml.SetModelTagRequest) error) *MockModelRegistryInterface_SetModelTag_Call { - _c.Call.Return(run) - return _c -} - -// SetModelVersionTag provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) SetModelVersionTag(ctx context.Context, request ml.SetModelVersionTagRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetModelVersionTag") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.SetModelVersionTagRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_SetModelVersionTag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetModelVersionTag' -type MockModelRegistryInterface_SetModelVersionTag_Call struct { - *mock.Call -} - -// SetModelVersionTag is a helper method to define mock.On call -// - ctx context.Context -// - request ml.SetModelVersionTagRequest -func (_e *MockModelRegistryInterface_Expecter) SetModelVersionTag(ctx interface{}, request interface{}) *MockModelRegistryInterface_SetModelVersionTag_Call { - return &MockModelRegistryInterface_SetModelVersionTag_Call{Call: _e.mock.On("SetModelVersionTag", ctx, request)} -} - -func (_c *MockModelRegistryInterface_SetModelVersionTag_Call) Run(run func(ctx context.Context, request ml.SetModelVersionTagRequest)) *MockModelRegistryInterface_SetModelVersionTag_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.SetModelVersionTagRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_SetModelVersionTag_Call) Return(_a0 error) *MockModelRegistryInterface_SetModelVersionTag_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_SetModelVersionTag_Call) RunAndReturn(run func(context.Context, ml.SetModelVersionTagRequest) error) *MockModelRegistryInterface_SetModelVersionTag_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) SetPermissions(ctx context.Context, request ml.RegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *ml.RegisteredModelPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.RegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.RegisteredModelPermissionsRequest) *ml.RegisteredModelPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.RegisteredModelPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.RegisteredModelPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockModelRegistryInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.RegisteredModelPermissionsRequest -func (_e *MockModelRegistryInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockModelRegistryInterface_SetPermissions_Call { - return &MockModelRegistryInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockModelRegistryInterface_SetPermissions_Call) Run(run func(ctx context.Context, request ml.RegisteredModelPermissionsRequest)) *MockModelRegistryInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.RegisteredModelPermissionsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_SetPermissions_Call) Return(_a0 *ml.RegisteredModelPermissions, _a1 error) *MockModelRegistryInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, ml.RegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error)) *MockModelRegistryInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// TestRegistryWebhook provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) TestRegistryWebhook(ctx context.Context, request ml.TestRegistryWebhookRequest) (*ml.TestRegistryWebhookResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for TestRegistryWebhook") - } - - var r0 *ml.TestRegistryWebhookResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.TestRegistryWebhookRequest) (*ml.TestRegistryWebhookResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.TestRegistryWebhookRequest) *ml.TestRegistryWebhookResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.TestRegistryWebhookResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.TestRegistryWebhookRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_TestRegistryWebhook_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestRegistryWebhook' -type MockModelRegistryInterface_TestRegistryWebhook_Call struct { - *mock.Call -} - -// TestRegistryWebhook is a helper method to define mock.On call -// - ctx context.Context -// - request ml.TestRegistryWebhookRequest -func (_e *MockModelRegistryInterface_Expecter) TestRegistryWebhook(ctx interface{}, request interface{}) *MockModelRegistryInterface_TestRegistryWebhook_Call { - return &MockModelRegistryInterface_TestRegistryWebhook_Call{Call: _e.mock.On("TestRegistryWebhook", ctx, request)} -} - -func (_c *MockModelRegistryInterface_TestRegistryWebhook_Call) Run(run func(ctx context.Context, request ml.TestRegistryWebhookRequest)) *MockModelRegistryInterface_TestRegistryWebhook_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.TestRegistryWebhookRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_TestRegistryWebhook_Call) Return(_a0 *ml.TestRegistryWebhookResponse, _a1 error) *MockModelRegistryInterface_TestRegistryWebhook_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_TestRegistryWebhook_Call) RunAndReturn(run func(context.Context, ml.TestRegistryWebhookRequest) (*ml.TestRegistryWebhookResponse, error)) *MockModelRegistryInterface_TestRegistryWebhook_Call { - _c.Call.Return(run) - return _c -} - -// TransitionStage provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) TransitionStage(ctx context.Context, request ml.TransitionModelVersionStageDatabricks) (*ml.TransitionStageResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for TransitionStage") - } - - var r0 *ml.TransitionStageResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.TransitionModelVersionStageDatabricks) (*ml.TransitionStageResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.TransitionModelVersionStageDatabricks) *ml.TransitionStageResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.TransitionStageResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.TransitionModelVersionStageDatabricks) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_TransitionStage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransitionStage' -type MockModelRegistryInterface_TransitionStage_Call struct { - *mock.Call -} - -// TransitionStage is a helper method to define mock.On call -// - ctx context.Context -// - request ml.TransitionModelVersionStageDatabricks -func (_e *MockModelRegistryInterface_Expecter) TransitionStage(ctx interface{}, request interface{}) *MockModelRegistryInterface_TransitionStage_Call { - return &MockModelRegistryInterface_TransitionStage_Call{Call: _e.mock.On("TransitionStage", ctx, request)} -} - -func (_c *MockModelRegistryInterface_TransitionStage_Call) Run(run func(ctx context.Context, request ml.TransitionModelVersionStageDatabricks)) *MockModelRegistryInterface_TransitionStage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.TransitionModelVersionStageDatabricks)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_TransitionStage_Call) Return(_a0 *ml.TransitionStageResponse, _a1 error) *MockModelRegistryInterface_TransitionStage_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_TransitionStage_Call) RunAndReturn(run func(context.Context, ml.TransitionModelVersionStageDatabricks) (*ml.TransitionStageResponse, error)) *MockModelRegistryInterface_TransitionStage_Call { - _c.Call.Return(run) - return _c -} - -// UpdateComment provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) UpdateComment(ctx context.Context, request ml.UpdateComment) (*ml.UpdateCommentResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateComment") - } - - var r0 *ml.UpdateCommentResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateComment) (*ml.UpdateCommentResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateComment) *ml.UpdateCommentResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.UpdateCommentResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.UpdateComment) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_UpdateComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateComment' -type MockModelRegistryInterface_UpdateComment_Call struct { - *mock.Call -} - -// UpdateComment is a helper method to define mock.On call -// - ctx context.Context -// - request ml.UpdateComment -func (_e *MockModelRegistryInterface_Expecter) UpdateComment(ctx interface{}, request interface{}) *MockModelRegistryInterface_UpdateComment_Call { - return &MockModelRegistryInterface_UpdateComment_Call{Call: _e.mock.On("UpdateComment", ctx, request)} -} - -func (_c *MockModelRegistryInterface_UpdateComment_Call) Run(run func(ctx context.Context, request ml.UpdateComment)) *MockModelRegistryInterface_UpdateComment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.UpdateComment)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateComment_Call) Return(_a0 *ml.UpdateCommentResponse, _a1 error) *MockModelRegistryInterface_UpdateComment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateComment_Call) RunAndReturn(run func(context.Context, ml.UpdateComment) (*ml.UpdateCommentResponse, error)) *MockModelRegistryInterface_UpdateComment_Call { - _c.Call.Return(run) - return _c -} - -// UpdateModel provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) UpdateModel(ctx context.Context, request ml.UpdateModelRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateModel") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateModelRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_UpdateModel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateModel' -type MockModelRegistryInterface_UpdateModel_Call struct { - *mock.Call -} - -// UpdateModel is a helper method to define mock.On call -// - ctx context.Context -// - request ml.UpdateModelRequest -func (_e *MockModelRegistryInterface_Expecter) UpdateModel(ctx interface{}, request interface{}) *MockModelRegistryInterface_UpdateModel_Call { - return &MockModelRegistryInterface_UpdateModel_Call{Call: _e.mock.On("UpdateModel", ctx, request)} -} - -func (_c *MockModelRegistryInterface_UpdateModel_Call) Run(run func(ctx context.Context, request ml.UpdateModelRequest)) *MockModelRegistryInterface_UpdateModel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.UpdateModelRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateModel_Call) Return(_a0 error) *MockModelRegistryInterface_UpdateModel_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateModel_Call) RunAndReturn(run func(context.Context, ml.UpdateModelRequest) error) *MockModelRegistryInterface_UpdateModel_Call { - _c.Call.Return(run) - return _c -} - -// UpdateModelVersion provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) UpdateModelVersion(ctx context.Context, request ml.UpdateModelVersionRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateModelVersion") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateModelVersionRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_UpdateModelVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateModelVersion' -type MockModelRegistryInterface_UpdateModelVersion_Call struct { - *mock.Call -} - -// UpdateModelVersion is a helper method to define mock.On call -// - ctx context.Context -// - request ml.UpdateModelVersionRequest -func (_e *MockModelRegistryInterface_Expecter) UpdateModelVersion(ctx interface{}, request interface{}) *MockModelRegistryInterface_UpdateModelVersion_Call { - return &MockModelRegistryInterface_UpdateModelVersion_Call{Call: _e.mock.On("UpdateModelVersion", ctx, request)} -} - -func (_c *MockModelRegistryInterface_UpdateModelVersion_Call) Run(run func(ctx context.Context, request ml.UpdateModelVersionRequest)) *MockModelRegistryInterface_UpdateModelVersion_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.UpdateModelVersionRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateModelVersion_Call) Return(_a0 error) *MockModelRegistryInterface_UpdateModelVersion_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateModelVersion_Call) RunAndReturn(run func(context.Context, ml.UpdateModelVersionRequest) error) *MockModelRegistryInterface_UpdateModelVersion_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) UpdatePermissions(ctx context.Context, request ml.RegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *ml.RegisteredModelPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ml.RegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, ml.RegisteredModelPermissionsRequest) *ml.RegisteredModelPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*ml.RegisteredModelPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ml.RegisteredModelPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockModelRegistryInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockModelRegistryInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request ml.RegisteredModelPermissionsRequest -func (_e *MockModelRegistryInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockModelRegistryInterface_UpdatePermissions_Call { - return &MockModelRegistryInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockModelRegistryInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request ml.RegisteredModelPermissionsRequest)) *MockModelRegistryInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.RegisteredModelPermissionsRequest)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_UpdatePermissions_Call) Return(_a0 *ml.RegisteredModelPermissions, _a1 error) *MockModelRegistryInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockModelRegistryInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, ml.RegisteredModelPermissionsRequest) (*ml.RegisteredModelPermissions, error)) *MockModelRegistryInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// UpdateWebhook provides a mock function with given fields: ctx, request -func (_m *MockModelRegistryInterface) UpdateWebhook(ctx context.Context, request ml.UpdateRegistryWebhook) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdateWebhook") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, ml.UpdateRegistryWebhook) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockModelRegistryInterface_UpdateWebhook_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateWebhook' -type MockModelRegistryInterface_UpdateWebhook_Call struct { - *mock.Call -} - -// UpdateWebhook is a helper method to define mock.On call -// - ctx context.Context -// - request ml.UpdateRegistryWebhook -func (_e *MockModelRegistryInterface_Expecter) UpdateWebhook(ctx interface{}, request interface{}) *MockModelRegistryInterface_UpdateWebhook_Call { - return &MockModelRegistryInterface_UpdateWebhook_Call{Call: _e.mock.On("UpdateWebhook", ctx, request)} -} - -func (_c *MockModelRegistryInterface_UpdateWebhook_Call) Run(run func(ctx context.Context, request ml.UpdateRegistryWebhook)) *MockModelRegistryInterface_UpdateWebhook_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(ml.UpdateRegistryWebhook)) - }) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateWebhook_Call) Return(_a0 error) *MockModelRegistryInterface_UpdateWebhook_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockModelRegistryInterface_UpdateWebhook_Call) RunAndReturn(run func(context.Context, ml.UpdateRegistryWebhook) error) *MockModelRegistryInterface_UpdateWebhook_Call { - _c.Call.Return(run) - return _c -} - -// NewMockModelRegistryInterface creates a new instance of MockModelRegistryInterface. 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 NewMockModelRegistryInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockModelRegistryInterface { - mock := &MockModelRegistryInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/oauth2/mock_account_federation_policy_interface.go b/experimental/mocks/service/oauth2/mock_account_federation_policy_interface.go deleted file mode 100644 index 13fe9d482..000000000 --- a/experimental/mocks/service/oauth2/mock_account_federation_policy_interface.go +++ /dev/null @@ -1,477 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package oauth2 - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - oauth2 "github.com/databricks/databricks-sdk-go/service/oauth2" -) - -// MockAccountFederationPolicyInterface is an autogenerated mock type for the AccountFederationPolicyInterface type -type MockAccountFederationPolicyInterface struct { - mock.Mock -} - -type MockAccountFederationPolicyInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountFederationPolicyInterface) EXPECT() *MockAccountFederationPolicyInterface_Expecter { - return &MockAccountFederationPolicyInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountFederationPolicyInterface) Create(ctx context.Context, request oauth2.CreateAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateAccountFederationPolicyRequest) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.CreateAccountFederationPolicyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountFederationPolicyInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountFederationPolicyInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.CreateAccountFederationPolicyRequest -func (_e *MockAccountFederationPolicyInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountFederationPolicyInterface_Create_Call { - return &MockAccountFederationPolicyInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountFederationPolicyInterface_Create_Call) Run(run func(ctx context.Context, request oauth2.CreateAccountFederationPolicyRequest)) *MockAccountFederationPolicyInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.CreateAccountFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Create_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockAccountFederationPolicyInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Create_Call) RunAndReturn(run func(context.Context, oauth2.CreateAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error)) *MockAccountFederationPolicyInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountFederationPolicyInterface) Delete(ctx context.Context, request oauth2.DeleteAccountFederationPolicyRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.DeleteAccountFederationPolicyRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountFederationPolicyInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountFederationPolicyInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.DeleteAccountFederationPolicyRequest -func (_e *MockAccountFederationPolicyInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountFederationPolicyInterface_Delete_Call { - return &MockAccountFederationPolicyInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountFederationPolicyInterface_Delete_Call) Run(run func(ctx context.Context, request oauth2.DeleteAccountFederationPolicyRequest)) *MockAccountFederationPolicyInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.DeleteAccountFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Delete_Call) Return(_a0 error) *MockAccountFederationPolicyInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Delete_Call) RunAndReturn(run func(context.Context, oauth2.DeleteAccountFederationPolicyRequest) error) *MockAccountFederationPolicyInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByPolicyId provides a mock function with given fields: ctx, policyId -func (_m *MockAccountFederationPolicyInterface) DeleteByPolicyId(ctx context.Context, policyId string) error { - ret := _m.Called(ctx, policyId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByPolicyId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, policyId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountFederationPolicyInterface_DeleteByPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByPolicyId' -type MockAccountFederationPolicyInterface_DeleteByPolicyId_Call struct { - *mock.Call -} - -// DeleteByPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - policyId string -func (_e *MockAccountFederationPolicyInterface_Expecter) DeleteByPolicyId(ctx interface{}, policyId interface{}) *MockAccountFederationPolicyInterface_DeleteByPolicyId_Call { - return &MockAccountFederationPolicyInterface_DeleteByPolicyId_Call{Call: _e.mock.On("DeleteByPolicyId", ctx, policyId)} -} - -func (_c *MockAccountFederationPolicyInterface_DeleteByPolicyId_Call) Run(run func(ctx context.Context, policyId string)) *MockAccountFederationPolicyInterface_DeleteByPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_DeleteByPolicyId_Call) Return(_a0 error) *MockAccountFederationPolicyInterface_DeleteByPolicyId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_DeleteByPolicyId_Call) RunAndReturn(run func(context.Context, string) error) *MockAccountFederationPolicyInterface_DeleteByPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountFederationPolicyInterface) Get(ctx context.Context, request oauth2.GetAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetAccountFederationPolicyRequest) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.GetAccountFederationPolicyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountFederationPolicyInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountFederationPolicyInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.GetAccountFederationPolicyRequest -func (_e *MockAccountFederationPolicyInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountFederationPolicyInterface_Get_Call { - return &MockAccountFederationPolicyInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountFederationPolicyInterface_Get_Call) Run(run func(ctx context.Context, request oauth2.GetAccountFederationPolicyRequest)) *MockAccountFederationPolicyInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.GetAccountFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Get_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockAccountFederationPolicyInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Get_Call) RunAndReturn(run func(context.Context, oauth2.GetAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error)) *MockAccountFederationPolicyInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByPolicyId provides a mock function with given fields: ctx, policyId -func (_m *MockAccountFederationPolicyInterface) GetByPolicyId(ctx context.Context, policyId string) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, policyId) - - if len(ret) == 0 { - panic("no return value specified for GetByPolicyId") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, policyId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, policyId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, policyId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountFederationPolicyInterface_GetByPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPolicyId' -type MockAccountFederationPolicyInterface_GetByPolicyId_Call struct { - *mock.Call -} - -// GetByPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - policyId string -func (_e *MockAccountFederationPolicyInterface_Expecter) GetByPolicyId(ctx interface{}, policyId interface{}) *MockAccountFederationPolicyInterface_GetByPolicyId_Call { - return &MockAccountFederationPolicyInterface_GetByPolicyId_Call{Call: _e.mock.On("GetByPolicyId", ctx, policyId)} -} - -func (_c *MockAccountFederationPolicyInterface_GetByPolicyId_Call) Run(run func(ctx context.Context, policyId string)) *MockAccountFederationPolicyInterface_GetByPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_GetByPolicyId_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockAccountFederationPolicyInterface_GetByPolicyId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_GetByPolicyId_Call) RunAndReturn(run func(context.Context, string) (*oauth2.FederationPolicy, error)) *MockAccountFederationPolicyInterface_GetByPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAccountFederationPolicyInterface) List(ctx context.Context, request oauth2.ListAccountFederationPoliciesRequest) listing.Iterator[oauth2.FederationPolicy] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[oauth2.FederationPolicy] - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListAccountFederationPoliciesRequest) listing.Iterator[oauth2.FederationPolicy]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[oauth2.FederationPolicy]) - } - } - - return r0 -} - -// MockAccountFederationPolicyInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountFederationPolicyInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListAccountFederationPoliciesRequest -func (_e *MockAccountFederationPolicyInterface_Expecter) List(ctx interface{}, request interface{}) *MockAccountFederationPolicyInterface_List_Call { - return &MockAccountFederationPolicyInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAccountFederationPolicyInterface_List_Call) Run(run func(ctx context.Context, request oauth2.ListAccountFederationPoliciesRequest)) *MockAccountFederationPolicyInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListAccountFederationPoliciesRequest)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_List_Call) Return(_a0 listing.Iterator[oauth2.FederationPolicy]) *MockAccountFederationPolicyInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_List_Call) RunAndReturn(run func(context.Context, oauth2.ListAccountFederationPoliciesRequest) listing.Iterator[oauth2.FederationPolicy]) *MockAccountFederationPolicyInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAccountFederationPolicyInterface) ListAll(ctx context.Context, request oauth2.ListAccountFederationPoliciesRequest) ([]oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListAccountFederationPoliciesRequest) ([]oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListAccountFederationPoliciesRequest) []oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.ListAccountFederationPoliciesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountFederationPolicyInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountFederationPolicyInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListAccountFederationPoliciesRequest -func (_e *MockAccountFederationPolicyInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAccountFederationPolicyInterface_ListAll_Call { - return &MockAccountFederationPolicyInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAccountFederationPolicyInterface_ListAll_Call) Run(run func(ctx context.Context, request oauth2.ListAccountFederationPoliciesRequest)) *MockAccountFederationPolicyInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListAccountFederationPoliciesRequest)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_ListAll_Call) Return(_a0 []oauth2.FederationPolicy, _a1 error) *MockAccountFederationPolicyInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_ListAll_Call) RunAndReturn(run func(context.Context, oauth2.ListAccountFederationPoliciesRequest) ([]oauth2.FederationPolicy, error)) *MockAccountFederationPolicyInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountFederationPolicyInterface) Update(ctx context.Context, request oauth2.UpdateAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.UpdateAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.UpdateAccountFederationPolicyRequest) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.UpdateAccountFederationPolicyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountFederationPolicyInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountFederationPolicyInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.UpdateAccountFederationPolicyRequest -func (_e *MockAccountFederationPolicyInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountFederationPolicyInterface_Update_Call { - return &MockAccountFederationPolicyInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountFederationPolicyInterface_Update_Call) Run(run func(ctx context.Context, request oauth2.UpdateAccountFederationPolicyRequest)) *MockAccountFederationPolicyInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.UpdateAccountFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Update_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockAccountFederationPolicyInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountFederationPolicyInterface_Update_Call) RunAndReturn(run func(context.Context, oauth2.UpdateAccountFederationPolicyRequest) (*oauth2.FederationPolicy, error)) *MockAccountFederationPolicyInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountFederationPolicyInterface creates a new instance of MockAccountFederationPolicyInterface. 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 NewMockAccountFederationPolicyInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountFederationPolicyInterface { - mock := &MockAccountFederationPolicyInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go b/experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go deleted file mode 100644 index 714d00854..000000000 --- a/experimental/mocks/service/oauth2/mock_custom_app_integration_interface.go +++ /dev/null @@ -1,465 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package oauth2 - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - oauth2 "github.com/databricks/databricks-sdk-go/service/oauth2" -) - -// MockCustomAppIntegrationInterface is an autogenerated mock type for the CustomAppIntegrationInterface type -type MockCustomAppIntegrationInterface struct { - mock.Mock -} - -type MockCustomAppIntegrationInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCustomAppIntegrationInterface) EXPECT() *MockCustomAppIntegrationInterface_Expecter { - return &MockCustomAppIntegrationInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockCustomAppIntegrationInterface) Create(ctx context.Context, request oauth2.CreateCustomAppIntegration) (*oauth2.CreateCustomAppIntegrationOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *oauth2.CreateCustomAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateCustomAppIntegration) (*oauth2.CreateCustomAppIntegrationOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateCustomAppIntegration) *oauth2.CreateCustomAppIntegrationOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.CreateCustomAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.CreateCustomAppIntegration) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCustomAppIntegrationInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockCustomAppIntegrationInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.CreateCustomAppIntegration -func (_e *MockCustomAppIntegrationInterface_Expecter) Create(ctx interface{}, request interface{}) *MockCustomAppIntegrationInterface_Create_Call { - return &MockCustomAppIntegrationInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockCustomAppIntegrationInterface_Create_Call) Run(run func(ctx context.Context, request oauth2.CreateCustomAppIntegration)) *MockCustomAppIntegrationInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.CreateCustomAppIntegration)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Create_Call) Return(_a0 *oauth2.CreateCustomAppIntegrationOutput, _a1 error) *MockCustomAppIntegrationInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Create_Call) RunAndReturn(run func(context.Context, oauth2.CreateCustomAppIntegration) (*oauth2.CreateCustomAppIntegrationOutput, error)) *MockCustomAppIntegrationInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockCustomAppIntegrationInterface) Delete(ctx context.Context, request oauth2.DeleteCustomAppIntegrationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.DeleteCustomAppIntegrationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCustomAppIntegrationInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockCustomAppIntegrationInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.DeleteCustomAppIntegrationRequest -func (_e *MockCustomAppIntegrationInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockCustomAppIntegrationInterface_Delete_Call { - return &MockCustomAppIntegrationInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockCustomAppIntegrationInterface_Delete_Call) Run(run func(ctx context.Context, request oauth2.DeleteCustomAppIntegrationRequest)) *MockCustomAppIntegrationInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.DeleteCustomAppIntegrationRequest)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Delete_Call) Return(_a0 error) *MockCustomAppIntegrationInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Delete_Call) RunAndReturn(run func(context.Context, oauth2.DeleteCustomAppIntegrationRequest) error) *MockCustomAppIntegrationInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByIntegrationId provides a mock function with given fields: ctx, integrationId -func (_m *MockCustomAppIntegrationInterface) DeleteByIntegrationId(ctx context.Context, integrationId string) error { - ret := _m.Called(ctx, integrationId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByIntegrationId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, integrationId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByIntegrationId' -type MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call struct { - *mock.Call -} - -// DeleteByIntegrationId is a helper method to define mock.On call -// - ctx context.Context -// - integrationId string -func (_e *MockCustomAppIntegrationInterface_Expecter) DeleteByIntegrationId(ctx interface{}, integrationId interface{}) *MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call { - return &MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call{Call: _e.mock.On("DeleteByIntegrationId", ctx, integrationId)} -} - -func (_c *MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call) Run(run func(ctx context.Context, integrationId string)) *MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call) Return(_a0 error) *MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call) RunAndReturn(run func(context.Context, string) error) *MockCustomAppIntegrationInterface_DeleteByIntegrationId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockCustomAppIntegrationInterface) Get(ctx context.Context, request oauth2.GetCustomAppIntegrationRequest) (*oauth2.GetCustomAppIntegrationOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *oauth2.GetCustomAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetCustomAppIntegrationRequest) (*oauth2.GetCustomAppIntegrationOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetCustomAppIntegrationRequest) *oauth2.GetCustomAppIntegrationOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.GetCustomAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.GetCustomAppIntegrationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCustomAppIntegrationInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockCustomAppIntegrationInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.GetCustomAppIntegrationRequest -func (_e *MockCustomAppIntegrationInterface_Expecter) Get(ctx interface{}, request interface{}) *MockCustomAppIntegrationInterface_Get_Call { - return &MockCustomAppIntegrationInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockCustomAppIntegrationInterface_Get_Call) Run(run func(ctx context.Context, request oauth2.GetCustomAppIntegrationRequest)) *MockCustomAppIntegrationInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.GetCustomAppIntegrationRequest)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Get_Call) Return(_a0 *oauth2.GetCustomAppIntegrationOutput, _a1 error) *MockCustomAppIntegrationInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Get_Call) RunAndReturn(run func(context.Context, oauth2.GetCustomAppIntegrationRequest) (*oauth2.GetCustomAppIntegrationOutput, error)) *MockCustomAppIntegrationInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByIntegrationId provides a mock function with given fields: ctx, integrationId -func (_m *MockCustomAppIntegrationInterface) GetByIntegrationId(ctx context.Context, integrationId string) (*oauth2.GetCustomAppIntegrationOutput, error) { - ret := _m.Called(ctx, integrationId) - - if len(ret) == 0 { - panic("no return value specified for GetByIntegrationId") - } - - var r0 *oauth2.GetCustomAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*oauth2.GetCustomAppIntegrationOutput, error)); ok { - return rf(ctx, integrationId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *oauth2.GetCustomAppIntegrationOutput); ok { - r0 = rf(ctx, integrationId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.GetCustomAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, integrationId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCustomAppIntegrationInterface_GetByIntegrationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByIntegrationId' -type MockCustomAppIntegrationInterface_GetByIntegrationId_Call struct { - *mock.Call -} - -// GetByIntegrationId is a helper method to define mock.On call -// - ctx context.Context -// - integrationId string -func (_e *MockCustomAppIntegrationInterface_Expecter) GetByIntegrationId(ctx interface{}, integrationId interface{}) *MockCustomAppIntegrationInterface_GetByIntegrationId_Call { - return &MockCustomAppIntegrationInterface_GetByIntegrationId_Call{Call: _e.mock.On("GetByIntegrationId", ctx, integrationId)} -} - -func (_c *MockCustomAppIntegrationInterface_GetByIntegrationId_Call) Run(run func(ctx context.Context, integrationId string)) *MockCustomAppIntegrationInterface_GetByIntegrationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_GetByIntegrationId_Call) Return(_a0 *oauth2.GetCustomAppIntegrationOutput, _a1 error) *MockCustomAppIntegrationInterface_GetByIntegrationId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_GetByIntegrationId_Call) RunAndReturn(run func(context.Context, string) (*oauth2.GetCustomAppIntegrationOutput, error)) *MockCustomAppIntegrationInterface_GetByIntegrationId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockCustomAppIntegrationInterface) List(ctx context.Context, request oauth2.ListCustomAppIntegrationsRequest) listing.Iterator[oauth2.GetCustomAppIntegrationOutput] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[oauth2.GetCustomAppIntegrationOutput] - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListCustomAppIntegrationsRequest) listing.Iterator[oauth2.GetCustomAppIntegrationOutput]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[oauth2.GetCustomAppIntegrationOutput]) - } - } - - return r0 -} - -// MockCustomAppIntegrationInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockCustomAppIntegrationInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListCustomAppIntegrationsRequest -func (_e *MockCustomAppIntegrationInterface_Expecter) List(ctx interface{}, request interface{}) *MockCustomAppIntegrationInterface_List_Call { - return &MockCustomAppIntegrationInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockCustomAppIntegrationInterface_List_Call) Run(run func(ctx context.Context, request oauth2.ListCustomAppIntegrationsRequest)) *MockCustomAppIntegrationInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListCustomAppIntegrationsRequest)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_List_Call) Return(_a0 listing.Iterator[oauth2.GetCustomAppIntegrationOutput]) *MockCustomAppIntegrationInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_List_Call) RunAndReturn(run func(context.Context, oauth2.ListCustomAppIntegrationsRequest) listing.Iterator[oauth2.GetCustomAppIntegrationOutput]) *MockCustomAppIntegrationInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockCustomAppIntegrationInterface) ListAll(ctx context.Context, request oauth2.ListCustomAppIntegrationsRequest) ([]oauth2.GetCustomAppIntegrationOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []oauth2.GetCustomAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListCustomAppIntegrationsRequest) ([]oauth2.GetCustomAppIntegrationOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListCustomAppIntegrationsRequest) []oauth2.GetCustomAppIntegrationOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]oauth2.GetCustomAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.ListCustomAppIntegrationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCustomAppIntegrationInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockCustomAppIntegrationInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListCustomAppIntegrationsRequest -func (_e *MockCustomAppIntegrationInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockCustomAppIntegrationInterface_ListAll_Call { - return &MockCustomAppIntegrationInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockCustomAppIntegrationInterface_ListAll_Call) Run(run func(ctx context.Context, request oauth2.ListCustomAppIntegrationsRequest)) *MockCustomAppIntegrationInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListCustomAppIntegrationsRequest)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_ListAll_Call) Return(_a0 []oauth2.GetCustomAppIntegrationOutput, _a1 error) *MockCustomAppIntegrationInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_ListAll_Call) RunAndReturn(run func(context.Context, oauth2.ListCustomAppIntegrationsRequest) ([]oauth2.GetCustomAppIntegrationOutput, error)) *MockCustomAppIntegrationInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockCustomAppIntegrationInterface) Update(ctx context.Context, request oauth2.UpdateCustomAppIntegration) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.UpdateCustomAppIntegration) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCustomAppIntegrationInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockCustomAppIntegrationInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.UpdateCustomAppIntegration -func (_e *MockCustomAppIntegrationInterface_Expecter) Update(ctx interface{}, request interface{}) *MockCustomAppIntegrationInterface_Update_Call { - return &MockCustomAppIntegrationInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockCustomAppIntegrationInterface_Update_Call) Run(run func(ctx context.Context, request oauth2.UpdateCustomAppIntegration)) *MockCustomAppIntegrationInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.UpdateCustomAppIntegration)) - }) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Update_Call) Return(_a0 error) *MockCustomAppIntegrationInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCustomAppIntegrationInterface_Update_Call) RunAndReturn(run func(context.Context, oauth2.UpdateCustomAppIntegration) error) *MockCustomAppIntegrationInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCustomAppIntegrationInterface creates a new instance of MockCustomAppIntegrationInterface. 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 NewMockCustomAppIntegrationInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCustomAppIntegrationInterface { - mock := &MockCustomAppIntegrationInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/oauth2/mock_o_auth_published_apps_interface.go b/experimental/mocks/service/oauth2/mock_o_auth_published_apps_interface.go deleted file mode 100644 index 589dfc670..000000000 --- a/experimental/mocks/service/oauth2/mock_o_auth_published_apps_interface.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package oauth2 - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - oauth2 "github.com/databricks/databricks-sdk-go/service/oauth2" -) - -// MockOAuthPublishedAppsInterface is an autogenerated mock type for the OAuthPublishedAppsInterface type -type MockOAuthPublishedAppsInterface struct { - mock.Mock -} - -type MockOAuthPublishedAppsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockOAuthPublishedAppsInterface) EXPECT() *MockOAuthPublishedAppsInterface_Expecter { - return &MockOAuthPublishedAppsInterface_Expecter{mock: &_m.Mock} -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockOAuthPublishedAppsInterface) List(ctx context.Context, request oauth2.ListOAuthPublishedAppsRequest) listing.Iterator[oauth2.PublishedAppOutput] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[oauth2.PublishedAppOutput] - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListOAuthPublishedAppsRequest) listing.Iterator[oauth2.PublishedAppOutput]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[oauth2.PublishedAppOutput]) - } - } - - return r0 -} - -// MockOAuthPublishedAppsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockOAuthPublishedAppsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListOAuthPublishedAppsRequest -func (_e *MockOAuthPublishedAppsInterface_Expecter) List(ctx interface{}, request interface{}) *MockOAuthPublishedAppsInterface_List_Call { - return &MockOAuthPublishedAppsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockOAuthPublishedAppsInterface_List_Call) Run(run func(ctx context.Context, request oauth2.ListOAuthPublishedAppsRequest)) *MockOAuthPublishedAppsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListOAuthPublishedAppsRequest)) - }) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_List_Call) Return(_a0 listing.Iterator[oauth2.PublishedAppOutput]) *MockOAuthPublishedAppsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_List_Call) RunAndReturn(run func(context.Context, oauth2.ListOAuthPublishedAppsRequest) listing.Iterator[oauth2.PublishedAppOutput]) *MockOAuthPublishedAppsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockOAuthPublishedAppsInterface) ListAll(ctx context.Context, request oauth2.ListOAuthPublishedAppsRequest) ([]oauth2.PublishedAppOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []oauth2.PublishedAppOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListOAuthPublishedAppsRequest) ([]oauth2.PublishedAppOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListOAuthPublishedAppsRequest) []oauth2.PublishedAppOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]oauth2.PublishedAppOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.ListOAuthPublishedAppsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockOAuthPublishedAppsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockOAuthPublishedAppsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListOAuthPublishedAppsRequest -func (_e *MockOAuthPublishedAppsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockOAuthPublishedAppsInterface_ListAll_Call { - return &MockOAuthPublishedAppsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockOAuthPublishedAppsInterface_ListAll_Call) Run(run func(ctx context.Context, request oauth2.ListOAuthPublishedAppsRequest)) *MockOAuthPublishedAppsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListOAuthPublishedAppsRequest)) - }) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_ListAll_Call) Return(_a0 []oauth2.PublishedAppOutput, _a1 error) *MockOAuthPublishedAppsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockOAuthPublishedAppsInterface_ListAll_Call) RunAndReturn(run func(context.Context, oauth2.ListOAuthPublishedAppsRequest) ([]oauth2.PublishedAppOutput, error)) *MockOAuthPublishedAppsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// NewMockOAuthPublishedAppsInterface creates a new instance of MockOAuthPublishedAppsInterface. 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 NewMockOAuthPublishedAppsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockOAuthPublishedAppsInterface { - mock := &MockOAuthPublishedAppsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/oauth2/mock_published_app_integration_interface.go b/experimental/mocks/service/oauth2/mock_published_app_integration_interface.go deleted file mode 100644 index b9641341a..000000000 --- a/experimental/mocks/service/oauth2/mock_published_app_integration_interface.go +++ /dev/null @@ -1,465 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package oauth2 - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - oauth2 "github.com/databricks/databricks-sdk-go/service/oauth2" -) - -// MockPublishedAppIntegrationInterface is an autogenerated mock type for the PublishedAppIntegrationInterface type -type MockPublishedAppIntegrationInterface struct { - mock.Mock -} - -type MockPublishedAppIntegrationInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPublishedAppIntegrationInterface) EXPECT() *MockPublishedAppIntegrationInterface_Expecter { - return &MockPublishedAppIntegrationInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockPublishedAppIntegrationInterface) Create(ctx context.Context, request oauth2.CreatePublishedAppIntegration) (*oauth2.CreatePublishedAppIntegrationOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *oauth2.CreatePublishedAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreatePublishedAppIntegration) (*oauth2.CreatePublishedAppIntegrationOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreatePublishedAppIntegration) *oauth2.CreatePublishedAppIntegrationOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.CreatePublishedAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.CreatePublishedAppIntegration) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPublishedAppIntegrationInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockPublishedAppIntegrationInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.CreatePublishedAppIntegration -func (_e *MockPublishedAppIntegrationInterface_Expecter) Create(ctx interface{}, request interface{}) *MockPublishedAppIntegrationInterface_Create_Call { - return &MockPublishedAppIntegrationInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockPublishedAppIntegrationInterface_Create_Call) Run(run func(ctx context.Context, request oauth2.CreatePublishedAppIntegration)) *MockPublishedAppIntegrationInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.CreatePublishedAppIntegration)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Create_Call) Return(_a0 *oauth2.CreatePublishedAppIntegrationOutput, _a1 error) *MockPublishedAppIntegrationInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Create_Call) RunAndReturn(run func(context.Context, oauth2.CreatePublishedAppIntegration) (*oauth2.CreatePublishedAppIntegrationOutput, error)) *MockPublishedAppIntegrationInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockPublishedAppIntegrationInterface) Delete(ctx context.Context, request oauth2.DeletePublishedAppIntegrationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.DeletePublishedAppIntegrationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPublishedAppIntegrationInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockPublishedAppIntegrationInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.DeletePublishedAppIntegrationRequest -func (_e *MockPublishedAppIntegrationInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockPublishedAppIntegrationInterface_Delete_Call { - return &MockPublishedAppIntegrationInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockPublishedAppIntegrationInterface_Delete_Call) Run(run func(ctx context.Context, request oauth2.DeletePublishedAppIntegrationRequest)) *MockPublishedAppIntegrationInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.DeletePublishedAppIntegrationRequest)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Delete_Call) Return(_a0 error) *MockPublishedAppIntegrationInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Delete_Call) RunAndReturn(run func(context.Context, oauth2.DeletePublishedAppIntegrationRequest) error) *MockPublishedAppIntegrationInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByIntegrationId provides a mock function with given fields: ctx, integrationId -func (_m *MockPublishedAppIntegrationInterface) DeleteByIntegrationId(ctx context.Context, integrationId string) error { - ret := _m.Called(ctx, integrationId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByIntegrationId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, integrationId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByIntegrationId' -type MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call struct { - *mock.Call -} - -// DeleteByIntegrationId is a helper method to define mock.On call -// - ctx context.Context -// - integrationId string -func (_e *MockPublishedAppIntegrationInterface_Expecter) DeleteByIntegrationId(ctx interface{}, integrationId interface{}) *MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call { - return &MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call{Call: _e.mock.On("DeleteByIntegrationId", ctx, integrationId)} -} - -func (_c *MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call) Run(run func(ctx context.Context, integrationId string)) *MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call) Return(_a0 error) *MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call) RunAndReturn(run func(context.Context, string) error) *MockPublishedAppIntegrationInterface_DeleteByIntegrationId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockPublishedAppIntegrationInterface) Get(ctx context.Context, request oauth2.GetPublishedAppIntegrationRequest) (*oauth2.GetPublishedAppIntegrationOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *oauth2.GetPublishedAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetPublishedAppIntegrationRequest) (*oauth2.GetPublishedAppIntegrationOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetPublishedAppIntegrationRequest) *oauth2.GetPublishedAppIntegrationOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.GetPublishedAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.GetPublishedAppIntegrationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPublishedAppIntegrationInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPublishedAppIntegrationInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.GetPublishedAppIntegrationRequest -func (_e *MockPublishedAppIntegrationInterface_Expecter) Get(ctx interface{}, request interface{}) *MockPublishedAppIntegrationInterface_Get_Call { - return &MockPublishedAppIntegrationInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockPublishedAppIntegrationInterface_Get_Call) Run(run func(ctx context.Context, request oauth2.GetPublishedAppIntegrationRequest)) *MockPublishedAppIntegrationInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.GetPublishedAppIntegrationRequest)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Get_Call) Return(_a0 *oauth2.GetPublishedAppIntegrationOutput, _a1 error) *MockPublishedAppIntegrationInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Get_Call) RunAndReturn(run func(context.Context, oauth2.GetPublishedAppIntegrationRequest) (*oauth2.GetPublishedAppIntegrationOutput, error)) *MockPublishedAppIntegrationInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByIntegrationId provides a mock function with given fields: ctx, integrationId -func (_m *MockPublishedAppIntegrationInterface) GetByIntegrationId(ctx context.Context, integrationId string) (*oauth2.GetPublishedAppIntegrationOutput, error) { - ret := _m.Called(ctx, integrationId) - - if len(ret) == 0 { - panic("no return value specified for GetByIntegrationId") - } - - var r0 *oauth2.GetPublishedAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*oauth2.GetPublishedAppIntegrationOutput, error)); ok { - return rf(ctx, integrationId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *oauth2.GetPublishedAppIntegrationOutput); ok { - r0 = rf(ctx, integrationId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.GetPublishedAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, integrationId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPublishedAppIntegrationInterface_GetByIntegrationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByIntegrationId' -type MockPublishedAppIntegrationInterface_GetByIntegrationId_Call struct { - *mock.Call -} - -// GetByIntegrationId is a helper method to define mock.On call -// - ctx context.Context -// - integrationId string -func (_e *MockPublishedAppIntegrationInterface_Expecter) GetByIntegrationId(ctx interface{}, integrationId interface{}) *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call { - return &MockPublishedAppIntegrationInterface_GetByIntegrationId_Call{Call: _e.mock.On("GetByIntegrationId", ctx, integrationId)} -} - -func (_c *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call) Run(run func(ctx context.Context, integrationId string)) *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call) Return(_a0 *oauth2.GetPublishedAppIntegrationOutput, _a1 error) *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call) RunAndReturn(run func(context.Context, string) (*oauth2.GetPublishedAppIntegrationOutput, error)) *MockPublishedAppIntegrationInterface_GetByIntegrationId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockPublishedAppIntegrationInterface) List(ctx context.Context, request oauth2.ListPublishedAppIntegrationsRequest) listing.Iterator[oauth2.GetPublishedAppIntegrationOutput] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[oauth2.GetPublishedAppIntegrationOutput] - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListPublishedAppIntegrationsRequest) listing.Iterator[oauth2.GetPublishedAppIntegrationOutput]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[oauth2.GetPublishedAppIntegrationOutput]) - } - } - - return r0 -} - -// MockPublishedAppIntegrationInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockPublishedAppIntegrationInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListPublishedAppIntegrationsRequest -func (_e *MockPublishedAppIntegrationInterface_Expecter) List(ctx interface{}, request interface{}) *MockPublishedAppIntegrationInterface_List_Call { - return &MockPublishedAppIntegrationInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockPublishedAppIntegrationInterface_List_Call) Run(run func(ctx context.Context, request oauth2.ListPublishedAppIntegrationsRequest)) *MockPublishedAppIntegrationInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListPublishedAppIntegrationsRequest)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_List_Call) Return(_a0 listing.Iterator[oauth2.GetPublishedAppIntegrationOutput]) *MockPublishedAppIntegrationInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_List_Call) RunAndReturn(run func(context.Context, oauth2.ListPublishedAppIntegrationsRequest) listing.Iterator[oauth2.GetPublishedAppIntegrationOutput]) *MockPublishedAppIntegrationInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockPublishedAppIntegrationInterface) ListAll(ctx context.Context, request oauth2.ListPublishedAppIntegrationsRequest) ([]oauth2.GetPublishedAppIntegrationOutput, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []oauth2.GetPublishedAppIntegrationOutput - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListPublishedAppIntegrationsRequest) ([]oauth2.GetPublishedAppIntegrationOutput, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListPublishedAppIntegrationsRequest) []oauth2.GetPublishedAppIntegrationOutput); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]oauth2.GetPublishedAppIntegrationOutput) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.ListPublishedAppIntegrationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPublishedAppIntegrationInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockPublishedAppIntegrationInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListPublishedAppIntegrationsRequest -func (_e *MockPublishedAppIntegrationInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockPublishedAppIntegrationInterface_ListAll_Call { - return &MockPublishedAppIntegrationInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockPublishedAppIntegrationInterface_ListAll_Call) Run(run func(ctx context.Context, request oauth2.ListPublishedAppIntegrationsRequest)) *MockPublishedAppIntegrationInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListPublishedAppIntegrationsRequest)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_ListAll_Call) Return(_a0 []oauth2.GetPublishedAppIntegrationOutput, _a1 error) *MockPublishedAppIntegrationInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_ListAll_Call) RunAndReturn(run func(context.Context, oauth2.ListPublishedAppIntegrationsRequest) ([]oauth2.GetPublishedAppIntegrationOutput, error)) *MockPublishedAppIntegrationInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockPublishedAppIntegrationInterface) Update(ctx context.Context, request oauth2.UpdatePublishedAppIntegration) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.UpdatePublishedAppIntegration) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPublishedAppIntegrationInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockPublishedAppIntegrationInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.UpdatePublishedAppIntegration -func (_e *MockPublishedAppIntegrationInterface_Expecter) Update(ctx interface{}, request interface{}) *MockPublishedAppIntegrationInterface_Update_Call { - return &MockPublishedAppIntegrationInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockPublishedAppIntegrationInterface_Update_Call) Run(run func(ctx context.Context, request oauth2.UpdatePublishedAppIntegration)) *MockPublishedAppIntegrationInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.UpdatePublishedAppIntegration)) - }) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Update_Call) Return(_a0 error) *MockPublishedAppIntegrationInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPublishedAppIntegrationInterface_Update_Call) RunAndReturn(run func(context.Context, oauth2.UpdatePublishedAppIntegration) error) *MockPublishedAppIntegrationInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPublishedAppIntegrationInterface creates a new instance of MockPublishedAppIntegrationInterface. 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 NewMockPublishedAppIntegrationInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPublishedAppIntegrationInterface { - mock := &MockPublishedAppIntegrationInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/oauth2/mock_service_principal_federation_policy_interface.go b/experimental/mocks/service/oauth2/mock_service_principal_federation_policy_interface.go deleted file mode 100644 index 31ab67310..000000000 --- a/experimental/mocks/service/oauth2/mock_service_principal_federation_policy_interface.go +++ /dev/null @@ -1,538 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package oauth2 - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - oauth2 "github.com/databricks/databricks-sdk-go/service/oauth2" -) - -// MockServicePrincipalFederationPolicyInterface is an autogenerated mock type for the ServicePrincipalFederationPolicyInterface type -type MockServicePrincipalFederationPolicyInterface struct { - mock.Mock -} - -type MockServicePrincipalFederationPolicyInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServicePrincipalFederationPolicyInterface) EXPECT() *MockServicePrincipalFederationPolicyInterface_Expecter { - return &MockServicePrincipalFederationPolicyInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalFederationPolicyInterface) Create(ctx context.Context, request oauth2.CreateServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateServicePrincipalFederationPolicyRequest) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.CreateServicePrincipalFederationPolicyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalFederationPolicyInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockServicePrincipalFederationPolicyInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.CreateServicePrincipalFederationPolicyRequest -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) Create(ctx interface{}, request interface{}) *MockServicePrincipalFederationPolicyInterface_Create_Call { - return &MockServicePrincipalFederationPolicyInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Create_Call) Run(run func(ctx context.Context, request oauth2.CreateServicePrincipalFederationPolicyRequest)) *MockServicePrincipalFederationPolicyInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.CreateServicePrincipalFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Create_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockServicePrincipalFederationPolicyInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Create_Call) RunAndReturn(run func(context.Context, oauth2.CreateServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error)) *MockServicePrincipalFederationPolicyInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalFederationPolicyInterface) Delete(ctx context.Context, request oauth2.DeleteServicePrincipalFederationPolicyRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.DeleteServicePrincipalFederationPolicyRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalFederationPolicyInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockServicePrincipalFederationPolicyInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.DeleteServicePrincipalFederationPolicyRequest -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockServicePrincipalFederationPolicyInterface_Delete_Call { - return &MockServicePrincipalFederationPolicyInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Delete_Call) Run(run func(ctx context.Context, request oauth2.DeleteServicePrincipalFederationPolicyRequest)) *MockServicePrincipalFederationPolicyInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.DeleteServicePrincipalFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Delete_Call) Return(_a0 error) *MockServicePrincipalFederationPolicyInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Delete_Call) RunAndReturn(run func(context.Context, oauth2.DeleteServicePrincipalFederationPolicyRequest) error) *MockServicePrincipalFederationPolicyInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByServicePrincipalIdAndPolicyId provides a mock function with given fields: ctx, servicePrincipalId, policyId -func (_m *MockServicePrincipalFederationPolicyInterface) DeleteByServicePrincipalIdAndPolicyId(ctx context.Context, servicePrincipalId int64, policyId string) error { - ret := _m.Called(ctx, servicePrincipalId, policyId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByServicePrincipalIdAndPolicyId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok { - r0 = rf(ctx, servicePrincipalId, policyId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByServicePrincipalIdAndPolicyId' -type MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call struct { - *mock.Call -} - -// DeleteByServicePrincipalIdAndPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - servicePrincipalId int64 -// - policyId string -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) DeleteByServicePrincipalIdAndPolicyId(ctx interface{}, servicePrincipalId interface{}, policyId interface{}) *MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call { - return &MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call{Call: _e.mock.On("DeleteByServicePrincipalIdAndPolicyId", ctx, servicePrincipalId, policyId)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call) Run(run func(ctx context.Context, servicePrincipalId int64, policyId string)) *MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(string)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call) Return(_a0 error) *MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call) RunAndReturn(run func(context.Context, int64, string) error) *MockServicePrincipalFederationPolicyInterface_DeleteByServicePrincipalIdAndPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalFederationPolicyInterface) Get(ctx context.Context, request oauth2.GetServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.GetServicePrincipalFederationPolicyRequest) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.GetServicePrincipalFederationPolicyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalFederationPolicyInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockServicePrincipalFederationPolicyInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.GetServicePrincipalFederationPolicyRequest -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) Get(ctx interface{}, request interface{}) *MockServicePrincipalFederationPolicyInterface_Get_Call { - return &MockServicePrincipalFederationPolicyInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Get_Call) Run(run func(ctx context.Context, request oauth2.GetServicePrincipalFederationPolicyRequest)) *MockServicePrincipalFederationPolicyInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.GetServicePrincipalFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Get_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockServicePrincipalFederationPolicyInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Get_Call) RunAndReturn(run func(context.Context, oauth2.GetServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error)) *MockServicePrincipalFederationPolicyInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByServicePrincipalIdAndPolicyId provides a mock function with given fields: ctx, servicePrincipalId, policyId -func (_m *MockServicePrincipalFederationPolicyInterface) GetByServicePrincipalIdAndPolicyId(ctx context.Context, servicePrincipalId int64, policyId string) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, servicePrincipalId, policyId) - - if len(ret) == 0 { - panic("no return value specified for GetByServicePrincipalIdAndPolicyId") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, string) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, servicePrincipalId, policyId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, string) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, servicePrincipalId, policyId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, string) error); ok { - r1 = rf(ctx, servicePrincipalId, policyId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByServicePrincipalIdAndPolicyId' -type MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call struct { - *mock.Call -} - -// GetByServicePrincipalIdAndPolicyId is a helper method to define mock.On call -// - ctx context.Context -// - servicePrincipalId int64 -// - policyId string -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) GetByServicePrincipalIdAndPolicyId(ctx interface{}, servicePrincipalId interface{}, policyId interface{}) *MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call { - return &MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call{Call: _e.mock.On("GetByServicePrincipalIdAndPolicyId", ctx, servicePrincipalId, policyId)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call) Run(run func(ctx context.Context, servicePrincipalId int64, policyId string)) *MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(string)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call) RunAndReturn(run func(context.Context, int64, string) (*oauth2.FederationPolicy, error)) *MockServicePrincipalFederationPolicyInterface_GetByServicePrincipalIdAndPolicyId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalFederationPolicyInterface) List(ctx context.Context, request oauth2.ListServicePrincipalFederationPoliciesRequest) listing.Iterator[oauth2.FederationPolicy] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[oauth2.FederationPolicy] - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListServicePrincipalFederationPoliciesRequest) listing.Iterator[oauth2.FederationPolicy]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[oauth2.FederationPolicy]) - } - } - - return r0 -} - -// MockServicePrincipalFederationPolicyInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockServicePrincipalFederationPolicyInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListServicePrincipalFederationPoliciesRequest -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) List(ctx interface{}, request interface{}) *MockServicePrincipalFederationPolicyInterface_List_Call { - return &MockServicePrincipalFederationPolicyInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_List_Call) Run(run func(ctx context.Context, request oauth2.ListServicePrincipalFederationPoliciesRequest)) *MockServicePrincipalFederationPolicyInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListServicePrincipalFederationPoliciesRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_List_Call) Return(_a0 listing.Iterator[oauth2.FederationPolicy]) *MockServicePrincipalFederationPolicyInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_List_Call) RunAndReturn(run func(context.Context, oauth2.ListServicePrincipalFederationPoliciesRequest) listing.Iterator[oauth2.FederationPolicy]) *MockServicePrincipalFederationPolicyInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalFederationPolicyInterface) ListAll(ctx context.Context, request oauth2.ListServicePrincipalFederationPoliciesRequest) ([]oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListServicePrincipalFederationPoliciesRequest) ([]oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListServicePrincipalFederationPoliciesRequest) []oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.ListServicePrincipalFederationPoliciesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalFederationPolicyInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockServicePrincipalFederationPolicyInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListServicePrincipalFederationPoliciesRequest -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockServicePrincipalFederationPolicyInterface_ListAll_Call { - return &MockServicePrincipalFederationPolicyInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_ListAll_Call) Run(run func(ctx context.Context, request oauth2.ListServicePrincipalFederationPoliciesRequest)) *MockServicePrincipalFederationPolicyInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListServicePrincipalFederationPoliciesRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_ListAll_Call) Return(_a0 []oauth2.FederationPolicy, _a1 error) *MockServicePrincipalFederationPolicyInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_ListAll_Call) RunAndReturn(run func(context.Context, oauth2.ListServicePrincipalFederationPoliciesRequest) ([]oauth2.FederationPolicy, error)) *MockServicePrincipalFederationPolicyInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByServicePrincipalId provides a mock function with given fields: ctx, servicePrincipalId -func (_m *MockServicePrincipalFederationPolicyInterface) ListByServicePrincipalId(ctx context.Context, servicePrincipalId int64) (*oauth2.ListFederationPoliciesResponse, error) { - ret := _m.Called(ctx, servicePrincipalId) - - if len(ret) == 0 { - panic("no return value specified for ListByServicePrincipalId") - } - - var r0 *oauth2.ListFederationPoliciesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*oauth2.ListFederationPoliciesResponse, error)); ok { - return rf(ctx, servicePrincipalId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *oauth2.ListFederationPoliciesResponse); ok { - r0 = rf(ctx, servicePrincipalId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.ListFederationPoliciesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, servicePrincipalId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByServicePrincipalId' -type MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call struct { - *mock.Call -} - -// ListByServicePrincipalId is a helper method to define mock.On call -// - ctx context.Context -// - servicePrincipalId int64 -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) ListByServicePrincipalId(ctx interface{}, servicePrincipalId interface{}) *MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call { - return &MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call{Call: _e.mock.On("ListByServicePrincipalId", ctx, servicePrincipalId)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call) Run(run func(ctx context.Context, servicePrincipalId int64)) *MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call) Return(_a0 *oauth2.ListFederationPoliciesResponse, _a1 error) *MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call) RunAndReturn(run func(context.Context, int64) (*oauth2.ListFederationPoliciesResponse, error)) *MockServicePrincipalFederationPolicyInterface_ListByServicePrincipalId_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalFederationPolicyInterface) Update(ctx context.Context, request oauth2.UpdateServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *oauth2.FederationPolicy - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.UpdateServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.UpdateServicePrincipalFederationPolicyRequest) *oauth2.FederationPolicy); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.FederationPolicy) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.UpdateServicePrincipalFederationPolicyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalFederationPolicyInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockServicePrincipalFederationPolicyInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.UpdateServicePrincipalFederationPolicyRequest -func (_e *MockServicePrincipalFederationPolicyInterface_Expecter) Update(ctx interface{}, request interface{}) *MockServicePrincipalFederationPolicyInterface_Update_Call { - return &MockServicePrincipalFederationPolicyInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Update_Call) Run(run func(ctx context.Context, request oauth2.UpdateServicePrincipalFederationPolicyRequest)) *MockServicePrincipalFederationPolicyInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.UpdateServicePrincipalFederationPolicyRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Update_Call) Return(_a0 *oauth2.FederationPolicy, _a1 error) *MockServicePrincipalFederationPolicyInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalFederationPolicyInterface_Update_Call) RunAndReturn(run func(context.Context, oauth2.UpdateServicePrincipalFederationPolicyRequest) (*oauth2.FederationPolicy, error)) *MockServicePrincipalFederationPolicyInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServicePrincipalFederationPolicyInterface creates a new instance of MockServicePrincipalFederationPolicyInterface. 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 NewMockServicePrincipalFederationPolicyInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServicePrincipalFederationPolicyInterface { - mock := &MockServicePrincipalFederationPolicyInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go b/experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go deleted file mode 100644 index 06f9d0828..000000000 --- a/experimental/mocks/service/oauth2/mock_service_principal_secrets_interface.go +++ /dev/null @@ -1,360 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package oauth2 - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - oauth2 "github.com/databricks/databricks-sdk-go/service/oauth2" -) - -// MockServicePrincipalSecretsInterface is an autogenerated mock type for the ServicePrincipalSecretsInterface type -type MockServicePrincipalSecretsInterface struct { - mock.Mock -} - -type MockServicePrincipalSecretsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServicePrincipalSecretsInterface) EXPECT() *MockServicePrincipalSecretsInterface_Expecter { - return &MockServicePrincipalSecretsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalSecretsInterface) Create(ctx context.Context, request oauth2.CreateServicePrincipalSecretRequest) (*oauth2.CreateServicePrincipalSecretResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *oauth2.CreateServicePrincipalSecretResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateServicePrincipalSecretRequest) (*oauth2.CreateServicePrincipalSecretResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.CreateServicePrincipalSecretRequest) *oauth2.CreateServicePrincipalSecretResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.CreateServicePrincipalSecretResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.CreateServicePrincipalSecretRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalSecretsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockServicePrincipalSecretsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.CreateServicePrincipalSecretRequest -func (_e *MockServicePrincipalSecretsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockServicePrincipalSecretsInterface_Create_Call { - return &MockServicePrincipalSecretsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockServicePrincipalSecretsInterface_Create_Call) Run(run func(ctx context.Context, request oauth2.CreateServicePrincipalSecretRequest)) *MockServicePrincipalSecretsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.CreateServicePrincipalSecretRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_Create_Call) Return(_a0 *oauth2.CreateServicePrincipalSecretResponse, _a1 error) *MockServicePrincipalSecretsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_Create_Call) RunAndReturn(run func(context.Context, oauth2.CreateServicePrincipalSecretRequest) (*oauth2.CreateServicePrincipalSecretResponse, error)) *MockServicePrincipalSecretsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalSecretsInterface) Delete(ctx context.Context, request oauth2.DeleteServicePrincipalSecretRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.DeleteServicePrincipalSecretRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalSecretsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockServicePrincipalSecretsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.DeleteServicePrincipalSecretRequest -func (_e *MockServicePrincipalSecretsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockServicePrincipalSecretsInterface_Delete_Call { - return &MockServicePrincipalSecretsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockServicePrincipalSecretsInterface_Delete_Call) Run(run func(ctx context.Context, request oauth2.DeleteServicePrincipalSecretRequest)) *MockServicePrincipalSecretsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.DeleteServicePrincipalSecretRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_Delete_Call) Return(_a0 error) *MockServicePrincipalSecretsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_Delete_Call) RunAndReturn(run func(context.Context, oauth2.DeleteServicePrincipalSecretRequest) error) *MockServicePrincipalSecretsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByServicePrincipalIdAndSecretId provides a mock function with given fields: ctx, servicePrincipalId, secretId -func (_m *MockServicePrincipalSecretsInterface) DeleteByServicePrincipalIdAndSecretId(ctx context.Context, servicePrincipalId int64, secretId string) error { - ret := _m.Called(ctx, servicePrincipalId, secretId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByServicePrincipalIdAndSecretId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64, string) error); ok { - r0 = rf(ctx, servicePrincipalId, secretId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByServicePrincipalIdAndSecretId' -type MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call struct { - *mock.Call -} - -// DeleteByServicePrincipalIdAndSecretId is a helper method to define mock.On call -// - ctx context.Context -// - servicePrincipalId int64 -// - secretId string -func (_e *MockServicePrincipalSecretsInterface_Expecter) DeleteByServicePrincipalIdAndSecretId(ctx interface{}, servicePrincipalId interface{}, secretId interface{}) *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call { - return &MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call{Call: _e.mock.On("DeleteByServicePrincipalIdAndSecretId", ctx, servicePrincipalId, secretId)} -} - -func (_c *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call) Run(run func(ctx context.Context, servicePrincipalId int64, secretId string)) *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(string)) - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call) Return(_a0 error) *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call) RunAndReturn(run func(context.Context, int64, string) error) *MockServicePrincipalSecretsInterface_DeleteByServicePrincipalIdAndSecretId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalSecretsInterface) List(ctx context.Context, request oauth2.ListServicePrincipalSecretsRequest) listing.Iterator[oauth2.SecretInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[oauth2.SecretInfo] - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListServicePrincipalSecretsRequest) listing.Iterator[oauth2.SecretInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[oauth2.SecretInfo]) - } - } - - return r0 -} - -// MockServicePrincipalSecretsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockServicePrincipalSecretsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListServicePrincipalSecretsRequest -func (_e *MockServicePrincipalSecretsInterface_Expecter) List(ctx interface{}, request interface{}) *MockServicePrincipalSecretsInterface_List_Call { - return &MockServicePrincipalSecretsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockServicePrincipalSecretsInterface_List_Call) Run(run func(ctx context.Context, request oauth2.ListServicePrincipalSecretsRequest)) *MockServicePrincipalSecretsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListServicePrincipalSecretsRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_List_Call) Return(_a0 listing.Iterator[oauth2.SecretInfo]) *MockServicePrincipalSecretsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_List_Call) RunAndReturn(run func(context.Context, oauth2.ListServicePrincipalSecretsRequest) listing.Iterator[oauth2.SecretInfo]) *MockServicePrincipalSecretsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockServicePrincipalSecretsInterface) ListAll(ctx context.Context, request oauth2.ListServicePrincipalSecretsRequest) ([]oauth2.SecretInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []oauth2.SecretInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListServicePrincipalSecretsRequest) ([]oauth2.SecretInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, oauth2.ListServicePrincipalSecretsRequest) []oauth2.SecretInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]oauth2.SecretInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, oauth2.ListServicePrincipalSecretsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalSecretsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockServicePrincipalSecretsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request oauth2.ListServicePrincipalSecretsRequest -func (_e *MockServicePrincipalSecretsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockServicePrincipalSecretsInterface_ListAll_Call { - return &MockServicePrincipalSecretsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockServicePrincipalSecretsInterface_ListAll_Call) Run(run func(ctx context.Context, request oauth2.ListServicePrincipalSecretsRequest)) *MockServicePrincipalSecretsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(oauth2.ListServicePrincipalSecretsRequest)) - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_ListAll_Call) Return(_a0 []oauth2.SecretInfo, _a1 error) *MockServicePrincipalSecretsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_ListAll_Call) RunAndReturn(run func(context.Context, oauth2.ListServicePrincipalSecretsRequest) ([]oauth2.SecretInfo, error)) *MockServicePrincipalSecretsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListByServicePrincipalId provides a mock function with given fields: ctx, servicePrincipalId -func (_m *MockServicePrincipalSecretsInterface) ListByServicePrincipalId(ctx context.Context, servicePrincipalId int64) (*oauth2.ListServicePrincipalSecretsResponse, error) { - ret := _m.Called(ctx, servicePrincipalId) - - if len(ret) == 0 { - panic("no return value specified for ListByServicePrincipalId") - } - - var r0 *oauth2.ListServicePrincipalSecretsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*oauth2.ListServicePrincipalSecretsResponse, error)); ok { - return rf(ctx, servicePrincipalId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *oauth2.ListServicePrincipalSecretsResponse); ok { - r0 = rf(ctx, servicePrincipalId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*oauth2.ListServicePrincipalSecretsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, servicePrincipalId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListByServicePrincipalId' -type MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call struct { - *mock.Call -} - -// ListByServicePrincipalId is a helper method to define mock.On call -// - ctx context.Context -// - servicePrincipalId int64 -func (_e *MockServicePrincipalSecretsInterface_Expecter) ListByServicePrincipalId(ctx interface{}, servicePrincipalId interface{}) *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call { - return &MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call{Call: _e.mock.On("ListByServicePrincipalId", ctx, servicePrincipalId)} -} - -func (_c *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call) Run(run func(ctx context.Context, servicePrincipalId int64)) *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call) Return(_a0 *oauth2.ListServicePrincipalSecretsResponse, _a1 error) *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call) RunAndReturn(run func(context.Context, int64) (*oauth2.ListServicePrincipalSecretsResponse, error)) *MockServicePrincipalSecretsInterface_ListByServicePrincipalId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServicePrincipalSecretsInterface creates a new instance of MockServicePrincipalSecretsInterface. 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 NewMockServicePrincipalSecretsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServicePrincipalSecretsInterface { - mock := &MockServicePrincipalSecretsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/pipelines/mock_pipelines_interface.go b/experimental/mocks/service/pipelines/mock_pipelines_interface.go deleted file mode 100644 index bc932ef31..000000000 --- a/experimental/mocks/service/pipelines/mock_pipelines_interface.go +++ /dev/null @@ -1,1659 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package pipelines - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - pipelines "github.com/databricks/databricks-sdk-go/service/pipelines" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockPipelinesInterface is an autogenerated mock type for the PipelinesInterface type -type MockPipelinesInterface struct { - mock.Mock -} - -type MockPipelinesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPipelinesInterface) EXPECT() *MockPipelinesInterface_Expecter { - return &MockPipelinesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) Create(ctx context.Context, request pipelines.CreatePipeline) (*pipelines.CreatePipelineResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *pipelines.CreatePipelineResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.CreatePipeline) (*pipelines.CreatePipelineResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.CreatePipeline) *pipelines.CreatePipelineResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.CreatePipelineResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.CreatePipeline) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockPipelinesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.CreatePipeline -func (_e *MockPipelinesInterface_Expecter) Create(ctx interface{}, request interface{}) *MockPipelinesInterface_Create_Call { - return &MockPipelinesInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockPipelinesInterface_Create_Call) Run(run func(ctx context.Context, request pipelines.CreatePipeline)) *MockPipelinesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.CreatePipeline)) - }) - return _c -} - -func (_c *MockPipelinesInterface_Create_Call) Return(_a0 *pipelines.CreatePipelineResponse, _a1 error) *MockPipelinesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_Create_Call) RunAndReturn(run func(context.Context, pipelines.CreatePipeline) (*pipelines.CreatePipelineResponse, error)) *MockPipelinesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) Delete(ctx context.Context, request pipelines.DeletePipelineRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.DeletePipelineRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPipelinesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockPipelinesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.DeletePipelineRequest -func (_e *MockPipelinesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockPipelinesInterface_Delete_Call { - return &MockPipelinesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockPipelinesInterface_Delete_Call) Run(run func(ctx context.Context, request pipelines.DeletePipelineRequest)) *MockPipelinesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.DeletePipelineRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_Delete_Call) Return(_a0 error) *MockPipelinesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPipelinesInterface_Delete_Call) RunAndReturn(run func(context.Context, pipelines.DeletePipelineRequest) error) *MockPipelinesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByPipelineId provides a mock function with given fields: ctx, pipelineId -func (_m *MockPipelinesInterface) DeleteByPipelineId(ctx context.Context, pipelineId string) error { - ret := _m.Called(ctx, pipelineId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByPipelineId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, pipelineId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPipelinesInterface_DeleteByPipelineId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByPipelineId' -type MockPipelinesInterface_DeleteByPipelineId_Call struct { - *mock.Call -} - -// DeleteByPipelineId is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -func (_e *MockPipelinesInterface_Expecter) DeleteByPipelineId(ctx interface{}, pipelineId interface{}) *MockPipelinesInterface_DeleteByPipelineId_Call { - return &MockPipelinesInterface_DeleteByPipelineId_Call{Call: _e.mock.On("DeleteByPipelineId", ctx, pipelineId)} -} - -func (_c *MockPipelinesInterface_DeleteByPipelineId_Call) Run(run func(ctx context.Context, pipelineId string)) *MockPipelinesInterface_DeleteByPipelineId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_DeleteByPipelineId_Call) Return(_a0 error) *MockPipelinesInterface_DeleteByPipelineId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPipelinesInterface_DeleteByPipelineId_Call) RunAndReturn(run func(context.Context, string) error) *MockPipelinesInterface_DeleteByPipelineId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) Get(ctx context.Context, request pipelines.GetPipelineRequest) (*pipelines.GetPipelineResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *pipelines.GetPipelineResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetPipelineRequest) (*pipelines.GetPipelineResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetPipelineRequest) *pipelines.GetPipelineResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetPipelineResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.GetPipelineRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPipelinesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.GetPipelineRequest -func (_e *MockPipelinesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockPipelinesInterface_Get_Call { - return &MockPipelinesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockPipelinesInterface_Get_Call) Run(run func(ctx context.Context, request pipelines.GetPipelineRequest)) *MockPipelinesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.GetPipelineRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_Get_Call) Return(_a0 *pipelines.GetPipelineResponse, _a1 error) *MockPipelinesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_Get_Call) RunAndReturn(run func(context.Context, pipelines.GetPipelineRequest) (*pipelines.GetPipelineResponse, error)) *MockPipelinesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockPipelinesInterface) GetByName(ctx context.Context, name string) (*pipelines.PipelineStateInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *pipelines.PipelineStateInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*pipelines.PipelineStateInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *pipelines.PipelineStateInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.PipelineStateInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockPipelinesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockPipelinesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockPipelinesInterface_GetByName_Call { - return &MockPipelinesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockPipelinesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockPipelinesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetByName_Call) Return(_a0 *pipelines.PipelineStateInfo, _a1 error) *MockPipelinesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*pipelines.PipelineStateInfo, error)) *MockPipelinesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetByPipelineId provides a mock function with given fields: ctx, pipelineId -func (_m *MockPipelinesInterface) GetByPipelineId(ctx context.Context, pipelineId string) (*pipelines.GetPipelineResponse, error) { - ret := _m.Called(ctx, pipelineId) - - if len(ret) == 0 { - panic("no return value specified for GetByPipelineId") - } - - var r0 *pipelines.GetPipelineResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*pipelines.GetPipelineResponse, error)); ok { - return rf(ctx, pipelineId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *pipelines.GetPipelineResponse); ok { - r0 = rf(ctx, pipelineId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetPipelineResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, pipelineId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetByPipelineId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPipelineId' -type MockPipelinesInterface_GetByPipelineId_Call struct { - *mock.Call -} - -// GetByPipelineId is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -func (_e *MockPipelinesInterface_Expecter) GetByPipelineId(ctx interface{}, pipelineId interface{}) *MockPipelinesInterface_GetByPipelineId_Call { - return &MockPipelinesInterface_GetByPipelineId_Call{Call: _e.mock.On("GetByPipelineId", ctx, pipelineId)} -} - -func (_c *MockPipelinesInterface_GetByPipelineId_Call) Run(run func(ctx context.Context, pipelineId string)) *MockPipelinesInterface_GetByPipelineId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetByPipelineId_Call) Return(_a0 *pipelines.GetPipelineResponse, _a1 error) *MockPipelinesInterface_GetByPipelineId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetByPipelineId_Call) RunAndReturn(run func(context.Context, string) (*pipelines.GetPipelineResponse, error)) *MockPipelinesInterface_GetByPipelineId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) GetPermissionLevels(ctx context.Context, request pipelines.GetPipelinePermissionLevelsRequest) (*pipelines.GetPipelinePermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *pipelines.GetPipelinePermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetPipelinePermissionLevelsRequest) (*pipelines.GetPipelinePermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetPipelinePermissionLevelsRequest) *pipelines.GetPipelinePermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetPipelinePermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.GetPipelinePermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockPipelinesInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.GetPipelinePermissionLevelsRequest -func (_e *MockPipelinesInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockPipelinesInterface_GetPermissionLevels_Call { - return &MockPipelinesInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockPipelinesInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request pipelines.GetPipelinePermissionLevelsRequest)) *MockPipelinesInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.GetPipelinePermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissionLevels_Call) Return(_a0 *pipelines.GetPipelinePermissionLevelsResponse, _a1 error) *MockPipelinesInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, pipelines.GetPipelinePermissionLevelsRequest) (*pipelines.GetPipelinePermissionLevelsResponse, error)) *MockPipelinesInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByPipelineId provides a mock function with given fields: ctx, pipelineId -func (_m *MockPipelinesInterface) GetPermissionLevelsByPipelineId(ctx context.Context, pipelineId string) (*pipelines.GetPipelinePermissionLevelsResponse, error) { - ret := _m.Called(ctx, pipelineId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByPipelineId") - } - - var r0 *pipelines.GetPipelinePermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*pipelines.GetPipelinePermissionLevelsResponse, error)); ok { - return rf(ctx, pipelineId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *pipelines.GetPipelinePermissionLevelsResponse); ok { - r0 = rf(ctx, pipelineId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetPipelinePermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, pipelineId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByPipelineId' -type MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByPipelineId is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -func (_e *MockPipelinesInterface_Expecter) GetPermissionLevelsByPipelineId(ctx interface{}, pipelineId interface{}) *MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call { - return &MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call{Call: _e.mock.On("GetPermissionLevelsByPipelineId", ctx, pipelineId)} -} - -func (_c *MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call) Run(run func(ctx context.Context, pipelineId string)) *MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call) Return(_a0 *pipelines.GetPipelinePermissionLevelsResponse, _a1 error) *MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call) RunAndReturn(run func(context.Context, string) (*pipelines.GetPipelinePermissionLevelsResponse, error)) *MockPipelinesInterface_GetPermissionLevelsByPipelineId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) GetPermissions(ctx context.Context, request pipelines.GetPipelinePermissionsRequest) (*pipelines.PipelinePermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *pipelines.PipelinePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetPipelinePermissionsRequest) (*pipelines.PipelinePermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetPipelinePermissionsRequest) *pipelines.PipelinePermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.PipelinePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.GetPipelinePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockPipelinesInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.GetPipelinePermissionsRequest -func (_e *MockPipelinesInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockPipelinesInterface_GetPermissions_Call { - return &MockPipelinesInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockPipelinesInterface_GetPermissions_Call) Run(run func(ctx context.Context, request pipelines.GetPipelinePermissionsRequest)) *MockPipelinesInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.GetPipelinePermissionsRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissions_Call) Return(_a0 *pipelines.PipelinePermissions, _a1 error) *MockPipelinesInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, pipelines.GetPipelinePermissionsRequest) (*pipelines.PipelinePermissions, error)) *MockPipelinesInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByPipelineId provides a mock function with given fields: ctx, pipelineId -func (_m *MockPipelinesInterface) GetPermissionsByPipelineId(ctx context.Context, pipelineId string) (*pipelines.PipelinePermissions, error) { - ret := _m.Called(ctx, pipelineId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByPipelineId") - } - - var r0 *pipelines.PipelinePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*pipelines.PipelinePermissions, error)); ok { - return rf(ctx, pipelineId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *pipelines.PipelinePermissions); ok { - r0 = rf(ctx, pipelineId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.PipelinePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, pipelineId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetPermissionsByPipelineId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByPipelineId' -type MockPipelinesInterface_GetPermissionsByPipelineId_Call struct { - *mock.Call -} - -// GetPermissionsByPipelineId is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -func (_e *MockPipelinesInterface_Expecter) GetPermissionsByPipelineId(ctx interface{}, pipelineId interface{}) *MockPipelinesInterface_GetPermissionsByPipelineId_Call { - return &MockPipelinesInterface_GetPermissionsByPipelineId_Call{Call: _e.mock.On("GetPermissionsByPipelineId", ctx, pipelineId)} -} - -func (_c *MockPipelinesInterface_GetPermissionsByPipelineId_Call) Run(run func(ctx context.Context, pipelineId string)) *MockPipelinesInterface_GetPermissionsByPipelineId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissionsByPipelineId_Call) Return(_a0 *pipelines.PipelinePermissions, _a1 error) *MockPipelinesInterface_GetPermissionsByPipelineId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetPermissionsByPipelineId_Call) RunAndReturn(run func(context.Context, string) (*pipelines.PipelinePermissions, error)) *MockPipelinesInterface_GetPermissionsByPipelineId_Call { - _c.Call.Return(run) - return _c -} - -// GetUpdate provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) GetUpdate(ctx context.Context, request pipelines.GetUpdateRequest) (*pipelines.GetUpdateResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetUpdate") - } - - var r0 *pipelines.GetUpdateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetUpdateRequest) (*pipelines.GetUpdateResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.GetUpdateRequest) *pipelines.GetUpdateResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetUpdateResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.GetUpdateRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUpdate' -type MockPipelinesInterface_GetUpdate_Call struct { - *mock.Call -} - -// GetUpdate is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.GetUpdateRequest -func (_e *MockPipelinesInterface_Expecter) GetUpdate(ctx interface{}, request interface{}) *MockPipelinesInterface_GetUpdate_Call { - return &MockPipelinesInterface_GetUpdate_Call{Call: _e.mock.On("GetUpdate", ctx, request)} -} - -func (_c *MockPipelinesInterface_GetUpdate_Call) Run(run func(ctx context.Context, request pipelines.GetUpdateRequest)) *MockPipelinesInterface_GetUpdate_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.GetUpdateRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetUpdate_Call) Return(_a0 *pipelines.GetUpdateResponse, _a1 error) *MockPipelinesInterface_GetUpdate_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetUpdate_Call) RunAndReturn(run func(context.Context, pipelines.GetUpdateRequest) (*pipelines.GetUpdateResponse, error)) *MockPipelinesInterface_GetUpdate_Call { - _c.Call.Return(run) - return _c -} - -// GetUpdateByPipelineIdAndUpdateId provides a mock function with given fields: ctx, pipelineId, updateId -func (_m *MockPipelinesInterface) GetUpdateByPipelineIdAndUpdateId(ctx context.Context, pipelineId string, updateId string) (*pipelines.GetUpdateResponse, error) { - ret := _m.Called(ctx, pipelineId, updateId) - - if len(ret) == 0 { - panic("no return value specified for GetUpdateByPipelineIdAndUpdateId") - } - - var r0 *pipelines.GetUpdateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*pipelines.GetUpdateResponse, error)); ok { - return rf(ctx, pipelineId, updateId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *pipelines.GetUpdateResponse); ok { - r0 = rf(ctx, pipelineId, updateId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetUpdateResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, pipelineId, updateId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUpdateByPipelineIdAndUpdateId' -type MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call struct { - *mock.Call -} - -// GetUpdateByPipelineIdAndUpdateId is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -// - updateId string -func (_e *MockPipelinesInterface_Expecter) GetUpdateByPipelineIdAndUpdateId(ctx interface{}, pipelineId interface{}, updateId interface{}) *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call { - return &MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call{Call: _e.mock.On("GetUpdateByPipelineIdAndUpdateId", ctx, pipelineId, updateId)} -} - -func (_c *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call) Run(run func(ctx context.Context, pipelineId string, updateId string)) *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call) Return(_a0 *pipelines.GetUpdateResponse, _a1 error) *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call) RunAndReturn(run func(context.Context, string, string) (*pipelines.GetUpdateResponse, error)) *MockPipelinesInterface_GetUpdateByPipelineIdAndUpdateId_Call { - _c.Call.Return(run) - return _c -} - -// ListPipelineEvents provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) ListPipelineEvents(ctx context.Context, request pipelines.ListPipelineEventsRequest) listing.Iterator[pipelines.PipelineEvent] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListPipelineEvents") - } - - var r0 listing.Iterator[pipelines.PipelineEvent] - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelineEventsRequest) listing.Iterator[pipelines.PipelineEvent]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[pipelines.PipelineEvent]) - } - } - - return r0 -} - -// MockPipelinesInterface_ListPipelineEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPipelineEvents' -type MockPipelinesInterface_ListPipelineEvents_Call struct { - *mock.Call -} - -// ListPipelineEvents is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.ListPipelineEventsRequest -func (_e *MockPipelinesInterface_Expecter) ListPipelineEvents(ctx interface{}, request interface{}) *MockPipelinesInterface_ListPipelineEvents_Call { - return &MockPipelinesInterface_ListPipelineEvents_Call{Call: _e.mock.On("ListPipelineEvents", ctx, request)} -} - -func (_c *MockPipelinesInterface_ListPipelineEvents_Call) Run(run func(ctx context.Context, request pipelines.ListPipelineEventsRequest)) *MockPipelinesInterface_ListPipelineEvents_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.ListPipelineEventsRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelineEvents_Call) Return(_a0 listing.Iterator[pipelines.PipelineEvent]) *MockPipelinesInterface_ListPipelineEvents_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelineEvents_Call) RunAndReturn(run func(context.Context, pipelines.ListPipelineEventsRequest) listing.Iterator[pipelines.PipelineEvent]) *MockPipelinesInterface_ListPipelineEvents_Call { - _c.Call.Return(run) - return _c -} - -// ListPipelineEventsAll provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) ListPipelineEventsAll(ctx context.Context, request pipelines.ListPipelineEventsRequest) ([]pipelines.PipelineEvent, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListPipelineEventsAll") - } - - var r0 []pipelines.PipelineEvent - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelineEventsRequest) ([]pipelines.PipelineEvent, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelineEventsRequest) []pipelines.PipelineEvent); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]pipelines.PipelineEvent) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.ListPipelineEventsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_ListPipelineEventsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPipelineEventsAll' -type MockPipelinesInterface_ListPipelineEventsAll_Call struct { - *mock.Call -} - -// ListPipelineEventsAll is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.ListPipelineEventsRequest -func (_e *MockPipelinesInterface_Expecter) ListPipelineEventsAll(ctx interface{}, request interface{}) *MockPipelinesInterface_ListPipelineEventsAll_Call { - return &MockPipelinesInterface_ListPipelineEventsAll_Call{Call: _e.mock.On("ListPipelineEventsAll", ctx, request)} -} - -func (_c *MockPipelinesInterface_ListPipelineEventsAll_Call) Run(run func(ctx context.Context, request pipelines.ListPipelineEventsRequest)) *MockPipelinesInterface_ListPipelineEventsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.ListPipelineEventsRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelineEventsAll_Call) Return(_a0 []pipelines.PipelineEvent, _a1 error) *MockPipelinesInterface_ListPipelineEventsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelineEventsAll_Call) RunAndReturn(run func(context.Context, pipelines.ListPipelineEventsRequest) ([]pipelines.PipelineEvent, error)) *MockPipelinesInterface_ListPipelineEventsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListPipelineEventsByPipelineId provides a mock function with given fields: ctx, pipelineId -func (_m *MockPipelinesInterface) ListPipelineEventsByPipelineId(ctx context.Context, pipelineId string) (*pipelines.ListPipelineEventsResponse, error) { - ret := _m.Called(ctx, pipelineId) - - if len(ret) == 0 { - panic("no return value specified for ListPipelineEventsByPipelineId") - } - - var r0 *pipelines.ListPipelineEventsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*pipelines.ListPipelineEventsResponse, error)); ok { - return rf(ctx, pipelineId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *pipelines.ListPipelineEventsResponse); ok { - r0 = rf(ctx, pipelineId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.ListPipelineEventsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, pipelineId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_ListPipelineEventsByPipelineId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPipelineEventsByPipelineId' -type MockPipelinesInterface_ListPipelineEventsByPipelineId_Call struct { - *mock.Call -} - -// ListPipelineEventsByPipelineId is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -func (_e *MockPipelinesInterface_Expecter) ListPipelineEventsByPipelineId(ctx interface{}, pipelineId interface{}) *MockPipelinesInterface_ListPipelineEventsByPipelineId_Call { - return &MockPipelinesInterface_ListPipelineEventsByPipelineId_Call{Call: _e.mock.On("ListPipelineEventsByPipelineId", ctx, pipelineId)} -} - -func (_c *MockPipelinesInterface_ListPipelineEventsByPipelineId_Call) Run(run func(ctx context.Context, pipelineId string)) *MockPipelinesInterface_ListPipelineEventsByPipelineId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelineEventsByPipelineId_Call) Return(_a0 *pipelines.ListPipelineEventsResponse, _a1 error) *MockPipelinesInterface_ListPipelineEventsByPipelineId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelineEventsByPipelineId_Call) RunAndReturn(run func(context.Context, string) (*pipelines.ListPipelineEventsResponse, error)) *MockPipelinesInterface_ListPipelineEventsByPipelineId_Call { - _c.Call.Return(run) - return _c -} - -// ListPipelines provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) ListPipelines(ctx context.Context, request pipelines.ListPipelinesRequest) listing.Iterator[pipelines.PipelineStateInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListPipelines") - } - - var r0 listing.Iterator[pipelines.PipelineStateInfo] - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelinesRequest) listing.Iterator[pipelines.PipelineStateInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[pipelines.PipelineStateInfo]) - } - } - - return r0 -} - -// MockPipelinesInterface_ListPipelines_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPipelines' -type MockPipelinesInterface_ListPipelines_Call struct { - *mock.Call -} - -// ListPipelines is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.ListPipelinesRequest -func (_e *MockPipelinesInterface_Expecter) ListPipelines(ctx interface{}, request interface{}) *MockPipelinesInterface_ListPipelines_Call { - return &MockPipelinesInterface_ListPipelines_Call{Call: _e.mock.On("ListPipelines", ctx, request)} -} - -func (_c *MockPipelinesInterface_ListPipelines_Call) Run(run func(ctx context.Context, request pipelines.ListPipelinesRequest)) *MockPipelinesInterface_ListPipelines_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.ListPipelinesRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelines_Call) Return(_a0 listing.Iterator[pipelines.PipelineStateInfo]) *MockPipelinesInterface_ListPipelines_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelines_Call) RunAndReturn(run func(context.Context, pipelines.ListPipelinesRequest) listing.Iterator[pipelines.PipelineStateInfo]) *MockPipelinesInterface_ListPipelines_Call { - _c.Call.Return(run) - return _c -} - -// ListPipelinesAll provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) ListPipelinesAll(ctx context.Context, request pipelines.ListPipelinesRequest) ([]pipelines.PipelineStateInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListPipelinesAll") - } - - var r0 []pipelines.PipelineStateInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelinesRequest) ([]pipelines.PipelineStateInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelinesRequest) []pipelines.PipelineStateInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]pipelines.PipelineStateInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.ListPipelinesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_ListPipelinesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPipelinesAll' -type MockPipelinesInterface_ListPipelinesAll_Call struct { - *mock.Call -} - -// ListPipelinesAll is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.ListPipelinesRequest -func (_e *MockPipelinesInterface_Expecter) ListPipelinesAll(ctx interface{}, request interface{}) *MockPipelinesInterface_ListPipelinesAll_Call { - return &MockPipelinesInterface_ListPipelinesAll_Call{Call: _e.mock.On("ListPipelinesAll", ctx, request)} -} - -func (_c *MockPipelinesInterface_ListPipelinesAll_Call) Run(run func(ctx context.Context, request pipelines.ListPipelinesRequest)) *MockPipelinesInterface_ListPipelinesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.ListPipelinesRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelinesAll_Call) Return(_a0 []pipelines.PipelineStateInfo, _a1 error) *MockPipelinesInterface_ListPipelinesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_ListPipelinesAll_Call) RunAndReturn(run func(context.Context, pipelines.ListPipelinesRequest) ([]pipelines.PipelineStateInfo, error)) *MockPipelinesInterface_ListPipelinesAll_Call { - _c.Call.Return(run) - return _c -} - -// ListUpdates provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) ListUpdates(ctx context.Context, request pipelines.ListUpdatesRequest) (*pipelines.ListUpdatesResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListUpdates") - } - - var r0 *pipelines.ListUpdatesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListUpdatesRequest) (*pipelines.ListUpdatesResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListUpdatesRequest) *pipelines.ListUpdatesResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.ListUpdatesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.ListUpdatesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_ListUpdates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUpdates' -type MockPipelinesInterface_ListUpdates_Call struct { - *mock.Call -} - -// ListUpdates is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.ListUpdatesRequest -func (_e *MockPipelinesInterface_Expecter) ListUpdates(ctx interface{}, request interface{}) *MockPipelinesInterface_ListUpdates_Call { - return &MockPipelinesInterface_ListUpdates_Call{Call: _e.mock.On("ListUpdates", ctx, request)} -} - -func (_c *MockPipelinesInterface_ListUpdates_Call) Run(run func(ctx context.Context, request pipelines.ListUpdatesRequest)) *MockPipelinesInterface_ListUpdates_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.ListUpdatesRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_ListUpdates_Call) Return(_a0 *pipelines.ListUpdatesResponse, _a1 error) *MockPipelinesInterface_ListUpdates_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_ListUpdates_Call) RunAndReturn(run func(context.Context, pipelines.ListUpdatesRequest) (*pipelines.ListUpdatesResponse, error)) *MockPipelinesInterface_ListUpdates_Call { - _c.Call.Return(run) - return _c -} - -// ListUpdatesByPipelineId provides a mock function with given fields: ctx, pipelineId -func (_m *MockPipelinesInterface) ListUpdatesByPipelineId(ctx context.Context, pipelineId string) (*pipelines.ListUpdatesResponse, error) { - ret := _m.Called(ctx, pipelineId) - - if len(ret) == 0 { - panic("no return value specified for ListUpdatesByPipelineId") - } - - var r0 *pipelines.ListUpdatesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*pipelines.ListUpdatesResponse, error)); ok { - return rf(ctx, pipelineId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *pipelines.ListUpdatesResponse); ok { - r0 = rf(ctx, pipelineId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.ListUpdatesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, pipelineId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_ListUpdatesByPipelineId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUpdatesByPipelineId' -type MockPipelinesInterface_ListUpdatesByPipelineId_Call struct { - *mock.Call -} - -// ListUpdatesByPipelineId is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -func (_e *MockPipelinesInterface_Expecter) ListUpdatesByPipelineId(ctx interface{}, pipelineId interface{}) *MockPipelinesInterface_ListUpdatesByPipelineId_Call { - return &MockPipelinesInterface_ListUpdatesByPipelineId_Call{Call: _e.mock.On("ListUpdatesByPipelineId", ctx, pipelineId)} -} - -func (_c *MockPipelinesInterface_ListUpdatesByPipelineId_Call) Run(run func(ctx context.Context, pipelineId string)) *MockPipelinesInterface_ListUpdatesByPipelineId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPipelinesInterface_ListUpdatesByPipelineId_Call) Return(_a0 *pipelines.ListUpdatesResponse, _a1 error) *MockPipelinesInterface_ListUpdatesByPipelineId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_ListUpdatesByPipelineId_Call) RunAndReturn(run func(context.Context, string) (*pipelines.ListUpdatesResponse, error)) *MockPipelinesInterface_ListUpdatesByPipelineId_Call { - _c.Call.Return(run) - return _c -} - -// PipelineStateInfoNameToPipelineIdMap provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) PipelineStateInfoNameToPipelineIdMap(ctx context.Context, request pipelines.ListPipelinesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for PipelineStateInfoNameToPipelineIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelinesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.ListPipelinesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.ListPipelinesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PipelineStateInfoNameToPipelineIdMap' -type MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call struct { - *mock.Call -} - -// PipelineStateInfoNameToPipelineIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.ListPipelinesRequest -func (_e *MockPipelinesInterface_Expecter) PipelineStateInfoNameToPipelineIdMap(ctx interface{}, request interface{}) *MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call { - return &MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call{Call: _e.mock.On("PipelineStateInfoNameToPipelineIdMap", ctx, request)} -} - -func (_c *MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call) Run(run func(ctx context.Context, request pipelines.ListPipelinesRequest)) *MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.ListPipelinesRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call) RunAndReturn(run func(context.Context, pipelines.ListPipelinesRequest) (map[string]string, error)) *MockPipelinesInterface_PipelineStateInfoNameToPipelineIdMap_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) SetPermissions(ctx context.Context, request pipelines.PipelinePermissionsRequest) (*pipelines.PipelinePermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *pipelines.PipelinePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.PipelinePermissionsRequest) (*pipelines.PipelinePermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.PipelinePermissionsRequest) *pipelines.PipelinePermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.PipelinePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.PipelinePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockPipelinesInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.PipelinePermissionsRequest -func (_e *MockPipelinesInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockPipelinesInterface_SetPermissions_Call { - return &MockPipelinesInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockPipelinesInterface_SetPermissions_Call) Run(run func(ctx context.Context, request pipelines.PipelinePermissionsRequest)) *MockPipelinesInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.PipelinePermissionsRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_SetPermissions_Call) Return(_a0 *pipelines.PipelinePermissions, _a1 error) *MockPipelinesInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, pipelines.PipelinePermissionsRequest) (*pipelines.PipelinePermissions, error)) *MockPipelinesInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// StartUpdate provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) StartUpdate(ctx context.Context, request pipelines.StartUpdate) (*pipelines.StartUpdateResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for StartUpdate") - } - - var r0 *pipelines.StartUpdateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.StartUpdate) (*pipelines.StartUpdateResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.StartUpdate) *pipelines.StartUpdateResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.StartUpdateResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.StartUpdate) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_StartUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartUpdate' -type MockPipelinesInterface_StartUpdate_Call struct { - *mock.Call -} - -// StartUpdate is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.StartUpdate -func (_e *MockPipelinesInterface_Expecter) StartUpdate(ctx interface{}, request interface{}) *MockPipelinesInterface_StartUpdate_Call { - return &MockPipelinesInterface_StartUpdate_Call{Call: _e.mock.On("StartUpdate", ctx, request)} -} - -func (_c *MockPipelinesInterface_StartUpdate_Call) Run(run func(ctx context.Context, request pipelines.StartUpdate)) *MockPipelinesInterface_StartUpdate_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.StartUpdate)) - }) - return _c -} - -func (_c *MockPipelinesInterface_StartUpdate_Call) Return(_a0 *pipelines.StartUpdateResponse, _a1 error) *MockPipelinesInterface_StartUpdate_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_StartUpdate_Call) RunAndReturn(run func(context.Context, pipelines.StartUpdate) (*pipelines.StartUpdateResponse, error)) *MockPipelinesInterface_StartUpdate_Call { - _c.Call.Return(run) - return _c -} - -// Stop provides a mock function with given fields: ctx, stopRequest -func (_m *MockPipelinesInterface) Stop(ctx context.Context, stopRequest pipelines.StopRequest) (*pipelines.WaitGetPipelineIdle[struct{}], error) { - ret := _m.Called(ctx, stopRequest) - - if len(ret) == 0 { - panic("no return value specified for Stop") - } - - var r0 *pipelines.WaitGetPipelineIdle[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.StopRequest) (*pipelines.WaitGetPipelineIdle[struct{}], error)); ok { - return rf(ctx, stopRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.StopRequest) *pipelines.WaitGetPipelineIdle[struct{}]); ok { - r0 = rf(ctx, stopRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.WaitGetPipelineIdle[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.StopRequest) error); ok { - r1 = rf(ctx, stopRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' -type MockPipelinesInterface_Stop_Call struct { - *mock.Call -} - -// Stop is a helper method to define mock.On call -// - ctx context.Context -// - stopRequest pipelines.StopRequest -func (_e *MockPipelinesInterface_Expecter) Stop(ctx interface{}, stopRequest interface{}) *MockPipelinesInterface_Stop_Call { - return &MockPipelinesInterface_Stop_Call{Call: _e.mock.On("Stop", ctx, stopRequest)} -} - -func (_c *MockPipelinesInterface_Stop_Call) Run(run func(ctx context.Context, stopRequest pipelines.StopRequest)) *MockPipelinesInterface_Stop_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.StopRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_Stop_Call) Return(_a0 *pipelines.WaitGetPipelineIdle[struct{}], _a1 error) *MockPipelinesInterface_Stop_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_Stop_Call) RunAndReturn(run func(context.Context, pipelines.StopRequest) (*pipelines.WaitGetPipelineIdle[struct{}], error)) *MockPipelinesInterface_Stop_Call { - _c.Call.Return(run) - return _c -} - -// StopAndWait provides a mock function with given fields: ctx, stopRequest, options -func (_m *MockPipelinesInterface) StopAndWait(ctx context.Context, stopRequest pipelines.StopRequest, options ...retries.Option[pipelines.GetPipelineResponse]) (*pipelines.GetPipelineResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, stopRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StopAndWait") - } - - var r0 *pipelines.GetPipelineResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.StopRequest, ...retries.Option[pipelines.GetPipelineResponse]) (*pipelines.GetPipelineResponse, error)); ok { - return rf(ctx, stopRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.StopRequest, ...retries.Option[pipelines.GetPipelineResponse]) *pipelines.GetPipelineResponse); ok { - r0 = rf(ctx, stopRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetPipelineResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.StopRequest, ...retries.Option[pipelines.GetPipelineResponse]) error); ok { - r1 = rf(ctx, stopRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_StopAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopAndWait' -type MockPipelinesInterface_StopAndWait_Call struct { - *mock.Call -} - -// StopAndWait is a helper method to define mock.On call -// - ctx context.Context -// - stopRequest pipelines.StopRequest -// - options ...retries.Option[pipelines.GetPipelineResponse] -func (_e *MockPipelinesInterface_Expecter) StopAndWait(ctx interface{}, stopRequest interface{}, options ...interface{}) *MockPipelinesInterface_StopAndWait_Call { - return &MockPipelinesInterface_StopAndWait_Call{Call: _e.mock.On("StopAndWait", - append([]interface{}{ctx, stopRequest}, options...)...)} -} - -func (_c *MockPipelinesInterface_StopAndWait_Call) Run(run func(ctx context.Context, stopRequest pipelines.StopRequest, options ...retries.Option[pipelines.GetPipelineResponse])) *MockPipelinesInterface_StopAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[pipelines.GetPipelineResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[pipelines.GetPipelineResponse]) - } - } - run(args[0].(context.Context), args[1].(pipelines.StopRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockPipelinesInterface_StopAndWait_Call) Return(_a0 *pipelines.GetPipelineResponse, _a1 error) *MockPipelinesInterface_StopAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_StopAndWait_Call) RunAndReturn(run func(context.Context, pipelines.StopRequest, ...retries.Option[pipelines.GetPipelineResponse]) (*pipelines.GetPipelineResponse, error)) *MockPipelinesInterface_StopAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) Update(ctx context.Context, request pipelines.EditPipeline) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.EditPipeline) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPipelinesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockPipelinesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.EditPipeline -func (_e *MockPipelinesInterface_Expecter) Update(ctx interface{}, request interface{}) *MockPipelinesInterface_Update_Call { - return &MockPipelinesInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockPipelinesInterface_Update_Call) Run(run func(ctx context.Context, request pipelines.EditPipeline)) *MockPipelinesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.EditPipeline)) - }) - return _c -} - -func (_c *MockPipelinesInterface_Update_Call) Return(_a0 error) *MockPipelinesInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPipelinesInterface_Update_Call) RunAndReturn(run func(context.Context, pipelines.EditPipeline) error) *MockPipelinesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockPipelinesInterface) UpdatePermissions(ctx context.Context, request pipelines.PipelinePermissionsRequest) (*pipelines.PipelinePermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *pipelines.PipelinePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, pipelines.PipelinePermissionsRequest) (*pipelines.PipelinePermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, pipelines.PipelinePermissionsRequest) *pipelines.PipelinePermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.PipelinePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, pipelines.PipelinePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockPipelinesInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request pipelines.PipelinePermissionsRequest -func (_e *MockPipelinesInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockPipelinesInterface_UpdatePermissions_Call { - return &MockPipelinesInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockPipelinesInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request pipelines.PipelinePermissionsRequest)) *MockPipelinesInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(pipelines.PipelinePermissionsRequest)) - }) - return _c -} - -func (_c *MockPipelinesInterface_UpdatePermissions_Call) Return(_a0 *pipelines.PipelinePermissions, _a1 error) *MockPipelinesInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, pipelines.PipelinePermissionsRequest) (*pipelines.PipelinePermissions, error)) *MockPipelinesInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetPipelineIdle provides a mock function with given fields: ctx, pipelineId, timeout, callback -func (_m *MockPipelinesInterface) WaitGetPipelineIdle(ctx context.Context, pipelineId string, timeout time.Duration, callback func(*pipelines.GetPipelineResponse)) (*pipelines.GetPipelineResponse, error) { - ret := _m.Called(ctx, pipelineId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetPipelineIdle") - } - - var r0 *pipelines.GetPipelineResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) (*pipelines.GetPipelineResponse, error)); ok { - return rf(ctx, pipelineId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) *pipelines.GetPipelineResponse); ok { - r0 = rf(ctx, pipelineId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetPipelineResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) error); ok { - r1 = rf(ctx, pipelineId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_WaitGetPipelineIdle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetPipelineIdle' -type MockPipelinesInterface_WaitGetPipelineIdle_Call struct { - *mock.Call -} - -// WaitGetPipelineIdle is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -// - timeout time.Duration -// - callback func(*pipelines.GetPipelineResponse) -func (_e *MockPipelinesInterface_Expecter) WaitGetPipelineIdle(ctx interface{}, pipelineId interface{}, timeout interface{}, callback interface{}) *MockPipelinesInterface_WaitGetPipelineIdle_Call { - return &MockPipelinesInterface_WaitGetPipelineIdle_Call{Call: _e.mock.On("WaitGetPipelineIdle", ctx, pipelineId, timeout, callback)} -} - -func (_c *MockPipelinesInterface_WaitGetPipelineIdle_Call) Run(run func(ctx context.Context, pipelineId string, timeout time.Duration, callback func(*pipelines.GetPipelineResponse))) *MockPipelinesInterface_WaitGetPipelineIdle_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*pipelines.GetPipelineResponse))) - }) - return _c -} - -func (_c *MockPipelinesInterface_WaitGetPipelineIdle_Call) Return(_a0 *pipelines.GetPipelineResponse, _a1 error) *MockPipelinesInterface_WaitGetPipelineIdle_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_WaitGetPipelineIdle_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) (*pipelines.GetPipelineResponse, error)) *MockPipelinesInterface_WaitGetPipelineIdle_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetPipelineRunning provides a mock function with given fields: ctx, pipelineId, timeout, callback -func (_m *MockPipelinesInterface) WaitGetPipelineRunning(ctx context.Context, pipelineId string, timeout time.Duration, callback func(*pipelines.GetPipelineResponse)) (*pipelines.GetPipelineResponse, error) { - ret := _m.Called(ctx, pipelineId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetPipelineRunning") - } - - var r0 *pipelines.GetPipelineResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) (*pipelines.GetPipelineResponse, error)); ok { - return rf(ctx, pipelineId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) *pipelines.GetPipelineResponse); ok { - r0 = rf(ctx, pipelineId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*pipelines.GetPipelineResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) error); ok { - r1 = rf(ctx, pipelineId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPipelinesInterface_WaitGetPipelineRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetPipelineRunning' -type MockPipelinesInterface_WaitGetPipelineRunning_Call struct { - *mock.Call -} - -// WaitGetPipelineRunning is a helper method to define mock.On call -// - ctx context.Context -// - pipelineId string -// - timeout time.Duration -// - callback func(*pipelines.GetPipelineResponse) -func (_e *MockPipelinesInterface_Expecter) WaitGetPipelineRunning(ctx interface{}, pipelineId interface{}, timeout interface{}, callback interface{}) *MockPipelinesInterface_WaitGetPipelineRunning_Call { - return &MockPipelinesInterface_WaitGetPipelineRunning_Call{Call: _e.mock.On("WaitGetPipelineRunning", ctx, pipelineId, timeout, callback)} -} - -func (_c *MockPipelinesInterface_WaitGetPipelineRunning_Call) Run(run func(ctx context.Context, pipelineId string, timeout time.Duration, callback func(*pipelines.GetPipelineResponse))) *MockPipelinesInterface_WaitGetPipelineRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*pipelines.GetPipelineResponse))) - }) - return _c -} - -func (_c *MockPipelinesInterface_WaitGetPipelineRunning_Call) Return(_a0 *pipelines.GetPipelineResponse, _a1 error) *MockPipelinesInterface_WaitGetPipelineRunning_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPipelinesInterface_WaitGetPipelineRunning_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*pipelines.GetPipelineResponse)) (*pipelines.GetPipelineResponse, error)) *MockPipelinesInterface_WaitGetPipelineRunning_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPipelinesInterface creates a new instance of MockPipelinesInterface. 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 NewMockPipelinesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPipelinesInterface { - mock := &MockPipelinesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/provisioning/mock_credentials_interface.go b/experimental/mocks/service/provisioning/mock_credentials_interface.go deleted file mode 100644 index d02f18583..000000000 --- a/experimental/mocks/service/provisioning/mock_credentials_interface.go +++ /dev/null @@ -1,483 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package provisioning - -import ( - context "context" - - provisioning "github.com/databricks/databricks-sdk-go/service/provisioning" - mock "github.com/stretchr/testify/mock" -) - -// MockCredentialsInterface is an autogenerated mock type for the CredentialsInterface type -type MockCredentialsInterface struct { - mock.Mock -} - -type MockCredentialsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCredentialsInterface) EXPECT() *MockCredentialsInterface_Expecter { - return &MockCredentialsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) Create(ctx context.Context, request provisioning.CreateCredentialRequest) (*provisioning.Credential, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *provisioning.Credential - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateCredentialRequest) (*provisioning.Credential, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateCredentialRequest) *provisioning.Credential); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Credential) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.CreateCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockCredentialsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.CreateCredentialRequest -func (_e *MockCredentialsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockCredentialsInterface_Create_Call { - return &MockCredentialsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockCredentialsInterface_Create_Call) Run(run func(ctx context.Context, request provisioning.CreateCredentialRequest)) *MockCredentialsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.CreateCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_Create_Call) Return(_a0 *provisioning.Credential, _a1 error) *MockCredentialsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_Create_Call) RunAndReturn(run func(context.Context, provisioning.CreateCredentialRequest) (*provisioning.Credential, error)) *MockCredentialsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CredentialCredentialsNameToCredentialsIdMap provides a mock function with given fields: ctx -func (_m *MockCredentialsInterface) CredentialCredentialsNameToCredentialsIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for CredentialCredentialsNameToCredentialsIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CredentialCredentialsNameToCredentialsIdMap' -type MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call struct { - *mock.Call -} - -// CredentialCredentialsNameToCredentialsIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockCredentialsInterface_Expecter) CredentialCredentialsNameToCredentialsIdMap(ctx interface{}) *MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call { - return &MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call{Call: _e.mock.On("CredentialCredentialsNameToCredentialsIdMap", ctx)} -} - -func (_c *MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call) Run(run func(ctx context.Context)) *MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockCredentialsInterface_CredentialCredentialsNameToCredentialsIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) Delete(ctx context.Context, request provisioning.DeleteCredentialRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.DeleteCredentialRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCredentialsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockCredentialsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.DeleteCredentialRequest -func (_e *MockCredentialsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockCredentialsInterface_Delete_Call { - return &MockCredentialsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockCredentialsInterface_Delete_Call) Run(run func(ctx context.Context, request provisioning.DeleteCredentialRequest)) *MockCredentialsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.DeleteCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_Delete_Call) Return(_a0 error) *MockCredentialsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsInterface_Delete_Call) RunAndReturn(run func(context.Context, provisioning.DeleteCredentialRequest) error) *MockCredentialsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByCredentialsId provides a mock function with given fields: ctx, credentialsId -func (_m *MockCredentialsInterface) DeleteByCredentialsId(ctx context.Context, credentialsId string) error { - ret := _m.Called(ctx, credentialsId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByCredentialsId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, credentialsId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockCredentialsInterface_DeleteByCredentialsId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByCredentialsId' -type MockCredentialsInterface_DeleteByCredentialsId_Call struct { - *mock.Call -} - -// DeleteByCredentialsId is a helper method to define mock.On call -// - ctx context.Context -// - credentialsId string -func (_e *MockCredentialsInterface_Expecter) DeleteByCredentialsId(ctx interface{}, credentialsId interface{}) *MockCredentialsInterface_DeleteByCredentialsId_Call { - return &MockCredentialsInterface_DeleteByCredentialsId_Call{Call: _e.mock.On("DeleteByCredentialsId", ctx, credentialsId)} -} - -func (_c *MockCredentialsInterface_DeleteByCredentialsId_Call) Run(run func(ctx context.Context, credentialsId string)) *MockCredentialsInterface_DeleteByCredentialsId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCredentialsInterface_DeleteByCredentialsId_Call) Return(_a0 error) *MockCredentialsInterface_DeleteByCredentialsId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockCredentialsInterface_DeleteByCredentialsId_Call) RunAndReturn(run func(context.Context, string) error) *MockCredentialsInterface_DeleteByCredentialsId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockCredentialsInterface) Get(ctx context.Context, request provisioning.GetCredentialRequest) (*provisioning.Credential, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *provisioning.Credential - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetCredentialRequest) (*provisioning.Credential, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetCredentialRequest) *provisioning.Credential); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Credential) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.GetCredentialRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockCredentialsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.GetCredentialRequest -func (_e *MockCredentialsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockCredentialsInterface_Get_Call { - return &MockCredentialsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockCredentialsInterface_Get_Call) Run(run func(ctx context.Context, request provisioning.GetCredentialRequest)) *MockCredentialsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.GetCredentialRequest)) - }) - return _c -} - -func (_c *MockCredentialsInterface_Get_Call) Return(_a0 *provisioning.Credential, _a1 error) *MockCredentialsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_Get_Call) RunAndReturn(run func(context.Context, provisioning.GetCredentialRequest) (*provisioning.Credential, error)) *MockCredentialsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByCredentialsId provides a mock function with given fields: ctx, credentialsId -func (_m *MockCredentialsInterface) GetByCredentialsId(ctx context.Context, credentialsId string) (*provisioning.Credential, error) { - ret := _m.Called(ctx, credentialsId) - - if len(ret) == 0 { - panic("no return value specified for GetByCredentialsId") - } - - var r0 *provisioning.Credential - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.Credential, error)); ok { - return rf(ctx, credentialsId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.Credential); ok { - r0 = rf(ctx, credentialsId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Credential) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, credentialsId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_GetByCredentialsId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByCredentialsId' -type MockCredentialsInterface_GetByCredentialsId_Call struct { - *mock.Call -} - -// GetByCredentialsId is a helper method to define mock.On call -// - ctx context.Context -// - credentialsId string -func (_e *MockCredentialsInterface_Expecter) GetByCredentialsId(ctx interface{}, credentialsId interface{}) *MockCredentialsInterface_GetByCredentialsId_Call { - return &MockCredentialsInterface_GetByCredentialsId_Call{Call: _e.mock.On("GetByCredentialsId", ctx, credentialsId)} -} - -func (_c *MockCredentialsInterface_GetByCredentialsId_Call) Run(run func(ctx context.Context, credentialsId string)) *MockCredentialsInterface_GetByCredentialsId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCredentialsInterface_GetByCredentialsId_Call) Return(_a0 *provisioning.Credential, _a1 error) *MockCredentialsInterface_GetByCredentialsId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_GetByCredentialsId_Call) RunAndReturn(run func(context.Context, string) (*provisioning.Credential, error)) *MockCredentialsInterface_GetByCredentialsId_Call { - _c.Call.Return(run) - return _c -} - -// GetByCredentialsName provides a mock function with given fields: ctx, name -func (_m *MockCredentialsInterface) GetByCredentialsName(ctx context.Context, name string) (*provisioning.Credential, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByCredentialsName") - } - - var r0 *provisioning.Credential - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.Credential, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.Credential); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Credential) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_GetByCredentialsName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByCredentialsName' -type MockCredentialsInterface_GetByCredentialsName_Call struct { - *mock.Call -} - -// GetByCredentialsName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockCredentialsInterface_Expecter) GetByCredentialsName(ctx interface{}, name interface{}) *MockCredentialsInterface_GetByCredentialsName_Call { - return &MockCredentialsInterface_GetByCredentialsName_Call{Call: _e.mock.On("GetByCredentialsName", ctx, name)} -} - -func (_c *MockCredentialsInterface_GetByCredentialsName_Call) Run(run func(ctx context.Context, name string)) *MockCredentialsInterface_GetByCredentialsName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockCredentialsInterface_GetByCredentialsName_Call) Return(_a0 *provisioning.Credential, _a1 error) *MockCredentialsInterface_GetByCredentialsName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_GetByCredentialsName_Call) RunAndReturn(run func(context.Context, string) (*provisioning.Credential, error)) *MockCredentialsInterface_GetByCredentialsName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockCredentialsInterface) List(ctx context.Context) ([]provisioning.Credential, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []provisioning.Credential - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]provisioning.Credential, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []provisioning.Credential); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]provisioning.Credential) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockCredentialsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockCredentialsInterface_Expecter) List(ctx interface{}) *MockCredentialsInterface_List_Call { - return &MockCredentialsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockCredentialsInterface_List_Call) Run(run func(ctx context.Context)) *MockCredentialsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockCredentialsInterface_List_Call) Return(_a0 []provisioning.Credential, _a1 error) *MockCredentialsInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsInterface_List_Call) RunAndReturn(run func(context.Context) ([]provisioning.Credential, error)) *MockCredentialsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCredentialsInterface creates a new instance of MockCredentialsInterface. 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 NewMockCredentialsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCredentialsInterface { - mock := &MockCredentialsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/provisioning/mock_encryption_keys_interface.go b/experimental/mocks/service/provisioning/mock_encryption_keys_interface.go deleted file mode 100644 index 78836e9f2..000000000 --- a/experimental/mocks/service/provisioning/mock_encryption_keys_interface.go +++ /dev/null @@ -1,366 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package provisioning - -import ( - context "context" - - provisioning "github.com/databricks/databricks-sdk-go/service/provisioning" - mock "github.com/stretchr/testify/mock" -) - -// MockEncryptionKeysInterface is an autogenerated mock type for the EncryptionKeysInterface type -type MockEncryptionKeysInterface struct { - mock.Mock -} - -type MockEncryptionKeysInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockEncryptionKeysInterface) EXPECT() *MockEncryptionKeysInterface_Expecter { - return &MockEncryptionKeysInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockEncryptionKeysInterface) Create(ctx context.Context, request provisioning.CreateCustomerManagedKeyRequest) (*provisioning.CustomerManagedKey, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *provisioning.CustomerManagedKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateCustomerManagedKeyRequest) (*provisioning.CustomerManagedKey, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateCustomerManagedKeyRequest) *provisioning.CustomerManagedKey); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.CustomerManagedKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.CreateCustomerManagedKeyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEncryptionKeysInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockEncryptionKeysInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.CreateCustomerManagedKeyRequest -func (_e *MockEncryptionKeysInterface_Expecter) Create(ctx interface{}, request interface{}) *MockEncryptionKeysInterface_Create_Call { - return &MockEncryptionKeysInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockEncryptionKeysInterface_Create_Call) Run(run func(ctx context.Context, request provisioning.CreateCustomerManagedKeyRequest)) *MockEncryptionKeysInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.CreateCustomerManagedKeyRequest)) - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_Create_Call) Return(_a0 *provisioning.CustomerManagedKey, _a1 error) *MockEncryptionKeysInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEncryptionKeysInterface_Create_Call) RunAndReturn(run func(context.Context, provisioning.CreateCustomerManagedKeyRequest) (*provisioning.CustomerManagedKey, error)) *MockEncryptionKeysInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockEncryptionKeysInterface) Delete(ctx context.Context, request provisioning.DeleteEncryptionKeyRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.DeleteEncryptionKeyRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockEncryptionKeysInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockEncryptionKeysInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.DeleteEncryptionKeyRequest -func (_e *MockEncryptionKeysInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockEncryptionKeysInterface_Delete_Call { - return &MockEncryptionKeysInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockEncryptionKeysInterface_Delete_Call) Run(run func(ctx context.Context, request provisioning.DeleteEncryptionKeyRequest)) *MockEncryptionKeysInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.DeleteEncryptionKeyRequest)) - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_Delete_Call) Return(_a0 error) *MockEncryptionKeysInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEncryptionKeysInterface_Delete_Call) RunAndReturn(run func(context.Context, provisioning.DeleteEncryptionKeyRequest) error) *MockEncryptionKeysInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByCustomerManagedKeyId provides a mock function with given fields: ctx, customerManagedKeyId -func (_m *MockEncryptionKeysInterface) DeleteByCustomerManagedKeyId(ctx context.Context, customerManagedKeyId string) error { - ret := _m.Called(ctx, customerManagedKeyId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByCustomerManagedKeyId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, customerManagedKeyId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByCustomerManagedKeyId' -type MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call struct { - *mock.Call -} - -// DeleteByCustomerManagedKeyId is a helper method to define mock.On call -// - ctx context.Context -// - customerManagedKeyId string -func (_e *MockEncryptionKeysInterface_Expecter) DeleteByCustomerManagedKeyId(ctx interface{}, customerManagedKeyId interface{}) *MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call { - return &MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call{Call: _e.mock.On("DeleteByCustomerManagedKeyId", ctx, customerManagedKeyId)} -} - -func (_c *MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call) Run(run func(ctx context.Context, customerManagedKeyId string)) *MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call) Return(_a0 error) *MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call) RunAndReturn(run func(context.Context, string) error) *MockEncryptionKeysInterface_DeleteByCustomerManagedKeyId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockEncryptionKeysInterface) Get(ctx context.Context, request provisioning.GetEncryptionKeyRequest) (*provisioning.CustomerManagedKey, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *provisioning.CustomerManagedKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetEncryptionKeyRequest) (*provisioning.CustomerManagedKey, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetEncryptionKeyRequest) *provisioning.CustomerManagedKey); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.CustomerManagedKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.GetEncryptionKeyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEncryptionKeysInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockEncryptionKeysInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.GetEncryptionKeyRequest -func (_e *MockEncryptionKeysInterface_Expecter) Get(ctx interface{}, request interface{}) *MockEncryptionKeysInterface_Get_Call { - return &MockEncryptionKeysInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockEncryptionKeysInterface_Get_Call) Run(run func(ctx context.Context, request provisioning.GetEncryptionKeyRequest)) *MockEncryptionKeysInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.GetEncryptionKeyRequest)) - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_Get_Call) Return(_a0 *provisioning.CustomerManagedKey, _a1 error) *MockEncryptionKeysInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEncryptionKeysInterface_Get_Call) RunAndReturn(run func(context.Context, provisioning.GetEncryptionKeyRequest) (*provisioning.CustomerManagedKey, error)) *MockEncryptionKeysInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByCustomerManagedKeyId provides a mock function with given fields: ctx, customerManagedKeyId -func (_m *MockEncryptionKeysInterface) GetByCustomerManagedKeyId(ctx context.Context, customerManagedKeyId string) (*provisioning.CustomerManagedKey, error) { - ret := _m.Called(ctx, customerManagedKeyId) - - if len(ret) == 0 { - panic("no return value specified for GetByCustomerManagedKeyId") - } - - var r0 *provisioning.CustomerManagedKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.CustomerManagedKey, error)); ok { - return rf(ctx, customerManagedKeyId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.CustomerManagedKey); ok { - r0 = rf(ctx, customerManagedKeyId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.CustomerManagedKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, customerManagedKeyId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByCustomerManagedKeyId' -type MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call struct { - *mock.Call -} - -// GetByCustomerManagedKeyId is a helper method to define mock.On call -// - ctx context.Context -// - customerManagedKeyId string -func (_e *MockEncryptionKeysInterface_Expecter) GetByCustomerManagedKeyId(ctx interface{}, customerManagedKeyId interface{}) *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call { - return &MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call{Call: _e.mock.On("GetByCustomerManagedKeyId", ctx, customerManagedKeyId)} -} - -func (_c *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call) Run(run func(ctx context.Context, customerManagedKeyId string)) *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call) Return(_a0 *provisioning.CustomerManagedKey, _a1 error) *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call) RunAndReturn(run func(context.Context, string) (*provisioning.CustomerManagedKey, error)) *MockEncryptionKeysInterface_GetByCustomerManagedKeyId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockEncryptionKeysInterface) List(ctx context.Context) ([]provisioning.CustomerManagedKey, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []provisioning.CustomerManagedKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]provisioning.CustomerManagedKey, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []provisioning.CustomerManagedKey); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]provisioning.CustomerManagedKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEncryptionKeysInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockEncryptionKeysInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockEncryptionKeysInterface_Expecter) List(ctx interface{}) *MockEncryptionKeysInterface_List_Call { - return &MockEncryptionKeysInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockEncryptionKeysInterface_List_Call) Run(run func(ctx context.Context)) *MockEncryptionKeysInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockEncryptionKeysInterface_List_Call) Return(_a0 []provisioning.CustomerManagedKey, _a1 error) *MockEncryptionKeysInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEncryptionKeysInterface_List_Call) RunAndReturn(run func(context.Context) ([]provisioning.CustomerManagedKey, error)) *MockEncryptionKeysInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// NewMockEncryptionKeysInterface creates a new instance of MockEncryptionKeysInterface. 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 NewMockEncryptionKeysInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockEncryptionKeysInterface { - mock := &MockEncryptionKeysInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/provisioning/mock_networks_interface.go b/experimental/mocks/service/provisioning/mock_networks_interface.go deleted file mode 100644 index 489e9f4f1..000000000 --- a/experimental/mocks/service/provisioning/mock_networks_interface.go +++ /dev/null @@ -1,483 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package provisioning - -import ( - context "context" - - provisioning "github.com/databricks/databricks-sdk-go/service/provisioning" - mock "github.com/stretchr/testify/mock" -) - -// MockNetworksInterface is an autogenerated mock type for the NetworksInterface type -type MockNetworksInterface struct { - mock.Mock -} - -type MockNetworksInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNetworksInterface) EXPECT() *MockNetworksInterface_Expecter { - return &MockNetworksInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockNetworksInterface) Create(ctx context.Context, request provisioning.CreateNetworkRequest) (*provisioning.Network, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *provisioning.Network - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateNetworkRequest) (*provisioning.Network, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateNetworkRequest) *provisioning.Network); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Network) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.CreateNetworkRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworksInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockNetworksInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.CreateNetworkRequest -func (_e *MockNetworksInterface_Expecter) Create(ctx interface{}, request interface{}) *MockNetworksInterface_Create_Call { - return &MockNetworksInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockNetworksInterface_Create_Call) Run(run func(ctx context.Context, request provisioning.CreateNetworkRequest)) *MockNetworksInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.CreateNetworkRequest)) - }) - return _c -} - -func (_c *MockNetworksInterface_Create_Call) Return(_a0 *provisioning.Network, _a1 error) *MockNetworksInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworksInterface_Create_Call) RunAndReturn(run func(context.Context, provisioning.CreateNetworkRequest) (*provisioning.Network, error)) *MockNetworksInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockNetworksInterface) Delete(ctx context.Context, request provisioning.DeleteNetworkRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.DeleteNetworkRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNetworksInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockNetworksInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.DeleteNetworkRequest -func (_e *MockNetworksInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockNetworksInterface_Delete_Call { - return &MockNetworksInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockNetworksInterface_Delete_Call) Run(run func(ctx context.Context, request provisioning.DeleteNetworkRequest)) *MockNetworksInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.DeleteNetworkRequest)) - }) - return _c -} - -func (_c *MockNetworksInterface_Delete_Call) Return(_a0 error) *MockNetworksInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworksInterface_Delete_Call) RunAndReturn(run func(context.Context, provisioning.DeleteNetworkRequest) error) *MockNetworksInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByNetworkId provides a mock function with given fields: ctx, networkId -func (_m *MockNetworksInterface) DeleteByNetworkId(ctx context.Context, networkId string) error { - ret := _m.Called(ctx, networkId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByNetworkId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, networkId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNetworksInterface_DeleteByNetworkId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByNetworkId' -type MockNetworksInterface_DeleteByNetworkId_Call struct { - *mock.Call -} - -// DeleteByNetworkId is a helper method to define mock.On call -// - ctx context.Context -// - networkId string -func (_e *MockNetworksInterface_Expecter) DeleteByNetworkId(ctx interface{}, networkId interface{}) *MockNetworksInterface_DeleteByNetworkId_Call { - return &MockNetworksInterface_DeleteByNetworkId_Call{Call: _e.mock.On("DeleteByNetworkId", ctx, networkId)} -} - -func (_c *MockNetworksInterface_DeleteByNetworkId_Call) Run(run func(ctx context.Context, networkId string)) *MockNetworksInterface_DeleteByNetworkId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNetworksInterface_DeleteByNetworkId_Call) Return(_a0 error) *MockNetworksInterface_DeleteByNetworkId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworksInterface_DeleteByNetworkId_Call) RunAndReturn(run func(context.Context, string) error) *MockNetworksInterface_DeleteByNetworkId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockNetworksInterface) Get(ctx context.Context, request provisioning.GetNetworkRequest) (*provisioning.Network, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *provisioning.Network - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetNetworkRequest) (*provisioning.Network, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetNetworkRequest) *provisioning.Network); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Network) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.GetNetworkRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworksInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockNetworksInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.GetNetworkRequest -func (_e *MockNetworksInterface_Expecter) Get(ctx interface{}, request interface{}) *MockNetworksInterface_Get_Call { - return &MockNetworksInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockNetworksInterface_Get_Call) Run(run func(ctx context.Context, request provisioning.GetNetworkRequest)) *MockNetworksInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.GetNetworkRequest)) - }) - return _c -} - -func (_c *MockNetworksInterface_Get_Call) Return(_a0 *provisioning.Network, _a1 error) *MockNetworksInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworksInterface_Get_Call) RunAndReturn(run func(context.Context, provisioning.GetNetworkRequest) (*provisioning.Network, error)) *MockNetworksInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByNetworkId provides a mock function with given fields: ctx, networkId -func (_m *MockNetworksInterface) GetByNetworkId(ctx context.Context, networkId string) (*provisioning.Network, error) { - ret := _m.Called(ctx, networkId) - - if len(ret) == 0 { - panic("no return value specified for GetByNetworkId") - } - - var r0 *provisioning.Network - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.Network, error)); ok { - return rf(ctx, networkId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.Network); ok { - r0 = rf(ctx, networkId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Network) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, networkId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworksInterface_GetByNetworkId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByNetworkId' -type MockNetworksInterface_GetByNetworkId_Call struct { - *mock.Call -} - -// GetByNetworkId is a helper method to define mock.On call -// - ctx context.Context -// - networkId string -func (_e *MockNetworksInterface_Expecter) GetByNetworkId(ctx interface{}, networkId interface{}) *MockNetworksInterface_GetByNetworkId_Call { - return &MockNetworksInterface_GetByNetworkId_Call{Call: _e.mock.On("GetByNetworkId", ctx, networkId)} -} - -func (_c *MockNetworksInterface_GetByNetworkId_Call) Run(run func(ctx context.Context, networkId string)) *MockNetworksInterface_GetByNetworkId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNetworksInterface_GetByNetworkId_Call) Return(_a0 *provisioning.Network, _a1 error) *MockNetworksInterface_GetByNetworkId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworksInterface_GetByNetworkId_Call) RunAndReturn(run func(context.Context, string) (*provisioning.Network, error)) *MockNetworksInterface_GetByNetworkId_Call { - _c.Call.Return(run) - return _c -} - -// GetByNetworkName provides a mock function with given fields: ctx, name -func (_m *MockNetworksInterface) GetByNetworkName(ctx context.Context, name string) (*provisioning.Network, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByNetworkName") - } - - var r0 *provisioning.Network - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.Network, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.Network); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Network) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworksInterface_GetByNetworkName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByNetworkName' -type MockNetworksInterface_GetByNetworkName_Call struct { - *mock.Call -} - -// GetByNetworkName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockNetworksInterface_Expecter) GetByNetworkName(ctx interface{}, name interface{}) *MockNetworksInterface_GetByNetworkName_Call { - return &MockNetworksInterface_GetByNetworkName_Call{Call: _e.mock.On("GetByNetworkName", ctx, name)} -} - -func (_c *MockNetworksInterface_GetByNetworkName_Call) Run(run func(ctx context.Context, name string)) *MockNetworksInterface_GetByNetworkName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNetworksInterface_GetByNetworkName_Call) Return(_a0 *provisioning.Network, _a1 error) *MockNetworksInterface_GetByNetworkName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworksInterface_GetByNetworkName_Call) RunAndReturn(run func(context.Context, string) (*provisioning.Network, error)) *MockNetworksInterface_GetByNetworkName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockNetworksInterface) List(ctx context.Context) ([]provisioning.Network, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []provisioning.Network - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]provisioning.Network, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []provisioning.Network); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]provisioning.Network) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworksInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockNetworksInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockNetworksInterface_Expecter) List(ctx interface{}) *MockNetworksInterface_List_Call { - return &MockNetworksInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockNetworksInterface_List_Call) Run(run func(ctx context.Context)) *MockNetworksInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockNetworksInterface_List_Call) Return(_a0 []provisioning.Network, _a1 error) *MockNetworksInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworksInterface_List_Call) RunAndReturn(run func(context.Context) ([]provisioning.Network, error)) *MockNetworksInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// NetworkNetworkNameToNetworkIdMap provides a mock function with given fields: ctx -func (_m *MockNetworksInterface) NetworkNetworkNameToNetworkIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for NetworkNetworkNameToNetworkIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NetworkNetworkNameToNetworkIdMap' -type MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call struct { - *mock.Call -} - -// NetworkNetworkNameToNetworkIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockNetworksInterface_Expecter) NetworkNetworkNameToNetworkIdMap(ctx interface{}) *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call { - return &MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call{Call: _e.mock.On("NetworkNetworkNameToNetworkIdMap", ctx)} -} - -func (_c *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call) Run(run func(ctx context.Context)) *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockNetworksInterface_NetworkNetworkNameToNetworkIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNetworksInterface creates a new instance of MockNetworksInterface. 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 NewMockNetworksInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNetworksInterface { - mock := &MockNetworksInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/provisioning/mock_private_access_interface.go b/experimental/mocks/service/provisioning/mock_private_access_interface.go deleted file mode 100644 index f078209c0..000000000 --- a/experimental/mocks/service/provisioning/mock_private_access_interface.go +++ /dev/null @@ -1,530 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package provisioning - -import ( - context "context" - - provisioning "github.com/databricks/databricks-sdk-go/service/provisioning" - mock "github.com/stretchr/testify/mock" -) - -// MockPrivateAccessInterface is an autogenerated mock type for the PrivateAccessInterface type -type MockPrivateAccessInterface struct { - mock.Mock -} - -type MockPrivateAccessInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPrivateAccessInterface) EXPECT() *MockPrivateAccessInterface_Expecter { - return &MockPrivateAccessInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockPrivateAccessInterface) Create(ctx context.Context, request provisioning.UpsertPrivateAccessSettingsRequest) (*provisioning.PrivateAccessSettings, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *provisioning.PrivateAccessSettings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.UpsertPrivateAccessSettingsRequest) (*provisioning.PrivateAccessSettings, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.UpsertPrivateAccessSettingsRequest) *provisioning.PrivateAccessSettings); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.PrivateAccessSettings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.UpsertPrivateAccessSettingsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPrivateAccessInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockPrivateAccessInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.UpsertPrivateAccessSettingsRequest -func (_e *MockPrivateAccessInterface_Expecter) Create(ctx interface{}, request interface{}) *MockPrivateAccessInterface_Create_Call { - return &MockPrivateAccessInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockPrivateAccessInterface_Create_Call) Run(run func(ctx context.Context, request provisioning.UpsertPrivateAccessSettingsRequest)) *MockPrivateAccessInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.UpsertPrivateAccessSettingsRequest)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_Create_Call) Return(_a0 *provisioning.PrivateAccessSettings, _a1 error) *MockPrivateAccessInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPrivateAccessInterface_Create_Call) RunAndReturn(run func(context.Context, provisioning.UpsertPrivateAccessSettingsRequest) (*provisioning.PrivateAccessSettings, error)) *MockPrivateAccessInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockPrivateAccessInterface) Delete(ctx context.Context, request provisioning.DeletePrivateAccesRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.DeletePrivateAccesRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPrivateAccessInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockPrivateAccessInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.DeletePrivateAccesRequest -func (_e *MockPrivateAccessInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockPrivateAccessInterface_Delete_Call { - return &MockPrivateAccessInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockPrivateAccessInterface_Delete_Call) Run(run func(ctx context.Context, request provisioning.DeletePrivateAccesRequest)) *MockPrivateAccessInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.DeletePrivateAccesRequest)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_Delete_Call) Return(_a0 error) *MockPrivateAccessInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPrivateAccessInterface_Delete_Call) RunAndReturn(run func(context.Context, provisioning.DeletePrivateAccesRequest) error) *MockPrivateAccessInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByPrivateAccessSettingsId provides a mock function with given fields: ctx, privateAccessSettingsId -func (_m *MockPrivateAccessInterface) DeleteByPrivateAccessSettingsId(ctx context.Context, privateAccessSettingsId string) error { - ret := _m.Called(ctx, privateAccessSettingsId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByPrivateAccessSettingsId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, privateAccessSettingsId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByPrivateAccessSettingsId' -type MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call struct { - *mock.Call -} - -// DeleteByPrivateAccessSettingsId is a helper method to define mock.On call -// - ctx context.Context -// - privateAccessSettingsId string -func (_e *MockPrivateAccessInterface_Expecter) DeleteByPrivateAccessSettingsId(ctx interface{}, privateAccessSettingsId interface{}) *MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call { - return &MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call{Call: _e.mock.On("DeleteByPrivateAccessSettingsId", ctx, privateAccessSettingsId)} -} - -func (_c *MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call) Run(run func(ctx context.Context, privateAccessSettingsId string)) *MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call) Return(_a0 error) *MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call) RunAndReturn(run func(context.Context, string) error) *MockPrivateAccessInterface_DeleteByPrivateAccessSettingsId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockPrivateAccessInterface) Get(ctx context.Context, request provisioning.GetPrivateAccesRequest) (*provisioning.PrivateAccessSettings, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *provisioning.PrivateAccessSettings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetPrivateAccesRequest) (*provisioning.PrivateAccessSettings, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetPrivateAccesRequest) *provisioning.PrivateAccessSettings); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.PrivateAccessSettings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.GetPrivateAccesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPrivateAccessInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPrivateAccessInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.GetPrivateAccesRequest -func (_e *MockPrivateAccessInterface_Expecter) Get(ctx interface{}, request interface{}) *MockPrivateAccessInterface_Get_Call { - return &MockPrivateAccessInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockPrivateAccessInterface_Get_Call) Run(run func(ctx context.Context, request provisioning.GetPrivateAccesRequest)) *MockPrivateAccessInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.GetPrivateAccesRequest)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_Get_Call) Return(_a0 *provisioning.PrivateAccessSettings, _a1 error) *MockPrivateAccessInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPrivateAccessInterface_Get_Call) RunAndReturn(run func(context.Context, provisioning.GetPrivateAccesRequest) (*provisioning.PrivateAccessSettings, error)) *MockPrivateAccessInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByPrivateAccessSettingsId provides a mock function with given fields: ctx, privateAccessSettingsId -func (_m *MockPrivateAccessInterface) GetByPrivateAccessSettingsId(ctx context.Context, privateAccessSettingsId string) (*provisioning.PrivateAccessSettings, error) { - ret := _m.Called(ctx, privateAccessSettingsId) - - if len(ret) == 0 { - panic("no return value specified for GetByPrivateAccessSettingsId") - } - - var r0 *provisioning.PrivateAccessSettings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.PrivateAccessSettings, error)); ok { - return rf(ctx, privateAccessSettingsId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.PrivateAccessSettings); ok { - r0 = rf(ctx, privateAccessSettingsId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.PrivateAccessSettings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, privateAccessSettingsId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPrivateAccessSettingsId' -type MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call struct { - *mock.Call -} - -// GetByPrivateAccessSettingsId is a helper method to define mock.On call -// - ctx context.Context -// - privateAccessSettingsId string -func (_e *MockPrivateAccessInterface_Expecter) GetByPrivateAccessSettingsId(ctx interface{}, privateAccessSettingsId interface{}) *MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call { - return &MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call{Call: _e.mock.On("GetByPrivateAccessSettingsId", ctx, privateAccessSettingsId)} -} - -func (_c *MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call) Run(run func(ctx context.Context, privateAccessSettingsId string)) *MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call) Return(_a0 *provisioning.PrivateAccessSettings, _a1 error) *MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call) RunAndReturn(run func(context.Context, string) (*provisioning.PrivateAccessSettings, error)) *MockPrivateAccessInterface_GetByPrivateAccessSettingsId_Call { - _c.Call.Return(run) - return _c -} - -// GetByPrivateAccessSettingsName provides a mock function with given fields: ctx, name -func (_m *MockPrivateAccessInterface) GetByPrivateAccessSettingsName(ctx context.Context, name string) (*provisioning.PrivateAccessSettings, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByPrivateAccessSettingsName") - } - - var r0 *provisioning.PrivateAccessSettings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.PrivateAccessSettings, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.PrivateAccessSettings); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.PrivateAccessSettings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPrivateAccessSettingsName' -type MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call struct { - *mock.Call -} - -// GetByPrivateAccessSettingsName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockPrivateAccessInterface_Expecter) GetByPrivateAccessSettingsName(ctx interface{}, name interface{}) *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call { - return &MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call{Call: _e.mock.On("GetByPrivateAccessSettingsName", ctx, name)} -} - -func (_c *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call) Run(run func(ctx context.Context, name string)) *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call) Return(_a0 *provisioning.PrivateAccessSettings, _a1 error) *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call) RunAndReturn(run func(context.Context, string) (*provisioning.PrivateAccessSettings, error)) *MockPrivateAccessInterface_GetByPrivateAccessSettingsName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockPrivateAccessInterface) List(ctx context.Context) ([]provisioning.PrivateAccessSettings, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []provisioning.PrivateAccessSettings - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]provisioning.PrivateAccessSettings, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []provisioning.PrivateAccessSettings); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]provisioning.PrivateAccessSettings) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPrivateAccessInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockPrivateAccessInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockPrivateAccessInterface_Expecter) List(ctx interface{}) *MockPrivateAccessInterface_List_Call { - return &MockPrivateAccessInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockPrivateAccessInterface_List_Call) Run(run func(ctx context.Context)) *MockPrivateAccessInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_List_Call) Return(_a0 []provisioning.PrivateAccessSettings, _a1 error) *MockPrivateAccessInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPrivateAccessInterface_List_Call) RunAndReturn(run func(context.Context) ([]provisioning.PrivateAccessSettings, error)) *MockPrivateAccessInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap provides a mock function with given fields: ctx -func (_m *MockPrivateAccessInterface) PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap' -type MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call struct { - *mock.Call -} - -// PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockPrivateAccessInterface_Expecter) PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap(ctx interface{}) *MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call { - return &MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call{Call: _e.mock.On("PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap", ctx)} -} - -func (_c *MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call) Run(run func(ctx context.Context)) *MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockPrivateAccessInterface_PrivateAccessSettingsPrivateAccessSettingsNameToPrivateAccessSettingsIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Replace provides a mock function with given fields: ctx, request -func (_m *MockPrivateAccessInterface) Replace(ctx context.Context, request provisioning.UpsertPrivateAccessSettingsRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Replace") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.UpsertPrivateAccessSettingsRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockPrivateAccessInterface_Replace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Replace' -type MockPrivateAccessInterface_Replace_Call struct { - *mock.Call -} - -// Replace is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.UpsertPrivateAccessSettingsRequest -func (_e *MockPrivateAccessInterface_Expecter) Replace(ctx interface{}, request interface{}) *MockPrivateAccessInterface_Replace_Call { - return &MockPrivateAccessInterface_Replace_Call{Call: _e.mock.On("Replace", ctx, request)} -} - -func (_c *MockPrivateAccessInterface_Replace_Call) Run(run func(ctx context.Context, request provisioning.UpsertPrivateAccessSettingsRequest)) *MockPrivateAccessInterface_Replace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.UpsertPrivateAccessSettingsRequest)) - }) - return _c -} - -func (_c *MockPrivateAccessInterface_Replace_Call) Return(_a0 error) *MockPrivateAccessInterface_Replace_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockPrivateAccessInterface_Replace_Call) RunAndReturn(run func(context.Context, provisioning.UpsertPrivateAccessSettingsRequest) error) *MockPrivateAccessInterface_Replace_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPrivateAccessInterface creates a new instance of MockPrivateAccessInterface. 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 NewMockPrivateAccessInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPrivateAccessInterface { - mock := &MockPrivateAccessInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/provisioning/mock_storage_interface.go b/experimental/mocks/service/provisioning/mock_storage_interface.go deleted file mode 100644 index 007d2cbae..000000000 --- a/experimental/mocks/service/provisioning/mock_storage_interface.go +++ /dev/null @@ -1,483 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package provisioning - -import ( - context "context" - - provisioning "github.com/databricks/databricks-sdk-go/service/provisioning" - mock "github.com/stretchr/testify/mock" -) - -// MockStorageInterface is an autogenerated mock type for the StorageInterface type -type MockStorageInterface struct { - mock.Mock -} - -type MockStorageInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockStorageInterface) EXPECT() *MockStorageInterface_Expecter { - return &MockStorageInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockStorageInterface) Create(ctx context.Context, request provisioning.CreateStorageConfigurationRequest) (*provisioning.StorageConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *provisioning.StorageConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateStorageConfigurationRequest) (*provisioning.StorageConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateStorageConfigurationRequest) *provisioning.StorageConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.StorageConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.CreateStorageConfigurationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockStorageInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.CreateStorageConfigurationRequest -func (_e *MockStorageInterface_Expecter) Create(ctx interface{}, request interface{}) *MockStorageInterface_Create_Call { - return &MockStorageInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockStorageInterface_Create_Call) Run(run func(ctx context.Context, request provisioning.CreateStorageConfigurationRequest)) *MockStorageInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.CreateStorageConfigurationRequest)) - }) - return _c -} - -func (_c *MockStorageInterface_Create_Call) Return(_a0 *provisioning.StorageConfiguration, _a1 error) *MockStorageInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageInterface_Create_Call) RunAndReturn(run func(context.Context, provisioning.CreateStorageConfigurationRequest) (*provisioning.StorageConfiguration, error)) *MockStorageInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockStorageInterface) Delete(ctx context.Context, request provisioning.DeleteStorageRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.DeleteStorageRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStorageInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockStorageInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.DeleteStorageRequest -func (_e *MockStorageInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockStorageInterface_Delete_Call { - return &MockStorageInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockStorageInterface_Delete_Call) Run(run func(ctx context.Context, request provisioning.DeleteStorageRequest)) *MockStorageInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.DeleteStorageRequest)) - }) - return _c -} - -func (_c *MockStorageInterface_Delete_Call) Return(_a0 error) *MockStorageInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageInterface_Delete_Call) RunAndReturn(run func(context.Context, provisioning.DeleteStorageRequest) error) *MockStorageInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByStorageConfigurationId provides a mock function with given fields: ctx, storageConfigurationId -func (_m *MockStorageInterface) DeleteByStorageConfigurationId(ctx context.Context, storageConfigurationId string) error { - ret := _m.Called(ctx, storageConfigurationId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByStorageConfigurationId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, storageConfigurationId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStorageInterface_DeleteByStorageConfigurationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByStorageConfigurationId' -type MockStorageInterface_DeleteByStorageConfigurationId_Call struct { - *mock.Call -} - -// DeleteByStorageConfigurationId is a helper method to define mock.On call -// - ctx context.Context -// - storageConfigurationId string -func (_e *MockStorageInterface_Expecter) DeleteByStorageConfigurationId(ctx interface{}, storageConfigurationId interface{}) *MockStorageInterface_DeleteByStorageConfigurationId_Call { - return &MockStorageInterface_DeleteByStorageConfigurationId_Call{Call: _e.mock.On("DeleteByStorageConfigurationId", ctx, storageConfigurationId)} -} - -func (_c *MockStorageInterface_DeleteByStorageConfigurationId_Call) Run(run func(ctx context.Context, storageConfigurationId string)) *MockStorageInterface_DeleteByStorageConfigurationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockStorageInterface_DeleteByStorageConfigurationId_Call) Return(_a0 error) *MockStorageInterface_DeleteByStorageConfigurationId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStorageInterface_DeleteByStorageConfigurationId_Call) RunAndReturn(run func(context.Context, string) error) *MockStorageInterface_DeleteByStorageConfigurationId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockStorageInterface) Get(ctx context.Context, request provisioning.GetStorageRequest) (*provisioning.StorageConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *provisioning.StorageConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetStorageRequest) (*provisioning.StorageConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetStorageRequest) *provisioning.StorageConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.StorageConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.GetStorageRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockStorageInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.GetStorageRequest -func (_e *MockStorageInterface_Expecter) Get(ctx interface{}, request interface{}) *MockStorageInterface_Get_Call { - return &MockStorageInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockStorageInterface_Get_Call) Run(run func(ctx context.Context, request provisioning.GetStorageRequest)) *MockStorageInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.GetStorageRequest)) - }) - return _c -} - -func (_c *MockStorageInterface_Get_Call) Return(_a0 *provisioning.StorageConfiguration, _a1 error) *MockStorageInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageInterface_Get_Call) RunAndReturn(run func(context.Context, provisioning.GetStorageRequest) (*provisioning.StorageConfiguration, error)) *MockStorageInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByStorageConfigurationId provides a mock function with given fields: ctx, storageConfigurationId -func (_m *MockStorageInterface) GetByStorageConfigurationId(ctx context.Context, storageConfigurationId string) (*provisioning.StorageConfiguration, error) { - ret := _m.Called(ctx, storageConfigurationId) - - if len(ret) == 0 { - panic("no return value specified for GetByStorageConfigurationId") - } - - var r0 *provisioning.StorageConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.StorageConfiguration, error)); ok { - return rf(ctx, storageConfigurationId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.StorageConfiguration); ok { - r0 = rf(ctx, storageConfigurationId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.StorageConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, storageConfigurationId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageInterface_GetByStorageConfigurationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByStorageConfigurationId' -type MockStorageInterface_GetByStorageConfigurationId_Call struct { - *mock.Call -} - -// GetByStorageConfigurationId is a helper method to define mock.On call -// - ctx context.Context -// - storageConfigurationId string -func (_e *MockStorageInterface_Expecter) GetByStorageConfigurationId(ctx interface{}, storageConfigurationId interface{}) *MockStorageInterface_GetByStorageConfigurationId_Call { - return &MockStorageInterface_GetByStorageConfigurationId_Call{Call: _e.mock.On("GetByStorageConfigurationId", ctx, storageConfigurationId)} -} - -func (_c *MockStorageInterface_GetByStorageConfigurationId_Call) Run(run func(ctx context.Context, storageConfigurationId string)) *MockStorageInterface_GetByStorageConfigurationId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockStorageInterface_GetByStorageConfigurationId_Call) Return(_a0 *provisioning.StorageConfiguration, _a1 error) *MockStorageInterface_GetByStorageConfigurationId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageInterface_GetByStorageConfigurationId_Call) RunAndReturn(run func(context.Context, string) (*provisioning.StorageConfiguration, error)) *MockStorageInterface_GetByStorageConfigurationId_Call { - _c.Call.Return(run) - return _c -} - -// GetByStorageConfigurationName provides a mock function with given fields: ctx, name -func (_m *MockStorageInterface) GetByStorageConfigurationName(ctx context.Context, name string) (*provisioning.StorageConfiguration, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByStorageConfigurationName") - } - - var r0 *provisioning.StorageConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.StorageConfiguration, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.StorageConfiguration); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.StorageConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageInterface_GetByStorageConfigurationName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByStorageConfigurationName' -type MockStorageInterface_GetByStorageConfigurationName_Call struct { - *mock.Call -} - -// GetByStorageConfigurationName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockStorageInterface_Expecter) GetByStorageConfigurationName(ctx interface{}, name interface{}) *MockStorageInterface_GetByStorageConfigurationName_Call { - return &MockStorageInterface_GetByStorageConfigurationName_Call{Call: _e.mock.On("GetByStorageConfigurationName", ctx, name)} -} - -func (_c *MockStorageInterface_GetByStorageConfigurationName_Call) Run(run func(ctx context.Context, name string)) *MockStorageInterface_GetByStorageConfigurationName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockStorageInterface_GetByStorageConfigurationName_Call) Return(_a0 *provisioning.StorageConfiguration, _a1 error) *MockStorageInterface_GetByStorageConfigurationName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageInterface_GetByStorageConfigurationName_Call) RunAndReturn(run func(context.Context, string) (*provisioning.StorageConfiguration, error)) *MockStorageInterface_GetByStorageConfigurationName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockStorageInterface) List(ctx context.Context) ([]provisioning.StorageConfiguration, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []provisioning.StorageConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]provisioning.StorageConfiguration, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []provisioning.StorageConfiguration); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]provisioning.StorageConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockStorageInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockStorageInterface_Expecter) List(ctx interface{}) *MockStorageInterface_List_Call { - return &MockStorageInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockStorageInterface_List_Call) Run(run func(ctx context.Context)) *MockStorageInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockStorageInterface_List_Call) Return(_a0 []provisioning.StorageConfiguration, _a1 error) *MockStorageInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageInterface_List_Call) RunAndReturn(run func(context.Context) ([]provisioning.StorageConfiguration, error)) *MockStorageInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap provides a mock function with given fields: ctx -func (_m *MockStorageInterface) StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap' -type MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call struct { - *mock.Call -} - -// StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockStorageInterface_Expecter) StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap(ctx interface{}) *MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call { - return &MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call{Call: _e.mock.On("StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap", ctx)} -} - -func (_c *MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call) Run(run func(ctx context.Context)) *MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockStorageInterface_StorageConfigurationStorageConfigurationNameToStorageConfigurationIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockStorageInterface creates a new instance of MockStorageInterface. 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 NewMockStorageInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockStorageInterface { - mock := &MockStorageInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go b/experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go deleted file mode 100644 index 61426495b..000000000 --- a/experimental/mocks/service/provisioning/mock_vpc_endpoints_interface.go +++ /dev/null @@ -1,483 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package provisioning - -import ( - context "context" - - provisioning "github.com/databricks/databricks-sdk-go/service/provisioning" - mock "github.com/stretchr/testify/mock" -) - -// MockVpcEndpointsInterface is an autogenerated mock type for the VpcEndpointsInterface type -type MockVpcEndpointsInterface struct { - mock.Mock -} - -type MockVpcEndpointsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockVpcEndpointsInterface) EXPECT() *MockVpcEndpointsInterface_Expecter { - return &MockVpcEndpointsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockVpcEndpointsInterface) Create(ctx context.Context, request provisioning.CreateVpcEndpointRequest) (*provisioning.VpcEndpoint, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *provisioning.VpcEndpoint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateVpcEndpointRequest) (*provisioning.VpcEndpoint, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateVpcEndpointRequest) *provisioning.VpcEndpoint); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.VpcEndpoint) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.CreateVpcEndpointRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVpcEndpointsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockVpcEndpointsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.CreateVpcEndpointRequest -func (_e *MockVpcEndpointsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockVpcEndpointsInterface_Create_Call { - return &MockVpcEndpointsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockVpcEndpointsInterface_Create_Call) Run(run func(ctx context.Context, request provisioning.CreateVpcEndpointRequest)) *MockVpcEndpointsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.CreateVpcEndpointRequest)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_Create_Call) Return(_a0 *provisioning.VpcEndpoint, _a1 error) *MockVpcEndpointsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVpcEndpointsInterface_Create_Call) RunAndReturn(run func(context.Context, provisioning.CreateVpcEndpointRequest) (*provisioning.VpcEndpoint, error)) *MockVpcEndpointsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockVpcEndpointsInterface) Delete(ctx context.Context, request provisioning.DeleteVpcEndpointRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.DeleteVpcEndpointRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVpcEndpointsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockVpcEndpointsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.DeleteVpcEndpointRequest -func (_e *MockVpcEndpointsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockVpcEndpointsInterface_Delete_Call { - return &MockVpcEndpointsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockVpcEndpointsInterface_Delete_Call) Run(run func(ctx context.Context, request provisioning.DeleteVpcEndpointRequest)) *MockVpcEndpointsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.DeleteVpcEndpointRequest)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_Delete_Call) Return(_a0 error) *MockVpcEndpointsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVpcEndpointsInterface_Delete_Call) RunAndReturn(run func(context.Context, provisioning.DeleteVpcEndpointRequest) error) *MockVpcEndpointsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByVpcEndpointId provides a mock function with given fields: ctx, vpcEndpointId -func (_m *MockVpcEndpointsInterface) DeleteByVpcEndpointId(ctx context.Context, vpcEndpointId string) error { - ret := _m.Called(ctx, vpcEndpointId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByVpcEndpointId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, vpcEndpointId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByVpcEndpointId' -type MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call struct { - *mock.Call -} - -// DeleteByVpcEndpointId is a helper method to define mock.On call -// - ctx context.Context -// - vpcEndpointId string -func (_e *MockVpcEndpointsInterface_Expecter) DeleteByVpcEndpointId(ctx interface{}, vpcEndpointId interface{}) *MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call { - return &MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call{Call: _e.mock.On("DeleteByVpcEndpointId", ctx, vpcEndpointId)} -} - -func (_c *MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call) Run(run func(ctx context.Context, vpcEndpointId string)) *MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call) Return(_a0 error) *MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call) RunAndReturn(run func(context.Context, string) error) *MockVpcEndpointsInterface_DeleteByVpcEndpointId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockVpcEndpointsInterface) Get(ctx context.Context, request provisioning.GetVpcEndpointRequest) (*provisioning.VpcEndpoint, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *provisioning.VpcEndpoint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetVpcEndpointRequest) (*provisioning.VpcEndpoint, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetVpcEndpointRequest) *provisioning.VpcEndpoint); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.VpcEndpoint) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.GetVpcEndpointRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVpcEndpointsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockVpcEndpointsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.GetVpcEndpointRequest -func (_e *MockVpcEndpointsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockVpcEndpointsInterface_Get_Call { - return &MockVpcEndpointsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockVpcEndpointsInterface_Get_Call) Run(run func(ctx context.Context, request provisioning.GetVpcEndpointRequest)) *MockVpcEndpointsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.GetVpcEndpointRequest)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_Get_Call) Return(_a0 *provisioning.VpcEndpoint, _a1 error) *MockVpcEndpointsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVpcEndpointsInterface_Get_Call) RunAndReturn(run func(context.Context, provisioning.GetVpcEndpointRequest) (*provisioning.VpcEndpoint, error)) *MockVpcEndpointsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByVpcEndpointId provides a mock function with given fields: ctx, vpcEndpointId -func (_m *MockVpcEndpointsInterface) GetByVpcEndpointId(ctx context.Context, vpcEndpointId string) (*provisioning.VpcEndpoint, error) { - ret := _m.Called(ctx, vpcEndpointId) - - if len(ret) == 0 { - panic("no return value specified for GetByVpcEndpointId") - } - - var r0 *provisioning.VpcEndpoint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.VpcEndpoint, error)); ok { - return rf(ctx, vpcEndpointId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.VpcEndpoint); ok { - r0 = rf(ctx, vpcEndpointId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.VpcEndpoint) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, vpcEndpointId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVpcEndpointsInterface_GetByVpcEndpointId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByVpcEndpointId' -type MockVpcEndpointsInterface_GetByVpcEndpointId_Call struct { - *mock.Call -} - -// GetByVpcEndpointId is a helper method to define mock.On call -// - ctx context.Context -// - vpcEndpointId string -func (_e *MockVpcEndpointsInterface_Expecter) GetByVpcEndpointId(ctx interface{}, vpcEndpointId interface{}) *MockVpcEndpointsInterface_GetByVpcEndpointId_Call { - return &MockVpcEndpointsInterface_GetByVpcEndpointId_Call{Call: _e.mock.On("GetByVpcEndpointId", ctx, vpcEndpointId)} -} - -func (_c *MockVpcEndpointsInterface_GetByVpcEndpointId_Call) Run(run func(ctx context.Context, vpcEndpointId string)) *MockVpcEndpointsInterface_GetByVpcEndpointId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_GetByVpcEndpointId_Call) Return(_a0 *provisioning.VpcEndpoint, _a1 error) *MockVpcEndpointsInterface_GetByVpcEndpointId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVpcEndpointsInterface_GetByVpcEndpointId_Call) RunAndReturn(run func(context.Context, string) (*provisioning.VpcEndpoint, error)) *MockVpcEndpointsInterface_GetByVpcEndpointId_Call { - _c.Call.Return(run) - return _c -} - -// GetByVpcEndpointName provides a mock function with given fields: ctx, name -func (_m *MockVpcEndpointsInterface) GetByVpcEndpointName(ctx context.Context, name string) (*provisioning.VpcEndpoint, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByVpcEndpointName") - } - - var r0 *provisioning.VpcEndpoint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.VpcEndpoint, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.VpcEndpoint); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.VpcEndpoint) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVpcEndpointsInterface_GetByVpcEndpointName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByVpcEndpointName' -type MockVpcEndpointsInterface_GetByVpcEndpointName_Call struct { - *mock.Call -} - -// GetByVpcEndpointName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockVpcEndpointsInterface_Expecter) GetByVpcEndpointName(ctx interface{}, name interface{}) *MockVpcEndpointsInterface_GetByVpcEndpointName_Call { - return &MockVpcEndpointsInterface_GetByVpcEndpointName_Call{Call: _e.mock.On("GetByVpcEndpointName", ctx, name)} -} - -func (_c *MockVpcEndpointsInterface_GetByVpcEndpointName_Call) Run(run func(ctx context.Context, name string)) *MockVpcEndpointsInterface_GetByVpcEndpointName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_GetByVpcEndpointName_Call) Return(_a0 *provisioning.VpcEndpoint, _a1 error) *MockVpcEndpointsInterface_GetByVpcEndpointName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVpcEndpointsInterface_GetByVpcEndpointName_Call) RunAndReturn(run func(context.Context, string) (*provisioning.VpcEndpoint, error)) *MockVpcEndpointsInterface_GetByVpcEndpointName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockVpcEndpointsInterface) List(ctx context.Context) ([]provisioning.VpcEndpoint, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []provisioning.VpcEndpoint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]provisioning.VpcEndpoint, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []provisioning.VpcEndpoint); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]provisioning.VpcEndpoint) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVpcEndpointsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockVpcEndpointsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockVpcEndpointsInterface_Expecter) List(ctx interface{}) *MockVpcEndpointsInterface_List_Call { - return &MockVpcEndpointsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockVpcEndpointsInterface_List_Call) Run(run func(ctx context.Context)) *MockVpcEndpointsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_List_Call) Return(_a0 []provisioning.VpcEndpoint, _a1 error) *MockVpcEndpointsInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVpcEndpointsInterface_List_Call) RunAndReturn(run func(context.Context) ([]provisioning.VpcEndpoint, error)) *MockVpcEndpointsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// VpcEndpointVpcEndpointNameToVpcEndpointIdMap provides a mock function with given fields: ctx -func (_m *MockVpcEndpointsInterface) VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for VpcEndpointVpcEndpointNameToVpcEndpointIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VpcEndpointVpcEndpointNameToVpcEndpointIdMap' -type MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call struct { - *mock.Call -} - -// VpcEndpointVpcEndpointNameToVpcEndpointIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockVpcEndpointsInterface_Expecter) VpcEndpointVpcEndpointNameToVpcEndpointIdMap(ctx interface{}) *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call { - return &MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call{Call: _e.mock.On("VpcEndpointVpcEndpointNameToVpcEndpointIdMap", ctx)} -} - -func (_c *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call) Run(run func(ctx context.Context)) *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockVpcEndpointsInterface_VpcEndpointVpcEndpointNameToVpcEndpointIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockVpcEndpointsInterface creates a new instance of MockVpcEndpointsInterface. 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 NewMockVpcEndpointsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockVpcEndpointsInterface { - mock := &MockVpcEndpointsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/provisioning/mock_workspaces_interface.go b/experimental/mocks/service/provisioning/mock_workspaces_interface.go deleted file mode 100644 index 230d2b9f3..000000000 --- a/experimental/mocks/service/provisioning/mock_workspaces_interface.go +++ /dev/null @@ -1,755 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package provisioning - -import ( - context "context" - - provisioning "github.com/databricks/databricks-sdk-go/service/provisioning" - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" -) - -// MockWorkspacesInterface is an autogenerated mock type for the WorkspacesInterface type -type MockWorkspacesInterface struct { - mock.Mock -} - -type MockWorkspacesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockWorkspacesInterface) EXPECT() *MockWorkspacesInterface_Expecter { - return &MockWorkspacesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, createWorkspaceRequest -func (_m *MockWorkspacesInterface) Create(ctx context.Context, createWorkspaceRequest provisioning.CreateWorkspaceRequest) (*provisioning.WaitGetWorkspaceRunning[provisioning.Workspace], error) { - ret := _m.Called(ctx, createWorkspaceRequest) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *provisioning.WaitGetWorkspaceRunning[provisioning.Workspace] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateWorkspaceRequest) (*provisioning.WaitGetWorkspaceRunning[provisioning.Workspace], error)); ok { - return rf(ctx, createWorkspaceRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateWorkspaceRequest) *provisioning.WaitGetWorkspaceRunning[provisioning.Workspace]); ok { - r0 = rf(ctx, createWorkspaceRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.WaitGetWorkspaceRunning[provisioning.Workspace]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.CreateWorkspaceRequest) error); ok { - r1 = rf(ctx, createWorkspaceRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockWorkspacesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - createWorkspaceRequest provisioning.CreateWorkspaceRequest -func (_e *MockWorkspacesInterface_Expecter) Create(ctx interface{}, createWorkspaceRequest interface{}) *MockWorkspacesInterface_Create_Call { - return &MockWorkspacesInterface_Create_Call{Call: _e.mock.On("Create", ctx, createWorkspaceRequest)} -} - -func (_c *MockWorkspacesInterface_Create_Call) Run(run func(ctx context.Context, createWorkspaceRequest provisioning.CreateWorkspaceRequest)) *MockWorkspacesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.CreateWorkspaceRequest)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_Create_Call) Return(_a0 *provisioning.WaitGetWorkspaceRunning[provisioning.Workspace], _a1 error) *MockWorkspacesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_Create_Call) RunAndReturn(run func(context.Context, provisioning.CreateWorkspaceRequest) (*provisioning.WaitGetWorkspaceRunning[provisioning.Workspace], error)) *MockWorkspacesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateAndWait provides a mock function with given fields: ctx, createWorkspaceRequest, options -func (_m *MockWorkspacesInterface) CreateAndWait(ctx context.Context, createWorkspaceRequest provisioning.CreateWorkspaceRequest, options ...retries.Option[provisioning.Workspace]) (*provisioning.Workspace, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createWorkspaceRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateAndWait") - } - - var r0 *provisioning.Workspace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) (*provisioning.Workspace, error)); ok { - return rf(ctx, createWorkspaceRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.CreateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) *provisioning.Workspace); ok { - r0 = rf(ctx, createWorkspaceRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Workspace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.CreateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) error); ok { - r1 = rf(ctx, createWorkspaceRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait' -type MockWorkspacesInterface_CreateAndWait_Call struct { - *mock.Call -} - -// CreateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createWorkspaceRequest provisioning.CreateWorkspaceRequest -// - options ...retries.Option[provisioning.Workspace] -func (_e *MockWorkspacesInterface_Expecter) CreateAndWait(ctx interface{}, createWorkspaceRequest interface{}, options ...interface{}) *MockWorkspacesInterface_CreateAndWait_Call { - return &MockWorkspacesInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait", - append([]interface{}{ctx, createWorkspaceRequest}, options...)...)} -} - -func (_c *MockWorkspacesInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createWorkspaceRequest provisioning.CreateWorkspaceRequest, options ...retries.Option[provisioning.Workspace])) *MockWorkspacesInterface_CreateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[provisioning.Workspace], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[provisioning.Workspace]) - } - } - run(args[0].(context.Context), args[1].(provisioning.CreateWorkspaceRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockWorkspacesInterface_CreateAndWait_Call) Return(_a0 *provisioning.Workspace, _a1 error) *MockWorkspacesInterface_CreateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, provisioning.CreateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) (*provisioning.Workspace, error)) *MockWorkspacesInterface_CreateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockWorkspacesInterface) Delete(ctx context.Context, request provisioning.DeleteWorkspaceRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.DeleteWorkspaceRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspacesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockWorkspacesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.DeleteWorkspaceRequest -func (_e *MockWorkspacesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockWorkspacesInterface_Delete_Call { - return &MockWorkspacesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockWorkspacesInterface_Delete_Call) Run(run func(ctx context.Context, request provisioning.DeleteWorkspaceRequest)) *MockWorkspacesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.DeleteWorkspaceRequest)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_Delete_Call) Return(_a0 error) *MockWorkspacesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspacesInterface_Delete_Call) RunAndReturn(run func(context.Context, provisioning.DeleteWorkspaceRequest) error) *MockWorkspacesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByWorkspaceId provides a mock function with given fields: ctx, workspaceId -func (_m *MockWorkspacesInterface) DeleteByWorkspaceId(ctx context.Context, workspaceId int64) error { - ret := _m.Called(ctx, workspaceId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByWorkspaceId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, workspaceId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspacesInterface_DeleteByWorkspaceId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByWorkspaceId' -type MockWorkspacesInterface_DeleteByWorkspaceId_Call struct { - *mock.Call -} - -// DeleteByWorkspaceId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -func (_e *MockWorkspacesInterface_Expecter) DeleteByWorkspaceId(ctx interface{}, workspaceId interface{}) *MockWorkspacesInterface_DeleteByWorkspaceId_Call { - return &MockWorkspacesInterface_DeleteByWorkspaceId_Call{Call: _e.mock.On("DeleteByWorkspaceId", ctx, workspaceId)} -} - -func (_c *MockWorkspacesInterface_DeleteByWorkspaceId_Call) Run(run func(ctx context.Context, workspaceId int64)) *MockWorkspacesInterface_DeleteByWorkspaceId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_DeleteByWorkspaceId_Call) Return(_a0 error) *MockWorkspacesInterface_DeleteByWorkspaceId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspacesInterface_DeleteByWorkspaceId_Call) RunAndReturn(run func(context.Context, int64) error) *MockWorkspacesInterface_DeleteByWorkspaceId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockWorkspacesInterface) Get(ctx context.Context, request provisioning.GetWorkspaceRequest) (*provisioning.Workspace, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *provisioning.Workspace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetWorkspaceRequest) (*provisioning.Workspace, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.GetWorkspaceRequest) *provisioning.Workspace); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Workspace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.GetWorkspaceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockWorkspacesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request provisioning.GetWorkspaceRequest -func (_e *MockWorkspacesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockWorkspacesInterface_Get_Call { - return &MockWorkspacesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockWorkspacesInterface_Get_Call) Run(run func(ctx context.Context, request provisioning.GetWorkspaceRequest)) *MockWorkspacesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.GetWorkspaceRequest)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_Get_Call) Return(_a0 *provisioning.Workspace, _a1 error) *MockWorkspacesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_Get_Call) RunAndReturn(run func(context.Context, provisioning.GetWorkspaceRequest) (*provisioning.Workspace, error)) *MockWorkspacesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByWorkspaceId provides a mock function with given fields: ctx, workspaceId -func (_m *MockWorkspacesInterface) GetByWorkspaceId(ctx context.Context, workspaceId int64) (*provisioning.Workspace, error) { - ret := _m.Called(ctx, workspaceId) - - if len(ret) == 0 { - panic("no return value specified for GetByWorkspaceId") - } - - var r0 *provisioning.Workspace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*provisioning.Workspace, error)); ok { - return rf(ctx, workspaceId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *provisioning.Workspace); ok { - r0 = rf(ctx, workspaceId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Workspace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, workspaceId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_GetByWorkspaceId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByWorkspaceId' -type MockWorkspacesInterface_GetByWorkspaceId_Call struct { - *mock.Call -} - -// GetByWorkspaceId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -func (_e *MockWorkspacesInterface_Expecter) GetByWorkspaceId(ctx interface{}, workspaceId interface{}) *MockWorkspacesInterface_GetByWorkspaceId_Call { - return &MockWorkspacesInterface_GetByWorkspaceId_Call{Call: _e.mock.On("GetByWorkspaceId", ctx, workspaceId)} -} - -func (_c *MockWorkspacesInterface_GetByWorkspaceId_Call) Run(run func(ctx context.Context, workspaceId int64)) *MockWorkspacesInterface_GetByWorkspaceId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_GetByWorkspaceId_Call) Return(_a0 *provisioning.Workspace, _a1 error) *MockWorkspacesInterface_GetByWorkspaceId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_GetByWorkspaceId_Call) RunAndReturn(run func(context.Context, int64) (*provisioning.Workspace, error)) *MockWorkspacesInterface_GetByWorkspaceId_Call { - _c.Call.Return(run) - return _c -} - -// GetByWorkspaceName provides a mock function with given fields: ctx, name -func (_m *MockWorkspacesInterface) GetByWorkspaceName(ctx context.Context, name string) (*provisioning.Workspace, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByWorkspaceName") - } - - var r0 *provisioning.Workspace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*provisioning.Workspace, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *provisioning.Workspace); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Workspace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_GetByWorkspaceName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByWorkspaceName' -type MockWorkspacesInterface_GetByWorkspaceName_Call struct { - *mock.Call -} - -// GetByWorkspaceName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockWorkspacesInterface_Expecter) GetByWorkspaceName(ctx interface{}, name interface{}) *MockWorkspacesInterface_GetByWorkspaceName_Call { - return &MockWorkspacesInterface_GetByWorkspaceName_Call{Call: _e.mock.On("GetByWorkspaceName", ctx, name)} -} - -func (_c *MockWorkspacesInterface_GetByWorkspaceName_Call) Run(run func(ctx context.Context, name string)) *MockWorkspacesInterface_GetByWorkspaceName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_GetByWorkspaceName_Call) Return(_a0 *provisioning.Workspace, _a1 error) *MockWorkspacesInterface_GetByWorkspaceName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_GetByWorkspaceName_Call) RunAndReturn(run func(context.Context, string) (*provisioning.Workspace, error)) *MockWorkspacesInterface_GetByWorkspaceName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockWorkspacesInterface) List(ctx context.Context) ([]provisioning.Workspace, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []provisioning.Workspace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]provisioning.Workspace, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []provisioning.Workspace); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]provisioning.Workspace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockWorkspacesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockWorkspacesInterface_Expecter) List(ctx interface{}) *MockWorkspacesInterface_List_Call { - return &MockWorkspacesInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockWorkspacesInterface_List_Call) Run(run func(ctx context.Context)) *MockWorkspacesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_List_Call) Return(_a0 []provisioning.Workspace, _a1 error) *MockWorkspacesInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_List_Call) RunAndReturn(run func(context.Context) ([]provisioning.Workspace, error)) *MockWorkspacesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, updateWorkspaceRequest -func (_m *MockWorkspacesInterface) Update(ctx context.Context, updateWorkspaceRequest provisioning.UpdateWorkspaceRequest) (*provisioning.WaitGetWorkspaceRunning[struct{}], error) { - ret := _m.Called(ctx, updateWorkspaceRequest) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *provisioning.WaitGetWorkspaceRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.UpdateWorkspaceRequest) (*provisioning.WaitGetWorkspaceRunning[struct{}], error)); ok { - return rf(ctx, updateWorkspaceRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.UpdateWorkspaceRequest) *provisioning.WaitGetWorkspaceRunning[struct{}]); ok { - r0 = rf(ctx, updateWorkspaceRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.WaitGetWorkspaceRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.UpdateWorkspaceRequest) error); ok { - r1 = rf(ctx, updateWorkspaceRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockWorkspacesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - updateWorkspaceRequest provisioning.UpdateWorkspaceRequest -func (_e *MockWorkspacesInterface_Expecter) Update(ctx interface{}, updateWorkspaceRequest interface{}) *MockWorkspacesInterface_Update_Call { - return &MockWorkspacesInterface_Update_Call{Call: _e.mock.On("Update", ctx, updateWorkspaceRequest)} -} - -func (_c *MockWorkspacesInterface_Update_Call) Run(run func(ctx context.Context, updateWorkspaceRequest provisioning.UpdateWorkspaceRequest)) *MockWorkspacesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(provisioning.UpdateWorkspaceRequest)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_Update_Call) Return(_a0 *provisioning.WaitGetWorkspaceRunning[struct{}], _a1 error) *MockWorkspacesInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_Update_Call) RunAndReturn(run func(context.Context, provisioning.UpdateWorkspaceRequest) (*provisioning.WaitGetWorkspaceRunning[struct{}], error)) *MockWorkspacesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdateAndWait provides a mock function with given fields: ctx, updateWorkspaceRequest, options -func (_m *MockWorkspacesInterface) UpdateAndWait(ctx context.Context, updateWorkspaceRequest provisioning.UpdateWorkspaceRequest, options ...retries.Option[provisioning.Workspace]) (*provisioning.Workspace, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, updateWorkspaceRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for UpdateAndWait") - } - - var r0 *provisioning.Workspace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, provisioning.UpdateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) (*provisioning.Workspace, error)); ok { - return rf(ctx, updateWorkspaceRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, provisioning.UpdateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) *provisioning.Workspace); ok { - r0 = rf(ctx, updateWorkspaceRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Workspace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, provisioning.UpdateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) error); ok { - r1 = rf(ctx, updateWorkspaceRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_UpdateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAndWait' -type MockWorkspacesInterface_UpdateAndWait_Call struct { - *mock.Call -} - -// UpdateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - updateWorkspaceRequest provisioning.UpdateWorkspaceRequest -// - options ...retries.Option[provisioning.Workspace] -func (_e *MockWorkspacesInterface_Expecter) UpdateAndWait(ctx interface{}, updateWorkspaceRequest interface{}, options ...interface{}) *MockWorkspacesInterface_UpdateAndWait_Call { - return &MockWorkspacesInterface_UpdateAndWait_Call{Call: _e.mock.On("UpdateAndWait", - append([]interface{}{ctx, updateWorkspaceRequest}, options...)...)} -} - -func (_c *MockWorkspacesInterface_UpdateAndWait_Call) Run(run func(ctx context.Context, updateWorkspaceRequest provisioning.UpdateWorkspaceRequest, options ...retries.Option[provisioning.Workspace])) *MockWorkspacesInterface_UpdateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[provisioning.Workspace], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[provisioning.Workspace]) - } - } - run(args[0].(context.Context), args[1].(provisioning.UpdateWorkspaceRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockWorkspacesInterface_UpdateAndWait_Call) Return(_a0 *provisioning.Workspace, _a1 error) *MockWorkspacesInterface_UpdateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_UpdateAndWait_Call) RunAndReturn(run func(context.Context, provisioning.UpdateWorkspaceRequest, ...retries.Option[provisioning.Workspace]) (*provisioning.Workspace, error)) *MockWorkspacesInterface_UpdateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetWorkspaceRunning provides a mock function with given fields: ctx, workspaceId, timeout, callback -func (_m *MockWorkspacesInterface) WaitGetWorkspaceRunning(ctx context.Context, workspaceId int64, timeout time.Duration, callback func(*provisioning.Workspace)) (*provisioning.Workspace, error) { - ret := _m.Called(ctx, workspaceId, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetWorkspaceRunning") - } - - var r0 *provisioning.Workspace - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64, time.Duration, func(*provisioning.Workspace)) (*provisioning.Workspace, error)); ok { - return rf(ctx, workspaceId, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, int64, time.Duration, func(*provisioning.Workspace)) *provisioning.Workspace); ok { - r0 = rf(ctx, workspaceId, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*provisioning.Workspace) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64, time.Duration, func(*provisioning.Workspace)) error); ok { - r1 = rf(ctx, workspaceId, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_WaitGetWorkspaceRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetWorkspaceRunning' -type MockWorkspacesInterface_WaitGetWorkspaceRunning_Call struct { - *mock.Call -} - -// WaitGetWorkspaceRunning is a helper method to define mock.On call -// - ctx context.Context -// - workspaceId int64 -// - timeout time.Duration -// - callback func(*provisioning.Workspace) -func (_e *MockWorkspacesInterface_Expecter) WaitGetWorkspaceRunning(ctx interface{}, workspaceId interface{}, timeout interface{}, callback interface{}) *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call { - return &MockWorkspacesInterface_WaitGetWorkspaceRunning_Call{Call: _e.mock.On("WaitGetWorkspaceRunning", ctx, workspaceId, timeout, callback)} -} - -func (_c *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call) Run(run func(ctx context.Context, workspaceId int64, timeout time.Duration, callback func(*provisioning.Workspace))) *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64), args[2].(time.Duration), args[3].(func(*provisioning.Workspace))) - }) - return _c -} - -func (_c *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call) Return(_a0 *provisioning.Workspace, _a1 error) *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call) RunAndReturn(run func(context.Context, int64, time.Duration, func(*provisioning.Workspace)) (*provisioning.Workspace, error)) *MockWorkspacesInterface_WaitGetWorkspaceRunning_Call { - _c.Call.Return(run) - return _c -} - -// WorkspaceWorkspaceNameToWorkspaceIdMap provides a mock function with given fields: ctx -func (_m *MockWorkspacesInterface) WorkspaceWorkspaceNameToWorkspaceIdMap(ctx context.Context) (map[string]int64, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for WorkspaceWorkspaceNameToWorkspaceIdMap") - } - - var r0 map[string]int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]int64, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]int64); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]int64) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WorkspaceWorkspaceNameToWorkspaceIdMap' -type MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call struct { - *mock.Call -} - -// WorkspaceWorkspaceNameToWorkspaceIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockWorkspacesInterface_Expecter) WorkspaceWorkspaceNameToWorkspaceIdMap(ctx interface{}) *MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call { - return &MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call{Call: _e.mock.On("WorkspaceWorkspaceNameToWorkspaceIdMap", ctx)} -} - -func (_c *MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call) Run(run func(ctx context.Context)) *MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call) Return(_a0 map[string]int64, _a1 error) *MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call) RunAndReturn(run func(context.Context) (map[string]int64, error)) *MockWorkspacesInterface_WorkspaceWorkspaceNameToWorkspaceIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockWorkspacesInterface creates a new instance of MockWorkspacesInterface. 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 NewMockWorkspacesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWorkspacesInterface { - mock := &MockWorkspacesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/serving/mock_serving_endpoints_data_plane_interface.go b/experimental/mocks/service/serving/mock_serving_endpoints_data_plane_interface.go deleted file mode 100644 index 28332a309..000000000 --- a/experimental/mocks/service/serving/mock_serving_endpoints_data_plane_interface.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package serving - -import ( - context "context" - - serving "github.com/databricks/databricks-sdk-go/service/serving" - mock "github.com/stretchr/testify/mock" -) - -// MockServingEndpointsDataPlaneInterface is an autogenerated mock type for the ServingEndpointsDataPlaneInterface type -type MockServingEndpointsDataPlaneInterface struct { - mock.Mock -} - -type MockServingEndpointsDataPlaneInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServingEndpointsDataPlaneInterface) EXPECT() *MockServingEndpointsDataPlaneInterface_Expecter { - return &MockServingEndpointsDataPlaneInterface_Expecter{mock: &_m.Mock} -} - -// Query provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsDataPlaneInterface) Query(ctx context.Context, request serving.QueryEndpointInput) (*serving.QueryEndpointResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Query") - } - - var r0 *serving.QueryEndpointResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.QueryEndpointInput) (*serving.QueryEndpointResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.QueryEndpointInput) *serving.QueryEndpointResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.QueryEndpointResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.QueryEndpointInput) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsDataPlaneInterface_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' -type MockServingEndpointsDataPlaneInterface_Query_Call struct { - *mock.Call -} - -// Query is a helper method to define mock.On call -// - ctx context.Context -// - request serving.QueryEndpointInput -func (_e *MockServingEndpointsDataPlaneInterface_Expecter) Query(ctx interface{}, request interface{}) *MockServingEndpointsDataPlaneInterface_Query_Call { - return &MockServingEndpointsDataPlaneInterface_Query_Call{Call: _e.mock.On("Query", ctx, request)} -} - -func (_c *MockServingEndpointsDataPlaneInterface_Query_Call) Run(run func(ctx context.Context, request serving.QueryEndpointInput)) *MockServingEndpointsDataPlaneInterface_Query_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.QueryEndpointInput)) - }) - return _c -} - -func (_c *MockServingEndpointsDataPlaneInterface_Query_Call) Return(_a0 *serving.QueryEndpointResponse, _a1 error) *MockServingEndpointsDataPlaneInterface_Query_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsDataPlaneInterface_Query_Call) RunAndReturn(run func(context.Context, serving.QueryEndpointInput) (*serving.QueryEndpointResponse, error)) *MockServingEndpointsDataPlaneInterface_Query_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServingEndpointsDataPlaneInterface creates a new instance of MockServingEndpointsDataPlaneInterface. 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 NewMockServingEndpointsDataPlaneInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServingEndpointsDataPlaneInterface { - mock := &MockServingEndpointsDataPlaneInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/serving/mock_serving_endpoints_interface.go b/experimental/mocks/service/serving/mock_serving_endpoints_interface.go deleted file mode 100644 index 782f10dfc..000000000 --- a/experimental/mocks/service/serving/mock_serving_endpoints_interface.go +++ /dev/null @@ -1,1728 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package serving - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - serving "github.com/databricks/databricks-sdk-go/service/serving" - - time "time" -) - -// MockServingEndpointsInterface is an autogenerated mock type for the ServingEndpointsInterface type -type MockServingEndpointsInterface struct { - mock.Mock -} - -type MockServingEndpointsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockServingEndpointsInterface) EXPECT() *MockServingEndpointsInterface_Expecter { - return &MockServingEndpointsInterface_Expecter{mock: &_m.Mock} -} - -// BuildLogs provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) BuildLogs(ctx context.Context, request serving.BuildLogsRequest) (*serving.BuildLogsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for BuildLogs") - } - - var r0 *serving.BuildLogsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.BuildLogsRequest) (*serving.BuildLogsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.BuildLogsRequest) *serving.BuildLogsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.BuildLogsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.BuildLogsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_BuildLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuildLogs' -type MockServingEndpointsInterface_BuildLogs_Call struct { - *mock.Call -} - -// BuildLogs is a helper method to define mock.On call -// - ctx context.Context -// - request serving.BuildLogsRequest -func (_e *MockServingEndpointsInterface_Expecter) BuildLogs(ctx interface{}, request interface{}) *MockServingEndpointsInterface_BuildLogs_Call { - return &MockServingEndpointsInterface_BuildLogs_Call{Call: _e.mock.On("BuildLogs", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_BuildLogs_Call) Run(run func(ctx context.Context, request serving.BuildLogsRequest)) *MockServingEndpointsInterface_BuildLogs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.BuildLogsRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_BuildLogs_Call) Return(_a0 *serving.BuildLogsResponse, _a1 error) *MockServingEndpointsInterface_BuildLogs_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_BuildLogs_Call) RunAndReturn(run func(context.Context, serving.BuildLogsRequest) (*serving.BuildLogsResponse, error)) *MockServingEndpointsInterface_BuildLogs_Call { - _c.Call.Return(run) - return _c -} - -// BuildLogsByNameAndServedModelName provides a mock function with given fields: ctx, name, servedModelName -func (_m *MockServingEndpointsInterface) BuildLogsByNameAndServedModelName(ctx context.Context, name string, servedModelName string) (*serving.BuildLogsResponse, error) { - ret := _m.Called(ctx, name, servedModelName) - - if len(ret) == 0 { - panic("no return value specified for BuildLogsByNameAndServedModelName") - } - - var r0 *serving.BuildLogsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*serving.BuildLogsResponse, error)); ok { - return rf(ctx, name, servedModelName) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *serving.BuildLogsResponse); ok { - r0 = rf(ctx, name, servedModelName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.BuildLogsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, name, servedModelName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuildLogsByNameAndServedModelName' -type MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call struct { - *mock.Call -} - -// BuildLogsByNameAndServedModelName is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - servedModelName string -func (_e *MockServingEndpointsInterface_Expecter) BuildLogsByNameAndServedModelName(ctx interface{}, name interface{}, servedModelName interface{}) *MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call { - return &MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call{Call: _e.mock.On("BuildLogsByNameAndServedModelName", ctx, name, servedModelName)} -} - -func (_c *MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call) Run(run func(ctx context.Context, name string, servedModelName string)) *MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call) Return(_a0 *serving.BuildLogsResponse, _a1 error) *MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call) RunAndReturn(run func(context.Context, string, string) (*serving.BuildLogsResponse, error)) *MockServingEndpointsInterface_BuildLogsByNameAndServedModelName_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx, createServingEndpoint -func (_m *MockServingEndpointsInterface) Create(ctx context.Context, createServingEndpoint serving.CreateServingEndpoint) (*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], error) { - ret := _m.Called(ctx, createServingEndpoint) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.CreateServingEndpoint) (*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], error)); ok { - return rf(ctx, createServingEndpoint) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.CreateServingEndpoint) *serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed]); ok { - r0 = rf(ctx, createServingEndpoint) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.CreateServingEndpoint) error); ok { - r1 = rf(ctx, createServingEndpoint) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockServingEndpointsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - createServingEndpoint serving.CreateServingEndpoint -func (_e *MockServingEndpointsInterface_Expecter) Create(ctx interface{}, createServingEndpoint interface{}) *MockServingEndpointsInterface_Create_Call { - return &MockServingEndpointsInterface_Create_Call{Call: _e.mock.On("Create", ctx, createServingEndpoint)} -} - -func (_c *MockServingEndpointsInterface_Create_Call) Run(run func(ctx context.Context, createServingEndpoint serving.CreateServingEndpoint)) *MockServingEndpointsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.CreateServingEndpoint)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Create_Call) Return(_a0 *serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], _a1 error) *MockServingEndpointsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_Create_Call) RunAndReturn(run func(context.Context, serving.CreateServingEndpoint) (*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], error)) *MockServingEndpointsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateAndWait provides a mock function with given fields: ctx, createServingEndpoint, options -func (_m *MockServingEndpointsInterface) CreateAndWait(ctx context.Context, createServingEndpoint serving.CreateServingEndpoint, options ...retries.Option[serving.ServingEndpointDetailed]) (*serving.ServingEndpointDetailed, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createServingEndpoint) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateAndWait") - } - - var r0 *serving.ServingEndpointDetailed - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.CreateServingEndpoint, ...retries.Option[serving.ServingEndpointDetailed]) (*serving.ServingEndpointDetailed, error)); ok { - return rf(ctx, createServingEndpoint, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.CreateServingEndpoint, ...retries.Option[serving.ServingEndpointDetailed]) *serving.ServingEndpointDetailed); ok { - r0 = rf(ctx, createServingEndpoint, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointDetailed) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.CreateServingEndpoint, ...retries.Option[serving.ServingEndpointDetailed]) error); ok { - r1 = rf(ctx, createServingEndpoint, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait' -type MockServingEndpointsInterface_CreateAndWait_Call struct { - *mock.Call -} - -// CreateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createServingEndpoint serving.CreateServingEndpoint -// - options ...retries.Option[serving.ServingEndpointDetailed] -func (_e *MockServingEndpointsInterface_Expecter) CreateAndWait(ctx interface{}, createServingEndpoint interface{}, options ...interface{}) *MockServingEndpointsInterface_CreateAndWait_Call { - return &MockServingEndpointsInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait", - append([]interface{}{ctx, createServingEndpoint}, options...)...)} -} - -func (_c *MockServingEndpointsInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createServingEndpoint serving.CreateServingEndpoint, options ...retries.Option[serving.ServingEndpointDetailed])) *MockServingEndpointsInterface_CreateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[serving.ServingEndpointDetailed], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[serving.ServingEndpointDetailed]) - } - } - run(args[0].(context.Context), args[1].(serving.CreateServingEndpoint), variadicArgs...) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_CreateAndWait_Call) Return(_a0 *serving.ServingEndpointDetailed, _a1 error) *MockServingEndpointsInterface_CreateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, serving.CreateServingEndpoint, ...retries.Option[serving.ServingEndpointDetailed]) (*serving.ServingEndpointDetailed, error)) *MockServingEndpointsInterface_CreateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) Delete(ctx context.Context, request serving.DeleteServingEndpointRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, serving.DeleteServingEndpointRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServingEndpointsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockServingEndpointsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request serving.DeleteServingEndpointRequest -func (_e *MockServingEndpointsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockServingEndpointsInterface_Delete_Call { - return &MockServingEndpointsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_Delete_Call) Run(run func(ctx context.Context, request serving.DeleteServingEndpointRequest)) *MockServingEndpointsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.DeleteServingEndpointRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Delete_Call) Return(_a0 error) *MockServingEndpointsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsInterface_Delete_Call) RunAndReturn(run func(context.Context, serving.DeleteServingEndpointRequest) error) *MockServingEndpointsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockServingEndpointsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServingEndpointsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockServingEndpointsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockServingEndpointsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockServingEndpointsInterface_DeleteByName_Call { - return &MockServingEndpointsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockServingEndpointsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockServingEndpointsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_DeleteByName_Call) Return(_a0 error) *MockServingEndpointsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockServingEndpointsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// ExportMetrics provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) ExportMetrics(ctx context.Context, request serving.ExportMetricsRequest) (*serving.ExportMetricsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExportMetrics") - } - - var r0 *serving.ExportMetricsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.ExportMetricsRequest) (*serving.ExportMetricsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.ExportMetricsRequest) *serving.ExportMetricsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ExportMetricsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.ExportMetricsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_ExportMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportMetrics' -type MockServingEndpointsInterface_ExportMetrics_Call struct { - *mock.Call -} - -// ExportMetrics is a helper method to define mock.On call -// - ctx context.Context -// - request serving.ExportMetricsRequest -func (_e *MockServingEndpointsInterface_Expecter) ExportMetrics(ctx interface{}, request interface{}) *MockServingEndpointsInterface_ExportMetrics_Call { - return &MockServingEndpointsInterface_ExportMetrics_Call{Call: _e.mock.On("ExportMetrics", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_ExportMetrics_Call) Run(run func(ctx context.Context, request serving.ExportMetricsRequest)) *MockServingEndpointsInterface_ExportMetrics_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.ExportMetricsRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_ExportMetrics_Call) Return(_a0 *serving.ExportMetricsResponse, _a1 error) *MockServingEndpointsInterface_ExportMetrics_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_ExportMetrics_Call) RunAndReturn(run func(context.Context, serving.ExportMetricsRequest) (*serving.ExportMetricsResponse, error)) *MockServingEndpointsInterface_ExportMetrics_Call { - _c.Call.Return(run) - return _c -} - -// ExportMetricsByName provides a mock function with given fields: ctx, name -func (_m *MockServingEndpointsInterface) ExportMetricsByName(ctx context.Context, name string) (*serving.ExportMetricsResponse, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for ExportMetricsByName") - } - - var r0 *serving.ExportMetricsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*serving.ExportMetricsResponse, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *serving.ExportMetricsResponse); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ExportMetricsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_ExportMetricsByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExportMetricsByName' -type MockServingEndpointsInterface_ExportMetricsByName_Call struct { - *mock.Call -} - -// ExportMetricsByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockServingEndpointsInterface_Expecter) ExportMetricsByName(ctx interface{}, name interface{}) *MockServingEndpointsInterface_ExportMetricsByName_Call { - return &MockServingEndpointsInterface_ExportMetricsByName_Call{Call: _e.mock.On("ExportMetricsByName", ctx, name)} -} - -func (_c *MockServingEndpointsInterface_ExportMetricsByName_Call) Run(run func(ctx context.Context, name string)) *MockServingEndpointsInterface_ExportMetricsByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_ExportMetricsByName_Call) Return(_a0 *serving.ExportMetricsResponse, _a1 error) *MockServingEndpointsInterface_ExportMetricsByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_ExportMetricsByName_Call) RunAndReturn(run func(context.Context, string) (*serving.ExportMetricsResponse, error)) *MockServingEndpointsInterface_ExportMetricsByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) Get(ctx context.Context, request serving.GetServingEndpointRequest) (*serving.ServingEndpointDetailed, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *serving.ServingEndpointDetailed - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.GetServingEndpointRequest) (*serving.ServingEndpointDetailed, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.GetServingEndpointRequest) *serving.ServingEndpointDetailed); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointDetailed) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.GetServingEndpointRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockServingEndpointsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request serving.GetServingEndpointRequest -func (_e *MockServingEndpointsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockServingEndpointsInterface_Get_Call { - return &MockServingEndpointsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_Get_Call) Run(run func(ctx context.Context, request serving.GetServingEndpointRequest)) *MockServingEndpointsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.GetServingEndpointRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Get_Call) Return(_a0 *serving.ServingEndpointDetailed, _a1 error) *MockServingEndpointsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_Get_Call) RunAndReturn(run func(context.Context, serving.GetServingEndpointRequest) (*serving.ServingEndpointDetailed, error)) *MockServingEndpointsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockServingEndpointsInterface) GetByName(ctx context.Context, name string) (*serving.ServingEndpointDetailed, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *serving.ServingEndpointDetailed - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*serving.ServingEndpointDetailed, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *serving.ServingEndpointDetailed); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointDetailed) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockServingEndpointsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockServingEndpointsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockServingEndpointsInterface_GetByName_Call { - return &MockServingEndpointsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockServingEndpointsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockServingEndpointsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_GetByName_Call) Return(_a0 *serving.ServingEndpointDetailed, _a1 error) *MockServingEndpointsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*serving.ServingEndpointDetailed, error)) *MockServingEndpointsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetOpenApi provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) GetOpenApi(ctx context.Context, request serving.GetOpenApiRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetOpenApi") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, serving.GetOpenApiRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServingEndpointsInterface_GetOpenApi_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOpenApi' -type MockServingEndpointsInterface_GetOpenApi_Call struct { - *mock.Call -} - -// GetOpenApi is a helper method to define mock.On call -// - ctx context.Context -// - request serving.GetOpenApiRequest -func (_e *MockServingEndpointsInterface_Expecter) GetOpenApi(ctx interface{}, request interface{}) *MockServingEndpointsInterface_GetOpenApi_Call { - return &MockServingEndpointsInterface_GetOpenApi_Call{Call: _e.mock.On("GetOpenApi", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_GetOpenApi_Call) Run(run func(ctx context.Context, request serving.GetOpenApiRequest)) *MockServingEndpointsInterface_GetOpenApi_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.GetOpenApiRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_GetOpenApi_Call) Return(_a0 error) *MockServingEndpointsInterface_GetOpenApi_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsInterface_GetOpenApi_Call) RunAndReturn(run func(context.Context, serving.GetOpenApiRequest) error) *MockServingEndpointsInterface_GetOpenApi_Call { - _c.Call.Return(run) - return _c -} - -// GetOpenApiByName provides a mock function with given fields: ctx, name -func (_m *MockServingEndpointsInterface) GetOpenApiByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetOpenApiByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockServingEndpointsInterface_GetOpenApiByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOpenApiByName' -type MockServingEndpointsInterface_GetOpenApiByName_Call struct { - *mock.Call -} - -// GetOpenApiByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockServingEndpointsInterface_Expecter) GetOpenApiByName(ctx interface{}, name interface{}) *MockServingEndpointsInterface_GetOpenApiByName_Call { - return &MockServingEndpointsInterface_GetOpenApiByName_Call{Call: _e.mock.On("GetOpenApiByName", ctx, name)} -} - -func (_c *MockServingEndpointsInterface_GetOpenApiByName_Call) Run(run func(ctx context.Context, name string)) *MockServingEndpointsInterface_GetOpenApiByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_GetOpenApiByName_Call) Return(_a0 error) *MockServingEndpointsInterface_GetOpenApiByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsInterface_GetOpenApiByName_Call) RunAndReturn(run func(context.Context, string) error) *MockServingEndpointsInterface_GetOpenApiByName_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) GetPermissionLevels(ctx context.Context, request serving.GetServingEndpointPermissionLevelsRequest) (*serving.GetServingEndpointPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *serving.GetServingEndpointPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.GetServingEndpointPermissionLevelsRequest) (*serving.GetServingEndpointPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.GetServingEndpointPermissionLevelsRequest) *serving.GetServingEndpointPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.GetServingEndpointPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.GetServingEndpointPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockServingEndpointsInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request serving.GetServingEndpointPermissionLevelsRequest -func (_e *MockServingEndpointsInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockServingEndpointsInterface_GetPermissionLevels_Call { - return &MockServingEndpointsInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request serving.GetServingEndpointPermissionLevelsRequest)) *MockServingEndpointsInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.GetServingEndpointPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissionLevels_Call) Return(_a0 *serving.GetServingEndpointPermissionLevelsResponse, _a1 error) *MockServingEndpointsInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, serving.GetServingEndpointPermissionLevelsRequest) (*serving.GetServingEndpointPermissionLevelsResponse, error)) *MockServingEndpointsInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByServingEndpointId provides a mock function with given fields: ctx, servingEndpointId -func (_m *MockServingEndpointsInterface) GetPermissionLevelsByServingEndpointId(ctx context.Context, servingEndpointId string) (*serving.GetServingEndpointPermissionLevelsResponse, error) { - ret := _m.Called(ctx, servingEndpointId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByServingEndpointId") - } - - var r0 *serving.GetServingEndpointPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*serving.GetServingEndpointPermissionLevelsResponse, error)); ok { - return rf(ctx, servingEndpointId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *serving.GetServingEndpointPermissionLevelsResponse); ok { - r0 = rf(ctx, servingEndpointId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.GetServingEndpointPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, servingEndpointId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByServingEndpointId' -type MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByServingEndpointId is a helper method to define mock.On call -// - ctx context.Context -// - servingEndpointId string -func (_e *MockServingEndpointsInterface_Expecter) GetPermissionLevelsByServingEndpointId(ctx interface{}, servingEndpointId interface{}) *MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call { - return &MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call{Call: _e.mock.On("GetPermissionLevelsByServingEndpointId", ctx, servingEndpointId)} -} - -func (_c *MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call) Run(run func(ctx context.Context, servingEndpointId string)) *MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call) Return(_a0 *serving.GetServingEndpointPermissionLevelsResponse, _a1 error) *MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call) RunAndReturn(run func(context.Context, string) (*serving.GetServingEndpointPermissionLevelsResponse, error)) *MockServingEndpointsInterface_GetPermissionLevelsByServingEndpointId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) GetPermissions(ctx context.Context, request serving.GetServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *serving.ServingEndpointPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.GetServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.GetServingEndpointPermissionsRequest) *serving.ServingEndpointPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.GetServingEndpointPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockServingEndpointsInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request serving.GetServingEndpointPermissionsRequest -func (_e *MockServingEndpointsInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockServingEndpointsInterface_GetPermissions_Call { - return &MockServingEndpointsInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_GetPermissions_Call) Run(run func(ctx context.Context, request serving.GetServingEndpointPermissionsRequest)) *MockServingEndpointsInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.GetServingEndpointPermissionsRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissions_Call) Return(_a0 *serving.ServingEndpointPermissions, _a1 error) *MockServingEndpointsInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, serving.GetServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error)) *MockServingEndpointsInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByServingEndpointId provides a mock function with given fields: ctx, servingEndpointId -func (_m *MockServingEndpointsInterface) GetPermissionsByServingEndpointId(ctx context.Context, servingEndpointId string) (*serving.ServingEndpointPermissions, error) { - ret := _m.Called(ctx, servingEndpointId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByServingEndpointId") - } - - var r0 *serving.ServingEndpointPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*serving.ServingEndpointPermissions, error)); ok { - return rf(ctx, servingEndpointId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *serving.ServingEndpointPermissions); ok { - r0 = rf(ctx, servingEndpointId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, servingEndpointId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByServingEndpointId' -type MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call struct { - *mock.Call -} - -// GetPermissionsByServingEndpointId is a helper method to define mock.On call -// - ctx context.Context -// - servingEndpointId string -func (_e *MockServingEndpointsInterface_Expecter) GetPermissionsByServingEndpointId(ctx interface{}, servingEndpointId interface{}) *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call { - return &MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call{Call: _e.mock.On("GetPermissionsByServingEndpointId", ctx, servingEndpointId)} -} - -func (_c *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call) Run(run func(ctx context.Context, servingEndpointId string)) *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call) Return(_a0 *serving.ServingEndpointPermissions, _a1 error) *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call) RunAndReturn(run func(context.Context, string) (*serving.ServingEndpointPermissions, error)) *MockServingEndpointsInterface_GetPermissionsByServingEndpointId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockServingEndpointsInterface) List(ctx context.Context) listing.Iterator[serving.ServingEndpoint] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[serving.ServingEndpoint] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[serving.ServingEndpoint]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[serving.ServingEndpoint]) - } - } - - return r0 -} - -// MockServingEndpointsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockServingEndpointsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockServingEndpointsInterface_Expecter) List(ctx interface{}) *MockServingEndpointsInterface_List_Call { - return &MockServingEndpointsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockServingEndpointsInterface_List_Call) Run(run func(ctx context.Context)) *MockServingEndpointsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_List_Call) Return(_a0 listing.Iterator[serving.ServingEndpoint]) *MockServingEndpointsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockServingEndpointsInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[serving.ServingEndpoint]) *MockServingEndpointsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockServingEndpointsInterface) ListAll(ctx context.Context) ([]serving.ServingEndpoint, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []serving.ServingEndpoint - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]serving.ServingEndpoint, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []serving.ServingEndpoint); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]serving.ServingEndpoint) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockServingEndpointsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockServingEndpointsInterface_Expecter) ListAll(ctx interface{}) *MockServingEndpointsInterface_ListAll_Call { - return &MockServingEndpointsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockServingEndpointsInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockServingEndpointsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_ListAll_Call) Return(_a0 []serving.ServingEndpoint, _a1 error) *MockServingEndpointsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]serving.ServingEndpoint, error)) *MockServingEndpointsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Logs provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) Logs(ctx context.Context, request serving.LogsRequest) (*serving.ServerLogsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Logs") - } - - var r0 *serving.ServerLogsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.LogsRequest) (*serving.ServerLogsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.LogsRequest) *serving.ServerLogsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServerLogsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.LogsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_Logs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logs' -type MockServingEndpointsInterface_Logs_Call struct { - *mock.Call -} - -// Logs is a helper method to define mock.On call -// - ctx context.Context -// - request serving.LogsRequest -func (_e *MockServingEndpointsInterface_Expecter) Logs(ctx interface{}, request interface{}) *MockServingEndpointsInterface_Logs_Call { - return &MockServingEndpointsInterface_Logs_Call{Call: _e.mock.On("Logs", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_Logs_Call) Run(run func(ctx context.Context, request serving.LogsRequest)) *MockServingEndpointsInterface_Logs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.LogsRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Logs_Call) Return(_a0 *serving.ServerLogsResponse, _a1 error) *MockServingEndpointsInterface_Logs_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_Logs_Call) RunAndReturn(run func(context.Context, serving.LogsRequest) (*serving.ServerLogsResponse, error)) *MockServingEndpointsInterface_Logs_Call { - _c.Call.Return(run) - return _c -} - -// LogsByNameAndServedModelName provides a mock function with given fields: ctx, name, servedModelName -func (_m *MockServingEndpointsInterface) LogsByNameAndServedModelName(ctx context.Context, name string, servedModelName string) (*serving.ServerLogsResponse, error) { - ret := _m.Called(ctx, name, servedModelName) - - if len(ret) == 0 { - panic("no return value specified for LogsByNameAndServedModelName") - } - - var r0 *serving.ServerLogsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*serving.ServerLogsResponse, error)); ok { - return rf(ctx, name, servedModelName) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *serving.ServerLogsResponse); ok { - r0 = rf(ctx, name, servedModelName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServerLogsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, name, servedModelName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_LogsByNameAndServedModelName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogsByNameAndServedModelName' -type MockServingEndpointsInterface_LogsByNameAndServedModelName_Call struct { - *mock.Call -} - -// LogsByNameAndServedModelName is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - servedModelName string -func (_e *MockServingEndpointsInterface_Expecter) LogsByNameAndServedModelName(ctx interface{}, name interface{}, servedModelName interface{}) *MockServingEndpointsInterface_LogsByNameAndServedModelName_Call { - return &MockServingEndpointsInterface_LogsByNameAndServedModelName_Call{Call: _e.mock.On("LogsByNameAndServedModelName", ctx, name, servedModelName)} -} - -func (_c *MockServingEndpointsInterface_LogsByNameAndServedModelName_Call) Run(run func(ctx context.Context, name string, servedModelName string)) *MockServingEndpointsInterface_LogsByNameAndServedModelName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_LogsByNameAndServedModelName_Call) Return(_a0 *serving.ServerLogsResponse, _a1 error) *MockServingEndpointsInterface_LogsByNameAndServedModelName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_LogsByNameAndServedModelName_Call) RunAndReturn(run func(context.Context, string, string) (*serving.ServerLogsResponse, error)) *MockServingEndpointsInterface_LogsByNameAndServedModelName_Call { - _c.Call.Return(run) - return _c -} - -// Patch provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) Patch(ctx context.Context, request serving.PatchServingEndpointTags) ([]serving.EndpointTag, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Patch") - } - - var r0 []serving.EndpointTag - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.PatchServingEndpointTags) ([]serving.EndpointTag, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.PatchServingEndpointTags) []serving.EndpointTag); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]serving.EndpointTag) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.PatchServingEndpointTags) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_Patch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Patch' -type MockServingEndpointsInterface_Patch_Call struct { - *mock.Call -} - -// Patch is a helper method to define mock.On call -// - ctx context.Context -// - request serving.PatchServingEndpointTags -func (_e *MockServingEndpointsInterface_Expecter) Patch(ctx interface{}, request interface{}) *MockServingEndpointsInterface_Patch_Call { - return &MockServingEndpointsInterface_Patch_Call{Call: _e.mock.On("Patch", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_Patch_Call) Run(run func(ctx context.Context, request serving.PatchServingEndpointTags)) *MockServingEndpointsInterface_Patch_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.PatchServingEndpointTags)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Patch_Call) Return(_a0 []serving.EndpointTag, _a1 error) *MockServingEndpointsInterface_Patch_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_Patch_Call) RunAndReturn(run func(context.Context, serving.PatchServingEndpointTags) ([]serving.EndpointTag, error)) *MockServingEndpointsInterface_Patch_Call { - _c.Call.Return(run) - return _c -} - -// Put provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) Put(ctx context.Context, request serving.PutRequest) (*serving.PutResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Put") - } - - var r0 *serving.PutResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.PutRequest) (*serving.PutResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.PutRequest) *serving.PutResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.PutResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.PutRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' -type MockServingEndpointsInterface_Put_Call struct { - *mock.Call -} - -// Put is a helper method to define mock.On call -// - ctx context.Context -// - request serving.PutRequest -func (_e *MockServingEndpointsInterface_Expecter) Put(ctx interface{}, request interface{}) *MockServingEndpointsInterface_Put_Call { - return &MockServingEndpointsInterface_Put_Call{Call: _e.mock.On("Put", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_Put_Call) Run(run func(ctx context.Context, request serving.PutRequest)) *MockServingEndpointsInterface_Put_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.PutRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Put_Call) Return(_a0 *serving.PutResponse, _a1 error) *MockServingEndpointsInterface_Put_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_Put_Call) RunAndReturn(run func(context.Context, serving.PutRequest) (*serving.PutResponse, error)) *MockServingEndpointsInterface_Put_Call { - _c.Call.Return(run) - return _c -} - -// PutAiGateway provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) PutAiGateway(ctx context.Context, request serving.PutAiGatewayRequest) (*serving.PutAiGatewayResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for PutAiGateway") - } - - var r0 *serving.PutAiGatewayResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.PutAiGatewayRequest) (*serving.PutAiGatewayResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.PutAiGatewayRequest) *serving.PutAiGatewayResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.PutAiGatewayResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.PutAiGatewayRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_PutAiGateway_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutAiGateway' -type MockServingEndpointsInterface_PutAiGateway_Call struct { - *mock.Call -} - -// PutAiGateway is a helper method to define mock.On call -// - ctx context.Context -// - request serving.PutAiGatewayRequest -func (_e *MockServingEndpointsInterface_Expecter) PutAiGateway(ctx interface{}, request interface{}) *MockServingEndpointsInterface_PutAiGateway_Call { - return &MockServingEndpointsInterface_PutAiGateway_Call{Call: _e.mock.On("PutAiGateway", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_PutAiGateway_Call) Run(run func(ctx context.Context, request serving.PutAiGatewayRequest)) *MockServingEndpointsInterface_PutAiGateway_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.PutAiGatewayRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_PutAiGateway_Call) Return(_a0 *serving.PutAiGatewayResponse, _a1 error) *MockServingEndpointsInterface_PutAiGateway_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_PutAiGateway_Call) RunAndReturn(run func(context.Context, serving.PutAiGatewayRequest) (*serving.PutAiGatewayResponse, error)) *MockServingEndpointsInterface_PutAiGateway_Call { - _c.Call.Return(run) - return _c -} - -// Query provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) Query(ctx context.Context, request serving.QueryEndpointInput) (*serving.QueryEndpointResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Query") - } - - var r0 *serving.QueryEndpointResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.QueryEndpointInput) (*serving.QueryEndpointResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.QueryEndpointInput) *serving.QueryEndpointResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.QueryEndpointResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.QueryEndpointInput) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query' -type MockServingEndpointsInterface_Query_Call struct { - *mock.Call -} - -// Query is a helper method to define mock.On call -// - ctx context.Context -// - request serving.QueryEndpointInput -func (_e *MockServingEndpointsInterface_Expecter) Query(ctx interface{}, request interface{}) *MockServingEndpointsInterface_Query_Call { - return &MockServingEndpointsInterface_Query_Call{Call: _e.mock.On("Query", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_Query_Call) Run(run func(ctx context.Context, request serving.QueryEndpointInput)) *MockServingEndpointsInterface_Query_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.QueryEndpointInput)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_Query_Call) Return(_a0 *serving.QueryEndpointResponse, _a1 error) *MockServingEndpointsInterface_Query_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_Query_Call) RunAndReturn(run func(context.Context, serving.QueryEndpointInput) (*serving.QueryEndpointResponse, error)) *MockServingEndpointsInterface_Query_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) SetPermissions(ctx context.Context, request serving.ServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *serving.ServingEndpointPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.ServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.ServingEndpointPermissionsRequest) *serving.ServingEndpointPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.ServingEndpointPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockServingEndpointsInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request serving.ServingEndpointPermissionsRequest -func (_e *MockServingEndpointsInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockServingEndpointsInterface_SetPermissions_Call { - return &MockServingEndpointsInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_SetPermissions_Call) Run(run func(ctx context.Context, request serving.ServingEndpointPermissionsRequest)) *MockServingEndpointsInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.ServingEndpointPermissionsRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_SetPermissions_Call) Return(_a0 *serving.ServingEndpointPermissions, _a1 error) *MockServingEndpointsInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, serving.ServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error)) *MockServingEndpointsInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// UpdateConfig provides a mock function with given fields: ctx, endpointCoreConfigInput -func (_m *MockServingEndpointsInterface) UpdateConfig(ctx context.Context, endpointCoreConfigInput serving.EndpointCoreConfigInput) (*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], error) { - ret := _m.Called(ctx, endpointCoreConfigInput) - - if len(ret) == 0 { - panic("no return value specified for UpdateConfig") - } - - var r0 *serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.EndpointCoreConfigInput) (*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], error)); ok { - return rf(ctx, endpointCoreConfigInput) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.EndpointCoreConfigInput) *serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed]); ok { - r0 = rf(ctx, endpointCoreConfigInput) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.EndpointCoreConfigInput) error); ok { - r1 = rf(ctx, endpointCoreConfigInput) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_UpdateConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConfig' -type MockServingEndpointsInterface_UpdateConfig_Call struct { - *mock.Call -} - -// UpdateConfig is a helper method to define mock.On call -// - ctx context.Context -// - endpointCoreConfigInput serving.EndpointCoreConfigInput -func (_e *MockServingEndpointsInterface_Expecter) UpdateConfig(ctx interface{}, endpointCoreConfigInput interface{}) *MockServingEndpointsInterface_UpdateConfig_Call { - return &MockServingEndpointsInterface_UpdateConfig_Call{Call: _e.mock.On("UpdateConfig", ctx, endpointCoreConfigInput)} -} - -func (_c *MockServingEndpointsInterface_UpdateConfig_Call) Run(run func(ctx context.Context, endpointCoreConfigInput serving.EndpointCoreConfigInput)) *MockServingEndpointsInterface_UpdateConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.EndpointCoreConfigInput)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_UpdateConfig_Call) Return(_a0 *serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], _a1 error) *MockServingEndpointsInterface_UpdateConfig_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_UpdateConfig_Call) RunAndReturn(run func(context.Context, serving.EndpointCoreConfigInput) (*serving.WaitGetServingEndpointNotUpdating[serving.ServingEndpointDetailed], error)) *MockServingEndpointsInterface_UpdateConfig_Call { - _c.Call.Return(run) - return _c -} - -// UpdateConfigAndWait provides a mock function with given fields: ctx, endpointCoreConfigInput, options -func (_m *MockServingEndpointsInterface) UpdateConfigAndWait(ctx context.Context, endpointCoreConfigInput serving.EndpointCoreConfigInput, options ...retries.Option[serving.ServingEndpointDetailed]) (*serving.ServingEndpointDetailed, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, endpointCoreConfigInput) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for UpdateConfigAndWait") - } - - var r0 *serving.ServingEndpointDetailed - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.EndpointCoreConfigInput, ...retries.Option[serving.ServingEndpointDetailed]) (*serving.ServingEndpointDetailed, error)); ok { - return rf(ctx, endpointCoreConfigInput, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.EndpointCoreConfigInput, ...retries.Option[serving.ServingEndpointDetailed]) *serving.ServingEndpointDetailed); ok { - r0 = rf(ctx, endpointCoreConfigInput, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointDetailed) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.EndpointCoreConfigInput, ...retries.Option[serving.ServingEndpointDetailed]) error); ok { - r1 = rf(ctx, endpointCoreConfigInput, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_UpdateConfigAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConfigAndWait' -type MockServingEndpointsInterface_UpdateConfigAndWait_Call struct { - *mock.Call -} - -// UpdateConfigAndWait is a helper method to define mock.On call -// - ctx context.Context -// - endpointCoreConfigInput serving.EndpointCoreConfigInput -// - options ...retries.Option[serving.ServingEndpointDetailed] -func (_e *MockServingEndpointsInterface_Expecter) UpdateConfigAndWait(ctx interface{}, endpointCoreConfigInput interface{}, options ...interface{}) *MockServingEndpointsInterface_UpdateConfigAndWait_Call { - return &MockServingEndpointsInterface_UpdateConfigAndWait_Call{Call: _e.mock.On("UpdateConfigAndWait", - append([]interface{}{ctx, endpointCoreConfigInput}, options...)...)} -} - -func (_c *MockServingEndpointsInterface_UpdateConfigAndWait_Call) Run(run func(ctx context.Context, endpointCoreConfigInput serving.EndpointCoreConfigInput, options ...retries.Option[serving.ServingEndpointDetailed])) *MockServingEndpointsInterface_UpdateConfigAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[serving.ServingEndpointDetailed], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[serving.ServingEndpointDetailed]) - } - } - run(args[0].(context.Context), args[1].(serving.EndpointCoreConfigInput), variadicArgs...) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_UpdateConfigAndWait_Call) Return(_a0 *serving.ServingEndpointDetailed, _a1 error) *MockServingEndpointsInterface_UpdateConfigAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_UpdateConfigAndWait_Call) RunAndReturn(run func(context.Context, serving.EndpointCoreConfigInput, ...retries.Option[serving.ServingEndpointDetailed]) (*serving.ServingEndpointDetailed, error)) *MockServingEndpointsInterface_UpdateConfigAndWait_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockServingEndpointsInterface) UpdatePermissions(ctx context.Context, request serving.ServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *serving.ServingEndpointPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, serving.ServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, serving.ServingEndpointPermissionsRequest) *serving.ServingEndpointPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, serving.ServingEndpointPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockServingEndpointsInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request serving.ServingEndpointPermissionsRequest -func (_e *MockServingEndpointsInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockServingEndpointsInterface_UpdatePermissions_Call { - return &MockServingEndpointsInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockServingEndpointsInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request serving.ServingEndpointPermissionsRequest)) *MockServingEndpointsInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(serving.ServingEndpointPermissionsRequest)) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_UpdatePermissions_Call) Return(_a0 *serving.ServingEndpointPermissions, _a1 error) *MockServingEndpointsInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, serving.ServingEndpointPermissionsRequest) (*serving.ServingEndpointPermissions, error)) *MockServingEndpointsInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetServingEndpointNotUpdating provides a mock function with given fields: ctx, name, timeout, callback -func (_m *MockServingEndpointsInterface) WaitGetServingEndpointNotUpdating(ctx context.Context, name string, timeout time.Duration, callback func(*serving.ServingEndpointDetailed)) (*serving.ServingEndpointDetailed, error) { - ret := _m.Called(ctx, name, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetServingEndpointNotUpdating") - } - - var r0 *serving.ServingEndpointDetailed - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*serving.ServingEndpointDetailed)) (*serving.ServingEndpointDetailed, error)); ok { - return rf(ctx, name, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*serving.ServingEndpointDetailed)) *serving.ServingEndpointDetailed); ok { - r0 = rf(ctx, name, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*serving.ServingEndpointDetailed) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*serving.ServingEndpointDetailed)) error); ok { - r1 = rf(ctx, name, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetServingEndpointNotUpdating' -type MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call struct { - *mock.Call -} - -// WaitGetServingEndpointNotUpdating is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - timeout time.Duration -// - callback func(*serving.ServingEndpointDetailed) -func (_e *MockServingEndpointsInterface_Expecter) WaitGetServingEndpointNotUpdating(ctx interface{}, name interface{}, timeout interface{}, callback interface{}) *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call { - return &MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call{Call: _e.mock.On("WaitGetServingEndpointNotUpdating", ctx, name, timeout, callback)} -} - -func (_c *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call) Run(run func(ctx context.Context, name string, timeout time.Duration, callback func(*serving.ServingEndpointDetailed))) *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*serving.ServingEndpointDetailed))) - }) - return _c -} - -func (_c *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call) Return(_a0 *serving.ServingEndpointDetailed, _a1 error) *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*serving.ServingEndpointDetailed)) (*serving.ServingEndpointDetailed, error)) *MockServingEndpointsInterface_WaitGetServingEndpointNotUpdating_Call { - _c.Call.Return(run) - return _c -} - -// NewMockServingEndpointsInterface creates a new instance of MockServingEndpointsInterface. 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 NewMockServingEndpointsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockServingEndpointsInterface { - mock := &MockServingEndpointsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_account_ip_access_lists_interface.go b/experimental/mocks/service/settings/mock_account_ip_access_lists_interface.go deleted file mode 100644 index d0a7599ba..000000000 --- a/experimental/mocks/service/settings/mock_account_ip_access_lists_interface.go +++ /dev/null @@ -1,627 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - settings "github.com/databricks/databricks-sdk-go/service/settings" -) - -// MockAccountIpAccessListsInterface is an autogenerated mock type for the AccountIpAccessListsInterface type -type MockAccountIpAccessListsInterface struct { - mock.Mock -} - -type MockAccountIpAccessListsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountIpAccessListsInterface) EXPECT() *MockAccountIpAccessListsInterface_Expecter { - return &MockAccountIpAccessListsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAccountIpAccessListsInterface) Create(ctx context.Context, request settings.CreateIpAccessList) (*settings.CreateIpAccessListResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *settings.CreateIpAccessListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateIpAccessList) (*settings.CreateIpAccessListResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateIpAccessList) *settings.CreateIpAccessListResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.CreateIpAccessListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.CreateIpAccessList) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountIpAccessListsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAccountIpAccessListsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request settings.CreateIpAccessList -func (_e *MockAccountIpAccessListsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAccountIpAccessListsInterface_Create_Call { - return &MockAccountIpAccessListsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAccountIpAccessListsInterface_Create_Call) Run(run func(ctx context.Context, request settings.CreateIpAccessList)) *MockAccountIpAccessListsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.CreateIpAccessList)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Create_Call) Return(_a0 *settings.CreateIpAccessListResponse, _a1 error) *MockAccountIpAccessListsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Create_Call) RunAndReturn(run func(context.Context, settings.CreateIpAccessList) (*settings.CreateIpAccessListResponse, error)) *MockAccountIpAccessListsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAccountIpAccessListsInterface) Delete(ctx context.Context, request settings.DeleteAccountIpAccessListRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteAccountIpAccessListRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountIpAccessListsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAccountIpAccessListsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteAccountIpAccessListRequest -func (_e *MockAccountIpAccessListsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAccountIpAccessListsInterface_Delete_Call { - return &MockAccountIpAccessListsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAccountIpAccessListsInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteAccountIpAccessListRequest)) *MockAccountIpAccessListsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteAccountIpAccessListRequest)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Delete_Call) Return(_a0 error) *MockAccountIpAccessListsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteAccountIpAccessListRequest) error) *MockAccountIpAccessListsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByIpAccessListId provides a mock function with given fields: ctx, ipAccessListId -func (_m *MockAccountIpAccessListsInterface) DeleteByIpAccessListId(ctx context.Context, ipAccessListId string) error { - ret := _m.Called(ctx, ipAccessListId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByIpAccessListId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, ipAccessListId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByIpAccessListId' -type MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call struct { - *mock.Call -} - -// DeleteByIpAccessListId is a helper method to define mock.On call -// - ctx context.Context -// - ipAccessListId string -func (_e *MockAccountIpAccessListsInterface_Expecter) DeleteByIpAccessListId(ctx interface{}, ipAccessListId interface{}) *MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call { - return &MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call{Call: _e.mock.On("DeleteByIpAccessListId", ctx, ipAccessListId)} -} - -func (_c *MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call) Run(run func(ctx context.Context, ipAccessListId string)) *MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call) Return(_a0 error) *MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call) RunAndReturn(run func(context.Context, string) error) *MockAccountIpAccessListsInterface_DeleteByIpAccessListId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAccountIpAccessListsInterface) Get(ctx context.Context, request settings.GetAccountIpAccessListRequest) (*settings.GetIpAccessListResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.GetIpAccessListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAccountIpAccessListRequest) (*settings.GetIpAccessListResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAccountIpAccessListRequest) *settings.GetIpAccessListResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.GetIpAccessListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetAccountIpAccessListRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountIpAccessListsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAccountIpAccessListsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetAccountIpAccessListRequest -func (_e *MockAccountIpAccessListsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAccountIpAccessListsInterface_Get_Call { - return &MockAccountIpAccessListsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAccountIpAccessListsInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetAccountIpAccessListRequest)) *MockAccountIpAccessListsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetAccountIpAccessListRequest)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Get_Call) Return(_a0 *settings.GetIpAccessListResponse, _a1 error) *MockAccountIpAccessListsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetAccountIpAccessListRequest) (*settings.GetIpAccessListResponse, error)) *MockAccountIpAccessListsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByIpAccessListId provides a mock function with given fields: ctx, ipAccessListId -func (_m *MockAccountIpAccessListsInterface) GetByIpAccessListId(ctx context.Context, ipAccessListId string) (*settings.GetIpAccessListResponse, error) { - ret := _m.Called(ctx, ipAccessListId) - - if len(ret) == 0 { - panic("no return value specified for GetByIpAccessListId") - } - - var r0 *settings.GetIpAccessListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.GetIpAccessListResponse, error)); ok { - return rf(ctx, ipAccessListId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.GetIpAccessListResponse); ok { - r0 = rf(ctx, ipAccessListId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.GetIpAccessListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, ipAccessListId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountIpAccessListsInterface_GetByIpAccessListId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByIpAccessListId' -type MockAccountIpAccessListsInterface_GetByIpAccessListId_Call struct { - *mock.Call -} - -// GetByIpAccessListId is a helper method to define mock.On call -// - ctx context.Context -// - ipAccessListId string -func (_e *MockAccountIpAccessListsInterface_Expecter) GetByIpAccessListId(ctx interface{}, ipAccessListId interface{}) *MockAccountIpAccessListsInterface_GetByIpAccessListId_Call { - return &MockAccountIpAccessListsInterface_GetByIpAccessListId_Call{Call: _e.mock.On("GetByIpAccessListId", ctx, ipAccessListId)} -} - -func (_c *MockAccountIpAccessListsInterface_GetByIpAccessListId_Call) Run(run func(ctx context.Context, ipAccessListId string)) *MockAccountIpAccessListsInterface_GetByIpAccessListId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_GetByIpAccessListId_Call) Return(_a0 *settings.GetIpAccessListResponse, _a1 error) *MockAccountIpAccessListsInterface_GetByIpAccessListId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_GetByIpAccessListId_Call) RunAndReturn(run func(context.Context, string) (*settings.GetIpAccessListResponse, error)) *MockAccountIpAccessListsInterface_GetByIpAccessListId_Call { - _c.Call.Return(run) - return _c -} - -// GetByLabel provides a mock function with given fields: ctx, name -func (_m *MockAccountIpAccessListsInterface) GetByLabel(ctx context.Context, name string) (*settings.IpAccessListInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByLabel") - } - - var r0 *settings.IpAccessListInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.IpAccessListInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.IpAccessListInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.IpAccessListInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountIpAccessListsInterface_GetByLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByLabel' -type MockAccountIpAccessListsInterface_GetByLabel_Call struct { - *mock.Call -} - -// GetByLabel is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAccountIpAccessListsInterface_Expecter) GetByLabel(ctx interface{}, name interface{}) *MockAccountIpAccessListsInterface_GetByLabel_Call { - return &MockAccountIpAccessListsInterface_GetByLabel_Call{Call: _e.mock.On("GetByLabel", ctx, name)} -} - -func (_c *MockAccountIpAccessListsInterface_GetByLabel_Call) Run(run func(ctx context.Context, name string)) *MockAccountIpAccessListsInterface_GetByLabel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_GetByLabel_Call) Return(_a0 *settings.IpAccessListInfo, _a1 error) *MockAccountIpAccessListsInterface_GetByLabel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_GetByLabel_Call) RunAndReturn(run func(context.Context, string) (*settings.IpAccessListInfo, error)) *MockAccountIpAccessListsInterface_GetByLabel_Call { - _c.Call.Return(run) - return _c -} - -// IpAccessListInfoLabelToListIdMap provides a mock function with given fields: ctx -func (_m *MockAccountIpAccessListsInterface) IpAccessListInfoLabelToListIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for IpAccessListInfoLabelToListIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IpAccessListInfoLabelToListIdMap' -type MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call struct { - *mock.Call -} - -// IpAccessListInfoLabelToListIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAccountIpAccessListsInterface_Expecter) IpAccessListInfoLabelToListIdMap(ctx interface{}) *MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - return &MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call{Call: _e.mock.On("IpAccessListInfoLabelToListIdMap", ctx)} -} - -func (_c *MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call) Run(run func(ctx context.Context)) *MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockAccountIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockAccountIpAccessListsInterface) List(ctx context.Context) listing.Iterator[settings.IpAccessListInfo] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[settings.IpAccessListInfo] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[settings.IpAccessListInfo]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[settings.IpAccessListInfo]) - } - } - - return r0 -} - -// MockAccountIpAccessListsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAccountIpAccessListsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAccountIpAccessListsInterface_Expecter) List(ctx interface{}) *MockAccountIpAccessListsInterface_List_Call { - return &MockAccountIpAccessListsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockAccountIpAccessListsInterface_List_Call) Run(run func(ctx context.Context)) *MockAccountIpAccessListsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_List_Call) Return(_a0 listing.Iterator[settings.IpAccessListInfo]) *MockAccountIpAccessListsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[settings.IpAccessListInfo]) *MockAccountIpAccessListsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockAccountIpAccessListsInterface) ListAll(ctx context.Context) ([]settings.IpAccessListInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []settings.IpAccessListInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]settings.IpAccessListInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []settings.IpAccessListInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]settings.IpAccessListInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAccountIpAccessListsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAccountIpAccessListsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAccountIpAccessListsInterface_Expecter) ListAll(ctx interface{}) *MockAccountIpAccessListsInterface_ListAll_Call { - return &MockAccountIpAccessListsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockAccountIpAccessListsInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockAccountIpAccessListsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_ListAll_Call) Return(_a0 []settings.IpAccessListInfo, _a1 error) *MockAccountIpAccessListsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]settings.IpAccessListInfo, error)) *MockAccountIpAccessListsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Replace provides a mock function with given fields: ctx, request -func (_m *MockAccountIpAccessListsInterface) Replace(ctx context.Context, request settings.ReplaceIpAccessList) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Replace") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ReplaceIpAccessList) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountIpAccessListsInterface_Replace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Replace' -type MockAccountIpAccessListsInterface_Replace_Call struct { - *mock.Call -} - -// Replace is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ReplaceIpAccessList -func (_e *MockAccountIpAccessListsInterface_Expecter) Replace(ctx interface{}, request interface{}) *MockAccountIpAccessListsInterface_Replace_Call { - return &MockAccountIpAccessListsInterface_Replace_Call{Call: _e.mock.On("Replace", ctx, request)} -} - -func (_c *MockAccountIpAccessListsInterface_Replace_Call) Run(run func(ctx context.Context, request settings.ReplaceIpAccessList)) *MockAccountIpAccessListsInterface_Replace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ReplaceIpAccessList)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Replace_Call) Return(_a0 error) *MockAccountIpAccessListsInterface_Replace_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Replace_Call) RunAndReturn(run func(context.Context, settings.ReplaceIpAccessList) error) *MockAccountIpAccessListsInterface_Replace_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAccountIpAccessListsInterface) Update(ctx context.Context, request settings.UpdateIpAccessList) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateIpAccessList) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAccountIpAccessListsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAccountIpAccessListsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateIpAccessList -func (_e *MockAccountIpAccessListsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAccountIpAccessListsInterface_Update_Call { - return &MockAccountIpAccessListsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAccountIpAccessListsInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateIpAccessList)) *MockAccountIpAccessListsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateIpAccessList)) - }) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Update_Call) Return(_a0 error) *MockAccountIpAccessListsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountIpAccessListsInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateIpAccessList) error) *MockAccountIpAccessListsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountIpAccessListsInterface creates a new instance of MockAccountIpAccessListsInterface. 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 NewMockAccountIpAccessListsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountIpAccessListsInterface { - mock := &MockAccountIpAccessListsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_account_settings_interface.go b/experimental/mocks/service/settings/mock_account_settings_interface.go deleted file mode 100644 index 978c4cc7e..000000000 --- a/experimental/mocks/service/settings/mock_account_settings_interface.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockAccountSettingsInterface is an autogenerated mock type for the AccountSettingsInterface type -type MockAccountSettingsInterface struct { - mock.Mock -} - -type MockAccountSettingsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAccountSettingsInterface) EXPECT() *MockAccountSettingsInterface_Expecter { - return &MockAccountSettingsInterface_Expecter{mock: &_m.Mock} -} - -// CspEnablementAccount provides a mock function with given fields: -func (_m *MockAccountSettingsInterface) CspEnablementAccount() settings.CspEnablementAccountInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for CspEnablementAccount") - } - - var r0 settings.CspEnablementAccountInterface - if rf, ok := ret.Get(0).(func() settings.CspEnablementAccountInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.CspEnablementAccountInterface) - } - } - - return r0 -} - -// MockAccountSettingsInterface_CspEnablementAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CspEnablementAccount' -type MockAccountSettingsInterface_CspEnablementAccount_Call struct { - *mock.Call -} - -// CspEnablementAccount is a helper method to define mock.On call -func (_e *MockAccountSettingsInterface_Expecter) CspEnablementAccount() *MockAccountSettingsInterface_CspEnablementAccount_Call { - return &MockAccountSettingsInterface_CspEnablementAccount_Call{Call: _e.mock.On("CspEnablementAccount")} -} - -func (_c *MockAccountSettingsInterface_CspEnablementAccount_Call) Run(run func()) *MockAccountSettingsInterface_CspEnablementAccount_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountSettingsInterface_CspEnablementAccount_Call) Return(_a0 settings.CspEnablementAccountInterface) *MockAccountSettingsInterface_CspEnablementAccount_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountSettingsInterface_CspEnablementAccount_Call) RunAndReturn(run func() settings.CspEnablementAccountInterface) *MockAccountSettingsInterface_CspEnablementAccount_Call { - _c.Call.Return(run) - return _c -} - -// DisableLegacyFeatures provides a mock function with given fields: -func (_m *MockAccountSettingsInterface) DisableLegacyFeatures() settings.DisableLegacyFeaturesInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DisableLegacyFeatures") - } - - var r0 settings.DisableLegacyFeaturesInterface - if rf, ok := ret.Get(0).(func() settings.DisableLegacyFeaturesInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.DisableLegacyFeaturesInterface) - } - } - - return r0 -} - -// MockAccountSettingsInterface_DisableLegacyFeatures_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableLegacyFeatures' -type MockAccountSettingsInterface_DisableLegacyFeatures_Call struct { - *mock.Call -} - -// DisableLegacyFeatures is a helper method to define mock.On call -func (_e *MockAccountSettingsInterface_Expecter) DisableLegacyFeatures() *MockAccountSettingsInterface_DisableLegacyFeatures_Call { - return &MockAccountSettingsInterface_DisableLegacyFeatures_Call{Call: _e.mock.On("DisableLegacyFeatures")} -} - -func (_c *MockAccountSettingsInterface_DisableLegacyFeatures_Call) Run(run func()) *MockAccountSettingsInterface_DisableLegacyFeatures_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountSettingsInterface_DisableLegacyFeatures_Call) Return(_a0 settings.DisableLegacyFeaturesInterface) *MockAccountSettingsInterface_DisableLegacyFeatures_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountSettingsInterface_DisableLegacyFeatures_Call) RunAndReturn(run func() settings.DisableLegacyFeaturesInterface) *MockAccountSettingsInterface_DisableLegacyFeatures_Call { - _c.Call.Return(run) - return _c -} - -// EsmEnablementAccount provides a mock function with given fields: -func (_m *MockAccountSettingsInterface) EsmEnablementAccount() settings.EsmEnablementAccountInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for EsmEnablementAccount") - } - - var r0 settings.EsmEnablementAccountInterface - if rf, ok := ret.Get(0).(func() settings.EsmEnablementAccountInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.EsmEnablementAccountInterface) - } - } - - return r0 -} - -// MockAccountSettingsInterface_EsmEnablementAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EsmEnablementAccount' -type MockAccountSettingsInterface_EsmEnablementAccount_Call struct { - *mock.Call -} - -// EsmEnablementAccount is a helper method to define mock.On call -func (_e *MockAccountSettingsInterface_Expecter) EsmEnablementAccount() *MockAccountSettingsInterface_EsmEnablementAccount_Call { - return &MockAccountSettingsInterface_EsmEnablementAccount_Call{Call: _e.mock.On("EsmEnablementAccount")} -} - -func (_c *MockAccountSettingsInterface_EsmEnablementAccount_Call) Run(run func()) *MockAccountSettingsInterface_EsmEnablementAccount_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountSettingsInterface_EsmEnablementAccount_Call) Return(_a0 settings.EsmEnablementAccountInterface) *MockAccountSettingsInterface_EsmEnablementAccount_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountSettingsInterface_EsmEnablementAccount_Call) RunAndReturn(run func() settings.EsmEnablementAccountInterface) *MockAccountSettingsInterface_EsmEnablementAccount_Call { - _c.Call.Return(run) - return _c -} - -// PersonalCompute provides a mock function with given fields: -func (_m *MockAccountSettingsInterface) PersonalCompute() settings.PersonalComputeInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for PersonalCompute") - } - - var r0 settings.PersonalComputeInterface - if rf, ok := ret.Get(0).(func() settings.PersonalComputeInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.PersonalComputeInterface) - } - } - - return r0 -} - -// MockAccountSettingsInterface_PersonalCompute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PersonalCompute' -type MockAccountSettingsInterface_PersonalCompute_Call struct { - *mock.Call -} - -// PersonalCompute is a helper method to define mock.On call -func (_e *MockAccountSettingsInterface_Expecter) PersonalCompute() *MockAccountSettingsInterface_PersonalCompute_Call { - return &MockAccountSettingsInterface_PersonalCompute_Call{Call: _e.mock.On("PersonalCompute")} -} - -func (_c *MockAccountSettingsInterface_PersonalCompute_Call) Run(run func()) *MockAccountSettingsInterface_PersonalCompute_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockAccountSettingsInterface_PersonalCompute_Call) Return(_a0 settings.PersonalComputeInterface) *MockAccountSettingsInterface_PersonalCompute_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAccountSettingsInterface_PersonalCompute_Call) RunAndReturn(run func() settings.PersonalComputeInterface) *MockAccountSettingsInterface_PersonalCompute_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAccountSettingsInterface creates a new instance of MockAccountSettingsInterface. 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 NewMockAccountSettingsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAccountSettingsInterface { - mock := &MockAccountSettingsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_aibi_dashboard_embedding_access_policy_interface.go b/experimental/mocks/service/settings/mock_aibi_dashboard_embedding_access_policy_interface.go deleted file mode 100644 index 1c7bdfb20..000000000 --- a/experimental/mocks/service/settings/mock_aibi_dashboard_embedding_access_policy_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockAibiDashboardEmbeddingAccessPolicyInterface is an autogenerated mock type for the AibiDashboardEmbeddingAccessPolicyInterface type -type MockAibiDashboardEmbeddingAccessPolicyInterface struct { - mock.Mock -} - -type MockAibiDashboardEmbeddingAccessPolicyInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAibiDashboardEmbeddingAccessPolicyInterface) EXPECT() *MockAibiDashboardEmbeddingAccessPolicyInterface_Expecter { - return &MockAibiDashboardEmbeddingAccessPolicyInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAibiDashboardEmbeddingAccessPolicyInterface) Delete(ctx context.Context, request settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.DeleteAibiDashboardEmbeddingAccessPolicySettingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeleteAibiDashboardEmbeddingAccessPolicySettingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.DeleteAibiDashboardEmbeddingAccessPolicySettingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) *settings.DeleteAibiDashboardEmbeddingAccessPolicySettingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeleteAibiDashboardEmbeddingAccessPolicySettingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest -func (_e *MockAibiDashboardEmbeddingAccessPolicyInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call { - return &MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest)) *MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest)) - }) - return _c -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call) Return(_a0 *settings.DeleteAibiDashboardEmbeddingAccessPolicySettingResponse, _a1 error) *MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.DeleteAibiDashboardEmbeddingAccessPolicySettingResponse, error)) *MockAibiDashboardEmbeddingAccessPolicyInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAibiDashboardEmbeddingAccessPolicyInterface) Get(ctx context.Context, request settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.AibiDashboardEmbeddingAccessPolicySetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.AibiDashboardEmbeddingAccessPolicySetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.AibiDashboardEmbeddingAccessPolicySetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest) *settings.AibiDashboardEmbeddingAccessPolicySetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.AibiDashboardEmbeddingAccessPolicySetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest -func (_e *MockAibiDashboardEmbeddingAccessPolicyInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call { - return &MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest)) *MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest)) - }) - return _c -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call) Return(_a0 *settings.AibiDashboardEmbeddingAccessPolicySetting, _a1 error) *MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.AibiDashboardEmbeddingAccessPolicySetting, error)) *MockAibiDashboardEmbeddingAccessPolicyInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAibiDashboardEmbeddingAccessPolicyInterface) Update(ctx context.Context, request settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.AibiDashboardEmbeddingAccessPolicySetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.AibiDashboardEmbeddingAccessPolicySetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.AibiDashboardEmbeddingAccessPolicySetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) *settings.AibiDashboardEmbeddingAccessPolicySetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.AibiDashboardEmbeddingAccessPolicySetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest -func (_e *MockAibiDashboardEmbeddingAccessPolicyInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call { - return &MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest)) *MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest)) - }) - return _c -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call) Return(_a0 *settings.AibiDashboardEmbeddingAccessPolicySetting, _a1 error) *MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) (*settings.AibiDashboardEmbeddingAccessPolicySetting, error)) *MockAibiDashboardEmbeddingAccessPolicyInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAibiDashboardEmbeddingAccessPolicyInterface creates a new instance of MockAibiDashboardEmbeddingAccessPolicyInterface. 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 NewMockAibiDashboardEmbeddingAccessPolicyInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAibiDashboardEmbeddingAccessPolicyInterface { - mock := &MockAibiDashboardEmbeddingAccessPolicyInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_aibi_dashboard_embedding_approved_domains_interface.go b/experimental/mocks/service/settings/mock_aibi_dashboard_embedding_approved_domains_interface.go deleted file mode 100644 index 059be7623..000000000 --- a/experimental/mocks/service/settings/mock_aibi_dashboard_embedding_approved_domains_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockAibiDashboardEmbeddingApprovedDomainsInterface is an autogenerated mock type for the AibiDashboardEmbeddingApprovedDomainsInterface type -type MockAibiDashboardEmbeddingApprovedDomainsInterface struct { - mock.Mock -} - -type MockAibiDashboardEmbeddingApprovedDomainsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAibiDashboardEmbeddingApprovedDomainsInterface) EXPECT() *MockAibiDashboardEmbeddingApprovedDomainsInterface_Expecter { - return &MockAibiDashboardEmbeddingApprovedDomainsInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAibiDashboardEmbeddingApprovedDomainsInterface) Delete(ctx context.Context, request settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) *settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest -func (_e *MockAibiDashboardEmbeddingApprovedDomainsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call { - return &MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest)) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest)) - }) - return _c -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call) Return(_a0 *settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse, _a1 error) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.DeleteAibiDashboardEmbeddingApprovedDomainsSettingResponse, error)) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAibiDashboardEmbeddingApprovedDomainsInterface) Get(ctx context.Context, request settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.AibiDashboardEmbeddingApprovedDomainsSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.AibiDashboardEmbeddingApprovedDomainsSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.AibiDashboardEmbeddingApprovedDomainsSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) *settings.AibiDashboardEmbeddingApprovedDomainsSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.AibiDashboardEmbeddingApprovedDomainsSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest -func (_e *MockAibiDashboardEmbeddingApprovedDomainsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call { - return &MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest)) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest)) - }) - return _c -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call) Return(_a0 *settings.AibiDashboardEmbeddingApprovedDomainsSetting, _a1 error) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.AibiDashboardEmbeddingApprovedDomainsSetting, error)) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAibiDashboardEmbeddingApprovedDomainsInterface) Update(ctx context.Context, request settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.AibiDashboardEmbeddingApprovedDomainsSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.AibiDashboardEmbeddingApprovedDomainsSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.AibiDashboardEmbeddingApprovedDomainsSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) *settings.AibiDashboardEmbeddingApprovedDomainsSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.AibiDashboardEmbeddingApprovedDomainsSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest -func (_e *MockAibiDashboardEmbeddingApprovedDomainsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call { - return &MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest)) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest)) - }) - return _c -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call) Return(_a0 *settings.AibiDashboardEmbeddingApprovedDomainsSetting, _a1 error) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*settings.AibiDashboardEmbeddingApprovedDomainsSetting, error)) *MockAibiDashboardEmbeddingApprovedDomainsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAibiDashboardEmbeddingApprovedDomainsInterface creates a new instance of MockAibiDashboardEmbeddingApprovedDomainsInterface. 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 NewMockAibiDashboardEmbeddingApprovedDomainsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAibiDashboardEmbeddingApprovedDomainsInterface { - mock := &MockAibiDashboardEmbeddingApprovedDomainsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_automatic_cluster_update_interface.go b/experimental/mocks/service/settings/mock_automatic_cluster_update_interface.go deleted file mode 100644 index 45d44fdaa..000000000 --- a/experimental/mocks/service/settings/mock_automatic_cluster_update_interface.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockAutomaticClusterUpdateInterface is an autogenerated mock type for the AutomaticClusterUpdateInterface type -type MockAutomaticClusterUpdateInterface struct { - mock.Mock -} - -type MockAutomaticClusterUpdateInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAutomaticClusterUpdateInterface) EXPECT() *MockAutomaticClusterUpdateInterface_Expecter { - return &MockAutomaticClusterUpdateInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAutomaticClusterUpdateInterface) Get(ctx context.Context, request settings.GetAutomaticClusterUpdateSettingRequest) (*settings.AutomaticClusterUpdateSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.AutomaticClusterUpdateSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAutomaticClusterUpdateSettingRequest) (*settings.AutomaticClusterUpdateSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetAutomaticClusterUpdateSettingRequest) *settings.AutomaticClusterUpdateSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.AutomaticClusterUpdateSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetAutomaticClusterUpdateSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAutomaticClusterUpdateInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAutomaticClusterUpdateInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetAutomaticClusterUpdateSettingRequest -func (_e *MockAutomaticClusterUpdateInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAutomaticClusterUpdateInterface_Get_Call { - return &MockAutomaticClusterUpdateInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAutomaticClusterUpdateInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetAutomaticClusterUpdateSettingRequest)) *MockAutomaticClusterUpdateInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetAutomaticClusterUpdateSettingRequest)) - }) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_Get_Call) Return(_a0 *settings.AutomaticClusterUpdateSetting, _a1 error) *MockAutomaticClusterUpdateInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetAutomaticClusterUpdateSettingRequest) (*settings.AutomaticClusterUpdateSetting, error)) *MockAutomaticClusterUpdateInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAutomaticClusterUpdateInterface) Update(ctx context.Context, request settings.UpdateAutomaticClusterUpdateSettingRequest) (*settings.AutomaticClusterUpdateSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.AutomaticClusterUpdateSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateAutomaticClusterUpdateSettingRequest) (*settings.AutomaticClusterUpdateSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateAutomaticClusterUpdateSettingRequest) *settings.AutomaticClusterUpdateSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.AutomaticClusterUpdateSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateAutomaticClusterUpdateSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAutomaticClusterUpdateInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAutomaticClusterUpdateInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateAutomaticClusterUpdateSettingRequest -func (_e *MockAutomaticClusterUpdateInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAutomaticClusterUpdateInterface_Update_Call { - return &MockAutomaticClusterUpdateInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAutomaticClusterUpdateInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateAutomaticClusterUpdateSettingRequest)) *MockAutomaticClusterUpdateInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateAutomaticClusterUpdateSettingRequest)) - }) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_Update_Call) Return(_a0 *settings.AutomaticClusterUpdateSetting, _a1 error) *MockAutomaticClusterUpdateInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAutomaticClusterUpdateInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateAutomaticClusterUpdateSettingRequest) (*settings.AutomaticClusterUpdateSetting, error)) *MockAutomaticClusterUpdateInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAutomaticClusterUpdateInterface creates a new instance of MockAutomaticClusterUpdateInterface. 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 NewMockAutomaticClusterUpdateInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAutomaticClusterUpdateInterface { - mock := &MockAutomaticClusterUpdateInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_compliance_security_profile_interface.go b/experimental/mocks/service/settings/mock_compliance_security_profile_interface.go deleted file mode 100644 index e16518dd4..000000000 --- a/experimental/mocks/service/settings/mock_compliance_security_profile_interface.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockComplianceSecurityProfileInterface is an autogenerated mock type for the ComplianceSecurityProfileInterface type -type MockComplianceSecurityProfileInterface struct { - mock.Mock -} - -type MockComplianceSecurityProfileInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockComplianceSecurityProfileInterface) EXPECT() *MockComplianceSecurityProfileInterface_Expecter { - return &MockComplianceSecurityProfileInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockComplianceSecurityProfileInterface) Get(ctx context.Context, request settings.GetComplianceSecurityProfileSettingRequest) (*settings.ComplianceSecurityProfileSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.ComplianceSecurityProfileSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetComplianceSecurityProfileSettingRequest) (*settings.ComplianceSecurityProfileSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetComplianceSecurityProfileSettingRequest) *settings.ComplianceSecurityProfileSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.ComplianceSecurityProfileSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetComplianceSecurityProfileSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockComplianceSecurityProfileInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockComplianceSecurityProfileInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetComplianceSecurityProfileSettingRequest -func (_e *MockComplianceSecurityProfileInterface_Expecter) Get(ctx interface{}, request interface{}) *MockComplianceSecurityProfileInterface_Get_Call { - return &MockComplianceSecurityProfileInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockComplianceSecurityProfileInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetComplianceSecurityProfileSettingRequest)) *MockComplianceSecurityProfileInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetComplianceSecurityProfileSettingRequest)) - }) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_Get_Call) Return(_a0 *settings.ComplianceSecurityProfileSetting, _a1 error) *MockComplianceSecurityProfileInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetComplianceSecurityProfileSettingRequest) (*settings.ComplianceSecurityProfileSetting, error)) *MockComplianceSecurityProfileInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockComplianceSecurityProfileInterface) Update(ctx context.Context, request settings.UpdateComplianceSecurityProfileSettingRequest) (*settings.ComplianceSecurityProfileSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.ComplianceSecurityProfileSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateComplianceSecurityProfileSettingRequest) (*settings.ComplianceSecurityProfileSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateComplianceSecurityProfileSettingRequest) *settings.ComplianceSecurityProfileSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.ComplianceSecurityProfileSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateComplianceSecurityProfileSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockComplianceSecurityProfileInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockComplianceSecurityProfileInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateComplianceSecurityProfileSettingRequest -func (_e *MockComplianceSecurityProfileInterface_Expecter) Update(ctx interface{}, request interface{}) *MockComplianceSecurityProfileInterface_Update_Call { - return &MockComplianceSecurityProfileInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockComplianceSecurityProfileInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateComplianceSecurityProfileSettingRequest)) *MockComplianceSecurityProfileInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateComplianceSecurityProfileSettingRequest)) - }) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_Update_Call) Return(_a0 *settings.ComplianceSecurityProfileSetting, _a1 error) *MockComplianceSecurityProfileInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockComplianceSecurityProfileInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateComplianceSecurityProfileSettingRequest) (*settings.ComplianceSecurityProfileSetting, error)) *MockComplianceSecurityProfileInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockComplianceSecurityProfileInterface creates a new instance of MockComplianceSecurityProfileInterface. 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 NewMockComplianceSecurityProfileInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockComplianceSecurityProfileInterface { - mock := &MockComplianceSecurityProfileInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_credentials_manager_interface.go b/experimental/mocks/service/settings/mock_credentials_manager_interface.go deleted file mode 100644 index c23f9f2dd..000000000 --- a/experimental/mocks/service/settings/mock_credentials_manager_interface.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockCredentialsManagerInterface is an autogenerated mock type for the CredentialsManagerInterface type -type MockCredentialsManagerInterface struct { - mock.Mock -} - -type MockCredentialsManagerInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCredentialsManagerInterface) EXPECT() *MockCredentialsManagerInterface_Expecter { - return &MockCredentialsManagerInterface_Expecter{mock: &_m.Mock} -} - -// ExchangeToken provides a mock function with given fields: ctx, request -func (_m *MockCredentialsManagerInterface) ExchangeToken(ctx context.Context, request settings.ExchangeTokenRequest) (*settings.ExchangeTokenResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExchangeToken") - } - - var r0 *settings.ExchangeTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ExchangeTokenRequest) (*settings.ExchangeTokenResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.ExchangeTokenRequest) *settings.ExchangeTokenResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.ExchangeTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.ExchangeTokenRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCredentialsManagerInterface_ExchangeToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExchangeToken' -type MockCredentialsManagerInterface_ExchangeToken_Call struct { - *mock.Call -} - -// ExchangeToken is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ExchangeTokenRequest -func (_e *MockCredentialsManagerInterface_Expecter) ExchangeToken(ctx interface{}, request interface{}) *MockCredentialsManagerInterface_ExchangeToken_Call { - return &MockCredentialsManagerInterface_ExchangeToken_Call{Call: _e.mock.On("ExchangeToken", ctx, request)} -} - -func (_c *MockCredentialsManagerInterface_ExchangeToken_Call) Run(run func(ctx context.Context, request settings.ExchangeTokenRequest)) *MockCredentialsManagerInterface_ExchangeToken_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ExchangeTokenRequest)) - }) - return _c -} - -func (_c *MockCredentialsManagerInterface_ExchangeToken_Call) Return(_a0 *settings.ExchangeTokenResponse, _a1 error) *MockCredentialsManagerInterface_ExchangeToken_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCredentialsManagerInterface_ExchangeToken_Call) RunAndReturn(run func(context.Context, settings.ExchangeTokenRequest) (*settings.ExchangeTokenResponse, error)) *MockCredentialsManagerInterface_ExchangeToken_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCredentialsManagerInterface creates a new instance of MockCredentialsManagerInterface. 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 NewMockCredentialsManagerInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCredentialsManagerInterface { - mock := &MockCredentialsManagerInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_csp_enablement_account_interface.go b/experimental/mocks/service/settings/mock_csp_enablement_account_interface.go deleted file mode 100644 index 97bfb1918..000000000 --- a/experimental/mocks/service/settings/mock_csp_enablement_account_interface.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockCspEnablementAccountInterface is an autogenerated mock type for the CspEnablementAccountInterface type -type MockCspEnablementAccountInterface struct { - mock.Mock -} - -type MockCspEnablementAccountInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockCspEnablementAccountInterface) EXPECT() *MockCspEnablementAccountInterface_Expecter { - return &MockCspEnablementAccountInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockCspEnablementAccountInterface) Get(ctx context.Context, request settings.GetCspEnablementAccountSettingRequest) (*settings.CspEnablementAccountSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.CspEnablementAccountSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetCspEnablementAccountSettingRequest) (*settings.CspEnablementAccountSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetCspEnablementAccountSettingRequest) *settings.CspEnablementAccountSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.CspEnablementAccountSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetCspEnablementAccountSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCspEnablementAccountInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockCspEnablementAccountInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetCspEnablementAccountSettingRequest -func (_e *MockCspEnablementAccountInterface_Expecter) Get(ctx interface{}, request interface{}) *MockCspEnablementAccountInterface_Get_Call { - return &MockCspEnablementAccountInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockCspEnablementAccountInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetCspEnablementAccountSettingRequest)) *MockCspEnablementAccountInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetCspEnablementAccountSettingRequest)) - }) - return _c -} - -func (_c *MockCspEnablementAccountInterface_Get_Call) Return(_a0 *settings.CspEnablementAccountSetting, _a1 error) *MockCspEnablementAccountInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCspEnablementAccountInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetCspEnablementAccountSettingRequest) (*settings.CspEnablementAccountSetting, error)) *MockCspEnablementAccountInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockCspEnablementAccountInterface) Update(ctx context.Context, request settings.UpdateCspEnablementAccountSettingRequest) (*settings.CspEnablementAccountSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.CspEnablementAccountSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateCspEnablementAccountSettingRequest) (*settings.CspEnablementAccountSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateCspEnablementAccountSettingRequest) *settings.CspEnablementAccountSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.CspEnablementAccountSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateCspEnablementAccountSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockCspEnablementAccountInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockCspEnablementAccountInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateCspEnablementAccountSettingRequest -func (_e *MockCspEnablementAccountInterface_Expecter) Update(ctx interface{}, request interface{}) *MockCspEnablementAccountInterface_Update_Call { - return &MockCspEnablementAccountInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockCspEnablementAccountInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateCspEnablementAccountSettingRequest)) *MockCspEnablementAccountInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateCspEnablementAccountSettingRequest)) - }) - return _c -} - -func (_c *MockCspEnablementAccountInterface_Update_Call) Return(_a0 *settings.CspEnablementAccountSetting, _a1 error) *MockCspEnablementAccountInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockCspEnablementAccountInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateCspEnablementAccountSettingRequest) (*settings.CspEnablementAccountSetting, error)) *MockCspEnablementAccountInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockCspEnablementAccountInterface creates a new instance of MockCspEnablementAccountInterface. 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 NewMockCspEnablementAccountInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockCspEnablementAccountInterface { - mock := &MockCspEnablementAccountInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_default_namespace_interface.go b/experimental/mocks/service/settings/mock_default_namespace_interface.go deleted file mode 100644 index 9a4cb866f..000000000 --- a/experimental/mocks/service/settings/mock_default_namespace_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockDefaultNamespaceInterface is an autogenerated mock type for the DefaultNamespaceInterface type -type MockDefaultNamespaceInterface struct { - mock.Mock -} - -type MockDefaultNamespaceInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDefaultNamespaceInterface) EXPECT() *MockDefaultNamespaceInterface_Expecter { - return &MockDefaultNamespaceInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockDefaultNamespaceInterface) Delete(ctx context.Context, request settings.DeleteDefaultNamespaceSettingRequest) (*settings.DeleteDefaultNamespaceSettingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeleteDefaultNamespaceSettingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDefaultNamespaceSettingRequest) (*settings.DeleteDefaultNamespaceSettingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDefaultNamespaceSettingRequest) *settings.DeleteDefaultNamespaceSettingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeleteDefaultNamespaceSettingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeleteDefaultNamespaceSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDefaultNamespaceInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockDefaultNamespaceInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteDefaultNamespaceSettingRequest -func (_e *MockDefaultNamespaceInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDefaultNamespaceInterface_Delete_Call { - return &MockDefaultNamespaceInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockDefaultNamespaceInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteDefaultNamespaceSettingRequest)) *MockDefaultNamespaceInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteDefaultNamespaceSettingRequest)) - }) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Delete_Call) Return(_a0 *settings.DeleteDefaultNamespaceSettingResponse, _a1 error) *MockDefaultNamespaceInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteDefaultNamespaceSettingRequest) (*settings.DeleteDefaultNamespaceSettingResponse, error)) *MockDefaultNamespaceInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockDefaultNamespaceInterface) Get(ctx context.Context, request settings.GetDefaultNamespaceSettingRequest) (*settings.DefaultNamespaceSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.DefaultNamespaceSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDefaultNamespaceSettingRequest) (*settings.DefaultNamespaceSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDefaultNamespaceSettingRequest) *settings.DefaultNamespaceSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DefaultNamespaceSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetDefaultNamespaceSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDefaultNamespaceInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockDefaultNamespaceInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetDefaultNamespaceSettingRequest -func (_e *MockDefaultNamespaceInterface_Expecter) Get(ctx interface{}, request interface{}) *MockDefaultNamespaceInterface_Get_Call { - return &MockDefaultNamespaceInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockDefaultNamespaceInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetDefaultNamespaceSettingRequest)) *MockDefaultNamespaceInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetDefaultNamespaceSettingRequest)) - }) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Get_Call) Return(_a0 *settings.DefaultNamespaceSetting, _a1 error) *MockDefaultNamespaceInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetDefaultNamespaceSettingRequest) (*settings.DefaultNamespaceSetting, error)) *MockDefaultNamespaceInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockDefaultNamespaceInterface) Update(ctx context.Context, request settings.UpdateDefaultNamespaceSettingRequest) (*settings.DefaultNamespaceSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.DefaultNamespaceSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDefaultNamespaceSettingRequest) (*settings.DefaultNamespaceSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDefaultNamespaceSettingRequest) *settings.DefaultNamespaceSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DefaultNamespaceSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateDefaultNamespaceSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDefaultNamespaceInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockDefaultNamespaceInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateDefaultNamespaceSettingRequest -func (_e *MockDefaultNamespaceInterface_Expecter) Update(ctx interface{}, request interface{}) *MockDefaultNamespaceInterface_Update_Call { - return &MockDefaultNamespaceInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockDefaultNamespaceInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateDefaultNamespaceSettingRequest)) *MockDefaultNamespaceInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateDefaultNamespaceSettingRequest)) - }) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Update_Call) Return(_a0 *settings.DefaultNamespaceSetting, _a1 error) *MockDefaultNamespaceInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDefaultNamespaceInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateDefaultNamespaceSettingRequest) (*settings.DefaultNamespaceSetting, error)) *MockDefaultNamespaceInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDefaultNamespaceInterface creates a new instance of MockDefaultNamespaceInterface. 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 NewMockDefaultNamespaceInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDefaultNamespaceInterface { - mock := &MockDefaultNamespaceInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_disable_legacy_access_interface.go b/experimental/mocks/service/settings/mock_disable_legacy_access_interface.go deleted file mode 100644 index e3ccf3098..000000000 --- a/experimental/mocks/service/settings/mock_disable_legacy_access_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockDisableLegacyAccessInterface is an autogenerated mock type for the DisableLegacyAccessInterface type -type MockDisableLegacyAccessInterface struct { - mock.Mock -} - -type MockDisableLegacyAccessInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDisableLegacyAccessInterface) EXPECT() *MockDisableLegacyAccessInterface_Expecter { - return &MockDisableLegacyAccessInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyAccessInterface) Delete(ctx context.Context, request settings.DeleteDisableLegacyAccessRequest) (*settings.DeleteDisableLegacyAccessResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeleteDisableLegacyAccessResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDisableLegacyAccessRequest) (*settings.DeleteDisableLegacyAccessResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDisableLegacyAccessRequest) *settings.DeleteDisableLegacyAccessResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeleteDisableLegacyAccessResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeleteDisableLegacyAccessRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyAccessInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockDisableLegacyAccessInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteDisableLegacyAccessRequest -func (_e *MockDisableLegacyAccessInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDisableLegacyAccessInterface_Delete_Call { - return &MockDisableLegacyAccessInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockDisableLegacyAccessInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteDisableLegacyAccessRequest)) *MockDisableLegacyAccessInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteDisableLegacyAccessRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyAccessInterface_Delete_Call) Return(_a0 *settings.DeleteDisableLegacyAccessResponse, _a1 error) *MockDisableLegacyAccessInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyAccessInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteDisableLegacyAccessRequest) (*settings.DeleteDisableLegacyAccessResponse, error)) *MockDisableLegacyAccessInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyAccessInterface) Get(ctx context.Context, request settings.GetDisableLegacyAccessRequest) (*settings.DisableLegacyAccess, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.DisableLegacyAccess - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDisableLegacyAccessRequest) (*settings.DisableLegacyAccess, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDisableLegacyAccessRequest) *settings.DisableLegacyAccess); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DisableLegacyAccess) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetDisableLegacyAccessRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyAccessInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockDisableLegacyAccessInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetDisableLegacyAccessRequest -func (_e *MockDisableLegacyAccessInterface_Expecter) Get(ctx interface{}, request interface{}) *MockDisableLegacyAccessInterface_Get_Call { - return &MockDisableLegacyAccessInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockDisableLegacyAccessInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetDisableLegacyAccessRequest)) *MockDisableLegacyAccessInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetDisableLegacyAccessRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyAccessInterface_Get_Call) Return(_a0 *settings.DisableLegacyAccess, _a1 error) *MockDisableLegacyAccessInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyAccessInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetDisableLegacyAccessRequest) (*settings.DisableLegacyAccess, error)) *MockDisableLegacyAccessInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyAccessInterface) Update(ctx context.Context, request settings.UpdateDisableLegacyAccessRequest) (*settings.DisableLegacyAccess, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.DisableLegacyAccess - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDisableLegacyAccessRequest) (*settings.DisableLegacyAccess, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDisableLegacyAccessRequest) *settings.DisableLegacyAccess); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DisableLegacyAccess) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateDisableLegacyAccessRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyAccessInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockDisableLegacyAccessInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateDisableLegacyAccessRequest -func (_e *MockDisableLegacyAccessInterface_Expecter) Update(ctx interface{}, request interface{}) *MockDisableLegacyAccessInterface_Update_Call { - return &MockDisableLegacyAccessInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockDisableLegacyAccessInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateDisableLegacyAccessRequest)) *MockDisableLegacyAccessInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateDisableLegacyAccessRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyAccessInterface_Update_Call) Return(_a0 *settings.DisableLegacyAccess, _a1 error) *MockDisableLegacyAccessInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyAccessInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateDisableLegacyAccessRequest) (*settings.DisableLegacyAccess, error)) *MockDisableLegacyAccessInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDisableLegacyAccessInterface creates a new instance of MockDisableLegacyAccessInterface. 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 NewMockDisableLegacyAccessInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDisableLegacyAccessInterface { - mock := &MockDisableLegacyAccessInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_disable_legacy_dbfs_interface.go b/experimental/mocks/service/settings/mock_disable_legacy_dbfs_interface.go deleted file mode 100644 index 2b426907f..000000000 --- a/experimental/mocks/service/settings/mock_disable_legacy_dbfs_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockDisableLegacyDbfsInterface is an autogenerated mock type for the DisableLegacyDbfsInterface type -type MockDisableLegacyDbfsInterface struct { - mock.Mock -} - -type MockDisableLegacyDbfsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDisableLegacyDbfsInterface) EXPECT() *MockDisableLegacyDbfsInterface_Expecter { - return &MockDisableLegacyDbfsInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyDbfsInterface) Delete(ctx context.Context, request settings.DeleteDisableLegacyDbfsRequest) (*settings.DeleteDisableLegacyDbfsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeleteDisableLegacyDbfsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDisableLegacyDbfsRequest) (*settings.DeleteDisableLegacyDbfsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDisableLegacyDbfsRequest) *settings.DeleteDisableLegacyDbfsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeleteDisableLegacyDbfsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeleteDisableLegacyDbfsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyDbfsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockDisableLegacyDbfsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteDisableLegacyDbfsRequest -func (_e *MockDisableLegacyDbfsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDisableLegacyDbfsInterface_Delete_Call { - return &MockDisableLegacyDbfsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockDisableLegacyDbfsInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteDisableLegacyDbfsRequest)) *MockDisableLegacyDbfsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteDisableLegacyDbfsRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyDbfsInterface_Delete_Call) Return(_a0 *settings.DeleteDisableLegacyDbfsResponse, _a1 error) *MockDisableLegacyDbfsInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyDbfsInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteDisableLegacyDbfsRequest) (*settings.DeleteDisableLegacyDbfsResponse, error)) *MockDisableLegacyDbfsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyDbfsInterface) Get(ctx context.Context, request settings.GetDisableLegacyDbfsRequest) (*settings.DisableLegacyDbfs, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.DisableLegacyDbfs - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDisableLegacyDbfsRequest) (*settings.DisableLegacyDbfs, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDisableLegacyDbfsRequest) *settings.DisableLegacyDbfs); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DisableLegacyDbfs) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetDisableLegacyDbfsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyDbfsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockDisableLegacyDbfsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetDisableLegacyDbfsRequest -func (_e *MockDisableLegacyDbfsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockDisableLegacyDbfsInterface_Get_Call { - return &MockDisableLegacyDbfsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockDisableLegacyDbfsInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetDisableLegacyDbfsRequest)) *MockDisableLegacyDbfsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetDisableLegacyDbfsRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyDbfsInterface_Get_Call) Return(_a0 *settings.DisableLegacyDbfs, _a1 error) *MockDisableLegacyDbfsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyDbfsInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetDisableLegacyDbfsRequest) (*settings.DisableLegacyDbfs, error)) *MockDisableLegacyDbfsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyDbfsInterface) Update(ctx context.Context, request settings.UpdateDisableLegacyDbfsRequest) (*settings.DisableLegacyDbfs, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.DisableLegacyDbfs - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDisableLegacyDbfsRequest) (*settings.DisableLegacyDbfs, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDisableLegacyDbfsRequest) *settings.DisableLegacyDbfs); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DisableLegacyDbfs) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateDisableLegacyDbfsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyDbfsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockDisableLegacyDbfsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateDisableLegacyDbfsRequest -func (_e *MockDisableLegacyDbfsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockDisableLegacyDbfsInterface_Update_Call { - return &MockDisableLegacyDbfsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockDisableLegacyDbfsInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateDisableLegacyDbfsRequest)) *MockDisableLegacyDbfsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateDisableLegacyDbfsRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyDbfsInterface_Update_Call) Return(_a0 *settings.DisableLegacyDbfs, _a1 error) *MockDisableLegacyDbfsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyDbfsInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateDisableLegacyDbfsRequest) (*settings.DisableLegacyDbfs, error)) *MockDisableLegacyDbfsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDisableLegacyDbfsInterface creates a new instance of MockDisableLegacyDbfsInterface. 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 NewMockDisableLegacyDbfsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDisableLegacyDbfsInterface { - mock := &MockDisableLegacyDbfsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_disable_legacy_features_interface.go b/experimental/mocks/service/settings/mock_disable_legacy_features_interface.go deleted file mode 100644 index d67723519..000000000 --- a/experimental/mocks/service/settings/mock_disable_legacy_features_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockDisableLegacyFeaturesInterface is an autogenerated mock type for the DisableLegacyFeaturesInterface type -type MockDisableLegacyFeaturesInterface struct { - mock.Mock -} - -type MockDisableLegacyFeaturesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDisableLegacyFeaturesInterface) EXPECT() *MockDisableLegacyFeaturesInterface_Expecter { - return &MockDisableLegacyFeaturesInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyFeaturesInterface) Delete(ctx context.Context, request settings.DeleteDisableLegacyFeaturesRequest) (*settings.DeleteDisableLegacyFeaturesResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeleteDisableLegacyFeaturesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDisableLegacyFeaturesRequest) (*settings.DeleteDisableLegacyFeaturesResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteDisableLegacyFeaturesRequest) *settings.DeleteDisableLegacyFeaturesResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeleteDisableLegacyFeaturesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeleteDisableLegacyFeaturesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyFeaturesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockDisableLegacyFeaturesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteDisableLegacyFeaturesRequest -func (_e *MockDisableLegacyFeaturesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDisableLegacyFeaturesInterface_Delete_Call { - return &MockDisableLegacyFeaturesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockDisableLegacyFeaturesInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteDisableLegacyFeaturesRequest)) *MockDisableLegacyFeaturesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteDisableLegacyFeaturesRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyFeaturesInterface_Delete_Call) Return(_a0 *settings.DeleteDisableLegacyFeaturesResponse, _a1 error) *MockDisableLegacyFeaturesInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyFeaturesInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteDisableLegacyFeaturesRequest) (*settings.DeleteDisableLegacyFeaturesResponse, error)) *MockDisableLegacyFeaturesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyFeaturesInterface) Get(ctx context.Context, request settings.GetDisableLegacyFeaturesRequest) (*settings.DisableLegacyFeatures, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.DisableLegacyFeatures - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDisableLegacyFeaturesRequest) (*settings.DisableLegacyFeatures, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetDisableLegacyFeaturesRequest) *settings.DisableLegacyFeatures); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DisableLegacyFeatures) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetDisableLegacyFeaturesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyFeaturesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockDisableLegacyFeaturesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetDisableLegacyFeaturesRequest -func (_e *MockDisableLegacyFeaturesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockDisableLegacyFeaturesInterface_Get_Call { - return &MockDisableLegacyFeaturesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockDisableLegacyFeaturesInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetDisableLegacyFeaturesRequest)) *MockDisableLegacyFeaturesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetDisableLegacyFeaturesRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyFeaturesInterface_Get_Call) Return(_a0 *settings.DisableLegacyFeatures, _a1 error) *MockDisableLegacyFeaturesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyFeaturesInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetDisableLegacyFeaturesRequest) (*settings.DisableLegacyFeatures, error)) *MockDisableLegacyFeaturesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockDisableLegacyFeaturesInterface) Update(ctx context.Context, request settings.UpdateDisableLegacyFeaturesRequest) (*settings.DisableLegacyFeatures, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.DisableLegacyFeatures - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDisableLegacyFeaturesRequest) (*settings.DisableLegacyFeatures, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateDisableLegacyFeaturesRequest) *settings.DisableLegacyFeatures); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DisableLegacyFeatures) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateDisableLegacyFeaturesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDisableLegacyFeaturesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockDisableLegacyFeaturesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateDisableLegacyFeaturesRequest -func (_e *MockDisableLegacyFeaturesInterface_Expecter) Update(ctx interface{}, request interface{}) *MockDisableLegacyFeaturesInterface_Update_Call { - return &MockDisableLegacyFeaturesInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockDisableLegacyFeaturesInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateDisableLegacyFeaturesRequest)) *MockDisableLegacyFeaturesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateDisableLegacyFeaturesRequest)) - }) - return _c -} - -func (_c *MockDisableLegacyFeaturesInterface_Update_Call) Return(_a0 *settings.DisableLegacyFeatures, _a1 error) *MockDisableLegacyFeaturesInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDisableLegacyFeaturesInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateDisableLegacyFeaturesRequest) (*settings.DisableLegacyFeatures, error)) *MockDisableLegacyFeaturesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDisableLegacyFeaturesInterface creates a new instance of MockDisableLegacyFeaturesInterface. 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 NewMockDisableLegacyFeaturesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDisableLegacyFeaturesInterface { - mock := &MockDisableLegacyFeaturesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_enhanced_security_monitoring_interface.go b/experimental/mocks/service/settings/mock_enhanced_security_monitoring_interface.go deleted file mode 100644 index 13f2a64c4..000000000 --- a/experimental/mocks/service/settings/mock_enhanced_security_monitoring_interface.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockEnhancedSecurityMonitoringInterface is an autogenerated mock type for the EnhancedSecurityMonitoringInterface type -type MockEnhancedSecurityMonitoringInterface struct { - mock.Mock -} - -type MockEnhancedSecurityMonitoringInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockEnhancedSecurityMonitoringInterface) EXPECT() *MockEnhancedSecurityMonitoringInterface_Expecter { - return &MockEnhancedSecurityMonitoringInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockEnhancedSecurityMonitoringInterface) Get(ctx context.Context, request settings.GetEnhancedSecurityMonitoringSettingRequest) (*settings.EnhancedSecurityMonitoringSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.EnhancedSecurityMonitoringSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetEnhancedSecurityMonitoringSettingRequest) (*settings.EnhancedSecurityMonitoringSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetEnhancedSecurityMonitoringSettingRequest) *settings.EnhancedSecurityMonitoringSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.EnhancedSecurityMonitoringSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetEnhancedSecurityMonitoringSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEnhancedSecurityMonitoringInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockEnhancedSecurityMonitoringInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetEnhancedSecurityMonitoringSettingRequest -func (_e *MockEnhancedSecurityMonitoringInterface_Expecter) Get(ctx interface{}, request interface{}) *MockEnhancedSecurityMonitoringInterface_Get_Call { - return &MockEnhancedSecurityMonitoringInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetEnhancedSecurityMonitoringSettingRequest)) *MockEnhancedSecurityMonitoringInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetEnhancedSecurityMonitoringSettingRequest)) - }) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Get_Call) Return(_a0 *settings.EnhancedSecurityMonitoringSetting, _a1 error) *MockEnhancedSecurityMonitoringInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetEnhancedSecurityMonitoringSettingRequest) (*settings.EnhancedSecurityMonitoringSetting, error)) *MockEnhancedSecurityMonitoringInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockEnhancedSecurityMonitoringInterface) Update(ctx context.Context, request settings.UpdateEnhancedSecurityMonitoringSettingRequest) (*settings.EnhancedSecurityMonitoringSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.EnhancedSecurityMonitoringSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateEnhancedSecurityMonitoringSettingRequest) (*settings.EnhancedSecurityMonitoringSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateEnhancedSecurityMonitoringSettingRequest) *settings.EnhancedSecurityMonitoringSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.EnhancedSecurityMonitoringSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateEnhancedSecurityMonitoringSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEnhancedSecurityMonitoringInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockEnhancedSecurityMonitoringInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateEnhancedSecurityMonitoringSettingRequest -func (_e *MockEnhancedSecurityMonitoringInterface_Expecter) Update(ctx interface{}, request interface{}) *MockEnhancedSecurityMonitoringInterface_Update_Call { - return &MockEnhancedSecurityMonitoringInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateEnhancedSecurityMonitoringSettingRequest)) *MockEnhancedSecurityMonitoringInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateEnhancedSecurityMonitoringSettingRequest)) - }) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Update_Call) Return(_a0 *settings.EnhancedSecurityMonitoringSetting, _a1 error) *MockEnhancedSecurityMonitoringInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEnhancedSecurityMonitoringInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateEnhancedSecurityMonitoringSettingRequest) (*settings.EnhancedSecurityMonitoringSetting, error)) *MockEnhancedSecurityMonitoringInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockEnhancedSecurityMonitoringInterface creates a new instance of MockEnhancedSecurityMonitoringInterface. 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 NewMockEnhancedSecurityMonitoringInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockEnhancedSecurityMonitoringInterface { - mock := &MockEnhancedSecurityMonitoringInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_esm_enablement_account_interface.go b/experimental/mocks/service/settings/mock_esm_enablement_account_interface.go deleted file mode 100644 index 05385abf0..000000000 --- a/experimental/mocks/service/settings/mock_esm_enablement_account_interface.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockEsmEnablementAccountInterface is an autogenerated mock type for the EsmEnablementAccountInterface type -type MockEsmEnablementAccountInterface struct { - mock.Mock -} - -type MockEsmEnablementAccountInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockEsmEnablementAccountInterface) EXPECT() *MockEsmEnablementAccountInterface_Expecter { - return &MockEsmEnablementAccountInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockEsmEnablementAccountInterface) Get(ctx context.Context, request settings.GetEsmEnablementAccountSettingRequest) (*settings.EsmEnablementAccountSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.EsmEnablementAccountSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetEsmEnablementAccountSettingRequest) (*settings.EsmEnablementAccountSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetEsmEnablementAccountSettingRequest) *settings.EsmEnablementAccountSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.EsmEnablementAccountSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetEsmEnablementAccountSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEsmEnablementAccountInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockEsmEnablementAccountInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetEsmEnablementAccountSettingRequest -func (_e *MockEsmEnablementAccountInterface_Expecter) Get(ctx interface{}, request interface{}) *MockEsmEnablementAccountInterface_Get_Call { - return &MockEsmEnablementAccountInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockEsmEnablementAccountInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetEsmEnablementAccountSettingRequest)) *MockEsmEnablementAccountInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetEsmEnablementAccountSettingRequest)) - }) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_Get_Call) Return(_a0 *settings.EsmEnablementAccountSetting, _a1 error) *MockEsmEnablementAccountInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetEsmEnablementAccountSettingRequest) (*settings.EsmEnablementAccountSetting, error)) *MockEsmEnablementAccountInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockEsmEnablementAccountInterface) Update(ctx context.Context, request settings.UpdateEsmEnablementAccountSettingRequest) (*settings.EsmEnablementAccountSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.EsmEnablementAccountSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateEsmEnablementAccountSettingRequest) (*settings.EsmEnablementAccountSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateEsmEnablementAccountSettingRequest) *settings.EsmEnablementAccountSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.EsmEnablementAccountSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateEsmEnablementAccountSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockEsmEnablementAccountInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockEsmEnablementAccountInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateEsmEnablementAccountSettingRequest -func (_e *MockEsmEnablementAccountInterface_Expecter) Update(ctx interface{}, request interface{}) *MockEsmEnablementAccountInterface_Update_Call { - return &MockEsmEnablementAccountInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockEsmEnablementAccountInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateEsmEnablementAccountSettingRequest)) *MockEsmEnablementAccountInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateEsmEnablementAccountSettingRequest)) - }) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_Update_Call) Return(_a0 *settings.EsmEnablementAccountSetting, _a1 error) *MockEsmEnablementAccountInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockEsmEnablementAccountInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateEsmEnablementAccountSettingRequest) (*settings.EsmEnablementAccountSetting, error)) *MockEsmEnablementAccountInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockEsmEnablementAccountInterface creates a new instance of MockEsmEnablementAccountInterface. 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 NewMockEsmEnablementAccountInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockEsmEnablementAccountInterface { - mock := &MockEsmEnablementAccountInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_ip_access_lists_interface.go b/experimental/mocks/service/settings/mock_ip_access_lists_interface.go deleted file mode 100644 index 8f69bc5c2..000000000 --- a/experimental/mocks/service/settings/mock_ip_access_lists_interface.go +++ /dev/null @@ -1,627 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - settings "github.com/databricks/databricks-sdk-go/service/settings" -) - -// MockIpAccessListsInterface is an autogenerated mock type for the IpAccessListsInterface type -type MockIpAccessListsInterface struct { - mock.Mock -} - -type MockIpAccessListsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockIpAccessListsInterface) EXPECT() *MockIpAccessListsInterface_Expecter { - return &MockIpAccessListsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockIpAccessListsInterface) Create(ctx context.Context, request settings.CreateIpAccessList) (*settings.CreateIpAccessListResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *settings.CreateIpAccessListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateIpAccessList) (*settings.CreateIpAccessListResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateIpAccessList) *settings.CreateIpAccessListResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.CreateIpAccessListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.CreateIpAccessList) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockIpAccessListsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockIpAccessListsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request settings.CreateIpAccessList -func (_e *MockIpAccessListsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockIpAccessListsInterface_Create_Call { - return &MockIpAccessListsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockIpAccessListsInterface_Create_Call) Run(run func(ctx context.Context, request settings.CreateIpAccessList)) *MockIpAccessListsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.CreateIpAccessList)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_Create_Call) Return(_a0 *settings.CreateIpAccessListResponse, _a1 error) *MockIpAccessListsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockIpAccessListsInterface_Create_Call) RunAndReturn(run func(context.Context, settings.CreateIpAccessList) (*settings.CreateIpAccessListResponse, error)) *MockIpAccessListsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockIpAccessListsInterface) Delete(ctx context.Context, request settings.DeleteIpAccessListRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteIpAccessListRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIpAccessListsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockIpAccessListsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteIpAccessListRequest -func (_e *MockIpAccessListsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockIpAccessListsInterface_Delete_Call { - return &MockIpAccessListsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockIpAccessListsInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteIpAccessListRequest)) *MockIpAccessListsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteIpAccessListRequest)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_Delete_Call) Return(_a0 error) *MockIpAccessListsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIpAccessListsInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteIpAccessListRequest) error) *MockIpAccessListsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByIpAccessListId provides a mock function with given fields: ctx, ipAccessListId -func (_m *MockIpAccessListsInterface) DeleteByIpAccessListId(ctx context.Context, ipAccessListId string) error { - ret := _m.Called(ctx, ipAccessListId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByIpAccessListId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, ipAccessListId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIpAccessListsInterface_DeleteByIpAccessListId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByIpAccessListId' -type MockIpAccessListsInterface_DeleteByIpAccessListId_Call struct { - *mock.Call -} - -// DeleteByIpAccessListId is a helper method to define mock.On call -// - ctx context.Context -// - ipAccessListId string -func (_e *MockIpAccessListsInterface_Expecter) DeleteByIpAccessListId(ctx interface{}, ipAccessListId interface{}) *MockIpAccessListsInterface_DeleteByIpAccessListId_Call { - return &MockIpAccessListsInterface_DeleteByIpAccessListId_Call{Call: _e.mock.On("DeleteByIpAccessListId", ctx, ipAccessListId)} -} - -func (_c *MockIpAccessListsInterface_DeleteByIpAccessListId_Call) Run(run func(ctx context.Context, ipAccessListId string)) *MockIpAccessListsInterface_DeleteByIpAccessListId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_DeleteByIpAccessListId_Call) Return(_a0 error) *MockIpAccessListsInterface_DeleteByIpAccessListId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIpAccessListsInterface_DeleteByIpAccessListId_Call) RunAndReturn(run func(context.Context, string) error) *MockIpAccessListsInterface_DeleteByIpAccessListId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockIpAccessListsInterface) Get(ctx context.Context, request settings.GetIpAccessListRequest) (*settings.FetchIpAccessListResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.FetchIpAccessListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetIpAccessListRequest) (*settings.FetchIpAccessListResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetIpAccessListRequest) *settings.FetchIpAccessListResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.FetchIpAccessListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetIpAccessListRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockIpAccessListsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockIpAccessListsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetIpAccessListRequest -func (_e *MockIpAccessListsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockIpAccessListsInterface_Get_Call { - return &MockIpAccessListsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockIpAccessListsInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetIpAccessListRequest)) *MockIpAccessListsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetIpAccessListRequest)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_Get_Call) Return(_a0 *settings.FetchIpAccessListResponse, _a1 error) *MockIpAccessListsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockIpAccessListsInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetIpAccessListRequest) (*settings.FetchIpAccessListResponse, error)) *MockIpAccessListsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByIpAccessListId provides a mock function with given fields: ctx, ipAccessListId -func (_m *MockIpAccessListsInterface) GetByIpAccessListId(ctx context.Context, ipAccessListId string) (*settings.FetchIpAccessListResponse, error) { - ret := _m.Called(ctx, ipAccessListId) - - if len(ret) == 0 { - panic("no return value specified for GetByIpAccessListId") - } - - var r0 *settings.FetchIpAccessListResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.FetchIpAccessListResponse, error)); ok { - return rf(ctx, ipAccessListId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.FetchIpAccessListResponse); ok { - r0 = rf(ctx, ipAccessListId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.FetchIpAccessListResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, ipAccessListId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockIpAccessListsInterface_GetByIpAccessListId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByIpAccessListId' -type MockIpAccessListsInterface_GetByIpAccessListId_Call struct { - *mock.Call -} - -// GetByIpAccessListId is a helper method to define mock.On call -// - ctx context.Context -// - ipAccessListId string -func (_e *MockIpAccessListsInterface_Expecter) GetByIpAccessListId(ctx interface{}, ipAccessListId interface{}) *MockIpAccessListsInterface_GetByIpAccessListId_Call { - return &MockIpAccessListsInterface_GetByIpAccessListId_Call{Call: _e.mock.On("GetByIpAccessListId", ctx, ipAccessListId)} -} - -func (_c *MockIpAccessListsInterface_GetByIpAccessListId_Call) Run(run func(ctx context.Context, ipAccessListId string)) *MockIpAccessListsInterface_GetByIpAccessListId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_GetByIpAccessListId_Call) Return(_a0 *settings.FetchIpAccessListResponse, _a1 error) *MockIpAccessListsInterface_GetByIpAccessListId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockIpAccessListsInterface_GetByIpAccessListId_Call) RunAndReturn(run func(context.Context, string) (*settings.FetchIpAccessListResponse, error)) *MockIpAccessListsInterface_GetByIpAccessListId_Call { - _c.Call.Return(run) - return _c -} - -// GetByLabel provides a mock function with given fields: ctx, name -func (_m *MockIpAccessListsInterface) GetByLabel(ctx context.Context, name string) (*settings.IpAccessListInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByLabel") - } - - var r0 *settings.IpAccessListInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.IpAccessListInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.IpAccessListInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.IpAccessListInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockIpAccessListsInterface_GetByLabel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByLabel' -type MockIpAccessListsInterface_GetByLabel_Call struct { - *mock.Call -} - -// GetByLabel is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockIpAccessListsInterface_Expecter) GetByLabel(ctx interface{}, name interface{}) *MockIpAccessListsInterface_GetByLabel_Call { - return &MockIpAccessListsInterface_GetByLabel_Call{Call: _e.mock.On("GetByLabel", ctx, name)} -} - -func (_c *MockIpAccessListsInterface_GetByLabel_Call) Run(run func(ctx context.Context, name string)) *MockIpAccessListsInterface_GetByLabel_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_GetByLabel_Call) Return(_a0 *settings.IpAccessListInfo, _a1 error) *MockIpAccessListsInterface_GetByLabel_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockIpAccessListsInterface_GetByLabel_Call) RunAndReturn(run func(context.Context, string) (*settings.IpAccessListInfo, error)) *MockIpAccessListsInterface_GetByLabel_Call { - _c.Call.Return(run) - return _c -} - -// IpAccessListInfoLabelToListIdMap provides a mock function with given fields: ctx -func (_m *MockIpAccessListsInterface) IpAccessListInfoLabelToListIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for IpAccessListInfoLabelToListIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IpAccessListInfoLabelToListIdMap' -type MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call struct { - *mock.Call -} - -// IpAccessListInfoLabelToListIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockIpAccessListsInterface_Expecter) IpAccessListInfoLabelToListIdMap(ctx interface{}) *MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - return &MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call{Call: _e.mock.On("IpAccessListInfoLabelToListIdMap", ctx)} -} - -func (_c *MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call) Run(run func(ctx context.Context)) *MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockIpAccessListsInterface_IpAccessListInfoLabelToListIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockIpAccessListsInterface) List(ctx context.Context) listing.Iterator[settings.IpAccessListInfo] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[settings.IpAccessListInfo] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[settings.IpAccessListInfo]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[settings.IpAccessListInfo]) - } - } - - return r0 -} - -// MockIpAccessListsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockIpAccessListsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockIpAccessListsInterface_Expecter) List(ctx interface{}) *MockIpAccessListsInterface_List_Call { - return &MockIpAccessListsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockIpAccessListsInterface_List_Call) Run(run func(ctx context.Context)) *MockIpAccessListsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_List_Call) Return(_a0 listing.Iterator[settings.IpAccessListInfo]) *MockIpAccessListsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIpAccessListsInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[settings.IpAccessListInfo]) *MockIpAccessListsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockIpAccessListsInterface) ListAll(ctx context.Context) ([]settings.IpAccessListInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []settings.IpAccessListInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]settings.IpAccessListInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []settings.IpAccessListInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]settings.IpAccessListInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockIpAccessListsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockIpAccessListsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockIpAccessListsInterface_Expecter) ListAll(ctx interface{}) *MockIpAccessListsInterface_ListAll_Call { - return &MockIpAccessListsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockIpAccessListsInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockIpAccessListsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_ListAll_Call) Return(_a0 []settings.IpAccessListInfo, _a1 error) *MockIpAccessListsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockIpAccessListsInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]settings.IpAccessListInfo, error)) *MockIpAccessListsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Replace provides a mock function with given fields: ctx, request -func (_m *MockIpAccessListsInterface) Replace(ctx context.Context, request settings.ReplaceIpAccessList) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Replace") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ReplaceIpAccessList) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIpAccessListsInterface_Replace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Replace' -type MockIpAccessListsInterface_Replace_Call struct { - *mock.Call -} - -// Replace is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ReplaceIpAccessList -func (_e *MockIpAccessListsInterface_Expecter) Replace(ctx interface{}, request interface{}) *MockIpAccessListsInterface_Replace_Call { - return &MockIpAccessListsInterface_Replace_Call{Call: _e.mock.On("Replace", ctx, request)} -} - -func (_c *MockIpAccessListsInterface_Replace_Call) Run(run func(ctx context.Context, request settings.ReplaceIpAccessList)) *MockIpAccessListsInterface_Replace_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ReplaceIpAccessList)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_Replace_Call) Return(_a0 error) *MockIpAccessListsInterface_Replace_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIpAccessListsInterface_Replace_Call) RunAndReturn(run func(context.Context, settings.ReplaceIpAccessList) error) *MockIpAccessListsInterface_Replace_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockIpAccessListsInterface) Update(ctx context.Context, request settings.UpdateIpAccessList) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateIpAccessList) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockIpAccessListsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockIpAccessListsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateIpAccessList -func (_e *MockIpAccessListsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockIpAccessListsInterface_Update_Call { - return &MockIpAccessListsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockIpAccessListsInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateIpAccessList)) *MockIpAccessListsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateIpAccessList)) - }) - return _c -} - -func (_c *MockIpAccessListsInterface_Update_Call) Return(_a0 error) *MockIpAccessListsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockIpAccessListsInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateIpAccessList) error) *MockIpAccessListsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockIpAccessListsInterface creates a new instance of MockIpAccessListsInterface. 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 NewMockIpAccessListsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockIpAccessListsInterface { - mock := &MockIpAccessListsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_network_connectivity_interface.go b/experimental/mocks/service/settings/mock_network_connectivity_interface.go deleted file mode 100644 index c0c809d61..000000000 --- a/experimental/mocks/service/settings/mock_network_connectivity_interface.go +++ /dev/null @@ -1,882 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - settings "github.com/databricks/databricks-sdk-go/service/settings" -) - -// MockNetworkConnectivityInterface is an autogenerated mock type for the NetworkConnectivityInterface type -type MockNetworkConnectivityInterface struct { - mock.Mock -} - -type MockNetworkConnectivityInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNetworkConnectivityInterface) EXPECT() *MockNetworkConnectivityInterface_Expecter { - return &MockNetworkConnectivityInterface_Expecter{mock: &_m.Mock} -} - -// CreateNetworkConnectivityConfiguration provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) CreateNetworkConnectivityConfiguration(ctx context.Context, request settings.CreateNetworkConnectivityConfigRequest) (*settings.NetworkConnectivityConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateNetworkConnectivityConfiguration") - } - - var r0 *settings.NetworkConnectivityConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateNetworkConnectivityConfigRequest) (*settings.NetworkConnectivityConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateNetworkConnectivityConfigRequest) *settings.NetworkConnectivityConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NetworkConnectivityConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.CreateNetworkConnectivityConfigRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateNetworkConnectivityConfiguration' -type MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call struct { - *mock.Call -} - -// CreateNetworkConnectivityConfiguration is a helper method to define mock.On call -// - ctx context.Context -// - request settings.CreateNetworkConnectivityConfigRequest -func (_e *MockNetworkConnectivityInterface_Expecter) CreateNetworkConnectivityConfiguration(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call { - return &MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call{Call: _e.mock.On("CreateNetworkConnectivityConfiguration", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call) Run(run func(ctx context.Context, request settings.CreateNetworkConnectivityConfigRequest)) *MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.CreateNetworkConnectivityConfigRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call) Return(_a0 *settings.NetworkConnectivityConfiguration, _a1 error) *MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call) RunAndReturn(run func(context.Context, settings.CreateNetworkConnectivityConfigRequest) (*settings.NetworkConnectivityConfiguration, error)) *MockNetworkConnectivityInterface_CreateNetworkConnectivityConfiguration_Call { - _c.Call.Return(run) - return _c -} - -// CreatePrivateEndpointRule provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) CreatePrivateEndpointRule(ctx context.Context, request settings.CreatePrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreatePrivateEndpointRule") - } - - var r0 *settings.NccAzurePrivateEndpointRule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.CreatePrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.CreatePrivateEndpointRuleRequest) *settings.NccAzurePrivateEndpointRule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NccAzurePrivateEndpointRule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.CreatePrivateEndpointRuleRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePrivateEndpointRule' -type MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call struct { - *mock.Call -} - -// CreatePrivateEndpointRule is a helper method to define mock.On call -// - ctx context.Context -// - request settings.CreatePrivateEndpointRuleRequest -func (_e *MockNetworkConnectivityInterface_Expecter) CreatePrivateEndpointRule(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call { - return &MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call{Call: _e.mock.On("CreatePrivateEndpointRule", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call) Run(run func(ctx context.Context, request settings.CreatePrivateEndpointRuleRequest)) *MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.CreatePrivateEndpointRuleRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call) Return(_a0 *settings.NccAzurePrivateEndpointRule, _a1 error) *MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call) RunAndReturn(run func(context.Context, settings.CreatePrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error)) *MockNetworkConnectivityInterface_CreatePrivateEndpointRule_Call { - _c.Call.Return(run) - return _c -} - -// DeleteNetworkConnectivityConfiguration provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) DeleteNetworkConnectivityConfiguration(ctx context.Context, request settings.DeleteNetworkConnectivityConfigurationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteNetworkConnectivityConfiguration") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteNetworkConnectivityConfigurationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteNetworkConnectivityConfiguration' -type MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call struct { - *mock.Call -} - -// DeleteNetworkConnectivityConfiguration is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteNetworkConnectivityConfigurationRequest -func (_e *MockNetworkConnectivityInterface_Expecter) DeleteNetworkConnectivityConfiguration(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call { - return &MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call{Call: _e.mock.On("DeleteNetworkConnectivityConfiguration", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call) Run(run func(ctx context.Context, request settings.DeleteNetworkConnectivityConfigurationRequest)) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteNetworkConnectivityConfigurationRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call) Return(_a0 error) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call) RunAndReturn(run func(context.Context, settings.DeleteNetworkConnectivityConfigurationRequest) error) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfiguration_Call { - _c.Call.Return(run) - return _c -} - -// DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId provides a mock function with given fields: ctx, networkConnectivityConfigId -func (_m *MockNetworkConnectivityInterface) DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) error { - ret := _m.Called(ctx, networkConnectivityConfigId) - - if len(ret) == 0 { - panic("no return value specified for DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, networkConnectivityConfigId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId' -type MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call struct { - *mock.Call -} - -// DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId is a helper method to define mock.On call -// - ctx context.Context -// - networkConnectivityConfigId string -func (_e *MockNetworkConnectivityInterface_Expecter) DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx interface{}, networkConnectivityConfigId interface{}) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - return &MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call{Call: _e.mock.On("DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId", ctx, networkConnectivityConfigId)} -} - -func (_c *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call) Run(run func(ctx context.Context, networkConnectivityConfigId string)) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call) Return(_a0 error) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call) RunAndReturn(run func(context.Context, string) error) *MockNetworkConnectivityInterface_DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - _c.Call.Return(run) - return _c -} - -// DeletePrivateEndpointRule provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) DeletePrivateEndpointRule(ctx context.Context, request settings.DeletePrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeletePrivateEndpointRule") - } - - var r0 *settings.NccAzurePrivateEndpointRule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeletePrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeletePrivateEndpointRuleRequest) *settings.NccAzurePrivateEndpointRule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NccAzurePrivateEndpointRule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeletePrivateEndpointRuleRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePrivateEndpointRule' -type MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call struct { - *mock.Call -} - -// DeletePrivateEndpointRule is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeletePrivateEndpointRuleRequest -func (_e *MockNetworkConnectivityInterface_Expecter) DeletePrivateEndpointRule(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call { - return &MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call{Call: _e.mock.On("DeletePrivateEndpointRule", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call) Run(run func(ctx context.Context, request settings.DeletePrivateEndpointRuleRequest)) *MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeletePrivateEndpointRuleRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call) Return(_a0 *settings.NccAzurePrivateEndpointRule, _a1 error) *MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call) RunAndReturn(run func(context.Context, settings.DeletePrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error)) *MockNetworkConnectivityInterface_DeletePrivateEndpointRule_Call { - _c.Call.Return(run) - return _c -} - -// DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId provides a mock function with given fields: ctx, networkConnectivityConfigId, privateEndpointRuleId -func (_m *MockNetworkConnectivityInterface) DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string) (*settings.NccAzurePrivateEndpointRule, error) { - ret := _m.Called(ctx, networkConnectivityConfigId, privateEndpointRuleId) - - if len(ret) == 0 { - panic("no return value specified for DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId") - } - - var r0 *settings.NccAzurePrivateEndpointRule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*settings.NccAzurePrivateEndpointRule, error)); ok { - return rf(ctx, networkConnectivityConfigId, privateEndpointRuleId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *settings.NccAzurePrivateEndpointRule); ok { - r0 = rf(ctx, networkConnectivityConfigId, privateEndpointRuleId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NccAzurePrivateEndpointRule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, networkConnectivityConfigId, privateEndpointRuleId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId' -type MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call struct { - *mock.Call -} - -// DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId is a helper method to define mock.On call -// - ctx context.Context -// - networkConnectivityConfigId string -// - privateEndpointRuleId string -func (_e *MockNetworkConnectivityInterface_Expecter) DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx interface{}, networkConnectivityConfigId interface{}, privateEndpointRuleId interface{}) *MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - return &MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call{Call: _e.mock.On("DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId", ctx, networkConnectivityConfigId, privateEndpointRuleId)} -} - -func (_c *MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call) Run(run func(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string)) *MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call) Return(_a0 *settings.NccAzurePrivateEndpointRule, _a1 error) *MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call) RunAndReturn(run func(context.Context, string, string) (*settings.NccAzurePrivateEndpointRule, error)) *MockNetworkConnectivityInterface_DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkConnectivityConfiguration provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) GetNetworkConnectivityConfiguration(ctx context.Context, request settings.GetNetworkConnectivityConfigurationRequest) (*settings.NetworkConnectivityConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetNetworkConnectivityConfiguration") - } - - var r0 *settings.NetworkConnectivityConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetNetworkConnectivityConfigurationRequest) (*settings.NetworkConnectivityConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetNetworkConnectivityConfigurationRequest) *settings.NetworkConnectivityConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NetworkConnectivityConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetNetworkConnectivityConfigurationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkConnectivityConfiguration' -type MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call struct { - *mock.Call -} - -// GetNetworkConnectivityConfiguration is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetNetworkConnectivityConfigurationRequest -func (_e *MockNetworkConnectivityInterface_Expecter) GetNetworkConnectivityConfiguration(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call { - return &MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call{Call: _e.mock.On("GetNetworkConnectivityConfiguration", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call) Run(run func(ctx context.Context, request settings.GetNetworkConnectivityConfigurationRequest)) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetNetworkConnectivityConfigurationRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call) Return(_a0 *settings.NetworkConnectivityConfiguration, _a1 error) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call) RunAndReturn(run func(context.Context, settings.GetNetworkConnectivityConfigurationRequest) (*settings.NetworkConnectivityConfiguration, error)) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfiguration_Call { - _c.Call.Return(run) - return _c -} - -// GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId provides a mock function with given fields: ctx, networkConnectivityConfigId -func (_m *MockNetworkConnectivityInterface) GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) (*settings.NetworkConnectivityConfiguration, error) { - ret := _m.Called(ctx, networkConnectivityConfigId) - - if len(ret) == 0 { - panic("no return value specified for GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId") - } - - var r0 *settings.NetworkConnectivityConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.NetworkConnectivityConfiguration, error)); ok { - return rf(ctx, networkConnectivityConfigId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.NetworkConnectivityConfiguration); ok { - r0 = rf(ctx, networkConnectivityConfigId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NetworkConnectivityConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, networkConnectivityConfigId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId' -type MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call struct { - *mock.Call -} - -// GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId is a helper method to define mock.On call -// - ctx context.Context -// - networkConnectivityConfigId string -func (_e *MockNetworkConnectivityInterface_Expecter) GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx interface{}, networkConnectivityConfigId interface{}) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - return &MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call{Call: _e.mock.On("GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId", ctx, networkConnectivityConfigId)} -} - -func (_c *MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call) Run(run func(ctx context.Context, networkConnectivityConfigId string)) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call) Return(_a0 *settings.NetworkConnectivityConfiguration, _a1 error) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call) RunAndReturn(run func(context.Context, string) (*settings.NetworkConnectivityConfiguration, error)) *MockNetworkConnectivityInterface_GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId_Call { - _c.Call.Return(run) - return _c -} - -// GetPrivateEndpointRule provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) GetPrivateEndpointRule(ctx context.Context, request settings.GetPrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPrivateEndpointRule") - } - - var r0 *settings.NccAzurePrivateEndpointRule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetPrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetPrivateEndpointRuleRequest) *settings.NccAzurePrivateEndpointRule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NccAzurePrivateEndpointRule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetPrivateEndpointRuleRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrivateEndpointRule' -type MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call struct { - *mock.Call -} - -// GetPrivateEndpointRule is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetPrivateEndpointRuleRequest -func (_e *MockNetworkConnectivityInterface_Expecter) GetPrivateEndpointRule(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call { - return &MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call{Call: _e.mock.On("GetPrivateEndpointRule", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call) Run(run func(ctx context.Context, request settings.GetPrivateEndpointRuleRequest)) *MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetPrivateEndpointRuleRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call) Return(_a0 *settings.NccAzurePrivateEndpointRule, _a1 error) *MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call) RunAndReturn(run func(context.Context, settings.GetPrivateEndpointRuleRequest) (*settings.NccAzurePrivateEndpointRule, error)) *MockNetworkConnectivityInterface_GetPrivateEndpointRule_Call { - _c.Call.Return(run) - return _c -} - -// GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId provides a mock function with given fields: ctx, networkConnectivityConfigId, privateEndpointRuleId -func (_m *MockNetworkConnectivityInterface) GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string) (*settings.NccAzurePrivateEndpointRule, error) { - ret := _m.Called(ctx, networkConnectivityConfigId, privateEndpointRuleId) - - if len(ret) == 0 { - panic("no return value specified for GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId") - } - - var r0 *settings.NccAzurePrivateEndpointRule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*settings.NccAzurePrivateEndpointRule, error)); ok { - return rf(ctx, networkConnectivityConfigId, privateEndpointRuleId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *settings.NccAzurePrivateEndpointRule); ok { - r0 = rf(ctx, networkConnectivityConfigId, privateEndpointRuleId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NccAzurePrivateEndpointRule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, networkConnectivityConfigId, privateEndpointRuleId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId' -type MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call struct { - *mock.Call -} - -// GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId is a helper method to define mock.On call -// - ctx context.Context -// - networkConnectivityConfigId string -// - privateEndpointRuleId string -func (_e *MockNetworkConnectivityInterface_Expecter) GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx interface{}, networkConnectivityConfigId interface{}, privateEndpointRuleId interface{}) *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - return &MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call{Call: _e.mock.On("GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId", ctx, networkConnectivityConfigId, privateEndpointRuleId)} -} - -func (_c *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call) Run(run func(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string)) *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call) Return(_a0 *settings.NccAzurePrivateEndpointRule, _a1 error) *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call) RunAndReturn(run func(context.Context, string, string) (*settings.NccAzurePrivateEndpointRule, error)) *MockNetworkConnectivityInterface_GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId_Call { - _c.Call.Return(run) - return _c -} - -// ListNetworkConnectivityConfigurations provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) ListNetworkConnectivityConfigurations(ctx context.Context, request settings.ListNetworkConnectivityConfigurationsRequest) listing.Iterator[settings.NetworkConnectivityConfiguration] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListNetworkConnectivityConfigurations") - } - - var r0 listing.Iterator[settings.NetworkConnectivityConfiguration] - if rf, ok := ret.Get(0).(func(context.Context, settings.ListNetworkConnectivityConfigurationsRequest) listing.Iterator[settings.NetworkConnectivityConfiguration]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[settings.NetworkConnectivityConfiguration]) - } - } - - return r0 -} - -// MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNetworkConnectivityConfigurations' -type MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call struct { - *mock.Call -} - -// ListNetworkConnectivityConfigurations is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListNetworkConnectivityConfigurationsRequest -func (_e *MockNetworkConnectivityInterface_Expecter) ListNetworkConnectivityConfigurations(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call { - return &MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call{Call: _e.mock.On("ListNetworkConnectivityConfigurations", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call) Run(run func(ctx context.Context, request settings.ListNetworkConnectivityConfigurationsRequest)) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListNetworkConnectivityConfigurationsRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call) Return(_a0 listing.Iterator[settings.NetworkConnectivityConfiguration]) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call) RunAndReturn(run func(context.Context, settings.ListNetworkConnectivityConfigurationsRequest) listing.Iterator[settings.NetworkConnectivityConfiguration]) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurations_Call { - _c.Call.Return(run) - return _c -} - -// ListNetworkConnectivityConfigurationsAll provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) ListNetworkConnectivityConfigurationsAll(ctx context.Context, request settings.ListNetworkConnectivityConfigurationsRequest) ([]settings.NetworkConnectivityConfiguration, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListNetworkConnectivityConfigurationsAll") - } - - var r0 []settings.NetworkConnectivityConfiguration - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ListNetworkConnectivityConfigurationsRequest) ([]settings.NetworkConnectivityConfiguration, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.ListNetworkConnectivityConfigurationsRequest) []settings.NetworkConnectivityConfiguration); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]settings.NetworkConnectivityConfiguration) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.ListNetworkConnectivityConfigurationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNetworkConnectivityConfigurationsAll' -type MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call struct { - *mock.Call -} - -// ListNetworkConnectivityConfigurationsAll is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListNetworkConnectivityConfigurationsRequest -func (_e *MockNetworkConnectivityInterface_Expecter) ListNetworkConnectivityConfigurationsAll(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call { - return &MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call{Call: _e.mock.On("ListNetworkConnectivityConfigurationsAll", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call) Run(run func(ctx context.Context, request settings.ListNetworkConnectivityConfigurationsRequest)) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListNetworkConnectivityConfigurationsRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call) Return(_a0 []settings.NetworkConnectivityConfiguration, _a1 error) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call) RunAndReturn(run func(context.Context, settings.ListNetworkConnectivityConfigurationsRequest) ([]settings.NetworkConnectivityConfiguration, error)) *MockNetworkConnectivityInterface_ListNetworkConnectivityConfigurationsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListPrivateEndpointRules provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) ListPrivateEndpointRules(ctx context.Context, request settings.ListPrivateEndpointRulesRequest) listing.Iterator[settings.NccAzurePrivateEndpointRule] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListPrivateEndpointRules") - } - - var r0 listing.Iterator[settings.NccAzurePrivateEndpointRule] - if rf, ok := ret.Get(0).(func(context.Context, settings.ListPrivateEndpointRulesRequest) listing.Iterator[settings.NccAzurePrivateEndpointRule]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[settings.NccAzurePrivateEndpointRule]) - } - } - - return r0 -} - -// MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPrivateEndpointRules' -type MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call struct { - *mock.Call -} - -// ListPrivateEndpointRules is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListPrivateEndpointRulesRequest -func (_e *MockNetworkConnectivityInterface_Expecter) ListPrivateEndpointRules(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call { - return &MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call{Call: _e.mock.On("ListPrivateEndpointRules", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call) Run(run func(ctx context.Context, request settings.ListPrivateEndpointRulesRequest)) *MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListPrivateEndpointRulesRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call) Return(_a0 listing.Iterator[settings.NccAzurePrivateEndpointRule]) *MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call) RunAndReturn(run func(context.Context, settings.ListPrivateEndpointRulesRequest) listing.Iterator[settings.NccAzurePrivateEndpointRule]) *MockNetworkConnectivityInterface_ListPrivateEndpointRules_Call { - _c.Call.Return(run) - return _c -} - -// ListPrivateEndpointRulesAll provides a mock function with given fields: ctx, request -func (_m *MockNetworkConnectivityInterface) ListPrivateEndpointRulesAll(ctx context.Context, request settings.ListPrivateEndpointRulesRequest) ([]settings.NccAzurePrivateEndpointRule, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListPrivateEndpointRulesAll") - } - - var r0 []settings.NccAzurePrivateEndpointRule - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ListPrivateEndpointRulesRequest) ([]settings.NccAzurePrivateEndpointRule, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.ListPrivateEndpointRulesRequest) []settings.NccAzurePrivateEndpointRule); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]settings.NccAzurePrivateEndpointRule) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.ListPrivateEndpointRulesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPrivateEndpointRulesAll' -type MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call struct { - *mock.Call -} - -// ListPrivateEndpointRulesAll is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListPrivateEndpointRulesRequest -func (_e *MockNetworkConnectivityInterface_Expecter) ListPrivateEndpointRulesAll(ctx interface{}, request interface{}) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call { - return &MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call{Call: _e.mock.On("ListPrivateEndpointRulesAll", ctx, request)} -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call) Run(run func(ctx context.Context, request settings.ListPrivateEndpointRulesRequest)) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListPrivateEndpointRulesRequest)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call) Return(_a0 []settings.NccAzurePrivateEndpointRule, _a1 error) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call) RunAndReturn(run func(context.Context, settings.ListPrivateEndpointRulesRequest) ([]settings.NccAzurePrivateEndpointRule, error)) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesAll_Call { - _c.Call.Return(run) - return _c -} - -// ListPrivateEndpointRulesByNetworkConnectivityConfigId provides a mock function with given fields: ctx, networkConnectivityConfigId -func (_m *MockNetworkConnectivityInterface) ListPrivateEndpointRulesByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) (*settings.ListNccAzurePrivateEndpointRulesResponse, error) { - ret := _m.Called(ctx, networkConnectivityConfigId) - - if len(ret) == 0 { - panic("no return value specified for ListPrivateEndpointRulesByNetworkConnectivityConfigId") - } - - var r0 *settings.ListNccAzurePrivateEndpointRulesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.ListNccAzurePrivateEndpointRulesResponse, error)); ok { - return rf(ctx, networkConnectivityConfigId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.ListNccAzurePrivateEndpointRulesResponse); ok { - r0 = rf(ctx, networkConnectivityConfigId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.ListNccAzurePrivateEndpointRulesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, networkConnectivityConfigId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListPrivateEndpointRulesByNetworkConnectivityConfigId' -type MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call struct { - *mock.Call -} - -// ListPrivateEndpointRulesByNetworkConnectivityConfigId is a helper method to define mock.On call -// - ctx context.Context -// - networkConnectivityConfigId string -func (_e *MockNetworkConnectivityInterface_Expecter) ListPrivateEndpointRulesByNetworkConnectivityConfigId(ctx interface{}, networkConnectivityConfigId interface{}) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call { - return &MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call{Call: _e.mock.On("ListPrivateEndpointRulesByNetworkConnectivityConfigId", ctx, networkConnectivityConfigId)} -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call) Run(run func(ctx context.Context, networkConnectivityConfigId string)) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call) Return(_a0 *settings.ListNccAzurePrivateEndpointRulesResponse, _a1 error) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call) RunAndReturn(run func(context.Context, string) (*settings.ListNccAzurePrivateEndpointRulesResponse, error)) *MockNetworkConnectivityInterface_ListPrivateEndpointRulesByNetworkConnectivityConfigId_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNetworkConnectivityInterface creates a new instance of MockNetworkConnectivityInterface. 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 NewMockNetworkConnectivityInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNetworkConnectivityInterface { - mock := &MockNetworkConnectivityInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_notification_destinations_interface.go b/experimental/mocks/service/settings/mock_notification_destinations_interface.go deleted file mode 100644 index 1a7ba71fa..000000000 --- a/experimental/mocks/service/settings/mock_notification_destinations_interface.go +++ /dev/null @@ -1,477 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - settings "github.com/databricks/databricks-sdk-go/service/settings" -) - -// MockNotificationDestinationsInterface is an autogenerated mock type for the NotificationDestinationsInterface type -type MockNotificationDestinationsInterface struct { - mock.Mock -} - -type MockNotificationDestinationsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockNotificationDestinationsInterface) EXPECT() *MockNotificationDestinationsInterface_Expecter { - return &MockNotificationDestinationsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockNotificationDestinationsInterface) Create(ctx context.Context, request settings.CreateNotificationDestinationRequest) (*settings.NotificationDestination, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *settings.NotificationDestination - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateNotificationDestinationRequest) (*settings.NotificationDestination, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateNotificationDestinationRequest) *settings.NotificationDestination); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NotificationDestination) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.CreateNotificationDestinationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNotificationDestinationsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockNotificationDestinationsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request settings.CreateNotificationDestinationRequest -func (_e *MockNotificationDestinationsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockNotificationDestinationsInterface_Create_Call { - return &MockNotificationDestinationsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockNotificationDestinationsInterface_Create_Call) Run(run func(ctx context.Context, request settings.CreateNotificationDestinationRequest)) *MockNotificationDestinationsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.CreateNotificationDestinationRequest)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Create_Call) Return(_a0 *settings.NotificationDestination, _a1 error) *MockNotificationDestinationsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Create_Call) RunAndReturn(run func(context.Context, settings.CreateNotificationDestinationRequest) (*settings.NotificationDestination, error)) *MockNotificationDestinationsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockNotificationDestinationsInterface) Delete(ctx context.Context, request settings.DeleteNotificationDestinationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteNotificationDestinationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNotificationDestinationsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockNotificationDestinationsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteNotificationDestinationRequest -func (_e *MockNotificationDestinationsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockNotificationDestinationsInterface_Delete_Call { - return &MockNotificationDestinationsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockNotificationDestinationsInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteNotificationDestinationRequest)) *MockNotificationDestinationsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteNotificationDestinationRequest)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Delete_Call) Return(_a0 error) *MockNotificationDestinationsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteNotificationDestinationRequest) error) *MockNotificationDestinationsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockNotificationDestinationsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockNotificationDestinationsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockNotificationDestinationsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockNotificationDestinationsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockNotificationDestinationsInterface_DeleteById_Call { - return &MockNotificationDestinationsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockNotificationDestinationsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockNotificationDestinationsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_DeleteById_Call) Return(_a0 error) *MockNotificationDestinationsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNotificationDestinationsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockNotificationDestinationsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockNotificationDestinationsInterface) Get(ctx context.Context, request settings.GetNotificationDestinationRequest) (*settings.NotificationDestination, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.NotificationDestination - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetNotificationDestinationRequest) (*settings.NotificationDestination, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetNotificationDestinationRequest) *settings.NotificationDestination); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NotificationDestination) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetNotificationDestinationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNotificationDestinationsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockNotificationDestinationsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetNotificationDestinationRequest -func (_e *MockNotificationDestinationsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockNotificationDestinationsInterface_Get_Call { - return &MockNotificationDestinationsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockNotificationDestinationsInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetNotificationDestinationRequest)) *MockNotificationDestinationsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetNotificationDestinationRequest)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Get_Call) Return(_a0 *settings.NotificationDestination, _a1 error) *MockNotificationDestinationsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetNotificationDestinationRequest) (*settings.NotificationDestination, error)) *MockNotificationDestinationsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockNotificationDestinationsInterface) GetById(ctx context.Context, id string) (*settings.NotificationDestination, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *settings.NotificationDestination - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.NotificationDestination, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.NotificationDestination); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NotificationDestination) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNotificationDestinationsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockNotificationDestinationsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockNotificationDestinationsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockNotificationDestinationsInterface_GetById_Call { - return &MockNotificationDestinationsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockNotificationDestinationsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockNotificationDestinationsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_GetById_Call) Return(_a0 *settings.NotificationDestination, _a1 error) *MockNotificationDestinationsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNotificationDestinationsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*settings.NotificationDestination, error)) *MockNotificationDestinationsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockNotificationDestinationsInterface) List(ctx context.Context, request settings.ListNotificationDestinationsRequest) listing.Iterator[settings.ListNotificationDestinationsResult] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[settings.ListNotificationDestinationsResult] - if rf, ok := ret.Get(0).(func(context.Context, settings.ListNotificationDestinationsRequest) listing.Iterator[settings.ListNotificationDestinationsResult]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[settings.ListNotificationDestinationsResult]) - } - } - - return r0 -} - -// MockNotificationDestinationsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockNotificationDestinationsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListNotificationDestinationsRequest -func (_e *MockNotificationDestinationsInterface_Expecter) List(ctx interface{}, request interface{}) *MockNotificationDestinationsInterface_List_Call { - return &MockNotificationDestinationsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockNotificationDestinationsInterface_List_Call) Run(run func(ctx context.Context, request settings.ListNotificationDestinationsRequest)) *MockNotificationDestinationsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListNotificationDestinationsRequest)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_List_Call) Return(_a0 listing.Iterator[settings.ListNotificationDestinationsResult]) *MockNotificationDestinationsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockNotificationDestinationsInterface_List_Call) RunAndReturn(run func(context.Context, settings.ListNotificationDestinationsRequest) listing.Iterator[settings.ListNotificationDestinationsResult]) *MockNotificationDestinationsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockNotificationDestinationsInterface) ListAll(ctx context.Context, request settings.ListNotificationDestinationsRequest) ([]settings.ListNotificationDestinationsResult, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []settings.ListNotificationDestinationsResult - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ListNotificationDestinationsRequest) ([]settings.ListNotificationDestinationsResult, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.ListNotificationDestinationsRequest) []settings.ListNotificationDestinationsResult); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]settings.ListNotificationDestinationsResult) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.ListNotificationDestinationsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNotificationDestinationsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockNotificationDestinationsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListNotificationDestinationsRequest -func (_e *MockNotificationDestinationsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockNotificationDestinationsInterface_ListAll_Call { - return &MockNotificationDestinationsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockNotificationDestinationsInterface_ListAll_Call) Run(run func(ctx context.Context, request settings.ListNotificationDestinationsRequest)) *MockNotificationDestinationsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListNotificationDestinationsRequest)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_ListAll_Call) Return(_a0 []settings.ListNotificationDestinationsResult, _a1 error) *MockNotificationDestinationsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNotificationDestinationsInterface_ListAll_Call) RunAndReturn(run func(context.Context, settings.ListNotificationDestinationsRequest) ([]settings.ListNotificationDestinationsResult, error)) *MockNotificationDestinationsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockNotificationDestinationsInterface) Update(ctx context.Context, request settings.UpdateNotificationDestinationRequest) (*settings.NotificationDestination, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.NotificationDestination - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateNotificationDestinationRequest) (*settings.NotificationDestination, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateNotificationDestinationRequest) *settings.NotificationDestination); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.NotificationDestination) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateNotificationDestinationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockNotificationDestinationsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockNotificationDestinationsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateNotificationDestinationRequest -func (_e *MockNotificationDestinationsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockNotificationDestinationsInterface_Update_Call { - return &MockNotificationDestinationsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockNotificationDestinationsInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateNotificationDestinationRequest)) *MockNotificationDestinationsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateNotificationDestinationRequest)) - }) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Update_Call) Return(_a0 *settings.NotificationDestination, _a1 error) *MockNotificationDestinationsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockNotificationDestinationsInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateNotificationDestinationRequest) (*settings.NotificationDestination, error)) *MockNotificationDestinationsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockNotificationDestinationsInterface creates a new instance of MockNotificationDestinationsInterface. 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 NewMockNotificationDestinationsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockNotificationDestinationsInterface { - mock := &MockNotificationDestinationsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_personal_compute_interface.go b/experimental/mocks/service/settings/mock_personal_compute_interface.go deleted file mode 100644 index cb747b324..000000000 --- a/experimental/mocks/service/settings/mock_personal_compute_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockPersonalComputeInterface is an autogenerated mock type for the PersonalComputeInterface type -type MockPersonalComputeInterface struct { - mock.Mock -} - -type MockPersonalComputeInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockPersonalComputeInterface) EXPECT() *MockPersonalComputeInterface_Expecter { - return &MockPersonalComputeInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockPersonalComputeInterface) Delete(ctx context.Context, request settings.DeletePersonalComputeSettingRequest) (*settings.DeletePersonalComputeSettingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeletePersonalComputeSettingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeletePersonalComputeSettingRequest) (*settings.DeletePersonalComputeSettingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeletePersonalComputeSettingRequest) *settings.DeletePersonalComputeSettingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeletePersonalComputeSettingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeletePersonalComputeSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPersonalComputeInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockPersonalComputeInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeletePersonalComputeSettingRequest -func (_e *MockPersonalComputeInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockPersonalComputeInterface_Delete_Call { - return &MockPersonalComputeInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockPersonalComputeInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeletePersonalComputeSettingRequest)) *MockPersonalComputeInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeletePersonalComputeSettingRequest)) - }) - return _c -} - -func (_c *MockPersonalComputeInterface_Delete_Call) Return(_a0 *settings.DeletePersonalComputeSettingResponse, _a1 error) *MockPersonalComputeInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPersonalComputeInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeletePersonalComputeSettingRequest) (*settings.DeletePersonalComputeSettingResponse, error)) *MockPersonalComputeInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockPersonalComputeInterface) Get(ctx context.Context, request settings.GetPersonalComputeSettingRequest) (*settings.PersonalComputeSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.PersonalComputeSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetPersonalComputeSettingRequest) (*settings.PersonalComputeSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetPersonalComputeSettingRequest) *settings.PersonalComputeSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.PersonalComputeSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetPersonalComputeSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPersonalComputeInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockPersonalComputeInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetPersonalComputeSettingRequest -func (_e *MockPersonalComputeInterface_Expecter) Get(ctx interface{}, request interface{}) *MockPersonalComputeInterface_Get_Call { - return &MockPersonalComputeInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockPersonalComputeInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetPersonalComputeSettingRequest)) *MockPersonalComputeInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetPersonalComputeSettingRequest)) - }) - return _c -} - -func (_c *MockPersonalComputeInterface_Get_Call) Return(_a0 *settings.PersonalComputeSetting, _a1 error) *MockPersonalComputeInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPersonalComputeInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetPersonalComputeSettingRequest) (*settings.PersonalComputeSetting, error)) *MockPersonalComputeInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockPersonalComputeInterface) Update(ctx context.Context, request settings.UpdatePersonalComputeSettingRequest) (*settings.PersonalComputeSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.PersonalComputeSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdatePersonalComputeSettingRequest) (*settings.PersonalComputeSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdatePersonalComputeSettingRequest) *settings.PersonalComputeSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.PersonalComputeSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdatePersonalComputeSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockPersonalComputeInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockPersonalComputeInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdatePersonalComputeSettingRequest -func (_e *MockPersonalComputeInterface_Expecter) Update(ctx interface{}, request interface{}) *MockPersonalComputeInterface_Update_Call { - return &MockPersonalComputeInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockPersonalComputeInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdatePersonalComputeSettingRequest)) *MockPersonalComputeInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdatePersonalComputeSettingRequest)) - }) - return _c -} - -func (_c *MockPersonalComputeInterface_Update_Call) Return(_a0 *settings.PersonalComputeSetting, _a1 error) *MockPersonalComputeInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockPersonalComputeInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdatePersonalComputeSettingRequest) (*settings.PersonalComputeSetting, error)) *MockPersonalComputeInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockPersonalComputeInterface creates a new instance of MockPersonalComputeInterface. 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 NewMockPersonalComputeInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockPersonalComputeInterface { - mock := &MockPersonalComputeInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_restrict_workspace_admins_interface.go b/experimental/mocks/service/settings/mock_restrict_workspace_admins_interface.go deleted file mode 100644 index 5dd1373a0..000000000 --- a/experimental/mocks/service/settings/mock_restrict_workspace_admins_interface.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockRestrictWorkspaceAdminsInterface is an autogenerated mock type for the RestrictWorkspaceAdminsInterface type -type MockRestrictWorkspaceAdminsInterface struct { - mock.Mock -} - -type MockRestrictWorkspaceAdminsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockRestrictWorkspaceAdminsInterface) EXPECT() *MockRestrictWorkspaceAdminsInterface_Expecter { - return &MockRestrictWorkspaceAdminsInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockRestrictWorkspaceAdminsInterface) Delete(ctx context.Context, request settings.DeleteRestrictWorkspaceAdminsSettingRequest) (*settings.DeleteRestrictWorkspaceAdminsSettingResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 *settings.DeleteRestrictWorkspaceAdminsSettingResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteRestrictWorkspaceAdminsSettingRequest) (*settings.DeleteRestrictWorkspaceAdminsSettingResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteRestrictWorkspaceAdminsSettingRequest) *settings.DeleteRestrictWorkspaceAdminsSettingResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.DeleteRestrictWorkspaceAdminsSettingResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.DeleteRestrictWorkspaceAdminsSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRestrictWorkspaceAdminsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockRestrictWorkspaceAdminsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteRestrictWorkspaceAdminsSettingRequest -func (_e *MockRestrictWorkspaceAdminsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockRestrictWorkspaceAdminsInterface_Delete_Call { - return &MockRestrictWorkspaceAdminsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteRestrictWorkspaceAdminsSettingRequest)) *MockRestrictWorkspaceAdminsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteRestrictWorkspaceAdminsSettingRequest)) - }) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Delete_Call) Return(_a0 *settings.DeleteRestrictWorkspaceAdminsSettingResponse, _a1 error) *MockRestrictWorkspaceAdminsInterface_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteRestrictWorkspaceAdminsSettingRequest) (*settings.DeleteRestrictWorkspaceAdminsSettingResponse, error)) *MockRestrictWorkspaceAdminsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockRestrictWorkspaceAdminsInterface) Get(ctx context.Context, request settings.GetRestrictWorkspaceAdminsSettingRequest) (*settings.RestrictWorkspaceAdminsSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.RestrictWorkspaceAdminsSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetRestrictWorkspaceAdminsSettingRequest) (*settings.RestrictWorkspaceAdminsSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetRestrictWorkspaceAdminsSettingRequest) *settings.RestrictWorkspaceAdminsSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.RestrictWorkspaceAdminsSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetRestrictWorkspaceAdminsSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRestrictWorkspaceAdminsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockRestrictWorkspaceAdminsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetRestrictWorkspaceAdminsSettingRequest -func (_e *MockRestrictWorkspaceAdminsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockRestrictWorkspaceAdminsInterface_Get_Call { - return &MockRestrictWorkspaceAdminsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetRestrictWorkspaceAdminsSettingRequest)) *MockRestrictWorkspaceAdminsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetRestrictWorkspaceAdminsSettingRequest)) - }) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Get_Call) Return(_a0 *settings.RestrictWorkspaceAdminsSetting, _a1 error) *MockRestrictWorkspaceAdminsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetRestrictWorkspaceAdminsSettingRequest) (*settings.RestrictWorkspaceAdminsSetting, error)) *MockRestrictWorkspaceAdminsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockRestrictWorkspaceAdminsInterface) Update(ctx context.Context, request settings.UpdateRestrictWorkspaceAdminsSettingRequest) (*settings.RestrictWorkspaceAdminsSetting, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *settings.RestrictWorkspaceAdminsSetting - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateRestrictWorkspaceAdminsSettingRequest) (*settings.RestrictWorkspaceAdminsSetting, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.UpdateRestrictWorkspaceAdminsSettingRequest) *settings.RestrictWorkspaceAdminsSetting); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.RestrictWorkspaceAdminsSetting) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.UpdateRestrictWorkspaceAdminsSettingRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRestrictWorkspaceAdminsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockRestrictWorkspaceAdminsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request settings.UpdateRestrictWorkspaceAdminsSettingRequest -func (_e *MockRestrictWorkspaceAdminsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockRestrictWorkspaceAdminsInterface_Update_Call { - return &MockRestrictWorkspaceAdminsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Update_Call) Run(run func(ctx context.Context, request settings.UpdateRestrictWorkspaceAdminsSettingRequest)) *MockRestrictWorkspaceAdminsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.UpdateRestrictWorkspaceAdminsSettingRequest)) - }) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Update_Call) Return(_a0 *settings.RestrictWorkspaceAdminsSetting, _a1 error) *MockRestrictWorkspaceAdminsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRestrictWorkspaceAdminsInterface_Update_Call) RunAndReturn(run func(context.Context, settings.UpdateRestrictWorkspaceAdminsSettingRequest) (*settings.RestrictWorkspaceAdminsSetting, error)) *MockRestrictWorkspaceAdminsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockRestrictWorkspaceAdminsInterface creates a new instance of MockRestrictWorkspaceAdminsInterface. 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 NewMockRestrictWorkspaceAdminsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockRestrictWorkspaceAdminsInterface { - mock := &MockRestrictWorkspaceAdminsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_settings_interface.go b/experimental/mocks/service/settings/mock_settings_interface.go deleted file mode 100644 index 0e4a6a17a..000000000 --- a/experimental/mocks/service/settings/mock_settings_interface.go +++ /dev/null @@ -1,458 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockSettingsInterface is an autogenerated mock type for the SettingsInterface type -type MockSettingsInterface struct { - mock.Mock -} - -type MockSettingsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSettingsInterface) EXPECT() *MockSettingsInterface_Expecter { - return &MockSettingsInterface_Expecter{mock: &_m.Mock} -} - -// AibiDashboardEmbeddingAccessPolicy provides a mock function with given fields: -func (_m *MockSettingsInterface) AibiDashboardEmbeddingAccessPolicy() settings.AibiDashboardEmbeddingAccessPolicyInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AibiDashboardEmbeddingAccessPolicy") - } - - var r0 settings.AibiDashboardEmbeddingAccessPolicyInterface - if rf, ok := ret.Get(0).(func() settings.AibiDashboardEmbeddingAccessPolicyInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AibiDashboardEmbeddingAccessPolicyInterface) - } - } - - return r0 -} - -// MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AibiDashboardEmbeddingAccessPolicy' -type MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call struct { - *mock.Call -} - -// AibiDashboardEmbeddingAccessPolicy is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) AibiDashboardEmbeddingAccessPolicy() *MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call { - return &MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call{Call: _e.mock.On("AibiDashboardEmbeddingAccessPolicy")} -} - -func (_c *MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call) Run(run func()) *MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call) Return(_a0 settings.AibiDashboardEmbeddingAccessPolicyInterface) *MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call) RunAndReturn(run func() settings.AibiDashboardEmbeddingAccessPolicyInterface) *MockSettingsInterface_AibiDashboardEmbeddingAccessPolicy_Call { - _c.Call.Return(run) - return _c -} - -// AibiDashboardEmbeddingApprovedDomains provides a mock function with given fields: -func (_m *MockSettingsInterface) AibiDashboardEmbeddingApprovedDomains() settings.AibiDashboardEmbeddingApprovedDomainsInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AibiDashboardEmbeddingApprovedDomains") - } - - var r0 settings.AibiDashboardEmbeddingApprovedDomainsInterface - if rf, ok := ret.Get(0).(func() settings.AibiDashboardEmbeddingApprovedDomainsInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AibiDashboardEmbeddingApprovedDomainsInterface) - } - } - - return r0 -} - -// MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AibiDashboardEmbeddingApprovedDomains' -type MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call struct { - *mock.Call -} - -// AibiDashboardEmbeddingApprovedDomains is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) AibiDashboardEmbeddingApprovedDomains() *MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call { - return &MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call{Call: _e.mock.On("AibiDashboardEmbeddingApprovedDomains")} -} - -func (_c *MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call) Run(run func()) *MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call) Return(_a0 settings.AibiDashboardEmbeddingApprovedDomainsInterface) *MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call) RunAndReturn(run func() settings.AibiDashboardEmbeddingApprovedDomainsInterface) *MockSettingsInterface_AibiDashboardEmbeddingApprovedDomains_Call { - _c.Call.Return(run) - return _c -} - -// AutomaticClusterUpdate provides a mock function with given fields: -func (_m *MockSettingsInterface) AutomaticClusterUpdate() settings.AutomaticClusterUpdateInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AutomaticClusterUpdate") - } - - var r0 settings.AutomaticClusterUpdateInterface - if rf, ok := ret.Get(0).(func() settings.AutomaticClusterUpdateInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.AutomaticClusterUpdateInterface) - } - } - - return r0 -} - -// MockSettingsInterface_AutomaticClusterUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AutomaticClusterUpdate' -type MockSettingsInterface_AutomaticClusterUpdate_Call struct { - *mock.Call -} - -// AutomaticClusterUpdate is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) AutomaticClusterUpdate() *MockSettingsInterface_AutomaticClusterUpdate_Call { - return &MockSettingsInterface_AutomaticClusterUpdate_Call{Call: _e.mock.On("AutomaticClusterUpdate")} -} - -func (_c *MockSettingsInterface_AutomaticClusterUpdate_Call) Run(run func()) *MockSettingsInterface_AutomaticClusterUpdate_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_AutomaticClusterUpdate_Call) Return(_a0 settings.AutomaticClusterUpdateInterface) *MockSettingsInterface_AutomaticClusterUpdate_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_AutomaticClusterUpdate_Call) RunAndReturn(run func() settings.AutomaticClusterUpdateInterface) *MockSettingsInterface_AutomaticClusterUpdate_Call { - _c.Call.Return(run) - return _c -} - -// ComplianceSecurityProfile provides a mock function with given fields: -func (_m *MockSettingsInterface) ComplianceSecurityProfile() settings.ComplianceSecurityProfileInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ComplianceSecurityProfile") - } - - var r0 settings.ComplianceSecurityProfileInterface - if rf, ok := ret.Get(0).(func() settings.ComplianceSecurityProfileInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.ComplianceSecurityProfileInterface) - } - } - - return r0 -} - -// MockSettingsInterface_ComplianceSecurityProfile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ComplianceSecurityProfile' -type MockSettingsInterface_ComplianceSecurityProfile_Call struct { - *mock.Call -} - -// ComplianceSecurityProfile is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) ComplianceSecurityProfile() *MockSettingsInterface_ComplianceSecurityProfile_Call { - return &MockSettingsInterface_ComplianceSecurityProfile_Call{Call: _e.mock.On("ComplianceSecurityProfile")} -} - -func (_c *MockSettingsInterface_ComplianceSecurityProfile_Call) Run(run func()) *MockSettingsInterface_ComplianceSecurityProfile_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_ComplianceSecurityProfile_Call) Return(_a0 settings.ComplianceSecurityProfileInterface) *MockSettingsInterface_ComplianceSecurityProfile_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_ComplianceSecurityProfile_Call) RunAndReturn(run func() settings.ComplianceSecurityProfileInterface) *MockSettingsInterface_ComplianceSecurityProfile_Call { - _c.Call.Return(run) - return _c -} - -// DefaultNamespace provides a mock function with given fields: -func (_m *MockSettingsInterface) DefaultNamespace() settings.DefaultNamespaceInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DefaultNamespace") - } - - var r0 settings.DefaultNamespaceInterface - if rf, ok := ret.Get(0).(func() settings.DefaultNamespaceInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.DefaultNamespaceInterface) - } - } - - return r0 -} - -// MockSettingsInterface_DefaultNamespace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DefaultNamespace' -type MockSettingsInterface_DefaultNamespace_Call struct { - *mock.Call -} - -// DefaultNamespace is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) DefaultNamespace() *MockSettingsInterface_DefaultNamespace_Call { - return &MockSettingsInterface_DefaultNamespace_Call{Call: _e.mock.On("DefaultNamespace")} -} - -func (_c *MockSettingsInterface_DefaultNamespace_Call) Run(run func()) *MockSettingsInterface_DefaultNamespace_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_DefaultNamespace_Call) Return(_a0 settings.DefaultNamespaceInterface) *MockSettingsInterface_DefaultNamespace_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_DefaultNamespace_Call) RunAndReturn(run func() settings.DefaultNamespaceInterface) *MockSettingsInterface_DefaultNamespace_Call { - _c.Call.Return(run) - return _c -} - -// DisableLegacyAccess provides a mock function with given fields: -func (_m *MockSettingsInterface) DisableLegacyAccess() settings.DisableLegacyAccessInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DisableLegacyAccess") - } - - var r0 settings.DisableLegacyAccessInterface - if rf, ok := ret.Get(0).(func() settings.DisableLegacyAccessInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.DisableLegacyAccessInterface) - } - } - - return r0 -} - -// MockSettingsInterface_DisableLegacyAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableLegacyAccess' -type MockSettingsInterface_DisableLegacyAccess_Call struct { - *mock.Call -} - -// DisableLegacyAccess is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) DisableLegacyAccess() *MockSettingsInterface_DisableLegacyAccess_Call { - return &MockSettingsInterface_DisableLegacyAccess_Call{Call: _e.mock.On("DisableLegacyAccess")} -} - -func (_c *MockSettingsInterface_DisableLegacyAccess_Call) Run(run func()) *MockSettingsInterface_DisableLegacyAccess_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_DisableLegacyAccess_Call) Return(_a0 settings.DisableLegacyAccessInterface) *MockSettingsInterface_DisableLegacyAccess_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_DisableLegacyAccess_Call) RunAndReturn(run func() settings.DisableLegacyAccessInterface) *MockSettingsInterface_DisableLegacyAccess_Call { - _c.Call.Return(run) - return _c -} - -// DisableLegacyDbfs provides a mock function with given fields: -func (_m *MockSettingsInterface) DisableLegacyDbfs() settings.DisableLegacyDbfsInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DisableLegacyDbfs") - } - - var r0 settings.DisableLegacyDbfsInterface - if rf, ok := ret.Get(0).(func() settings.DisableLegacyDbfsInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.DisableLegacyDbfsInterface) - } - } - - return r0 -} - -// MockSettingsInterface_DisableLegacyDbfs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableLegacyDbfs' -type MockSettingsInterface_DisableLegacyDbfs_Call struct { - *mock.Call -} - -// DisableLegacyDbfs is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) DisableLegacyDbfs() *MockSettingsInterface_DisableLegacyDbfs_Call { - return &MockSettingsInterface_DisableLegacyDbfs_Call{Call: _e.mock.On("DisableLegacyDbfs")} -} - -func (_c *MockSettingsInterface_DisableLegacyDbfs_Call) Run(run func()) *MockSettingsInterface_DisableLegacyDbfs_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_DisableLegacyDbfs_Call) Return(_a0 settings.DisableLegacyDbfsInterface) *MockSettingsInterface_DisableLegacyDbfs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_DisableLegacyDbfs_Call) RunAndReturn(run func() settings.DisableLegacyDbfsInterface) *MockSettingsInterface_DisableLegacyDbfs_Call { - _c.Call.Return(run) - return _c -} - -// EnhancedSecurityMonitoring provides a mock function with given fields: -func (_m *MockSettingsInterface) EnhancedSecurityMonitoring() settings.EnhancedSecurityMonitoringInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for EnhancedSecurityMonitoring") - } - - var r0 settings.EnhancedSecurityMonitoringInterface - if rf, ok := ret.Get(0).(func() settings.EnhancedSecurityMonitoringInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.EnhancedSecurityMonitoringInterface) - } - } - - return r0 -} - -// MockSettingsInterface_EnhancedSecurityMonitoring_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnhancedSecurityMonitoring' -type MockSettingsInterface_EnhancedSecurityMonitoring_Call struct { - *mock.Call -} - -// EnhancedSecurityMonitoring is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) EnhancedSecurityMonitoring() *MockSettingsInterface_EnhancedSecurityMonitoring_Call { - return &MockSettingsInterface_EnhancedSecurityMonitoring_Call{Call: _e.mock.On("EnhancedSecurityMonitoring")} -} - -func (_c *MockSettingsInterface_EnhancedSecurityMonitoring_Call) Run(run func()) *MockSettingsInterface_EnhancedSecurityMonitoring_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_EnhancedSecurityMonitoring_Call) Return(_a0 settings.EnhancedSecurityMonitoringInterface) *MockSettingsInterface_EnhancedSecurityMonitoring_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_EnhancedSecurityMonitoring_Call) RunAndReturn(run func() settings.EnhancedSecurityMonitoringInterface) *MockSettingsInterface_EnhancedSecurityMonitoring_Call { - _c.Call.Return(run) - return _c -} - -// RestrictWorkspaceAdmins provides a mock function with given fields: -func (_m *MockSettingsInterface) RestrictWorkspaceAdmins() settings.RestrictWorkspaceAdminsInterface { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RestrictWorkspaceAdmins") - } - - var r0 settings.RestrictWorkspaceAdminsInterface - if rf, ok := ret.Get(0).(func() settings.RestrictWorkspaceAdminsInterface); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(settings.RestrictWorkspaceAdminsInterface) - } - } - - return r0 -} - -// MockSettingsInterface_RestrictWorkspaceAdmins_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestrictWorkspaceAdmins' -type MockSettingsInterface_RestrictWorkspaceAdmins_Call struct { - *mock.Call -} - -// RestrictWorkspaceAdmins is a helper method to define mock.On call -func (_e *MockSettingsInterface_Expecter) RestrictWorkspaceAdmins() *MockSettingsInterface_RestrictWorkspaceAdmins_Call { - return &MockSettingsInterface_RestrictWorkspaceAdmins_Call{Call: _e.mock.On("RestrictWorkspaceAdmins")} -} - -func (_c *MockSettingsInterface_RestrictWorkspaceAdmins_Call) Run(run func()) *MockSettingsInterface_RestrictWorkspaceAdmins_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *MockSettingsInterface_RestrictWorkspaceAdmins_Call) Return(_a0 settings.RestrictWorkspaceAdminsInterface) *MockSettingsInterface_RestrictWorkspaceAdmins_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSettingsInterface_RestrictWorkspaceAdmins_Call) RunAndReturn(run func() settings.RestrictWorkspaceAdminsInterface) *MockSettingsInterface_RestrictWorkspaceAdmins_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSettingsInterface creates a new instance of MockSettingsInterface. 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 NewMockSettingsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSettingsInterface { - mock := &MockSettingsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_token_management_interface.go b/experimental/mocks/service/settings/mock_token_management_interface.go deleted file mode 100644 index 14f8737ce..000000000 --- a/experimental/mocks/service/settings/mock_token_management_interface.go +++ /dev/null @@ -1,770 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - settings "github.com/databricks/databricks-sdk-go/service/settings" -) - -// MockTokenManagementInterface is an autogenerated mock type for the TokenManagementInterface type -type MockTokenManagementInterface struct { - mock.Mock -} - -type MockTokenManagementInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTokenManagementInterface) EXPECT() *MockTokenManagementInterface_Expecter { - return &MockTokenManagementInterface_Expecter{mock: &_m.Mock} -} - -// CreateOboToken provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) CreateOboToken(ctx context.Context, request settings.CreateOboTokenRequest) (*settings.CreateOboTokenResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateOboToken") - } - - var r0 *settings.CreateOboTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateOboTokenRequest) (*settings.CreateOboTokenResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateOboTokenRequest) *settings.CreateOboTokenResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.CreateOboTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.CreateOboTokenRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_CreateOboToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOboToken' -type MockTokenManagementInterface_CreateOboToken_Call struct { - *mock.Call -} - -// CreateOboToken is a helper method to define mock.On call -// - ctx context.Context -// - request settings.CreateOboTokenRequest -func (_e *MockTokenManagementInterface_Expecter) CreateOboToken(ctx interface{}, request interface{}) *MockTokenManagementInterface_CreateOboToken_Call { - return &MockTokenManagementInterface_CreateOboToken_Call{Call: _e.mock.On("CreateOboToken", ctx, request)} -} - -func (_c *MockTokenManagementInterface_CreateOboToken_Call) Run(run func(ctx context.Context, request settings.CreateOboTokenRequest)) *MockTokenManagementInterface_CreateOboToken_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.CreateOboTokenRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_CreateOboToken_Call) Return(_a0 *settings.CreateOboTokenResponse, _a1 error) *MockTokenManagementInterface_CreateOboToken_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_CreateOboToken_Call) RunAndReturn(run func(context.Context, settings.CreateOboTokenRequest) (*settings.CreateOboTokenResponse, error)) *MockTokenManagementInterface_CreateOboToken_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) Delete(ctx context.Context, request settings.DeleteTokenManagementRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.DeleteTokenManagementRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTokenManagementInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockTokenManagementInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.DeleteTokenManagementRequest -func (_e *MockTokenManagementInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockTokenManagementInterface_Delete_Call { - return &MockTokenManagementInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockTokenManagementInterface_Delete_Call) Run(run func(ctx context.Context, request settings.DeleteTokenManagementRequest)) *MockTokenManagementInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.DeleteTokenManagementRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_Delete_Call) Return(_a0 error) *MockTokenManagementInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokenManagementInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.DeleteTokenManagementRequest) error) *MockTokenManagementInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByTokenId provides a mock function with given fields: ctx, tokenId -func (_m *MockTokenManagementInterface) DeleteByTokenId(ctx context.Context, tokenId string) error { - ret := _m.Called(ctx, tokenId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByTokenId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, tokenId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTokenManagementInterface_DeleteByTokenId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByTokenId' -type MockTokenManagementInterface_DeleteByTokenId_Call struct { - *mock.Call -} - -// DeleteByTokenId is a helper method to define mock.On call -// - ctx context.Context -// - tokenId string -func (_e *MockTokenManagementInterface_Expecter) DeleteByTokenId(ctx interface{}, tokenId interface{}) *MockTokenManagementInterface_DeleteByTokenId_Call { - return &MockTokenManagementInterface_DeleteByTokenId_Call{Call: _e.mock.On("DeleteByTokenId", ctx, tokenId)} -} - -func (_c *MockTokenManagementInterface_DeleteByTokenId_Call) Run(run func(ctx context.Context, tokenId string)) *MockTokenManagementInterface_DeleteByTokenId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_DeleteByTokenId_Call) Return(_a0 error) *MockTokenManagementInterface_DeleteByTokenId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokenManagementInterface_DeleteByTokenId_Call) RunAndReturn(run func(context.Context, string) error) *MockTokenManagementInterface_DeleteByTokenId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) Get(ctx context.Context, request settings.GetTokenManagementRequest) (*settings.GetTokenResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *settings.GetTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetTokenManagementRequest) (*settings.GetTokenResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetTokenManagementRequest) *settings.GetTokenResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.GetTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetTokenManagementRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockTokenManagementInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetTokenManagementRequest -func (_e *MockTokenManagementInterface_Expecter) Get(ctx interface{}, request interface{}) *MockTokenManagementInterface_Get_Call { - return &MockTokenManagementInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockTokenManagementInterface_Get_Call) Run(run func(ctx context.Context, request settings.GetTokenManagementRequest)) *MockTokenManagementInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetTokenManagementRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_Get_Call) Return(_a0 *settings.GetTokenResponse, _a1 error) *MockTokenManagementInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_Get_Call) RunAndReturn(run func(context.Context, settings.GetTokenManagementRequest) (*settings.GetTokenResponse, error)) *MockTokenManagementInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByComment provides a mock function with given fields: ctx, name -func (_m *MockTokenManagementInterface) GetByComment(ctx context.Context, name string) (*settings.TokenInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByComment") - } - - var r0 *settings.TokenInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.TokenInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.TokenInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.TokenInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_GetByComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByComment' -type MockTokenManagementInterface_GetByComment_Call struct { - *mock.Call -} - -// GetByComment is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockTokenManagementInterface_Expecter) GetByComment(ctx interface{}, name interface{}) *MockTokenManagementInterface_GetByComment_Call { - return &MockTokenManagementInterface_GetByComment_Call{Call: _e.mock.On("GetByComment", ctx, name)} -} - -func (_c *MockTokenManagementInterface_GetByComment_Call) Run(run func(ctx context.Context, name string)) *MockTokenManagementInterface_GetByComment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_GetByComment_Call) Return(_a0 *settings.TokenInfo, _a1 error) *MockTokenManagementInterface_GetByComment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_GetByComment_Call) RunAndReturn(run func(context.Context, string) (*settings.TokenInfo, error)) *MockTokenManagementInterface_GetByComment_Call { - _c.Call.Return(run) - return _c -} - -// GetByTokenId provides a mock function with given fields: ctx, tokenId -func (_m *MockTokenManagementInterface) GetByTokenId(ctx context.Context, tokenId string) (*settings.GetTokenResponse, error) { - ret := _m.Called(ctx, tokenId) - - if len(ret) == 0 { - panic("no return value specified for GetByTokenId") - } - - var r0 *settings.GetTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.GetTokenResponse, error)); ok { - return rf(ctx, tokenId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.GetTokenResponse); ok { - r0 = rf(ctx, tokenId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.GetTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, tokenId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_GetByTokenId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByTokenId' -type MockTokenManagementInterface_GetByTokenId_Call struct { - *mock.Call -} - -// GetByTokenId is a helper method to define mock.On call -// - ctx context.Context -// - tokenId string -func (_e *MockTokenManagementInterface_Expecter) GetByTokenId(ctx interface{}, tokenId interface{}) *MockTokenManagementInterface_GetByTokenId_Call { - return &MockTokenManagementInterface_GetByTokenId_Call{Call: _e.mock.On("GetByTokenId", ctx, tokenId)} -} - -func (_c *MockTokenManagementInterface_GetByTokenId_Call) Run(run func(ctx context.Context, tokenId string)) *MockTokenManagementInterface_GetByTokenId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_GetByTokenId_Call) Return(_a0 *settings.GetTokenResponse, _a1 error) *MockTokenManagementInterface_GetByTokenId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_GetByTokenId_Call) RunAndReturn(run func(context.Context, string) (*settings.GetTokenResponse, error)) *MockTokenManagementInterface_GetByTokenId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx -func (_m *MockTokenManagementInterface) GetPermissionLevels(ctx context.Context) (*settings.GetTokenPermissionLevelsResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *settings.GetTokenPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*settings.GetTokenPermissionLevelsResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *settings.GetTokenPermissionLevelsResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.GetTokenPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockTokenManagementInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockTokenManagementInterface_Expecter) GetPermissionLevels(ctx interface{}) *MockTokenManagementInterface_GetPermissionLevels_Call { - return &MockTokenManagementInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx)} -} - -func (_c *MockTokenManagementInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context)) *MockTokenManagementInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_GetPermissionLevels_Call) Return(_a0 *settings.GetTokenPermissionLevelsResponse, _a1 error) *MockTokenManagementInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context) (*settings.GetTokenPermissionLevelsResponse, error)) *MockTokenManagementInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx -func (_m *MockTokenManagementInterface) GetPermissions(ctx context.Context) (*settings.TokenPermissions, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *settings.TokenPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*settings.TokenPermissions, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *settings.TokenPermissions); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.TokenPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockTokenManagementInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockTokenManagementInterface_Expecter) GetPermissions(ctx interface{}) *MockTokenManagementInterface_GetPermissions_Call { - return &MockTokenManagementInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx)} -} - -func (_c *MockTokenManagementInterface_GetPermissions_Call) Run(run func(ctx context.Context)) *MockTokenManagementInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_GetPermissions_Call) Return(_a0 *settings.TokenPermissions, _a1 error) *MockTokenManagementInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_GetPermissions_Call) RunAndReturn(run func(context.Context) (*settings.TokenPermissions, error)) *MockTokenManagementInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) List(ctx context.Context, request settings.ListTokenManagementRequest) listing.Iterator[settings.TokenInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[settings.TokenInfo] - if rf, ok := ret.Get(0).(func(context.Context, settings.ListTokenManagementRequest) listing.Iterator[settings.TokenInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[settings.TokenInfo]) - } - } - - return r0 -} - -// MockTokenManagementInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockTokenManagementInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListTokenManagementRequest -func (_e *MockTokenManagementInterface_Expecter) List(ctx interface{}, request interface{}) *MockTokenManagementInterface_List_Call { - return &MockTokenManagementInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockTokenManagementInterface_List_Call) Run(run func(ctx context.Context, request settings.ListTokenManagementRequest)) *MockTokenManagementInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListTokenManagementRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_List_Call) Return(_a0 listing.Iterator[settings.TokenInfo]) *MockTokenManagementInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokenManagementInterface_List_Call) RunAndReturn(run func(context.Context, settings.ListTokenManagementRequest) listing.Iterator[settings.TokenInfo]) *MockTokenManagementInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) ListAll(ctx context.Context, request settings.ListTokenManagementRequest) ([]settings.TokenInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []settings.TokenInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ListTokenManagementRequest) ([]settings.TokenInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.ListTokenManagementRequest) []settings.TokenInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]settings.TokenInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.ListTokenManagementRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockTokenManagementInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListTokenManagementRequest -func (_e *MockTokenManagementInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockTokenManagementInterface_ListAll_Call { - return &MockTokenManagementInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockTokenManagementInterface_ListAll_Call) Run(run func(ctx context.Context, request settings.ListTokenManagementRequest)) *MockTokenManagementInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListTokenManagementRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_ListAll_Call) Return(_a0 []settings.TokenInfo, _a1 error) *MockTokenManagementInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_ListAll_Call) RunAndReturn(run func(context.Context, settings.ListTokenManagementRequest) ([]settings.TokenInfo, error)) *MockTokenManagementInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) SetPermissions(ctx context.Context, request settings.TokenPermissionsRequest) (*settings.TokenPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *settings.TokenPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.TokenPermissionsRequest) (*settings.TokenPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.TokenPermissionsRequest) *settings.TokenPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.TokenPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.TokenPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockTokenManagementInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request settings.TokenPermissionsRequest -func (_e *MockTokenManagementInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockTokenManagementInterface_SetPermissions_Call { - return &MockTokenManagementInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockTokenManagementInterface_SetPermissions_Call) Run(run func(ctx context.Context, request settings.TokenPermissionsRequest)) *MockTokenManagementInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.TokenPermissionsRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_SetPermissions_Call) Return(_a0 *settings.TokenPermissions, _a1 error) *MockTokenManagementInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, settings.TokenPermissionsRequest) (*settings.TokenPermissions, error)) *MockTokenManagementInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// TokenInfoCommentToTokenIdMap provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) TokenInfoCommentToTokenIdMap(ctx context.Context, request settings.ListTokenManagementRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for TokenInfoCommentToTokenIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.ListTokenManagementRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.ListTokenManagementRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.ListTokenManagementRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TokenInfoCommentToTokenIdMap' -type MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call struct { - *mock.Call -} - -// TokenInfoCommentToTokenIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request settings.ListTokenManagementRequest -func (_e *MockTokenManagementInterface_Expecter) TokenInfoCommentToTokenIdMap(ctx interface{}, request interface{}) *MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call { - return &MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call{Call: _e.mock.On("TokenInfoCommentToTokenIdMap", ctx, request)} -} - -func (_c *MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call) Run(run func(ctx context.Context, request settings.ListTokenManagementRequest)) *MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.ListTokenManagementRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call) RunAndReturn(run func(context.Context, settings.ListTokenManagementRequest) (map[string]string, error)) *MockTokenManagementInterface_TokenInfoCommentToTokenIdMap_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockTokenManagementInterface) UpdatePermissions(ctx context.Context, request settings.TokenPermissionsRequest) (*settings.TokenPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *settings.TokenPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.TokenPermissionsRequest) (*settings.TokenPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.TokenPermissionsRequest) *settings.TokenPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.TokenPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.TokenPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokenManagementInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockTokenManagementInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request settings.TokenPermissionsRequest -func (_e *MockTokenManagementInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockTokenManagementInterface_UpdatePermissions_Call { - return &MockTokenManagementInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockTokenManagementInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request settings.TokenPermissionsRequest)) *MockTokenManagementInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.TokenPermissionsRequest)) - }) - return _c -} - -func (_c *MockTokenManagementInterface_UpdatePermissions_Call) Return(_a0 *settings.TokenPermissions, _a1 error) *MockTokenManagementInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokenManagementInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, settings.TokenPermissionsRequest) (*settings.TokenPermissions, error)) *MockTokenManagementInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTokenManagementInterface creates a new instance of MockTokenManagementInterface. 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 NewMockTokenManagementInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTokenManagementInterface { - mock := &MockTokenManagementInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_tokens_interface.go b/experimental/mocks/service/settings/mock_tokens_interface.go deleted file mode 100644 index 4b3263816..000000000 --- a/experimental/mocks/service/settings/mock_tokens_interface.go +++ /dev/null @@ -1,415 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - settings "github.com/databricks/databricks-sdk-go/service/settings" -) - -// MockTokensInterface is an autogenerated mock type for the TokensInterface type -type MockTokensInterface struct { - mock.Mock -} - -type MockTokensInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockTokensInterface) EXPECT() *MockTokensInterface_Expecter { - return &MockTokensInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockTokensInterface) Create(ctx context.Context, request settings.CreateTokenRequest) (*settings.CreateTokenResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *settings.CreateTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateTokenRequest) (*settings.CreateTokenResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.CreateTokenRequest) *settings.CreateTokenResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.CreateTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.CreateTokenRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokensInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockTokensInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request settings.CreateTokenRequest -func (_e *MockTokensInterface_Expecter) Create(ctx interface{}, request interface{}) *MockTokensInterface_Create_Call { - return &MockTokensInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockTokensInterface_Create_Call) Run(run func(ctx context.Context, request settings.CreateTokenRequest)) *MockTokensInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.CreateTokenRequest)) - }) - return _c -} - -func (_c *MockTokensInterface_Create_Call) Return(_a0 *settings.CreateTokenResponse, _a1 error) *MockTokensInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokensInterface_Create_Call) RunAndReturn(run func(context.Context, settings.CreateTokenRequest) (*settings.CreateTokenResponse, error)) *MockTokensInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockTokensInterface) Delete(ctx context.Context, request settings.RevokeTokenRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.RevokeTokenRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTokensInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockTokensInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request settings.RevokeTokenRequest -func (_e *MockTokensInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockTokensInterface_Delete_Call { - return &MockTokensInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockTokensInterface_Delete_Call) Run(run func(ctx context.Context, request settings.RevokeTokenRequest)) *MockTokensInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.RevokeTokenRequest)) - }) - return _c -} - -func (_c *MockTokensInterface_Delete_Call) Return(_a0 error) *MockTokensInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokensInterface_Delete_Call) RunAndReturn(run func(context.Context, settings.RevokeTokenRequest) error) *MockTokensInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByTokenId provides a mock function with given fields: ctx, tokenId -func (_m *MockTokensInterface) DeleteByTokenId(ctx context.Context, tokenId string) error { - ret := _m.Called(ctx, tokenId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByTokenId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, tokenId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockTokensInterface_DeleteByTokenId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByTokenId' -type MockTokensInterface_DeleteByTokenId_Call struct { - *mock.Call -} - -// DeleteByTokenId is a helper method to define mock.On call -// - ctx context.Context -// - tokenId string -func (_e *MockTokensInterface_Expecter) DeleteByTokenId(ctx interface{}, tokenId interface{}) *MockTokensInterface_DeleteByTokenId_Call { - return &MockTokensInterface_DeleteByTokenId_Call{Call: _e.mock.On("DeleteByTokenId", ctx, tokenId)} -} - -func (_c *MockTokensInterface_DeleteByTokenId_Call) Run(run func(ctx context.Context, tokenId string)) *MockTokensInterface_DeleteByTokenId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTokensInterface_DeleteByTokenId_Call) Return(_a0 error) *MockTokensInterface_DeleteByTokenId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokensInterface_DeleteByTokenId_Call) RunAndReturn(run func(context.Context, string) error) *MockTokensInterface_DeleteByTokenId_Call { - _c.Call.Return(run) - return _c -} - -// GetByComment provides a mock function with given fields: ctx, name -func (_m *MockTokensInterface) GetByComment(ctx context.Context, name string) (*settings.PublicTokenInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByComment") - } - - var r0 *settings.PublicTokenInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*settings.PublicTokenInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *settings.PublicTokenInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*settings.PublicTokenInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokensInterface_GetByComment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByComment' -type MockTokensInterface_GetByComment_Call struct { - *mock.Call -} - -// GetByComment is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockTokensInterface_Expecter) GetByComment(ctx interface{}, name interface{}) *MockTokensInterface_GetByComment_Call { - return &MockTokensInterface_GetByComment_Call{Call: _e.mock.On("GetByComment", ctx, name)} -} - -func (_c *MockTokensInterface_GetByComment_Call) Run(run func(ctx context.Context, name string)) *MockTokensInterface_GetByComment_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockTokensInterface_GetByComment_Call) Return(_a0 *settings.PublicTokenInfo, _a1 error) *MockTokensInterface_GetByComment_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokensInterface_GetByComment_Call) RunAndReturn(run func(context.Context, string) (*settings.PublicTokenInfo, error)) *MockTokensInterface_GetByComment_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockTokensInterface) List(ctx context.Context) listing.Iterator[settings.PublicTokenInfo] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[settings.PublicTokenInfo] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[settings.PublicTokenInfo]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[settings.PublicTokenInfo]) - } - } - - return r0 -} - -// MockTokensInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockTokensInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockTokensInterface_Expecter) List(ctx interface{}) *MockTokensInterface_List_Call { - return &MockTokensInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockTokensInterface_List_Call) Run(run func(ctx context.Context)) *MockTokensInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockTokensInterface_List_Call) Return(_a0 listing.Iterator[settings.PublicTokenInfo]) *MockTokensInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockTokensInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[settings.PublicTokenInfo]) *MockTokensInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockTokensInterface) ListAll(ctx context.Context) ([]settings.PublicTokenInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []settings.PublicTokenInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]settings.PublicTokenInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []settings.PublicTokenInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]settings.PublicTokenInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokensInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockTokensInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockTokensInterface_Expecter) ListAll(ctx interface{}) *MockTokensInterface_ListAll_Call { - return &MockTokensInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockTokensInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockTokensInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockTokensInterface_ListAll_Call) Return(_a0 []settings.PublicTokenInfo, _a1 error) *MockTokensInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokensInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]settings.PublicTokenInfo, error)) *MockTokensInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// PublicTokenInfoCommentToTokenIdMap provides a mock function with given fields: ctx -func (_m *MockTokensInterface) PublicTokenInfoCommentToTokenIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for PublicTokenInfoCommentToTokenIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PublicTokenInfoCommentToTokenIdMap' -type MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call struct { - *mock.Call -} - -// PublicTokenInfoCommentToTokenIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockTokensInterface_Expecter) PublicTokenInfoCommentToTokenIdMap(ctx interface{}) *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call { - return &MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call{Call: _e.mock.On("PublicTokenInfoCommentToTokenIdMap", ctx)} -} - -func (_c *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call) Run(run func(ctx context.Context)) *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockTokensInterface_PublicTokenInfoCommentToTokenIdMap_Call { - _c.Call.Return(run) - return _c -} - -// NewMockTokensInterface creates a new instance of MockTokensInterface. 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 NewMockTokensInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockTokensInterface { - mock := &MockTokensInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/settings/mock_workspace_conf_interface.go b/experimental/mocks/service/settings/mock_workspace_conf_interface.go deleted file mode 100644 index e7067d78f..000000000 --- a/experimental/mocks/service/settings/mock_workspace_conf_interface.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package settings - -import ( - context "context" - - settings "github.com/databricks/databricks-sdk-go/service/settings" - mock "github.com/stretchr/testify/mock" -) - -// MockWorkspaceConfInterface is an autogenerated mock type for the WorkspaceConfInterface type -type MockWorkspaceConfInterface struct { - mock.Mock -} - -type MockWorkspaceConfInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockWorkspaceConfInterface) EXPECT() *MockWorkspaceConfInterface_Expecter { - return &MockWorkspaceConfInterface_Expecter{mock: &_m.Mock} -} - -// GetStatus provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceConfInterface) GetStatus(ctx context.Context, request settings.GetStatusRequest) (*map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetStatus") - } - - var r0 *map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, settings.GetStatusRequest) (*map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, settings.GetStatusRequest) *map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, settings.GetStatusRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceConfInterface_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus' -type MockWorkspaceConfInterface_GetStatus_Call struct { - *mock.Call -} - -// GetStatus is a helper method to define mock.On call -// - ctx context.Context -// - request settings.GetStatusRequest -func (_e *MockWorkspaceConfInterface_Expecter) GetStatus(ctx interface{}, request interface{}) *MockWorkspaceConfInterface_GetStatus_Call { - return &MockWorkspaceConfInterface_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx, request)} -} - -func (_c *MockWorkspaceConfInterface_GetStatus_Call) Run(run func(ctx context.Context, request settings.GetStatusRequest)) *MockWorkspaceConfInterface_GetStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.GetStatusRequest)) - }) - return _c -} - -func (_c *MockWorkspaceConfInterface_GetStatus_Call) Return(_a0 *map[string]string, _a1 error) *MockWorkspaceConfInterface_GetStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceConfInterface_GetStatus_Call) RunAndReturn(run func(context.Context, settings.GetStatusRequest) (*map[string]string, error)) *MockWorkspaceConfInterface_GetStatus_Call { - _c.Call.Return(run) - return _c -} - -// SetStatus provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceConfInterface) SetStatus(ctx context.Context, request settings.WorkspaceConf) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetStatus") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, settings.WorkspaceConf) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceConfInterface_SetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetStatus' -type MockWorkspaceConfInterface_SetStatus_Call struct { - *mock.Call -} - -// SetStatus is a helper method to define mock.On call -// - ctx context.Context -// - request settings.WorkspaceConf -func (_e *MockWorkspaceConfInterface_Expecter) SetStatus(ctx interface{}, request interface{}) *MockWorkspaceConfInterface_SetStatus_Call { - return &MockWorkspaceConfInterface_SetStatus_Call{Call: _e.mock.On("SetStatus", ctx, request)} -} - -func (_c *MockWorkspaceConfInterface_SetStatus_Call) Run(run func(ctx context.Context, request settings.WorkspaceConf)) *MockWorkspaceConfInterface_SetStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(settings.WorkspaceConf)) - }) - return _c -} - -func (_c *MockWorkspaceConfInterface_SetStatus_Call) Return(_a0 error) *MockWorkspaceConfInterface_SetStatus_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceConfInterface_SetStatus_Call) RunAndReturn(run func(context.Context, settings.WorkspaceConf) error) *MockWorkspaceConfInterface_SetStatus_Call { - _c.Call.Return(run) - return _c -} - -// NewMockWorkspaceConfInterface creates a new instance of MockWorkspaceConfInterface. 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 NewMockWorkspaceConfInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWorkspaceConfInterface { - mock := &MockWorkspaceConfInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sharing/mock_providers_interface.go b/experimental/mocks/service/sharing/mock_providers_interface.go deleted file mode 100644 index b3c75dd3a..000000000 --- a/experimental/mocks/service/sharing/mock_providers_interface.go +++ /dev/null @@ -1,703 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sharing - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - sharing "github.com/databricks/databricks-sdk-go/service/sharing" -) - -// MockProvidersInterface is an autogenerated mock type for the ProvidersInterface type -type MockProvidersInterface struct { - mock.Mock -} - -type MockProvidersInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockProvidersInterface) EXPECT() *MockProvidersInterface_Expecter { - return &MockProvidersInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) Create(ctx context.Context, request sharing.CreateProvider) (*sharing.ProviderInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sharing.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.CreateProvider) (*sharing.ProviderInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.CreateProvider) *sharing.ProviderInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.CreateProvider) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockProvidersInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.CreateProvider -func (_e *MockProvidersInterface_Expecter) Create(ctx interface{}, request interface{}) *MockProvidersInterface_Create_Call { - return &MockProvidersInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockProvidersInterface_Create_Call) Run(run func(ctx context.Context, request sharing.CreateProvider)) *MockProvidersInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.CreateProvider)) - }) - return _c -} - -func (_c *MockProvidersInterface_Create_Call) Return(_a0 *sharing.ProviderInfo, _a1 error) *MockProvidersInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_Create_Call) RunAndReturn(run func(context.Context, sharing.CreateProvider) (*sharing.ProviderInfo, error)) *MockProvidersInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) Delete(ctx context.Context, request sharing.DeleteProviderRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.DeleteProviderRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProvidersInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockProvidersInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.DeleteProviderRequest -func (_e *MockProvidersInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockProvidersInterface_Delete_Call { - return &MockProvidersInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockProvidersInterface_Delete_Call) Run(run func(ctx context.Context, request sharing.DeleteProviderRequest)) *MockProvidersInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.DeleteProviderRequest)) - }) - return _c -} - -func (_c *MockProvidersInterface_Delete_Call) Return(_a0 error) *MockProvidersInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProvidersInterface_Delete_Call) RunAndReturn(run func(context.Context, sharing.DeleteProviderRequest) error) *MockProvidersInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockProvidersInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockProvidersInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockProvidersInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProvidersInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockProvidersInterface_DeleteByName_Call { - return &MockProvidersInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockProvidersInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockProvidersInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProvidersInterface_DeleteByName_Call) Return(_a0 error) *MockProvidersInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProvidersInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockProvidersInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) Get(ctx context.Context, request sharing.GetProviderRequest) (*sharing.ProviderInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sharing.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.GetProviderRequest) (*sharing.ProviderInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.GetProviderRequest) *sharing.ProviderInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.GetProviderRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockProvidersInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.GetProviderRequest -func (_e *MockProvidersInterface_Expecter) Get(ctx interface{}, request interface{}) *MockProvidersInterface_Get_Call { - return &MockProvidersInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockProvidersInterface_Get_Call) Run(run func(ctx context.Context, request sharing.GetProviderRequest)) *MockProvidersInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.GetProviderRequest)) - }) - return _c -} - -func (_c *MockProvidersInterface_Get_Call) Return(_a0 *sharing.ProviderInfo, _a1 error) *MockProvidersInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_Get_Call) RunAndReturn(run func(context.Context, sharing.GetProviderRequest) (*sharing.ProviderInfo, error)) *MockProvidersInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockProvidersInterface) GetByName(ctx context.Context, name string) (*sharing.ProviderInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sharing.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sharing.ProviderInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sharing.ProviderInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockProvidersInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProvidersInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockProvidersInterface_GetByName_Call { - return &MockProvidersInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockProvidersInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockProvidersInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProvidersInterface_GetByName_Call) Return(_a0 *sharing.ProviderInfo, _a1 error) *MockProvidersInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sharing.ProviderInfo, error)) *MockProvidersInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) List(ctx context.Context, request sharing.ListProvidersRequest) listing.Iterator[sharing.ProviderInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sharing.ProviderInfo] - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListProvidersRequest) listing.Iterator[sharing.ProviderInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sharing.ProviderInfo]) - } - } - - return r0 -} - -// MockProvidersInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockProvidersInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListProvidersRequest -func (_e *MockProvidersInterface_Expecter) List(ctx interface{}, request interface{}) *MockProvidersInterface_List_Call { - return &MockProvidersInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockProvidersInterface_List_Call) Run(run func(ctx context.Context, request sharing.ListProvidersRequest)) *MockProvidersInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockProvidersInterface_List_Call) Return(_a0 listing.Iterator[sharing.ProviderInfo]) *MockProvidersInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProvidersInterface_List_Call) RunAndReturn(run func(context.Context, sharing.ListProvidersRequest) listing.Iterator[sharing.ProviderInfo]) *MockProvidersInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) ListAll(ctx context.Context, request sharing.ListProvidersRequest) ([]sharing.ProviderInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sharing.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListProvidersRequest) ([]sharing.ProviderInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListProvidersRequest) []sharing.ProviderInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sharing.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.ListProvidersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockProvidersInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListProvidersRequest -func (_e *MockProvidersInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockProvidersInterface_ListAll_Call { - return &MockProvidersInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockProvidersInterface_ListAll_Call) Run(run func(ctx context.Context, request sharing.ListProvidersRequest)) *MockProvidersInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockProvidersInterface_ListAll_Call) Return(_a0 []sharing.ProviderInfo, _a1 error) *MockProvidersInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_ListAll_Call) RunAndReturn(run func(context.Context, sharing.ListProvidersRequest) ([]sharing.ProviderInfo, error)) *MockProvidersInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListShares provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) ListShares(ctx context.Context, request sharing.ListSharesRequest) listing.Iterator[sharing.ProviderShare] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListShares") - } - - var r0 listing.Iterator[sharing.ProviderShare] - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListSharesRequest) listing.Iterator[sharing.ProviderShare]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sharing.ProviderShare]) - } - } - - return r0 -} - -// MockProvidersInterface_ListShares_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListShares' -type MockProvidersInterface_ListShares_Call struct { - *mock.Call -} - -// ListShares is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListSharesRequest -func (_e *MockProvidersInterface_Expecter) ListShares(ctx interface{}, request interface{}) *MockProvidersInterface_ListShares_Call { - return &MockProvidersInterface_ListShares_Call{Call: _e.mock.On("ListShares", ctx, request)} -} - -func (_c *MockProvidersInterface_ListShares_Call) Run(run func(ctx context.Context, request sharing.ListSharesRequest)) *MockProvidersInterface_ListShares_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListSharesRequest)) - }) - return _c -} - -func (_c *MockProvidersInterface_ListShares_Call) Return(_a0 listing.Iterator[sharing.ProviderShare]) *MockProvidersInterface_ListShares_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockProvidersInterface_ListShares_Call) RunAndReturn(run func(context.Context, sharing.ListSharesRequest) listing.Iterator[sharing.ProviderShare]) *MockProvidersInterface_ListShares_Call { - _c.Call.Return(run) - return _c -} - -// ListSharesAll provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) ListSharesAll(ctx context.Context, request sharing.ListSharesRequest) ([]sharing.ProviderShare, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSharesAll") - } - - var r0 []sharing.ProviderShare - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListSharesRequest) ([]sharing.ProviderShare, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListSharesRequest) []sharing.ProviderShare); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sharing.ProviderShare) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.ListSharesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_ListSharesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSharesAll' -type MockProvidersInterface_ListSharesAll_Call struct { - *mock.Call -} - -// ListSharesAll is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListSharesRequest -func (_e *MockProvidersInterface_Expecter) ListSharesAll(ctx interface{}, request interface{}) *MockProvidersInterface_ListSharesAll_Call { - return &MockProvidersInterface_ListSharesAll_Call{Call: _e.mock.On("ListSharesAll", ctx, request)} -} - -func (_c *MockProvidersInterface_ListSharesAll_Call) Run(run func(ctx context.Context, request sharing.ListSharesRequest)) *MockProvidersInterface_ListSharesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListSharesRequest)) - }) - return _c -} - -func (_c *MockProvidersInterface_ListSharesAll_Call) Return(_a0 []sharing.ProviderShare, _a1 error) *MockProvidersInterface_ListSharesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_ListSharesAll_Call) RunAndReturn(run func(context.Context, sharing.ListSharesRequest) ([]sharing.ProviderShare, error)) *MockProvidersInterface_ListSharesAll_Call { - _c.Call.Return(run) - return _c -} - -// ListSharesByName provides a mock function with given fields: ctx, name -func (_m *MockProvidersInterface) ListSharesByName(ctx context.Context, name string) (*sharing.ListProviderSharesResponse, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for ListSharesByName") - } - - var r0 *sharing.ListProviderSharesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sharing.ListProviderSharesResponse, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sharing.ListProviderSharesResponse); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ListProviderSharesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_ListSharesByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSharesByName' -type MockProvidersInterface_ListSharesByName_Call struct { - *mock.Call -} - -// ListSharesByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockProvidersInterface_Expecter) ListSharesByName(ctx interface{}, name interface{}) *MockProvidersInterface_ListSharesByName_Call { - return &MockProvidersInterface_ListSharesByName_Call{Call: _e.mock.On("ListSharesByName", ctx, name)} -} - -func (_c *MockProvidersInterface_ListSharesByName_Call) Run(run func(ctx context.Context, name string)) *MockProvidersInterface_ListSharesByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockProvidersInterface_ListSharesByName_Call) Return(_a0 *sharing.ListProviderSharesResponse, _a1 error) *MockProvidersInterface_ListSharesByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_ListSharesByName_Call) RunAndReturn(run func(context.Context, string) (*sharing.ListProviderSharesResponse, error)) *MockProvidersInterface_ListSharesByName_Call { - _c.Call.Return(run) - return _c -} - -// ProviderInfoNameToMetastoreIdMap provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) ProviderInfoNameToMetastoreIdMap(ctx context.Context, request sharing.ListProvidersRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ProviderInfoNameToMetastoreIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListProvidersRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListProvidersRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.ListProvidersRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProviderInfoNameToMetastoreIdMap' -type MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call struct { - *mock.Call -} - -// ProviderInfoNameToMetastoreIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListProvidersRequest -func (_e *MockProvidersInterface_Expecter) ProviderInfoNameToMetastoreIdMap(ctx interface{}, request interface{}) *MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call { - return &MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call{Call: _e.mock.On("ProviderInfoNameToMetastoreIdMap", ctx, request)} -} - -func (_c *MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call) Run(run func(ctx context.Context, request sharing.ListProvidersRequest)) *MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListProvidersRequest)) - }) - return _c -} - -func (_c *MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call) RunAndReturn(run func(context.Context, sharing.ListProvidersRequest) (map[string]string, error)) *MockProvidersInterface_ProviderInfoNameToMetastoreIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockProvidersInterface) Update(ctx context.Context, request sharing.UpdateProvider) (*sharing.ProviderInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sharing.ProviderInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.UpdateProvider) (*sharing.ProviderInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.UpdateProvider) *sharing.ProviderInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ProviderInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.UpdateProvider) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockProvidersInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockProvidersInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.UpdateProvider -func (_e *MockProvidersInterface_Expecter) Update(ctx interface{}, request interface{}) *MockProvidersInterface_Update_Call { - return &MockProvidersInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockProvidersInterface_Update_Call) Run(run func(ctx context.Context, request sharing.UpdateProvider)) *MockProvidersInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.UpdateProvider)) - }) - return _c -} - -func (_c *MockProvidersInterface_Update_Call) Return(_a0 *sharing.ProviderInfo, _a1 error) *MockProvidersInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockProvidersInterface_Update_Call) RunAndReturn(run func(context.Context, sharing.UpdateProvider) (*sharing.ProviderInfo, error)) *MockProvidersInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockProvidersInterface creates a new instance of MockProvidersInterface. 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 NewMockProvidersInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockProvidersInterface { - mock := &MockProvidersInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sharing/mock_recipient_activation_interface.go b/experimental/mocks/service/sharing/mock_recipient_activation_interface.go deleted file mode 100644 index a940afe6a..000000000 --- a/experimental/mocks/service/sharing/mock_recipient_activation_interface.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sharing - -import ( - context "context" - - sharing "github.com/databricks/databricks-sdk-go/service/sharing" - mock "github.com/stretchr/testify/mock" -) - -// MockRecipientActivationInterface is an autogenerated mock type for the RecipientActivationInterface type -type MockRecipientActivationInterface struct { - mock.Mock -} - -type MockRecipientActivationInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockRecipientActivationInterface) EXPECT() *MockRecipientActivationInterface_Expecter { - return &MockRecipientActivationInterface_Expecter{mock: &_m.Mock} -} - -// GetActivationUrlInfo provides a mock function with given fields: ctx, request -func (_m *MockRecipientActivationInterface) GetActivationUrlInfo(ctx context.Context, request sharing.GetActivationUrlInfoRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetActivationUrlInfo") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.GetActivationUrlInfoRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRecipientActivationInterface_GetActivationUrlInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActivationUrlInfo' -type MockRecipientActivationInterface_GetActivationUrlInfo_Call struct { - *mock.Call -} - -// GetActivationUrlInfo is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.GetActivationUrlInfoRequest -func (_e *MockRecipientActivationInterface_Expecter) GetActivationUrlInfo(ctx interface{}, request interface{}) *MockRecipientActivationInterface_GetActivationUrlInfo_Call { - return &MockRecipientActivationInterface_GetActivationUrlInfo_Call{Call: _e.mock.On("GetActivationUrlInfo", ctx, request)} -} - -func (_c *MockRecipientActivationInterface_GetActivationUrlInfo_Call) Run(run func(ctx context.Context, request sharing.GetActivationUrlInfoRequest)) *MockRecipientActivationInterface_GetActivationUrlInfo_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.GetActivationUrlInfoRequest)) - }) - return _c -} - -func (_c *MockRecipientActivationInterface_GetActivationUrlInfo_Call) Return(_a0 error) *MockRecipientActivationInterface_GetActivationUrlInfo_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientActivationInterface_GetActivationUrlInfo_Call) RunAndReturn(run func(context.Context, sharing.GetActivationUrlInfoRequest) error) *MockRecipientActivationInterface_GetActivationUrlInfo_Call { - _c.Call.Return(run) - return _c -} - -// GetActivationUrlInfoByActivationUrl provides a mock function with given fields: ctx, activationUrl -func (_m *MockRecipientActivationInterface) GetActivationUrlInfoByActivationUrl(ctx context.Context, activationUrl string) error { - ret := _m.Called(ctx, activationUrl) - - if len(ret) == 0 { - panic("no return value specified for GetActivationUrlInfoByActivationUrl") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, activationUrl) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActivationUrlInfoByActivationUrl' -type MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call struct { - *mock.Call -} - -// GetActivationUrlInfoByActivationUrl is a helper method to define mock.On call -// - ctx context.Context -// - activationUrl string -func (_e *MockRecipientActivationInterface_Expecter) GetActivationUrlInfoByActivationUrl(ctx interface{}, activationUrl interface{}) *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call { - return &MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call{Call: _e.mock.On("GetActivationUrlInfoByActivationUrl", ctx, activationUrl)} -} - -func (_c *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call) Run(run func(ctx context.Context, activationUrl string)) *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call) Return(_a0 error) *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call) RunAndReturn(run func(context.Context, string) error) *MockRecipientActivationInterface_GetActivationUrlInfoByActivationUrl_Call { - _c.Call.Return(run) - return _c -} - -// RetrieveToken provides a mock function with given fields: ctx, request -func (_m *MockRecipientActivationInterface) RetrieveToken(ctx context.Context, request sharing.RetrieveTokenRequest) (*sharing.RetrieveTokenResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RetrieveToken") - } - - var r0 *sharing.RetrieveTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.RetrieveTokenRequest) (*sharing.RetrieveTokenResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.RetrieveTokenRequest) *sharing.RetrieveTokenResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.RetrieveTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.RetrieveTokenRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientActivationInterface_RetrieveToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveToken' -type MockRecipientActivationInterface_RetrieveToken_Call struct { - *mock.Call -} - -// RetrieveToken is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.RetrieveTokenRequest -func (_e *MockRecipientActivationInterface_Expecter) RetrieveToken(ctx interface{}, request interface{}) *MockRecipientActivationInterface_RetrieveToken_Call { - return &MockRecipientActivationInterface_RetrieveToken_Call{Call: _e.mock.On("RetrieveToken", ctx, request)} -} - -func (_c *MockRecipientActivationInterface_RetrieveToken_Call) Run(run func(ctx context.Context, request sharing.RetrieveTokenRequest)) *MockRecipientActivationInterface_RetrieveToken_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.RetrieveTokenRequest)) - }) - return _c -} - -func (_c *MockRecipientActivationInterface_RetrieveToken_Call) Return(_a0 *sharing.RetrieveTokenResponse, _a1 error) *MockRecipientActivationInterface_RetrieveToken_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientActivationInterface_RetrieveToken_Call) RunAndReturn(run func(context.Context, sharing.RetrieveTokenRequest) (*sharing.RetrieveTokenResponse, error)) *MockRecipientActivationInterface_RetrieveToken_Call { - _c.Call.Return(run) - return _c -} - -// RetrieveTokenByActivationUrl provides a mock function with given fields: ctx, activationUrl -func (_m *MockRecipientActivationInterface) RetrieveTokenByActivationUrl(ctx context.Context, activationUrl string) (*sharing.RetrieveTokenResponse, error) { - ret := _m.Called(ctx, activationUrl) - - if len(ret) == 0 { - panic("no return value specified for RetrieveTokenByActivationUrl") - } - - var r0 *sharing.RetrieveTokenResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sharing.RetrieveTokenResponse, error)); ok { - return rf(ctx, activationUrl) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sharing.RetrieveTokenResponse); ok { - r0 = rf(ctx, activationUrl) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.RetrieveTokenResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, activationUrl) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RetrieveTokenByActivationUrl' -type MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call struct { - *mock.Call -} - -// RetrieveTokenByActivationUrl is a helper method to define mock.On call -// - ctx context.Context -// - activationUrl string -func (_e *MockRecipientActivationInterface_Expecter) RetrieveTokenByActivationUrl(ctx interface{}, activationUrl interface{}) *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call { - return &MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call{Call: _e.mock.On("RetrieveTokenByActivationUrl", ctx, activationUrl)} -} - -func (_c *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call) Run(run func(ctx context.Context, activationUrl string)) *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call) Return(_a0 *sharing.RetrieveTokenResponse, _a1 error) *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call) RunAndReturn(run func(context.Context, string) (*sharing.RetrieveTokenResponse, error)) *MockRecipientActivationInterface_RetrieveTokenByActivationUrl_Call { - _c.Call.Return(run) - return _c -} - -// NewMockRecipientActivationInterface creates a new instance of MockRecipientActivationInterface. 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 NewMockRecipientActivationInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockRecipientActivationInterface { - mock := &MockRecipientActivationInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sharing/mock_recipients_interface.go b/experimental/mocks/service/sharing/mock_recipients_interface.go deleted file mode 100644 index 7f724bb2d..000000000 --- a/experimental/mocks/service/sharing/mock_recipients_interface.go +++ /dev/null @@ -1,701 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sharing - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - sharing "github.com/databricks/databricks-sdk-go/service/sharing" -) - -// MockRecipientsInterface is an autogenerated mock type for the RecipientsInterface type -type MockRecipientsInterface struct { - mock.Mock -} - -type MockRecipientsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockRecipientsInterface) EXPECT() *MockRecipientsInterface_Expecter { - return &MockRecipientsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) Create(ctx context.Context, request sharing.CreateRecipient) (*sharing.RecipientInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sharing.RecipientInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.CreateRecipient) (*sharing.RecipientInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.CreateRecipient) *sharing.RecipientInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.RecipientInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.CreateRecipient) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockRecipientsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.CreateRecipient -func (_e *MockRecipientsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockRecipientsInterface_Create_Call { - return &MockRecipientsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockRecipientsInterface_Create_Call) Run(run func(ctx context.Context, request sharing.CreateRecipient)) *MockRecipientsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.CreateRecipient)) - }) - return _c -} - -func (_c *MockRecipientsInterface_Create_Call) Return(_a0 *sharing.RecipientInfo, _a1 error) *MockRecipientsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_Create_Call) RunAndReturn(run func(context.Context, sharing.CreateRecipient) (*sharing.RecipientInfo, error)) *MockRecipientsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) Delete(ctx context.Context, request sharing.DeleteRecipientRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.DeleteRecipientRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRecipientsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockRecipientsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.DeleteRecipientRequest -func (_e *MockRecipientsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockRecipientsInterface_Delete_Call { - return &MockRecipientsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockRecipientsInterface_Delete_Call) Run(run func(ctx context.Context, request sharing.DeleteRecipientRequest)) *MockRecipientsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.DeleteRecipientRequest)) - }) - return _c -} - -func (_c *MockRecipientsInterface_Delete_Call) Return(_a0 error) *MockRecipientsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientsInterface_Delete_Call) RunAndReturn(run func(context.Context, sharing.DeleteRecipientRequest) error) *MockRecipientsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockRecipientsInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRecipientsInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockRecipientsInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockRecipientsInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockRecipientsInterface_DeleteByName_Call { - return &MockRecipientsInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockRecipientsInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockRecipientsInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRecipientsInterface_DeleteByName_Call) Return(_a0 error) *MockRecipientsInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientsInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockRecipientsInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) Get(ctx context.Context, request sharing.GetRecipientRequest) (*sharing.RecipientInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sharing.RecipientInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.GetRecipientRequest) (*sharing.RecipientInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.GetRecipientRequest) *sharing.RecipientInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.RecipientInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.GetRecipientRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockRecipientsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.GetRecipientRequest -func (_e *MockRecipientsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockRecipientsInterface_Get_Call { - return &MockRecipientsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockRecipientsInterface_Get_Call) Run(run func(ctx context.Context, request sharing.GetRecipientRequest)) *MockRecipientsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.GetRecipientRequest)) - }) - return _c -} - -func (_c *MockRecipientsInterface_Get_Call) Return(_a0 *sharing.RecipientInfo, _a1 error) *MockRecipientsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_Get_Call) RunAndReturn(run func(context.Context, sharing.GetRecipientRequest) (*sharing.RecipientInfo, error)) *MockRecipientsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockRecipientsInterface) GetByName(ctx context.Context, name string) (*sharing.RecipientInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sharing.RecipientInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sharing.RecipientInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sharing.RecipientInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.RecipientInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockRecipientsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockRecipientsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockRecipientsInterface_GetByName_Call { - return &MockRecipientsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockRecipientsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockRecipientsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRecipientsInterface_GetByName_Call) Return(_a0 *sharing.RecipientInfo, _a1 error) *MockRecipientsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sharing.RecipientInfo, error)) *MockRecipientsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) List(ctx context.Context, request sharing.ListRecipientsRequest) listing.Iterator[sharing.RecipientInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sharing.RecipientInfo] - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListRecipientsRequest) listing.Iterator[sharing.RecipientInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sharing.RecipientInfo]) - } - } - - return r0 -} - -// MockRecipientsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockRecipientsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListRecipientsRequest -func (_e *MockRecipientsInterface_Expecter) List(ctx interface{}, request interface{}) *MockRecipientsInterface_List_Call { - return &MockRecipientsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockRecipientsInterface_List_Call) Run(run func(ctx context.Context, request sharing.ListRecipientsRequest)) *MockRecipientsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListRecipientsRequest)) - }) - return _c -} - -func (_c *MockRecipientsInterface_List_Call) Return(_a0 listing.Iterator[sharing.RecipientInfo]) *MockRecipientsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientsInterface_List_Call) RunAndReturn(run func(context.Context, sharing.ListRecipientsRequest) listing.Iterator[sharing.RecipientInfo]) *MockRecipientsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) ListAll(ctx context.Context, request sharing.ListRecipientsRequest) ([]sharing.RecipientInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sharing.RecipientInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListRecipientsRequest) ([]sharing.RecipientInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListRecipientsRequest) []sharing.RecipientInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sharing.RecipientInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.ListRecipientsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockRecipientsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListRecipientsRequest -func (_e *MockRecipientsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockRecipientsInterface_ListAll_Call { - return &MockRecipientsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockRecipientsInterface_ListAll_Call) Run(run func(ctx context.Context, request sharing.ListRecipientsRequest)) *MockRecipientsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListRecipientsRequest)) - }) - return _c -} - -func (_c *MockRecipientsInterface_ListAll_Call) Return(_a0 []sharing.RecipientInfo, _a1 error) *MockRecipientsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_ListAll_Call) RunAndReturn(run func(context.Context, sharing.ListRecipientsRequest) ([]sharing.RecipientInfo, error)) *MockRecipientsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// RecipientInfoNameToMetastoreIdMap provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) RecipientInfoNameToMetastoreIdMap(ctx context.Context, request sharing.ListRecipientsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RecipientInfoNameToMetastoreIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListRecipientsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListRecipientsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.ListRecipientsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecipientInfoNameToMetastoreIdMap' -type MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call struct { - *mock.Call -} - -// RecipientInfoNameToMetastoreIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListRecipientsRequest -func (_e *MockRecipientsInterface_Expecter) RecipientInfoNameToMetastoreIdMap(ctx interface{}, request interface{}) *MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call { - return &MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call{Call: _e.mock.On("RecipientInfoNameToMetastoreIdMap", ctx, request)} -} - -func (_c *MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call) Run(run func(ctx context.Context, request sharing.ListRecipientsRequest)) *MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListRecipientsRequest)) - }) - return _c -} - -func (_c *MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call) RunAndReturn(run func(context.Context, sharing.ListRecipientsRequest) (map[string]string, error)) *MockRecipientsInterface_RecipientInfoNameToMetastoreIdMap_Call { - _c.Call.Return(run) - return _c -} - -// RotateToken provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) RotateToken(ctx context.Context, request sharing.RotateRecipientToken) (*sharing.RecipientInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RotateToken") - } - - var r0 *sharing.RecipientInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.RotateRecipientToken) (*sharing.RecipientInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.RotateRecipientToken) *sharing.RecipientInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.RecipientInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.RotateRecipientToken) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_RotateToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RotateToken' -type MockRecipientsInterface_RotateToken_Call struct { - *mock.Call -} - -// RotateToken is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.RotateRecipientToken -func (_e *MockRecipientsInterface_Expecter) RotateToken(ctx interface{}, request interface{}) *MockRecipientsInterface_RotateToken_Call { - return &MockRecipientsInterface_RotateToken_Call{Call: _e.mock.On("RotateToken", ctx, request)} -} - -func (_c *MockRecipientsInterface_RotateToken_Call) Run(run func(ctx context.Context, request sharing.RotateRecipientToken)) *MockRecipientsInterface_RotateToken_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.RotateRecipientToken)) - }) - return _c -} - -func (_c *MockRecipientsInterface_RotateToken_Call) Return(_a0 *sharing.RecipientInfo, _a1 error) *MockRecipientsInterface_RotateToken_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_RotateToken_Call) RunAndReturn(run func(context.Context, sharing.RotateRecipientToken) (*sharing.RecipientInfo, error)) *MockRecipientsInterface_RotateToken_Call { - _c.Call.Return(run) - return _c -} - -// SharePermissions provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) SharePermissions(ctx context.Context, request sharing.SharePermissionsRequest) (*sharing.GetRecipientSharePermissionsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SharePermissions") - } - - var r0 *sharing.GetRecipientSharePermissionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.SharePermissionsRequest) (*sharing.GetRecipientSharePermissionsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.SharePermissionsRequest) *sharing.GetRecipientSharePermissionsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.GetRecipientSharePermissionsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.SharePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_SharePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SharePermissions' -type MockRecipientsInterface_SharePermissions_Call struct { - *mock.Call -} - -// SharePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.SharePermissionsRequest -func (_e *MockRecipientsInterface_Expecter) SharePermissions(ctx interface{}, request interface{}) *MockRecipientsInterface_SharePermissions_Call { - return &MockRecipientsInterface_SharePermissions_Call{Call: _e.mock.On("SharePermissions", ctx, request)} -} - -func (_c *MockRecipientsInterface_SharePermissions_Call) Run(run func(ctx context.Context, request sharing.SharePermissionsRequest)) *MockRecipientsInterface_SharePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.SharePermissionsRequest)) - }) - return _c -} - -func (_c *MockRecipientsInterface_SharePermissions_Call) Return(_a0 *sharing.GetRecipientSharePermissionsResponse, _a1 error) *MockRecipientsInterface_SharePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_SharePermissions_Call) RunAndReturn(run func(context.Context, sharing.SharePermissionsRequest) (*sharing.GetRecipientSharePermissionsResponse, error)) *MockRecipientsInterface_SharePermissions_Call { - _c.Call.Return(run) - return _c -} - -// SharePermissionsByName provides a mock function with given fields: ctx, name -func (_m *MockRecipientsInterface) SharePermissionsByName(ctx context.Context, name string) (*sharing.GetRecipientSharePermissionsResponse, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for SharePermissionsByName") - } - - var r0 *sharing.GetRecipientSharePermissionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sharing.GetRecipientSharePermissionsResponse, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sharing.GetRecipientSharePermissionsResponse); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.GetRecipientSharePermissionsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockRecipientsInterface_SharePermissionsByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SharePermissionsByName' -type MockRecipientsInterface_SharePermissionsByName_Call struct { - *mock.Call -} - -// SharePermissionsByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockRecipientsInterface_Expecter) SharePermissionsByName(ctx interface{}, name interface{}) *MockRecipientsInterface_SharePermissionsByName_Call { - return &MockRecipientsInterface_SharePermissionsByName_Call{Call: _e.mock.On("SharePermissionsByName", ctx, name)} -} - -func (_c *MockRecipientsInterface_SharePermissionsByName_Call) Run(run func(ctx context.Context, name string)) *MockRecipientsInterface_SharePermissionsByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockRecipientsInterface_SharePermissionsByName_Call) Return(_a0 *sharing.GetRecipientSharePermissionsResponse, _a1 error) *MockRecipientsInterface_SharePermissionsByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockRecipientsInterface_SharePermissionsByName_Call) RunAndReturn(run func(context.Context, string) (*sharing.GetRecipientSharePermissionsResponse, error)) *MockRecipientsInterface_SharePermissionsByName_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockRecipientsInterface) Update(ctx context.Context, request sharing.UpdateRecipient) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.UpdateRecipient) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockRecipientsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockRecipientsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.UpdateRecipient -func (_e *MockRecipientsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockRecipientsInterface_Update_Call { - return &MockRecipientsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockRecipientsInterface_Update_Call) Run(run func(ctx context.Context, request sharing.UpdateRecipient)) *MockRecipientsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.UpdateRecipient)) - }) - return _c -} - -func (_c *MockRecipientsInterface_Update_Call) Return(_a0 error) *MockRecipientsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockRecipientsInterface_Update_Call) RunAndReturn(run func(context.Context, sharing.UpdateRecipient) error) *MockRecipientsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockRecipientsInterface creates a new instance of MockRecipientsInterface. 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 NewMockRecipientsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockRecipientsInterface { - mock := &MockRecipientsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sharing/mock_shares_interface.go b/experimental/mocks/service/sharing/mock_shares_interface.go deleted file mode 100644 index 006b7a8ea..000000000 --- a/experimental/mocks/service/sharing/mock_shares_interface.go +++ /dev/null @@ -1,645 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sharing - -import ( - context "context" - - catalog "github.com/databricks/databricks-sdk-go/service/catalog" - - listing "github.com/databricks/databricks-sdk-go/listing" - - mock "github.com/stretchr/testify/mock" - - sharing "github.com/databricks/databricks-sdk-go/service/sharing" -) - -// MockSharesInterface is an autogenerated mock type for the SharesInterface type -type MockSharesInterface struct { - mock.Mock -} - -type MockSharesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSharesInterface) EXPECT() *MockSharesInterface_Expecter { - return &MockSharesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) Create(ctx context.Context, request sharing.CreateShare) (*sharing.ShareInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sharing.ShareInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.CreateShare) (*sharing.ShareInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.CreateShare) *sharing.ShareInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ShareInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.CreateShare) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSharesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockSharesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.CreateShare -func (_e *MockSharesInterface_Expecter) Create(ctx interface{}, request interface{}) *MockSharesInterface_Create_Call { - return &MockSharesInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockSharesInterface_Create_Call) Run(run func(ctx context.Context, request sharing.CreateShare)) *MockSharesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.CreateShare)) - }) - return _c -} - -func (_c *MockSharesInterface_Create_Call) Return(_a0 *sharing.ShareInfo, _a1 error) *MockSharesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSharesInterface_Create_Call) RunAndReturn(run func(context.Context, sharing.CreateShare) (*sharing.ShareInfo, error)) *MockSharesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) Delete(ctx context.Context, request sharing.DeleteShareRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.DeleteShareRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSharesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockSharesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.DeleteShareRequest -func (_e *MockSharesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockSharesInterface_Delete_Call { - return &MockSharesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockSharesInterface_Delete_Call) Run(run func(ctx context.Context, request sharing.DeleteShareRequest)) *MockSharesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.DeleteShareRequest)) - }) - return _c -} - -func (_c *MockSharesInterface_Delete_Call) Return(_a0 error) *MockSharesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSharesInterface_Delete_Call) RunAndReturn(run func(context.Context, sharing.DeleteShareRequest) error) *MockSharesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByName provides a mock function with given fields: ctx, name -func (_m *MockSharesInterface) DeleteByName(ctx context.Context, name string) error { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for DeleteByName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, name) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSharesInterface_DeleteByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByName' -type MockSharesInterface_DeleteByName_Call struct { - *mock.Call -} - -// DeleteByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockSharesInterface_Expecter) DeleteByName(ctx interface{}, name interface{}) *MockSharesInterface_DeleteByName_Call { - return &MockSharesInterface_DeleteByName_Call{Call: _e.mock.On("DeleteByName", ctx, name)} -} - -func (_c *MockSharesInterface_DeleteByName_Call) Run(run func(ctx context.Context, name string)) *MockSharesInterface_DeleteByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSharesInterface_DeleteByName_Call) Return(_a0 error) *MockSharesInterface_DeleteByName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSharesInterface_DeleteByName_Call) RunAndReturn(run func(context.Context, string) error) *MockSharesInterface_DeleteByName_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) Get(ctx context.Context, request sharing.GetShareRequest) (*sharing.ShareInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sharing.ShareInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.GetShareRequest) (*sharing.ShareInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.GetShareRequest) *sharing.ShareInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ShareInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.GetShareRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSharesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockSharesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.GetShareRequest -func (_e *MockSharesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockSharesInterface_Get_Call { - return &MockSharesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockSharesInterface_Get_Call) Run(run func(ctx context.Context, request sharing.GetShareRequest)) *MockSharesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.GetShareRequest)) - }) - return _c -} - -func (_c *MockSharesInterface_Get_Call) Return(_a0 *sharing.ShareInfo, _a1 error) *MockSharesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSharesInterface_Get_Call) RunAndReturn(run func(context.Context, sharing.GetShareRequest) (*sharing.ShareInfo, error)) *MockSharesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockSharesInterface) GetByName(ctx context.Context, name string) (*sharing.ShareInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sharing.ShareInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sharing.ShareInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sharing.ShareInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ShareInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSharesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockSharesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockSharesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockSharesInterface_GetByName_Call { - return &MockSharesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockSharesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockSharesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSharesInterface_GetByName_Call) Return(_a0 *sharing.ShareInfo, _a1 error) *MockSharesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSharesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sharing.ShareInfo, error)) *MockSharesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) List(ctx context.Context, request sharing.ListSharesRequest) listing.Iterator[sharing.ShareInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sharing.ShareInfo] - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListSharesRequest) listing.Iterator[sharing.ShareInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sharing.ShareInfo]) - } - } - - return r0 -} - -// MockSharesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockSharesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListSharesRequest -func (_e *MockSharesInterface_Expecter) List(ctx interface{}, request interface{}) *MockSharesInterface_List_Call { - return &MockSharesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockSharesInterface_List_Call) Run(run func(ctx context.Context, request sharing.ListSharesRequest)) *MockSharesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListSharesRequest)) - }) - return _c -} - -func (_c *MockSharesInterface_List_Call) Return(_a0 listing.Iterator[sharing.ShareInfo]) *MockSharesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSharesInterface_List_Call) RunAndReturn(run func(context.Context, sharing.ListSharesRequest) listing.Iterator[sharing.ShareInfo]) *MockSharesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) ListAll(ctx context.Context, request sharing.ListSharesRequest) ([]sharing.ShareInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sharing.ShareInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListSharesRequest) ([]sharing.ShareInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.ListSharesRequest) []sharing.ShareInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sharing.ShareInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.ListSharesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSharesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockSharesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.ListSharesRequest -func (_e *MockSharesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockSharesInterface_ListAll_Call { - return &MockSharesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockSharesInterface_ListAll_Call) Run(run func(ctx context.Context, request sharing.ListSharesRequest)) *MockSharesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.ListSharesRequest)) - }) - return _c -} - -func (_c *MockSharesInterface_ListAll_Call) Return(_a0 []sharing.ShareInfo, _a1 error) *MockSharesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSharesInterface_ListAll_Call) RunAndReturn(run func(context.Context, sharing.ListSharesRequest) ([]sharing.ShareInfo, error)) *MockSharesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// SharePermissions provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) SharePermissions(ctx context.Context, request sharing.SharePermissionsRequest) (*catalog.PermissionsList, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SharePermissions") - } - - var r0 *catalog.PermissionsList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.SharePermissionsRequest) (*catalog.PermissionsList, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.SharePermissionsRequest) *catalog.PermissionsList); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.PermissionsList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.SharePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSharesInterface_SharePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SharePermissions' -type MockSharesInterface_SharePermissions_Call struct { - *mock.Call -} - -// SharePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.SharePermissionsRequest -func (_e *MockSharesInterface_Expecter) SharePermissions(ctx interface{}, request interface{}) *MockSharesInterface_SharePermissions_Call { - return &MockSharesInterface_SharePermissions_Call{Call: _e.mock.On("SharePermissions", ctx, request)} -} - -func (_c *MockSharesInterface_SharePermissions_Call) Run(run func(ctx context.Context, request sharing.SharePermissionsRequest)) *MockSharesInterface_SharePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.SharePermissionsRequest)) - }) - return _c -} - -func (_c *MockSharesInterface_SharePermissions_Call) Return(_a0 *catalog.PermissionsList, _a1 error) *MockSharesInterface_SharePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSharesInterface_SharePermissions_Call) RunAndReturn(run func(context.Context, sharing.SharePermissionsRequest) (*catalog.PermissionsList, error)) *MockSharesInterface_SharePermissions_Call { - _c.Call.Return(run) - return _c -} - -// SharePermissionsByName provides a mock function with given fields: ctx, name -func (_m *MockSharesInterface) SharePermissionsByName(ctx context.Context, name string) (*catalog.PermissionsList, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for SharePermissionsByName") - } - - var r0 *catalog.PermissionsList - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*catalog.PermissionsList, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *catalog.PermissionsList); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*catalog.PermissionsList) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSharesInterface_SharePermissionsByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SharePermissionsByName' -type MockSharesInterface_SharePermissionsByName_Call struct { - *mock.Call -} - -// SharePermissionsByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockSharesInterface_Expecter) SharePermissionsByName(ctx interface{}, name interface{}) *MockSharesInterface_SharePermissionsByName_Call { - return &MockSharesInterface_SharePermissionsByName_Call{Call: _e.mock.On("SharePermissionsByName", ctx, name)} -} - -func (_c *MockSharesInterface_SharePermissionsByName_Call) Run(run func(ctx context.Context, name string)) *MockSharesInterface_SharePermissionsByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSharesInterface_SharePermissionsByName_Call) Return(_a0 *catalog.PermissionsList, _a1 error) *MockSharesInterface_SharePermissionsByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSharesInterface_SharePermissionsByName_Call) RunAndReturn(run func(context.Context, string) (*catalog.PermissionsList, error)) *MockSharesInterface_SharePermissionsByName_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) Update(ctx context.Context, request sharing.UpdateShare) (*sharing.ShareInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sharing.ShareInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.UpdateShare) (*sharing.ShareInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sharing.UpdateShare) *sharing.ShareInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sharing.ShareInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sharing.UpdateShare) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSharesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockSharesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.UpdateShare -func (_e *MockSharesInterface_Expecter) Update(ctx interface{}, request interface{}) *MockSharesInterface_Update_Call { - return &MockSharesInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockSharesInterface_Update_Call) Run(run func(ctx context.Context, request sharing.UpdateShare)) *MockSharesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.UpdateShare)) - }) - return _c -} - -func (_c *MockSharesInterface_Update_Call) Return(_a0 *sharing.ShareInfo, _a1 error) *MockSharesInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSharesInterface_Update_Call) RunAndReturn(run func(context.Context, sharing.UpdateShare) (*sharing.ShareInfo, error)) *MockSharesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockSharesInterface) UpdatePermissions(ctx context.Context, request sharing.UpdateSharePermissions) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sharing.UpdateSharePermissions) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSharesInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockSharesInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request sharing.UpdateSharePermissions -func (_e *MockSharesInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockSharesInterface_UpdatePermissions_Call { - return &MockSharesInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockSharesInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request sharing.UpdateSharePermissions)) *MockSharesInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sharing.UpdateSharePermissions)) - }) - return _c -} - -func (_c *MockSharesInterface_UpdatePermissions_Call) Return(_a0 error) *MockSharesInterface_UpdatePermissions_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSharesInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, sharing.UpdateSharePermissions) error) *MockSharesInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSharesInterface creates a new instance of MockSharesInterface. 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 NewMockSharesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSharesInterface { - mock := &MockSharesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_alerts_interface.go b/experimental/mocks/service/sql/mock_alerts_interface.go deleted file mode 100644 index 20408c2fd..000000000 --- a/experimental/mocks/service/sql/mock_alerts_interface.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - sql "github.com/databricks/databricks-sdk-go/service/sql" -) - -// MockAlertsInterface is an autogenerated mock type for the AlertsInterface type -type MockAlertsInterface struct { - mock.Mock -} - -type MockAlertsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAlertsInterface) EXPECT() *MockAlertsInterface_Expecter { - return &MockAlertsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAlertsInterface) Create(ctx context.Context, request sql.CreateAlertRequest) (*sql.Alert, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.Alert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateAlertRequest) (*sql.Alert, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateAlertRequest) *sql.Alert); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Alert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateAlertRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAlertsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CreateAlertRequest -func (_e *MockAlertsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAlertsInterface_Create_Call { - return &MockAlertsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAlertsInterface_Create_Call) Run(run func(ctx context.Context, request sql.CreateAlertRequest)) *MockAlertsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateAlertRequest)) - }) - return _c -} - -func (_c *MockAlertsInterface_Create_Call) Return(_a0 *sql.Alert, _a1 error) *MockAlertsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateAlertRequest) (*sql.Alert, error)) *MockAlertsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAlertsInterface) Delete(ctx context.Context, request sql.TrashAlertRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.TrashAlertRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAlertsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAlertsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.TrashAlertRequest -func (_e *MockAlertsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAlertsInterface_Delete_Call { - return &MockAlertsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAlertsInterface_Delete_Call) Run(run func(ctx context.Context, request sql.TrashAlertRequest)) *MockAlertsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.TrashAlertRequest)) - }) - return _c -} - -func (_c *MockAlertsInterface_Delete_Call) Return(_a0 error) *MockAlertsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.TrashAlertRequest) error) *MockAlertsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockAlertsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAlertsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockAlertsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAlertsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockAlertsInterface_DeleteById_Call { - return &MockAlertsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockAlertsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockAlertsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAlertsInterface_DeleteById_Call) Return(_a0 error) *MockAlertsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockAlertsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAlertsInterface) Get(ctx context.Context, request sql.GetAlertRequest) (*sql.Alert, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sql.Alert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetAlertRequest) (*sql.Alert, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetAlertRequest) *sql.Alert); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Alert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetAlertRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAlertsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetAlertRequest -func (_e *MockAlertsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAlertsInterface_Get_Call { - return &MockAlertsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAlertsInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetAlertRequest)) *MockAlertsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetAlertRequest)) - }) - return _c -} - -func (_c *MockAlertsInterface_Get_Call) Return(_a0 *sql.Alert, _a1 error) *MockAlertsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetAlertRequest) (*sql.Alert, error)) *MockAlertsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDisplayName provides a mock function with given fields: ctx, name -func (_m *MockAlertsInterface) GetByDisplayName(ctx context.Context, name string) (*sql.ListAlertsResponseAlert, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByDisplayName") - } - - var r0 *sql.ListAlertsResponseAlert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.ListAlertsResponseAlert, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.ListAlertsResponseAlert); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.ListAlertsResponseAlert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsInterface_GetByDisplayName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDisplayName' -type MockAlertsInterface_GetByDisplayName_Call struct { - *mock.Call -} - -// GetByDisplayName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAlertsInterface_Expecter) GetByDisplayName(ctx interface{}, name interface{}) *MockAlertsInterface_GetByDisplayName_Call { - return &MockAlertsInterface_GetByDisplayName_Call{Call: _e.mock.On("GetByDisplayName", ctx, name)} -} - -func (_c *MockAlertsInterface_GetByDisplayName_Call) Run(run func(ctx context.Context, name string)) *MockAlertsInterface_GetByDisplayName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAlertsInterface_GetByDisplayName_Call) Return(_a0 *sql.ListAlertsResponseAlert, _a1 error) *MockAlertsInterface_GetByDisplayName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsInterface_GetByDisplayName_Call) RunAndReturn(run func(context.Context, string) (*sql.ListAlertsResponseAlert, error)) *MockAlertsInterface_GetByDisplayName_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockAlertsInterface) GetById(ctx context.Context, id string) (*sql.Alert, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *sql.Alert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.Alert, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.Alert); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Alert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockAlertsInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockAlertsInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockAlertsInterface_GetById_Call { - return &MockAlertsInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockAlertsInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockAlertsInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAlertsInterface_GetById_Call) Return(_a0 *sql.Alert, _a1 error) *MockAlertsInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*sql.Alert, error)) *MockAlertsInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockAlertsInterface) List(ctx context.Context, request sql.ListAlertsRequest) listing.Iterator[sql.ListAlertsResponseAlert] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sql.ListAlertsResponseAlert] - if rf, ok := ret.Get(0).(func(context.Context, sql.ListAlertsRequest) listing.Iterator[sql.ListAlertsResponseAlert]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sql.ListAlertsResponseAlert]) - } - } - - return r0 -} - -// MockAlertsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAlertsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListAlertsRequest -func (_e *MockAlertsInterface_Expecter) List(ctx interface{}, request interface{}) *MockAlertsInterface_List_Call { - return &MockAlertsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockAlertsInterface_List_Call) Run(run func(ctx context.Context, request sql.ListAlertsRequest)) *MockAlertsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListAlertsRequest)) - }) - return _c -} - -func (_c *MockAlertsInterface_List_Call) Return(_a0 listing.Iterator[sql.ListAlertsResponseAlert]) *MockAlertsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsInterface_List_Call) RunAndReturn(run func(context.Context, sql.ListAlertsRequest) listing.Iterator[sql.ListAlertsResponseAlert]) *MockAlertsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAlertsResponseAlertDisplayNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockAlertsInterface) ListAlertsResponseAlertDisplayNameToIdMap(ctx context.Context, request sql.ListAlertsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAlertsResponseAlertDisplayNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListAlertsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListAlertsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListAlertsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAlertsResponseAlertDisplayNameToIdMap' -type MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call struct { - *mock.Call -} - -// ListAlertsResponseAlertDisplayNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListAlertsRequest -func (_e *MockAlertsInterface_Expecter) ListAlertsResponseAlertDisplayNameToIdMap(ctx interface{}, request interface{}) *MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call { - return &MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call{Call: _e.mock.On("ListAlertsResponseAlertDisplayNameToIdMap", ctx, request)} -} - -func (_c *MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call) Run(run func(ctx context.Context, request sql.ListAlertsRequest)) *MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListAlertsRequest)) - }) - return _c -} - -func (_c *MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call) RunAndReturn(run func(context.Context, sql.ListAlertsRequest) (map[string]string, error)) *MockAlertsInterface_ListAlertsResponseAlertDisplayNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockAlertsInterface) ListAll(ctx context.Context, request sql.ListAlertsRequest) ([]sql.ListAlertsResponseAlert, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sql.ListAlertsResponseAlert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListAlertsRequest) ([]sql.ListAlertsResponseAlert, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListAlertsRequest) []sql.ListAlertsResponseAlert); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.ListAlertsResponseAlert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListAlertsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockAlertsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListAlertsRequest -func (_e *MockAlertsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockAlertsInterface_ListAll_Call { - return &MockAlertsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockAlertsInterface_ListAll_Call) Run(run func(ctx context.Context, request sql.ListAlertsRequest)) *MockAlertsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListAlertsRequest)) - }) - return _c -} - -func (_c *MockAlertsInterface_ListAll_Call) Return(_a0 []sql.ListAlertsResponseAlert, _a1 error) *MockAlertsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsInterface_ListAll_Call) RunAndReturn(run func(context.Context, sql.ListAlertsRequest) ([]sql.ListAlertsResponseAlert, error)) *MockAlertsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAlertsInterface) Update(ctx context.Context, request sql.UpdateAlertRequest) (*sql.Alert, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sql.Alert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.UpdateAlertRequest) (*sql.Alert, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.UpdateAlertRequest) *sql.Alert); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Alert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.UpdateAlertRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAlertsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.UpdateAlertRequest -func (_e *MockAlertsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAlertsInterface_Update_Call { - return &MockAlertsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAlertsInterface_Update_Call) Run(run func(ctx context.Context, request sql.UpdateAlertRequest)) *MockAlertsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.UpdateAlertRequest)) - }) - return _c -} - -func (_c *MockAlertsInterface_Update_Call) Return(_a0 *sql.Alert, _a1 error) *MockAlertsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsInterface_Update_Call) RunAndReturn(run func(context.Context, sql.UpdateAlertRequest) (*sql.Alert, error)) *MockAlertsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAlertsInterface creates a new instance of MockAlertsInterface. 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 NewMockAlertsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAlertsInterface { - mock := &MockAlertsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_alerts_legacy_interface.go b/experimental/mocks/service/sql/mock_alerts_legacy_interface.go deleted file mode 100644 index f990b0bc6..000000000 --- a/experimental/mocks/service/sql/mock_alerts_legacy_interface.go +++ /dev/null @@ -1,530 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockAlertsLegacyInterface is an autogenerated mock type for the AlertsLegacyInterface type -type MockAlertsLegacyInterface struct { - mock.Mock -} - -type MockAlertsLegacyInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockAlertsLegacyInterface) EXPECT() *MockAlertsLegacyInterface_Expecter { - return &MockAlertsLegacyInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockAlertsLegacyInterface) Create(ctx context.Context, request sql.CreateAlert) (*sql.LegacyAlert, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.LegacyAlert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateAlert) (*sql.LegacyAlert, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateAlert) *sql.LegacyAlert); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyAlert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateAlert) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsLegacyInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockAlertsLegacyInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CreateAlert -func (_e *MockAlertsLegacyInterface_Expecter) Create(ctx interface{}, request interface{}) *MockAlertsLegacyInterface_Create_Call { - return &MockAlertsLegacyInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockAlertsLegacyInterface_Create_Call) Run(run func(ctx context.Context, request sql.CreateAlert)) *MockAlertsLegacyInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateAlert)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_Create_Call) Return(_a0 *sql.LegacyAlert, _a1 error) *MockAlertsLegacyInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsLegacyInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateAlert) (*sql.LegacyAlert, error)) *MockAlertsLegacyInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockAlertsLegacyInterface) Delete(ctx context.Context, request sql.DeleteAlertsLegacyRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteAlertsLegacyRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAlertsLegacyInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockAlertsLegacyInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DeleteAlertsLegacyRequest -func (_e *MockAlertsLegacyInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockAlertsLegacyInterface_Delete_Call { - return &MockAlertsLegacyInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockAlertsLegacyInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteAlertsLegacyRequest)) *MockAlertsLegacyInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DeleteAlertsLegacyRequest)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_Delete_Call) Return(_a0 error) *MockAlertsLegacyInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsLegacyInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteAlertsLegacyRequest) error) *MockAlertsLegacyInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByAlertId provides a mock function with given fields: ctx, alertId -func (_m *MockAlertsLegacyInterface) DeleteByAlertId(ctx context.Context, alertId string) error { - ret := _m.Called(ctx, alertId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByAlertId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, alertId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAlertsLegacyInterface_DeleteByAlertId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByAlertId' -type MockAlertsLegacyInterface_DeleteByAlertId_Call struct { - *mock.Call -} - -// DeleteByAlertId is a helper method to define mock.On call -// - ctx context.Context -// - alertId string -func (_e *MockAlertsLegacyInterface_Expecter) DeleteByAlertId(ctx interface{}, alertId interface{}) *MockAlertsLegacyInterface_DeleteByAlertId_Call { - return &MockAlertsLegacyInterface_DeleteByAlertId_Call{Call: _e.mock.On("DeleteByAlertId", ctx, alertId)} -} - -func (_c *MockAlertsLegacyInterface_DeleteByAlertId_Call) Run(run func(ctx context.Context, alertId string)) *MockAlertsLegacyInterface_DeleteByAlertId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_DeleteByAlertId_Call) Return(_a0 error) *MockAlertsLegacyInterface_DeleteByAlertId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsLegacyInterface_DeleteByAlertId_Call) RunAndReturn(run func(context.Context, string) error) *MockAlertsLegacyInterface_DeleteByAlertId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockAlertsLegacyInterface) Get(ctx context.Context, request sql.GetAlertsLegacyRequest) (*sql.LegacyAlert, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sql.LegacyAlert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetAlertsLegacyRequest) (*sql.LegacyAlert, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetAlertsLegacyRequest) *sql.LegacyAlert); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyAlert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetAlertsLegacyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsLegacyInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockAlertsLegacyInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetAlertsLegacyRequest -func (_e *MockAlertsLegacyInterface_Expecter) Get(ctx interface{}, request interface{}) *MockAlertsLegacyInterface_Get_Call { - return &MockAlertsLegacyInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockAlertsLegacyInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetAlertsLegacyRequest)) *MockAlertsLegacyInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetAlertsLegacyRequest)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_Get_Call) Return(_a0 *sql.LegacyAlert, _a1 error) *MockAlertsLegacyInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsLegacyInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetAlertsLegacyRequest) (*sql.LegacyAlert, error)) *MockAlertsLegacyInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByAlertId provides a mock function with given fields: ctx, alertId -func (_m *MockAlertsLegacyInterface) GetByAlertId(ctx context.Context, alertId string) (*sql.LegacyAlert, error) { - ret := _m.Called(ctx, alertId) - - if len(ret) == 0 { - panic("no return value specified for GetByAlertId") - } - - var r0 *sql.LegacyAlert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.LegacyAlert, error)); ok { - return rf(ctx, alertId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.LegacyAlert); ok { - r0 = rf(ctx, alertId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyAlert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, alertId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsLegacyInterface_GetByAlertId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByAlertId' -type MockAlertsLegacyInterface_GetByAlertId_Call struct { - *mock.Call -} - -// GetByAlertId is a helper method to define mock.On call -// - ctx context.Context -// - alertId string -func (_e *MockAlertsLegacyInterface_Expecter) GetByAlertId(ctx interface{}, alertId interface{}) *MockAlertsLegacyInterface_GetByAlertId_Call { - return &MockAlertsLegacyInterface_GetByAlertId_Call{Call: _e.mock.On("GetByAlertId", ctx, alertId)} -} - -func (_c *MockAlertsLegacyInterface_GetByAlertId_Call) Run(run func(ctx context.Context, alertId string)) *MockAlertsLegacyInterface_GetByAlertId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_GetByAlertId_Call) Return(_a0 *sql.LegacyAlert, _a1 error) *MockAlertsLegacyInterface_GetByAlertId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsLegacyInterface_GetByAlertId_Call) RunAndReturn(run func(context.Context, string) (*sql.LegacyAlert, error)) *MockAlertsLegacyInterface_GetByAlertId_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockAlertsLegacyInterface) GetByName(ctx context.Context, name string) (*sql.LegacyAlert, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sql.LegacyAlert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.LegacyAlert, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.LegacyAlert); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyAlert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsLegacyInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockAlertsLegacyInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockAlertsLegacyInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockAlertsLegacyInterface_GetByName_Call { - return &MockAlertsLegacyInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockAlertsLegacyInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockAlertsLegacyInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_GetByName_Call) Return(_a0 *sql.LegacyAlert, _a1 error) *MockAlertsLegacyInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsLegacyInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sql.LegacyAlert, error)) *MockAlertsLegacyInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// LegacyAlertNameToIdMap provides a mock function with given fields: ctx -func (_m *MockAlertsLegacyInterface) LegacyAlertNameToIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for LegacyAlertNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LegacyAlertNameToIdMap' -type MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call struct { - *mock.Call -} - -// LegacyAlertNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAlertsLegacyInterface_Expecter) LegacyAlertNameToIdMap(ctx interface{}) *MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call { - return &MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call{Call: _e.mock.On("LegacyAlertNameToIdMap", ctx)} -} - -func (_c *MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call) Run(run func(ctx context.Context)) *MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockAlertsLegacyInterface_LegacyAlertNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockAlertsLegacyInterface) List(ctx context.Context) ([]sql.LegacyAlert, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []sql.LegacyAlert - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]sql.LegacyAlert, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []sql.LegacyAlert); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.LegacyAlert) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockAlertsLegacyInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockAlertsLegacyInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockAlertsLegacyInterface_Expecter) List(ctx interface{}) *MockAlertsLegacyInterface_List_Call { - return &MockAlertsLegacyInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockAlertsLegacyInterface_List_Call) Run(run func(ctx context.Context)) *MockAlertsLegacyInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_List_Call) Return(_a0 []sql.LegacyAlert, _a1 error) *MockAlertsLegacyInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockAlertsLegacyInterface_List_Call) RunAndReturn(run func(context.Context) ([]sql.LegacyAlert, error)) *MockAlertsLegacyInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockAlertsLegacyInterface) Update(ctx context.Context, request sql.EditAlert) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.EditAlert) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockAlertsLegacyInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockAlertsLegacyInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.EditAlert -func (_e *MockAlertsLegacyInterface_Expecter) Update(ctx interface{}, request interface{}) *MockAlertsLegacyInterface_Update_Call { - return &MockAlertsLegacyInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockAlertsLegacyInterface_Update_Call) Run(run func(ctx context.Context, request sql.EditAlert)) *MockAlertsLegacyInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.EditAlert)) - }) - return _c -} - -func (_c *MockAlertsLegacyInterface_Update_Call) Return(_a0 error) *MockAlertsLegacyInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockAlertsLegacyInterface_Update_Call) RunAndReturn(run func(context.Context, sql.EditAlert) error) *MockAlertsLegacyInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockAlertsLegacyInterface creates a new instance of MockAlertsLegacyInterface. 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 NewMockAlertsLegacyInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockAlertsLegacyInterface { - mock := &MockAlertsLegacyInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_dashboard_widgets_interface.go b/experimental/mocks/service/sql/mock_dashboard_widgets_interface.go deleted file mode 100644 index e0f4b74e7..000000000 --- a/experimental/mocks/service/sql/mock_dashboard_widgets_interface.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockDashboardWidgetsInterface is an autogenerated mock type for the DashboardWidgetsInterface type -type MockDashboardWidgetsInterface struct { - mock.Mock -} - -type MockDashboardWidgetsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDashboardWidgetsInterface) EXPECT() *MockDashboardWidgetsInterface_Expecter { - return &MockDashboardWidgetsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockDashboardWidgetsInterface) Create(ctx context.Context, request sql.CreateWidget) (*sql.Widget, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.Widget - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWidget) (*sql.Widget, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWidget) *sql.Widget); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Widget) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateWidget) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardWidgetsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockDashboardWidgetsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CreateWidget -func (_e *MockDashboardWidgetsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockDashboardWidgetsInterface_Create_Call { - return &MockDashboardWidgetsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockDashboardWidgetsInterface_Create_Call) Run(run func(ctx context.Context, request sql.CreateWidget)) *MockDashboardWidgetsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateWidget)) - }) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Create_Call) Return(_a0 *sql.Widget, _a1 error) *MockDashboardWidgetsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateWidget) (*sql.Widget, error)) *MockDashboardWidgetsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockDashboardWidgetsInterface) Delete(ctx context.Context, request sql.DeleteDashboardWidgetRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteDashboardWidgetRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDashboardWidgetsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockDashboardWidgetsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DeleteDashboardWidgetRequest -func (_e *MockDashboardWidgetsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDashboardWidgetsInterface_Delete_Call { - return &MockDashboardWidgetsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockDashboardWidgetsInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteDashboardWidgetRequest)) *MockDashboardWidgetsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DeleteDashboardWidgetRequest)) - }) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Delete_Call) Return(_a0 error) *MockDashboardWidgetsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteDashboardWidgetRequest) error) *MockDashboardWidgetsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockDashboardWidgetsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDashboardWidgetsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockDashboardWidgetsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockDashboardWidgetsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockDashboardWidgetsInterface_DeleteById_Call { - return &MockDashboardWidgetsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockDashboardWidgetsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockDashboardWidgetsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDashboardWidgetsInterface_DeleteById_Call) Return(_a0 error) *MockDashboardWidgetsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardWidgetsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockDashboardWidgetsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockDashboardWidgetsInterface) Update(ctx context.Context, request sql.CreateWidget) (*sql.Widget, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sql.Widget - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWidget) (*sql.Widget, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWidget) *sql.Widget); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Widget) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateWidget) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardWidgetsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockDashboardWidgetsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CreateWidget -func (_e *MockDashboardWidgetsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockDashboardWidgetsInterface_Update_Call { - return &MockDashboardWidgetsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockDashboardWidgetsInterface_Update_Call) Run(run func(ctx context.Context, request sql.CreateWidget)) *MockDashboardWidgetsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateWidget)) - }) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Update_Call) Return(_a0 *sql.Widget, _a1 error) *MockDashboardWidgetsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardWidgetsInterface_Update_Call) RunAndReturn(run func(context.Context, sql.CreateWidget) (*sql.Widget, error)) *MockDashboardWidgetsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDashboardWidgetsInterface creates a new instance of MockDashboardWidgetsInterface. 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 NewMockDashboardWidgetsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDashboardWidgetsInterface { - mock := &MockDashboardWidgetsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_dashboards_interface.go b/experimental/mocks/service/sql/mock_dashboards_interface.go deleted file mode 100644 index 605c03395..000000000 --- a/experimental/mocks/service/sql/mock_dashboards_interface.go +++ /dev/null @@ -1,642 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - sql "github.com/databricks/databricks-sdk-go/service/sql" -) - -// MockDashboardsInterface is an autogenerated mock type for the DashboardsInterface type -type MockDashboardsInterface struct { - mock.Mock -} - -type MockDashboardsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDashboardsInterface) EXPECT() *MockDashboardsInterface_Expecter { - return &MockDashboardsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) Create(ctx context.Context, request sql.DashboardPostContent) (*sql.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardPostContent) (*sql.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardPostContent) *sql.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.DashboardPostContent) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockDashboardsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DashboardPostContent -func (_e *MockDashboardsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockDashboardsInterface_Create_Call { - return &MockDashboardsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockDashboardsInterface_Create_Call) Run(run func(ctx context.Context, request sql.DashboardPostContent)) *MockDashboardsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DashboardPostContent)) - }) - return _c -} - -func (_c *MockDashboardsInterface_Create_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_Create_Call) RunAndReturn(run func(context.Context, sql.DashboardPostContent) (*sql.Dashboard, error)) *MockDashboardsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// DashboardNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) DashboardNameToIdMap(ctx context.Context, request sql.ListDashboardsRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DashboardNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListDashboardsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_DashboardNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DashboardNameToIdMap' -type MockDashboardsInterface_DashboardNameToIdMap_Call struct { - *mock.Call -} - -// DashboardNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListDashboardsRequest -func (_e *MockDashboardsInterface_Expecter) DashboardNameToIdMap(ctx interface{}, request interface{}) *MockDashboardsInterface_DashboardNameToIdMap_Call { - return &MockDashboardsInterface_DashboardNameToIdMap_Call{Call: _e.mock.On("DashboardNameToIdMap", ctx, request)} -} - -func (_c *MockDashboardsInterface_DashboardNameToIdMap_Call) Run(run func(ctx context.Context, request sql.ListDashboardsRequest)) *MockDashboardsInterface_DashboardNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListDashboardsRequest)) - }) - return _c -} - -func (_c *MockDashboardsInterface_DashboardNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockDashboardsInterface_DashboardNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_DashboardNameToIdMap_Call) RunAndReturn(run func(context.Context, sql.ListDashboardsRequest) (map[string]string, error)) *MockDashboardsInterface_DashboardNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) Delete(ctx context.Context, request sql.DeleteDashboardRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteDashboardRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDashboardsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockDashboardsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DeleteDashboardRequest -func (_e *MockDashboardsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockDashboardsInterface_Delete_Call { - return &MockDashboardsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockDashboardsInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteDashboardRequest)) *MockDashboardsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DeleteDashboardRequest)) - }) - return _c -} - -func (_c *MockDashboardsInterface_Delete_Call) Return(_a0 error) *MockDashboardsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardsInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteDashboardRequest) error) *MockDashboardsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByDashboardId provides a mock function with given fields: ctx, dashboardId -func (_m *MockDashboardsInterface) DeleteByDashboardId(ctx context.Context, dashboardId string) error { - ret := _m.Called(ctx, dashboardId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByDashboardId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, dashboardId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDashboardsInterface_DeleteByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByDashboardId' -type MockDashboardsInterface_DeleteByDashboardId_Call struct { - *mock.Call -} - -// DeleteByDashboardId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -func (_e *MockDashboardsInterface_Expecter) DeleteByDashboardId(ctx interface{}, dashboardId interface{}) *MockDashboardsInterface_DeleteByDashboardId_Call { - return &MockDashboardsInterface_DeleteByDashboardId_Call{Call: _e.mock.On("DeleteByDashboardId", ctx, dashboardId)} -} - -func (_c *MockDashboardsInterface_DeleteByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockDashboardsInterface_DeleteByDashboardId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDashboardsInterface_DeleteByDashboardId_Call) Return(_a0 error) *MockDashboardsInterface_DeleteByDashboardId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardsInterface_DeleteByDashboardId_Call) RunAndReturn(run func(context.Context, string) error) *MockDashboardsInterface_DeleteByDashboardId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) Get(ctx context.Context, request sql.GetDashboardRequest) (*sql.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sql.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetDashboardRequest) (*sql.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetDashboardRequest) *sql.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetDashboardRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockDashboardsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetDashboardRequest -func (_e *MockDashboardsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockDashboardsInterface_Get_Call { - return &MockDashboardsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockDashboardsInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetDashboardRequest)) *MockDashboardsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetDashboardRequest)) - }) - return _c -} - -func (_c *MockDashboardsInterface_Get_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetDashboardRequest) (*sql.Dashboard, error)) *MockDashboardsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDashboardId provides a mock function with given fields: ctx, dashboardId -func (_m *MockDashboardsInterface) GetByDashboardId(ctx context.Context, dashboardId string) (*sql.Dashboard, error) { - ret := _m.Called(ctx, dashboardId) - - if len(ret) == 0 { - panic("no return value specified for GetByDashboardId") - } - - var r0 *sql.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.Dashboard, error)); ok { - return rf(ctx, dashboardId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.Dashboard); ok { - r0 = rf(ctx, dashboardId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, dashboardId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_GetByDashboardId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDashboardId' -type MockDashboardsInterface_GetByDashboardId_Call struct { - *mock.Call -} - -// GetByDashboardId is a helper method to define mock.On call -// - ctx context.Context -// - dashboardId string -func (_e *MockDashboardsInterface_Expecter) GetByDashboardId(ctx interface{}, dashboardId interface{}) *MockDashboardsInterface_GetByDashboardId_Call { - return &MockDashboardsInterface_GetByDashboardId_Call{Call: _e.mock.On("GetByDashboardId", ctx, dashboardId)} -} - -func (_c *MockDashboardsInterface_GetByDashboardId_Call) Run(run func(ctx context.Context, dashboardId string)) *MockDashboardsInterface_GetByDashboardId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDashboardsInterface_GetByDashboardId_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_GetByDashboardId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_GetByDashboardId_Call) RunAndReturn(run func(context.Context, string) (*sql.Dashboard, error)) *MockDashboardsInterface_GetByDashboardId_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockDashboardsInterface) GetByName(ctx context.Context, name string) (*sql.Dashboard, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sql.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.Dashboard, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.Dashboard); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockDashboardsInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockDashboardsInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockDashboardsInterface_GetByName_Call { - return &MockDashboardsInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockDashboardsInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockDashboardsInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDashboardsInterface_GetByName_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sql.Dashboard, error)) *MockDashboardsInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) List(ctx context.Context, request sql.ListDashboardsRequest) listing.Iterator[sql.Dashboard] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sql.Dashboard] - if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) listing.Iterator[sql.Dashboard]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sql.Dashboard]) - } - } - - return r0 -} - -// MockDashboardsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockDashboardsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListDashboardsRequest -func (_e *MockDashboardsInterface_Expecter) List(ctx interface{}, request interface{}) *MockDashboardsInterface_List_Call { - return &MockDashboardsInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockDashboardsInterface_List_Call) Run(run func(ctx context.Context, request sql.ListDashboardsRequest)) *MockDashboardsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListDashboardsRequest)) - }) - return _c -} - -func (_c *MockDashboardsInterface_List_Call) Return(_a0 listing.Iterator[sql.Dashboard]) *MockDashboardsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardsInterface_List_Call) RunAndReturn(run func(context.Context, sql.ListDashboardsRequest) listing.Iterator[sql.Dashboard]) *MockDashboardsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) ListAll(ctx context.Context, request sql.ListDashboardsRequest) ([]sql.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sql.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) ([]sql.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListDashboardsRequest) []sql.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListDashboardsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockDashboardsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListDashboardsRequest -func (_e *MockDashboardsInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockDashboardsInterface_ListAll_Call { - return &MockDashboardsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockDashboardsInterface_ListAll_Call) Run(run func(ctx context.Context, request sql.ListDashboardsRequest)) *MockDashboardsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListDashboardsRequest)) - }) - return _c -} - -func (_c *MockDashboardsInterface_ListAll_Call) Return(_a0 []sql.Dashboard, _a1 error) *MockDashboardsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_ListAll_Call) RunAndReturn(run func(context.Context, sql.ListDashboardsRequest) ([]sql.Dashboard, error)) *MockDashboardsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Restore provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) Restore(ctx context.Context, request sql.RestoreDashboardRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Restore") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.RestoreDashboardRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockDashboardsInterface_Restore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restore' -type MockDashboardsInterface_Restore_Call struct { - *mock.Call -} - -// Restore is a helper method to define mock.On call -// - ctx context.Context -// - request sql.RestoreDashboardRequest -func (_e *MockDashboardsInterface_Expecter) Restore(ctx interface{}, request interface{}) *MockDashboardsInterface_Restore_Call { - return &MockDashboardsInterface_Restore_Call{Call: _e.mock.On("Restore", ctx, request)} -} - -func (_c *MockDashboardsInterface_Restore_Call) Run(run func(ctx context.Context, request sql.RestoreDashboardRequest)) *MockDashboardsInterface_Restore_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.RestoreDashboardRequest)) - }) - return _c -} - -func (_c *MockDashboardsInterface_Restore_Call) Return(_a0 error) *MockDashboardsInterface_Restore_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockDashboardsInterface_Restore_Call) RunAndReturn(run func(context.Context, sql.RestoreDashboardRequest) error) *MockDashboardsInterface_Restore_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockDashboardsInterface) Update(ctx context.Context, request sql.DashboardEditContent) (*sql.Dashboard, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sql.Dashboard - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardEditContent) (*sql.Dashboard, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.DashboardEditContent) *sql.Dashboard); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Dashboard) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.DashboardEditContent) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDashboardsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockDashboardsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DashboardEditContent -func (_e *MockDashboardsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockDashboardsInterface_Update_Call { - return &MockDashboardsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockDashboardsInterface_Update_Call) Run(run func(ctx context.Context, request sql.DashboardEditContent)) *MockDashboardsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DashboardEditContent)) - }) - return _c -} - -func (_c *MockDashboardsInterface_Update_Call) Return(_a0 *sql.Dashboard, _a1 error) *MockDashboardsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDashboardsInterface_Update_Call) RunAndReturn(run func(context.Context, sql.DashboardEditContent) (*sql.Dashboard, error)) *MockDashboardsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDashboardsInterface creates a new instance of MockDashboardsInterface. 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 NewMockDashboardsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDashboardsInterface { - mock := &MockDashboardsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_data_sources_interface.go b/experimental/mocks/service/sql/mock_data_sources_interface.go deleted file mode 100644 index fb1a708e2..000000000 --- a/experimental/mocks/service/sql/mock_data_sources_interface.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockDataSourcesInterface is an autogenerated mock type for the DataSourcesInterface type -type MockDataSourcesInterface struct { - mock.Mock -} - -type MockDataSourcesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDataSourcesInterface) EXPECT() *MockDataSourcesInterface_Expecter { - return &MockDataSourcesInterface_Expecter{mock: &_m.Mock} -} - -// DataSourceNameToIdMap provides a mock function with given fields: ctx -func (_m *MockDataSourcesInterface) DataSourceNameToIdMap(ctx context.Context) (map[string]string, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for DataSourceNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]string, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]string); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataSourcesInterface_DataSourceNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DataSourceNameToIdMap' -type MockDataSourcesInterface_DataSourceNameToIdMap_Call struct { - *mock.Call -} - -// DataSourceNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockDataSourcesInterface_Expecter) DataSourceNameToIdMap(ctx interface{}) *MockDataSourcesInterface_DataSourceNameToIdMap_Call { - return &MockDataSourcesInterface_DataSourceNameToIdMap_Call{Call: _e.mock.On("DataSourceNameToIdMap", ctx)} -} - -func (_c *MockDataSourcesInterface_DataSourceNameToIdMap_Call) Run(run func(ctx context.Context)) *MockDataSourcesInterface_DataSourceNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockDataSourcesInterface_DataSourceNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockDataSourcesInterface_DataSourceNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataSourcesInterface_DataSourceNameToIdMap_Call) RunAndReturn(run func(context.Context) (map[string]string, error)) *MockDataSourcesInterface_DataSourceNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockDataSourcesInterface) GetByName(ctx context.Context, name string) (*sql.DataSource, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sql.DataSource - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.DataSource, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.DataSource); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.DataSource) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataSourcesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockDataSourcesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockDataSourcesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockDataSourcesInterface_GetByName_Call { - return &MockDataSourcesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockDataSourcesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockDataSourcesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockDataSourcesInterface_GetByName_Call) Return(_a0 *sql.DataSource, _a1 error) *MockDataSourcesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataSourcesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sql.DataSource, error)) *MockDataSourcesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockDataSourcesInterface) List(ctx context.Context) ([]sql.DataSource, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []sql.DataSource - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]sql.DataSource, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []sql.DataSource); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.DataSource) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDataSourcesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockDataSourcesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockDataSourcesInterface_Expecter) List(ctx interface{}) *MockDataSourcesInterface_List_Call { - return &MockDataSourcesInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockDataSourcesInterface_List_Call) Run(run func(ctx context.Context)) *MockDataSourcesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockDataSourcesInterface_List_Call) Return(_a0 []sql.DataSource, _a1 error) *MockDataSourcesInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDataSourcesInterface_List_Call) RunAndReturn(run func(context.Context) ([]sql.DataSource, error)) *MockDataSourcesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDataSourcesInterface creates a new instance of MockDataSourcesInterface. 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 NewMockDataSourcesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDataSourcesInterface { - mock := &MockDataSourcesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_dbsql_permissions_interface.go b/experimental/mocks/service/sql/mock_dbsql_permissions_interface.go deleted file mode 100644 index 95cfdfc0e..000000000 --- a/experimental/mocks/service/sql/mock_dbsql_permissions_interface.go +++ /dev/null @@ -1,274 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockDbsqlPermissionsInterface is an autogenerated mock type for the DbsqlPermissionsInterface type -type MockDbsqlPermissionsInterface struct { - mock.Mock -} - -type MockDbsqlPermissionsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockDbsqlPermissionsInterface) EXPECT() *MockDbsqlPermissionsInterface_Expecter { - return &MockDbsqlPermissionsInterface_Expecter{mock: &_m.Mock} -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockDbsqlPermissionsInterface) Get(ctx context.Context, request sql.GetDbsqlPermissionRequest) (*sql.GetResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sql.GetResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetDbsqlPermissionRequest) (*sql.GetResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetDbsqlPermissionRequest) *sql.GetResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetDbsqlPermissionRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbsqlPermissionsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockDbsqlPermissionsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetDbsqlPermissionRequest -func (_e *MockDbsqlPermissionsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockDbsqlPermissionsInterface_Get_Call { - return &MockDbsqlPermissionsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockDbsqlPermissionsInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetDbsqlPermissionRequest)) *MockDbsqlPermissionsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetDbsqlPermissionRequest)) - }) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_Get_Call) Return(_a0 *sql.GetResponse, _a1 error) *MockDbsqlPermissionsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetDbsqlPermissionRequest) (*sql.GetResponse, error)) *MockDbsqlPermissionsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByObjectTypeAndObjectId provides a mock function with given fields: ctx, objectType, objectId -func (_m *MockDbsqlPermissionsInterface) GetByObjectTypeAndObjectId(ctx context.Context, objectType sql.ObjectTypePlural, objectId string) (*sql.GetResponse, error) { - ret := _m.Called(ctx, objectType, objectId) - - if len(ret) == 0 { - panic("no return value specified for GetByObjectTypeAndObjectId") - } - - var r0 *sql.GetResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ObjectTypePlural, string) (*sql.GetResponse, error)); ok { - return rf(ctx, objectType, objectId) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ObjectTypePlural, string) *sql.GetResponse); ok { - r0 = rf(ctx, objectType, objectId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ObjectTypePlural, string) error); ok { - r1 = rf(ctx, objectType, objectId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByObjectTypeAndObjectId' -type MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call struct { - *mock.Call -} - -// GetByObjectTypeAndObjectId is a helper method to define mock.On call -// - ctx context.Context -// - objectType sql.ObjectTypePlural -// - objectId string -func (_e *MockDbsqlPermissionsInterface_Expecter) GetByObjectTypeAndObjectId(ctx interface{}, objectType interface{}, objectId interface{}) *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call { - return &MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call{Call: _e.mock.On("GetByObjectTypeAndObjectId", ctx, objectType, objectId)} -} - -func (_c *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call) Run(run func(ctx context.Context, objectType sql.ObjectTypePlural, objectId string)) *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ObjectTypePlural), args[2].(string)) - }) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call) Return(_a0 *sql.GetResponse, _a1 error) *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call) RunAndReturn(run func(context.Context, sql.ObjectTypePlural, string) (*sql.GetResponse, error)) *MockDbsqlPermissionsInterface_GetByObjectTypeAndObjectId_Call { - _c.Call.Return(run) - return _c -} - -// Set provides a mock function with given fields: ctx, request -func (_m *MockDbsqlPermissionsInterface) Set(ctx context.Context, request sql.SetRequest) (*sql.SetResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Set") - } - - var r0 *sql.SetResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.SetRequest) (*sql.SetResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.SetRequest) *sql.SetResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.SetResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.SetRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbsqlPermissionsInterface_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set' -type MockDbsqlPermissionsInterface_Set_Call struct { - *mock.Call -} - -// Set is a helper method to define mock.On call -// - ctx context.Context -// - request sql.SetRequest -func (_e *MockDbsqlPermissionsInterface_Expecter) Set(ctx interface{}, request interface{}) *MockDbsqlPermissionsInterface_Set_Call { - return &MockDbsqlPermissionsInterface_Set_Call{Call: _e.mock.On("Set", ctx, request)} -} - -func (_c *MockDbsqlPermissionsInterface_Set_Call) Run(run func(ctx context.Context, request sql.SetRequest)) *MockDbsqlPermissionsInterface_Set_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.SetRequest)) - }) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_Set_Call) Return(_a0 *sql.SetResponse, _a1 error) *MockDbsqlPermissionsInterface_Set_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_Set_Call) RunAndReturn(run func(context.Context, sql.SetRequest) (*sql.SetResponse, error)) *MockDbsqlPermissionsInterface_Set_Call { - _c.Call.Return(run) - return _c -} - -// TransferOwnership provides a mock function with given fields: ctx, request -func (_m *MockDbsqlPermissionsInterface) TransferOwnership(ctx context.Context, request sql.TransferOwnershipRequest) (*sql.Success, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for TransferOwnership") - } - - var r0 *sql.Success - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.TransferOwnershipRequest) (*sql.Success, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.TransferOwnershipRequest) *sql.Success); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Success) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.TransferOwnershipRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockDbsqlPermissionsInterface_TransferOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferOwnership' -type MockDbsqlPermissionsInterface_TransferOwnership_Call struct { - *mock.Call -} - -// TransferOwnership is a helper method to define mock.On call -// - ctx context.Context -// - request sql.TransferOwnershipRequest -func (_e *MockDbsqlPermissionsInterface_Expecter) TransferOwnership(ctx interface{}, request interface{}) *MockDbsqlPermissionsInterface_TransferOwnership_Call { - return &MockDbsqlPermissionsInterface_TransferOwnership_Call{Call: _e.mock.On("TransferOwnership", ctx, request)} -} - -func (_c *MockDbsqlPermissionsInterface_TransferOwnership_Call) Run(run func(ctx context.Context, request sql.TransferOwnershipRequest)) *MockDbsqlPermissionsInterface_TransferOwnership_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.TransferOwnershipRequest)) - }) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_TransferOwnership_Call) Return(_a0 *sql.Success, _a1 error) *MockDbsqlPermissionsInterface_TransferOwnership_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockDbsqlPermissionsInterface_TransferOwnership_Call) RunAndReturn(run func(context.Context, sql.TransferOwnershipRequest) (*sql.Success, error)) *MockDbsqlPermissionsInterface_TransferOwnership_Call { - _c.Call.Return(run) - return _c -} - -// NewMockDbsqlPermissionsInterface creates a new instance of MockDbsqlPermissionsInterface. 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 NewMockDbsqlPermissionsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockDbsqlPermissionsInterface { - mock := &MockDbsqlPermissionsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_queries_interface.go b/experimental/mocks/service/sql/mock_queries_interface.go deleted file mode 100644 index efc62901b..000000000 --- a/experimental/mocks/service/sql/mock_queries_interface.go +++ /dev/null @@ -1,762 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - sql "github.com/databricks/databricks-sdk-go/service/sql" -) - -// MockQueriesInterface is an autogenerated mock type for the QueriesInterface type -type MockQueriesInterface struct { - mock.Mock -} - -type MockQueriesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockQueriesInterface) EXPECT() *MockQueriesInterface_Expecter { - return &MockQueriesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) Create(ctx context.Context, request sql.CreateQueryRequest) (*sql.Query, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.Query - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateQueryRequest) (*sql.Query, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateQueryRequest) *sql.Query); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Query) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateQueryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockQueriesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CreateQueryRequest -func (_e *MockQueriesInterface_Expecter) Create(ctx interface{}, request interface{}) *MockQueriesInterface_Create_Call { - return &MockQueriesInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockQueriesInterface_Create_Call) Run(run func(ctx context.Context, request sql.CreateQueryRequest)) *MockQueriesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateQueryRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_Create_Call) Return(_a0 *sql.Query, _a1 error) *MockQueriesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateQueryRequest) (*sql.Query, error)) *MockQueriesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) Delete(ctx context.Context, request sql.TrashQueryRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.TrashQueryRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueriesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockQueriesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.TrashQueryRequest -func (_e *MockQueriesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockQueriesInterface_Delete_Call { - return &MockQueriesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockQueriesInterface_Delete_Call) Run(run func(ctx context.Context, request sql.TrashQueryRequest)) *MockQueriesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.TrashQueryRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_Delete_Call) Return(_a0 error) *MockQueriesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.TrashQueryRequest) error) *MockQueriesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockQueriesInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueriesInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockQueriesInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockQueriesInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockQueriesInterface_DeleteById_Call { - return &MockQueriesInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockQueriesInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockQueriesInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueriesInterface_DeleteById_Call) Return(_a0 error) *MockQueriesInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockQueriesInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) Get(ctx context.Context, request sql.GetQueryRequest) (*sql.Query, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sql.Query - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetQueryRequest) (*sql.Query, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetQueryRequest) *sql.Query); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Query) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetQueryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockQueriesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetQueryRequest -func (_e *MockQueriesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockQueriesInterface_Get_Call { - return &MockQueriesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockQueriesInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetQueryRequest)) *MockQueriesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetQueryRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_Get_Call) Return(_a0 *sql.Query, _a1 error) *MockQueriesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetQueryRequest) (*sql.Query, error)) *MockQueriesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByDisplayName provides a mock function with given fields: ctx, name -func (_m *MockQueriesInterface) GetByDisplayName(ctx context.Context, name string) (*sql.ListQueryObjectsResponseQuery, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByDisplayName") - } - - var r0 *sql.ListQueryObjectsResponseQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.ListQueryObjectsResponseQuery, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.ListQueryObjectsResponseQuery); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.ListQueryObjectsResponseQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_GetByDisplayName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByDisplayName' -type MockQueriesInterface_GetByDisplayName_Call struct { - *mock.Call -} - -// GetByDisplayName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockQueriesInterface_Expecter) GetByDisplayName(ctx interface{}, name interface{}) *MockQueriesInterface_GetByDisplayName_Call { - return &MockQueriesInterface_GetByDisplayName_Call{Call: _e.mock.On("GetByDisplayName", ctx, name)} -} - -func (_c *MockQueriesInterface_GetByDisplayName_Call) Run(run func(ctx context.Context, name string)) *MockQueriesInterface_GetByDisplayName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueriesInterface_GetByDisplayName_Call) Return(_a0 *sql.ListQueryObjectsResponseQuery, _a1 error) *MockQueriesInterface_GetByDisplayName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_GetByDisplayName_Call) RunAndReturn(run func(context.Context, string) (*sql.ListQueryObjectsResponseQuery, error)) *MockQueriesInterface_GetByDisplayName_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockQueriesInterface) GetById(ctx context.Context, id string) (*sql.Query, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *sql.Query - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.Query, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.Query); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Query) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockQueriesInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockQueriesInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockQueriesInterface_GetById_Call { - return &MockQueriesInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockQueriesInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockQueriesInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueriesInterface_GetById_Call) Return(_a0 *sql.Query, _a1 error) *MockQueriesInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*sql.Query, error)) *MockQueriesInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) List(ctx context.Context, request sql.ListQueriesRequest) listing.Iterator[sql.ListQueryObjectsResponseQuery] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sql.ListQueryObjectsResponseQuery] - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesRequest) listing.Iterator[sql.ListQueryObjectsResponseQuery]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sql.ListQueryObjectsResponseQuery]) - } - } - - return r0 -} - -// MockQueriesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockQueriesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListQueriesRequest -func (_e *MockQueriesInterface_Expecter) List(ctx interface{}, request interface{}) *MockQueriesInterface_List_Call { - return &MockQueriesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockQueriesInterface_List_Call) Run(run func(ctx context.Context, request sql.ListQueriesRequest)) *MockQueriesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListQueriesRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_List_Call) Return(_a0 listing.Iterator[sql.ListQueryObjectsResponseQuery]) *MockQueriesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesInterface_List_Call) RunAndReturn(run func(context.Context, sql.ListQueriesRequest) listing.Iterator[sql.ListQueryObjectsResponseQuery]) *MockQueriesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) ListAll(ctx context.Context, request sql.ListQueriesRequest) ([]sql.ListQueryObjectsResponseQuery, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sql.ListQueryObjectsResponseQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesRequest) ([]sql.ListQueryObjectsResponseQuery, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesRequest) []sql.ListQueryObjectsResponseQuery); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.ListQueryObjectsResponseQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListQueriesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockQueriesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListQueriesRequest -func (_e *MockQueriesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockQueriesInterface_ListAll_Call { - return &MockQueriesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockQueriesInterface_ListAll_Call) Run(run func(ctx context.Context, request sql.ListQueriesRequest)) *MockQueriesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListQueriesRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_ListAll_Call) Return(_a0 []sql.ListQueryObjectsResponseQuery, _a1 error) *MockQueriesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_ListAll_Call) RunAndReturn(run func(context.Context, sql.ListQueriesRequest) ([]sql.ListQueryObjectsResponseQuery, error)) *MockQueriesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// ListQueryObjectsResponseQueryDisplayNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) ListQueryObjectsResponseQueryDisplayNameToIdMap(ctx context.Context, request sql.ListQueriesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListQueryObjectsResponseQueryDisplayNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListQueriesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListQueryObjectsResponseQueryDisplayNameToIdMap' -type MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call struct { - *mock.Call -} - -// ListQueryObjectsResponseQueryDisplayNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListQueriesRequest -func (_e *MockQueriesInterface_Expecter) ListQueryObjectsResponseQueryDisplayNameToIdMap(ctx interface{}, request interface{}) *MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call { - return &MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call{Call: _e.mock.On("ListQueryObjectsResponseQueryDisplayNameToIdMap", ctx, request)} -} - -func (_c *MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call) Run(run func(ctx context.Context, request sql.ListQueriesRequest)) *MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListQueriesRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call) RunAndReturn(run func(context.Context, sql.ListQueriesRequest) (map[string]string, error)) *MockQueriesInterface_ListQueryObjectsResponseQueryDisplayNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// ListVisualizations provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) ListVisualizations(ctx context.Context, request sql.ListVisualizationsForQueryRequest) listing.Iterator[sql.Visualization] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListVisualizations") - } - - var r0 listing.Iterator[sql.Visualization] - if rf, ok := ret.Get(0).(func(context.Context, sql.ListVisualizationsForQueryRequest) listing.Iterator[sql.Visualization]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sql.Visualization]) - } - } - - return r0 -} - -// MockQueriesInterface_ListVisualizations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVisualizations' -type MockQueriesInterface_ListVisualizations_Call struct { - *mock.Call -} - -// ListVisualizations is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListVisualizationsForQueryRequest -func (_e *MockQueriesInterface_Expecter) ListVisualizations(ctx interface{}, request interface{}) *MockQueriesInterface_ListVisualizations_Call { - return &MockQueriesInterface_ListVisualizations_Call{Call: _e.mock.On("ListVisualizations", ctx, request)} -} - -func (_c *MockQueriesInterface_ListVisualizations_Call) Run(run func(ctx context.Context, request sql.ListVisualizationsForQueryRequest)) *MockQueriesInterface_ListVisualizations_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListVisualizationsForQueryRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_ListVisualizations_Call) Return(_a0 listing.Iterator[sql.Visualization]) *MockQueriesInterface_ListVisualizations_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesInterface_ListVisualizations_Call) RunAndReturn(run func(context.Context, sql.ListVisualizationsForQueryRequest) listing.Iterator[sql.Visualization]) *MockQueriesInterface_ListVisualizations_Call { - _c.Call.Return(run) - return _c -} - -// ListVisualizationsAll provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) ListVisualizationsAll(ctx context.Context, request sql.ListVisualizationsForQueryRequest) ([]sql.Visualization, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListVisualizationsAll") - } - - var r0 []sql.Visualization - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListVisualizationsForQueryRequest) ([]sql.Visualization, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListVisualizationsForQueryRequest) []sql.Visualization); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.Visualization) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListVisualizationsForQueryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_ListVisualizationsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVisualizationsAll' -type MockQueriesInterface_ListVisualizationsAll_Call struct { - *mock.Call -} - -// ListVisualizationsAll is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListVisualizationsForQueryRequest -func (_e *MockQueriesInterface_Expecter) ListVisualizationsAll(ctx interface{}, request interface{}) *MockQueriesInterface_ListVisualizationsAll_Call { - return &MockQueriesInterface_ListVisualizationsAll_Call{Call: _e.mock.On("ListVisualizationsAll", ctx, request)} -} - -func (_c *MockQueriesInterface_ListVisualizationsAll_Call) Run(run func(ctx context.Context, request sql.ListVisualizationsForQueryRequest)) *MockQueriesInterface_ListVisualizationsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListVisualizationsForQueryRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_ListVisualizationsAll_Call) Return(_a0 []sql.Visualization, _a1 error) *MockQueriesInterface_ListVisualizationsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_ListVisualizationsAll_Call) RunAndReturn(run func(context.Context, sql.ListVisualizationsForQueryRequest) ([]sql.Visualization, error)) *MockQueriesInterface_ListVisualizationsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListVisualizationsById provides a mock function with given fields: ctx, id -func (_m *MockQueriesInterface) ListVisualizationsById(ctx context.Context, id string) (*sql.ListVisualizationsForQueryResponse, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for ListVisualizationsById") - } - - var r0 *sql.ListVisualizationsForQueryResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.ListVisualizationsForQueryResponse, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.ListVisualizationsForQueryResponse); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.ListVisualizationsForQueryResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_ListVisualizationsById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListVisualizationsById' -type MockQueriesInterface_ListVisualizationsById_Call struct { - *mock.Call -} - -// ListVisualizationsById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockQueriesInterface_Expecter) ListVisualizationsById(ctx interface{}, id interface{}) *MockQueriesInterface_ListVisualizationsById_Call { - return &MockQueriesInterface_ListVisualizationsById_Call{Call: _e.mock.On("ListVisualizationsById", ctx, id)} -} - -func (_c *MockQueriesInterface_ListVisualizationsById_Call) Run(run func(ctx context.Context, id string)) *MockQueriesInterface_ListVisualizationsById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueriesInterface_ListVisualizationsById_Call) Return(_a0 *sql.ListVisualizationsForQueryResponse, _a1 error) *MockQueriesInterface_ListVisualizationsById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_ListVisualizationsById_Call) RunAndReturn(run func(context.Context, string) (*sql.ListVisualizationsForQueryResponse, error)) *MockQueriesInterface_ListVisualizationsById_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockQueriesInterface) Update(ctx context.Context, request sql.UpdateQueryRequest) (*sql.Query, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sql.Query - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.UpdateQueryRequest) (*sql.Query, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.UpdateQueryRequest) *sql.Query); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Query) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.UpdateQueryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockQueriesInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.UpdateQueryRequest -func (_e *MockQueriesInterface_Expecter) Update(ctx interface{}, request interface{}) *MockQueriesInterface_Update_Call { - return &MockQueriesInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockQueriesInterface_Update_Call) Run(run func(ctx context.Context, request sql.UpdateQueryRequest)) *MockQueriesInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.UpdateQueryRequest)) - }) - return _c -} - -func (_c *MockQueriesInterface_Update_Call) Return(_a0 *sql.Query, _a1 error) *MockQueriesInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesInterface_Update_Call) RunAndReturn(run func(context.Context, sql.UpdateQueryRequest) (*sql.Query, error)) *MockQueriesInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockQueriesInterface creates a new instance of MockQueriesInterface. 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 NewMockQueriesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockQueriesInterface { - mock := &MockQueriesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_queries_legacy_interface.go b/experimental/mocks/service/sql/mock_queries_legacy_interface.go deleted file mode 100644 index e7b6e60b2..000000000 --- a/experimental/mocks/service/sql/mock_queries_legacy_interface.go +++ /dev/null @@ -1,642 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - sql "github.com/databricks/databricks-sdk-go/service/sql" -) - -// MockQueriesLegacyInterface is an autogenerated mock type for the QueriesLegacyInterface type -type MockQueriesLegacyInterface struct { - mock.Mock -} - -type MockQueriesLegacyInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockQueriesLegacyInterface) EXPECT() *MockQueriesLegacyInterface_Expecter { - return &MockQueriesLegacyInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) Create(ctx context.Context, request sql.QueryPostContent) (*sql.LegacyQuery, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.LegacyQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.QueryPostContent) (*sql.LegacyQuery, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.QueryPostContent) *sql.LegacyQuery); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.QueryPostContent) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesLegacyInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockQueriesLegacyInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.QueryPostContent -func (_e *MockQueriesLegacyInterface_Expecter) Create(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_Create_Call { - return &MockQueriesLegacyInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_Create_Call) Run(run func(ctx context.Context, request sql.QueryPostContent)) *MockQueriesLegacyInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.QueryPostContent)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_Create_Call) Return(_a0 *sql.LegacyQuery, _a1 error) *MockQueriesLegacyInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesLegacyInterface_Create_Call) RunAndReturn(run func(context.Context, sql.QueryPostContent) (*sql.LegacyQuery, error)) *MockQueriesLegacyInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) Delete(ctx context.Context, request sql.DeleteQueriesLegacyRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteQueriesLegacyRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueriesLegacyInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockQueriesLegacyInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DeleteQueriesLegacyRequest -func (_e *MockQueriesLegacyInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_Delete_Call { - return &MockQueriesLegacyInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteQueriesLegacyRequest)) *MockQueriesLegacyInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DeleteQueriesLegacyRequest)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_Delete_Call) Return(_a0 error) *MockQueriesLegacyInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesLegacyInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteQueriesLegacyRequest) error) *MockQueriesLegacyInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByQueryId provides a mock function with given fields: ctx, queryId -func (_m *MockQueriesLegacyInterface) DeleteByQueryId(ctx context.Context, queryId string) error { - ret := _m.Called(ctx, queryId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByQueryId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, queryId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueriesLegacyInterface_DeleteByQueryId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByQueryId' -type MockQueriesLegacyInterface_DeleteByQueryId_Call struct { - *mock.Call -} - -// DeleteByQueryId is a helper method to define mock.On call -// - ctx context.Context -// - queryId string -func (_e *MockQueriesLegacyInterface_Expecter) DeleteByQueryId(ctx interface{}, queryId interface{}) *MockQueriesLegacyInterface_DeleteByQueryId_Call { - return &MockQueriesLegacyInterface_DeleteByQueryId_Call{Call: _e.mock.On("DeleteByQueryId", ctx, queryId)} -} - -func (_c *MockQueriesLegacyInterface_DeleteByQueryId_Call) Run(run func(ctx context.Context, queryId string)) *MockQueriesLegacyInterface_DeleteByQueryId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_DeleteByQueryId_Call) Return(_a0 error) *MockQueriesLegacyInterface_DeleteByQueryId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesLegacyInterface_DeleteByQueryId_Call) RunAndReturn(run func(context.Context, string) error) *MockQueriesLegacyInterface_DeleteByQueryId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) Get(ctx context.Context, request sql.GetQueriesLegacyRequest) (*sql.LegacyQuery, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sql.LegacyQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetQueriesLegacyRequest) (*sql.LegacyQuery, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetQueriesLegacyRequest) *sql.LegacyQuery); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetQueriesLegacyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesLegacyInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockQueriesLegacyInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetQueriesLegacyRequest -func (_e *MockQueriesLegacyInterface_Expecter) Get(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_Get_Call { - return &MockQueriesLegacyInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetQueriesLegacyRequest)) *MockQueriesLegacyInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetQueriesLegacyRequest)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_Get_Call) Return(_a0 *sql.LegacyQuery, _a1 error) *MockQueriesLegacyInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesLegacyInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetQueriesLegacyRequest) (*sql.LegacyQuery, error)) *MockQueriesLegacyInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockQueriesLegacyInterface) GetByName(ctx context.Context, name string) (*sql.LegacyQuery, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sql.LegacyQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.LegacyQuery, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.LegacyQuery); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesLegacyInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockQueriesLegacyInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockQueriesLegacyInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockQueriesLegacyInterface_GetByName_Call { - return &MockQueriesLegacyInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockQueriesLegacyInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockQueriesLegacyInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_GetByName_Call) Return(_a0 *sql.LegacyQuery, _a1 error) *MockQueriesLegacyInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesLegacyInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sql.LegacyQuery, error)) *MockQueriesLegacyInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetByQueryId provides a mock function with given fields: ctx, queryId -func (_m *MockQueriesLegacyInterface) GetByQueryId(ctx context.Context, queryId string) (*sql.LegacyQuery, error) { - ret := _m.Called(ctx, queryId) - - if len(ret) == 0 { - panic("no return value specified for GetByQueryId") - } - - var r0 *sql.LegacyQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.LegacyQuery, error)); ok { - return rf(ctx, queryId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.LegacyQuery); ok { - r0 = rf(ctx, queryId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, queryId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesLegacyInterface_GetByQueryId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByQueryId' -type MockQueriesLegacyInterface_GetByQueryId_Call struct { - *mock.Call -} - -// GetByQueryId is a helper method to define mock.On call -// - ctx context.Context -// - queryId string -func (_e *MockQueriesLegacyInterface_Expecter) GetByQueryId(ctx interface{}, queryId interface{}) *MockQueriesLegacyInterface_GetByQueryId_Call { - return &MockQueriesLegacyInterface_GetByQueryId_Call{Call: _e.mock.On("GetByQueryId", ctx, queryId)} -} - -func (_c *MockQueriesLegacyInterface_GetByQueryId_Call) Run(run func(ctx context.Context, queryId string)) *MockQueriesLegacyInterface_GetByQueryId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_GetByQueryId_Call) Return(_a0 *sql.LegacyQuery, _a1 error) *MockQueriesLegacyInterface_GetByQueryId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesLegacyInterface_GetByQueryId_Call) RunAndReturn(run func(context.Context, string) (*sql.LegacyQuery, error)) *MockQueriesLegacyInterface_GetByQueryId_Call { - _c.Call.Return(run) - return _c -} - -// LegacyQueryNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) LegacyQueryNameToIdMap(ctx context.Context, request sql.ListQueriesLegacyRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for LegacyQueryNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesLegacyRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesLegacyRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListQueriesLegacyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LegacyQueryNameToIdMap' -type MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call struct { - *mock.Call -} - -// LegacyQueryNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListQueriesLegacyRequest -func (_e *MockQueriesLegacyInterface_Expecter) LegacyQueryNameToIdMap(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call { - return &MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call{Call: _e.mock.On("LegacyQueryNameToIdMap", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call) Run(run func(ctx context.Context, request sql.ListQueriesLegacyRequest)) *MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListQueriesLegacyRequest)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call) RunAndReturn(run func(context.Context, sql.ListQueriesLegacyRequest) (map[string]string, error)) *MockQueriesLegacyInterface_LegacyQueryNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) List(ctx context.Context, request sql.ListQueriesLegacyRequest) listing.Iterator[sql.LegacyQuery] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sql.LegacyQuery] - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesLegacyRequest) listing.Iterator[sql.LegacyQuery]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sql.LegacyQuery]) - } - } - - return r0 -} - -// MockQueriesLegacyInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockQueriesLegacyInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListQueriesLegacyRequest -func (_e *MockQueriesLegacyInterface_Expecter) List(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_List_Call { - return &MockQueriesLegacyInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_List_Call) Run(run func(ctx context.Context, request sql.ListQueriesLegacyRequest)) *MockQueriesLegacyInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListQueriesLegacyRequest)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_List_Call) Return(_a0 listing.Iterator[sql.LegacyQuery]) *MockQueriesLegacyInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesLegacyInterface_List_Call) RunAndReturn(run func(context.Context, sql.ListQueriesLegacyRequest) listing.Iterator[sql.LegacyQuery]) *MockQueriesLegacyInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) ListAll(ctx context.Context, request sql.ListQueriesLegacyRequest) ([]sql.LegacyQuery, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sql.LegacyQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesLegacyRequest) ([]sql.LegacyQuery, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueriesLegacyRequest) []sql.LegacyQuery); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.LegacyQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListQueriesLegacyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesLegacyInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockQueriesLegacyInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListQueriesLegacyRequest -func (_e *MockQueriesLegacyInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_ListAll_Call { - return &MockQueriesLegacyInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_ListAll_Call) Run(run func(ctx context.Context, request sql.ListQueriesLegacyRequest)) *MockQueriesLegacyInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListQueriesLegacyRequest)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_ListAll_Call) Return(_a0 []sql.LegacyQuery, _a1 error) *MockQueriesLegacyInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesLegacyInterface_ListAll_Call) RunAndReturn(run func(context.Context, sql.ListQueriesLegacyRequest) ([]sql.LegacyQuery, error)) *MockQueriesLegacyInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Restore provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) Restore(ctx context.Context, request sql.RestoreQueriesLegacyRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Restore") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.RestoreQueriesLegacyRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueriesLegacyInterface_Restore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restore' -type MockQueriesLegacyInterface_Restore_Call struct { - *mock.Call -} - -// Restore is a helper method to define mock.On call -// - ctx context.Context -// - request sql.RestoreQueriesLegacyRequest -func (_e *MockQueriesLegacyInterface_Expecter) Restore(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_Restore_Call { - return &MockQueriesLegacyInterface_Restore_Call{Call: _e.mock.On("Restore", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_Restore_Call) Run(run func(ctx context.Context, request sql.RestoreQueriesLegacyRequest)) *MockQueriesLegacyInterface_Restore_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.RestoreQueriesLegacyRequest)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_Restore_Call) Return(_a0 error) *MockQueriesLegacyInterface_Restore_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueriesLegacyInterface_Restore_Call) RunAndReturn(run func(context.Context, sql.RestoreQueriesLegacyRequest) error) *MockQueriesLegacyInterface_Restore_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockQueriesLegacyInterface) Update(ctx context.Context, request sql.QueryEditContent) (*sql.LegacyQuery, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sql.LegacyQuery - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.QueryEditContent) (*sql.LegacyQuery, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.QueryEditContent) *sql.LegacyQuery); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyQuery) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.QueryEditContent) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueriesLegacyInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockQueriesLegacyInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.QueryEditContent -func (_e *MockQueriesLegacyInterface_Expecter) Update(ctx interface{}, request interface{}) *MockQueriesLegacyInterface_Update_Call { - return &MockQueriesLegacyInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockQueriesLegacyInterface_Update_Call) Run(run func(ctx context.Context, request sql.QueryEditContent)) *MockQueriesLegacyInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.QueryEditContent)) - }) - return _c -} - -func (_c *MockQueriesLegacyInterface_Update_Call) Return(_a0 *sql.LegacyQuery, _a1 error) *MockQueriesLegacyInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueriesLegacyInterface_Update_Call) RunAndReturn(run func(context.Context, sql.QueryEditContent) (*sql.LegacyQuery, error)) *MockQueriesLegacyInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockQueriesLegacyInterface creates a new instance of MockQueriesLegacyInterface. 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 NewMockQueriesLegacyInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockQueriesLegacyInterface { - mock := &MockQueriesLegacyInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_query_history_interface.go b/experimental/mocks/service/sql/mock_query_history_interface.go deleted file mode 100644 index 2091b7cfe..000000000 --- a/experimental/mocks/service/sql/mock_query_history_interface.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockQueryHistoryInterface is an autogenerated mock type for the QueryHistoryInterface type -type MockQueryHistoryInterface struct { - mock.Mock -} - -type MockQueryHistoryInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockQueryHistoryInterface) EXPECT() *MockQueryHistoryInterface_Expecter { - return &MockQueryHistoryInterface_Expecter{mock: &_m.Mock} -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockQueryHistoryInterface) List(ctx context.Context, request sql.ListQueryHistoryRequest) (*sql.ListQueriesResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 *sql.ListQueriesResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueryHistoryRequest) (*sql.ListQueriesResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListQueryHistoryRequest) *sql.ListQueriesResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.ListQueriesResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListQueryHistoryRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryHistoryInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockQueryHistoryInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListQueryHistoryRequest -func (_e *MockQueryHistoryInterface_Expecter) List(ctx interface{}, request interface{}) *MockQueryHistoryInterface_List_Call { - return &MockQueryHistoryInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockQueryHistoryInterface_List_Call) Run(run func(ctx context.Context, request sql.ListQueryHistoryRequest)) *MockQueryHistoryInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListQueryHistoryRequest)) - }) - return _c -} - -func (_c *MockQueryHistoryInterface_List_Call) Return(_a0 *sql.ListQueriesResponse, _a1 error) *MockQueryHistoryInterface_List_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryHistoryInterface_List_Call) RunAndReturn(run func(context.Context, sql.ListQueryHistoryRequest) (*sql.ListQueriesResponse, error)) *MockQueryHistoryInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// NewMockQueryHistoryInterface creates a new instance of MockQueryHistoryInterface. 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 NewMockQueryHistoryInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockQueryHistoryInterface { - mock := &MockQueryHistoryInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_query_visualizations_interface.go b/experimental/mocks/service/sql/mock_query_visualizations_interface.go deleted file mode 100644 index 267920cb7..000000000 --- a/experimental/mocks/service/sql/mock_query_visualizations_interface.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockQueryVisualizationsInterface is an autogenerated mock type for the QueryVisualizationsInterface type -type MockQueryVisualizationsInterface struct { - mock.Mock -} - -type MockQueryVisualizationsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockQueryVisualizationsInterface) EXPECT() *MockQueryVisualizationsInterface_Expecter { - return &MockQueryVisualizationsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockQueryVisualizationsInterface) Create(ctx context.Context, request sql.CreateVisualizationRequest) (*sql.Visualization, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.Visualization - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateVisualizationRequest) (*sql.Visualization, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateVisualizationRequest) *sql.Visualization); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Visualization) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateVisualizationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryVisualizationsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockQueryVisualizationsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CreateVisualizationRequest -func (_e *MockQueryVisualizationsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockQueryVisualizationsInterface_Create_Call { - return &MockQueryVisualizationsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockQueryVisualizationsInterface_Create_Call) Run(run func(ctx context.Context, request sql.CreateVisualizationRequest)) *MockQueryVisualizationsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateVisualizationRequest)) - }) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Create_Call) Return(_a0 *sql.Visualization, _a1 error) *MockQueryVisualizationsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateVisualizationRequest) (*sql.Visualization, error)) *MockQueryVisualizationsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockQueryVisualizationsInterface) Delete(ctx context.Context, request sql.DeleteVisualizationRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteVisualizationRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueryVisualizationsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockQueryVisualizationsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DeleteVisualizationRequest -func (_e *MockQueryVisualizationsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockQueryVisualizationsInterface_Delete_Call { - return &MockQueryVisualizationsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockQueryVisualizationsInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteVisualizationRequest)) *MockQueryVisualizationsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DeleteVisualizationRequest)) - }) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Delete_Call) Return(_a0 error) *MockQueryVisualizationsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteVisualizationRequest) error) *MockQueryVisualizationsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockQueryVisualizationsInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueryVisualizationsInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockQueryVisualizationsInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockQueryVisualizationsInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockQueryVisualizationsInterface_DeleteById_Call { - return &MockQueryVisualizationsInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockQueryVisualizationsInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockQueryVisualizationsInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueryVisualizationsInterface_DeleteById_Call) Return(_a0 error) *MockQueryVisualizationsInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockQueryVisualizationsInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockQueryVisualizationsInterface) Update(ctx context.Context, request sql.UpdateVisualizationRequest) (*sql.Visualization, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sql.Visualization - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.UpdateVisualizationRequest) (*sql.Visualization, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.UpdateVisualizationRequest) *sql.Visualization); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.Visualization) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.UpdateVisualizationRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryVisualizationsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockQueryVisualizationsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.UpdateVisualizationRequest -func (_e *MockQueryVisualizationsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockQueryVisualizationsInterface_Update_Call { - return &MockQueryVisualizationsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockQueryVisualizationsInterface_Update_Call) Run(run func(ctx context.Context, request sql.UpdateVisualizationRequest)) *MockQueryVisualizationsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.UpdateVisualizationRequest)) - }) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Update_Call) Return(_a0 *sql.Visualization, _a1 error) *MockQueryVisualizationsInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryVisualizationsInterface_Update_Call) RunAndReturn(run func(context.Context, sql.UpdateVisualizationRequest) (*sql.Visualization, error)) *MockQueryVisualizationsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockQueryVisualizationsInterface creates a new instance of MockQueryVisualizationsInterface. 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 NewMockQueryVisualizationsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockQueryVisualizationsInterface { - mock := &MockQueryVisualizationsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go b/experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go deleted file mode 100644 index e303d3fb8..000000000 --- a/experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockQueryVisualizationsLegacyInterface is an autogenerated mock type for the QueryVisualizationsLegacyInterface type -type MockQueryVisualizationsLegacyInterface struct { - mock.Mock -} - -type MockQueryVisualizationsLegacyInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockQueryVisualizationsLegacyInterface) EXPECT() *MockQueryVisualizationsLegacyInterface_Expecter { - return &MockQueryVisualizationsLegacyInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockQueryVisualizationsLegacyInterface) Create(ctx context.Context, request sql.CreateQueryVisualizationsLegacyRequest) (*sql.LegacyVisualization, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.LegacyVisualization - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateQueryVisualizationsLegacyRequest) (*sql.LegacyVisualization, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateQueryVisualizationsLegacyRequest) *sql.LegacyVisualization); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyVisualization) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateQueryVisualizationsLegacyRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryVisualizationsLegacyInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockQueryVisualizationsLegacyInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CreateQueryVisualizationsLegacyRequest -func (_e *MockQueryVisualizationsLegacyInterface_Expecter) Create(ctx interface{}, request interface{}) *MockQueryVisualizationsLegacyInterface_Create_Call { - return &MockQueryVisualizationsLegacyInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockQueryVisualizationsLegacyInterface_Create_Call) Run(run func(ctx context.Context, request sql.CreateQueryVisualizationsLegacyRequest)) *MockQueryVisualizationsLegacyInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateQueryVisualizationsLegacyRequest)) - }) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Create_Call) Return(_a0 *sql.LegacyVisualization, _a1 error) *MockQueryVisualizationsLegacyInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateQueryVisualizationsLegacyRequest) (*sql.LegacyVisualization, error)) *MockQueryVisualizationsLegacyInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockQueryVisualizationsLegacyInterface) Delete(ctx context.Context, request sql.DeleteQueryVisualizationsLegacyRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteQueryVisualizationsLegacyRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueryVisualizationsLegacyInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockQueryVisualizationsLegacyInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DeleteQueryVisualizationsLegacyRequest -func (_e *MockQueryVisualizationsLegacyInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockQueryVisualizationsLegacyInterface_Delete_Call { - return &MockQueryVisualizationsLegacyInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockQueryVisualizationsLegacyInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteQueryVisualizationsLegacyRequest)) *MockQueryVisualizationsLegacyInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DeleteQueryVisualizationsLegacyRequest)) - }) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Delete_Call) Return(_a0 error) *MockQueryVisualizationsLegacyInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteQueryVisualizationsLegacyRequest) error) *MockQueryVisualizationsLegacyInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockQueryVisualizationsLegacyInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockQueryVisualizationsLegacyInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockQueryVisualizationsLegacyInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockQueryVisualizationsLegacyInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockQueryVisualizationsLegacyInterface_DeleteById_Call { - return &MockQueryVisualizationsLegacyInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockQueryVisualizationsLegacyInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockQueryVisualizationsLegacyInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_DeleteById_Call) Return(_a0 error) *MockQueryVisualizationsLegacyInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockQueryVisualizationsLegacyInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockQueryVisualizationsLegacyInterface) Update(ctx context.Context, request sql.LegacyVisualization) (*sql.LegacyVisualization, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 *sql.LegacyVisualization - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.LegacyVisualization) (*sql.LegacyVisualization, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.LegacyVisualization) *sql.LegacyVisualization); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.LegacyVisualization) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.LegacyVisualization) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockQueryVisualizationsLegacyInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockQueryVisualizationsLegacyInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request sql.LegacyVisualization -func (_e *MockQueryVisualizationsLegacyInterface_Expecter) Update(ctx interface{}, request interface{}) *MockQueryVisualizationsLegacyInterface_Update_Call { - return &MockQueryVisualizationsLegacyInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockQueryVisualizationsLegacyInterface_Update_Call) Run(run func(ctx context.Context, request sql.LegacyVisualization)) *MockQueryVisualizationsLegacyInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.LegacyVisualization)) - }) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Update_Call) Return(_a0 *sql.LegacyVisualization, _a1 error) *MockQueryVisualizationsLegacyInterface_Update_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockQueryVisualizationsLegacyInterface_Update_Call) RunAndReturn(run func(context.Context, sql.LegacyVisualization) (*sql.LegacyVisualization, error)) *MockQueryVisualizationsLegacyInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockQueryVisualizationsLegacyInterface creates a new instance of MockQueryVisualizationsLegacyInterface. 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 NewMockQueryVisualizationsLegacyInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockQueryVisualizationsLegacyInterface { - mock := &MockQueryVisualizationsLegacyInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_statement_execution_interface.go b/experimental/mocks/service/sql/mock_statement_execution_interface.go deleted file mode 100644 index 718c6d443..000000000 --- a/experimental/mocks/service/sql/mock_statement_execution_interface.go +++ /dev/null @@ -1,439 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - mock "github.com/stretchr/testify/mock" -) - -// MockStatementExecutionInterface is an autogenerated mock type for the StatementExecutionInterface type -type MockStatementExecutionInterface struct { - mock.Mock -} - -type MockStatementExecutionInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockStatementExecutionInterface) EXPECT() *MockStatementExecutionInterface_Expecter { - return &MockStatementExecutionInterface_Expecter{mock: &_m.Mock} -} - -// CancelExecution provides a mock function with given fields: ctx, request -func (_m *MockStatementExecutionInterface) CancelExecution(ctx context.Context, request sql.CancelExecutionRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CancelExecution") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CancelExecutionRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockStatementExecutionInterface_CancelExecution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelExecution' -type MockStatementExecutionInterface_CancelExecution_Call struct { - *mock.Call -} - -// CancelExecution is a helper method to define mock.On call -// - ctx context.Context -// - request sql.CancelExecutionRequest -func (_e *MockStatementExecutionInterface_Expecter) CancelExecution(ctx interface{}, request interface{}) *MockStatementExecutionInterface_CancelExecution_Call { - return &MockStatementExecutionInterface_CancelExecution_Call{Call: _e.mock.On("CancelExecution", ctx, request)} -} - -func (_c *MockStatementExecutionInterface_CancelExecution_Call) Run(run func(ctx context.Context, request sql.CancelExecutionRequest)) *MockStatementExecutionInterface_CancelExecution_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CancelExecutionRequest)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_CancelExecution_Call) Return(_a0 error) *MockStatementExecutionInterface_CancelExecution_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockStatementExecutionInterface_CancelExecution_Call) RunAndReturn(run func(context.Context, sql.CancelExecutionRequest) error) *MockStatementExecutionInterface_CancelExecution_Call { - _c.Call.Return(run) - return _c -} - -// ExecuteAndWait provides a mock function with given fields: ctx, request -func (_m *MockStatementExecutionInterface) ExecuteAndWait(ctx context.Context, request sql.ExecuteStatementRequest) (*sql.StatementResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExecuteAndWait") - } - - var r0 *sql.StatementResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ExecuteStatementRequest) (*sql.StatementResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ExecuteStatementRequest) *sql.StatementResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.StatementResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ExecuteStatementRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStatementExecutionInterface_ExecuteAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteAndWait' -type MockStatementExecutionInterface_ExecuteAndWait_Call struct { - *mock.Call -} - -// ExecuteAndWait is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ExecuteStatementRequest -func (_e *MockStatementExecutionInterface_Expecter) ExecuteAndWait(ctx interface{}, request interface{}) *MockStatementExecutionInterface_ExecuteAndWait_Call { - return &MockStatementExecutionInterface_ExecuteAndWait_Call{Call: _e.mock.On("ExecuteAndWait", ctx, request)} -} - -func (_c *MockStatementExecutionInterface_ExecuteAndWait_Call) Run(run func(ctx context.Context, request sql.ExecuteStatementRequest)) *MockStatementExecutionInterface_ExecuteAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ExecuteStatementRequest)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_ExecuteAndWait_Call) Return(_a0 *sql.StatementResponse, _a1 error) *MockStatementExecutionInterface_ExecuteAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStatementExecutionInterface_ExecuteAndWait_Call) RunAndReturn(run func(context.Context, sql.ExecuteStatementRequest) (*sql.StatementResponse, error)) *MockStatementExecutionInterface_ExecuteAndWait_Call { - _c.Call.Return(run) - return _c -} - -// ExecuteStatement provides a mock function with given fields: ctx, request -func (_m *MockStatementExecutionInterface) ExecuteStatement(ctx context.Context, request sql.ExecuteStatementRequest) (*sql.StatementResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ExecuteStatement") - } - - var r0 *sql.StatementResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ExecuteStatementRequest) (*sql.StatementResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ExecuteStatementRequest) *sql.StatementResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.StatementResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ExecuteStatementRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStatementExecutionInterface_ExecuteStatement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteStatement' -type MockStatementExecutionInterface_ExecuteStatement_Call struct { - *mock.Call -} - -// ExecuteStatement is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ExecuteStatementRequest -func (_e *MockStatementExecutionInterface_Expecter) ExecuteStatement(ctx interface{}, request interface{}) *MockStatementExecutionInterface_ExecuteStatement_Call { - return &MockStatementExecutionInterface_ExecuteStatement_Call{Call: _e.mock.On("ExecuteStatement", ctx, request)} -} - -func (_c *MockStatementExecutionInterface_ExecuteStatement_Call) Run(run func(ctx context.Context, request sql.ExecuteStatementRequest)) *MockStatementExecutionInterface_ExecuteStatement_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ExecuteStatementRequest)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_ExecuteStatement_Call) Return(_a0 *sql.StatementResponse, _a1 error) *MockStatementExecutionInterface_ExecuteStatement_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStatementExecutionInterface_ExecuteStatement_Call) RunAndReturn(run func(context.Context, sql.ExecuteStatementRequest) (*sql.StatementResponse, error)) *MockStatementExecutionInterface_ExecuteStatement_Call { - _c.Call.Return(run) - return _c -} - -// GetStatement provides a mock function with given fields: ctx, request -func (_m *MockStatementExecutionInterface) GetStatement(ctx context.Context, request sql.GetStatementRequest) (*sql.StatementResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetStatement") - } - - var r0 *sql.StatementResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetStatementRequest) (*sql.StatementResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetStatementRequest) *sql.StatementResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.StatementResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetStatementRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStatementExecutionInterface_GetStatement_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatement' -type MockStatementExecutionInterface_GetStatement_Call struct { - *mock.Call -} - -// GetStatement is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetStatementRequest -func (_e *MockStatementExecutionInterface_Expecter) GetStatement(ctx interface{}, request interface{}) *MockStatementExecutionInterface_GetStatement_Call { - return &MockStatementExecutionInterface_GetStatement_Call{Call: _e.mock.On("GetStatement", ctx, request)} -} - -func (_c *MockStatementExecutionInterface_GetStatement_Call) Run(run func(ctx context.Context, request sql.GetStatementRequest)) *MockStatementExecutionInterface_GetStatement_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetStatementRequest)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatement_Call) Return(_a0 *sql.StatementResponse, _a1 error) *MockStatementExecutionInterface_GetStatement_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatement_Call) RunAndReturn(run func(context.Context, sql.GetStatementRequest) (*sql.StatementResponse, error)) *MockStatementExecutionInterface_GetStatement_Call { - _c.Call.Return(run) - return _c -} - -// GetStatementByStatementId provides a mock function with given fields: ctx, statementId -func (_m *MockStatementExecutionInterface) GetStatementByStatementId(ctx context.Context, statementId string) (*sql.StatementResponse, error) { - ret := _m.Called(ctx, statementId) - - if len(ret) == 0 { - panic("no return value specified for GetStatementByStatementId") - } - - var r0 *sql.StatementResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.StatementResponse, error)); ok { - return rf(ctx, statementId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.StatementResponse); ok { - r0 = rf(ctx, statementId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.StatementResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, statementId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStatementExecutionInterface_GetStatementByStatementId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatementByStatementId' -type MockStatementExecutionInterface_GetStatementByStatementId_Call struct { - *mock.Call -} - -// GetStatementByStatementId is a helper method to define mock.On call -// - ctx context.Context -// - statementId string -func (_e *MockStatementExecutionInterface_Expecter) GetStatementByStatementId(ctx interface{}, statementId interface{}) *MockStatementExecutionInterface_GetStatementByStatementId_Call { - return &MockStatementExecutionInterface_GetStatementByStatementId_Call{Call: _e.mock.On("GetStatementByStatementId", ctx, statementId)} -} - -func (_c *MockStatementExecutionInterface_GetStatementByStatementId_Call) Run(run func(ctx context.Context, statementId string)) *MockStatementExecutionInterface_GetStatementByStatementId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatementByStatementId_Call) Return(_a0 *sql.StatementResponse, _a1 error) *MockStatementExecutionInterface_GetStatementByStatementId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatementByStatementId_Call) RunAndReturn(run func(context.Context, string) (*sql.StatementResponse, error)) *MockStatementExecutionInterface_GetStatementByStatementId_Call { - _c.Call.Return(run) - return _c -} - -// GetStatementResultChunkN provides a mock function with given fields: ctx, request -func (_m *MockStatementExecutionInterface) GetStatementResultChunkN(ctx context.Context, request sql.GetStatementResultChunkNRequest) (*sql.ResultData, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetStatementResultChunkN") - } - - var r0 *sql.ResultData - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetStatementResultChunkNRequest) (*sql.ResultData, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetStatementResultChunkNRequest) *sql.ResultData); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.ResultData) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetStatementResultChunkNRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStatementExecutionInterface_GetStatementResultChunkN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatementResultChunkN' -type MockStatementExecutionInterface_GetStatementResultChunkN_Call struct { - *mock.Call -} - -// GetStatementResultChunkN is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetStatementResultChunkNRequest -func (_e *MockStatementExecutionInterface_Expecter) GetStatementResultChunkN(ctx interface{}, request interface{}) *MockStatementExecutionInterface_GetStatementResultChunkN_Call { - return &MockStatementExecutionInterface_GetStatementResultChunkN_Call{Call: _e.mock.On("GetStatementResultChunkN", ctx, request)} -} - -func (_c *MockStatementExecutionInterface_GetStatementResultChunkN_Call) Run(run func(ctx context.Context, request sql.GetStatementResultChunkNRequest)) *MockStatementExecutionInterface_GetStatementResultChunkN_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetStatementResultChunkNRequest)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatementResultChunkN_Call) Return(_a0 *sql.ResultData, _a1 error) *MockStatementExecutionInterface_GetStatementResultChunkN_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatementResultChunkN_Call) RunAndReturn(run func(context.Context, sql.GetStatementResultChunkNRequest) (*sql.ResultData, error)) *MockStatementExecutionInterface_GetStatementResultChunkN_Call { - _c.Call.Return(run) - return _c -} - -// GetStatementResultChunkNByStatementIdAndChunkIndex provides a mock function with given fields: ctx, statementId, chunkIndex -func (_m *MockStatementExecutionInterface) GetStatementResultChunkNByStatementIdAndChunkIndex(ctx context.Context, statementId string, chunkIndex int) (*sql.ResultData, error) { - ret := _m.Called(ctx, statementId, chunkIndex) - - if len(ret) == 0 { - panic("no return value specified for GetStatementResultChunkNByStatementIdAndChunkIndex") - } - - var r0 *sql.ResultData - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, int) (*sql.ResultData, error)); ok { - return rf(ctx, statementId, chunkIndex) - } - if rf, ok := ret.Get(0).(func(context.Context, string, int) *sql.ResultData); ok { - r0 = rf(ctx, statementId, chunkIndex) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.ResultData) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, int) error); ok { - r1 = rf(ctx, statementId, chunkIndex) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatementResultChunkNByStatementIdAndChunkIndex' -type MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call struct { - *mock.Call -} - -// GetStatementResultChunkNByStatementIdAndChunkIndex is a helper method to define mock.On call -// - ctx context.Context -// - statementId string -// - chunkIndex int -func (_e *MockStatementExecutionInterface_Expecter) GetStatementResultChunkNByStatementIdAndChunkIndex(ctx interface{}, statementId interface{}, chunkIndex interface{}) *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call { - return &MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call{Call: _e.mock.On("GetStatementResultChunkNByStatementIdAndChunkIndex", ctx, statementId, chunkIndex)} -} - -func (_c *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call) Run(run func(ctx context.Context, statementId string, chunkIndex int)) *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(int)) - }) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call) Return(_a0 *sql.ResultData, _a1 error) *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call) RunAndReturn(run func(context.Context, string, int) (*sql.ResultData, error)) *MockStatementExecutionInterface_GetStatementResultChunkNByStatementIdAndChunkIndex_Call { - _c.Call.Return(run) - return _c -} - -// NewMockStatementExecutionInterface creates a new instance of MockStatementExecutionInterface. 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 NewMockStatementExecutionInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockStatementExecutionInterface { - mock := &MockStatementExecutionInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/sql/mock_warehouses_interface.go b/experimental/mocks/service/sql/mock_warehouses_interface.go deleted file mode 100644 index 7db4a09b6..000000000 --- a/experimental/mocks/service/sql/mock_warehouses_interface.go +++ /dev/null @@ -1,1594 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package sql - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - sql "github.com/databricks/databricks-sdk-go/service/sql" - - time "time" -) - -// MockWarehousesInterface is an autogenerated mock type for the WarehousesInterface type -type MockWarehousesInterface struct { - mock.Mock -} - -type MockWarehousesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockWarehousesInterface) EXPECT() *MockWarehousesInterface_Expecter { - return &MockWarehousesInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, createWarehouseRequest -func (_m *MockWarehousesInterface) Create(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest) (*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], error) { - ret := _m.Called(ctx, createWarehouseRequest) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest) (*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], error)); ok { - return rf(ctx, createWarehouseRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest) *sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse]); ok { - r0 = rf(ctx, createWarehouseRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateWarehouseRequest) error); ok { - r1 = rf(ctx, createWarehouseRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockWarehousesInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - createWarehouseRequest sql.CreateWarehouseRequest -func (_e *MockWarehousesInterface_Expecter) Create(ctx interface{}, createWarehouseRequest interface{}) *MockWarehousesInterface_Create_Call { - return &MockWarehousesInterface_Create_Call{Call: _e.mock.On("Create", ctx, createWarehouseRequest)} -} - -func (_c *MockWarehousesInterface_Create_Call) Run(run func(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest)) *MockWarehousesInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.CreateWarehouseRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_Create_Call) Return(_a0 *sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], _a1 error) *MockWarehousesInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_Create_Call) RunAndReturn(run func(context.Context, sql.CreateWarehouseRequest) (*sql.WaitGetWarehouseRunning[sql.CreateWarehouseResponse], error)) *MockWarehousesInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CreateAndWait provides a mock function with given fields: ctx, createWarehouseRequest, options -func (_m *MockWarehousesInterface) CreateAndWait(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createWarehouseRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateAndWait") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, createWarehouseRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, createWarehouseRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) error); ok { - r1 = rf(ctx, createWarehouseRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_CreateAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndWait' -type MockWarehousesInterface_CreateAndWait_Call struct { - *mock.Call -} - -// CreateAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createWarehouseRequest sql.CreateWarehouseRequest -// - options ...retries.Option[sql.GetWarehouseResponse] -func (_e *MockWarehousesInterface_Expecter) CreateAndWait(ctx interface{}, createWarehouseRequest interface{}, options ...interface{}) *MockWarehousesInterface_CreateAndWait_Call { - return &MockWarehousesInterface_CreateAndWait_Call{Call: _e.mock.On("CreateAndWait", - append([]interface{}{ctx, createWarehouseRequest}, options...)...)} -} - -func (_c *MockWarehousesInterface_CreateAndWait_Call) Run(run func(ctx context.Context, createWarehouseRequest sql.CreateWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse])) *MockWarehousesInterface_CreateAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[sql.GetWarehouseResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[sql.GetWarehouseResponse]) - } - } - run(args[0].(context.Context), args[1].(sql.CreateWarehouseRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockWarehousesInterface_CreateAndWait_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_CreateAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_CreateAndWait_Call) RunAndReturn(run func(context.Context, sql.CreateWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_CreateAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) Delete(ctx context.Context, request sql.DeleteWarehouseRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.DeleteWarehouseRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWarehousesInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockWarehousesInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request sql.DeleteWarehouseRequest -func (_e *MockWarehousesInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockWarehousesInterface_Delete_Call { - return &MockWarehousesInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockWarehousesInterface_Delete_Call) Run(run func(ctx context.Context, request sql.DeleteWarehouseRequest)) *MockWarehousesInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.DeleteWarehouseRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_Delete_Call) Return(_a0 error) *MockWarehousesInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWarehousesInterface_Delete_Call) RunAndReturn(run func(context.Context, sql.DeleteWarehouseRequest) error) *MockWarehousesInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteById provides a mock function with given fields: ctx, id -func (_m *MockWarehousesInterface) DeleteById(ctx context.Context, id string) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteById") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWarehousesInterface_DeleteById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteById' -type MockWarehousesInterface_DeleteById_Call struct { - *mock.Call -} - -// DeleteById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockWarehousesInterface_Expecter) DeleteById(ctx interface{}, id interface{}) *MockWarehousesInterface_DeleteById_Call { - return &MockWarehousesInterface_DeleteById_Call{Call: _e.mock.On("DeleteById", ctx, id)} -} - -func (_c *MockWarehousesInterface_DeleteById_Call) Run(run func(ctx context.Context, id string)) *MockWarehousesInterface_DeleteById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWarehousesInterface_DeleteById_Call) Return(_a0 error) *MockWarehousesInterface_DeleteById_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWarehousesInterface_DeleteById_Call) RunAndReturn(run func(context.Context, string) error) *MockWarehousesInterface_DeleteById_Call { - _c.Call.Return(run) - return _c -} - -// Edit provides a mock function with given fields: ctx, editWarehouseRequest -func (_m *MockWarehousesInterface) Edit(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest) (*sql.WaitGetWarehouseRunning[struct{}], error) { - ret := _m.Called(ctx, editWarehouseRequest) - - if len(ret) == 0 { - panic("no return value specified for Edit") - } - - var r0 *sql.WaitGetWarehouseRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest) (*sql.WaitGetWarehouseRunning[struct{}], error)); ok { - return rf(ctx, editWarehouseRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest) *sql.WaitGetWarehouseRunning[struct{}]); ok { - r0 = rf(ctx, editWarehouseRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WaitGetWarehouseRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.EditWarehouseRequest) error); ok { - r1 = rf(ctx, editWarehouseRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_Edit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Edit' -type MockWarehousesInterface_Edit_Call struct { - *mock.Call -} - -// Edit is a helper method to define mock.On call -// - ctx context.Context -// - editWarehouseRequest sql.EditWarehouseRequest -func (_e *MockWarehousesInterface_Expecter) Edit(ctx interface{}, editWarehouseRequest interface{}) *MockWarehousesInterface_Edit_Call { - return &MockWarehousesInterface_Edit_Call{Call: _e.mock.On("Edit", ctx, editWarehouseRequest)} -} - -func (_c *MockWarehousesInterface_Edit_Call) Run(run func(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest)) *MockWarehousesInterface_Edit_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.EditWarehouseRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_Edit_Call) Return(_a0 *sql.WaitGetWarehouseRunning[struct{}], _a1 error) *MockWarehousesInterface_Edit_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_Edit_Call) RunAndReturn(run func(context.Context, sql.EditWarehouseRequest) (*sql.WaitGetWarehouseRunning[struct{}], error)) *MockWarehousesInterface_Edit_Call { - _c.Call.Return(run) - return _c -} - -// EditAndWait provides a mock function with given fields: ctx, editWarehouseRequest, options -func (_m *MockWarehousesInterface) EditAndWait(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, editWarehouseRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for EditAndWait") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, editWarehouseRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, editWarehouseRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) error); ok { - r1 = rf(ctx, editWarehouseRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_EditAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EditAndWait' -type MockWarehousesInterface_EditAndWait_Call struct { - *mock.Call -} - -// EditAndWait is a helper method to define mock.On call -// - ctx context.Context -// - editWarehouseRequest sql.EditWarehouseRequest -// - options ...retries.Option[sql.GetWarehouseResponse] -func (_e *MockWarehousesInterface_Expecter) EditAndWait(ctx interface{}, editWarehouseRequest interface{}, options ...interface{}) *MockWarehousesInterface_EditAndWait_Call { - return &MockWarehousesInterface_EditAndWait_Call{Call: _e.mock.On("EditAndWait", - append([]interface{}{ctx, editWarehouseRequest}, options...)...)} -} - -func (_c *MockWarehousesInterface_EditAndWait_Call) Run(run func(ctx context.Context, editWarehouseRequest sql.EditWarehouseRequest, options ...retries.Option[sql.GetWarehouseResponse])) *MockWarehousesInterface_EditAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[sql.GetWarehouseResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[sql.GetWarehouseResponse]) - } - } - run(args[0].(context.Context), args[1].(sql.EditWarehouseRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockWarehousesInterface_EditAndWait_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_EditAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_EditAndWait_Call) RunAndReturn(run func(context.Context, sql.EditWarehouseRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_EditAndWait_Call { - _c.Call.Return(run) - return _c -} - -// EndpointInfoNameToIdMap provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) EndpointInfoNameToIdMap(ctx context.Context, request sql.ListWarehousesRequest) (map[string]string, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for EndpointInfoNameToIdMap") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) (map[string]string, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) map[string]string); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListWarehousesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_EndpointInfoNameToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EndpointInfoNameToIdMap' -type MockWarehousesInterface_EndpointInfoNameToIdMap_Call struct { - *mock.Call -} - -// EndpointInfoNameToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListWarehousesRequest -func (_e *MockWarehousesInterface_Expecter) EndpointInfoNameToIdMap(ctx interface{}, request interface{}) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call { - return &MockWarehousesInterface_EndpointInfoNameToIdMap_Call{Call: _e.mock.On("EndpointInfoNameToIdMap", ctx, request)} -} - -func (_c *MockWarehousesInterface_EndpointInfoNameToIdMap_Call) Run(run func(ctx context.Context, request sql.ListWarehousesRequest)) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListWarehousesRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_EndpointInfoNameToIdMap_Call) Return(_a0 map[string]string, _a1 error) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_EndpointInfoNameToIdMap_Call) RunAndReturn(run func(context.Context, sql.ListWarehousesRequest) (map[string]string, error)) *MockWarehousesInterface_EndpointInfoNameToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) Get(ctx context.Context, request sql.GetWarehouseRequest) (*sql.GetWarehouseResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehouseRequest) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehouseRequest) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetWarehouseRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockWarehousesInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetWarehouseRequest -func (_e *MockWarehousesInterface_Expecter) Get(ctx interface{}, request interface{}) *MockWarehousesInterface_Get_Call { - return &MockWarehousesInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockWarehousesInterface_Get_Call) Run(run func(ctx context.Context, request sql.GetWarehouseRequest)) *MockWarehousesInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetWarehouseRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_Get_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_Get_Call) RunAndReturn(run func(context.Context, sql.GetWarehouseRequest) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetById provides a mock function with given fields: ctx, id -func (_m *MockWarehousesInterface) GetById(ctx context.Context, id string) (*sql.GetWarehouseResponse, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetById") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_GetById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetById' -type MockWarehousesInterface_GetById_Call struct { - *mock.Call -} - -// GetById is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *MockWarehousesInterface_Expecter) GetById(ctx interface{}, id interface{}) *MockWarehousesInterface_GetById_Call { - return &MockWarehousesInterface_GetById_Call{Call: _e.mock.On("GetById", ctx, id)} -} - -func (_c *MockWarehousesInterface_GetById_Call) Run(run func(ctx context.Context, id string)) *MockWarehousesInterface_GetById_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWarehousesInterface_GetById_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_GetById_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_GetById_Call) RunAndReturn(run func(context.Context, string) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_GetById_Call { - _c.Call.Return(run) - return _c -} - -// GetByName provides a mock function with given fields: ctx, name -func (_m *MockWarehousesInterface) GetByName(ctx context.Context, name string) (*sql.EndpointInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByName") - } - - var r0 *sql.EndpointInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.EndpointInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.EndpointInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.EndpointInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_GetByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByName' -type MockWarehousesInterface_GetByName_Call struct { - *mock.Call -} - -// GetByName is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockWarehousesInterface_Expecter) GetByName(ctx interface{}, name interface{}) *MockWarehousesInterface_GetByName_Call { - return &MockWarehousesInterface_GetByName_Call{Call: _e.mock.On("GetByName", ctx, name)} -} - -func (_c *MockWarehousesInterface_GetByName_Call) Run(run func(ctx context.Context, name string)) *MockWarehousesInterface_GetByName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWarehousesInterface_GetByName_Call) Return(_a0 *sql.EndpointInfo, _a1 error) *MockWarehousesInterface_GetByName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_GetByName_Call) RunAndReturn(run func(context.Context, string) (*sql.EndpointInfo, error)) *MockWarehousesInterface_GetByName_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) GetPermissionLevels(ctx context.Context, request sql.GetWarehousePermissionLevelsRequest) (*sql.GetWarehousePermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *sql.GetWarehousePermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionLevelsRequest) (*sql.GetWarehousePermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionLevelsRequest) *sql.GetWarehousePermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehousePermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetWarehousePermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockWarehousesInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetWarehousePermissionLevelsRequest -func (_e *MockWarehousesInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockWarehousesInterface_GetPermissionLevels_Call { - return &MockWarehousesInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockWarehousesInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request sql.GetWarehousePermissionLevelsRequest)) *MockWarehousesInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetWarehousePermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissionLevels_Call) Return(_a0 *sql.GetWarehousePermissionLevelsResponse, _a1 error) *MockWarehousesInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, sql.GetWarehousePermissionLevelsRequest) (*sql.GetWarehousePermissionLevelsResponse, error)) *MockWarehousesInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByWarehouseId provides a mock function with given fields: ctx, warehouseId -func (_m *MockWarehousesInterface) GetPermissionLevelsByWarehouseId(ctx context.Context, warehouseId string) (*sql.GetWarehousePermissionLevelsResponse, error) { - ret := _m.Called(ctx, warehouseId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByWarehouseId") - } - - var r0 *sql.GetWarehousePermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.GetWarehousePermissionLevelsResponse, error)); ok { - return rf(ctx, warehouseId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.GetWarehousePermissionLevelsResponse); ok { - r0 = rf(ctx, warehouseId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehousePermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, warehouseId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByWarehouseId' -type MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByWarehouseId is a helper method to define mock.On call -// - ctx context.Context -// - warehouseId string -func (_e *MockWarehousesInterface_Expecter) GetPermissionLevelsByWarehouseId(ctx interface{}, warehouseId interface{}) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call { - return &MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call{Call: _e.mock.On("GetPermissionLevelsByWarehouseId", ctx, warehouseId)} -} - -func (_c *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call) Run(run func(ctx context.Context, warehouseId string)) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call) Return(_a0 *sql.GetWarehousePermissionLevelsResponse, _a1 error) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call) RunAndReturn(run func(context.Context, string) (*sql.GetWarehousePermissionLevelsResponse, error)) *MockWarehousesInterface_GetPermissionLevelsByWarehouseId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) GetPermissions(ctx context.Context, request sql.GetWarehousePermissionsRequest) (*sql.WarehousePermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *sql.WarehousePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionsRequest) (*sql.WarehousePermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.GetWarehousePermissionsRequest) *sql.WarehousePermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WarehousePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.GetWarehousePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockWarehousesInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request sql.GetWarehousePermissionsRequest -func (_e *MockWarehousesInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockWarehousesInterface_GetPermissions_Call { - return &MockWarehousesInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockWarehousesInterface_GetPermissions_Call) Run(run func(ctx context.Context, request sql.GetWarehousePermissionsRequest)) *MockWarehousesInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.GetWarehousePermissionsRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissions_Call) Return(_a0 *sql.WarehousePermissions, _a1 error) *MockWarehousesInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, sql.GetWarehousePermissionsRequest) (*sql.WarehousePermissions, error)) *MockWarehousesInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByWarehouseId provides a mock function with given fields: ctx, warehouseId -func (_m *MockWarehousesInterface) GetPermissionsByWarehouseId(ctx context.Context, warehouseId string) (*sql.WarehousePermissions, error) { - ret := _m.Called(ctx, warehouseId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByWarehouseId") - } - - var r0 *sql.WarehousePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*sql.WarehousePermissions, error)); ok { - return rf(ctx, warehouseId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *sql.WarehousePermissions); ok { - r0 = rf(ctx, warehouseId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WarehousePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, warehouseId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_GetPermissionsByWarehouseId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByWarehouseId' -type MockWarehousesInterface_GetPermissionsByWarehouseId_Call struct { - *mock.Call -} - -// GetPermissionsByWarehouseId is a helper method to define mock.On call -// - ctx context.Context -// - warehouseId string -func (_e *MockWarehousesInterface_Expecter) GetPermissionsByWarehouseId(ctx interface{}, warehouseId interface{}) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call { - return &MockWarehousesInterface_GetPermissionsByWarehouseId_Call{Call: _e.mock.On("GetPermissionsByWarehouseId", ctx, warehouseId)} -} - -func (_c *MockWarehousesInterface_GetPermissionsByWarehouseId_Call) Run(run func(ctx context.Context, warehouseId string)) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissionsByWarehouseId_Call) Return(_a0 *sql.WarehousePermissions, _a1 error) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_GetPermissionsByWarehouseId_Call) RunAndReturn(run func(context.Context, string) (*sql.WarehousePermissions, error)) *MockWarehousesInterface_GetPermissionsByWarehouseId_Call { - _c.Call.Return(run) - return _c -} - -// GetWorkspaceWarehouseConfig provides a mock function with given fields: ctx -func (_m *MockWarehousesInterface) GetWorkspaceWarehouseConfig(ctx context.Context) (*sql.GetWorkspaceWarehouseConfigResponse, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetWorkspaceWarehouseConfig") - } - - var r0 *sql.GetWorkspaceWarehouseConfigResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*sql.GetWorkspaceWarehouseConfigResponse, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *sql.GetWorkspaceWarehouseConfigResponse); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWorkspaceWarehouseConfigResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWorkspaceWarehouseConfig' -type MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call struct { - *mock.Call -} - -// GetWorkspaceWarehouseConfig is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockWarehousesInterface_Expecter) GetWorkspaceWarehouseConfig(ctx interface{}) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call { - return &MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call{Call: _e.mock.On("GetWorkspaceWarehouseConfig", ctx)} -} - -func (_c *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call) Run(run func(ctx context.Context)) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call) Return(_a0 *sql.GetWorkspaceWarehouseConfigResponse, _a1 error) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call) RunAndReturn(run func(context.Context) (*sql.GetWorkspaceWarehouseConfigResponse, error)) *MockWarehousesInterface_GetWorkspaceWarehouseConfig_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) List(ctx context.Context, request sql.ListWarehousesRequest) listing.Iterator[sql.EndpointInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[sql.EndpointInfo] - if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) listing.Iterator[sql.EndpointInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[sql.EndpointInfo]) - } - } - - return r0 -} - -// MockWarehousesInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockWarehousesInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListWarehousesRequest -func (_e *MockWarehousesInterface_Expecter) List(ctx interface{}, request interface{}) *MockWarehousesInterface_List_Call { - return &MockWarehousesInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockWarehousesInterface_List_Call) Run(run func(ctx context.Context, request sql.ListWarehousesRequest)) *MockWarehousesInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListWarehousesRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_List_Call) Return(_a0 listing.Iterator[sql.EndpointInfo]) *MockWarehousesInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWarehousesInterface_List_Call) RunAndReturn(run func(context.Context, sql.ListWarehousesRequest) listing.Iterator[sql.EndpointInfo]) *MockWarehousesInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) ListAll(ctx context.Context, request sql.ListWarehousesRequest) ([]sql.EndpointInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []sql.EndpointInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) ([]sql.EndpointInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.ListWarehousesRequest) []sql.EndpointInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]sql.EndpointInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.ListWarehousesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockWarehousesInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request sql.ListWarehousesRequest -func (_e *MockWarehousesInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockWarehousesInterface_ListAll_Call { - return &MockWarehousesInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockWarehousesInterface_ListAll_Call) Run(run func(ctx context.Context, request sql.ListWarehousesRequest)) *MockWarehousesInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.ListWarehousesRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_ListAll_Call) Return(_a0 []sql.EndpointInfo, _a1 error) *MockWarehousesInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_ListAll_Call) RunAndReturn(run func(context.Context, sql.ListWarehousesRequest) ([]sql.EndpointInfo, error)) *MockWarehousesInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) SetPermissions(ctx context.Context, request sql.WarehousePermissionsRequest) (*sql.WarehousePermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *sql.WarehousePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.WarehousePermissionsRequest) (*sql.WarehousePermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.WarehousePermissionsRequest) *sql.WarehousePermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WarehousePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.WarehousePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockWarehousesInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request sql.WarehousePermissionsRequest -func (_e *MockWarehousesInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockWarehousesInterface_SetPermissions_Call { - return &MockWarehousesInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockWarehousesInterface_SetPermissions_Call) Run(run func(ctx context.Context, request sql.WarehousePermissionsRequest)) *MockWarehousesInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.WarehousePermissionsRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_SetPermissions_Call) Return(_a0 *sql.WarehousePermissions, _a1 error) *MockWarehousesInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, sql.WarehousePermissionsRequest) (*sql.WarehousePermissions, error)) *MockWarehousesInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// SetWorkspaceWarehouseConfig provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) SetWorkspaceWarehouseConfig(ctx context.Context, request sql.SetWorkspaceWarehouseConfigRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetWorkspaceWarehouseConfig") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, sql.SetWorkspaceWarehouseConfigRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWorkspaceWarehouseConfig' -type MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call struct { - *mock.Call -} - -// SetWorkspaceWarehouseConfig is a helper method to define mock.On call -// - ctx context.Context -// - request sql.SetWorkspaceWarehouseConfigRequest -func (_e *MockWarehousesInterface_Expecter) SetWorkspaceWarehouseConfig(ctx interface{}, request interface{}) *MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call { - return &MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call{Call: _e.mock.On("SetWorkspaceWarehouseConfig", ctx, request)} -} - -func (_c *MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call) Run(run func(ctx context.Context, request sql.SetWorkspaceWarehouseConfigRequest)) *MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.SetWorkspaceWarehouseConfigRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call) Return(_a0 error) *MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call) RunAndReturn(run func(context.Context, sql.SetWorkspaceWarehouseConfigRequest) error) *MockWarehousesInterface_SetWorkspaceWarehouseConfig_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: ctx, startRequest -func (_m *MockWarehousesInterface) Start(ctx context.Context, startRequest sql.StartRequest) (*sql.WaitGetWarehouseRunning[struct{}], error) { - ret := _m.Called(ctx, startRequest) - - if len(ret) == 0 { - panic("no return value specified for Start") - } - - var r0 *sql.WaitGetWarehouseRunning[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.StartRequest) (*sql.WaitGetWarehouseRunning[struct{}], error)); ok { - return rf(ctx, startRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.StartRequest) *sql.WaitGetWarehouseRunning[struct{}]); ok { - r0 = rf(ctx, startRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WaitGetWarehouseRunning[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.StartRequest) error); ok { - r1 = rf(ctx, startRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type MockWarehousesInterface_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - ctx context.Context -// - startRequest sql.StartRequest -func (_e *MockWarehousesInterface_Expecter) Start(ctx interface{}, startRequest interface{}) *MockWarehousesInterface_Start_Call { - return &MockWarehousesInterface_Start_Call{Call: _e.mock.On("Start", ctx, startRequest)} -} - -func (_c *MockWarehousesInterface_Start_Call) Run(run func(ctx context.Context, startRequest sql.StartRequest)) *MockWarehousesInterface_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.StartRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_Start_Call) Return(_a0 *sql.WaitGetWarehouseRunning[struct{}], _a1 error) *MockWarehousesInterface_Start_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_Start_Call) RunAndReturn(run func(context.Context, sql.StartRequest) (*sql.WaitGetWarehouseRunning[struct{}], error)) *MockWarehousesInterface_Start_Call { - _c.Call.Return(run) - return _c -} - -// StartAndWait provides a mock function with given fields: ctx, startRequest, options -func (_m *MockWarehousesInterface) StartAndWait(ctx context.Context, startRequest sql.StartRequest, options ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, startRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StartAndWait") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.StartRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, startRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.StartRequest, ...retries.Option[sql.GetWarehouseResponse]) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, startRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.StartRequest, ...retries.Option[sql.GetWarehouseResponse]) error); ok { - r1 = rf(ctx, startRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_StartAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartAndWait' -type MockWarehousesInterface_StartAndWait_Call struct { - *mock.Call -} - -// StartAndWait is a helper method to define mock.On call -// - ctx context.Context -// - startRequest sql.StartRequest -// - options ...retries.Option[sql.GetWarehouseResponse] -func (_e *MockWarehousesInterface_Expecter) StartAndWait(ctx interface{}, startRequest interface{}, options ...interface{}) *MockWarehousesInterface_StartAndWait_Call { - return &MockWarehousesInterface_StartAndWait_Call{Call: _e.mock.On("StartAndWait", - append([]interface{}{ctx, startRequest}, options...)...)} -} - -func (_c *MockWarehousesInterface_StartAndWait_Call) Run(run func(ctx context.Context, startRequest sql.StartRequest, options ...retries.Option[sql.GetWarehouseResponse])) *MockWarehousesInterface_StartAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[sql.GetWarehouseResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[sql.GetWarehouseResponse]) - } - } - run(args[0].(context.Context), args[1].(sql.StartRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockWarehousesInterface_StartAndWait_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_StartAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_StartAndWait_Call) RunAndReturn(run func(context.Context, sql.StartRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_StartAndWait_Call { - _c.Call.Return(run) - return _c -} - -// Stop provides a mock function with given fields: ctx, stopRequest -func (_m *MockWarehousesInterface) Stop(ctx context.Context, stopRequest sql.StopRequest) (*sql.WaitGetWarehouseStopped[struct{}], error) { - ret := _m.Called(ctx, stopRequest) - - if len(ret) == 0 { - panic("no return value specified for Stop") - } - - var r0 *sql.WaitGetWarehouseStopped[struct{}] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.StopRequest) (*sql.WaitGetWarehouseStopped[struct{}], error)); ok { - return rf(ctx, stopRequest) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.StopRequest) *sql.WaitGetWarehouseStopped[struct{}]); ok { - r0 = rf(ctx, stopRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WaitGetWarehouseStopped[struct{}]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.StopRequest) error); ok { - r1 = rf(ctx, stopRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' -type MockWarehousesInterface_Stop_Call struct { - *mock.Call -} - -// Stop is a helper method to define mock.On call -// - ctx context.Context -// - stopRequest sql.StopRequest -func (_e *MockWarehousesInterface_Expecter) Stop(ctx interface{}, stopRequest interface{}) *MockWarehousesInterface_Stop_Call { - return &MockWarehousesInterface_Stop_Call{Call: _e.mock.On("Stop", ctx, stopRequest)} -} - -func (_c *MockWarehousesInterface_Stop_Call) Run(run func(ctx context.Context, stopRequest sql.StopRequest)) *MockWarehousesInterface_Stop_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.StopRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_Stop_Call) Return(_a0 *sql.WaitGetWarehouseStopped[struct{}], _a1 error) *MockWarehousesInterface_Stop_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_Stop_Call) RunAndReturn(run func(context.Context, sql.StopRequest) (*sql.WaitGetWarehouseStopped[struct{}], error)) *MockWarehousesInterface_Stop_Call { - _c.Call.Return(run) - return _c -} - -// StopAndWait provides a mock function with given fields: ctx, stopRequest, options -func (_m *MockWarehousesInterface) StopAndWait(ctx context.Context, stopRequest sql.StopRequest, options ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, stopRequest) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for StopAndWait") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.StopRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, stopRequest, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.StopRequest, ...retries.Option[sql.GetWarehouseResponse]) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, stopRequest, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.StopRequest, ...retries.Option[sql.GetWarehouseResponse]) error); ok { - r1 = rf(ctx, stopRequest, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_StopAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopAndWait' -type MockWarehousesInterface_StopAndWait_Call struct { - *mock.Call -} - -// StopAndWait is a helper method to define mock.On call -// - ctx context.Context -// - stopRequest sql.StopRequest -// - options ...retries.Option[sql.GetWarehouseResponse] -func (_e *MockWarehousesInterface_Expecter) StopAndWait(ctx interface{}, stopRequest interface{}, options ...interface{}) *MockWarehousesInterface_StopAndWait_Call { - return &MockWarehousesInterface_StopAndWait_Call{Call: _e.mock.On("StopAndWait", - append([]interface{}{ctx, stopRequest}, options...)...)} -} - -func (_c *MockWarehousesInterface_StopAndWait_Call) Run(run func(ctx context.Context, stopRequest sql.StopRequest, options ...retries.Option[sql.GetWarehouseResponse])) *MockWarehousesInterface_StopAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[sql.GetWarehouseResponse], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[sql.GetWarehouseResponse]) - } - } - run(args[0].(context.Context), args[1].(sql.StopRequest), variadicArgs...) - }) - return _c -} - -func (_c *MockWarehousesInterface_StopAndWait_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_StopAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_StopAndWait_Call) RunAndReturn(run func(context.Context, sql.StopRequest, ...retries.Option[sql.GetWarehouseResponse]) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_StopAndWait_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockWarehousesInterface) UpdatePermissions(ctx context.Context, request sql.WarehousePermissionsRequest) (*sql.WarehousePermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *sql.WarehousePermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, sql.WarehousePermissionsRequest) (*sql.WarehousePermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, sql.WarehousePermissionsRequest) *sql.WarehousePermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.WarehousePermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, sql.WarehousePermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockWarehousesInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request sql.WarehousePermissionsRequest -func (_e *MockWarehousesInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockWarehousesInterface_UpdatePermissions_Call { - return &MockWarehousesInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockWarehousesInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request sql.WarehousePermissionsRequest)) *MockWarehousesInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(sql.WarehousePermissionsRequest)) - }) - return _c -} - -func (_c *MockWarehousesInterface_UpdatePermissions_Call) Return(_a0 *sql.WarehousePermissions, _a1 error) *MockWarehousesInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, sql.WarehousePermissionsRequest) (*sql.WarehousePermissions, error)) *MockWarehousesInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetWarehouseRunning provides a mock function with given fields: ctx, id, timeout, callback -func (_m *MockWarehousesInterface) WaitGetWarehouseRunning(ctx context.Context, id string, timeout time.Duration, callback func(*sql.GetWarehouseResponse)) (*sql.GetWarehouseResponse, error) { - ret := _m.Called(ctx, id, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetWarehouseRunning") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, id, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, id, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) error); ok { - r1 = rf(ctx, id, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_WaitGetWarehouseRunning_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetWarehouseRunning' -type MockWarehousesInterface_WaitGetWarehouseRunning_Call struct { - *mock.Call -} - -// WaitGetWarehouseRunning is a helper method to define mock.On call -// - ctx context.Context -// - id string -// - timeout time.Duration -// - callback func(*sql.GetWarehouseResponse) -func (_e *MockWarehousesInterface_Expecter) WaitGetWarehouseRunning(ctx interface{}, id interface{}, timeout interface{}, callback interface{}) *MockWarehousesInterface_WaitGetWarehouseRunning_Call { - return &MockWarehousesInterface_WaitGetWarehouseRunning_Call{Call: _e.mock.On("WaitGetWarehouseRunning", ctx, id, timeout, callback)} -} - -func (_c *MockWarehousesInterface_WaitGetWarehouseRunning_Call) Run(run func(ctx context.Context, id string, timeout time.Duration, callback func(*sql.GetWarehouseResponse))) *MockWarehousesInterface_WaitGetWarehouseRunning_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*sql.GetWarehouseResponse))) - }) - return _c -} - -func (_c *MockWarehousesInterface_WaitGetWarehouseRunning_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_WaitGetWarehouseRunning_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_WaitGetWarehouseRunning_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_WaitGetWarehouseRunning_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetWarehouseStopped provides a mock function with given fields: ctx, id, timeout, callback -func (_m *MockWarehousesInterface) WaitGetWarehouseStopped(ctx context.Context, id string, timeout time.Duration, callback func(*sql.GetWarehouseResponse)) (*sql.GetWarehouseResponse, error) { - ret := _m.Called(ctx, id, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetWarehouseStopped") - } - - var r0 *sql.GetWarehouseResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) (*sql.GetWarehouseResponse, error)); ok { - return rf(ctx, id, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) *sql.GetWarehouseResponse); ok { - r0 = rf(ctx, id, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*sql.GetWarehouseResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) error); ok { - r1 = rf(ctx, id, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWarehousesInterface_WaitGetWarehouseStopped_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetWarehouseStopped' -type MockWarehousesInterface_WaitGetWarehouseStopped_Call struct { - *mock.Call -} - -// WaitGetWarehouseStopped is a helper method to define mock.On call -// - ctx context.Context -// - id string -// - timeout time.Duration -// - callback func(*sql.GetWarehouseResponse) -func (_e *MockWarehousesInterface_Expecter) WaitGetWarehouseStopped(ctx interface{}, id interface{}, timeout interface{}, callback interface{}) *MockWarehousesInterface_WaitGetWarehouseStopped_Call { - return &MockWarehousesInterface_WaitGetWarehouseStopped_Call{Call: _e.mock.On("WaitGetWarehouseStopped", ctx, id, timeout, callback)} -} - -func (_c *MockWarehousesInterface_WaitGetWarehouseStopped_Call) Run(run func(ctx context.Context, id string, timeout time.Duration, callback func(*sql.GetWarehouseResponse))) *MockWarehousesInterface_WaitGetWarehouseStopped_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*sql.GetWarehouseResponse))) - }) - return _c -} - -func (_c *MockWarehousesInterface_WaitGetWarehouseStopped_Call) Return(_a0 *sql.GetWarehouseResponse, _a1 error) *MockWarehousesInterface_WaitGetWarehouseStopped_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWarehousesInterface_WaitGetWarehouseStopped_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*sql.GetWarehouseResponse)) (*sql.GetWarehouseResponse, error)) *MockWarehousesInterface_WaitGetWarehouseStopped_Call { - _c.Call.Return(run) - return _c -} - -// NewMockWarehousesInterface creates a new instance of MockWarehousesInterface. 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 NewMockWarehousesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWarehousesInterface { - mock := &MockWarehousesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go b/experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go deleted file mode 100644 index bac669a1c..000000000 --- a/experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go +++ /dev/null @@ -1,557 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package vectorsearch - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - retries "github.com/databricks/databricks-sdk-go/retries" - - time "time" - - vectorsearch "github.com/databricks/databricks-sdk-go/service/vectorsearch" -) - -// MockVectorSearchEndpointsInterface is an autogenerated mock type for the VectorSearchEndpointsInterface type -type MockVectorSearchEndpointsInterface struct { - mock.Mock -} - -type MockVectorSearchEndpointsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockVectorSearchEndpointsInterface) EXPECT() *MockVectorSearchEndpointsInterface_Expecter { - return &MockVectorSearchEndpointsInterface_Expecter{mock: &_m.Mock} -} - -// CreateEndpoint provides a mock function with given fields: ctx, createEndpoint -func (_m *MockVectorSearchEndpointsInterface) CreateEndpoint(ctx context.Context, createEndpoint vectorsearch.CreateEndpoint) (*vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo], error) { - ret := _m.Called(ctx, createEndpoint) - - if len(ret) == 0 { - panic("no return value specified for CreateEndpoint") - } - - var r0 *vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo] - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.CreateEndpoint) (*vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo], error)); ok { - return rf(ctx, createEndpoint) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.CreateEndpoint) *vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo]); ok { - r0 = rf(ctx, createEndpoint) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo]) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.CreateEndpoint) error); ok { - r1 = rf(ctx, createEndpoint) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchEndpointsInterface_CreateEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateEndpoint' -type MockVectorSearchEndpointsInterface_CreateEndpoint_Call struct { - *mock.Call -} - -// CreateEndpoint is a helper method to define mock.On call -// - ctx context.Context -// - createEndpoint vectorsearch.CreateEndpoint -func (_e *MockVectorSearchEndpointsInterface_Expecter) CreateEndpoint(ctx interface{}, createEndpoint interface{}) *MockVectorSearchEndpointsInterface_CreateEndpoint_Call { - return &MockVectorSearchEndpointsInterface_CreateEndpoint_Call{Call: _e.mock.On("CreateEndpoint", ctx, createEndpoint)} -} - -func (_c *MockVectorSearchEndpointsInterface_CreateEndpoint_Call) Run(run func(ctx context.Context, createEndpoint vectorsearch.CreateEndpoint)) *MockVectorSearchEndpointsInterface_CreateEndpoint_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.CreateEndpoint)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_CreateEndpoint_Call) Return(_a0 *vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo], _a1 error) *MockVectorSearchEndpointsInterface_CreateEndpoint_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_CreateEndpoint_Call) RunAndReturn(run func(context.Context, vectorsearch.CreateEndpoint) (*vectorsearch.WaitGetEndpointVectorSearchEndpointOnline[vectorsearch.EndpointInfo], error)) *MockVectorSearchEndpointsInterface_CreateEndpoint_Call { - _c.Call.Return(run) - return _c -} - -// CreateEndpointAndWait provides a mock function with given fields: ctx, createEndpoint, options -func (_m *MockVectorSearchEndpointsInterface) CreateEndpointAndWait(ctx context.Context, createEndpoint vectorsearch.CreateEndpoint, options ...retries.Option[vectorsearch.EndpointInfo]) (*vectorsearch.EndpointInfo, error) { - _va := make([]interface{}, len(options)) - for _i := range options { - _va[_i] = options[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, createEndpoint) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CreateEndpointAndWait") - } - - var r0 *vectorsearch.EndpointInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.CreateEndpoint, ...retries.Option[vectorsearch.EndpointInfo]) (*vectorsearch.EndpointInfo, error)); ok { - return rf(ctx, createEndpoint, options...) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.CreateEndpoint, ...retries.Option[vectorsearch.EndpointInfo]) *vectorsearch.EndpointInfo); ok { - r0 = rf(ctx, createEndpoint, options...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.EndpointInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.CreateEndpoint, ...retries.Option[vectorsearch.EndpointInfo]) error); ok { - r1 = rf(ctx, createEndpoint, options...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateEndpointAndWait' -type MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call struct { - *mock.Call -} - -// CreateEndpointAndWait is a helper method to define mock.On call -// - ctx context.Context -// - createEndpoint vectorsearch.CreateEndpoint -// - options ...retries.Option[vectorsearch.EndpointInfo] -func (_e *MockVectorSearchEndpointsInterface_Expecter) CreateEndpointAndWait(ctx interface{}, createEndpoint interface{}, options ...interface{}) *MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call { - return &MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call{Call: _e.mock.On("CreateEndpointAndWait", - append([]interface{}{ctx, createEndpoint}, options...)...)} -} - -func (_c *MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call) Run(run func(ctx context.Context, createEndpoint vectorsearch.CreateEndpoint, options ...retries.Option[vectorsearch.EndpointInfo])) *MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]retries.Option[vectorsearch.EndpointInfo], len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(retries.Option[vectorsearch.EndpointInfo]) - } - } - run(args[0].(context.Context), args[1].(vectorsearch.CreateEndpoint), variadicArgs...) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call) Return(_a0 *vectorsearch.EndpointInfo, _a1 error) *MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call) RunAndReturn(run func(context.Context, vectorsearch.CreateEndpoint, ...retries.Option[vectorsearch.EndpointInfo]) (*vectorsearch.EndpointInfo, error)) *MockVectorSearchEndpointsInterface_CreateEndpointAndWait_Call { - _c.Call.Return(run) - return _c -} - -// DeleteEndpoint provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchEndpointsInterface) DeleteEndpoint(ctx context.Context, request vectorsearch.DeleteEndpointRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteEndpoint") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.DeleteEndpointRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVectorSearchEndpointsInterface_DeleteEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteEndpoint' -type MockVectorSearchEndpointsInterface_DeleteEndpoint_Call struct { - *mock.Call -} - -// DeleteEndpoint is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.DeleteEndpointRequest -func (_e *MockVectorSearchEndpointsInterface_Expecter) DeleteEndpoint(ctx interface{}, request interface{}) *MockVectorSearchEndpointsInterface_DeleteEndpoint_Call { - return &MockVectorSearchEndpointsInterface_DeleteEndpoint_Call{Call: _e.mock.On("DeleteEndpoint", ctx, request)} -} - -func (_c *MockVectorSearchEndpointsInterface_DeleteEndpoint_Call) Run(run func(ctx context.Context, request vectorsearch.DeleteEndpointRequest)) *MockVectorSearchEndpointsInterface_DeleteEndpoint_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.DeleteEndpointRequest)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_DeleteEndpoint_Call) Return(_a0 error) *MockVectorSearchEndpointsInterface_DeleteEndpoint_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_DeleteEndpoint_Call) RunAndReturn(run func(context.Context, vectorsearch.DeleteEndpointRequest) error) *MockVectorSearchEndpointsInterface_DeleteEndpoint_Call { - _c.Call.Return(run) - return _c -} - -// DeleteEndpointByEndpointName provides a mock function with given fields: ctx, endpointName -func (_m *MockVectorSearchEndpointsInterface) DeleteEndpointByEndpointName(ctx context.Context, endpointName string) error { - ret := _m.Called(ctx, endpointName) - - if len(ret) == 0 { - panic("no return value specified for DeleteEndpointByEndpointName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, endpointName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteEndpointByEndpointName' -type MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call struct { - *mock.Call -} - -// DeleteEndpointByEndpointName is a helper method to define mock.On call -// - ctx context.Context -// - endpointName string -func (_e *MockVectorSearchEndpointsInterface_Expecter) DeleteEndpointByEndpointName(ctx interface{}, endpointName interface{}) *MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call { - return &MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call{Call: _e.mock.On("DeleteEndpointByEndpointName", ctx, endpointName)} -} - -func (_c *MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call) Run(run func(ctx context.Context, endpointName string)) *MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call) Return(_a0 error) *MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call) RunAndReturn(run func(context.Context, string) error) *MockVectorSearchEndpointsInterface_DeleteEndpointByEndpointName_Call { - _c.Call.Return(run) - return _c -} - -// GetEndpoint provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchEndpointsInterface) GetEndpoint(ctx context.Context, request vectorsearch.GetEndpointRequest) (*vectorsearch.EndpointInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetEndpoint") - } - - var r0 *vectorsearch.EndpointInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.GetEndpointRequest) (*vectorsearch.EndpointInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.GetEndpointRequest) *vectorsearch.EndpointInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.EndpointInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.GetEndpointRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchEndpointsInterface_GetEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEndpoint' -type MockVectorSearchEndpointsInterface_GetEndpoint_Call struct { - *mock.Call -} - -// GetEndpoint is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.GetEndpointRequest -func (_e *MockVectorSearchEndpointsInterface_Expecter) GetEndpoint(ctx interface{}, request interface{}) *MockVectorSearchEndpointsInterface_GetEndpoint_Call { - return &MockVectorSearchEndpointsInterface_GetEndpoint_Call{Call: _e.mock.On("GetEndpoint", ctx, request)} -} - -func (_c *MockVectorSearchEndpointsInterface_GetEndpoint_Call) Run(run func(ctx context.Context, request vectorsearch.GetEndpointRequest)) *MockVectorSearchEndpointsInterface_GetEndpoint_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.GetEndpointRequest)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_GetEndpoint_Call) Return(_a0 *vectorsearch.EndpointInfo, _a1 error) *MockVectorSearchEndpointsInterface_GetEndpoint_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_GetEndpoint_Call) RunAndReturn(run func(context.Context, vectorsearch.GetEndpointRequest) (*vectorsearch.EndpointInfo, error)) *MockVectorSearchEndpointsInterface_GetEndpoint_Call { - _c.Call.Return(run) - return _c -} - -// GetEndpointByEndpointName provides a mock function with given fields: ctx, endpointName -func (_m *MockVectorSearchEndpointsInterface) GetEndpointByEndpointName(ctx context.Context, endpointName string) (*vectorsearch.EndpointInfo, error) { - ret := _m.Called(ctx, endpointName) - - if len(ret) == 0 { - panic("no return value specified for GetEndpointByEndpointName") - } - - var r0 *vectorsearch.EndpointInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*vectorsearch.EndpointInfo, error)); ok { - return rf(ctx, endpointName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *vectorsearch.EndpointInfo); ok { - r0 = rf(ctx, endpointName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.EndpointInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, endpointName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEndpointByEndpointName' -type MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call struct { - *mock.Call -} - -// GetEndpointByEndpointName is a helper method to define mock.On call -// - ctx context.Context -// - endpointName string -func (_e *MockVectorSearchEndpointsInterface_Expecter) GetEndpointByEndpointName(ctx interface{}, endpointName interface{}) *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call { - return &MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call{Call: _e.mock.On("GetEndpointByEndpointName", ctx, endpointName)} -} - -func (_c *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call) Run(run func(ctx context.Context, endpointName string)) *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call) Return(_a0 *vectorsearch.EndpointInfo, _a1 error) *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call) RunAndReturn(run func(context.Context, string) (*vectorsearch.EndpointInfo, error)) *MockVectorSearchEndpointsInterface_GetEndpointByEndpointName_Call { - _c.Call.Return(run) - return _c -} - -// ListEndpoints provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchEndpointsInterface) ListEndpoints(ctx context.Context, request vectorsearch.ListEndpointsRequest) listing.Iterator[vectorsearch.EndpointInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListEndpoints") - } - - var r0 listing.Iterator[vectorsearch.EndpointInfo] - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ListEndpointsRequest) listing.Iterator[vectorsearch.EndpointInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[vectorsearch.EndpointInfo]) - } - } - - return r0 -} - -// MockVectorSearchEndpointsInterface_ListEndpoints_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEndpoints' -type MockVectorSearchEndpointsInterface_ListEndpoints_Call struct { - *mock.Call -} - -// ListEndpoints is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.ListEndpointsRequest -func (_e *MockVectorSearchEndpointsInterface_Expecter) ListEndpoints(ctx interface{}, request interface{}) *MockVectorSearchEndpointsInterface_ListEndpoints_Call { - return &MockVectorSearchEndpointsInterface_ListEndpoints_Call{Call: _e.mock.On("ListEndpoints", ctx, request)} -} - -func (_c *MockVectorSearchEndpointsInterface_ListEndpoints_Call) Run(run func(ctx context.Context, request vectorsearch.ListEndpointsRequest)) *MockVectorSearchEndpointsInterface_ListEndpoints_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.ListEndpointsRequest)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_ListEndpoints_Call) Return(_a0 listing.Iterator[vectorsearch.EndpointInfo]) *MockVectorSearchEndpointsInterface_ListEndpoints_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_ListEndpoints_Call) RunAndReturn(run func(context.Context, vectorsearch.ListEndpointsRequest) listing.Iterator[vectorsearch.EndpointInfo]) *MockVectorSearchEndpointsInterface_ListEndpoints_Call { - _c.Call.Return(run) - return _c -} - -// ListEndpointsAll provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchEndpointsInterface) ListEndpointsAll(ctx context.Context, request vectorsearch.ListEndpointsRequest) ([]vectorsearch.EndpointInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListEndpointsAll") - } - - var r0 []vectorsearch.EndpointInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ListEndpointsRequest) ([]vectorsearch.EndpointInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ListEndpointsRequest) []vectorsearch.EndpointInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]vectorsearch.EndpointInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.ListEndpointsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchEndpointsInterface_ListEndpointsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEndpointsAll' -type MockVectorSearchEndpointsInterface_ListEndpointsAll_Call struct { - *mock.Call -} - -// ListEndpointsAll is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.ListEndpointsRequest -func (_e *MockVectorSearchEndpointsInterface_Expecter) ListEndpointsAll(ctx interface{}, request interface{}) *MockVectorSearchEndpointsInterface_ListEndpointsAll_Call { - return &MockVectorSearchEndpointsInterface_ListEndpointsAll_Call{Call: _e.mock.On("ListEndpointsAll", ctx, request)} -} - -func (_c *MockVectorSearchEndpointsInterface_ListEndpointsAll_Call) Run(run func(ctx context.Context, request vectorsearch.ListEndpointsRequest)) *MockVectorSearchEndpointsInterface_ListEndpointsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.ListEndpointsRequest)) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_ListEndpointsAll_Call) Return(_a0 []vectorsearch.EndpointInfo, _a1 error) *MockVectorSearchEndpointsInterface_ListEndpointsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_ListEndpointsAll_Call) RunAndReturn(run func(context.Context, vectorsearch.ListEndpointsRequest) ([]vectorsearch.EndpointInfo, error)) *MockVectorSearchEndpointsInterface_ListEndpointsAll_Call { - _c.Call.Return(run) - return _c -} - -// WaitGetEndpointVectorSearchEndpointOnline provides a mock function with given fields: ctx, endpointName, timeout, callback -func (_m *MockVectorSearchEndpointsInterface) WaitGetEndpointVectorSearchEndpointOnline(ctx context.Context, endpointName string, timeout time.Duration, callback func(*vectorsearch.EndpointInfo)) (*vectorsearch.EndpointInfo, error) { - ret := _m.Called(ctx, endpointName, timeout, callback) - - if len(ret) == 0 { - panic("no return value specified for WaitGetEndpointVectorSearchEndpointOnline") - } - - var r0 *vectorsearch.EndpointInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*vectorsearch.EndpointInfo)) (*vectorsearch.EndpointInfo, error)); ok { - return rf(ctx, endpointName, timeout, callback) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration, func(*vectorsearch.EndpointInfo)) *vectorsearch.EndpointInfo); ok { - r0 = rf(ctx, endpointName, timeout, callback) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.EndpointInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration, func(*vectorsearch.EndpointInfo)) error); ok { - r1 = rf(ctx, endpointName, timeout, callback) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitGetEndpointVectorSearchEndpointOnline' -type MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call struct { - *mock.Call -} - -// WaitGetEndpointVectorSearchEndpointOnline is a helper method to define mock.On call -// - ctx context.Context -// - endpointName string -// - timeout time.Duration -// - callback func(*vectorsearch.EndpointInfo) -func (_e *MockVectorSearchEndpointsInterface_Expecter) WaitGetEndpointVectorSearchEndpointOnline(ctx interface{}, endpointName interface{}, timeout interface{}, callback interface{}) *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call { - return &MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call{Call: _e.mock.On("WaitGetEndpointVectorSearchEndpointOnline", ctx, endpointName, timeout, callback)} -} - -func (_c *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call) Run(run func(ctx context.Context, endpointName string, timeout time.Duration, callback func(*vectorsearch.EndpointInfo))) *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(time.Duration), args[3].(func(*vectorsearch.EndpointInfo))) - }) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call) Return(_a0 *vectorsearch.EndpointInfo, _a1 error) *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call) RunAndReturn(run func(context.Context, string, time.Duration, func(*vectorsearch.EndpointInfo)) (*vectorsearch.EndpointInfo, error)) *MockVectorSearchEndpointsInterface_WaitGetEndpointVectorSearchEndpointOnline_Call { - _c.Call.Return(run) - return _c -} - -// NewMockVectorSearchEndpointsInterface creates a new instance of MockVectorSearchEndpointsInterface. 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 NewMockVectorSearchEndpointsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockVectorSearchEndpointsInterface { - mock := &MockVectorSearchEndpointsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go b/experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go deleted file mode 100644 index a72f967db..000000000 --- a/experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go +++ /dev/null @@ -1,760 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package vectorsearch - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - vectorsearch "github.com/databricks/databricks-sdk-go/service/vectorsearch" -) - -// MockVectorSearchIndexesInterface is an autogenerated mock type for the VectorSearchIndexesInterface type -type MockVectorSearchIndexesInterface struct { - mock.Mock -} - -type MockVectorSearchIndexesInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockVectorSearchIndexesInterface) EXPECT() *MockVectorSearchIndexesInterface_Expecter { - return &MockVectorSearchIndexesInterface_Expecter{mock: &_m.Mock} -} - -// CreateIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) CreateIndex(ctx context.Context, request vectorsearch.CreateVectorIndexRequest) (*vectorsearch.CreateVectorIndexResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateIndex") - } - - var r0 *vectorsearch.CreateVectorIndexResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.CreateVectorIndexRequest) (*vectorsearch.CreateVectorIndexResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.CreateVectorIndexRequest) *vectorsearch.CreateVectorIndexResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.CreateVectorIndexResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.CreateVectorIndexRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_CreateIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateIndex' -type MockVectorSearchIndexesInterface_CreateIndex_Call struct { - *mock.Call -} - -// CreateIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.CreateVectorIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) CreateIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_CreateIndex_Call { - return &MockVectorSearchIndexesInterface_CreateIndex_Call{Call: _e.mock.On("CreateIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_CreateIndex_Call) Run(run func(ctx context.Context, request vectorsearch.CreateVectorIndexRequest)) *MockVectorSearchIndexesInterface_CreateIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.CreateVectorIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_CreateIndex_Call) Return(_a0 *vectorsearch.CreateVectorIndexResponse, _a1 error) *MockVectorSearchIndexesInterface_CreateIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_CreateIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.CreateVectorIndexRequest) (*vectorsearch.CreateVectorIndexResponse, error)) *MockVectorSearchIndexesInterface_CreateIndex_Call { - _c.Call.Return(run) - return _c -} - -// DeleteDataVectorIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) DeleteDataVectorIndex(ctx context.Context, request vectorsearch.DeleteDataVectorIndexRequest) (*vectorsearch.DeleteDataVectorIndexResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteDataVectorIndex") - } - - var r0 *vectorsearch.DeleteDataVectorIndexResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.DeleteDataVectorIndexRequest) (*vectorsearch.DeleteDataVectorIndexResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.DeleteDataVectorIndexRequest) *vectorsearch.DeleteDataVectorIndexResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.DeleteDataVectorIndexResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.DeleteDataVectorIndexRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteDataVectorIndex' -type MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call struct { - *mock.Call -} - -// DeleteDataVectorIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.DeleteDataVectorIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) DeleteDataVectorIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call { - return &MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call{Call: _e.mock.On("DeleteDataVectorIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call) Run(run func(ctx context.Context, request vectorsearch.DeleteDataVectorIndexRequest)) *MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.DeleteDataVectorIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call) Return(_a0 *vectorsearch.DeleteDataVectorIndexResponse, _a1 error) *MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.DeleteDataVectorIndexRequest) (*vectorsearch.DeleteDataVectorIndexResponse, error)) *MockVectorSearchIndexesInterface_DeleteDataVectorIndex_Call { - _c.Call.Return(run) - return _c -} - -// DeleteIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) DeleteIndex(ctx context.Context, request vectorsearch.DeleteIndexRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.DeleteIndexRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVectorSearchIndexesInterface_DeleteIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteIndex' -type MockVectorSearchIndexesInterface_DeleteIndex_Call struct { - *mock.Call -} - -// DeleteIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.DeleteIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) DeleteIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_DeleteIndex_Call { - return &MockVectorSearchIndexesInterface_DeleteIndex_Call{Call: _e.mock.On("DeleteIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_DeleteIndex_Call) Run(run func(ctx context.Context, request vectorsearch.DeleteIndexRequest)) *MockVectorSearchIndexesInterface_DeleteIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.DeleteIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_DeleteIndex_Call) Return(_a0 error) *MockVectorSearchIndexesInterface_DeleteIndex_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_DeleteIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.DeleteIndexRequest) error) *MockVectorSearchIndexesInterface_DeleteIndex_Call { - _c.Call.Return(run) - return _c -} - -// DeleteIndexByIndexName provides a mock function with given fields: ctx, indexName -func (_m *MockVectorSearchIndexesInterface) DeleteIndexByIndexName(ctx context.Context, indexName string) error { - ret := _m.Called(ctx, indexName) - - if len(ret) == 0 { - panic("no return value specified for DeleteIndexByIndexName") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, indexName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteIndexByIndexName' -type MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call struct { - *mock.Call -} - -// DeleteIndexByIndexName is a helper method to define mock.On call -// - ctx context.Context -// - indexName string -func (_e *MockVectorSearchIndexesInterface_Expecter) DeleteIndexByIndexName(ctx interface{}, indexName interface{}) *MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call { - return &MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call{Call: _e.mock.On("DeleteIndexByIndexName", ctx, indexName)} -} - -func (_c *MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call) Run(run func(ctx context.Context, indexName string)) *MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call) Return(_a0 error) *MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call) RunAndReturn(run func(context.Context, string) error) *MockVectorSearchIndexesInterface_DeleteIndexByIndexName_Call { - _c.Call.Return(run) - return _c -} - -// GetIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) GetIndex(ctx context.Context, request vectorsearch.GetIndexRequest) (*vectorsearch.VectorIndex, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetIndex") - } - - var r0 *vectorsearch.VectorIndex - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.GetIndexRequest) (*vectorsearch.VectorIndex, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.GetIndexRequest) *vectorsearch.VectorIndex); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.VectorIndex) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.GetIndexRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_GetIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndex' -type MockVectorSearchIndexesInterface_GetIndex_Call struct { - *mock.Call -} - -// GetIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.GetIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) GetIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_GetIndex_Call { - return &MockVectorSearchIndexesInterface_GetIndex_Call{Call: _e.mock.On("GetIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_GetIndex_Call) Run(run func(ctx context.Context, request vectorsearch.GetIndexRequest)) *MockVectorSearchIndexesInterface_GetIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.GetIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_GetIndex_Call) Return(_a0 *vectorsearch.VectorIndex, _a1 error) *MockVectorSearchIndexesInterface_GetIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_GetIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.GetIndexRequest) (*vectorsearch.VectorIndex, error)) *MockVectorSearchIndexesInterface_GetIndex_Call { - _c.Call.Return(run) - return _c -} - -// GetIndexByIndexName provides a mock function with given fields: ctx, indexName -func (_m *MockVectorSearchIndexesInterface) GetIndexByIndexName(ctx context.Context, indexName string) (*vectorsearch.VectorIndex, error) { - ret := _m.Called(ctx, indexName) - - if len(ret) == 0 { - panic("no return value specified for GetIndexByIndexName") - } - - var r0 *vectorsearch.VectorIndex - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*vectorsearch.VectorIndex, error)); ok { - return rf(ctx, indexName) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *vectorsearch.VectorIndex); ok { - r0 = rf(ctx, indexName) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.VectorIndex) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, indexName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_GetIndexByIndexName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIndexByIndexName' -type MockVectorSearchIndexesInterface_GetIndexByIndexName_Call struct { - *mock.Call -} - -// GetIndexByIndexName is a helper method to define mock.On call -// - ctx context.Context -// - indexName string -func (_e *MockVectorSearchIndexesInterface_Expecter) GetIndexByIndexName(ctx interface{}, indexName interface{}) *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call { - return &MockVectorSearchIndexesInterface_GetIndexByIndexName_Call{Call: _e.mock.On("GetIndexByIndexName", ctx, indexName)} -} - -func (_c *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call) Run(run func(ctx context.Context, indexName string)) *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call) Return(_a0 *vectorsearch.VectorIndex, _a1 error) *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call) RunAndReturn(run func(context.Context, string) (*vectorsearch.VectorIndex, error)) *MockVectorSearchIndexesInterface_GetIndexByIndexName_Call { - _c.Call.Return(run) - return _c -} - -// ListIndexes provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) ListIndexes(ctx context.Context, request vectorsearch.ListIndexesRequest) listing.Iterator[vectorsearch.MiniVectorIndex] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListIndexes") - } - - var r0 listing.Iterator[vectorsearch.MiniVectorIndex] - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ListIndexesRequest) listing.Iterator[vectorsearch.MiniVectorIndex]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[vectorsearch.MiniVectorIndex]) - } - } - - return r0 -} - -// MockVectorSearchIndexesInterface_ListIndexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIndexes' -type MockVectorSearchIndexesInterface_ListIndexes_Call struct { - *mock.Call -} - -// ListIndexes is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.ListIndexesRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) ListIndexes(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_ListIndexes_Call { - return &MockVectorSearchIndexesInterface_ListIndexes_Call{Call: _e.mock.On("ListIndexes", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_ListIndexes_Call) Run(run func(ctx context.Context, request vectorsearch.ListIndexesRequest)) *MockVectorSearchIndexesInterface_ListIndexes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.ListIndexesRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_ListIndexes_Call) Return(_a0 listing.Iterator[vectorsearch.MiniVectorIndex]) *MockVectorSearchIndexesInterface_ListIndexes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_ListIndexes_Call) RunAndReturn(run func(context.Context, vectorsearch.ListIndexesRequest) listing.Iterator[vectorsearch.MiniVectorIndex]) *MockVectorSearchIndexesInterface_ListIndexes_Call { - _c.Call.Return(run) - return _c -} - -// ListIndexesAll provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) ListIndexesAll(ctx context.Context, request vectorsearch.ListIndexesRequest) ([]vectorsearch.MiniVectorIndex, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListIndexesAll") - } - - var r0 []vectorsearch.MiniVectorIndex - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ListIndexesRequest) ([]vectorsearch.MiniVectorIndex, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ListIndexesRequest) []vectorsearch.MiniVectorIndex); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]vectorsearch.MiniVectorIndex) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.ListIndexesRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_ListIndexesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIndexesAll' -type MockVectorSearchIndexesInterface_ListIndexesAll_Call struct { - *mock.Call -} - -// ListIndexesAll is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.ListIndexesRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) ListIndexesAll(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_ListIndexesAll_Call { - return &MockVectorSearchIndexesInterface_ListIndexesAll_Call{Call: _e.mock.On("ListIndexesAll", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_ListIndexesAll_Call) Run(run func(ctx context.Context, request vectorsearch.ListIndexesRequest)) *MockVectorSearchIndexesInterface_ListIndexesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.ListIndexesRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_ListIndexesAll_Call) Return(_a0 []vectorsearch.MiniVectorIndex, _a1 error) *MockVectorSearchIndexesInterface_ListIndexesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_ListIndexesAll_Call) RunAndReturn(run func(context.Context, vectorsearch.ListIndexesRequest) ([]vectorsearch.MiniVectorIndex, error)) *MockVectorSearchIndexesInterface_ListIndexesAll_Call { - _c.Call.Return(run) - return _c -} - -// QueryIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) QueryIndex(ctx context.Context, request vectorsearch.QueryVectorIndexRequest) (*vectorsearch.QueryVectorIndexResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for QueryIndex") - } - - var r0 *vectorsearch.QueryVectorIndexResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.QueryVectorIndexRequest) (*vectorsearch.QueryVectorIndexResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.QueryVectorIndexRequest) *vectorsearch.QueryVectorIndexResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.QueryVectorIndexResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.QueryVectorIndexRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_QueryIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryIndex' -type MockVectorSearchIndexesInterface_QueryIndex_Call struct { - *mock.Call -} - -// QueryIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.QueryVectorIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) QueryIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_QueryIndex_Call { - return &MockVectorSearchIndexesInterface_QueryIndex_Call{Call: _e.mock.On("QueryIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_QueryIndex_Call) Run(run func(ctx context.Context, request vectorsearch.QueryVectorIndexRequest)) *MockVectorSearchIndexesInterface_QueryIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.QueryVectorIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_QueryIndex_Call) Return(_a0 *vectorsearch.QueryVectorIndexResponse, _a1 error) *MockVectorSearchIndexesInterface_QueryIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_QueryIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.QueryVectorIndexRequest) (*vectorsearch.QueryVectorIndexResponse, error)) *MockVectorSearchIndexesInterface_QueryIndex_Call { - _c.Call.Return(run) - return _c -} - -// QueryNextPage provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) QueryNextPage(ctx context.Context, request vectorsearch.QueryVectorIndexNextPageRequest) (*vectorsearch.QueryVectorIndexResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for QueryNextPage") - } - - var r0 *vectorsearch.QueryVectorIndexResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.QueryVectorIndexNextPageRequest) (*vectorsearch.QueryVectorIndexResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.QueryVectorIndexNextPageRequest) *vectorsearch.QueryVectorIndexResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.QueryVectorIndexResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.QueryVectorIndexNextPageRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_QueryNextPage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryNextPage' -type MockVectorSearchIndexesInterface_QueryNextPage_Call struct { - *mock.Call -} - -// QueryNextPage is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.QueryVectorIndexNextPageRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) QueryNextPage(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_QueryNextPage_Call { - return &MockVectorSearchIndexesInterface_QueryNextPage_Call{Call: _e.mock.On("QueryNextPage", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_QueryNextPage_Call) Run(run func(ctx context.Context, request vectorsearch.QueryVectorIndexNextPageRequest)) *MockVectorSearchIndexesInterface_QueryNextPage_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.QueryVectorIndexNextPageRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_QueryNextPage_Call) Return(_a0 *vectorsearch.QueryVectorIndexResponse, _a1 error) *MockVectorSearchIndexesInterface_QueryNextPage_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_QueryNextPage_Call) RunAndReturn(run func(context.Context, vectorsearch.QueryVectorIndexNextPageRequest) (*vectorsearch.QueryVectorIndexResponse, error)) *MockVectorSearchIndexesInterface_QueryNextPage_Call { - _c.Call.Return(run) - return _c -} - -// ScanIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) ScanIndex(ctx context.Context, request vectorsearch.ScanVectorIndexRequest) (*vectorsearch.ScanVectorIndexResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ScanIndex") - } - - var r0 *vectorsearch.ScanVectorIndexResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ScanVectorIndexRequest) (*vectorsearch.ScanVectorIndexResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.ScanVectorIndexRequest) *vectorsearch.ScanVectorIndexResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.ScanVectorIndexResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.ScanVectorIndexRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_ScanIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ScanIndex' -type MockVectorSearchIndexesInterface_ScanIndex_Call struct { - *mock.Call -} - -// ScanIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.ScanVectorIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) ScanIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_ScanIndex_Call { - return &MockVectorSearchIndexesInterface_ScanIndex_Call{Call: _e.mock.On("ScanIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_ScanIndex_Call) Run(run func(ctx context.Context, request vectorsearch.ScanVectorIndexRequest)) *MockVectorSearchIndexesInterface_ScanIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.ScanVectorIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_ScanIndex_Call) Return(_a0 *vectorsearch.ScanVectorIndexResponse, _a1 error) *MockVectorSearchIndexesInterface_ScanIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_ScanIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.ScanVectorIndexRequest) (*vectorsearch.ScanVectorIndexResponse, error)) *MockVectorSearchIndexesInterface_ScanIndex_Call { - _c.Call.Return(run) - return _c -} - -// SyncIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) SyncIndex(ctx context.Context, request vectorsearch.SyncIndexRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SyncIndex") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.SyncIndexRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockVectorSearchIndexesInterface_SyncIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncIndex' -type MockVectorSearchIndexesInterface_SyncIndex_Call struct { - *mock.Call -} - -// SyncIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.SyncIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) SyncIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_SyncIndex_Call { - return &MockVectorSearchIndexesInterface_SyncIndex_Call{Call: _e.mock.On("SyncIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_SyncIndex_Call) Run(run func(ctx context.Context, request vectorsearch.SyncIndexRequest)) *MockVectorSearchIndexesInterface_SyncIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.SyncIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_SyncIndex_Call) Return(_a0 error) *MockVectorSearchIndexesInterface_SyncIndex_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_SyncIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.SyncIndexRequest) error) *MockVectorSearchIndexesInterface_SyncIndex_Call { - _c.Call.Return(run) - return _c -} - -// UpsertDataVectorIndex provides a mock function with given fields: ctx, request -func (_m *MockVectorSearchIndexesInterface) UpsertDataVectorIndex(ctx context.Context, request vectorsearch.UpsertDataVectorIndexRequest) (*vectorsearch.UpsertDataVectorIndexResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpsertDataVectorIndex") - } - - var r0 *vectorsearch.UpsertDataVectorIndexResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.UpsertDataVectorIndexRequest) (*vectorsearch.UpsertDataVectorIndexResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, vectorsearch.UpsertDataVectorIndexRequest) *vectorsearch.UpsertDataVectorIndexResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vectorsearch.UpsertDataVectorIndexResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, vectorsearch.UpsertDataVectorIndexRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpsertDataVectorIndex' -type MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call struct { - *mock.Call -} - -// UpsertDataVectorIndex is a helper method to define mock.On call -// - ctx context.Context -// - request vectorsearch.UpsertDataVectorIndexRequest -func (_e *MockVectorSearchIndexesInterface_Expecter) UpsertDataVectorIndex(ctx interface{}, request interface{}) *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call { - return &MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call{Call: _e.mock.On("UpsertDataVectorIndex", ctx, request)} -} - -func (_c *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call) Run(run func(ctx context.Context, request vectorsearch.UpsertDataVectorIndexRequest)) *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(vectorsearch.UpsertDataVectorIndexRequest)) - }) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call) Return(_a0 *vectorsearch.UpsertDataVectorIndexResponse, _a1 error) *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call) RunAndReturn(run func(context.Context, vectorsearch.UpsertDataVectorIndexRequest) (*vectorsearch.UpsertDataVectorIndexResponse, error)) *MockVectorSearchIndexesInterface_UpsertDataVectorIndex_Call { - _c.Call.Return(run) - return _c -} - -// NewMockVectorSearchIndexesInterface creates a new instance of MockVectorSearchIndexesInterface. 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 NewMockVectorSearchIndexesInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockVectorSearchIndexesInterface { - mock := &MockVectorSearchIndexesInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/workspace/mock_git_credentials_interface.go b/experimental/mocks/service/workspace/mock_git_credentials_interface.go deleted file mode 100644 index 8f8c6b85c..000000000 --- a/experimental/mocks/service/workspace/mock_git_credentials_interface.go +++ /dev/null @@ -1,580 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package workspace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - workspace "github.com/databricks/databricks-sdk-go/service/workspace" -) - -// MockGitCredentialsInterface is an autogenerated mock type for the GitCredentialsInterface type -type MockGitCredentialsInterface struct { - mock.Mock -} - -type MockGitCredentialsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockGitCredentialsInterface) EXPECT() *MockGitCredentialsInterface_Expecter { - return &MockGitCredentialsInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockGitCredentialsInterface) Create(ctx context.Context, request workspace.CreateCredentialsRequest) (*workspace.CreateCredentialsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *workspace.CreateCredentialsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.CreateCredentialsRequest) (*workspace.CreateCredentialsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.CreateCredentialsRequest) *workspace.CreateCredentialsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.CreateCredentialsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.CreateCredentialsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGitCredentialsInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockGitCredentialsInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.CreateCredentialsRequest -func (_e *MockGitCredentialsInterface_Expecter) Create(ctx interface{}, request interface{}) *MockGitCredentialsInterface_Create_Call { - return &MockGitCredentialsInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockGitCredentialsInterface_Create_Call) Run(run func(ctx context.Context, request workspace.CreateCredentialsRequest)) *MockGitCredentialsInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.CreateCredentialsRequest)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_Create_Call) Return(_a0 *workspace.CreateCredentialsResponse, _a1 error) *MockGitCredentialsInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGitCredentialsInterface_Create_Call) RunAndReturn(run func(context.Context, workspace.CreateCredentialsRequest) (*workspace.CreateCredentialsResponse, error)) *MockGitCredentialsInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// CredentialInfoGitProviderToCredentialIdMap provides a mock function with given fields: ctx -func (_m *MockGitCredentialsInterface) CredentialInfoGitProviderToCredentialIdMap(ctx context.Context) (map[string]int64, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for CredentialInfoGitProviderToCredentialIdMap") - } - - var r0 map[string]int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (map[string]int64, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) map[string]int64); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]int64) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CredentialInfoGitProviderToCredentialIdMap' -type MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call struct { - *mock.Call -} - -// CredentialInfoGitProviderToCredentialIdMap is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockGitCredentialsInterface_Expecter) CredentialInfoGitProviderToCredentialIdMap(ctx interface{}) *MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call { - return &MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call{Call: _e.mock.On("CredentialInfoGitProviderToCredentialIdMap", ctx)} -} - -func (_c *MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call) Run(run func(ctx context.Context)) *MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call) Return(_a0 map[string]int64, _a1 error) *MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call) RunAndReturn(run func(context.Context) (map[string]int64, error)) *MockGitCredentialsInterface_CredentialInfoGitProviderToCredentialIdMap_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockGitCredentialsInterface) Delete(ctx context.Context, request workspace.DeleteCredentialsRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.DeleteCredentialsRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGitCredentialsInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockGitCredentialsInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.DeleteCredentialsRequest -func (_e *MockGitCredentialsInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockGitCredentialsInterface_Delete_Call { - return &MockGitCredentialsInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockGitCredentialsInterface_Delete_Call) Run(run func(ctx context.Context, request workspace.DeleteCredentialsRequest)) *MockGitCredentialsInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.DeleteCredentialsRequest)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_Delete_Call) Return(_a0 error) *MockGitCredentialsInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGitCredentialsInterface_Delete_Call) RunAndReturn(run func(context.Context, workspace.DeleteCredentialsRequest) error) *MockGitCredentialsInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByCredentialId provides a mock function with given fields: ctx, credentialId -func (_m *MockGitCredentialsInterface) DeleteByCredentialId(ctx context.Context, credentialId int64) error { - ret := _m.Called(ctx, credentialId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByCredentialId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, credentialId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGitCredentialsInterface_DeleteByCredentialId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByCredentialId' -type MockGitCredentialsInterface_DeleteByCredentialId_Call struct { - *mock.Call -} - -// DeleteByCredentialId is a helper method to define mock.On call -// - ctx context.Context -// - credentialId int64 -func (_e *MockGitCredentialsInterface_Expecter) DeleteByCredentialId(ctx interface{}, credentialId interface{}) *MockGitCredentialsInterface_DeleteByCredentialId_Call { - return &MockGitCredentialsInterface_DeleteByCredentialId_Call{Call: _e.mock.On("DeleteByCredentialId", ctx, credentialId)} -} - -func (_c *MockGitCredentialsInterface_DeleteByCredentialId_Call) Run(run func(ctx context.Context, credentialId int64)) *MockGitCredentialsInterface_DeleteByCredentialId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_DeleteByCredentialId_Call) Return(_a0 error) *MockGitCredentialsInterface_DeleteByCredentialId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGitCredentialsInterface_DeleteByCredentialId_Call) RunAndReturn(run func(context.Context, int64) error) *MockGitCredentialsInterface_DeleteByCredentialId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockGitCredentialsInterface) Get(ctx context.Context, request workspace.GetCredentialsRequest) (*workspace.GetCredentialsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *workspace.GetCredentialsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetCredentialsRequest) (*workspace.GetCredentialsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetCredentialsRequest) *workspace.GetCredentialsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetCredentialsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetCredentialsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGitCredentialsInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockGitCredentialsInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetCredentialsRequest -func (_e *MockGitCredentialsInterface_Expecter) Get(ctx interface{}, request interface{}) *MockGitCredentialsInterface_Get_Call { - return &MockGitCredentialsInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockGitCredentialsInterface_Get_Call) Run(run func(ctx context.Context, request workspace.GetCredentialsRequest)) *MockGitCredentialsInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetCredentialsRequest)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_Get_Call) Return(_a0 *workspace.GetCredentialsResponse, _a1 error) *MockGitCredentialsInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGitCredentialsInterface_Get_Call) RunAndReturn(run func(context.Context, workspace.GetCredentialsRequest) (*workspace.GetCredentialsResponse, error)) *MockGitCredentialsInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByCredentialId provides a mock function with given fields: ctx, credentialId -func (_m *MockGitCredentialsInterface) GetByCredentialId(ctx context.Context, credentialId int64) (*workspace.GetCredentialsResponse, error) { - ret := _m.Called(ctx, credentialId) - - if len(ret) == 0 { - panic("no return value specified for GetByCredentialId") - } - - var r0 *workspace.GetCredentialsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*workspace.GetCredentialsResponse, error)); ok { - return rf(ctx, credentialId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *workspace.GetCredentialsResponse); ok { - r0 = rf(ctx, credentialId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetCredentialsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, credentialId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGitCredentialsInterface_GetByCredentialId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByCredentialId' -type MockGitCredentialsInterface_GetByCredentialId_Call struct { - *mock.Call -} - -// GetByCredentialId is a helper method to define mock.On call -// - ctx context.Context -// - credentialId int64 -func (_e *MockGitCredentialsInterface_Expecter) GetByCredentialId(ctx interface{}, credentialId interface{}) *MockGitCredentialsInterface_GetByCredentialId_Call { - return &MockGitCredentialsInterface_GetByCredentialId_Call{Call: _e.mock.On("GetByCredentialId", ctx, credentialId)} -} - -func (_c *MockGitCredentialsInterface_GetByCredentialId_Call) Run(run func(ctx context.Context, credentialId int64)) *MockGitCredentialsInterface_GetByCredentialId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_GetByCredentialId_Call) Return(_a0 *workspace.GetCredentialsResponse, _a1 error) *MockGitCredentialsInterface_GetByCredentialId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGitCredentialsInterface_GetByCredentialId_Call) RunAndReturn(run func(context.Context, int64) (*workspace.GetCredentialsResponse, error)) *MockGitCredentialsInterface_GetByCredentialId_Call { - _c.Call.Return(run) - return _c -} - -// GetByGitProvider provides a mock function with given fields: ctx, name -func (_m *MockGitCredentialsInterface) GetByGitProvider(ctx context.Context, name string) (*workspace.CredentialInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByGitProvider") - } - - var r0 *workspace.CredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.CredentialInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.CredentialInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.CredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGitCredentialsInterface_GetByGitProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByGitProvider' -type MockGitCredentialsInterface_GetByGitProvider_Call struct { - *mock.Call -} - -// GetByGitProvider is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockGitCredentialsInterface_Expecter) GetByGitProvider(ctx interface{}, name interface{}) *MockGitCredentialsInterface_GetByGitProvider_Call { - return &MockGitCredentialsInterface_GetByGitProvider_Call{Call: _e.mock.On("GetByGitProvider", ctx, name)} -} - -func (_c *MockGitCredentialsInterface_GetByGitProvider_Call) Run(run func(ctx context.Context, name string)) *MockGitCredentialsInterface_GetByGitProvider_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_GetByGitProvider_Call) Return(_a0 *workspace.CredentialInfo, _a1 error) *MockGitCredentialsInterface_GetByGitProvider_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGitCredentialsInterface_GetByGitProvider_Call) RunAndReturn(run func(context.Context, string) (*workspace.CredentialInfo, error)) *MockGitCredentialsInterface_GetByGitProvider_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx -func (_m *MockGitCredentialsInterface) List(ctx context.Context) listing.Iterator[workspace.CredentialInfo] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[workspace.CredentialInfo] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[workspace.CredentialInfo]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[workspace.CredentialInfo]) - } - } - - return r0 -} - -// MockGitCredentialsInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockGitCredentialsInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockGitCredentialsInterface_Expecter) List(ctx interface{}) *MockGitCredentialsInterface_List_Call { - return &MockGitCredentialsInterface_List_Call{Call: _e.mock.On("List", ctx)} -} - -func (_c *MockGitCredentialsInterface_List_Call) Run(run func(ctx context.Context)) *MockGitCredentialsInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_List_Call) Return(_a0 listing.Iterator[workspace.CredentialInfo]) *MockGitCredentialsInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGitCredentialsInterface_List_Call) RunAndReturn(run func(context.Context) listing.Iterator[workspace.CredentialInfo]) *MockGitCredentialsInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx -func (_m *MockGitCredentialsInterface) ListAll(ctx context.Context) ([]workspace.CredentialInfo, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []workspace.CredentialInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]workspace.CredentialInfo, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []workspace.CredentialInfo); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]workspace.CredentialInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockGitCredentialsInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockGitCredentialsInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockGitCredentialsInterface_Expecter) ListAll(ctx interface{}) *MockGitCredentialsInterface_ListAll_Call { - return &MockGitCredentialsInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx)} -} - -func (_c *MockGitCredentialsInterface_ListAll_Call) Run(run func(ctx context.Context)) *MockGitCredentialsInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_ListAll_Call) Return(_a0 []workspace.CredentialInfo, _a1 error) *MockGitCredentialsInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockGitCredentialsInterface_ListAll_Call) RunAndReturn(run func(context.Context) ([]workspace.CredentialInfo, error)) *MockGitCredentialsInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockGitCredentialsInterface) Update(ctx context.Context, request workspace.UpdateCredentialsRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.UpdateCredentialsRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockGitCredentialsInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockGitCredentialsInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.UpdateCredentialsRequest -func (_e *MockGitCredentialsInterface_Expecter) Update(ctx interface{}, request interface{}) *MockGitCredentialsInterface_Update_Call { - return &MockGitCredentialsInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockGitCredentialsInterface_Update_Call) Run(run func(ctx context.Context, request workspace.UpdateCredentialsRequest)) *MockGitCredentialsInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.UpdateCredentialsRequest)) - }) - return _c -} - -func (_c *MockGitCredentialsInterface_Update_Call) Return(_a0 error) *MockGitCredentialsInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockGitCredentialsInterface_Update_Call) RunAndReturn(run func(context.Context, workspace.UpdateCredentialsRequest) error) *MockGitCredentialsInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// NewMockGitCredentialsInterface creates a new instance of MockGitCredentialsInterface. 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 NewMockGitCredentialsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockGitCredentialsInterface { - mock := &MockGitCredentialsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/workspace/mock_repos_interface.go b/experimental/mocks/service/workspace/mock_repos_interface.go deleted file mode 100644 index ef069a72e..000000000 --- a/experimental/mocks/service/workspace/mock_repos_interface.go +++ /dev/null @@ -1,937 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package workspace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - workspace "github.com/databricks/databricks-sdk-go/service/workspace" -) - -// MockReposInterface is an autogenerated mock type for the ReposInterface type -type MockReposInterface struct { - mock.Mock -} - -type MockReposInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockReposInterface) EXPECT() *MockReposInterface_Expecter { - return &MockReposInterface_Expecter{mock: &_m.Mock} -} - -// Create provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) Create(ctx context.Context, request workspace.CreateRepoRequest) (*workspace.CreateRepoResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 *workspace.CreateRepoResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.CreateRepoRequest) (*workspace.CreateRepoResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.CreateRepoRequest) *workspace.CreateRepoResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.CreateRepoResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.CreateRepoRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type MockReposInterface_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.CreateRepoRequest -func (_e *MockReposInterface_Expecter) Create(ctx interface{}, request interface{}) *MockReposInterface_Create_Call { - return &MockReposInterface_Create_Call{Call: _e.mock.On("Create", ctx, request)} -} - -func (_c *MockReposInterface_Create_Call) Run(run func(ctx context.Context, request workspace.CreateRepoRequest)) *MockReposInterface_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.CreateRepoRequest)) - }) - return _c -} - -func (_c *MockReposInterface_Create_Call) Return(_a0 *workspace.CreateRepoResponse, _a1 error) *MockReposInterface_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_Create_Call) RunAndReturn(run func(context.Context, workspace.CreateRepoRequest) (*workspace.CreateRepoResponse, error)) *MockReposInterface_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) Delete(ctx context.Context, request workspace.DeleteRepoRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.DeleteRepoRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockReposInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockReposInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.DeleteRepoRequest -func (_e *MockReposInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockReposInterface_Delete_Call { - return &MockReposInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockReposInterface_Delete_Call) Run(run func(ctx context.Context, request workspace.DeleteRepoRequest)) *MockReposInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.DeleteRepoRequest)) - }) - return _c -} - -func (_c *MockReposInterface_Delete_Call) Return(_a0 error) *MockReposInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockReposInterface_Delete_Call) RunAndReturn(run func(context.Context, workspace.DeleteRepoRequest) error) *MockReposInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// DeleteByRepoId provides a mock function with given fields: ctx, repoId -func (_m *MockReposInterface) DeleteByRepoId(ctx context.Context, repoId int64) error { - ret := _m.Called(ctx, repoId) - - if len(ret) == 0 { - panic("no return value specified for DeleteByRepoId") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, int64) error); ok { - r0 = rf(ctx, repoId) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockReposInterface_DeleteByRepoId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteByRepoId' -type MockReposInterface_DeleteByRepoId_Call struct { - *mock.Call -} - -// DeleteByRepoId is a helper method to define mock.On call -// - ctx context.Context -// - repoId int64 -func (_e *MockReposInterface_Expecter) DeleteByRepoId(ctx interface{}, repoId interface{}) *MockReposInterface_DeleteByRepoId_Call { - return &MockReposInterface_DeleteByRepoId_Call{Call: _e.mock.On("DeleteByRepoId", ctx, repoId)} -} - -func (_c *MockReposInterface_DeleteByRepoId_Call) Run(run func(ctx context.Context, repoId int64)) *MockReposInterface_DeleteByRepoId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockReposInterface_DeleteByRepoId_Call) Return(_a0 error) *MockReposInterface_DeleteByRepoId_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockReposInterface_DeleteByRepoId_Call) RunAndReturn(run func(context.Context, int64) error) *MockReposInterface_DeleteByRepoId_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) Get(ctx context.Context, request workspace.GetRepoRequest) (*workspace.GetRepoResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 *workspace.GetRepoResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetRepoRequest) (*workspace.GetRepoResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetRepoRequest) *workspace.GetRepoResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetRepoResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetRepoRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type MockReposInterface_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetRepoRequest -func (_e *MockReposInterface_Expecter) Get(ctx interface{}, request interface{}) *MockReposInterface_Get_Call { - return &MockReposInterface_Get_Call{Call: _e.mock.On("Get", ctx, request)} -} - -func (_c *MockReposInterface_Get_Call) Run(run func(ctx context.Context, request workspace.GetRepoRequest)) *MockReposInterface_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetRepoRequest)) - }) - return _c -} - -func (_c *MockReposInterface_Get_Call) Return(_a0 *workspace.GetRepoResponse, _a1 error) *MockReposInterface_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_Get_Call) RunAndReturn(run func(context.Context, workspace.GetRepoRequest) (*workspace.GetRepoResponse, error)) *MockReposInterface_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetByPath provides a mock function with given fields: ctx, name -func (_m *MockReposInterface) GetByPath(ctx context.Context, name string) (*workspace.RepoInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByPath") - } - - var r0 *workspace.RepoInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.RepoInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.RepoInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.RepoInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_GetByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPath' -type MockReposInterface_GetByPath_Call struct { - *mock.Call -} - -// GetByPath is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockReposInterface_Expecter) GetByPath(ctx interface{}, name interface{}) *MockReposInterface_GetByPath_Call { - return &MockReposInterface_GetByPath_Call{Call: _e.mock.On("GetByPath", ctx, name)} -} - -func (_c *MockReposInterface_GetByPath_Call) Run(run func(ctx context.Context, name string)) *MockReposInterface_GetByPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockReposInterface_GetByPath_Call) Return(_a0 *workspace.RepoInfo, _a1 error) *MockReposInterface_GetByPath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_GetByPath_Call) RunAndReturn(run func(context.Context, string) (*workspace.RepoInfo, error)) *MockReposInterface_GetByPath_Call { - _c.Call.Return(run) - return _c -} - -// GetByRepoId provides a mock function with given fields: ctx, repoId -func (_m *MockReposInterface) GetByRepoId(ctx context.Context, repoId int64) (*workspace.GetRepoResponse, error) { - ret := _m.Called(ctx, repoId) - - if len(ret) == 0 { - panic("no return value specified for GetByRepoId") - } - - var r0 *workspace.GetRepoResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (*workspace.GetRepoResponse, error)); ok { - return rf(ctx, repoId) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) *workspace.GetRepoResponse); ok { - r0 = rf(ctx, repoId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetRepoResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, repoId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_GetByRepoId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByRepoId' -type MockReposInterface_GetByRepoId_Call struct { - *mock.Call -} - -// GetByRepoId is a helper method to define mock.On call -// - ctx context.Context -// - repoId int64 -func (_e *MockReposInterface_Expecter) GetByRepoId(ctx interface{}, repoId interface{}) *MockReposInterface_GetByRepoId_Call { - return &MockReposInterface_GetByRepoId_Call{Call: _e.mock.On("GetByRepoId", ctx, repoId)} -} - -func (_c *MockReposInterface_GetByRepoId_Call) Run(run func(ctx context.Context, repoId int64)) *MockReposInterface_GetByRepoId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(int64)) - }) - return _c -} - -func (_c *MockReposInterface_GetByRepoId_Call) Return(_a0 *workspace.GetRepoResponse, _a1 error) *MockReposInterface_GetByRepoId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_GetByRepoId_Call) RunAndReturn(run func(context.Context, int64) (*workspace.GetRepoResponse, error)) *MockReposInterface_GetByRepoId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) GetPermissionLevels(ctx context.Context, request workspace.GetRepoPermissionLevelsRequest) (*workspace.GetRepoPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *workspace.GetRepoPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetRepoPermissionLevelsRequest) (*workspace.GetRepoPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetRepoPermissionLevelsRequest) *workspace.GetRepoPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetRepoPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetRepoPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockReposInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetRepoPermissionLevelsRequest -func (_e *MockReposInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockReposInterface_GetPermissionLevels_Call { - return &MockReposInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockReposInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request workspace.GetRepoPermissionLevelsRequest)) *MockReposInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetRepoPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockReposInterface_GetPermissionLevels_Call) Return(_a0 *workspace.GetRepoPermissionLevelsResponse, _a1 error) *MockReposInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, workspace.GetRepoPermissionLevelsRequest) (*workspace.GetRepoPermissionLevelsResponse, error)) *MockReposInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByRepoId provides a mock function with given fields: ctx, repoId -func (_m *MockReposInterface) GetPermissionLevelsByRepoId(ctx context.Context, repoId string) (*workspace.GetRepoPermissionLevelsResponse, error) { - ret := _m.Called(ctx, repoId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByRepoId") - } - - var r0 *workspace.GetRepoPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.GetRepoPermissionLevelsResponse, error)); ok { - return rf(ctx, repoId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.GetRepoPermissionLevelsResponse); ok { - r0 = rf(ctx, repoId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetRepoPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, repoId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_GetPermissionLevelsByRepoId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByRepoId' -type MockReposInterface_GetPermissionLevelsByRepoId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByRepoId is a helper method to define mock.On call -// - ctx context.Context -// - repoId string -func (_e *MockReposInterface_Expecter) GetPermissionLevelsByRepoId(ctx interface{}, repoId interface{}) *MockReposInterface_GetPermissionLevelsByRepoId_Call { - return &MockReposInterface_GetPermissionLevelsByRepoId_Call{Call: _e.mock.On("GetPermissionLevelsByRepoId", ctx, repoId)} -} - -func (_c *MockReposInterface_GetPermissionLevelsByRepoId_Call) Run(run func(ctx context.Context, repoId string)) *MockReposInterface_GetPermissionLevelsByRepoId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockReposInterface_GetPermissionLevelsByRepoId_Call) Return(_a0 *workspace.GetRepoPermissionLevelsResponse, _a1 error) *MockReposInterface_GetPermissionLevelsByRepoId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_GetPermissionLevelsByRepoId_Call) RunAndReturn(run func(context.Context, string) (*workspace.GetRepoPermissionLevelsResponse, error)) *MockReposInterface_GetPermissionLevelsByRepoId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) GetPermissions(ctx context.Context, request workspace.GetRepoPermissionsRequest) (*workspace.RepoPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *workspace.RepoPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetRepoPermissionsRequest) (*workspace.RepoPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetRepoPermissionsRequest) *workspace.RepoPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.RepoPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetRepoPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockReposInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetRepoPermissionsRequest -func (_e *MockReposInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockReposInterface_GetPermissions_Call { - return &MockReposInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockReposInterface_GetPermissions_Call) Run(run func(ctx context.Context, request workspace.GetRepoPermissionsRequest)) *MockReposInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetRepoPermissionsRequest)) - }) - return _c -} - -func (_c *MockReposInterface_GetPermissions_Call) Return(_a0 *workspace.RepoPermissions, _a1 error) *MockReposInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, workspace.GetRepoPermissionsRequest) (*workspace.RepoPermissions, error)) *MockReposInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByRepoId provides a mock function with given fields: ctx, repoId -func (_m *MockReposInterface) GetPermissionsByRepoId(ctx context.Context, repoId string) (*workspace.RepoPermissions, error) { - ret := _m.Called(ctx, repoId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByRepoId") - } - - var r0 *workspace.RepoPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.RepoPermissions, error)); ok { - return rf(ctx, repoId) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.RepoPermissions); ok { - r0 = rf(ctx, repoId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.RepoPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, repoId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_GetPermissionsByRepoId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByRepoId' -type MockReposInterface_GetPermissionsByRepoId_Call struct { - *mock.Call -} - -// GetPermissionsByRepoId is a helper method to define mock.On call -// - ctx context.Context -// - repoId string -func (_e *MockReposInterface_Expecter) GetPermissionsByRepoId(ctx interface{}, repoId interface{}) *MockReposInterface_GetPermissionsByRepoId_Call { - return &MockReposInterface_GetPermissionsByRepoId_Call{Call: _e.mock.On("GetPermissionsByRepoId", ctx, repoId)} -} - -func (_c *MockReposInterface_GetPermissionsByRepoId_Call) Run(run func(ctx context.Context, repoId string)) *MockReposInterface_GetPermissionsByRepoId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockReposInterface_GetPermissionsByRepoId_Call) Return(_a0 *workspace.RepoPermissions, _a1 error) *MockReposInterface_GetPermissionsByRepoId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_GetPermissionsByRepoId_Call) RunAndReturn(run func(context.Context, string) (*workspace.RepoPermissions, error)) *MockReposInterface_GetPermissionsByRepoId_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) List(ctx context.Context, request workspace.ListReposRequest) listing.Iterator[workspace.RepoInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[workspace.RepoInfo] - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListReposRequest) listing.Iterator[workspace.RepoInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[workspace.RepoInfo]) - } - } - - return r0 -} - -// MockReposInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockReposInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListReposRequest -func (_e *MockReposInterface_Expecter) List(ctx interface{}, request interface{}) *MockReposInterface_List_Call { - return &MockReposInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockReposInterface_List_Call) Run(run func(ctx context.Context, request workspace.ListReposRequest)) *MockReposInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListReposRequest)) - }) - return _c -} - -func (_c *MockReposInterface_List_Call) Return(_a0 listing.Iterator[workspace.RepoInfo]) *MockReposInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockReposInterface_List_Call) RunAndReturn(run func(context.Context, workspace.ListReposRequest) listing.Iterator[workspace.RepoInfo]) *MockReposInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) ListAll(ctx context.Context, request workspace.ListReposRequest) ([]workspace.RepoInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []workspace.RepoInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListReposRequest) ([]workspace.RepoInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListReposRequest) []workspace.RepoInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]workspace.RepoInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.ListReposRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockReposInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListReposRequest -func (_e *MockReposInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockReposInterface_ListAll_Call { - return &MockReposInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockReposInterface_ListAll_Call) Run(run func(ctx context.Context, request workspace.ListReposRequest)) *MockReposInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListReposRequest)) - }) - return _c -} - -func (_c *MockReposInterface_ListAll_Call) Return(_a0 []workspace.RepoInfo, _a1 error) *MockReposInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_ListAll_Call) RunAndReturn(run func(context.Context, workspace.ListReposRequest) ([]workspace.RepoInfo, error)) *MockReposInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// RepoInfoPathToIdMap provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) RepoInfoPathToIdMap(ctx context.Context, request workspace.ListReposRequest) (map[string]int64, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for RepoInfoPathToIdMap") - } - - var r0 map[string]int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListReposRequest) (map[string]int64, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListReposRequest) map[string]int64); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]int64) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.ListReposRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_RepoInfoPathToIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepoInfoPathToIdMap' -type MockReposInterface_RepoInfoPathToIdMap_Call struct { - *mock.Call -} - -// RepoInfoPathToIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListReposRequest -func (_e *MockReposInterface_Expecter) RepoInfoPathToIdMap(ctx interface{}, request interface{}) *MockReposInterface_RepoInfoPathToIdMap_Call { - return &MockReposInterface_RepoInfoPathToIdMap_Call{Call: _e.mock.On("RepoInfoPathToIdMap", ctx, request)} -} - -func (_c *MockReposInterface_RepoInfoPathToIdMap_Call) Run(run func(ctx context.Context, request workspace.ListReposRequest)) *MockReposInterface_RepoInfoPathToIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListReposRequest)) - }) - return _c -} - -func (_c *MockReposInterface_RepoInfoPathToIdMap_Call) Return(_a0 map[string]int64, _a1 error) *MockReposInterface_RepoInfoPathToIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_RepoInfoPathToIdMap_Call) RunAndReturn(run func(context.Context, workspace.ListReposRequest) (map[string]int64, error)) *MockReposInterface_RepoInfoPathToIdMap_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) SetPermissions(ctx context.Context, request workspace.RepoPermissionsRequest) (*workspace.RepoPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *workspace.RepoPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.RepoPermissionsRequest) (*workspace.RepoPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.RepoPermissionsRequest) *workspace.RepoPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.RepoPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.RepoPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockReposInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.RepoPermissionsRequest -func (_e *MockReposInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockReposInterface_SetPermissions_Call { - return &MockReposInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockReposInterface_SetPermissions_Call) Run(run func(ctx context.Context, request workspace.RepoPermissionsRequest)) *MockReposInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.RepoPermissionsRequest)) - }) - return _c -} - -func (_c *MockReposInterface_SetPermissions_Call) Return(_a0 *workspace.RepoPermissions, _a1 error) *MockReposInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, workspace.RepoPermissionsRequest) (*workspace.RepoPermissions, error)) *MockReposInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// Update provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) Update(ctx context.Context, request workspace.UpdateRepoRequest) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.UpdateRepoRequest) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockReposInterface_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' -type MockReposInterface_Update_Call struct { - *mock.Call -} - -// Update is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.UpdateRepoRequest -func (_e *MockReposInterface_Expecter) Update(ctx interface{}, request interface{}) *MockReposInterface_Update_Call { - return &MockReposInterface_Update_Call{Call: _e.mock.On("Update", ctx, request)} -} - -func (_c *MockReposInterface_Update_Call) Run(run func(ctx context.Context, request workspace.UpdateRepoRequest)) *MockReposInterface_Update_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.UpdateRepoRequest)) - }) - return _c -} - -func (_c *MockReposInterface_Update_Call) Return(_a0 error) *MockReposInterface_Update_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockReposInterface_Update_Call) RunAndReturn(run func(context.Context, workspace.UpdateRepoRequest) error) *MockReposInterface_Update_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockReposInterface) UpdatePermissions(ctx context.Context, request workspace.RepoPermissionsRequest) (*workspace.RepoPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *workspace.RepoPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.RepoPermissionsRequest) (*workspace.RepoPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.RepoPermissionsRequest) *workspace.RepoPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.RepoPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.RepoPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockReposInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockReposInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.RepoPermissionsRequest -func (_e *MockReposInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockReposInterface_UpdatePermissions_Call { - return &MockReposInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockReposInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request workspace.RepoPermissionsRequest)) *MockReposInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.RepoPermissionsRequest)) - }) - return _c -} - -func (_c *MockReposInterface_UpdatePermissions_Call) Return(_a0 *workspace.RepoPermissions, _a1 error) *MockReposInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockReposInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, workspace.RepoPermissionsRequest) (*workspace.RepoPermissions, error)) *MockReposInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// NewMockReposInterface creates a new instance of MockReposInterface. 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 NewMockReposInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockReposInterface { - mock := &MockReposInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/workspace/mock_secrets_interface.go b/experimental/mocks/service/workspace/mock_secrets_interface.go deleted file mode 100644 index cb469e55c..000000000 --- a/experimental/mocks/service/workspace/mock_secrets_interface.go +++ /dev/null @@ -1,926 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package workspace - -import ( - context "context" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - workspace "github.com/databricks/databricks-sdk-go/service/workspace" -) - -// MockSecretsInterface is an autogenerated mock type for the SecretsInterface type -type MockSecretsInterface struct { - mock.Mock -} - -type MockSecretsInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockSecretsInterface) EXPECT() *MockSecretsInterface_Expecter { - return &MockSecretsInterface_Expecter{mock: &_m.Mock} -} - -// CreateScope provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) CreateScope(ctx context.Context, request workspace.CreateScope) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for CreateScope") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.CreateScope) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSecretsInterface_CreateScope_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateScope' -type MockSecretsInterface_CreateScope_Call struct { - *mock.Call -} - -// CreateScope is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.CreateScope -func (_e *MockSecretsInterface_Expecter) CreateScope(ctx interface{}, request interface{}) *MockSecretsInterface_CreateScope_Call { - return &MockSecretsInterface_CreateScope_Call{Call: _e.mock.On("CreateScope", ctx, request)} -} - -func (_c *MockSecretsInterface_CreateScope_Call) Run(run func(ctx context.Context, request workspace.CreateScope)) *MockSecretsInterface_CreateScope_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.CreateScope)) - }) - return _c -} - -func (_c *MockSecretsInterface_CreateScope_Call) Return(_a0 error) *MockSecretsInterface_CreateScope_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_CreateScope_Call) RunAndReturn(run func(context.Context, workspace.CreateScope) error) *MockSecretsInterface_CreateScope_Call { - _c.Call.Return(run) - return _c -} - -// DeleteAcl provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) DeleteAcl(ctx context.Context, request workspace.DeleteAcl) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteAcl") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.DeleteAcl) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSecretsInterface_DeleteAcl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAcl' -type MockSecretsInterface_DeleteAcl_Call struct { - *mock.Call -} - -// DeleteAcl is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.DeleteAcl -func (_e *MockSecretsInterface_Expecter) DeleteAcl(ctx interface{}, request interface{}) *MockSecretsInterface_DeleteAcl_Call { - return &MockSecretsInterface_DeleteAcl_Call{Call: _e.mock.On("DeleteAcl", ctx, request)} -} - -func (_c *MockSecretsInterface_DeleteAcl_Call) Run(run func(ctx context.Context, request workspace.DeleteAcl)) *MockSecretsInterface_DeleteAcl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.DeleteAcl)) - }) - return _c -} - -func (_c *MockSecretsInterface_DeleteAcl_Call) Return(_a0 error) *MockSecretsInterface_DeleteAcl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_DeleteAcl_Call) RunAndReturn(run func(context.Context, workspace.DeleteAcl) error) *MockSecretsInterface_DeleteAcl_Call { - _c.Call.Return(run) - return _c -} - -// DeleteScope provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) DeleteScope(ctx context.Context, request workspace.DeleteScope) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteScope") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.DeleteScope) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSecretsInterface_DeleteScope_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteScope' -type MockSecretsInterface_DeleteScope_Call struct { - *mock.Call -} - -// DeleteScope is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.DeleteScope -func (_e *MockSecretsInterface_Expecter) DeleteScope(ctx interface{}, request interface{}) *MockSecretsInterface_DeleteScope_Call { - return &MockSecretsInterface_DeleteScope_Call{Call: _e.mock.On("DeleteScope", ctx, request)} -} - -func (_c *MockSecretsInterface_DeleteScope_Call) Run(run func(ctx context.Context, request workspace.DeleteScope)) *MockSecretsInterface_DeleteScope_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.DeleteScope)) - }) - return _c -} - -func (_c *MockSecretsInterface_DeleteScope_Call) Return(_a0 error) *MockSecretsInterface_DeleteScope_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_DeleteScope_Call) RunAndReturn(run func(context.Context, workspace.DeleteScope) error) *MockSecretsInterface_DeleteScope_Call { - _c.Call.Return(run) - return _c -} - -// DeleteScopeByScope provides a mock function with given fields: ctx, scope -func (_m *MockSecretsInterface) DeleteScopeByScope(ctx context.Context, scope string) error { - ret := _m.Called(ctx, scope) - - if len(ret) == 0 { - panic("no return value specified for DeleteScopeByScope") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, scope) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSecretsInterface_DeleteScopeByScope_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteScopeByScope' -type MockSecretsInterface_DeleteScopeByScope_Call struct { - *mock.Call -} - -// DeleteScopeByScope is a helper method to define mock.On call -// - ctx context.Context -// - scope string -func (_e *MockSecretsInterface_Expecter) DeleteScopeByScope(ctx interface{}, scope interface{}) *MockSecretsInterface_DeleteScopeByScope_Call { - return &MockSecretsInterface_DeleteScopeByScope_Call{Call: _e.mock.On("DeleteScopeByScope", ctx, scope)} -} - -func (_c *MockSecretsInterface_DeleteScopeByScope_Call) Run(run func(ctx context.Context, scope string)) *MockSecretsInterface_DeleteScopeByScope_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSecretsInterface_DeleteScopeByScope_Call) Return(_a0 error) *MockSecretsInterface_DeleteScopeByScope_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_DeleteScopeByScope_Call) RunAndReturn(run func(context.Context, string) error) *MockSecretsInterface_DeleteScopeByScope_Call { - _c.Call.Return(run) - return _c -} - -// DeleteSecret provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) DeleteSecret(ctx context.Context, request workspace.DeleteSecret) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for DeleteSecret") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.DeleteSecret) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSecretsInterface_DeleteSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSecret' -type MockSecretsInterface_DeleteSecret_Call struct { - *mock.Call -} - -// DeleteSecret is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.DeleteSecret -func (_e *MockSecretsInterface_Expecter) DeleteSecret(ctx interface{}, request interface{}) *MockSecretsInterface_DeleteSecret_Call { - return &MockSecretsInterface_DeleteSecret_Call{Call: _e.mock.On("DeleteSecret", ctx, request)} -} - -func (_c *MockSecretsInterface_DeleteSecret_Call) Run(run func(ctx context.Context, request workspace.DeleteSecret)) *MockSecretsInterface_DeleteSecret_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.DeleteSecret)) - }) - return _c -} - -func (_c *MockSecretsInterface_DeleteSecret_Call) Return(_a0 error) *MockSecretsInterface_DeleteSecret_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_DeleteSecret_Call) RunAndReturn(run func(context.Context, workspace.DeleteSecret) error) *MockSecretsInterface_DeleteSecret_Call { - _c.Call.Return(run) - return _c -} - -// GetAcl provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) GetAcl(ctx context.Context, request workspace.GetAclRequest) (*workspace.AclItem, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetAcl") - } - - var r0 *workspace.AclItem - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetAclRequest) (*workspace.AclItem, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetAclRequest) *workspace.AclItem); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.AclItem) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetAclRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSecretsInterface_GetAcl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAcl' -type MockSecretsInterface_GetAcl_Call struct { - *mock.Call -} - -// GetAcl is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetAclRequest -func (_e *MockSecretsInterface_Expecter) GetAcl(ctx interface{}, request interface{}) *MockSecretsInterface_GetAcl_Call { - return &MockSecretsInterface_GetAcl_Call{Call: _e.mock.On("GetAcl", ctx, request)} -} - -func (_c *MockSecretsInterface_GetAcl_Call) Run(run func(ctx context.Context, request workspace.GetAclRequest)) *MockSecretsInterface_GetAcl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetAclRequest)) - }) - return _c -} - -func (_c *MockSecretsInterface_GetAcl_Call) Return(_a0 *workspace.AclItem, _a1 error) *MockSecretsInterface_GetAcl_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSecretsInterface_GetAcl_Call) RunAndReturn(run func(context.Context, workspace.GetAclRequest) (*workspace.AclItem, error)) *MockSecretsInterface_GetAcl_Call { - _c.Call.Return(run) - return _c -} - -// GetSecret provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) GetSecret(ctx context.Context, request workspace.GetSecretRequest) (*workspace.GetSecretResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetSecret") - } - - var r0 *workspace.GetSecretResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetSecretRequest) (*workspace.GetSecretResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetSecretRequest) *workspace.GetSecretResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetSecretResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetSecretRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSecretsInterface_GetSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSecret' -type MockSecretsInterface_GetSecret_Call struct { - *mock.Call -} - -// GetSecret is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetSecretRequest -func (_e *MockSecretsInterface_Expecter) GetSecret(ctx interface{}, request interface{}) *MockSecretsInterface_GetSecret_Call { - return &MockSecretsInterface_GetSecret_Call{Call: _e.mock.On("GetSecret", ctx, request)} -} - -func (_c *MockSecretsInterface_GetSecret_Call) Run(run func(ctx context.Context, request workspace.GetSecretRequest)) *MockSecretsInterface_GetSecret_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetSecretRequest)) - }) - return _c -} - -func (_c *MockSecretsInterface_GetSecret_Call) Return(_a0 *workspace.GetSecretResponse, _a1 error) *MockSecretsInterface_GetSecret_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSecretsInterface_GetSecret_Call) RunAndReturn(run func(context.Context, workspace.GetSecretRequest) (*workspace.GetSecretResponse, error)) *MockSecretsInterface_GetSecret_Call { - _c.Call.Return(run) - return _c -} - -// ListAcls provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) ListAcls(ctx context.Context, request workspace.ListAclsRequest) listing.Iterator[workspace.AclItem] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAcls") - } - - var r0 listing.Iterator[workspace.AclItem] - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListAclsRequest) listing.Iterator[workspace.AclItem]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[workspace.AclItem]) - } - } - - return r0 -} - -// MockSecretsInterface_ListAcls_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAcls' -type MockSecretsInterface_ListAcls_Call struct { - *mock.Call -} - -// ListAcls is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListAclsRequest -func (_e *MockSecretsInterface_Expecter) ListAcls(ctx interface{}, request interface{}) *MockSecretsInterface_ListAcls_Call { - return &MockSecretsInterface_ListAcls_Call{Call: _e.mock.On("ListAcls", ctx, request)} -} - -func (_c *MockSecretsInterface_ListAcls_Call) Run(run func(ctx context.Context, request workspace.ListAclsRequest)) *MockSecretsInterface_ListAcls_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListAclsRequest)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListAcls_Call) Return(_a0 listing.Iterator[workspace.AclItem]) *MockSecretsInterface_ListAcls_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_ListAcls_Call) RunAndReturn(run func(context.Context, workspace.ListAclsRequest) listing.Iterator[workspace.AclItem]) *MockSecretsInterface_ListAcls_Call { - _c.Call.Return(run) - return _c -} - -// ListAclsAll provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) ListAclsAll(ctx context.Context, request workspace.ListAclsRequest) ([]workspace.AclItem, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAclsAll") - } - - var r0 []workspace.AclItem - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListAclsRequest) ([]workspace.AclItem, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListAclsRequest) []workspace.AclItem); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]workspace.AclItem) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.ListAclsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSecretsInterface_ListAclsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAclsAll' -type MockSecretsInterface_ListAclsAll_Call struct { - *mock.Call -} - -// ListAclsAll is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListAclsRequest -func (_e *MockSecretsInterface_Expecter) ListAclsAll(ctx interface{}, request interface{}) *MockSecretsInterface_ListAclsAll_Call { - return &MockSecretsInterface_ListAclsAll_Call{Call: _e.mock.On("ListAclsAll", ctx, request)} -} - -func (_c *MockSecretsInterface_ListAclsAll_Call) Run(run func(ctx context.Context, request workspace.ListAclsRequest)) *MockSecretsInterface_ListAclsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListAclsRequest)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListAclsAll_Call) Return(_a0 []workspace.AclItem, _a1 error) *MockSecretsInterface_ListAclsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSecretsInterface_ListAclsAll_Call) RunAndReturn(run func(context.Context, workspace.ListAclsRequest) ([]workspace.AclItem, error)) *MockSecretsInterface_ListAclsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListAclsByScope provides a mock function with given fields: ctx, scope -func (_m *MockSecretsInterface) ListAclsByScope(ctx context.Context, scope string) (*workspace.ListAclsResponse, error) { - ret := _m.Called(ctx, scope) - - if len(ret) == 0 { - panic("no return value specified for ListAclsByScope") - } - - var r0 *workspace.ListAclsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.ListAclsResponse, error)); ok { - return rf(ctx, scope) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.ListAclsResponse); ok { - r0 = rf(ctx, scope) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.ListAclsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, scope) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSecretsInterface_ListAclsByScope_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAclsByScope' -type MockSecretsInterface_ListAclsByScope_Call struct { - *mock.Call -} - -// ListAclsByScope is a helper method to define mock.On call -// - ctx context.Context -// - scope string -func (_e *MockSecretsInterface_Expecter) ListAclsByScope(ctx interface{}, scope interface{}) *MockSecretsInterface_ListAclsByScope_Call { - return &MockSecretsInterface_ListAclsByScope_Call{Call: _e.mock.On("ListAclsByScope", ctx, scope)} -} - -func (_c *MockSecretsInterface_ListAclsByScope_Call) Run(run func(ctx context.Context, scope string)) *MockSecretsInterface_ListAclsByScope_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListAclsByScope_Call) Return(_a0 *workspace.ListAclsResponse, _a1 error) *MockSecretsInterface_ListAclsByScope_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSecretsInterface_ListAclsByScope_Call) RunAndReturn(run func(context.Context, string) (*workspace.ListAclsResponse, error)) *MockSecretsInterface_ListAclsByScope_Call { - _c.Call.Return(run) - return _c -} - -// ListScopes provides a mock function with given fields: ctx -func (_m *MockSecretsInterface) ListScopes(ctx context.Context) listing.Iterator[workspace.SecretScope] { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListScopes") - } - - var r0 listing.Iterator[workspace.SecretScope] - if rf, ok := ret.Get(0).(func(context.Context) listing.Iterator[workspace.SecretScope]); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[workspace.SecretScope]) - } - } - - return r0 -} - -// MockSecretsInterface_ListScopes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListScopes' -type MockSecretsInterface_ListScopes_Call struct { - *mock.Call -} - -// ListScopes is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockSecretsInterface_Expecter) ListScopes(ctx interface{}) *MockSecretsInterface_ListScopes_Call { - return &MockSecretsInterface_ListScopes_Call{Call: _e.mock.On("ListScopes", ctx)} -} - -func (_c *MockSecretsInterface_ListScopes_Call) Run(run func(ctx context.Context)) *MockSecretsInterface_ListScopes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListScopes_Call) Return(_a0 listing.Iterator[workspace.SecretScope]) *MockSecretsInterface_ListScopes_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_ListScopes_Call) RunAndReturn(run func(context.Context) listing.Iterator[workspace.SecretScope]) *MockSecretsInterface_ListScopes_Call { - _c.Call.Return(run) - return _c -} - -// ListScopesAll provides a mock function with given fields: ctx -func (_m *MockSecretsInterface) ListScopesAll(ctx context.Context) ([]workspace.SecretScope, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for ListScopesAll") - } - - var r0 []workspace.SecretScope - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]workspace.SecretScope, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []workspace.SecretScope); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]workspace.SecretScope) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSecretsInterface_ListScopesAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListScopesAll' -type MockSecretsInterface_ListScopesAll_Call struct { - *mock.Call -} - -// ListScopesAll is a helper method to define mock.On call -// - ctx context.Context -func (_e *MockSecretsInterface_Expecter) ListScopesAll(ctx interface{}) *MockSecretsInterface_ListScopesAll_Call { - return &MockSecretsInterface_ListScopesAll_Call{Call: _e.mock.On("ListScopesAll", ctx)} -} - -func (_c *MockSecretsInterface_ListScopesAll_Call) Run(run func(ctx context.Context)) *MockSecretsInterface_ListScopesAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListScopesAll_Call) Return(_a0 []workspace.SecretScope, _a1 error) *MockSecretsInterface_ListScopesAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSecretsInterface_ListScopesAll_Call) RunAndReturn(run func(context.Context) ([]workspace.SecretScope, error)) *MockSecretsInterface_ListScopesAll_Call { - _c.Call.Return(run) - return _c -} - -// ListSecrets provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) ListSecrets(ctx context.Context, request workspace.ListSecretsRequest) listing.Iterator[workspace.SecretMetadata] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSecrets") - } - - var r0 listing.Iterator[workspace.SecretMetadata] - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListSecretsRequest) listing.Iterator[workspace.SecretMetadata]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[workspace.SecretMetadata]) - } - } - - return r0 -} - -// MockSecretsInterface_ListSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSecrets' -type MockSecretsInterface_ListSecrets_Call struct { - *mock.Call -} - -// ListSecrets is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListSecretsRequest -func (_e *MockSecretsInterface_Expecter) ListSecrets(ctx interface{}, request interface{}) *MockSecretsInterface_ListSecrets_Call { - return &MockSecretsInterface_ListSecrets_Call{Call: _e.mock.On("ListSecrets", ctx, request)} -} - -func (_c *MockSecretsInterface_ListSecrets_Call) Run(run func(ctx context.Context, request workspace.ListSecretsRequest)) *MockSecretsInterface_ListSecrets_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListSecretsRequest)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListSecrets_Call) Return(_a0 listing.Iterator[workspace.SecretMetadata]) *MockSecretsInterface_ListSecrets_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_ListSecrets_Call) RunAndReturn(run func(context.Context, workspace.ListSecretsRequest) listing.Iterator[workspace.SecretMetadata]) *MockSecretsInterface_ListSecrets_Call { - _c.Call.Return(run) - return _c -} - -// ListSecretsAll provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) ListSecretsAll(ctx context.Context, request workspace.ListSecretsRequest) ([]workspace.SecretMetadata, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListSecretsAll") - } - - var r0 []workspace.SecretMetadata - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListSecretsRequest) ([]workspace.SecretMetadata, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListSecretsRequest) []workspace.SecretMetadata); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]workspace.SecretMetadata) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.ListSecretsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSecretsInterface_ListSecretsAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSecretsAll' -type MockSecretsInterface_ListSecretsAll_Call struct { - *mock.Call -} - -// ListSecretsAll is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListSecretsRequest -func (_e *MockSecretsInterface_Expecter) ListSecretsAll(ctx interface{}, request interface{}) *MockSecretsInterface_ListSecretsAll_Call { - return &MockSecretsInterface_ListSecretsAll_Call{Call: _e.mock.On("ListSecretsAll", ctx, request)} -} - -func (_c *MockSecretsInterface_ListSecretsAll_Call) Run(run func(ctx context.Context, request workspace.ListSecretsRequest)) *MockSecretsInterface_ListSecretsAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListSecretsRequest)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListSecretsAll_Call) Return(_a0 []workspace.SecretMetadata, _a1 error) *MockSecretsInterface_ListSecretsAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSecretsInterface_ListSecretsAll_Call) RunAndReturn(run func(context.Context, workspace.ListSecretsRequest) ([]workspace.SecretMetadata, error)) *MockSecretsInterface_ListSecretsAll_Call { - _c.Call.Return(run) - return _c -} - -// ListSecretsByScope provides a mock function with given fields: ctx, scope -func (_m *MockSecretsInterface) ListSecretsByScope(ctx context.Context, scope string) (*workspace.ListSecretsResponse, error) { - ret := _m.Called(ctx, scope) - - if len(ret) == 0 { - panic("no return value specified for ListSecretsByScope") - } - - var r0 *workspace.ListSecretsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.ListSecretsResponse, error)); ok { - return rf(ctx, scope) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.ListSecretsResponse); ok { - r0 = rf(ctx, scope) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.ListSecretsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, scope) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockSecretsInterface_ListSecretsByScope_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSecretsByScope' -type MockSecretsInterface_ListSecretsByScope_Call struct { - *mock.Call -} - -// ListSecretsByScope is a helper method to define mock.On call -// - ctx context.Context -// - scope string -func (_e *MockSecretsInterface_Expecter) ListSecretsByScope(ctx interface{}, scope interface{}) *MockSecretsInterface_ListSecretsByScope_Call { - return &MockSecretsInterface_ListSecretsByScope_Call{Call: _e.mock.On("ListSecretsByScope", ctx, scope)} -} - -func (_c *MockSecretsInterface_ListSecretsByScope_Call) Run(run func(ctx context.Context, scope string)) *MockSecretsInterface_ListSecretsByScope_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockSecretsInterface_ListSecretsByScope_Call) Return(_a0 *workspace.ListSecretsResponse, _a1 error) *MockSecretsInterface_ListSecretsByScope_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockSecretsInterface_ListSecretsByScope_Call) RunAndReturn(run func(context.Context, string) (*workspace.ListSecretsResponse, error)) *MockSecretsInterface_ListSecretsByScope_Call { - _c.Call.Return(run) - return _c -} - -// PutAcl provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) PutAcl(ctx context.Context, request workspace.PutAcl) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for PutAcl") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.PutAcl) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSecretsInterface_PutAcl_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutAcl' -type MockSecretsInterface_PutAcl_Call struct { - *mock.Call -} - -// PutAcl is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.PutAcl -func (_e *MockSecretsInterface_Expecter) PutAcl(ctx interface{}, request interface{}) *MockSecretsInterface_PutAcl_Call { - return &MockSecretsInterface_PutAcl_Call{Call: _e.mock.On("PutAcl", ctx, request)} -} - -func (_c *MockSecretsInterface_PutAcl_Call) Run(run func(ctx context.Context, request workspace.PutAcl)) *MockSecretsInterface_PutAcl_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.PutAcl)) - }) - return _c -} - -func (_c *MockSecretsInterface_PutAcl_Call) Return(_a0 error) *MockSecretsInterface_PutAcl_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_PutAcl_Call) RunAndReturn(run func(context.Context, workspace.PutAcl) error) *MockSecretsInterface_PutAcl_Call { - _c.Call.Return(run) - return _c -} - -// PutSecret provides a mock function with given fields: ctx, request -func (_m *MockSecretsInterface) PutSecret(ctx context.Context, request workspace.PutSecret) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for PutSecret") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.PutSecret) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockSecretsInterface_PutSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PutSecret' -type MockSecretsInterface_PutSecret_Call struct { - *mock.Call -} - -// PutSecret is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.PutSecret -func (_e *MockSecretsInterface_Expecter) PutSecret(ctx interface{}, request interface{}) *MockSecretsInterface_PutSecret_Call { - return &MockSecretsInterface_PutSecret_Call{Call: _e.mock.On("PutSecret", ctx, request)} -} - -func (_c *MockSecretsInterface_PutSecret_Call) Run(run func(ctx context.Context, request workspace.PutSecret)) *MockSecretsInterface_PutSecret_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.PutSecret)) - }) - return _c -} - -func (_c *MockSecretsInterface_PutSecret_Call) Return(_a0 error) *MockSecretsInterface_PutSecret_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockSecretsInterface_PutSecret_Call) RunAndReturn(run func(context.Context, workspace.PutSecret) error) *MockSecretsInterface_PutSecret_Call { - _c.Call.Return(run) - return _c -} - -// NewMockSecretsInterface creates a new instance of MockSecretsInterface. 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 NewMockSecretsInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockSecretsInterface { - mock := &MockSecretsInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/experimental/mocks/service/workspace/mock_workspace_interface.go b/experimental/mocks/service/workspace/mock_workspace_interface.go deleted file mode 100644 index 30b2ecf5d..000000000 --- a/experimental/mocks/service/workspace/mock_workspace_interface.go +++ /dev/null @@ -1,1290 +0,0 @@ -// Code generated by mockery v2.43.0. DO NOT EDIT. - -package workspace - -import ( - context "context" - io "io" - - listing "github.com/databricks/databricks-sdk-go/listing" - mock "github.com/stretchr/testify/mock" - - workspace "github.com/databricks/databricks-sdk-go/service/workspace" -) - -// MockWorkspaceInterface is an autogenerated mock type for the WorkspaceInterface type -type MockWorkspaceInterface struct { - mock.Mock -} - -type MockWorkspaceInterface_Expecter struct { - mock *mock.Mock -} - -func (_m *MockWorkspaceInterface) EXPECT() *MockWorkspaceInterface_Expecter { - return &MockWorkspaceInterface_Expecter{mock: &_m.Mock} -} - -// Delete provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) Delete(ctx context.Context, request workspace.Delete) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.Delete) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceInterface_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type MockWorkspaceInterface_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.Delete -func (_e *MockWorkspaceInterface_Expecter) Delete(ctx interface{}, request interface{}) *MockWorkspaceInterface_Delete_Call { - return &MockWorkspaceInterface_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} -} - -func (_c *MockWorkspaceInterface_Delete_Call) Run(run func(ctx context.Context, request workspace.Delete)) *MockWorkspaceInterface_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.Delete)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_Delete_Call) Return(_a0 error) *MockWorkspaceInterface_Delete_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_Delete_Call) RunAndReturn(run func(context.Context, workspace.Delete) error) *MockWorkspaceInterface_Delete_Call { - _c.Call.Return(run) - return _c -} - -// Download provides a mock function with given fields: ctx, path, opts -func (_m *MockWorkspaceInterface) Download(ctx context.Context, path string, opts ...func(map[string]interface{})) (io.ReadCloser, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, path) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Download") - } - - var r0 io.ReadCloser - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, ...func(map[string]interface{})) (io.ReadCloser, error)); ok { - return rf(ctx, path, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, ...func(map[string]interface{})) io.ReadCloser); ok { - r0 = rf(ctx, path, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(io.ReadCloser) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, ...func(map[string]interface{})) error); ok { - r1 = rf(ctx, path, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download' -type MockWorkspaceInterface_Download_Call struct { - *mock.Call -} - -// Download is a helper method to define mock.On call -// - ctx context.Context -// - path string -// - opts ...func(map[string]interface{}) -func (_e *MockWorkspaceInterface_Expecter) Download(ctx interface{}, path interface{}, opts ...interface{}) *MockWorkspaceInterface_Download_Call { - return &MockWorkspaceInterface_Download_Call{Call: _e.mock.On("Download", - append([]interface{}{ctx, path}, opts...)...)} -} - -func (_c *MockWorkspaceInterface_Download_Call) Run(run func(ctx context.Context, path string, opts ...func(map[string]interface{}))) *MockWorkspaceInterface_Download_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]func(map[string]interface{}), len(args)-2) - for i, a := range args[2:] { - if a != nil { - variadicArgs[i] = a.(func(map[string]interface{})) - } - } - run(args[0].(context.Context), args[1].(string), variadicArgs...) - }) - return _c -} - -func (_c *MockWorkspaceInterface_Download_Call) Return(_a0 io.ReadCloser, _a1 error) *MockWorkspaceInterface_Download_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_Download_Call) RunAndReturn(run func(context.Context, string, ...func(map[string]interface{})) (io.ReadCloser, error)) *MockWorkspaceInterface_Download_Call { - _c.Call.Return(run) - return _c -} - -// Export provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) Export(ctx context.Context, request workspace.ExportRequest) (*workspace.ExportResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Export") - } - - var r0 *workspace.ExportResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.ExportRequest) (*workspace.ExportResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.ExportRequest) *workspace.ExportResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.ExportResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.ExportRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' -type MockWorkspaceInterface_Export_Call struct { - *mock.Call -} - -// Export is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ExportRequest -func (_e *MockWorkspaceInterface_Expecter) Export(ctx interface{}, request interface{}) *MockWorkspaceInterface_Export_Call { - return &MockWorkspaceInterface_Export_Call{Call: _e.mock.On("Export", ctx, request)} -} - -func (_c *MockWorkspaceInterface_Export_Call) Run(run func(ctx context.Context, request workspace.ExportRequest)) *MockWorkspaceInterface_Export_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ExportRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_Export_Call) Return(_a0 *workspace.ExportResponse, _a1 error) *MockWorkspaceInterface_Export_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_Export_Call) RunAndReturn(run func(context.Context, workspace.ExportRequest) (*workspace.ExportResponse, error)) *MockWorkspaceInterface_Export_Call { - _c.Call.Return(run) - return _c -} - -// GetByPath provides a mock function with given fields: ctx, name -func (_m *MockWorkspaceInterface) GetByPath(ctx context.Context, name string) (*workspace.ObjectInfo, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for GetByPath") - } - - var r0 *workspace.ObjectInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.ObjectInfo, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.ObjectInfo); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.ObjectInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_GetByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByPath' -type MockWorkspaceInterface_GetByPath_Call struct { - *mock.Call -} - -// GetByPath is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockWorkspaceInterface_Expecter) GetByPath(ctx interface{}, name interface{}) *MockWorkspaceInterface_GetByPath_Call { - return &MockWorkspaceInterface_GetByPath_Call{Call: _e.mock.On("GetByPath", ctx, name)} -} - -func (_c *MockWorkspaceInterface_GetByPath_Call) Run(run func(ctx context.Context, name string)) *MockWorkspaceInterface_GetByPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_GetByPath_Call) Return(_a0 *workspace.ObjectInfo, _a1 error) *MockWorkspaceInterface_GetByPath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_GetByPath_Call) RunAndReturn(run func(context.Context, string) (*workspace.ObjectInfo, error)) *MockWorkspaceInterface_GetByPath_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevels provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) GetPermissionLevels(ctx context.Context, request workspace.GetWorkspaceObjectPermissionLevelsRequest) (*workspace.GetWorkspaceObjectPermissionLevelsResponse, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevels") - } - - var r0 *workspace.GetWorkspaceObjectPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetWorkspaceObjectPermissionLevelsRequest) (*workspace.GetWorkspaceObjectPermissionLevelsResponse, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetWorkspaceObjectPermissionLevelsRequest) *workspace.GetWorkspaceObjectPermissionLevelsResponse); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetWorkspaceObjectPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetWorkspaceObjectPermissionLevelsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_GetPermissionLevels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevels' -type MockWorkspaceInterface_GetPermissionLevels_Call struct { - *mock.Call -} - -// GetPermissionLevels is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetWorkspaceObjectPermissionLevelsRequest -func (_e *MockWorkspaceInterface_Expecter) GetPermissionLevels(ctx interface{}, request interface{}) *MockWorkspaceInterface_GetPermissionLevels_Call { - return &MockWorkspaceInterface_GetPermissionLevels_Call{Call: _e.mock.On("GetPermissionLevels", ctx, request)} -} - -func (_c *MockWorkspaceInterface_GetPermissionLevels_Call) Run(run func(ctx context.Context, request workspace.GetWorkspaceObjectPermissionLevelsRequest)) *MockWorkspaceInterface_GetPermissionLevels_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetWorkspaceObjectPermissionLevelsRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissionLevels_Call) Return(_a0 *workspace.GetWorkspaceObjectPermissionLevelsResponse, _a1 error) *MockWorkspaceInterface_GetPermissionLevels_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissionLevels_Call) RunAndReturn(run func(context.Context, workspace.GetWorkspaceObjectPermissionLevelsRequest) (*workspace.GetWorkspaceObjectPermissionLevelsResponse, error)) *MockWorkspaceInterface_GetPermissionLevels_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId provides a mock function with given fields: ctx, workspaceObjectType, workspaceObjectId -func (_m *MockWorkspaceInterface) GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId(ctx context.Context, workspaceObjectType string, workspaceObjectId string) (*workspace.GetWorkspaceObjectPermissionLevelsResponse, error) { - ret := _m.Called(ctx, workspaceObjectType, workspaceObjectId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId") - } - - var r0 *workspace.GetWorkspaceObjectPermissionLevelsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*workspace.GetWorkspaceObjectPermissionLevelsResponse, error)); ok { - return rf(ctx, workspaceObjectType, workspaceObjectId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *workspace.GetWorkspaceObjectPermissionLevelsResponse); ok { - r0 = rf(ctx, workspaceObjectType, workspaceObjectId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.GetWorkspaceObjectPermissionLevelsResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, workspaceObjectType, workspaceObjectId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId' -type MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call struct { - *mock.Call -} - -// GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceObjectType string -// - workspaceObjectId string -func (_e *MockWorkspaceInterface_Expecter) GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId(ctx interface{}, workspaceObjectType interface{}, workspaceObjectId interface{}) *MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - return &MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call{Call: _e.mock.On("GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId", ctx, workspaceObjectType, workspaceObjectId)} -} - -func (_c *MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call) Run(run func(ctx context.Context, workspaceObjectType string, workspaceObjectId string)) *MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call) Return(_a0 *workspace.GetWorkspaceObjectPermissionLevelsResponse, _a1 error) *MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call) RunAndReturn(run func(context.Context, string, string) (*workspace.GetWorkspaceObjectPermissionLevelsResponse, error)) *MockWorkspaceInterface_GetPermissionLevelsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissions provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) GetPermissions(ctx context.Context, request workspace.GetWorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetPermissions") - } - - var r0 *workspace.WorkspaceObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetWorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetWorkspaceObjectPermissionsRequest) *workspace.WorkspaceObjectPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.WorkspaceObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetWorkspaceObjectPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_GetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissions' -type MockWorkspaceInterface_GetPermissions_Call struct { - *mock.Call -} - -// GetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetWorkspaceObjectPermissionsRequest -func (_e *MockWorkspaceInterface_Expecter) GetPermissions(ctx interface{}, request interface{}) *MockWorkspaceInterface_GetPermissions_Call { - return &MockWorkspaceInterface_GetPermissions_Call{Call: _e.mock.On("GetPermissions", ctx, request)} -} - -func (_c *MockWorkspaceInterface_GetPermissions_Call) Run(run func(ctx context.Context, request workspace.GetWorkspaceObjectPermissionsRequest)) *MockWorkspaceInterface_GetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetWorkspaceObjectPermissionsRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissions_Call) Return(_a0 *workspace.WorkspaceObjectPermissions, _a1 error) *MockWorkspaceInterface_GetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissions_Call) RunAndReturn(run func(context.Context, workspace.GetWorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error)) *MockWorkspaceInterface_GetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId provides a mock function with given fields: ctx, workspaceObjectType, workspaceObjectId -func (_m *MockWorkspaceInterface) GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId(ctx context.Context, workspaceObjectType string, workspaceObjectId string) (*workspace.WorkspaceObjectPermissions, error) { - ret := _m.Called(ctx, workspaceObjectType, workspaceObjectId) - - if len(ret) == 0 { - panic("no return value specified for GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId") - } - - var r0 *workspace.WorkspaceObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) (*workspace.WorkspaceObjectPermissions, error)); ok { - return rf(ctx, workspaceObjectType, workspaceObjectId) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string) *workspace.WorkspaceObjectPermissions); ok { - r0 = rf(ctx, workspaceObjectType, workspaceObjectId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.WorkspaceObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { - r1 = rf(ctx, workspaceObjectType, workspaceObjectId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId' -type MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call struct { - *mock.Call -} - -// GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId is a helper method to define mock.On call -// - ctx context.Context -// - workspaceObjectType string -// - workspaceObjectId string -func (_e *MockWorkspaceInterface_Expecter) GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId(ctx interface{}, workspaceObjectType interface{}, workspaceObjectId interface{}) *MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - return &MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call{Call: _e.mock.On("GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId", ctx, workspaceObjectType, workspaceObjectId)} -} - -func (_c *MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call) Run(run func(ctx context.Context, workspaceObjectType string, workspaceObjectId string)) *MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].(string)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call) Return(_a0 *workspace.WorkspaceObjectPermissions, _a1 error) *MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call) RunAndReturn(run func(context.Context, string, string) (*workspace.WorkspaceObjectPermissions, error)) *MockWorkspaceInterface_GetPermissionsByWorkspaceObjectTypeAndWorkspaceObjectId_Call { - _c.Call.Return(run) - return _c -} - -// GetStatus provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) GetStatus(ctx context.Context, request workspace.GetStatusRequest) (*workspace.ObjectInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for GetStatus") - } - - var r0 *workspace.ObjectInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetStatusRequest) (*workspace.ObjectInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.GetStatusRequest) *workspace.ObjectInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.ObjectInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.GetStatusRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_GetStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatus' -type MockWorkspaceInterface_GetStatus_Call struct { - *mock.Call -} - -// GetStatus is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.GetStatusRequest -func (_e *MockWorkspaceInterface_Expecter) GetStatus(ctx interface{}, request interface{}) *MockWorkspaceInterface_GetStatus_Call { - return &MockWorkspaceInterface_GetStatus_Call{Call: _e.mock.On("GetStatus", ctx, request)} -} - -func (_c *MockWorkspaceInterface_GetStatus_Call) Run(run func(ctx context.Context, request workspace.GetStatusRequest)) *MockWorkspaceInterface_GetStatus_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.GetStatusRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_GetStatus_Call) Return(_a0 *workspace.ObjectInfo, _a1 error) *MockWorkspaceInterface_GetStatus_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_GetStatus_Call) RunAndReturn(run func(context.Context, workspace.GetStatusRequest) (*workspace.ObjectInfo, error)) *MockWorkspaceInterface_GetStatus_Call { - _c.Call.Return(run) - return _c -} - -// GetStatusByPath provides a mock function with given fields: ctx, path -func (_m *MockWorkspaceInterface) GetStatusByPath(ctx context.Context, path string) (*workspace.ObjectInfo, error) { - ret := _m.Called(ctx, path) - - if len(ret) == 0 { - panic("no return value specified for GetStatusByPath") - } - - var r0 *workspace.ObjectInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*workspace.ObjectInfo, error)); ok { - return rf(ctx, path) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *workspace.ObjectInfo); ok { - r0 = rf(ctx, path) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.ObjectInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, path) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_GetStatusByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatusByPath' -type MockWorkspaceInterface_GetStatusByPath_Call struct { - *mock.Call -} - -// GetStatusByPath is a helper method to define mock.On call -// - ctx context.Context -// - path string -func (_e *MockWorkspaceInterface_Expecter) GetStatusByPath(ctx interface{}, path interface{}) *MockWorkspaceInterface_GetStatusByPath_Call { - return &MockWorkspaceInterface_GetStatusByPath_Call{Call: _e.mock.On("GetStatusByPath", ctx, path)} -} - -func (_c *MockWorkspaceInterface_GetStatusByPath_Call) Run(run func(ctx context.Context, path string)) *MockWorkspaceInterface_GetStatusByPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_GetStatusByPath_Call) Return(_a0 *workspace.ObjectInfo, _a1 error) *MockWorkspaceInterface_GetStatusByPath_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_GetStatusByPath_Call) RunAndReturn(run func(context.Context, string) (*workspace.ObjectInfo, error)) *MockWorkspaceInterface_GetStatusByPath_Call { - _c.Call.Return(run) - return _c -} - -// Import provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) Import(ctx context.Context, request workspace.Import) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Import") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.Import) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceInterface_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' -type MockWorkspaceInterface_Import_Call struct { - *mock.Call -} - -// Import is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.Import -func (_e *MockWorkspaceInterface_Expecter) Import(ctx interface{}, request interface{}) *MockWorkspaceInterface_Import_Call { - return &MockWorkspaceInterface_Import_Call{Call: _e.mock.On("Import", ctx, request)} -} - -func (_c *MockWorkspaceInterface_Import_Call) Run(run func(ctx context.Context, request workspace.Import)) *MockWorkspaceInterface_Import_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.Import)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_Import_Call) Return(_a0 error) *MockWorkspaceInterface_Import_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_Import_Call) RunAndReturn(run func(context.Context, workspace.Import) error) *MockWorkspaceInterface_Import_Call { - _c.Call.Return(run) - return _c -} - -// List provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) List(ctx context.Context, request workspace.ListWorkspaceRequest) listing.Iterator[workspace.ObjectInfo] { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 listing.Iterator[workspace.ObjectInfo] - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListWorkspaceRequest) listing.Iterator[workspace.ObjectInfo]); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(listing.Iterator[workspace.ObjectInfo]) - } - } - - return r0 -} - -// MockWorkspaceInterface_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' -type MockWorkspaceInterface_List_Call struct { - *mock.Call -} - -// List is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListWorkspaceRequest -func (_e *MockWorkspaceInterface_Expecter) List(ctx interface{}, request interface{}) *MockWorkspaceInterface_List_Call { - return &MockWorkspaceInterface_List_Call{Call: _e.mock.On("List", ctx, request)} -} - -func (_c *MockWorkspaceInterface_List_Call) Run(run func(ctx context.Context, request workspace.ListWorkspaceRequest)) *MockWorkspaceInterface_List_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListWorkspaceRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_List_Call) Return(_a0 listing.Iterator[workspace.ObjectInfo]) *MockWorkspaceInterface_List_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_List_Call) RunAndReturn(run func(context.Context, workspace.ListWorkspaceRequest) listing.Iterator[workspace.ObjectInfo]) *MockWorkspaceInterface_List_Call { - _c.Call.Return(run) - return _c -} - -// ListAll provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) ListAll(ctx context.Context, request workspace.ListWorkspaceRequest) ([]workspace.ObjectInfo, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ListAll") - } - - var r0 []workspace.ObjectInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListWorkspaceRequest) ([]workspace.ObjectInfo, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListWorkspaceRequest) []workspace.ObjectInfo); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]workspace.ObjectInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.ListWorkspaceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_ListAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAll' -type MockWorkspaceInterface_ListAll_Call struct { - *mock.Call -} - -// ListAll is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListWorkspaceRequest -func (_e *MockWorkspaceInterface_Expecter) ListAll(ctx interface{}, request interface{}) *MockWorkspaceInterface_ListAll_Call { - return &MockWorkspaceInterface_ListAll_Call{Call: _e.mock.On("ListAll", ctx, request)} -} - -func (_c *MockWorkspaceInterface_ListAll_Call) Run(run func(ctx context.Context, request workspace.ListWorkspaceRequest)) *MockWorkspaceInterface_ListAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListWorkspaceRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_ListAll_Call) Return(_a0 []workspace.ObjectInfo, _a1 error) *MockWorkspaceInterface_ListAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_ListAll_Call) RunAndReturn(run func(context.Context, workspace.ListWorkspaceRequest) ([]workspace.ObjectInfo, error)) *MockWorkspaceInterface_ListAll_Call { - _c.Call.Return(run) - return _c -} - -// Mkdirs provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) Mkdirs(ctx context.Context, request workspace.Mkdirs) error { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for Mkdirs") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.Mkdirs) error); ok { - r0 = rf(ctx, request) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceInterface_Mkdirs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mkdirs' -type MockWorkspaceInterface_Mkdirs_Call struct { - *mock.Call -} - -// Mkdirs is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.Mkdirs -func (_e *MockWorkspaceInterface_Expecter) Mkdirs(ctx interface{}, request interface{}) *MockWorkspaceInterface_Mkdirs_Call { - return &MockWorkspaceInterface_Mkdirs_Call{Call: _e.mock.On("Mkdirs", ctx, request)} -} - -func (_c *MockWorkspaceInterface_Mkdirs_Call) Run(run func(ctx context.Context, request workspace.Mkdirs)) *MockWorkspaceInterface_Mkdirs_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.Mkdirs)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_Mkdirs_Call) Return(_a0 error) *MockWorkspaceInterface_Mkdirs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_Mkdirs_Call) RunAndReturn(run func(context.Context, workspace.Mkdirs) error) *MockWorkspaceInterface_Mkdirs_Call { - _c.Call.Return(run) - return _c -} - -// MkdirsByPath provides a mock function with given fields: ctx, path -func (_m *MockWorkspaceInterface) MkdirsByPath(ctx context.Context, path string) error { - ret := _m.Called(ctx, path) - - if len(ret) == 0 { - panic("no return value specified for MkdirsByPath") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, path) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceInterface_MkdirsByPath_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MkdirsByPath' -type MockWorkspaceInterface_MkdirsByPath_Call struct { - *mock.Call -} - -// MkdirsByPath is a helper method to define mock.On call -// - ctx context.Context -// - path string -func (_e *MockWorkspaceInterface_Expecter) MkdirsByPath(ctx interface{}, path interface{}) *MockWorkspaceInterface_MkdirsByPath_Call { - return &MockWorkspaceInterface_MkdirsByPath_Call{Call: _e.mock.On("MkdirsByPath", ctx, path)} -} - -func (_c *MockWorkspaceInterface_MkdirsByPath_Call) Run(run func(ctx context.Context, path string)) *MockWorkspaceInterface_MkdirsByPath_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_MkdirsByPath_Call) Return(_a0 error) *MockWorkspaceInterface_MkdirsByPath_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_MkdirsByPath_Call) RunAndReturn(run func(context.Context, string) error) *MockWorkspaceInterface_MkdirsByPath_Call { - _c.Call.Return(run) - return _c -} - -// ObjectInfoPathToObjectIdMap provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) ObjectInfoPathToObjectIdMap(ctx context.Context, request workspace.ListWorkspaceRequest) (map[string]int64, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for ObjectInfoPathToObjectIdMap") - } - - var r0 map[string]int64 - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListWorkspaceRequest) (map[string]int64, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.ListWorkspaceRequest) map[string]int64); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]int64) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.ListWorkspaceRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ObjectInfoPathToObjectIdMap' -type MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call struct { - *mock.Call -} - -// ObjectInfoPathToObjectIdMap is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.ListWorkspaceRequest -func (_e *MockWorkspaceInterface_Expecter) ObjectInfoPathToObjectIdMap(ctx interface{}, request interface{}) *MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call { - return &MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call{Call: _e.mock.On("ObjectInfoPathToObjectIdMap", ctx, request)} -} - -func (_c *MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call) Run(run func(ctx context.Context, request workspace.ListWorkspaceRequest)) *MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.ListWorkspaceRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call) Return(_a0 map[string]int64, _a1 error) *MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call) RunAndReturn(run func(context.Context, workspace.ListWorkspaceRequest) (map[string]int64, error)) *MockWorkspaceInterface_ObjectInfoPathToObjectIdMap_Call { - _c.Call.Return(run) - return _c -} - -// ReadFile provides a mock function with given fields: ctx, name -func (_m *MockWorkspaceInterface) ReadFile(ctx context.Context, name string) ([]byte, error) { - ret := _m.Called(ctx, name) - - if len(ret) == 0 { - panic("no return value specified for ReadFile") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) ([]byte, error)); ok { - return rf(ctx, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string) []byte); ok { - r0 = rf(ctx, name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_ReadFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadFile' -type MockWorkspaceInterface_ReadFile_Call struct { - *mock.Call -} - -// ReadFile is a helper method to define mock.On call -// - ctx context.Context -// - name string -func (_e *MockWorkspaceInterface_Expecter) ReadFile(ctx interface{}, name interface{}) *MockWorkspaceInterface_ReadFile_Call { - return &MockWorkspaceInterface_ReadFile_Call{Call: _e.mock.On("ReadFile", ctx, name)} -} - -func (_c *MockWorkspaceInterface_ReadFile_Call) Run(run func(ctx context.Context, name string)) *MockWorkspaceInterface_ReadFile_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_ReadFile_Call) Return(_a0 []byte, _a1 error) *MockWorkspaceInterface_ReadFile_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_ReadFile_Call) RunAndReturn(run func(context.Context, string) ([]byte, error)) *MockWorkspaceInterface_ReadFile_Call { - _c.Call.Return(run) - return _c -} - -// RecursiveList provides a mock function with given fields: ctx, path -func (_m *MockWorkspaceInterface) RecursiveList(ctx context.Context, path string) ([]workspace.ObjectInfo, error) { - ret := _m.Called(ctx, path) - - if len(ret) == 0 { - panic("no return value specified for RecursiveList") - } - - var r0 []workspace.ObjectInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) ([]workspace.ObjectInfo, error)); ok { - return rf(ctx, path) - } - if rf, ok := ret.Get(0).(func(context.Context, string) []workspace.ObjectInfo); ok { - r0 = rf(ctx, path) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]workspace.ObjectInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, path) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_RecursiveList_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecursiveList' -type MockWorkspaceInterface_RecursiveList_Call struct { - *mock.Call -} - -// RecursiveList is a helper method to define mock.On call -// - ctx context.Context -// - path string -func (_e *MockWorkspaceInterface_Expecter) RecursiveList(ctx interface{}, path interface{}) *MockWorkspaceInterface_RecursiveList_Call { - return &MockWorkspaceInterface_RecursiveList_Call{Call: _e.mock.On("RecursiveList", ctx, path)} -} - -func (_c *MockWorkspaceInterface_RecursiveList_Call) Run(run func(ctx context.Context, path string)) *MockWorkspaceInterface_RecursiveList_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_RecursiveList_Call) Return(_a0 []workspace.ObjectInfo, _a1 error) *MockWorkspaceInterface_RecursiveList_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_RecursiveList_Call) RunAndReturn(run func(context.Context, string) ([]workspace.ObjectInfo, error)) *MockWorkspaceInterface_RecursiveList_Call { - _c.Call.Return(run) - return _c -} - -// SetPermissions provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) SetPermissions(ctx context.Context, request workspace.WorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for SetPermissions") - } - - var r0 *workspace.WorkspaceObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.WorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.WorkspaceObjectPermissionsRequest) *workspace.WorkspaceObjectPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.WorkspaceObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.WorkspaceObjectPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_SetPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPermissions' -type MockWorkspaceInterface_SetPermissions_Call struct { - *mock.Call -} - -// SetPermissions is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.WorkspaceObjectPermissionsRequest -func (_e *MockWorkspaceInterface_Expecter) SetPermissions(ctx interface{}, request interface{}) *MockWorkspaceInterface_SetPermissions_Call { - return &MockWorkspaceInterface_SetPermissions_Call{Call: _e.mock.On("SetPermissions", ctx, request)} -} - -func (_c *MockWorkspaceInterface_SetPermissions_Call) Run(run func(ctx context.Context, request workspace.WorkspaceObjectPermissionsRequest)) *MockWorkspaceInterface_SetPermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.WorkspaceObjectPermissionsRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_SetPermissions_Call) Return(_a0 *workspace.WorkspaceObjectPermissions, _a1 error) *MockWorkspaceInterface_SetPermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_SetPermissions_Call) RunAndReturn(run func(context.Context, workspace.WorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error)) *MockWorkspaceInterface_SetPermissions_Call { - _c.Call.Return(run) - return _c -} - -// UpdatePermissions provides a mock function with given fields: ctx, request -func (_m *MockWorkspaceInterface) UpdatePermissions(ctx context.Context, request workspace.WorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error) { - ret := _m.Called(ctx, request) - - if len(ret) == 0 { - panic("no return value specified for UpdatePermissions") - } - - var r0 *workspace.WorkspaceObjectPermissions - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, workspace.WorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error)); ok { - return rf(ctx, request) - } - if rf, ok := ret.Get(0).(func(context.Context, workspace.WorkspaceObjectPermissionsRequest) *workspace.WorkspaceObjectPermissions); ok { - r0 = rf(ctx, request) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*workspace.WorkspaceObjectPermissions) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, workspace.WorkspaceObjectPermissionsRequest) error); ok { - r1 = rf(ctx, request) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MockWorkspaceInterface_UpdatePermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermissions' -type MockWorkspaceInterface_UpdatePermissions_Call struct { - *mock.Call -} - -// UpdatePermissions is a helper method to define mock.On call -// - ctx context.Context -// - request workspace.WorkspaceObjectPermissionsRequest -func (_e *MockWorkspaceInterface_Expecter) UpdatePermissions(ctx interface{}, request interface{}) *MockWorkspaceInterface_UpdatePermissions_Call { - return &MockWorkspaceInterface_UpdatePermissions_Call{Call: _e.mock.On("UpdatePermissions", ctx, request)} -} - -func (_c *MockWorkspaceInterface_UpdatePermissions_Call) Run(run func(ctx context.Context, request workspace.WorkspaceObjectPermissionsRequest)) *MockWorkspaceInterface_UpdatePermissions_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(workspace.WorkspaceObjectPermissionsRequest)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_UpdatePermissions_Call) Return(_a0 *workspace.WorkspaceObjectPermissions, _a1 error) *MockWorkspaceInterface_UpdatePermissions_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *MockWorkspaceInterface_UpdatePermissions_Call) RunAndReturn(run func(context.Context, workspace.WorkspaceObjectPermissionsRequest) (*workspace.WorkspaceObjectPermissions, error)) *MockWorkspaceInterface_UpdatePermissions_Call { - _c.Call.Return(run) - return _c -} - -// Upload provides a mock function with given fields: ctx, path, r, opts -func (_m *MockWorkspaceInterface) Upload(ctx context.Context, path string, r io.Reader, opts ...func(*workspace.Import)) error { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, path, r) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Upload") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, io.Reader, ...func(*workspace.Import)) error); ok { - r0 = rf(ctx, path, r, opts...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceInterface_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload' -type MockWorkspaceInterface_Upload_Call struct { - *mock.Call -} - -// Upload is a helper method to define mock.On call -// - ctx context.Context -// - path string -// - r io.Reader -// - opts ...func(*workspace.Import) -func (_e *MockWorkspaceInterface_Expecter) Upload(ctx interface{}, path interface{}, r interface{}, opts ...interface{}) *MockWorkspaceInterface_Upload_Call { - return &MockWorkspaceInterface_Upload_Call{Call: _e.mock.On("Upload", - append([]interface{}{ctx, path, r}, opts...)...)} -} - -func (_c *MockWorkspaceInterface_Upload_Call) Run(run func(ctx context.Context, path string, r io.Reader, opts ...func(*workspace.Import))) *MockWorkspaceInterface_Upload_Call { - _c.Call.Run(func(args mock.Arguments) { - variadicArgs := make([]func(*workspace.Import), len(args)-3) - for i, a := range args[3:] { - if a != nil { - variadicArgs[i] = a.(func(*workspace.Import)) - } - } - run(args[0].(context.Context), args[1].(string), args[2].(io.Reader), variadicArgs...) - }) - return _c -} - -func (_c *MockWorkspaceInterface_Upload_Call) Return(_a0 error) *MockWorkspaceInterface_Upload_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_Upload_Call) RunAndReturn(run func(context.Context, string, io.Reader, ...func(*workspace.Import)) error) *MockWorkspaceInterface_Upload_Call { - _c.Call.Return(run) - return _c -} - -// WriteFile provides a mock function with given fields: ctx, name, data -func (_m *MockWorkspaceInterface) WriteFile(ctx context.Context, name string, data []byte) error { - ret := _m.Called(ctx, name, data) - - if len(ret) == 0 { - panic("no return value specified for WriteFile") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, []byte) error); ok { - r0 = rf(ctx, name, data) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// MockWorkspaceInterface_WriteFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteFile' -type MockWorkspaceInterface_WriteFile_Call struct { - *mock.Call -} - -// WriteFile is a helper method to define mock.On call -// - ctx context.Context -// - name string -// - data []byte -func (_e *MockWorkspaceInterface_Expecter) WriteFile(ctx interface{}, name interface{}, data interface{}) *MockWorkspaceInterface_WriteFile_Call { - return &MockWorkspaceInterface_WriteFile_Call{Call: _e.mock.On("WriteFile", ctx, name, data)} -} - -func (_c *MockWorkspaceInterface_WriteFile_Call) Run(run func(ctx context.Context, name string, data []byte)) *MockWorkspaceInterface_WriteFile_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string), args[2].([]byte)) - }) - return _c -} - -func (_c *MockWorkspaceInterface_WriteFile_Call) Return(_a0 error) *MockWorkspaceInterface_WriteFile_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *MockWorkspaceInterface_WriteFile_Call) RunAndReturn(run func(context.Context, string, []byte) error) *MockWorkspaceInterface_WriteFile_Call { - _c.Call.Return(run) - return _c -} - -// NewMockWorkspaceInterface creates a new instance of MockWorkspaceInterface. 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 NewMockWorkspaceInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *MockWorkspaceInterface { - mock := &MockWorkspaceInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/go.mod b/go.mod index 0f7fbce9f..3d0e7498a 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,6 @@ require ( github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/stretchr/objx v0.5.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel v1.24.0 // indirect diff --git a/go.sum b/go.sum index 42cd14133..40906d3ba 100644 --- a/go.sum +++ b/go.sum @@ -64,8 +64,6 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/stretchr/objx v0.1.0/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/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= diff --git a/qa/lock/databricks/databricks_backend_test.go b/qa/lock/databricks/databricks_backend_test.go deleted file mode 100644 index b6782b706..000000000 --- a/qa/lock/databricks/databricks_backend_test.go +++ /dev/null @@ -1,199 +0,0 @@ -package databricks - -import ( - "bytes" - "context" - "errors" - "io" - "testing" - - "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/experimental/mocks" - "github.com/databricks/databricks-sdk-go/qa/lock/core" - "github.com/databricks/databricks-sdk-go/service/workspace" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" -) - -func TestAcquireLock_NoExistingLock(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(nil, apierr.ErrNotFound) - w.GetMockWorkspaceAPI().EXPECT().Upload(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything, mock.Anything, mock.Anything).Return(nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.AcquireLock(context.Background(), &core.LockState{}) - assert.NoError(t, err) -} - -func TestAcquireLock_ExistingExpiredLock(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "2021-01-01T00:00:00Z"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - w.GetMockWorkspaceAPI().EXPECT().Delete(mock.Anything, workspace.Delete{Path: "/Shared/locks/my-lock.lock"}).Return(nil) - w.GetMockWorkspaceAPI().EXPECT().Upload(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything, mock.Anything, mock.Anything).Return(nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.AcquireLock(context.Background(), &core.LockState{}) - assert.NoError(t, err) -} - -func TestAcquireLock_ExistingValidLock(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "3021-01-01T00:00:00Z", "LeaseId": "old-lease-id"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.AcquireLock(context.Background(), &core.LockState{LeaseId: "new-lease-id"}) - assert.ErrorContains(t, err, "lock my-lock is held by another lease, current lock state: ") -} - -func TestAcquireLock_ExistingValidLockHeldBySelf(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "3021-01-01T00:00:00Z", "LeaseId": "new-lease-id"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.AcquireLock(context.Background(), &core.LockState{LeaseId: "new-lease-id"}) - assert.NoError(t, err) -} - -func TestAcquireLock_Fails(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(nil, apierr.ErrNotFound) - testErr := errors.New("test error") - w.GetMockWorkspaceAPI().EXPECT().Upload(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything, mock.Anything, mock.Anything).Return(testErr) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.AcquireLock(context.Background(), &core.LockState{}) - assert.ErrorIs(t, err, testErr) -} - -func TestRenewLock(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "3021-01-01T00:00:00Z", "LeaseId": "lease-id"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - w.GetMockWorkspaceAPI().EXPECT().Upload(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.RenewLock(context.Background(), "lease-id") - assert.NoError(t, err) -} - -func TestRenewLock_FailWhenNoLock(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(nil, apierr.ErrNotFound) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.RenewLock(context.Background(), "lease-id") - assert.EqualError(t, err, "lock my-lock does not exist") -} - -func TestRenewLock_FailWhenInvalid(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "2021-01-01T00:00:00Z", "LeaseId": "lease-id"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.RenewLock(context.Background(), "lease-id") - assert.EqualError(t, err, "lease lease-id on lock my-lock expired at 2021-01-01 00:00:00 +0000 UTC") -} - -func TestRenewLock_FailWhenHeldByOther(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "3021-01-01T00:00:00Z", "LeaseId": "other-lease-id"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.RenewLock(context.Background(), "lease-id") - assert.EqualError(t, err, "lock my-lock is held by other-lease-id, not lease-id") -} - -func TestReleaseLock(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "3021-01-01T00:00:00Z", "LeaseId": "lease-id"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - w.GetMockWorkspaceAPI().EXPECT().Delete(mock.Anything, workspace.Delete{Path: "/Shared/locks/my-lock.lock"}).Return(nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.ReleaseLock(context.Background(), "lease-id") - assert.NoError(t, err) -} - -func TestReleaseLock_NoLock(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(nil, apierr.ErrNotFound) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.ReleaseLock(context.Background(), "lease-id") - assert.NoError(t, err) -} - -func TestReleaseLock_FailWhenHeldByOther(t *testing.T) { - w := mocks.NewMockWorkspaceClient(t) - resp := io.NopCloser(bytes.NewReader([]byte(`{"Expiry": "3021-01-01T00:00:00Z", "LeaseId": "other-lease-id"}`))) - w.GetMockWorkspaceAPI().EXPECT().Download(mock.Anything, "/Shared/locks/my-lock.lock", mock.Anything).Return(resp, nil) - - backend := &Backend{ - lockClient: w.WorkspaceClient, - lockDir: "/Shared/locks", - lockName: "my-lock", - } - - err := backend.ReleaseLock(context.Background(), "lease-id") - assert.EqualError(t, err, "lock my-lock is held by other-lease-id, not lease-id") -} diff --git a/service/apps/api.go b/service/apps/api.go index 59f7aa2ff..dee5ee23a 100755 --- a/service/apps/api.go +++ b/service/apps/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type AppsInterface interface { diff --git a/service/apps/impl.go b/service/apps/impl.go index 85cd53555..2b34fb1d1 100755 --- a/service/apps/impl.go +++ b/service/apps/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just Apps API methods diff --git a/service/apps/model.go b/service/apps/model.go index 0bced9bce..65af0d184 100755 --- a/service/apps/model.go +++ b/service/apps/model.go @@ -5,7 +5,7 @@ package apps import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type App struct { diff --git a/service/billing/api.go b/service/billing/api.go index 83e8daff2..fcc13bda0 100755 --- a/service/billing/api.go +++ b/service/billing/api.go @@ -7,9 +7,9 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type BillableUsageInterface interface { diff --git a/service/billing/billable_usage_usage_test.go b/service/billing/billable_usage_usage_test.go index 7aec1e650..6f5a5d8d0 100755 --- a/service/billing/billable_usage_usage_test.go +++ b/service/billing/billable_usage_usage_test.go @@ -5,7 +5,7 @@ package billing_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/billing" diff --git a/service/billing/budgets_usage_test.go b/service/billing/budgets_usage_test.go index 539c2984c..cff5719aa 100755 --- a/service/billing/budgets_usage_test.go +++ b/service/billing/budgets_usage_test.go @@ -7,9 +7,8 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/service/billing" ) diff --git a/service/billing/impl.go b/service/billing/impl.go index 373be1aec..636bdb260 100755 --- a/service/billing/impl.go +++ b/service/billing/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just BillableUsage API methods diff --git a/service/billing/log_delivery_usage_test.go b/service/billing/log_delivery_usage_test.go index 998316895..800a904b2 100755 --- a/service/billing/log_delivery_usage_test.go +++ b/service/billing/log_delivery_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/billing" diff --git a/service/billing/model.go b/service/billing/model.go index e1aec066d..0117d0b87 100644 --- a/service/billing/model.go +++ b/service/billing/model.go @@ -6,7 +6,7 @@ import ( "fmt" "io" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type ActionConfiguration struct { diff --git a/service/catalog/api.go b/service/catalog/api.go index 46d38dd3b..39eb3a207 100755 --- a/service/catalog/api.go +++ b/service/catalog/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type AccountMetastoreAssignmentsInterface interface { diff --git a/service/catalog/catalogs_usage_test.go b/service/catalog/catalogs_usage_test.go index 0734beba8..1c7841a9c 100755 --- a/service/catalog/catalogs_usage_test.go +++ b/service/catalog/catalogs_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/connections_usage_test.go b/service/catalog/connections_usage_test.go index 1f19c096c..73d966907 100755 --- a/service/catalog/connections_usage_test.go +++ b/service/catalog/connections_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/external_locations_usage_test.go b/service/catalog/external_locations_usage_test.go index 40bf4df50..3e77c6d73 100755 --- a/service/catalog/external_locations_usage_test.go +++ b/service/catalog/external_locations_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/grants_usage_test.go b/service/catalog/grants_usage_test.go index e5a778113..0a453aae0 100755 --- a/service/catalog/grants_usage_test.go +++ b/service/catalog/grants_usage_test.go @@ -8,9 +8,8 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/databricks/databricks-sdk-go/service/sql" ) diff --git a/service/catalog/impl.go b/service/catalog/impl.go index 78c34e52d..884a63e7b 100755 --- a/service/catalog/impl.go +++ b/service/catalog/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just AccountMetastoreAssignments API methods diff --git a/service/catalog/metastore_assignments_usage_test.go b/service/catalog/metastore_assignments_usage_test.go index 6c9abe26d..2bb6e6e8d 100755 --- a/service/catalog/metastore_assignments_usage_test.go +++ b/service/catalog/metastore_assignments_usage_test.go @@ -6,7 +6,7 @@ import ( "context" "os" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/metastores_usage_test.go b/service/catalog/metastores_usage_test.go index 1c9e2b6aa..c86a03a23 100755 --- a/service/catalog/metastores_usage_test.go +++ b/service/catalog/metastores_usage_test.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/model.go b/service/catalog/model.go index 4493e9b3e..e0fd38481 100755 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -5,7 +5,7 @@ package catalog import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AccountsCreateMetastore struct { diff --git a/service/catalog/schemas_usage_test.go b/service/catalog/schemas_usage_test.go index 28de74cd1..a1cb6ab0a 100755 --- a/service/catalog/schemas_usage_test.go +++ b/service/catalog/schemas_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/storage_credentials_usage_test.go b/service/catalog/storage_credentials_usage_test.go index 95c95aaf9..18137c8e4 100755 --- a/service/catalog/storage_credentials_usage_test.go +++ b/service/catalog/storage_credentials_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/tables_usage_test.go b/service/catalog/tables_usage_test.go index 9df52329d..d9bf7a29c 100755 --- a/service/catalog/tables_usage_test.go +++ b/service/catalog/tables_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/volumes_usage_test.go b/service/catalog/volumes_usage_test.go index 7722d0572..1f8ede4e6 100755 --- a/service/catalog/volumes_usage_test.go +++ b/service/catalog/volumes_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/catalog/workspace_bindings_usage_test.go b/service/catalog/workspace_bindings_usage_test.go index 1cbbf5aaa..933718298 100755 --- a/service/catalog/workspace_bindings_usage_test.go +++ b/service/catalog/workspace_bindings_usage_test.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/cleanrooms/api.go b/service/cleanrooms/api.go index 41fe43afd..7aab23202 100755 --- a/service/cleanrooms/api.go +++ b/service/cleanrooms/api.go @@ -6,9 +6,9 @@ package cleanrooms import ( "context" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type CleanRoomAssetsInterface interface { diff --git a/service/cleanrooms/impl.go b/service/cleanrooms/impl.go index 50937ebf0..6ebc5600e 100755 --- a/service/cleanrooms/impl.go +++ b/service/cleanrooms/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just CleanRoomAssets API methods diff --git a/service/cleanrooms/model.go b/service/cleanrooms/model.go index 61b7c4368..d215318ea 100755 --- a/service/cleanrooms/model.go +++ b/service/cleanrooms/model.go @@ -5,7 +5,7 @@ package cleanrooms import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" "github.com/databricks/databricks-sdk-go/service/catalog" "github.com/databricks/databricks-sdk-go/service/jobs" "github.com/databricks/databricks-sdk-go/service/settings" diff --git a/service/compute/api.go b/service/compute/api.go index 89b6b6e61..900b13991 100755 --- a/service/compute/api.go +++ b/service/compute/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type ClusterPoliciesInterface interface { diff --git a/service/compute/cluster_policies_usage_test.go b/service/compute/cluster_policies_usage_test.go index 049830eb1..4007eab9d 100755 --- a/service/compute/cluster_policies_usage_test.go +++ b/service/compute/cluster_policies_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" diff --git a/service/compute/clusters_usage_test.go b/service/compute/clusters_usage_test.go index 4f6ee0b1a..6914987f0 100755 --- a/service/compute/clusters_usage_test.go +++ b/service/compute/clusters_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" diff --git a/service/compute/command_execution_usage_test.go b/service/compute/command_execution_usage_test.go index be86e25d6..2bbc8a117 100755 --- a/service/compute/command_execution_usage_test.go +++ b/service/compute/command_execution_usage_test.go @@ -6,7 +6,7 @@ import ( "context" "os" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" diff --git a/service/compute/example_test.go b/service/compute/example_test.go index 0dd720a2c..6e8bf102f 100644 --- a/service/compute/example_test.go +++ b/service/compute/example_test.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/compute" ) diff --git a/service/compute/ext_commands.go b/service/compute/ext_commands.go index af3fb4934..4d989956a 100644 --- a/service/compute/ext_commands.go +++ b/service/compute/ext_commands.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type CommandExecutorV2 struct { diff --git a/service/compute/ext_commands_test.go b/service/compute/ext_commands_test.go index 39abe6d2d..ecf1bc239 100644 --- a/service/compute/ext_commands_test.go +++ b/service/compute/ext_commands_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/databricks/databricks-sdk-go/client" "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/qa" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/qa" ) func commonFixtureWithStatusResponse(response CommandStatusResponse) qa.HTTPFixtures { diff --git a/service/compute/ext_library_utilities.go b/service/compute/ext_library_utilities.go index 98c97b70e..512e33797 100644 --- a/service/compute/ext_library_utilities.go +++ b/service/compute/ext_library_utilities.go @@ -9,8 +9,8 @@ import ( "github.com/databricks/databricks-sdk-go/databricks/apierr" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type Wait struct { diff --git a/service/compute/ext_utilities.go b/service/compute/ext_utilities.go index 740c56203..fefe2e9a7 100644 --- a/service/compute/ext_utilities.go +++ b/service/compute/ext_utilities.go @@ -10,7 +10,7 @@ import ( "github.com/databricks/databricks-sdk-go/databricks/apierr" "github.com/databricks/databricks-sdk-go/databricks/log" - "github.com/databricks/databricks-sdk-go/retries" + "github.com/databricks/databricks-sdk-go/databricks/retries" ) type clustersAPIUtilities interface { diff --git a/service/compute/global_init_scripts_usage_test.go b/service/compute/global_init_scripts_usage_test.go index e6a533c88..642ff625a 100755 --- a/service/compute/global_init_scripts_usage_test.go +++ b/service/compute/global_init_scripts_usage_test.go @@ -8,7 +8,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" diff --git a/service/compute/impl.go b/service/compute/impl.go index abf2c76ff..2082900fe 100755 --- a/service/compute/impl.go +++ b/service/compute/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just ClusterPolicies API methods diff --git a/service/compute/instance_pools_usage_test.go b/service/compute/instance_pools_usage_test.go index 19995054e..74e57ea52 100755 --- a/service/compute/instance_pools_usage_test.go +++ b/service/compute/instance_pools_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" diff --git a/service/compute/instance_profiles_usage_test.go b/service/compute/instance_profiles_usage_test.go index be11f1918..a02c6125c 100755 --- a/service/compute/instance_profiles_usage_test.go +++ b/service/compute/instance_profiles_usage_test.go @@ -5,7 +5,7 @@ package compute_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" diff --git a/service/compute/libraries_usage_test.go b/service/compute/libraries_usage_test.go index 538b4c827..42bde6547 100755 --- a/service/compute/libraries_usage_test.go +++ b/service/compute/libraries_usage_test.go @@ -6,7 +6,7 @@ import ( "context" "os" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/compute" ) diff --git a/service/compute/model.go b/service/compute/model.go index 6414a21eb..24a3f5426 100755 --- a/service/compute/model.go +++ b/service/compute/model.go @@ -5,7 +5,7 @@ package compute import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AddInstanceProfile struct { diff --git a/service/compute/policy_families_usage_test.go b/service/compute/policy_families_usage_test.go index 191e9428b..07c73fb3f 100755 --- a/service/compute/policy_families_usage_test.go +++ b/service/compute/policy_families_usage_test.go @@ -5,7 +5,7 @@ package compute_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/compute" diff --git a/service/dashboards/api.go b/service/dashboards/api.go index 1ec369728..b6fe5b141 100755 --- a/service/dashboards/api.go +++ b/service/dashboards/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type GenieInterface interface { diff --git a/service/dashboards/impl.go b/service/dashboards/impl.go index babb7fc7c..c95fe2023 100755 --- a/service/dashboards/impl.go +++ b/service/dashboards/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just Genie API methods diff --git a/service/dashboards/model.go b/service/dashboards/model.go index 310008e61..a6d267c90 100755 --- a/service/dashboards/model.go +++ b/service/dashboards/model.go @@ -5,7 +5,7 @@ package dashboards import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" "github.com/databricks/databricks-sdk-go/service/sql" ) diff --git a/service/files/api.go b/service/files/api.go index c12a519dc..0f959aa19 100755 --- a/service/files/api.go +++ b/service/files/api.go @@ -6,9 +6,9 @@ package files import ( "context" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type DbfsInterface interface { diff --git a/service/files/ext_utilities.go b/service/files/ext_utilities.go index 4f1784bc8..f649e51bb 100644 --- a/service/files/ext_utilities.go +++ b/service/files/ext_utilities.go @@ -8,7 +8,7 @@ import ( "io" "github.com/databricks/databricks-sdk-go/databricks/apierr" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) // FileMode conveys user intent when opening a file. diff --git a/service/files/impl.go b/service/files/impl.go index 23b25c450..2ec276fa3 100755 --- a/service/files/impl.go +++ b/service/files/impl.go @@ -7,8 +7,8 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" ) // unexported type that holds implementations of just Dbfs API methods diff --git a/service/files/model.go b/service/files/model.go index 10ef77d13..2799e2394 100755 --- a/service/files/model.go +++ b/service/files/model.go @@ -5,7 +5,7 @@ package files import ( "io" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AddBlock struct { diff --git a/service/iam/api.go b/service/iam/api.go index 388b0a2f9..406c2eaf1 100755 --- a/service/iam/api.go +++ b/service/iam/api.go @@ -7,9 +7,9 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type AccountAccessControlInterface interface { diff --git a/service/iam/current_user_usage_test.go b/service/iam/current_user_usage_test.go index 16a5cf9a7..f48d4b73f 100755 --- a/service/iam/current_user_usage_test.go +++ b/service/iam/current_user_usage_test.go @@ -5,7 +5,7 @@ package iam_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" ) diff --git a/service/iam/groups_usage_test.go b/service/iam/groups_usage_test.go index 90239ece3..2e5c4ebe7 100755 --- a/service/iam/groups_usage_test.go +++ b/service/iam/groups_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/iam" diff --git a/service/iam/impl.go b/service/iam/impl.go index deb73a70c..6e17c3432 100755 --- a/service/iam/impl.go +++ b/service/iam/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just AccountAccessControl API methods diff --git a/service/iam/model.go b/service/iam/model.go index 05357a329..98ebf5a7c 100755 --- a/service/iam/model.go +++ b/service/iam/model.go @@ -5,7 +5,7 @@ package iam import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AccessControlRequest struct { diff --git a/service/iam/permissions_usage_test.go b/service/iam/permissions_usage_test.go index 1f14abd9a..ea02b2655 100755 --- a/service/iam/permissions_usage_test.go +++ b/service/iam/permissions_usage_test.go @@ -8,7 +8,7 @@ import ( "path/filepath" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/iam" diff --git a/service/iam/service_principals_usage_test.go b/service/iam/service_principals_usage_test.go index d8a05a385..47f34fef0 100755 --- a/service/iam/service_principals_usage_test.go +++ b/service/iam/service_principals_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/iam" diff --git a/service/iam/users_usage_test.go b/service/iam/users_usage_test.go index ec80f4fbe..4d127a3ff 100755 --- a/service/iam/users_usage_test.go +++ b/service/iam/users_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/iam" diff --git a/service/iam/workspace_assignment_usage_test.go b/service/iam/workspace_assignment_usage_test.go index 8fb18a1b9..07618f516 100755 --- a/service/iam/workspace_assignment_usage_test.go +++ b/service/iam/workspace_assignment_usage_test.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/iam" diff --git a/service/jobs/api.go b/service/jobs/api.go index fb4f0ef56..d7fb9b34a 100755 --- a/service/jobs/api.go +++ b/service/jobs/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type JobsInterface interface { diff --git a/service/jobs/ext_api_test.go b/service/jobs/ext_api_test.go index e13a437f8..c9d3b2921 100644 --- a/service/jobs/ext_api_test.go +++ b/service/jobs/ext_api_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/databricks/databricks-sdk-go/qa" + "github.com/databricks/databricks-sdk-go/databricks/qa" "github.com/stretchr/testify/assert" ) diff --git a/service/jobs/impl.go b/service/jobs/impl.go index 0929b10c4..52ba76298 100755 --- a/service/jobs/impl.go +++ b/service/jobs/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just Jobs API methods diff --git a/service/jobs/jobs_usage_test.go b/service/jobs/jobs_usage_test.go index 80b3119b4..df94e98bc 100755 --- a/service/jobs/jobs_usage_test.go +++ b/service/jobs/jobs_usage_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/jobs" diff --git a/service/jobs/model.go b/service/jobs/model.go index e23efe94c..829295edf 100755 --- a/service/jobs/model.go +++ b/service/jobs/model.go @@ -5,7 +5,7 @@ package jobs import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" "github.com/databricks/databricks-sdk-go/service/compute" ) diff --git a/service/marketplace/api.go b/service/marketplace/api.go index 7a2009738..6b3351245 100755 --- a/service/marketplace/api.go +++ b/service/marketplace/api.go @@ -7,9 +7,9 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type ConsumerFulfillmentsInterface interface { diff --git a/service/marketplace/impl.go b/service/marketplace/impl.go index 81072eec0..cc00e5cd5 100755 --- a/service/marketplace/impl.go +++ b/service/marketplace/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just ConsumerFulfillments API methods diff --git a/service/marketplace/model.go b/service/marketplace/model.go index d96905e74..d58b8b908 100755 --- a/service/marketplace/model.go +++ b/service/marketplace/model.go @@ -5,7 +5,7 @@ package marketplace import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AddExchangeForListingRequest struct { diff --git a/service/ml/api.go b/service/ml/api.go index c3c468759..39cc10d49 100755 --- a/service/ml/api.go +++ b/service/ml/api.go @@ -6,9 +6,9 @@ package ml import ( "context" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type ExperimentsInterface interface { diff --git a/service/ml/experiments_usage_test.go b/service/ml/experiments_usage_test.go index 71ba25219..1513454df 100755 --- a/service/ml/experiments_usage_test.go +++ b/service/ml/experiments_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/ml" diff --git a/service/ml/impl.go b/service/ml/impl.go index faf6b0f12..7ec0f1ba9 100755 --- a/service/ml/impl.go +++ b/service/ml/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just Experiments API methods diff --git a/service/ml/model.go b/service/ml/model.go index bf9d039a4..2c988d39b 100755 --- a/service/ml/model.go +++ b/service/ml/model.go @@ -5,7 +5,7 @@ package ml import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) // Activity recorded for the action. diff --git a/service/ml/model_registry_usage_test.go b/service/ml/model_registry_usage_test.go index 0640aea58..74077da5d 100755 --- a/service/ml/model_registry_usage_test.go +++ b/service/ml/model_registry_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/ml" diff --git a/service/oauth2/api.go b/service/oauth2/api.go index 5119197e3..da9544202 100755 --- a/service/oauth2/api.go +++ b/service/oauth2/api.go @@ -6,9 +6,9 @@ package oauth2 import ( "context" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type AccountFederationPolicyInterface interface { diff --git a/service/oauth2/impl.go b/service/oauth2/impl.go index 643052a3b..ef39e446c 100755 --- a/service/oauth2/impl.go +++ b/service/oauth2/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just AccountFederationPolicy API methods diff --git a/service/oauth2/model.go b/service/oauth2/model.go index 08de08f93..5137ce953 100755 --- a/service/oauth2/model.go +++ b/service/oauth2/model.go @@ -3,7 +3,7 @@ package oauth2 import ( - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) // Create account federation policy @@ -625,11 +625,23 @@ type UpdateAccountFederationPolicyRequest struct { Policy *FederationPolicy `json:"policy,omitempty"` // The identifier for the federation policy. PolicyId string `json:"-" url:"-"` - // Field mask is required to be passed into the PATCH request. Field mask - // specifies which fields of the setting payload will be updated. The field - // mask needs to be supplied as single string. To specify multiple fields in - // the field mask, use comma as the separator (no space). - UpdateMask string `json:"-" url:"update_mask"` + // The field mask specifies which fields of the policy to update. To specify + // multiple fields in the field mask, use comma as the separator (no space). + // The special value '*' indicates that all fields should be updated (full + // replacement). If unspecified, all fields that are set in the policy + // provided in the update request will overwrite the corresponding fields in + // the existing policy. Example value: 'description,oidc_policy.audiences'. + UpdateMask string `json:"-" url:"update_mask,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *UpdateAccountFederationPolicyRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s UpdateAccountFederationPolicyRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type UpdateCustomAppIntegration struct { @@ -660,9 +672,21 @@ type UpdateServicePrincipalFederationPolicyRequest struct { PolicyId string `json:"-" url:"-"` // The service principal id for the federation policy. ServicePrincipalId int64 `json:"-" url:"-"` - // Field mask is required to be passed into the PATCH request. Field mask - // specifies which fields of the setting payload will be updated. The field - // mask needs to be supplied as single string. To specify multiple fields in - // the field mask, use comma as the separator (no space). - UpdateMask string `json:"-" url:"update_mask"` + // The field mask specifies which fields of the policy to update. To specify + // multiple fields in the field mask, use comma as the separator (no space). + // The special value '*' indicates that all fields should be updated (full + // replacement). If unspecified, all fields that are set in the policy + // provided in the update request will overwrite the corresponding fields in + // the existing policy. Example value: 'description,oidc_policy.audiences'. + UpdateMask string `json:"-" url:"update_mask,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *UpdateServicePrincipalFederationPolicyRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s UpdateServicePrincipalFederationPolicyRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } diff --git a/service/pipelines/api.go b/service/pipelines/api.go index 6654fe5bf..38794013b 100755 --- a/service/pipelines/api.go +++ b/service/pipelines/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type PipelinesInterface interface { diff --git a/service/pipelines/impl.go b/service/pipelines/impl.go index 45c169621..24632cf2e 100755 --- a/service/pipelines/impl.go +++ b/service/pipelines/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just Pipelines API methods diff --git a/service/pipelines/model.go b/service/pipelines/model.go index 04f110841..f58ed6df1 100755 --- a/service/pipelines/model.go +++ b/service/pipelines/model.go @@ -5,7 +5,7 @@ package pipelines import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" "github.com/databricks/databricks-sdk-go/service/compute" ) @@ -140,6 +140,46 @@ func (s DataPlaneId) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Days of week in which the restart is allowed to happen (within a five-hour +// window starting at start_hour). If not specified all days of the week will be +// used. +type DayOfWeek string + +const DayOfWeekFriday DayOfWeek = `FRIDAY` + +const DayOfWeekMonday DayOfWeek = `MONDAY` + +const DayOfWeekSaturday DayOfWeek = `SATURDAY` + +const DayOfWeekSunday DayOfWeek = `SUNDAY` + +const DayOfWeekThursday DayOfWeek = `THURSDAY` + +const DayOfWeekTuesday DayOfWeek = `TUESDAY` + +const DayOfWeekWednesday DayOfWeek = `WEDNESDAY` + +// String representation for [fmt.Print] +func (f *DayOfWeek) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *DayOfWeek) Set(v string) error { + switch v { + case `FRIDAY`, `MONDAY`, `SATURDAY`, `SUNDAY`, `THURSDAY`, `TUESDAY`, `WEDNESDAY`: + *f = DayOfWeek(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "FRIDAY", "MONDAY", "SATURDAY", "SUNDAY", "THURSDAY", "TUESDAY", "WEDNESDAY"`, v) + } +} + +// Type always returns DayOfWeek to satisfy [pflag.Value] interface +func (f *DayOfWeek) Type() string { + return "DayOfWeek" +} + // Delete a pipeline type DeletePipelineRequest struct { PipelineId string `json:"-" url:"-"` @@ -1329,7 +1369,7 @@ type RestartWindow struct { // Days of week in which the restart is allowed to happen (within a // five-hour window starting at start_hour). If not specified all days of // the week will be used. - DaysOfWeek []RestartWindowDaysOfWeek `json:"days_of_week,omitempty"` + DaysOfWeek []DayOfWeek `json:"days_of_week,omitempty"` // An integer between 0 and 23 denoting the start hour for the restart // window in the 24-hour day. Continuous pipeline restart is triggered only // within a five-hour window starting at this hour. @@ -1350,46 +1390,6 @@ func (s RestartWindow) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Days of week in which the restart is allowed to happen (within a five-hour -// window starting at start_hour). If not specified all days of the week will be -// used. -type RestartWindowDaysOfWeek string - -const RestartWindowDaysOfWeekFriday RestartWindowDaysOfWeek = `FRIDAY` - -const RestartWindowDaysOfWeekMonday RestartWindowDaysOfWeek = `MONDAY` - -const RestartWindowDaysOfWeekSaturday RestartWindowDaysOfWeek = `SATURDAY` - -const RestartWindowDaysOfWeekSunday RestartWindowDaysOfWeek = `SUNDAY` - -const RestartWindowDaysOfWeekThursday RestartWindowDaysOfWeek = `THURSDAY` - -const RestartWindowDaysOfWeekTuesday RestartWindowDaysOfWeek = `TUESDAY` - -const RestartWindowDaysOfWeekWednesday RestartWindowDaysOfWeek = `WEDNESDAY` - -// String representation for [fmt.Print] -func (f *RestartWindowDaysOfWeek) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *RestartWindowDaysOfWeek) Set(v string) error { - switch v { - case `FRIDAY`, `MONDAY`, `SATURDAY`, `SUNDAY`, `THURSDAY`, `TUESDAY`, `WEDNESDAY`: - *f = RestartWindowDaysOfWeek(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "FRIDAY", "MONDAY", "SATURDAY", "SUNDAY", "THURSDAY", "TUESDAY", "WEDNESDAY"`, v) - } -} - -// Type always returns RestartWindowDaysOfWeek to satisfy [pflag.Value] interface -func (f *RestartWindowDaysOfWeek) Type() string { - return "RestartWindowDaysOfWeek" -} - // Write-only setting, available only in Create/Update calls. Specifies the user // or service principal that the pipeline runs as. If not specified, the // pipeline runs as the user who created the pipeline. diff --git a/service/pipelines/pipelines_usage_test.go b/service/pipelines/pipelines_usage_test.go index 3f7c43307..13fcc0302 100755 --- a/service/pipelines/pipelines_usage_test.go +++ b/service/pipelines/pipelines_usage_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/pipelines" diff --git a/service/pkg.go b/service/pkg.go index b891a9547..0e5a53e7e 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -323,8 +323,8 @@ var ( _ *marketplace.ConsumerListingsAPI = nil _ *marketplace.ConsumerPersonalizationRequestsAPI = nil _ *marketplace.ConsumerProvidersAPI = nil - _ *provisioning.CredentialsAPI = nil _ *catalog.CredentialsAPI = nil + _ *provisioning.CredentialsAPI = nil _ *settings.CredentialsManagerAPI = nil _ *settings.CspEnablementAccountAPI = nil _ *iam.CurrentUserAPI = nil diff --git a/service/provisioning/api.go b/service/provisioning/api.go index 3386fa5bf..9ae471f30 100755 --- a/service/provisioning/api.go +++ b/service/provisioning/api.go @@ -8,9 +8,9 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type CredentialsInterface interface { diff --git a/service/provisioning/credentials_usage_test.go b/service/provisioning/credentials_usage_test.go index 6e9e3213e..318284623 100755 --- a/service/provisioning/credentials_usage_test.go +++ b/service/provisioning/credentials_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/provisioning" diff --git a/service/provisioning/encryption_keys_usage_test.go b/service/provisioning/encryption_keys_usage_test.go index 1c6710ee2..766dac680 100755 --- a/service/provisioning/encryption_keys_usage_test.go +++ b/service/provisioning/encryption_keys_usage_test.go @@ -6,7 +6,7 @@ import ( "context" "os" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/provisioning" diff --git a/service/provisioning/impl.go b/service/provisioning/impl.go index 6b389f472..0dffec941 100755 --- a/service/provisioning/impl.go +++ b/service/provisioning/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just Credentials API methods diff --git a/service/provisioning/model.go b/service/provisioning/model.go index ddaa35c85..8126a7c9c 100755 --- a/service/provisioning/model.go +++ b/service/provisioning/model.go @@ -5,7 +5,7 @@ package provisioning import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AwsCredentials struct { diff --git a/service/provisioning/networks_usage_test.go b/service/provisioning/networks_usage_test.go index ebe21c0a6..606f6358b 100755 --- a/service/provisioning/networks_usage_test.go +++ b/service/provisioning/networks_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/provisioning" diff --git a/service/provisioning/private_access_usage_test.go b/service/provisioning/private_access_usage_test.go index a1c3e1d9c..461455c71 100755 --- a/service/provisioning/private_access_usage_test.go +++ b/service/provisioning/private_access_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/provisioning" diff --git a/service/provisioning/storage_usage_test.go b/service/provisioning/storage_usage_test.go index fd517f3e9..af2eed7d0 100755 --- a/service/provisioning/storage_usage_test.go +++ b/service/provisioning/storage_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/provisioning" diff --git a/service/provisioning/vpc_endpoints_usage_test.go b/service/provisioning/vpc_endpoints_usage_test.go index 9fee08e0f..91f9de307 100755 --- a/service/provisioning/vpc_endpoints_usage_test.go +++ b/service/provisioning/vpc_endpoints_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/provisioning" diff --git a/service/provisioning/workspaces_usage_test.go b/service/provisioning/workspaces_usage_test.go index f97cb4ed8..65117ca4c 100755 --- a/service/provisioning/workspaces_usage_test.go +++ b/service/provisioning/workspaces_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/provisioning" diff --git a/service/serving/api.go b/service/serving/api.go index 5a2606d6b..695858a7c 100755 --- a/service/serving/api.go +++ b/service/serving/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type ServingEndpointsInterface interface { diff --git a/service/serving/impl.go b/service/serving/impl.go index 77476ef7f..a4850f7f7 100755 --- a/service/serving/impl.go +++ b/service/serving/impl.go @@ -8,8 +8,8 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/httpclient" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/httpclient" goauth "golang.org/x/oauth2" ) diff --git a/service/serving/model.go b/service/serving/model.go index ade652782..e9ac58e3c 100755 --- a/service/serving/model.go +++ b/service/serving/model.go @@ -6,7 +6,7 @@ import ( "fmt" "io" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type Ai21LabsConfig struct { diff --git a/service/settings/api.go b/service/settings/api.go index 520214899..966b82752 100755 --- a/service/settings/api.go +++ b/service/settings/api.go @@ -7,9 +7,9 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type AccountIpAccessListsInterface interface { diff --git a/service/settings/impl.go b/service/settings/impl.go index 3681bffc2..169b76b5d 100755 --- a/service/settings/impl.go +++ b/service/settings/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just AccountIpAccessLists API methods diff --git a/service/settings/ip_access_lists_usage_test.go b/service/settings/ip_access_lists_usage_test.go index bcc9c7387..c72c37f81 100755 --- a/service/settings/ip_access_lists_usage_test.go +++ b/service/settings/ip_access_lists_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/settings" diff --git a/service/settings/model.go b/service/settings/model.go index 66cc47739..f965622e3 100755 --- a/service/settings/model.go +++ b/service/settings/model.go @@ -5,7 +5,7 @@ package settings import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AibiDashboardEmbeddingAccessPolicy struct { diff --git a/service/settings/token_management_usage_test.go b/service/settings/token_management_usage_test.go index 1753d278c..c1f632f84 100755 --- a/service/settings/token_management_usage_test.go +++ b/service/settings/token_management_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/iam" diff --git a/service/settings/tokens_usage_test.go b/service/settings/tokens_usage_test.go index 1bcf073d4..9c139d0d0 100755 --- a/service/settings/tokens_usage_test.go +++ b/service/settings/tokens_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/settings" diff --git a/service/settings/workspace_conf_usage_test.go b/service/settings/workspace_conf_usage_test.go index 48c40274a..1591058ec 100755 --- a/service/settings/workspace_conf_usage_test.go +++ b/service/settings/workspace_conf_usage_test.go @@ -5,7 +5,7 @@ package settings_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/settings" diff --git a/service/sharing/api.go b/service/sharing/api.go index 941f6ae3f..833377f36 100755 --- a/service/sharing/api.go +++ b/service/sharing/api.go @@ -7,10 +7,10 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" "github.com/databricks/databricks-sdk-go/service/catalog" - "github.com/databricks/databricks-sdk-go/useragent" ) type ProvidersInterface interface { diff --git a/service/sharing/impl.go b/service/sharing/impl.go index 8eb8b3378..7a22e3d7b 100755 --- a/service/sharing/impl.go +++ b/service/sharing/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" "github.com/databricks/databricks-sdk-go/service/catalog" ) diff --git a/service/sharing/model.go b/service/sharing/model.go index 4da345b00..32b52f3aa 100755 --- a/service/sharing/model.go +++ b/service/sharing/model.go @@ -5,7 +5,7 @@ package sharing import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" "github.com/databricks/databricks-sdk-go/service/catalog" ) diff --git a/service/sharing/providers_usage_test.go b/service/sharing/providers_usage_test.go index 64a77ef1a..3d7fb6ddc 100755 --- a/service/sharing/providers_usage_test.go +++ b/service/sharing/providers_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/sharing" diff --git a/service/sharing/recipients_usage_test.go b/service/sharing/recipients_usage_test.go index 29190be28..c4ccb33b3 100755 --- a/service/sharing/recipients_usage_test.go +++ b/service/sharing/recipients_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/sharing" diff --git a/service/sharing/shares_usage_test.go b/service/sharing/shares_usage_test.go index a6601cb17..87f99e575 100755 --- a/service/sharing/shares_usage_test.go +++ b/service/sharing/shares_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/sql/alerts_usage_test.go b/service/sql/alerts_usage_test.go index 402338515..9a06d8516 100755 --- a/service/sql/alerts_usage_test.go +++ b/service/sql/alerts_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/sql" diff --git a/service/sql/api.go b/service/sql/api.go index 784b33de4..543d425fa 100755 --- a/service/sql/api.go +++ b/service/sql/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type AlertsInterface interface { diff --git a/service/sql/dashboards_usage_test.go b/service/sql/dashboards_usage_test.go index b3dc16fd5..35d63963c 100755 --- a/service/sql/dashboards_usage_test.go +++ b/service/sql/dashboards_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/sql" diff --git a/service/sql/data_sources_usage_test.go b/service/sql/data_sources_usage_test.go index a8b935451..3d27259ce 100755 --- a/service/sql/data_sources_usage_test.go +++ b/service/sql/data_sources_usage_test.go @@ -5,7 +5,7 @@ package sql_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" ) diff --git a/service/sql/ext_utilities.go b/service/sql/ext_utilities.go index aedc83cf0..22d43565e 100644 --- a/service/sql/ext_utilities.go +++ b/service/sql/ext_utilities.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/retries" + "github.com/databricks/databricks-sdk-go/databricks/retries" ) type statementExecutionAPIUtilities interface { diff --git a/service/sql/impl.go b/service/sql/impl.go index eb053fd97..c007a4698 100755 --- a/service/sql/impl.go +++ b/service/sql/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just Alerts API methods diff --git a/service/sql/model.go b/service/sql/model.go index bf307030c..c0e287e78 100755 --- a/service/sql/model.go +++ b/service/sql/model.go @@ -5,7 +5,7 @@ package sql import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AccessControl struct { diff --git a/service/sql/queries_usage_test.go b/service/sql/queries_usage_test.go index d0ac07ad2..cb2a6edfe 100755 --- a/service/sql/queries_usage_test.go +++ b/service/sql/queries_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/sql" diff --git a/service/sql/query_history_usage_test.go b/service/sql/query_history_usage_test.go index 6352821ee..b3a0db21f 100755 --- a/service/sql/query_history_usage_test.go +++ b/service/sql/query_history_usage_test.go @@ -5,7 +5,7 @@ package sql_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/sql" ) diff --git a/service/sql/statement_execution_usage_test.go b/service/sql/statement_execution_usage_test.go index 01b4db6a9..aa7336351 100755 --- a/service/sql/statement_execution_usage_test.go +++ b/service/sql/statement_execution_usage_test.go @@ -8,7 +8,7 @@ import ( "os" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/catalog" diff --git a/service/sql/warehouses_usage_test.go b/service/sql/warehouses_usage_test.go index c2c7784c6..e609951a0 100755 --- a/service/sql/warehouses_usage_test.go +++ b/service/sql/warehouses_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/sql" diff --git a/service/vectorsearch/api.go b/service/vectorsearch/api.go index f4371301a..11c8f172f 100755 --- a/service/vectorsearch/api.go +++ b/service/vectorsearch/api.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/retries" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/retries" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type VectorSearchEndpointsInterface interface { diff --git a/service/vectorsearch/impl.go b/service/vectorsearch/impl.go index 92563db06..321b8b8bf 100755 --- a/service/vectorsearch/impl.go +++ b/service/vectorsearch/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just VectorSearchEndpoints API methods diff --git a/service/vectorsearch/model.go b/service/vectorsearch/model.go index 48335536a..ae9b75f28 100755 --- a/service/vectorsearch/model.go +++ b/service/vectorsearch/model.go @@ -5,7 +5,7 @@ package vectorsearch import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type ColumnInfo struct { diff --git a/service/workspace/api.go b/service/workspace/api.go index 59eac85ec..9d25695ea 100755 --- a/service/workspace/api.go +++ b/service/workspace/api.go @@ -7,9 +7,9 @@ import ( "context" "fmt" - "github.com/databricks/databricks-sdk-go/client" - "github.com/databricks/databricks-sdk-go/listing" - "github.com/databricks/databricks-sdk-go/useragent" + "github.com/databricks/databricks-sdk-go/databricks/client" + "github.com/databricks/databricks-sdk-go/databricks/listing" + "github.com/databricks/databricks-sdk-go/databricks/useragent" ) type GitCredentialsInterface interface { diff --git a/service/workspace/examples_test.go b/service/workspace/examples_test.go index 18a9ec490..6216580b7 100644 --- a/service/workspace/examples_test.go +++ b/service/workspace/examples_test.go @@ -3,7 +3,7 @@ package workspace_test import ( "context" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/service/workspace" ) diff --git a/service/workspace/ext_utilities.go b/service/workspace/ext_utilities.go index a0a382682..1eae0283d 100644 --- a/service/workspace/ext_utilities.go +++ b/service/workspace/ext_utilities.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/databricks/databricks-sdk-go/databricks/apierr" + "github.com/databricks/databricks-sdk-go/databricks/useragent" "github.com/databricks/databricks-sdk-go/service/compute" - "github.com/databricks/databricks-sdk-go/useragent" ) var b64 = base64.StdEncoding diff --git a/service/workspace/git_credentials_usage_test.go b/service/workspace/git_credentials_usage_test.go index db3f0ceca..79bfd3584 100755 --- a/service/workspace/git_credentials_usage_test.go +++ b/service/workspace/git_credentials_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/workspace" diff --git a/service/workspace/impl.go b/service/workspace/impl.go index 4542d181a..d85728448 100755 --- a/service/workspace/impl.go +++ b/service/workspace/impl.go @@ -7,7 +7,7 @@ import ( "fmt" "net/http" - "github.com/databricks/databricks-sdk-go/client" + "github.com/databricks/databricks-sdk-go/databricks/client" ) // unexported type that holds implementations of just GitCredentials API methods diff --git a/service/workspace/model.go b/service/workspace/model.go index dbc17017e..8c9e63633 100755 --- a/service/workspace/model.go +++ b/service/workspace/model.go @@ -5,7 +5,7 @@ package workspace import ( "fmt" - "github.com/databricks/databricks-sdk-go/marshal" + "github.com/databricks/databricks-sdk-go/databricks/marshal" ) type AclItem struct { diff --git a/service/workspace/repos_usage_test.go b/service/workspace/repos_usage_test.go index d33d1625e..3217b7478 100755 --- a/service/workspace/repos_usage_test.go +++ b/service/workspace/repos_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/workspace" diff --git a/service/workspace/secrets_usage_test.go b/service/workspace/secrets_usage_test.go index d75d6cc15..59207288e 100755 --- a/service/workspace/secrets_usage_test.go +++ b/service/workspace/secrets_usage_test.go @@ -7,7 +7,7 @@ import ( "fmt" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/iam" diff --git a/service/workspace/workspace_usage_test.go b/service/workspace/workspace_usage_test.go index 21397ae65..e1591964a 100755 --- a/service/workspace/workspace_usage_test.go +++ b/service/workspace/workspace_usage_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "time" - "github.com/databricks/databricks-sdk-go" + "github.com/databricks/databricks-sdk-go/databricks" "github.com/databricks/databricks-sdk-go/databricks/log" "github.com/databricks/databricks-sdk-go/service/workspace" diff --git a/test-config.yaml b/test-config.yaml index 845193f1a..7508fb917 100644 --- a/test-config.yaml +++ b/test-config.yaml @@ -1,20 +1,20 @@ ignored_tests: go: - - package: github.com/databricks/databricks-sdk-go/internal + - package: github.com/databricks/databricks-sdk-go/databricks/internal test_name: TestAccWorkspaceUsers comment: Failures due to read-after-write inconsistency. Tracked in https://databricks.atlassian.net/browse/ES-1100061 - - package: github.com/databricks/databricks-sdk-go/internal + - package: github.com/databricks/databricks-sdk-go/databricks/internal test_name: TestAccGroups comment: Failures due to read-after-write inconsistency. Tracked in https://databricks.atlassian.net/browse/ES-1100061 - - package: github.com/databricks/databricks-sdk-go/internal + - package: github.com/databricks/databricks-sdk-go/databricks/internal test_name: TestAccServicePrincipalsOnAWS comment: Failures due to read-after-write inconsistency. Tracked in https://databricks.atlassian.net/browse/ES-1100061 - - package: github.com/databricks/databricks-sdk-go/internal + - package: github.com/databricks/databricks-sdk-go/databricks/internal test_name: TestMwsAccBudgets comment: Oauth issues in 2.1 REST APIs. Tracked in https://databricks.atlassian.net/browse/ES-1197977 - - package: github.com/databricks/databricks-sdk-go/internal + - package: github.com/databricks/databricks-sdk-go/databricks/internal test_name: TestUcAccMetastores comment: Metastores are limited in new accounts. Limit increase in https://databricks.atlassian.net/browse/ES-1242706 - - package: github.com/databricks/databricks-sdk-go/internal + - package: github.com/databricks/databricks-sdk-go/databricks/internal test_name: TestAccCreateOboTokenOnAws comment: Flaky test. Tracked in https://databricks.atlassian.net/browse/ES-1243720 \ No newline at end of file diff --git a/version/version.go b/version/version.go index bac14e8c6..142d27dac 100644 --- a/version/version.go +++ b/version/version.go @@ -1,4 +1,4 @@ package version // Version of the SDK, updated manually before every tag -const Version = "0.54.0" +const Version = "0.55.0"